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

commonMain.aws.sdk.kotlin.services.glue.model.SplitFields.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 splits data property keys into two `DynamicFrames`. The output is a collection of `DynamicFrames`: one with selected data property keys, and one with the remaining data property keys.
 */
public class SplitFields 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.
     */
    public val paths: List> = requireNotNull(builder.paths) { "A non-null value must be provided for paths" }

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

    override fun toString(): kotlin.String = buildString {
        append("SplitFields(")
        append("inputs=$inputs,")
        append("name=$name,")
        append("paths=$paths")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = inputs.hashCode()
        result = 31 * result + (name.hashCode())
        result = 31 * result + (paths.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 SplitFields

        if (inputs != other.inputs) return false
        if (name != other.name) return false
        if (paths != other.paths) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.SplitFields = 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.
         */
        public var paths: List>? = null

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy