All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.athena.model.CustomerContentEncryptionConfiguration.kt Maven / Gradle / Ivy

The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.athena.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Specifies the customer managed KMS key that is used to encrypt the user's data stores in Athena. When an Amazon Web Services managed key is used, this value is null. This setting does not apply to Athena SQL workgroups.
 */
public class CustomerContentEncryptionConfiguration private constructor(builder: Builder) {
    /**
     * The customer managed KMS key that is used to encrypt the user's data stores in Athena.
     */
    public val kmsKey: kotlin.String = requireNotNull(builder.kmsKey) { "A non-null value must be provided for kmsKey" }

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.athena.model.CustomerContentEncryptionConfiguration = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CustomerContentEncryptionConfiguration(")
        append("kmsKey=$kmsKey")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = kmsKey.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 CustomerContentEncryptionConfiguration

        if (kmsKey != other.kmsKey) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.athena.model.CustomerContentEncryptionConfiguration = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The customer managed KMS key that is used to encrypt the user's data stores in Athena.
         */
        public var kmsKey: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.athena.model.CustomerContentEncryptionConfiguration) : this() {
            this.kmsKey = x.kmsKey
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.athena.model.CustomerContentEncryptionConfiguration = CustomerContentEncryptionConfiguration(this)

        internal fun correctErrors(): Builder {
            if (kmsKey == null) kmsKey = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy