commonMain.aws.sdk.kotlin.services.glue.model.SnowflakeTarget.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 Snowflake target.
*/
public class SnowflakeTarget private constructor(builder: Builder) {
/**
* Specifies the data of the Snowflake target node.
*/
public val data: aws.sdk.kotlin.services.glue.model.SnowflakeNodeData? = builder.data
/**
* The nodes that are inputs to the data target.
*/
public val inputs: List? = builder.inputs
/**
* The name of the Snowflake target.
*/
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.SnowflakeTarget = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SnowflakeTarget(")
append("data=$data,")
append("inputs=$inputs,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = data?.hashCode() ?: 0
result = 31 * result + (inputs?.hashCode() ?: 0)
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 SnowflakeTarget
if (data != other.data) return false
if (inputs != other.inputs) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.SnowflakeTarget = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies the data of the Snowflake target node.
*/
public var data: aws.sdk.kotlin.services.glue.model.SnowflakeNodeData? = null
/**
* The nodes that are inputs to the data target.
*/
public var inputs: List? = null
/**
* The name of the Snowflake target.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.SnowflakeTarget) : this() {
this.data = x.data
this.inputs = x.inputs
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.SnowflakeTarget = SnowflakeTarget(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.SnowflakeNodeData] inside the given [block]
*/
public fun data(block: aws.sdk.kotlin.services.glue.model.SnowflakeNodeData.Builder.() -> kotlin.Unit) {
this.data = aws.sdk.kotlin.services.glue.model.SnowflakeNodeData.invoke(block)
}
internal fun correctErrors(): Builder {
if (name == null) name = ""
return this
}
}
}