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

commonMain.aws.sdk.kotlin.services.athena.model.GetTableMetadataRequest.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

public class GetTableMetadataRequest private constructor(builder: Builder) {
    /**
     * The name of the data catalog that contains the database and table metadata to return.
     */
    public val catalogName: kotlin.String? = builder.catalogName
    /**
     * The name of the database that contains the table metadata to return.
     */
    public val databaseName: kotlin.String? = builder.databaseName
    /**
     * The name of the table for which metadata is returned.
     */
    public val tableName: kotlin.String? = builder.tableName
    /**
     * The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.
     */
    public val workGroup: kotlin.String? = builder.workGroup

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

    override fun toString(): kotlin.String = buildString {
        append("GetTableMetadataRequest(")
        append("catalogName=$catalogName,")
        append("databaseName=$databaseName,")
        append("tableName=$tableName,")
        append("workGroup=$workGroup")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = catalogName?.hashCode() ?: 0
        result = 31 * result + (databaseName?.hashCode() ?: 0)
        result = 31 * result + (tableName?.hashCode() ?: 0)
        result = 31 * result + (workGroup?.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 GetTableMetadataRequest

        if (catalogName != other.catalogName) return false
        if (databaseName != other.databaseName) return false
        if (tableName != other.tableName) return false
        if (workGroup != other.workGroup) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the data catalog that contains the database and table metadata to return.
         */
        public var catalogName: kotlin.String? = null
        /**
         * The name of the database that contains the table metadata to return.
         */
        public var databaseName: kotlin.String? = null
        /**
         * The name of the table for which metadata is returned.
         */
        public var tableName: kotlin.String? = null
        /**
         * The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.
         */
        public var workGroup: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.athena.model.GetTableMetadataRequest) : this() {
            this.catalogName = x.catalogName
            this.databaseName = x.databaseName
            this.tableName = x.tableName
            this.workGroup = x.workGroup
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy