commonMain.aws.sdk.kotlin.services.glue.model.ApplyMapping.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 maps data property keys in the data source to data property keys in the data target. You can rename keys, modify the data types for keys, and choose which keys to drop from the dataset.
*/
public class ApplyMapping private constructor(builder: Builder) {
/**
* 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 mapping of data property keys in the data source to data property keys in the data target.
*/
public val mapping: List = requireNotNull(builder.mapping) { "A non-null value must be provided for mapping" }
/**
* 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.ApplyMapping = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ApplyMapping(")
append("inputs=$inputs,")
append("mapping=$mapping,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = inputs.hashCode()
result = 31 * result + (mapping.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 ApplyMapping
if (inputs != other.inputs) return false
if (mapping != other.mapping) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.ApplyMapping = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The data inputs identified by their node names.
*/
public var inputs: List? = null
/**
* Specifies the mapping of data property keys in the data source to data property keys in the data target.
*/
public var mapping: List? = 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.ApplyMapping) : this() {
this.inputs = x.inputs
this.mapping = x.mapping
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.ApplyMapping = ApplyMapping(this)
internal fun correctErrors(): Builder {
if (inputs == null) inputs = emptyList()
if (mapping == null) mapping = emptyList()
if (name == null) name = ""
return this
}
}
}