
commonMain.aws.sdk.kotlin.services.osis.model.EncryptionAtRestOptions.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.osis.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Options to control how OpenSearch encrypts buffer data.
*/
public class EncryptionAtRestOptions private constructor(builder: Builder) {
/**
* The ARN of the KMS key used to encrypt buffer data. By default, data is encrypted using an Amazon Web Services owned key.
*/
public val kmsKeyArn: kotlin.String = requireNotNull(builder.kmsKeyArn) { "A non-null value must be provided for kmsKeyArn" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.osis.model.EncryptionAtRestOptions = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EncryptionAtRestOptions(")
append("kmsKeyArn=$kmsKeyArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = kmsKeyArn.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 EncryptionAtRestOptions
if (kmsKeyArn != other.kmsKeyArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.osis.model.EncryptionAtRestOptions = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ARN of the KMS key used to encrypt buffer data. By default, data is encrypted using an Amazon Web Services owned key.
*/
public var kmsKeyArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.osis.model.EncryptionAtRestOptions) : this() {
this.kmsKeyArn = x.kmsKeyArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.osis.model.EncryptionAtRestOptions = EncryptionAtRestOptions(this)
internal fun correctErrors(): Builder {
if (kmsKeyArn == null) kmsKeyArn = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy