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

commonMain.aws.sdk.kotlin.services.cleanroomsml.model.DatasetInputConfig.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.cleanroomsml.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Defines the Glue data source and schema mapping information.
 */
public class DatasetInputConfig private constructor(builder: Builder) {
    /**
     * A DataSource object that specifies the Glue data source for the training data.
     */
    public val dataSource: aws.sdk.kotlin.services.cleanroomsml.model.DataSource? = builder.dataSource
    /**
     * The schema information for the training data.
     */
    public val schema: List = requireNotNull(builder.schema) { "A non-null value must be provided for schema" }

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

    override fun toString(): kotlin.String = buildString {
        append("DatasetInputConfig(")
        append("dataSource=$dataSource,")
        append("schema=$schema")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = dataSource?.hashCode() ?: 0
        result = 31 * result + (schema.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 DatasetInputConfig

        if (dataSource != other.dataSource) return false
        if (schema != other.schema) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A DataSource object that specifies the Glue data source for the training data.
         */
        public var dataSource: aws.sdk.kotlin.services.cleanroomsml.model.DataSource? = null
        /**
         * The schema information for the training data.
         */
        public var schema: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cleanroomsml.model.DatasetInputConfig) : this() {
            this.dataSource = x.dataSource
            this.schema = x.schema
        }

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

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

        internal fun correctErrors(): Builder {
            if (schema == null) schema = emptyList()
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy