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

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

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

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



/**
 * The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.
 */
public class ScalingAction private constructor(builder: Builder) {
    /**
     * Not available for instance groups. Instance groups use the market type specified for the group.
     */
    public val market: aws.sdk.kotlin.services.emr.model.MarketType? = builder.market
    /**
     * The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.
     */
    public val simpleScalingPolicyConfiguration: aws.sdk.kotlin.services.emr.model.SimpleScalingPolicyConfiguration? = builder.simpleScalingPolicyConfiguration

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

    override fun toString(): kotlin.String = buildString {
        append("ScalingAction(")
        append("market=$market,")
        append("simpleScalingPolicyConfiguration=$simpleScalingPolicyConfiguration)")
    }

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

        if (market != other.market) return false
        if (simpleScalingPolicyConfiguration != other.simpleScalingPolicyConfiguration) return false

        return true
    }

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

    public class Builder {
        /**
         * Not available for instance groups. Instance groups use the market type specified for the group.
         */
        public var market: aws.sdk.kotlin.services.emr.model.MarketType? = null
        /**
         * The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.
         */
        public var simpleScalingPolicyConfiguration: aws.sdk.kotlin.services.emr.model.SimpleScalingPolicyConfiguration? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.emr.model.ScalingAction) : this() {
            this.market = x.market
            this.simpleScalingPolicyConfiguration = x.simpleScalingPolicyConfiguration
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy