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

commonMain.aws.sdk.kotlin.services.databrew.model.DatabaseTableOutputOptions.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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Represents options that specify how and where DataBrew writes the database output generated by recipe jobs.
 */
public class DatabaseTableOutputOptions private constructor(builder: Builder) {
    /**
     * A prefix for the name of a table DataBrew will create in the database.
     */
    public val tableName: kotlin.String = requireNotNull(builder.tableName) { "A non-null value must be provided for tableName" }
    /**
     * Represents an Amazon S3 location (bucket name and object key) where DataBrew can store intermediate results.
     */
    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.DatabaseTableOutputOptions = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("DatabaseTableOutputOptions(")
        append("tableName=$tableName,")
        append("tempDirectory=$tempDirectory")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = tableName.hashCode()
        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 DatabaseTableOutputOptions

        if (tableName != other.tableName) return false
        if (tempDirectory != other.tempDirectory) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A prefix for the name of a table DataBrew will create in the database.
         */
        public var tableName: kotlin.String? = null
        /**
         * Represents an Amazon S3 location (bucket name and object key) where DataBrew can store intermediate results.
         */
        public var tempDirectory: aws.sdk.kotlin.services.databrew.model.S3Location? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.databrew.model.DatabaseTableOutputOptions) : this() {
            this.tableName = x.tableName
            this.tempDirectory = x.tempDirectory
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.databrew.model.DatabaseTableOutputOptions = DatabaseTableOutputOptions(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)
        }

        internal fun correctErrors(): Builder {
            if (tableName == null) tableName = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy