
commonMain.aws.sdk.kotlin.services.opensearch.model.EncryptionAtRestOptions.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.opensearch.model
/**
* Specifies whether the domain should encrypt data at rest, and if so, the Key Management Service (KMS) key to use. Can be used only to create a new domain, not update an existing one.
*/
public class EncryptionAtRestOptions private constructor(builder: Builder) {
/**
* True to enable encryption at rest.
*/
public val enabled: kotlin.Boolean? = builder.enabled
/**
* The KMS key ID. Takes the form `1a2a3a4-1a2a-3a4a-5a6a-1a2a3a4a5a6a`.
*/
public val kmsKeyId: kotlin.String? = builder.kmsKeyId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.opensearch.model.EncryptionAtRestOptions = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EncryptionAtRestOptions(")
append("enabled=$enabled,")
append("kmsKeyId=$kmsKeyId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = enabled?.hashCode() ?: 0
result = 31 * result + (kmsKeyId?.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 EncryptionAtRestOptions
if (enabled != other.enabled) return false
if (kmsKeyId != other.kmsKeyId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.opensearch.model.EncryptionAtRestOptions = Builder(this).apply(block).build()
public class Builder {
/**
* True to enable encryption at rest.
*/
public var enabled: kotlin.Boolean? = null
/**
* The KMS key ID. Takes the form `1a2a3a4-1a2a-3a4a-5a6a-1a2a3a4a5a6a`.
*/
public var kmsKeyId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.opensearch.model.EncryptionAtRestOptions) : this() {
this.enabled = x.enabled
this.kmsKeyId = x.kmsKeyId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.opensearch.model.EncryptionAtRestOptions = EncryptionAtRestOptions(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy