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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Specifies a column to be joined.
 */
public class JoinColumn private constructor(builder: Builder) {
    /**
     * The column to be joined.
     */
    public val from: kotlin.String = requireNotNull(builder.from) { "A non-null value must be provided for from" }
    /**
     * The key of the column to be joined.
     */
    public val keys: List> = requireNotNull(builder.keys) { "A non-null value must be provided for keys" }

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

    override fun toString(): kotlin.String = buildString {
        append("JoinColumn(")
        append("from=$from,")
        append("keys=$keys")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = from.hashCode()
        result = 31 * result + (keys.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 JoinColumn

        if (from != other.from) return false
        if (keys != other.keys) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The column to be joined.
         */
        public var from: kotlin.String? = null
        /**
         * The key of the column to be joined.
         */
        public var keys: List>? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.JoinColumn) : this() {
            this.from = x.from
            this.keys = x.keys
        }

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

        internal fun correctErrors(): Builder {
            if (from == null) from = ""
            if (keys == null) keys = emptyList()
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy