
commonMain.aws.sdk.kotlin.services.emr.model.AutoScalingPolicyStateChangeReason.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.emr.model
/**
* The reason for an AutoScalingPolicyStatus change.
*/
public class AutoScalingPolicyStateChangeReason private constructor(builder: Builder) {
/**
* The code indicating the reason for the change in status.`USER_REQUEST` indicates that the scaling policy status was changed by a user. `PROVISION_FAILURE` indicates that the status change was because the policy failed to provision. `CLEANUP_FAILURE` indicates an error.
*/
public val code: aws.sdk.kotlin.services.emr.model.AutoScalingPolicyStateChangeReasonCode? = builder.code
/**
* A friendly, more verbose message that accompanies an automatic scaling policy state change.
*/
public val message: kotlin.String? = builder.message
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.emr.model.AutoScalingPolicyStateChangeReason = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AutoScalingPolicyStateChangeReason(")
append("code=$code,")
append("message=$message)")
}
override fun hashCode(): kotlin.Int {
var result = code?.hashCode() ?: 0
result = 31 * result + (message?.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 AutoScalingPolicyStateChangeReason
if (code != other.code) return false
if (message != other.message) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.emr.model.AutoScalingPolicyStateChangeReason = Builder(this).apply(block).build()
public class Builder {
/**
* The code indicating the reason for the change in status.`USER_REQUEST` indicates that the scaling policy status was changed by a user. `PROVISION_FAILURE` indicates that the status change was because the policy failed to provision. `CLEANUP_FAILURE` indicates an error.
*/
public var code: aws.sdk.kotlin.services.emr.model.AutoScalingPolicyStateChangeReasonCode? = null
/**
* A friendly, more verbose message that accompanies an automatic scaling policy state change.
*/
public var message: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.emr.model.AutoScalingPolicyStateChangeReason) : this() {
this.code = x.code
this.message = x.message
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.emr.model.AutoScalingPolicyStateChangeReason = AutoScalingPolicyStateChangeReason(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy