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

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

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

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



/**
 * The detailed status of the cluster.
 */
public class ClusterStatus private constructor(builder: Builder) {
    /**
     * A list of tuples that provide information about the errors that caused a cluster termination. This structure may have up to 10 different `ErrorDetail` tuples.
     */
    public val errorDetails: List? = builder.errorDetails
    /**
     * The current state of the cluster.
     */
    public val state: aws.sdk.kotlin.services.emr.model.ClusterState? = builder.state
    /**
     * The reason for the cluster status change.
     */
    public val stateChangeReason: aws.sdk.kotlin.services.emr.model.ClusterStateChangeReason? = builder.stateChangeReason
    /**
     * A timeline that represents the status of a cluster over the lifetime of the cluster.
     */
    public val timeline: aws.sdk.kotlin.services.emr.model.ClusterTimeline? = builder.timeline

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

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

    override fun hashCode(): kotlin.Int {
        var result = errorDetails?.hashCode() ?: 0
        result = 31 * 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 ClusterStatus

        if (errorDetails != other.errorDetails) return false
        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.ClusterStatus = Builder(this).apply(block).build()

    public class Builder {
        /**
         * A list of tuples that provide information about the errors that caused a cluster termination. This structure may have up to 10 different `ErrorDetail` tuples.
         */
        public var errorDetails: List? = null
        /**
         * The current state of the cluster.
         */
        public var state: aws.sdk.kotlin.services.emr.model.ClusterState? = null
        /**
         * The reason for the cluster status change.
         */
        public var stateChangeReason: aws.sdk.kotlin.services.emr.model.ClusterStateChangeReason? = null
        /**
         * A timeline that represents the status of a cluster over the lifetime of the cluster.
         */
        public var timeline: aws.sdk.kotlin.services.emr.model.ClusterTimeline? = null

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy