commonMain.aws.sdk.kotlin.services.comprehend.model.BatchDetectDominantLanguageResponse.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 BatchDetectDominantLanguageResponse 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 = requireNotNull(builder.errorList) { "A non-null value must be provided for 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 = requireNotNull(builder.resultList) { "A non-null value must be provided for resultList" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.comprehend.model.BatchDetectDominantLanguageResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BatchDetectDominantLanguageResponse(")
append("*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = errorList.hashCode()
result = 31 * result + (resultList.hashCode())
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 BatchDetectDominantLanguageResponse
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.BatchDetectDominantLanguageResponse = Builder(this).apply(block).build()
@SdkDsl
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.BatchDetectDominantLanguageResponse) : this() {
this.errorList = x.errorList
this.resultList = x.resultList
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.comprehend.model.BatchDetectDominantLanguageResponse = BatchDetectDominantLanguageResponse(this)
internal fun correctErrors(): Builder {
if (errorList == null) errorList = emptyList()
if (resultList == null) resultList = emptyList()
return this
}
}
}