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

commonMain.aws.sdk.kotlin.services.glue.model.DataLakeAccessProperties.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.glue.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Input properties to configure data lake access for your catalog resource in the Glue Data Catalog.
 */
public class DataLakeAccessProperties private constructor(builder: Builder) {
    /**
     * Specifies a federated catalog type for the native catalog resource. The currently supported type is `aws:redshift`.
     */
    public val catalogType: kotlin.String? = builder.catalogType
    /**
     * Turns on or off data lake access for Apache Spark applications that access Amazon Redshift databases in the Data Catalog from any non-Redshift engine, such as Amazon Athena, Amazon EMR, or Glue ETL.
     */
    public val dataLakeAccess: kotlin.Boolean = builder.dataLakeAccess
    /**
     * A role that will be assumed by Glue for transferring data into/out of the staging bucket during a query.
     */
    public val dataTransferRole: kotlin.String? = builder.dataTransferRole
    /**
     * An encryption key that will be used for the staging bucket that will be created along with the catalog.
     */
    public val kmsKey: kotlin.String? = builder.kmsKey

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

    override fun toString(): kotlin.String = buildString {
        append("DataLakeAccessProperties(")
        append("catalogType=$catalogType,")
        append("dataLakeAccess=$dataLakeAccess,")
        append("dataTransferRole=$dataTransferRole,")
        append("kmsKey=$kmsKey")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = catalogType?.hashCode() ?: 0
        result = 31 * result + (dataLakeAccess.hashCode())
        result = 31 * result + (dataTransferRole?.hashCode() ?: 0)
        result = 31 * result + (kmsKey?.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 DataLakeAccessProperties

        if (catalogType != other.catalogType) return false
        if (dataLakeAccess != other.dataLakeAccess) return false
        if (dataTransferRole != other.dataTransferRole) return false
        if (kmsKey != other.kmsKey) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specifies a federated catalog type for the native catalog resource. The currently supported type is `aws:redshift`.
         */
        public var catalogType: kotlin.String? = null
        /**
         * Turns on or off data lake access for Apache Spark applications that access Amazon Redshift databases in the Data Catalog from any non-Redshift engine, such as Amazon Athena, Amazon EMR, or Glue ETL.
         */
        public var dataLakeAccess: kotlin.Boolean = false
        /**
         * A role that will be assumed by Glue for transferring data into/out of the staging bucket during a query.
         */
        public var dataTransferRole: kotlin.String? = null
        /**
         * An encryption key that will be used for the staging bucket that will be created along with the catalog.
         */
        public var kmsKey: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.DataLakeAccessProperties) : this() {
            this.catalogType = x.catalogType
            this.dataLakeAccess = x.dataLakeAccess
            this.dataTransferRole = x.dataTransferRole
            this.kmsKey = x.kmsKey
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy