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

commonMain.aws.sdk.kotlin.services.glue.model.CustomCode.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 uses custom code you provide to perform the data transformation. The output is a collection of DynamicFrames.
 */
public class CustomCode private constructor(builder: Builder) {
    /**
     * The name defined for the custom code node class.
     */
    public val className: kotlin.String = requireNotNull(builder.className) { "A non-null value must be provided for className" }
    /**
     * The custom code that is used to perform the data transformation.
     */
    public val code: kotlin.String = requireNotNull(builder.code) { "A non-null value must be provided for code" }
    /**
     * 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" }
    /**
     * Specifies the data schema for the custom code transform.
     */
    public val outputSchemas: List? = builder.outputSchemas

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

    override fun toString(): kotlin.String = buildString {
        append("CustomCode(")
        append("className=$className,")
        append("code=$code,")
        append("inputs=$inputs,")
        append("name=$name,")
        append("outputSchemas=$outputSchemas")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = className.hashCode()
        result = 31 * result + (code.hashCode())
        result = 31 * result + (inputs.hashCode())
        result = 31 * result + (name.hashCode())
        result = 31 * result + (outputSchemas?.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 CustomCode

        if (className != other.className) return false
        if (code != other.code) return false
        if (inputs != other.inputs) return false
        if (name != other.name) return false
        if (outputSchemas != other.outputSchemas) return false

        return true
    }

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

    public class Builder {
        /**
         * The name defined for the custom code node class.
         */
        public var className: kotlin.String? = null
        /**
         * The custom code that is used to perform the data transformation.
         */
        public var code: 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
        /**
         * Specifies the data schema for the custom code transform.
         */
        public var outputSchemas: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.CustomCode) : this() {
            this.className = x.className
            this.code = x.code
            this.inputs = x.inputs
            this.name = x.name
            this.outputSchemas = x.outputSchemas
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy