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

commonMain.aws.sdk.kotlin.services.dynamodb.model.GlobalSecondaryIndexAutoScalingUpdate.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 of a global secondary index for a global table that will be modified.
 */
public class GlobalSecondaryIndexAutoScalingUpdate private constructor(builder: Builder) {
    /**
     * The name of the global secondary index.
     */
    public val indexName: kotlin.String? = builder.indexName
    /**
     * Represents the auto scaling settings to be modified for a global table or global secondary index.
     */
    public val provisionedWriteCapacityAutoScalingUpdate: aws.sdk.kotlin.services.dynamodb.model.AutoScalingSettingsUpdate? = builder.provisionedWriteCapacityAutoScalingUpdate

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

    override fun toString(): kotlin.String = buildString {
        append("GlobalSecondaryIndexAutoScalingUpdate(")
        append("indexName=$indexName,")
        append("provisionedWriteCapacityAutoScalingUpdate=$provisionedWriteCapacityAutoScalingUpdate")
        append(")")
    }

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

        if (indexName != other.indexName) return false
        if (provisionedWriteCapacityAutoScalingUpdate != other.provisionedWriteCapacityAutoScalingUpdate) return false

        return true
    }

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

    public class Builder {
        /**
         * The name of the global secondary index.
         */
        public var indexName: kotlin.String? = null
        /**
         * Represents the auto scaling settings to be modified for a global table or global secondary index.
         */
        public var provisionedWriteCapacityAutoScalingUpdate: aws.sdk.kotlin.services.dynamodb.model.AutoScalingSettingsUpdate? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.dynamodb.model.GlobalSecondaryIndexAutoScalingUpdate) : this() {
            this.indexName = x.indexName
            this.provisionedWriteCapacityAutoScalingUpdate = x.provisionedWriteCapacityAutoScalingUpdate
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy