commonMain.aws.sdk.kotlin.services.ssmincidents.model.CreateReplicationSetRequest.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
public class CreateReplicationSetRequest private constructor(builder: Builder) {
/**
* A token that ensures that the operation is called only once with the specified details.
*/
public val clientToken: kotlin.String? = builder.clientToken
/**
* The Regions that Incident Manager replicates your data to. You can have up to three Regions in your replication set.
*/
public val regions: Map = requireNotNull(builder.regions) { "A non-null value must be provided for regions" }
/**
* A list of tags to add to the replication set.
*/
public val tags: Map? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssmincidents.model.CreateReplicationSetRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateReplicationSetRequest(")
append("clientToken=$clientToken,")
append("regions=$regions,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientToken?.hashCode() ?: 0
result = 31 * result + (regions.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 CreateReplicationSetRequest
if (clientToken != other.clientToken) return false
if (regions != other.regions) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssmincidents.model.CreateReplicationSetRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A token that ensures that the operation is called only once with the specified details.
*/
public var clientToken: kotlin.String? = null
/**
* The Regions that Incident Manager replicates your data to. You can have up to three Regions in your replication set.
*/
public var regions: Map? = null
/**
* A list of tags to add to the replication set.
*/
public var tags: Map? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssmincidents.model.CreateReplicationSetRequest) : this() {
this.clientToken = x.clientToken
this.regions = x.regions
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssmincidents.model.CreateReplicationSetRequest = CreateReplicationSetRequest(this)
internal fun correctErrors(): Builder {
if (regions == null) regions = emptyMap()
return this
}
}
}