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

commonMain.aws.sdk.kotlin.services.comprehend.model.DatasetEntityRecognizerInputDataConfig.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.comprehend.model



/**
 * Specifies the format and location of the input data. You must provide either the `Annotations` parameter or the `EntityList` parameter.
 */
public class DatasetEntityRecognizerInputDataConfig private constructor(builder: Builder) {
    /**
     * The S3 location of the annotation documents for your custom entity recognizer.
     */
    public val annotations: aws.sdk.kotlin.services.comprehend.model.DatasetEntityRecognizerAnnotations? = builder.annotations
    /**
     * The format and location of the training documents for your custom entity recognizer.
     */
    public val documents: aws.sdk.kotlin.services.comprehend.model.DatasetEntityRecognizerDocuments? = builder.documents
    /**
     * The S3 location of the entity list for your custom entity recognizer.
     */
    public val entityList: aws.sdk.kotlin.services.comprehend.model.DatasetEntityRecognizerEntityList? = builder.entityList

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

    override fun toString(): kotlin.String = buildString {
        append("DatasetEntityRecognizerInputDataConfig(")
        append("annotations=$annotations,")
        append("documents=$documents,")
        append("entityList=$entityList")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = annotations?.hashCode() ?: 0
        result = 31 * result + (documents?.hashCode() ?: 0)
        result = 31 * result + (entityList?.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 DatasetEntityRecognizerInputDataConfig

        if (annotations != other.annotations) return false
        if (documents != other.documents) return false
        if (entityList != other.entityList) return false

        return true
    }

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

    public class Builder {
        /**
         * The S3 location of the annotation documents for your custom entity recognizer.
         */
        public var annotations: aws.sdk.kotlin.services.comprehend.model.DatasetEntityRecognizerAnnotations? = null
        /**
         * The format and location of the training documents for your custom entity recognizer.
         */
        public var documents: aws.sdk.kotlin.services.comprehend.model.DatasetEntityRecognizerDocuments? = null
        /**
         * The S3 location of the entity list for your custom entity recognizer.
         */
        public var entityList: aws.sdk.kotlin.services.comprehend.model.DatasetEntityRecognizerEntityList? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.comprehend.model.DatasetEntityRecognizerInputDataConfig) : this() {
            this.annotations = x.annotations
            this.documents = x.documents
            this.entityList = x.entityList
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy