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

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

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

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



public class BatchDetectSentimentResponse private constructor(builder: Builder) {
    /**
     * A list containing one object for each document that contained an error. The results are sorted in ascending order by the `Index` field and match the order of the documents in the input list. If there are no errors in the batch, the `ErrorList` is empty.
     */
    public val errorList: List? = builder.errorList
    /**
     * A list of objects containing the results of the operation. The results are sorted in ascending order by the `Index` field and match the order of the documents in the input list. If all of the documents contain an error, the `ResultList` is empty.
     */
    public val resultList: List? = builder.resultList

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

    override fun toString(): kotlin.String = buildString {
        append("BatchDetectSentimentResponse(")
        append("*** Sensitive Data Redacted ***")
        append(")")
    }

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

        if (errorList != other.errorList) return false
        if (resultList != other.resultList) return false

        return true
    }

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

    public class Builder {
        /**
         * A list containing one object for each document that contained an error. The results are sorted in ascending order by the `Index` field and match the order of the documents in the input list. If there are no errors in the batch, the `ErrorList` is empty.
         */
        public var errorList: List? = null
        /**
         * A list of objects containing the results of the operation. The results are sorted in ascending order by the `Index` field and match the order of the documents in the input list. If all of the documents contain an error, the `ResultList` is empty.
         */
        public var resultList: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.comprehend.model.BatchDetectSentimentResponse) : this() {
            this.errorList = x.errorList
            this.resultList = x.resultList
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy