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

commonMain.aws.sdk.kotlin.services.emr.model.InstanceStatus.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.emr.model



/**
 * The instance status details.
 */
public class InstanceStatus private constructor(builder: Builder) {
    /**
     * The current state of the instance.
     */
    public val state: aws.sdk.kotlin.services.emr.model.InstanceState? = builder.state
    /**
     * The details of the status change reason for the instance.
     */
    public val stateChangeReason: aws.sdk.kotlin.services.emr.model.InstanceStateChangeReason? = builder.stateChangeReason
    /**
     * The timeline of the instance status over time.
     */
    public val timeline: aws.sdk.kotlin.services.emr.model.InstanceTimeline? = builder.timeline

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

    override fun toString(): kotlin.String = buildString {
        append("InstanceStatus(")
        append("state=$state,")
        append("stateChangeReason=$stateChangeReason,")
        append("timeline=$timeline)")
    }

    override fun hashCode(): kotlin.Int {
        var result = state?.hashCode() ?: 0
        result = 31 * result + (stateChangeReason?.hashCode() ?: 0)
        result = 31 * result + (timeline?.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 InstanceStatus

        if (state != other.state) return false
        if (stateChangeReason != other.stateChangeReason) return false
        if (timeline != other.timeline) return false

        return true
    }

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

    public class Builder {
        /**
         * The current state of the instance.
         */
        public var state: aws.sdk.kotlin.services.emr.model.InstanceState? = null
        /**
         * The details of the status change reason for the instance.
         */
        public var stateChangeReason: aws.sdk.kotlin.services.emr.model.InstanceStateChangeReason? = null
        /**
         * The timeline of the instance status over time.
         */
        public var timeline: aws.sdk.kotlin.services.emr.model.InstanceTimeline? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.emr.model.InstanceStatus) : this() {
            this.state = x.state
            this.stateChangeReason = x.stateChangeReason
            this.timeline = x.timeline
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.emr.model.InstanceStateChangeReason] inside the given [block]
         */
        public fun stateChangeReason(block: aws.sdk.kotlin.services.emr.model.InstanceStateChangeReason.Builder.() -> kotlin.Unit) {
            this.stateChangeReason = aws.sdk.kotlin.services.emr.model.InstanceStateChangeReason.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.emr.model.InstanceTimeline] inside the given [block]
         */
        public fun timeline(block: aws.sdk.kotlin.services.emr.model.InstanceTimeline.Builder.() -> kotlin.Unit) {
            this.timeline = aws.sdk.kotlin.services.emr.model.InstanceTimeline.invoke(block)
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy