commonMain.aws.sdk.kotlin.services.glue.model.Join.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 joins two datasets into one dataset using a comparison phrase on the specified data property keys. You can use inner, outer, left, right, left semi, and left anti joins.
*/
public class Join private constructor(builder: Builder) {
/**
* A list of the two columns to be joined.
*/
public val columns: List = requireNotNull(builder.columns) { "A non-null value must be provided for columns" }
/**
* The data inputs identified by their node names.
*/
public val inputs: List = requireNotNull(builder.inputs) { "A non-null value must be provided for inputs" }
/**
* Specifies the type of join to be performed on the datasets.
*/
public val joinType: aws.sdk.kotlin.services.glue.model.JoinType = requireNotNull(builder.joinType) { "A non-null value must be provided for joinType" }
/**
* The name of the transform node.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.Join = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Join(")
append("columns=$columns,")
append("inputs=$inputs,")
append("joinType=$joinType,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = columns.hashCode()
result = 31 * result + (inputs.hashCode())
result = 31 * result + (joinType.hashCode())
result = 31 * result + (name.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 Join
if (columns != other.columns) return false
if (inputs != other.inputs) return false
if (joinType != other.joinType) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.Join = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A list of the two columns to be joined.
*/
public var columns: List? = null
/**
* The data inputs identified by their node names.
*/
public var inputs: List? = null
/**
* Specifies the type of join to be performed on the datasets.
*/
public var joinType: aws.sdk.kotlin.services.glue.model.JoinType? = null
/**
* The name of the transform node.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.Join) : this() {
this.columns = x.columns
this.inputs = x.inputs
this.joinType = x.joinType
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.Join = Join(this)
internal fun correctErrors(): Builder {
if (columns == null) columns = emptyList()
if (inputs == null) inputs = emptyList()
if (joinType == null) joinType = JoinType.SdkUnknown("no value provided")
if (name == null) name = ""
return this
}
}
}