
commonMain.aws.sdk.kotlin.services.rekognition.model.CreateDatasetRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.rekognition.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateDatasetRequest private constructor(builder: Builder) {
/**
* The source files for the dataset. You can specify the ARN of an existing dataset or specify the Amazon S3 bucket location of an Amazon Sagemaker format manifest file. If you don't specify `datasetSource`, an empty dataset is created. To add labeled images to the dataset, You can use the console or call UpdateDatasetEntries.
*/
public val datasetSource: aws.sdk.kotlin.services.rekognition.model.DatasetSource? = builder.datasetSource
/**
* The type of the dataset. Specify `TRAIN` to create a training dataset. Specify `TEST` to create a test dataset.
*/
public val datasetType: aws.sdk.kotlin.services.rekognition.model.DatasetType? = builder.datasetType
/**
* The ARN of the Amazon Rekognition Custom Labels project to which you want to asssign the dataset.
*/
public val projectArn: kotlin.String? = builder.projectArn
/**
* A set of tags (key-value pairs) that you want to attach to the dataset.
*/
public val tags: Map? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rekognition.model.CreateDatasetRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateDatasetRequest(")
append("datasetSource=$datasetSource,")
append("datasetType=$datasetType,")
append("projectArn=$projectArn,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = datasetSource?.hashCode() ?: 0
result = 31 * result + (datasetType?.hashCode() ?: 0)
result = 31 * result + (projectArn?.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 (datasetSource != other.datasetSource) return false
if (datasetType != other.datasetType) return false
if (projectArn != other.projectArn) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rekognition.model.CreateDatasetRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The source files for the dataset. You can specify the ARN of an existing dataset or specify the Amazon S3 bucket location of an Amazon Sagemaker format manifest file. If you don't specify `datasetSource`, an empty dataset is created. To add labeled images to the dataset, You can use the console or call UpdateDatasetEntries.
*/
public var datasetSource: aws.sdk.kotlin.services.rekognition.model.DatasetSource? = null
/**
* The type of the dataset. Specify `TRAIN` to create a training dataset. Specify `TEST` to create a test dataset.
*/
public var datasetType: aws.sdk.kotlin.services.rekognition.model.DatasetType? = null
/**
* The ARN of the Amazon Rekognition Custom Labels project to which you want to asssign the dataset.
*/
public var projectArn: kotlin.String? = null
/**
* A set of tags (key-value pairs) that you want to attach to the dataset.
*/
public var tags: Map? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rekognition.model.CreateDatasetRequest) : this() {
this.datasetSource = x.datasetSource
this.datasetType = x.datasetType
this.projectArn = x.projectArn
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rekognition.model.CreateDatasetRequest = CreateDatasetRequest(this)
/**
* construct an [aws.sdk.kotlin.services.rekognition.model.DatasetSource] inside the given [block]
*/
public fun datasetSource(block: aws.sdk.kotlin.services.rekognition.model.DatasetSource.Builder.() -> kotlin.Unit) {
this.datasetSource = aws.sdk.kotlin.services.rekognition.model.DatasetSource.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy