commonMain.aws.sdk.kotlin.services.glue.model.NullValueField.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
/**
* Represents a custom null value such as a zeros or other value being used as a null placeholder unique to the dataset.
*/
public class NullValueField private constructor(builder: Builder) {
/**
* The datatype of the value.
*/
public val datatype: aws.sdk.kotlin.services.glue.model.Datatype? = builder.datatype
/**
* The value of the null placeholder.
*/
public val value: kotlin.String = requireNotNull(builder.value) { "A non-null value must be provided for value" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.NullValueField = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("NullValueField(")
append("datatype=$datatype,")
append("value=$value")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = datatype?.hashCode() ?: 0
result = 31 * result + (value.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 NullValueField
if (datatype != other.datatype) return false
if (value != other.value) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.NullValueField = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The datatype of the value.
*/
public var datatype: aws.sdk.kotlin.services.glue.model.Datatype? = null
/**
* The value of the null placeholder.
*/
public var value: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.NullValueField) : this() {
this.datatype = x.datatype
this.value = x.value
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.NullValueField = NullValueField(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.Datatype] inside the given [block]
*/
public fun datatype(block: aws.sdk.kotlin.services.glue.model.Datatype.Builder.() -> kotlin.Unit) {
this.datatype = aws.sdk.kotlin.services.glue.model.Datatype.invoke(block)
}
internal fun correctErrors(): Builder {
if (value == null) value = ""
return this
}
}
}