
commonMain.aws.sdk.kotlin.services.healthlake.model.KmsEncryptionConfig.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.healthlake.model
/**
* The customer-managed-key(CMK) used when creating a data store. If a customer owned key is not specified, an AWS owned key will be used for encryption.
*/
public class KmsEncryptionConfig private constructor(builder: Builder) {
/**
* The type of customer-managed-key(CMK) used for encryption. The two types of supported CMKs are customer owned CMKs and AWS owned CMKs.
*/
public val cmkType: aws.sdk.kotlin.services.healthlake.model.CmkType = requireNotNull(builder.cmkType) { "A non-null value must be provided for cmkType" }
/**
* The KMS encryption key id/alias used to encrypt the data store contents at rest.
*/
public val kmsKeyId: kotlin.String? = builder.kmsKeyId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.healthlake.model.KmsEncryptionConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("KmsEncryptionConfig(")
append("cmkType=$cmkType,")
append("kmsKeyId=$kmsKeyId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = cmkType.hashCode()
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 KmsEncryptionConfig
if (cmkType != other.cmkType) return false
if (kmsKeyId != other.kmsKeyId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.healthlake.model.KmsEncryptionConfig = Builder(this).apply(block).build()
public class Builder {
/**
* The type of customer-managed-key(CMK) used for encryption. The two types of supported CMKs are customer owned CMKs and AWS owned CMKs.
*/
public var cmkType: aws.sdk.kotlin.services.healthlake.model.CmkType? = null
/**
* The KMS encryption key id/alias used to encrypt the data store contents at rest.
*/
public var kmsKeyId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.healthlake.model.KmsEncryptionConfig) : this() {
this.cmkType = x.cmkType
this.kmsKeyId = x.kmsKeyId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.healthlake.model.KmsEncryptionConfig = KmsEncryptionConfig(this)
internal fun correctErrors(): Builder {
if (cmkType == null) cmkType = CmkType.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy