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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Specifies a connector to an Amazon Athena data source.
 */
public class AthenaConnectorSource private constructor(builder: Builder) {
    /**
     * The name of the connection that is associated with the connector.
     */
    public val connectionName: kotlin.String = requireNotNull(builder.connectionName) { "A non-null value must be provided for connectionName" }
    /**
     * The name of the table in the data source.
     */
    public val connectionTable: kotlin.String? = builder.connectionTable
    /**
     * The type of connection, such as marketplace.athena or custom.athena, designating a connection to an Amazon Athena data store.
     */
    public val connectionType: kotlin.String = requireNotNull(builder.connectionType) { "A non-null value must be provided for connectionType" }
    /**
     * The name of a connector that assists with accessing the data store in Glue Studio.
     */
    public val connectorName: kotlin.String = requireNotNull(builder.connectorName) { "A non-null value must be provided for connectorName" }
    /**
     * The name of the data source.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * Specifies the data schema for the custom Athena source.
     */
    public val outputSchemas: List? = builder.outputSchemas
    /**
     * The name of the Cloudwatch log group to read from. For example, `/aws-glue/jobs/output`.
     */
    public val schemaName: kotlin.String = requireNotNull(builder.schemaName) { "A non-null value must be provided for schemaName" }

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

    override fun toString(): kotlin.String = buildString {
        append("AthenaConnectorSource(")
        append("connectionName=$connectionName,")
        append("connectionTable=$connectionTable,")
        append("connectionType=$connectionType,")
        append("connectorName=$connectorName,")
        append("name=$name,")
        append("outputSchemas=$outputSchemas,")
        append("schemaName=$schemaName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = connectionName.hashCode()
        result = 31 * result + (connectionTable?.hashCode() ?: 0)
        result = 31 * result + (connectionType.hashCode())
        result = 31 * result + (connectorName.hashCode())
        result = 31 * result + (name.hashCode())
        result = 31 * result + (outputSchemas?.hashCode() ?: 0)
        result = 31 * result + (schemaName.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 AthenaConnectorSource

        if (connectionName != other.connectionName) return false
        if (connectionTable != other.connectionTable) return false
        if (connectionType != other.connectionType) return false
        if (connectorName != other.connectorName) return false
        if (name != other.name) return false
        if (outputSchemas != other.outputSchemas) return false
        if (schemaName != other.schemaName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the connection that is associated with the connector.
         */
        public var connectionName: kotlin.String? = null
        /**
         * The name of the table in the data source.
         */
        public var connectionTable: kotlin.String? = null
        /**
         * The type of connection, such as marketplace.athena or custom.athena, designating a connection to an Amazon Athena data store.
         */
        public var connectionType: kotlin.String? = null
        /**
         * The name of a connector that assists with accessing the data store in Glue Studio.
         */
        public var connectorName: kotlin.String? = null
        /**
         * The name of the data source.
         */
        public var name: kotlin.String? = null
        /**
         * Specifies the data schema for the custom Athena source.
         */
        public var outputSchemas: List? = null
        /**
         * The name of the Cloudwatch log group to read from. For example, `/aws-glue/jobs/output`.
         */
        public var schemaName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.AthenaConnectorSource) : this() {
            this.connectionName = x.connectionName
            this.connectionTable = x.connectionTable
            this.connectionType = x.connectionType
            this.connectorName = x.connectorName
            this.name = x.name
            this.outputSchemas = x.outputSchemas
            this.schemaName = x.schemaName
        }

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

        internal fun correctErrors(): Builder {
            if (connectionName == null) connectionName = ""
            if (connectionType == null) connectionType = ""
            if (connectorName == null) connectorName = ""
            if (name == null) name = ""
            if (schemaName == null) schemaName = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy