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

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

There is a newer version: 1.3.31
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

/**
 * Defines details for the analysis rule ID mapping table.
 */
public class AnalysisRuleIdMappingTable private constructor(builder: Builder) {
    /**
     * The columns that query runners are allowed to select, group by, or filter by.
     */
    public val dimensionColumns: List? = builder.dimensionColumns
    /**
     * The columns that query runners are allowed to use in an INNER JOIN statement.
     */
    public val joinColumns: List = requireNotNull(builder.joinColumns) { "A non-null value must be provided for joinColumns" }
    /**
     * The query constraints of the analysis rule ID mapping table.
     */
    public val queryConstraints: List = requireNotNull(builder.queryConstraints) { "A non-null value must be provided for queryConstraints" }

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

    override fun toString(): kotlin.String = buildString {
        append("AnalysisRuleIdMappingTable(")
        append("dimensionColumns=$dimensionColumns,")
        append("joinColumns=$joinColumns,")
        append("queryConstraints=$queryConstraints")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = dimensionColumns?.hashCode() ?: 0
        result = 31 * result + (joinColumns.hashCode())
        result = 31 * result + (queryConstraints.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 AnalysisRuleIdMappingTable

        if (dimensionColumns != other.dimensionColumns) return false
        if (joinColumns != other.joinColumns) return false
        if (queryConstraints != other.queryConstraints) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The columns that query runners are allowed to select, group by, or filter by.
         */
        public var dimensionColumns: List? = null
        /**
         * The columns that query runners are allowed to use in an INNER JOIN statement.
         */
        public var joinColumns: List? = null
        /**
         * The query constraints of the analysis rule ID mapping table.
         */
        public var queryConstraints: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cleanrooms.model.AnalysisRuleIdMappingTable) : this() {
            this.dimensionColumns = x.dimensionColumns
            this.joinColumns = x.joinColumns
            this.queryConstraints = x.queryConstraints
        }

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

        internal fun correctErrors(): Builder {
            if (joinColumns == null) joinColumns = emptyList()
            if (queryConstraints == null) queryConstraints = emptyList()
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy