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

commonMain.aws.sdk.kotlin.services.docdbelastic.model.CreateClusterSnapshotRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.docdbelastic.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateClusterSnapshotRequest private constructor(builder: Builder) {
    /**
     * The ARN identifier of the elastic cluster of which you want to create a snapshot.
     */
    public val clusterArn: kotlin.String = requireNotNull(builder.clusterArn) { "A non-null value must be provided for clusterArn" }
    /**
     * The name of the new elastic cluster snapshot.
     */
    public val snapshotName: kotlin.String = requireNotNull(builder.snapshotName) { "A non-null value must be provided for snapshotName" }
    /**
     * The tags to be assigned to the new elastic cluster snapshot.
     */
    public val tags: Map? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateClusterSnapshotRequest(")
        append("clusterArn=$clusterArn,")
        append("snapshotName=$snapshotName,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clusterArn.hashCode()
        result = 31 * result + (snapshotName.hashCode())
        result = 31 * result + (tags?.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 CreateClusterSnapshotRequest

        if (clusterArn != other.clusterArn) return false
        if (snapshotName != other.snapshotName) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ARN identifier of the elastic cluster of which you want to create a snapshot.
         */
        public var clusterArn: kotlin.String? = null
        /**
         * The name of the new elastic cluster snapshot.
         */
        public var snapshotName: kotlin.String? = null
        /**
         * The tags to be assigned to the new elastic cluster snapshot.
         */
        public var tags: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.docdbelastic.model.CreateClusterSnapshotRequest) : this() {
            this.clusterArn = x.clusterArn
            this.snapshotName = x.snapshotName
            this.tags = x.tags
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy