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

commonMain.aws.sdk.kotlin.services.dynamodb.model.ReplicaAutoScalingUpdate.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 replica that will be modified.
 */
public class ReplicaAutoScalingUpdate private constructor(builder: Builder) {
    /**
     * The Region where the replica exists.
     */
    public val regionName: kotlin.String = requireNotNull(builder.regionName) { "A non-null value must be provided for regionName" }
    /**
     * Represents the auto scaling settings of global secondary indexes that will be modified.
     */
    public val replicaGlobalSecondaryIndexUpdates: List? = builder.replicaGlobalSecondaryIndexUpdates
    /**
     * Represents the auto scaling settings to be modified for a global table or global secondary index.
     */
    public val replicaProvisionedReadCapacityAutoScalingUpdate: aws.sdk.kotlin.services.dynamodb.model.AutoScalingSettingsUpdate? = builder.replicaProvisionedReadCapacityAutoScalingUpdate

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

    override fun toString(): kotlin.String = buildString {
        append("ReplicaAutoScalingUpdate(")
        append("regionName=$regionName,")
        append("replicaGlobalSecondaryIndexUpdates=$replicaGlobalSecondaryIndexUpdates,")
        append("replicaProvisionedReadCapacityAutoScalingUpdate=$replicaProvisionedReadCapacityAutoScalingUpdate")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = regionName.hashCode()
        result = 31 * result + (replicaGlobalSecondaryIndexUpdates?.hashCode() ?: 0)
        result = 31 * result + (replicaProvisionedReadCapacityAutoScalingUpdate?.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 ReplicaAutoScalingUpdate

        if (regionName != other.regionName) return false
        if (replicaGlobalSecondaryIndexUpdates != other.replicaGlobalSecondaryIndexUpdates) return false
        if (replicaProvisionedReadCapacityAutoScalingUpdate != other.replicaProvisionedReadCapacityAutoScalingUpdate) return false

        return true
    }

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

    public class Builder {
        /**
         * The Region where the replica exists.
         */
        public var regionName: kotlin.String? = null
        /**
         * Represents the auto scaling settings of global secondary indexes that will be modified.
         */
        public var replicaGlobalSecondaryIndexUpdates: List? = null
        /**
         * Represents the auto scaling settings to be modified for a global table or global secondary index.
         */
        public var replicaProvisionedReadCapacityAutoScalingUpdate: aws.sdk.kotlin.services.dynamodb.model.AutoScalingSettingsUpdate? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.dynamodb.model.ReplicaAutoScalingUpdate) : this() {
            this.regionName = x.regionName
            this.replicaGlobalSecondaryIndexUpdates = x.replicaGlobalSecondaryIndexUpdates
            this.replicaProvisionedReadCapacityAutoScalingUpdate = x.replicaProvisionedReadCapacityAutoScalingUpdate
        }

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

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

        internal fun correctErrors(): Builder {
            if (regionName == null) regionName = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy