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

commonMain.aws.sdk.kotlin.services.databrew.model.DatabaseInputDefinition.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.databrew.model



/**
 * Connection information for dataset input files stored in a database.
 */
public class DatabaseInputDefinition private constructor(builder: Builder) {
    /**
     * The table within the target database.
     */
    public val databaseTableName: kotlin.String? = builder.databaseTableName
    /**
     * The Glue Connection that stores the connection information for the target database.
     */
    public val glueConnectionName: kotlin.String? = builder.glueConnectionName
    /**
     * Custom SQL to run against the provided Glue connection. This SQL will be used as the input for DataBrew projects and jobs.
     */
    public val queryString: kotlin.String? = builder.queryString
    /**
     * Represents an Amazon S3 location (bucket name, bucket owner, and object key) where DataBrew can read input data, or write output from a job.
     */
    public val tempDirectory: aws.sdk.kotlin.services.databrew.model.S3Location? = builder.tempDirectory

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

    override fun toString(): kotlin.String = buildString {
        append("DatabaseInputDefinition(")
        append("databaseTableName=$databaseTableName,")
        append("glueConnectionName=$glueConnectionName,")
        append("queryString=$queryString,")
        append("tempDirectory=$tempDirectory)")
    }

    override fun hashCode(): kotlin.Int {
        var result = databaseTableName?.hashCode() ?: 0
        result = 31 * result + (glueConnectionName?.hashCode() ?: 0)
        result = 31 * result + (queryString?.hashCode() ?: 0)
        result = 31 * result + (tempDirectory?.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 DatabaseInputDefinition

        if (databaseTableName != other.databaseTableName) return false
        if (glueConnectionName != other.glueConnectionName) return false
        if (queryString != other.queryString) return false
        if (tempDirectory != other.tempDirectory) return false

        return true
    }

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

    public class Builder {
        /**
         * The table within the target database.
         */
        public var databaseTableName: kotlin.String? = null
        /**
         * The Glue Connection that stores the connection information for the target database.
         */
        public var glueConnectionName: kotlin.String? = null
        /**
         * Custom SQL to run against the provided Glue connection. This SQL will be used as the input for DataBrew projects and jobs.
         */
        public var queryString: kotlin.String? = null
        /**
         * Represents an Amazon S3 location (bucket name, bucket owner, and object key) where DataBrew can read input data, or write output from a job.
         */
        public var tempDirectory: aws.sdk.kotlin.services.databrew.model.S3Location? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.databrew.model.DatabaseInputDefinition) : this() {
            this.databaseTableName = x.databaseTableName
            this.glueConnectionName = x.glueConnectionName
            this.queryString = x.queryString
            this.tempDirectory = x.tempDirectory
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy