commonMain.aws.sdk.kotlin.services.glue.model.EncryptionAtRest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-jvm Show documentation
Show all versions of glue-jvm Show documentation
The AWS SDK for Kotlin client for Glue
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Specifies the encryption-at-rest configuration for the Data Catalog.
*/
public class EncryptionAtRest private constructor(builder: Builder) {
/**
* The encryption-at-rest mode for encrypting Data Catalog data.
*/
public val catalogEncryptionMode: aws.sdk.kotlin.services.glue.model.CatalogEncryptionMode = requireNotNull(builder.catalogEncryptionMode) { "A non-null value must be provided for catalogEncryptionMode" }
/**
* The role that Glue assumes to encrypt and decrypt the Data Catalog objects on the caller's behalf.
*/
public val catalogEncryptionServiceRole: kotlin.String? = builder.catalogEncryptionServiceRole
/**
* The ID of the KMS key to use for encryption at rest.
*/
public val sseAwsKmsKeyId: kotlin.String? = builder.sseAwsKmsKeyId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.EncryptionAtRest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EncryptionAtRest(")
append("catalogEncryptionMode=$catalogEncryptionMode,")
append("catalogEncryptionServiceRole=$catalogEncryptionServiceRole,")
append("sseAwsKmsKeyId=$sseAwsKmsKeyId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = catalogEncryptionMode.hashCode()
result = 31 * result + (catalogEncryptionServiceRole?.hashCode() ?: 0)
result = 31 * result + (sseAwsKmsKeyId?.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 EncryptionAtRest
if (catalogEncryptionMode != other.catalogEncryptionMode) return false
if (catalogEncryptionServiceRole != other.catalogEncryptionServiceRole) return false
if (sseAwsKmsKeyId != other.sseAwsKmsKeyId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.EncryptionAtRest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The encryption-at-rest mode for encrypting Data Catalog data.
*/
public var catalogEncryptionMode: aws.sdk.kotlin.services.glue.model.CatalogEncryptionMode? = null
/**
* The role that Glue assumes to encrypt and decrypt the Data Catalog objects on the caller's behalf.
*/
public var catalogEncryptionServiceRole: kotlin.String? = null
/**
* The ID of the KMS key to use for encryption at rest.
*/
public var sseAwsKmsKeyId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.EncryptionAtRest) : this() {
this.catalogEncryptionMode = x.catalogEncryptionMode
this.catalogEncryptionServiceRole = x.catalogEncryptionServiceRole
this.sseAwsKmsKeyId = x.sseAwsKmsKeyId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.EncryptionAtRest = EncryptionAtRest(this)
internal fun correctErrors(): Builder {
if (catalogEncryptionMode == null) catalogEncryptionMode = CatalogEncryptionMode.SdkUnknown("no value provided")
return this
}
}
}