commonMain.aws.sdk.kotlin.services.glue.model.Union.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 transform that combines the rows from two or more datasets into a single result.
*/
public class Union private constructor(builder: Builder) {
/**
* The node ID inputs to the transform.
*/
public val inputs: List = requireNotNull(builder.inputs) { "A non-null value must be provided for inputs" }
/**
* The name of the transform node.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* Indicates the type of Union transform.
*
* Specify `ALL` to join all rows from data sources to the resulting DynamicFrame. The resulting union does not remove duplicate rows.
*
* Specify `DISTINCT` to remove duplicate rows in the resulting DynamicFrame.
*/
public val unionType: aws.sdk.kotlin.services.glue.model.UnionType = requireNotNull(builder.unionType) { "A non-null value must be provided for unionType" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.Union = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Union(")
append("inputs=$inputs,")
append("name=$name,")
append("unionType=$unionType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = inputs.hashCode()
result = 31 * result + (name.hashCode())
result = 31 * result + (unionType.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 Union
if (inputs != other.inputs) return false
if (name != other.name) return false
if (unionType != other.unionType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.Union = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The node ID inputs to the transform.
*/
public var inputs: List? = null
/**
* The name of the transform node.
*/
public var name: kotlin.String? = null
/**
* Indicates the type of Union transform.
*
* Specify `ALL` to join all rows from data sources to the resulting DynamicFrame. The resulting union does not remove duplicate rows.
*
* Specify `DISTINCT` to remove duplicate rows in the resulting DynamicFrame.
*/
public var unionType: aws.sdk.kotlin.services.glue.model.UnionType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.Union) : this() {
this.inputs = x.inputs
this.name = x.name
this.unionType = x.unionType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.Union = Union(this)
internal fun correctErrors(): Builder {
if (inputs == null) inputs = emptyList()
if (name == null) name = ""
if (unionType == null) unionType = UnionType.SdkUnknown("no value provided")
return this
}
}
}