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

commonMain.aws.sdk.kotlin.services.applicationautoscaling.model.SuspendedState.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.applicationautoscaling.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Specifies whether the scaling activities for a scalable target are in a suspended state.
 */
public class SuspendedState private constructor(builder: Builder) {
    /**
     * Whether scale in by a target tracking scaling policy or a step scaling policy is suspended. Set the value to `true` if you don't want Application Auto Scaling to remove capacity when a scaling policy is triggered. The default is `false`.
     */
    public val dynamicScalingInSuspended: kotlin.Boolean? = builder.dynamicScalingInSuspended
    /**
     * Whether scale out by a target tracking scaling policy or a step scaling policy is suspended. Set the value to `true` if you don't want Application Auto Scaling to add capacity when a scaling policy is triggered. The default is `false`.
     */
    public val dynamicScalingOutSuspended: kotlin.Boolean? = builder.dynamicScalingOutSuspended
    /**
     * Whether scheduled scaling is suspended. Set the value to `true` if you don't want Application Auto Scaling to add or remove capacity by initiating scheduled actions. The default is `false`.
     */
    public val scheduledScalingSuspended: kotlin.Boolean? = builder.scheduledScalingSuspended

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

    override fun toString(): kotlin.String = buildString {
        append("SuspendedState(")
        append("dynamicScalingInSuspended=$dynamicScalingInSuspended,")
        append("dynamicScalingOutSuspended=$dynamicScalingOutSuspended,")
        append("scheduledScalingSuspended=$scheduledScalingSuspended")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = dynamicScalingInSuspended?.hashCode() ?: 0
        result = 31 * result + (dynamicScalingOutSuspended?.hashCode() ?: 0)
        result = 31 * result + (scheduledScalingSuspended?.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 SuspendedState

        if (dynamicScalingInSuspended != other.dynamicScalingInSuspended) return false
        if (dynamicScalingOutSuspended != other.dynamicScalingOutSuspended) return false
        if (scheduledScalingSuspended != other.scheduledScalingSuspended) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Whether scale in by a target tracking scaling policy or a step scaling policy is suspended. Set the value to `true` if you don't want Application Auto Scaling to remove capacity when a scaling policy is triggered. The default is `false`.
         */
        public var dynamicScalingInSuspended: kotlin.Boolean? = null
        /**
         * Whether scale out by a target tracking scaling policy or a step scaling policy is suspended. Set the value to `true` if you don't want Application Auto Scaling to add capacity when a scaling policy is triggered. The default is `false`.
         */
        public var dynamicScalingOutSuspended: kotlin.Boolean? = null
        /**
         * Whether scheduled scaling is suspended. Set the value to `true` if you don't want Application Auto Scaling to add or remove capacity by initiating scheduled actions. The default is `false`.
         */
        public var scheduledScalingSuspended: kotlin.Boolean? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.applicationautoscaling.model.SuspendedState) : this() {
            this.dynamicScalingInSuspended = x.dynamicScalingInSuspended
            this.dynamicScalingOutSuspended = x.dynamicScalingOutSuspended
            this.scheduledScalingSuspended = x.scheduledScalingSuspended
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy