commonMain.aws.sdk.kotlin.services.secretsmanager.model.ReplicateSecretToRegionsRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of secretsmanager-jvm Show documentation
Show all versions of secretsmanager-jvm Show documentation
The AWS SDK for Kotlin client for Secrets Manager
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.secretsmanager.model
import aws.smithy.kotlin.runtime.SdkDsl
public class ReplicateSecretToRegionsRequest private constructor(builder: Builder) {
/**
* A list of Regions in which to replicate the secret.
*/
public val addReplicaRegions: List? = builder.addReplicaRegions
/**
* Specifies whether to overwrite a secret with the same name in the destination Region. By default, secrets aren't overwritten.
*/
public val forceOverwriteReplicaSecret: kotlin.Boolean? = builder.forceOverwriteReplicaSecret
/**
* The ARN or name of the secret to replicate.
*/
public val secretId: kotlin.String? = builder.secretId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.secretsmanager.model.ReplicateSecretToRegionsRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ReplicateSecretToRegionsRequest(")
append("addReplicaRegions=$addReplicaRegions,")
append("forceOverwriteReplicaSecret=$forceOverwriteReplicaSecret,")
append("secretId=$secretId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = addReplicaRegions?.hashCode() ?: 0
result = 31 * result + (forceOverwriteReplicaSecret?.hashCode() ?: 0)
result = 31 * result + (secretId?.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 ReplicateSecretToRegionsRequest
if (addReplicaRegions != other.addReplicaRegions) return false
if (forceOverwriteReplicaSecret != other.forceOverwriteReplicaSecret) return false
if (secretId != other.secretId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.secretsmanager.model.ReplicateSecretToRegionsRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A list of Regions in which to replicate the secret.
*/
public var addReplicaRegions: List? = null
/**
* Specifies whether to overwrite a secret with the same name in the destination Region. By default, secrets aren't overwritten.
*/
public var forceOverwriteReplicaSecret: kotlin.Boolean? = null
/**
* The ARN or name of the secret to replicate.
*/
public var secretId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.secretsmanager.model.ReplicateSecretToRegionsRequest) : this() {
this.addReplicaRegions = x.addReplicaRegions
this.forceOverwriteReplicaSecret = x.forceOverwriteReplicaSecret
this.secretId = x.secretId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.secretsmanager.model.ReplicateSecretToRegionsRequest = ReplicateSecretToRegionsRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}