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

commonMain.aws.sdk.kotlin.services.dynamodb.model.AutoScalingSettingsDescription.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.dynamodb.model



/**
 * Represents the auto scaling settings for a global table or global secondary index.
 */
public class AutoScalingSettingsDescription private constructor(builder: Builder) {
    /**
     * Disabled auto scaling for this global table or global secondary index.
     */
    public val autoScalingDisabled: kotlin.Boolean? = builder.autoScalingDisabled
    /**
     * Role ARN used for configuring the auto scaling policy.
     */
    public val autoScalingRoleArn: kotlin.String? = builder.autoScalingRoleArn
    /**
     * The maximum capacity units that a global table or global secondary index should be scaled up to.
     */
    public val maximumUnits: kotlin.Long? = builder.maximumUnits
    /**
     * The minimum capacity units that a global table or global secondary index should be scaled down to.
     */
    public val minimumUnits: kotlin.Long? = builder.minimumUnits
    /**
     * Information about the scaling policies.
     */
    public val scalingPolicies: List? = builder.scalingPolicies

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

    override fun toString(): kotlin.String = buildString {
        append("AutoScalingSettingsDescription(")
        append("autoScalingDisabled=$autoScalingDisabled,")
        append("autoScalingRoleArn=$autoScalingRoleArn,")
        append("maximumUnits=$maximumUnits,")
        append("minimumUnits=$minimumUnits,")
        append("scalingPolicies=$scalingPolicies")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = autoScalingDisabled?.hashCode() ?: 0
        result = 31 * result + (autoScalingRoleArn?.hashCode() ?: 0)
        result = 31 * result + (maximumUnits?.hashCode() ?: 0)
        result = 31 * result + (minimumUnits?.hashCode() ?: 0)
        result = 31 * result + (scalingPolicies?.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 AutoScalingSettingsDescription

        if (autoScalingDisabled != other.autoScalingDisabled) return false
        if (autoScalingRoleArn != other.autoScalingRoleArn) return false
        if (maximumUnits != other.maximumUnits) return false
        if (minimumUnits != other.minimumUnits) return false
        if (scalingPolicies != other.scalingPolicies) return false

        return true
    }

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

    public class Builder {
        /**
         * Disabled auto scaling for this global table or global secondary index.
         */
        public var autoScalingDisabled: kotlin.Boolean? = null
        /**
         * Role ARN used for configuring the auto scaling policy.
         */
        public var autoScalingRoleArn: kotlin.String? = null
        /**
         * The maximum capacity units that a global table or global secondary index should be scaled up to.
         */
        public var maximumUnits: kotlin.Long? = null
        /**
         * The minimum capacity units that a global table or global secondary index should be scaled down to.
         */
        public var minimumUnits: kotlin.Long? = null
        /**
         * Information about the scaling policies.
         */
        public var scalingPolicies: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.dynamodb.model.AutoScalingSettingsDescription) : this() {
            this.autoScalingDisabled = x.autoScalingDisabled
            this.autoScalingRoleArn = x.autoScalingRoleArn
            this.maximumUnits = x.maximumUnits
            this.minimumUnits = x.minimumUnits
            this.scalingPolicies = x.scalingPolicies
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy