commonMain.aws.sdk.kotlin.services.cleanroomsml.model.DatasetInputConfig.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cleanroomsml-jvm Show documentation
Show all versions of cleanroomsml-jvm Show documentation
The AWS SDK for Kotlin client for CleanRoomsML
// 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
}
}
}