commonMain.aws.sdk.kotlin.services.comprehend.model.CreateDatasetRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of comprehend-jvm Show documentation
Show all versions of comprehend-jvm Show documentation
The AWS SDK for Kotlin client for Comprehend
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.comprehend.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateDatasetRequest private constructor(builder: Builder) {
/**
* A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
*/
public val clientRequestToken: kotlin.String? = builder.clientRequestToken
/**
* Name of the dataset.
*/
public val datasetName: kotlin.String? = builder.datasetName
/**
* The dataset type. You can specify that the data in a dataset is for training the model or for testing the model.
*/
public val datasetType: aws.sdk.kotlin.services.comprehend.model.DatasetType? = builder.datasetType
/**
* Description of the dataset.
*/
public val description: kotlin.String? = builder.description
/**
* The Amazon Resource Number (ARN) of the flywheel of the flywheel to receive the data.
*/
public val flywheelArn: kotlin.String? = builder.flywheelArn
/**
* Information about the input data configuration. The type of input data varies based on the format of the input and whether the data is for a classifier model or an entity recognition model.
*/
public val inputDataConfig: aws.sdk.kotlin.services.comprehend.model.DatasetInputDataConfig? = builder.inputDataConfig
/**
* Tags for the dataset.
*/
public val tags: List? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.comprehend.model.CreateDatasetRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateDatasetRequest(")
append("clientRequestToken=$clientRequestToken,")
append("datasetName=$datasetName,")
append("datasetType=$datasetType,")
append("description=$description,")
append("flywheelArn=$flywheelArn,")
append("inputDataConfig=$inputDataConfig,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientRequestToken?.hashCode() ?: 0
result = 31 * result + (datasetName?.hashCode() ?: 0)
result = 31 * result + (datasetType?.hashCode() ?: 0)
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (flywheelArn?.hashCode() ?: 0)
result = 31 * result + (inputDataConfig?.hashCode() ?: 0)
result = 31 * result + (tags?.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 CreateDatasetRequest
if (clientRequestToken != other.clientRequestToken) return false
if (datasetName != other.datasetName) return false
if (datasetType != other.datasetType) return false
if (description != other.description) return false
if (flywheelArn != other.flywheelArn) return false
if (inputDataConfig != other.inputDataConfig) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.comprehend.model.CreateDatasetRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
*/
public var clientRequestToken: kotlin.String? = null
/**
* Name of the dataset.
*/
public var datasetName: kotlin.String? = null
/**
* The dataset type. You can specify that the data in a dataset is for training the model or for testing the model.
*/
public var datasetType: aws.sdk.kotlin.services.comprehend.model.DatasetType? = null
/**
* Description of the dataset.
*/
public var description: kotlin.String? = null
/**
* The Amazon Resource Number (ARN) of the flywheel of the flywheel to receive the data.
*/
public var flywheelArn: kotlin.String? = null
/**
* Information about the input data configuration. The type of input data varies based on the format of the input and whether the data is for a classifier model or an entity recognition model.
*/
public var inputDataConfig: aws.sdk.kotlin.services.comprehend.model.DatasetInputDataConfig? = null
/**
* Tags for the dataset.
*/
public var tags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.comprehend.model.CreateDatasetRequest) : this() {
this.clientRequestToken = x.clientRequestToken
this.datasetName = x.datasetName
this.datasetType = x.datasetType
this.description = x.description
this.flywheelArn = x.flywheelArn
this.inputDataConfig = x.inputDataConfig
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.comprehend.model.CreateDatasetRequest = CreateDatasetRequest(this)
/**
* construct an [aws.sdk.kotlin.services.comprehend.model.DatasetInputDataConfig] inside the given [block]
*/
public fun inputDataConfig(block: aws.sdk.kotlin.services.comprehend.model.DatasetInputDataConfig.Builder.() -> kotlin.Unit) {
this.inputDataConfig = aws.sdk.kotlin.services.comprehend.model.DatasetInputDataConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}