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

commonMain.aws.sdk.kotlin.services.dynamodb.model.ReplicaGlobalSecondaryIndexAutoScalingUpdate.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 replica that will be modified.
 */
public class ReplicaGlobalSecondaryIndexAutoScalingUpdate 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 provisionedReadCapacityAutoScalingUpdate: aws.sdk.kotlin.services.dynamodb.model.AutoScalingSettingsUpdate? = builder.provisionedReadCapacityAutoScalingUpdate

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

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

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

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

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.dynamodb.model.ReplicaGlobalSecondaryIndexAutoScalingUpdate = 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 provisionedReadCapacityAutoScalingUpdate: aws.sdk.kotlin.services.dynamodb.model.AutoScalingSettingsUpdate? = null

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy