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

commonMain.aws.sdk.kotlin.services.ssmincidents.model.AddRegionAction.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.ssmincidents.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Defines the Amazon Web Services Region and KMS key to add to the replication set.
 */
public class AddRegionAction private constructor(builder: Builder) {
    /**
     * The Amazon Web Services Region name to add to the replication set.
     */
    public val regionName: kotlin.String = requireNotNull(builder.regionName) { "A non-null value must be provided for regionName" }
    /**
     * The KMS key ID to use to encrypt your replication set.
     */
    public val sseKmsKeyId: kotlin.String? = builder.sseKmsKeyId

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

    override fun toString(): kotlin.String = buildString {
        append("AddRegionAction(")
        append("regionName=$regionName,")
        append("sseKmsKeyId=$sseKmsKeyId")
        append(")")
    }

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

        if (regionName != other.regionName) return false
        if (sseKmsKeyId != other.sseKmsKeyId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Web Services Region name to add to the replication set.
         */
        public var regionName: kotlin.String? = null
        /**
         * The KMS key ID to use to encrypt your replication set.
         */
        public var sseKmsKeyId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssmincidents.model.AddRegionAction) : this() {
            this.regionName = x.regionName
            this.sseKmsKeyId = x.sseKmsKeyId
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy