commonMain.aws.sdk.kotlin.services.glue.model.RenameField.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-jvm Show documentation
Show all versions of glue-jvm Show documentation
The AWS SDK for Kotlin client for Glue
The newest version!
// 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 renames a single data property key.
*/
public class RenameField 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" }
/**
* The name of the transform node.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* A JSON path to a variable in the data structure for the source data.
*/
public val sourcePath: List = requireNotNull(builder.sourcePath) { "A non-null value must be provided for sourcePath" }
/**
* A JSON path to a variable in the data structure for the target data.
*/
public val targetPath: List = requireNotNull(builder.targetPath) { "A non-null value must be provided for targetPath" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.RenameField = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RenameField(")
append("inputs=$inputs,")
append("name=$name,")
append("sourcePath=$sourcePath,")
append("targetPath=$targetPath")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = inputs.hashCode()
result = 31 * result + (name.hashCode())
result = 31 * result + (sourcePath.hashCode())
result = 31 * result + (targetPath.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 RenameField
if (inputs != other.inputs) return false
if (name != other.name) return false
if (sourcePath != other.sourcePath) return false
if (targetPath != other.targetPath) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.RenameField = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The data inputs identified by their node names.
*/
public var inputs: List? = null
/**
* The name of the transform node.
*/
public var name: kotlin.String? = null
/**
* A JSON path to a variable in the data structure for the source data.
*/
public var sourcePath: List? = null
/**
* A JSON path to a variable in the data structure for the target data.
*/
public var targetPath: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.RenameField) : this() {
this.inputs = x.inputs
this.name = x.name
this.sourcePath = x.sourcePath
this.targetPath = x.targetPath
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.RenameField = RenameField(this)
internal fun correctErrors(): Builder {
if (inputs == null) inputs = emptyList()
if (name == null) name = ""
if (sourcePath == null) sourcePath = emptyList()
if (targetPath == null) targetPath = emptyList()
return this
}
}
}