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

commonMain.aws.sdk.kotlin.services.glue.model.FillMissingValues.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 locates records in the dataset that have missing values and adds a new field with a value determined by imputation. The input data set is used to train the machine learning model that determines what the missing value should be.
 */
public class FillMissingValues private constructor(builder: Builder) {
    /**
     * A JSON path to a variable in the data structure for the dataset that is filled.
     */
    public val filledPath: kotlin.String? = builder.filledPath
    /**
     * A JSON path to a variable in the data structure for the dataset that is imputed.
     */
    public val imputedPath: kotlin.String = requireNotNull(builder.imputedPath) { "A non-null value must be provided for imputedPath" }
    /**
     * 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" }

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

    override fun toString(): kotlin.String = buildString {
        append("FillMissingValues(")
        append("filledPath=$filledPath,")
        append("imputedPath=$imputedPath,")
        append("inputs=$inputs,")
        append("name=$name")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = filledPath?.hashCode() ?: 0
        result = 31 * result + (imputedPath.hashCode())
        result = 31 * result + (inputs.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 FillMissingValues

        if (filledPath != other.filledPath) return false
        if (imputedPath != other.imputedPath) 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.FillMissingValues = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * A JSON path to a variable in the data structure for the dataset that is filled.
         */
        public var filledPath: kotlin.String? = null
        /**
         * A JSON path to a variable in the data structure for the dataset that is imputed.
         */
        public var imputedPath: kotlin.String? = null
        /**
         * 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

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.FillMissingValues) : this() {
            this.filledPath = x.filledPath
            this.imputedPath = x.imputedPath
            this.inputs = x.inputs
            this.name = x.name
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy