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

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

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

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



public class PutAutoScalingPolicyResponse private constructor(builder: Builder) {
    /**
     * The automatic scaling policy definition.
     */
    public val autoScalingPolicy: aws.sdk.kotlin.services.emr.model.AutoScalingPolicyDescription? = builder.autoScalingPolicy
    /**
     * The Amazon Resource Name (ARN) of the cluster.
     */
    public val clusterArn: kotlin.String? = builder.clusterArn
    /**
     * Specifies the ID of a cluster. The instance group to which the automatic scaling policy is applied is within this cluster.
     */
    public val clusterId: kotlin.String? = builder.clusterId
    /**
     * Specifies the ID of the instance group to which the scaling policy is applied.
     */
    public val instanceGroupId: kotlin.String? = builder.instanceGroupId

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

    override fun toString(): kotlin.String = buildString {
        append("PutAutoScalingPolicyResponse(")
        append("autoScalingPolicy=$autoScalingPolicy,")
        append("clusterArn=$clusterArn,")
        append("clusterId=$clusterId,")
        append("instanceGroupId=$instanceGroupId)")
    }

    override fun hashCode(): kotlin.Int {
        var result = autoScalingPolicy?.hashCode() ?: 0
        result = 31 * result + (clusterArn?.hashCode() ?: 0)
        result = 31 * result + (clusterId?.hashCode() ?: 0)
        result = 31 * result + (instanceGroupId?.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 PutAutoScalingPolicyResponse

        if (autoScalingPolicy != other.autoScalingPolicy) return false
        if (clusterArn != other.clusterArn) return false
        if (clusterId != other.clusterId) return false
        if (instanceGroupId != other.instanceGroupId) return false

        return true
    }

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

    public class Builder {
        /**
         * The automatic scaling policy definition.
         */
        public var autoScalingPolicy: aws.sdk.kotlin.services.emr.model.AutoScalingPolicyDescription? = null
        /**
         * The Amazon Resource Name (ARN) of the cluster.
         */
        public var clusterArn: kotlin.String? = null
        /**
         * Specifies the ID of a cluster. The instance group to which the automatic scaling policy is applied is within this cluster.
         */
        public var clusterId: kotlin.String? = null
        /**
         * Specifies the ID of the instance group to which the scaling policy is applied.
         */
        public var instanceGroupId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.emr.model.PutAutoScalingPolicyResponse) : this() {
            this.autoScalingPolicy = x.autoScalingPolicy
            this.clusterArn = x.clusterArn
            this.clusterId = x.clusterId
            this.instanceGroupId = x.instanceGroupId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy