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

commonMain.aws.sdk.kotlin.services.dsql.model.CreateMultiRegionClustersRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.100
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.dsql.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateMultiRegionClustersRequest private constructor(builder: Builder) {
    /**
     * A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.
     *
     * If you don't specify a client token, the Amazon Web Services SDK automatically generates one.
     */
    public val clientToken: kotlin.String? = builder.clientToken
    /**
     * A mapping of properties to use when creating linked clusters.
     */
    public val clusterProperties: Map? = builder.clusterProperties
    /**
     * An array of the Regions in which you want to create additional clusters.
     */
    public val linkedRegionList: List? = builder.linkedRegionList
    /**
     * The witness Region of multi-Region clusters.
     */
    public val witnessRegion: kotlin.String? = builder.witnessRegion

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

    override fun toString(): kotlin.String = buildString {
        append("CreateMultiRegionClustersRequest(")
        append("clientToken=$clientToken,")
        append("clusterProperties=$clusterProperties,")
        append("linkedRegionList=$linkedRegionList,")
        append("witnessRegion=$witnessRegion")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clientToken?.hashCode() ?: 0
        result = 31 * result + (clusterProperties?.hashCode() ?: 0)
        result = 31 * result + (linkedRegionList?.hashCode() ?: 0)
        result = 31 * result + (witnessRegion?.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 CreateMultiRegionClustersRequest

        if (clientToken != other.clientToken) return false
        if (clusterProperties != other.clusterProperties) return false
        if (linkedRegionList != other.linkedRegionList) return false
        if (witnessRegion != other.witnessRegion) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully. The subsequent retries with the same client token return the result from the original successful request and they have no additional effect.
         *
         * If you don't specify a client token, the Amazon Web Services SDK automatically generates one.
         */
        public var clientToken: kotlin.String? = null
        /**
         * A mapping of properties to use when creating linked clusters.
         */
        public var clusterProperties: Map? = null
        /**
         * An array of the Regions in which you want to create additional clusters.
         */
        public var linkedRegionList: List? = null
        /**
         * The witness Region of multi-Region clusters.
         */
        public var witnessRegion: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.dsql.model.CreateMultiRegionClustersRequest) : this() {
            this.clientToken = x.clientToken
            this.clusterProperties = x.clusterProperties
            this.linkedRegionList = x.linkedRegionList
            this.witnessRegion = x.witnessRegion
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy