commonMain.aws.sdk.kotlin.services.ssmincidents.model.UpdateDeletionProtectionRequest.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 UpdateDeletionProtectionRequest private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the replication set to update.
*/
public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
/**
* A token that ensures that the operation is called only once with the specified details.
*/
public val clientToken: kotlin.String? = builder.clientToken
/**
* Specifies if deletion protection is turned on or off in your account.
*/
public val deletionProtected: kotlin.Boolean = requireNotNull(builder.deletionProtected) { "A non-null value must be provided for deletionProtected" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssmincidents.model.UpdateDeletionProtectionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateDeletionProtectionRequest(")
append("arn=$arn,")
append("clientToken=$clientToken,")
append("deletionProtected=$deletionProtected")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn.hashCode()
result = 31 * result + (clientToken?.hashCode() ?: 0)
result = 31 * result + (deletionProtected.hashCode())
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 UpdateDeletionProtectionRequest
if (arn != other.arn) return false
if (clientToken != other.clientToken) return false
if (deletionProtected != other.deletionProtected) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssmincidents.model.UpdateDeletionProtectionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the replication set to update.
*/
public var arn: kotlin.String? = null
/**
* A token that ensures that the operation is called only once with the specified details.
*/
public var clientToken: kotlin.String? = null
/**
* Specifies if deletion protection is turned on or off in your account.
*/
public var deletionProtected: kotlin.Boolean? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssmincidents.model.UpdateDeletionProtectionRequest) : this() {
this.arn = x.arn
this.clientToken = x.clientToken
this.deletionProtected = x.deletionProtected
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssmincidents.model.UpdateDeletionProtectionRequest = UpdateDeletionProtectionRequest(this)
internal fun correctErrors(): Builder {
if (arn == null) arn = ""
if (deletionProtected == null) deletionProtected = false
return this
}
}
}