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

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

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

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



/**
 * The result of calling the operation. The operation returns one object for each document that is successfully processed by the operation.
 */
public class BatchDetectEntitiesItemResult private constructor(builder: Builder) {
    /**
     * One or more Entity objects, one for each entity detected in the document.
     */
    public val entities: List? = builder.entities
    /**
     * The zero-based index of the document in the input list.
     */
    public val index: kotlin.Int? = builder.index

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

    override fun toString(): kotlin.String = buildString {
        append("BatchDetectEntitiesItemResult(")
        append("entities=$entities,")
        append("index=$index")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = entities?.hashCode() ?: 0
        result = 31 * result + (index ?: 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 BatchDetectEntitiesItemResult

        if (entities != other.entities) return false
        if (index != other.index) return false

        return true
    }

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

    public class Builder {
        /**
         * One or more Entity objects, one for each entity detected in the document.
         */
        public var entities: List? = null
        /**
         * The zero-based index of the document in the input list.
         */
        public var index: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.comprehend.model.BatchDetectEntitiesItemResult) : this() {
            this.entities = x.entities
            this.index = x.index
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy