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

commonMain.aws.sdk.kotlin.services.quicksight.model.ColumnLevelPermissionRule.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.quicksight.model



/**
 * A rule defined to grant access on one or more restricted columns. Each dataset can have multiple rules. To create a restricted column, you add it to one or more rules. Each rule must contain at least one column and at least one user or group. To be able to see a restricted column, a user or group needs to be added to a rule for that column.
 */
class ColumnLevelPermissionRule private constructor(builder: Builder) {
    /**
     * An array of column names.
     */
    val columnNames: List? = builder.columnNames
    /**
     * An array of Amazon Resource Names (ARNs) for Amazon QuickSight users or groups.
     */
    val principals: List? = builder.principals

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

    override fun toString(): kotlin.String = buildString {
        append("ColumnLevelPermissionRule(")
        append("columnNames=$columnNames,")
        append("principals=$principals)")
    }

    override fun hashCode(): kotlin.Int {
        var result = columnNames?.hashCode() ?: 0
        result = 31 * result + (principals?.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 ColumnLevelPermissionRule

        if (columnNames != other.columnNames) return false
        if (principals != other.principals) return false

        return true
    }

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

    class Builder {
        /**
         * An array of column names.
         */
        var columnNames: List? = null
        /**
         * An array of Amazon Resource Names (ARNs) for Amazon QuickSight users or groups.
         */
        var principals: List? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.quicksight.model.ColumnLevelPermissionRule) : this() {
            this.columnNames = x.columnNames
            this.principals = x.principals
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.quicksight.model.ColumnLevelPermissionRule = ColumnLevelPermissionRule(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy