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

commonMain.aws.sdk.kotlin.services.glue.model.TargetTableConfig.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

/**
 * Properties used by the target leg to partition the data on the target.
 */
public class TargetTableConfig private constructor(builder: Builder) {
    /**
     * Determines the file layout on the target.
     */
    public val partitionSpec: List? = builder.partitionSpec
    /**
     * The optional name of a target table.
     */
    public val targetTableName: kotlin.String? = builder.targetTableName
    /**
     * Specifies how nested objects are flattened to top-level elements. Valid values are: "TOPLEVEL", "FULL", or "NOUNNEST".
     */
    public val unnestSpec: aws.sdk.kotlin.services.glue.model.UnnestSpec? = builder.unnestSpec

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

    override fun toString(): kotlin.String = buildString {
        append("TargetTableConfig(")
        append("partitionSpec=$partitionSpec,")
        append("targetTableName=$targetTableName,")
        append("unnestSpec=$unnestSpec")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = partitionSpec?.hashCode() ?: 0
        result = 31 * result + (targetTableName?.hashCode() ?: 0)
        result = 31 * result + (unnestSpec?.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 TargetTableConfig

        if (partitionSpec != other.partitionSpec) return false
        if (targetTableName != other.targetTableName) return false
        if (unnestSpec != other.unnestSpec) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Determines the file layout on the target.
         */
        public var partitionSpec: List? = null
        /**
         * The optional name of a target table.
         */
        public var targetTableName: kotlin.String? = null
        /**
         * Specifies how nested objects are flattened to top-level elements. Valid values are: "TOPLEVEL", "FULL", or "NOUNNEST".
         */
        public var unnestSpec: aws.sdk.kotlin.services.glue.model.UnnestSpec? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.TargetTableConfig) : this() {
            this.partitionSpec = x.partitionSpec
            this.targetTableName = x.targetTableName
            this.unnestSpec = x.unnestSpec
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy