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

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

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

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



/**
 * The status of an automatic scaling policy.
 */
public class AutoScalingPolicyStatus private constructor(builder: Builder) {
    /**
     * Indicates the status of the automatic scaling policy.
     */
    public val state: aws.sdk.kotlin.services.emr.model.AutoScalingPolicyState? = builder.state
    /**
     * The reason for a change in status.
     */
    public val stateChangeReason: aws.sdk.kotlin.services.emr.model.AutoScalingPolicyStateChangeReason? = builder.stateChangeReason

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

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

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

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

        return true
    }

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

    public class Builder {
        /**
         * Indicates the status of the automatic scaling policy.
         */
        public var state: aws.sdk.kotlin.services.emr.model.AutoScalingPolicyState? = null
        /**
         * The reason for a change in status.
         */
        public var stateChangeReason: aws.sdk.kotlin.services.emr.model.AutoScalingPolicyStateChangeReason? = null

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy