All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.glue.model.DropNullFields.kt Maven / Gradle / Ivy

There is a newer version: 1.3.34
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.glue.model



/**
 * Specifies a transform that removes columns from the dataset if all values in the column are 'null'. By default, Glue Studio will recognize null objects, but some values such as empty strings, strings that are "null", -1 integers or other placeholders such as zeros, are not automatically recognized as nulls.
 */
public class DropNullFields 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 structure that represents whether certain values are recognized as null values for removal.
     */
    public val nullCheckBoxList: aws.sdk.kotlin.services.glue.model.NullCheckBoxList? = builder.nullCheckBoxList
    /**
     * A structure that specifies a list of NullValueField structures that represent a custom null value such as zero or other value being used as a null placeholder unique to the dataset.
     *
     * The `DropNullFields` transform removes custom null values only if both the value of the null placeholder and the datatype match the data.
     */
    public val nullTextList: List? = builder.nullTextList

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.DropNullFields = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("DropNullFields(")
        append("inputs=$inputs,")
        append("name=$name,")
        append("nullCheckBoxList=$nullCheckBoxList,")
        append("nullTextList=$nullTextList")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = inputs.hashCode()
        result = 31 * result + (name.hashCode())
        result = 31 * result + (nullCheckBoxList?.hashCode() ?: 0)
        result = 31 * result + (nullTextList?.hashCode() ?: 0)
        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 DropNullFields

        if (inputs != other.inputs) return false
        if (name != other.name) return false
        if (nullCheckBoxList != other.nullCheckBoxList) return false
        if (nullTextList != other.nullTextList) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.DropNullFields = Builder(this).apply(block).build()

    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 structure that represents whether certain values are recognized as null values for removal.
         */
        public var nullCheckBoxList: aws.sdk.kotlin.services.glue.model.NullCheckBoxList? = null
        /**
         * A structure that specifies a list of NullValueField structures that represent a custom null value such as zero or other value being used as a null placeholder unique to the dataset.
         *
         * The `DropNullFields` transform removes custom null values only if both the value of the null placeholder and the datatype match the data.
         */
        public var nullTextList: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.DropNullFields) : this() {
            this.inputs = x.inputs
            this.name = x.name
            this.nullCheckBoxList = x.nullCheckBoxList
            this.nullTextList = x.nullTextList
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.glue.model.DropNullFields = DropNullFields(this)

        /**
         * construct an [aws.sdk.kotlin.services.glue.model.NullCheckBoxList] inside the given [block]
         */
        public fun nullCheckBoxList(block: aws.sdk.kotlin.services.glue.model.NullCheckBoxList.Builder.() -> kotlin.Unit) {
            this.nullCheckBoxList = aws.sdk.kotlin.services.glue.model.NullCheckBoxList.invoke(block)
        }

        internal fun correctErrors(): Builder {
            if (inputs == null) inputs = emptyList()
            if (name == null) name = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy