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

commonMain.aws.sdk.kotlin.services.dataexchange.model.LfResourceDetails.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.dataexchange.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Details about the AWS Lake Formation resource (Table or Database) included in the AWS Lake Formation data permission.
 */
public class LfResourceDetails private constructor(builder: Builder) {
    /**
     * Details about the database resource included in the AWS Lake Formation data permission.
     */
    public val database: aws.sdk.kotlin.services.dataexchange.model.DatabaseLfTagPolicy? = builder.database
    /**
     * Details about the table resource included in the AWS Lake Formation data permission.
     */
    public val table: aws.sdk.kotlin.services.dataexchange.model.TableLfTagPolicy? = builder.table

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

    override fun toString(): kotlin.String = buildString {
        append("LfResourceDetails(")
        append("database=$database,")
        append("table=$table")
        append(")")
    }

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

        if (database != other.database) return false
        if (table != other.table) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Details about the database resource included in the AWS Lake Formation data permission.
         */
        public var database: aws.sdk.kotlin.services.dataexchange.model.DatabaseLfTagPolicy? = null
        /**
         * Details about the table resource included in the AWS Lake Formation data permission.
         */
        public var table: aws.sdk.kotlin.services.dataexchange.model.TableLfTagPolicy? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.dataexchange.model.LfResourceDetails) : this() {
            this.database = x.database
            this.table = x.table
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.dataexchange.model.DatabaseLfTagPolicy] inside the given [block]
         */
        public fun database(block: aws.sdk.kotlin.services.dataexchange.model.DatabaseLfTagPolicy.Builder.() -> kotlin.Unit) {
            this.database = aws.sdk.kotlin.services.dataexchange.model.DatabaseLfTagPolicy.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.dataexchange.model.TableLfTagPolicy] inside the given [block]
         */
        public fun table(block: aws.sdk.kotlin.services.dataexchange.model.TableLfTagPolicy.Builder.() -> kotlin.Unit) {
            this.table = aws.sdk.kotlin.services.dataexchange.model.TableLfTagPolicy.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy