commonMain.aws.sdk.kotlin.services.ssmincidents.model.AddRegionAction.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ssmincidents-jvm Show documentation
Show all versions of ssmincidents-jvm Show documentation
The AWS SDK for Kotlin client for SSM Incidents
// 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
}
}
}