All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.codepipeline.model.TransitionState.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.codepipeline.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * Represents information about the state of transitions between one stage and another stage.
 */
public class TransitionState private constructor(builder: Builder) {
    /**
     * The user-specified reason why the transition between two stages of a pipeline was disabled.
     */
    public val disabledReason: kotlin.String? = builder.disabledReason
    /**
     * Whether the transition between stages is enabled (true) or disabled (false).
     */
    public val enabled: kotlin.Boolean = builder.enabled
    /**
     * The timestamp when the transition state was last changed.
     */
    public val lastChangedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.lastChangedAt
    /**
     * The ID of the user who last changed the transition state.
     */
    public val lastChangedBy: kotlin.String? = builder.lastChangedBy

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codepipeline.model.TransitionState = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("TransitionState(")
        append("disabledReason=$disabledReason,")
        append("enabled=$enabled,")
        append("lastChangedAt=$lastChangedAt,")
        append("lastChangedBy=$lastChangedBy")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = disabledReason?.hashCode() ?: 0
        result = 31 * result + (enabled.hashCode())
        result = 31 * result + (lastChangedAt?.hashCode() ?: 0)
        result = 31 * result + (lastChangedBy?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as TransitionState

        if (disabledReason != other.disabledReason) return false
        if (enabled != other.enabled) return false
        if (lastChangedAt != other.lastChangedAt) return false
        if (lastChangedBy != other.lastChangedBy) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codepipeline.model.TransitionState = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The user-specified reason why the transition between two stages of a pipeline was disabled.
         */
        public var disabledReason: kotlin.String? = null
        /**
         * Whether the transition between stages is enabled (true) or disabled (false).
         */
        public var enabled: kotlin.Boolean = false
        /**
         * The timestamp when the transition state was last changed.
         */
        public var lastChangedAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The ID of the user who last changed the transition state.
         */
        public var lastChangedBy: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codepipeline.model.TransitionState) : this() {
            this.disabledReason = x.disabledReason
            this.enabled = x.enabled
            this.lastChangedAt = x.lastChangedAt
            this.lastChangedBy = x.lastChangedBy
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.codepipeline.model.TransitionState = TransitionState(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy