commonMain.aws.sdk.kotlin.services.cleanroomsml.model.Dataset.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 where the training dataset is located, what type of data it contains, and how to access the data.
*/
public class Dataset private constructor(builder: Builder) {
/**
* A DatasetInputConfig object that defines the data source and schema mapping.
*/
public val inputConfig: aws.sdk.kotlin.services.cleanroomsml.model.DatasetInputConfig? = builder.inputConfig
/**
* What type of information is found in the dataset.
*/
public val type: aws.sdk.kotlin.services.cleanroomsml.model.DatasetType = requireNotNull(builder.type) { "A non-null value must be provided for type" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cleanroomsml.model.Dataset = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Dataset(")
append("inputConfig=$inputConfig,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = inputConfig?.hashCode() ?: 0
result = 31 * result + (type.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 Dataset
if (inputConfig != other.inputConfig) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cleanroomsml.model.Dataset = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A DatasetInputConfig object that defines the data source and schema mapping.
*/
public var inputConfig: aws.sdk.kotlin.services.cleanroomsml.model.DatasetInputConfig? = null
/**
* What type of information is found in the dataset.
*/
public var type: aws.sdk.kotlin.services.cleanroomsml.model.DatasetType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cleanroomsml.model.Dataset) : this() {
this.inputConfig = x.inputConfig
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cleanroomsml.model.Dataset = Dataset(this)
/**
* construct an [aws.sdk.kotlin.services.cleanroomsml.model.DatasetInputConfig] inside the given [block]
*/
public fun inputConfig(block: aws.sdk.kotlin.services.cleanroomsml.model.DatasetInputConfig.Builder.() -> kotlin.Unit) {
this.inputConfig = aws.sdk.kotlin.services.cleanroomsml.model.DatasetInputConfig.invoke(block)
}
internal fun correctErrors(): Builder {
if (type == null) type = DatasetType.SdkUnknown("no value provided")
return this
}
}
}