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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Specifies a Hudi data source stored in Amazon S3.
 */
public class S3HudiSource private constructor(builder: Builder) {
    /**
     * Specifies additional connection options.
     */
    public val additionalHudiOptions: Map? = builder.additionalHudiOptions
    /**
     * Specifies additional options for the connector.
     */
    public val additionalOptions: aws.sdk.kotlin.services.glue.model.S3DirectSourceAdditionalOptions? = builder.additionalOptions
    /**
     * The name of the Hudi source.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * Specifies the data schema for the Hudi source.
     */
    public val outputSchemas: List? = builder.outputSchemas
    /**
     * A list of the Amazon S3 paths to read from.
     */
    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.S3HudiSource = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("S3HudiSource(")
        append("additionalHudiOptions=$additionalHudiOptions,")
        append("additionalOptions=$additionalOptions,")
        append("name=$name,")
        append("outputSchemas=$outputSchemas,")
        append("paths=$paths")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = additionalHudiOptions?.hashCode() ?: 0
        result = 31 * result + (additionalOptions?.hashCode() ?: 0)
        result = 31 * result + (name.hashCode())
        result = 31 * result + (outputSchemas?.hashCode() ?: 0)
        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 S3HudiSource

        if (additionalHudiOptions != other.additionalHudiOptions) return false
        if (additionalOptions != other.additionalOptions) return false
        if (name != other.name) return false
        if (outputSchemas != other.outputSchemas) return false
        if (paths != other.paths) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specifies additional connection options.
         */
        public var additionalHudiOptions: Map? = null
        /**
         * Specifies additional options for the connector.
         */
        public var additionalOptions: aws.sdk.kotlin.services.glue.model.S3DirectSourceAdditionalOptions? = null
        /**
         * The name of the Hudi source.
         */
        public var name: kotlin.String? = null
        /**
         * Specifies the data schema for the Hudi source.
         */
        public var outputSchemas: List? = null
        /**
         * A list of the Amazon S3 paths to read from.
         */
        public var paths: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.S3HudiSource) : this() {
            this.additionalHudiOptions = x.additionalHudiOptions
            this.additionalOptions = x.additionalOptions
            this.name = x.name
            this.outputSchemas = x.outputSchemas
            this.paths = x.paths
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy