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

commonMain.aws.sdk.kotlin.services.cloudhsmv2.model.ModifyClusterRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.cloudhsmv2.model



public class ModifyClusterRequest private constructor(builder: Builder) {
    /**
     * A policy that defines how the service retains backups.
     */
    public val backupRetentionPolicy: aws.sdk.kotlin.services.cloudhsmv2.model.BackupRetentionPolicy? = builder.backupRetentionPolicy
    /**
     * The identifier (ID) of the cluster that you want to modify. To find the cluster ID, use DescribeClusters.
     */
    public val clusterId: kotlin.String? = builder.clusterId

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

    override fun toString(): kotlin.String = buildString {
        append("ModifyClusterRequest(")
        append("backupRetentionPolicy=$backupRetentionPolicy,")
        append("clusterId=$clusterId")
        append(")")
    }

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

        if (backupRetentionPolicy != other.backupRetentionPolicy) return false
        if (clusterId != other.clusterId) return false

        return true
    }

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

    public class Builder {
        /**
         * A policy that defines how the service retains backups.
         */
        public var backupRetentionPolicy: aws.sdk.kotlin.services.cloudhsmv2.model.BackupRetentionPolicy? = null
        /**
         * The identifier (ID) of the cluster that you want to modify. To find the cluster ID, use DescribeClusters.
         */
        public var clusterId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudhsmv2.model.ModifyClusterRequest) : this() {
            this.backupRetentionPolicy = x.backupRetentionPolicy
            this.clusterId = x.clusterId
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy