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

commonMain.aws.sdk.kotlin.services.cleanrooms.model.DataEncryptionMetadata.kt Maven / Gradle / Ivy

There is a newer version: 1.3.35
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.cleanrooms.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The settings for client-side encryption for cryptographic computing.
 */
public class DataEncryptionMetadata private constructor(builder: Builder) {
    /**
     * Indicates whether encrypted tables can contain cleartext data (`TRUE`) or are to cryptographically process every column (`FALSE`).
     */
    public val allowCleartext: kotlin.Boolean = requireNotNull(builder.allowCleartext) { "A non-null value must be provided for allowCleartext" }
    /**
     * Indicates whether Fingerprint columns can contain duplicate entries (`TRUE`) or are to contain only non-repeated values (`FALSE`).
     */
    public val allowDuplicates: kotlin.Boolean = requireNotNull(builder.allowDuplicates) { "A non-null value must be provided for allowDuplicates" }
    /**
     * Indicates whether Fingerprint columns can be joined on any other Fingerprint column with a different name (`TRUE`) or can only be joined on Fingerprint columns of the same name (`FALSE`).
     */
    public val allowJoinsOnColumnsWithDifferentNames: kotlin.Boolean = requireNotNull(builder.allowJoinsOnColumnsWithDifferentNames) { "A non-null value must be provided for allowJoinsOnColumnsWithDifferentNames" }
    /**
     * Indicates whether NULL values are to be copied as NULL to encrypted tables (`TRUE`) or cryptographically processed (`FALSE`).
     */
    public val preserveNulls: kotlin.Boolean = requireNotNull(builder.preserveNulls) { "A non-null value must be provided for preserveNulls" }

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

    override fun toString(): kotlin.String = buildString {
        append("DataEncryptionMetadata(")
        append("allowCleartext=$allowCleartext,")
        append("allowDuplicates=$allowDuplicates,")
        append("allowJoinsOnColumnsWithDifferentNames=$allowJoinsOnColumnsWithDifferentNames,")
        append("preserveNulls=$preserveNulls")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = allowCleartext.hashCode()
        result = 31 * result + (allowDuplicates.hashCode())
        result = 31 * result + (allowJoinsOnColumnsWithDifferentNames.hashCode())
        result = 31 * result + (preserveNulls.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 DataEncryptionMetadata

        if (allowCleartext != other.allowCleartext) return false
        if (allowDuplicates != other.allowDuplicates) return false
        if (allowJoinsOnColumnsWithDifferentNames != other.allowJoinsOnColumnsWithDifferentNames) return false
        if (preserveNulls != other.preserveNulls) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Indicates whether encrypted tables can contain cleartext data (`TRUE`) or are to cryptographically process every column (`FALSE`).
         */
        public var allowCleartext: kotlin.Boolean? = null
        /**
         * Indicates whether Fingerprint columns can contain duplicate entries (`TRUE`) or are to contain only non-repeated values (`FALSE`).
         */
        public var allowDuplicates: kotlin.Boolean? = null
        /**
         * Indicates whether Fingerprint columns can be joined on any other Fingerprint column with a different name (`TRUE`) or can only be joined on Fingerprint columns of the same name (`FALSE`).
         */
        public var allowJoinsOnColumnsWithDifferentNames: kotlin.Boolean? = null
        /**
         * Indicates whether NULL values are to be copied as NULL to encrypted tables (`TRUE`) or cryptographically processed (`FALSE`).
         */
        public var preserveNulls: kotlin.Boolean? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cleanrooms.model.DataEncryptionMetadata) : this() {
            this.allowCleartext = x.allowCleartext
            this.allowDuplicates = x.allowDuplicates
            this.allowJoinsOnColumnsWithDifferentNames = x.allowJoinsOnColumnsWithDifferentNames
            this.preserveNulls = x.preserveNulls
        }

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

        internal fun correctErrors(): Builder {
            if (allowCleartext == null) allowCleartext = false
            if (allowDuplicates == null) allowDuplicates = false
            if (allowJoinsOnColumnsWithDifferentNames == null) allowJoinsOnColumnsWithDifferentNames = false
            if (preserveNulls == null) preserveNulls = false
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy