commonMain.aws.sdk.kotlin.services.comprehend.model.BatchItemError.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
/**
* Describes an error that occurred while processing a document in a batch. The operation returns on `BatchItemError` object for each document that contained an error.
*/
public class BatchItemError private constructor(builder: Builder) {
/**
* The numeric error code of the error.
*/
public val errorCode: kotlin.String? = builder.errorCode
/**
* A text description of the error.
*/
public val errorMessage: kotlin.String? = builder.errorMessage
/**
* 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.BatchItemError = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BatchItemError(")
append("errorCode=$errorCode,")
append("errorMessage=$errorMessage,")
append("index=$index")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = errorCode?.hashCode() ?: 0
result = 31 * result + (errorMessage?.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 BatchItemError
if (errorCode != other.errorCode) return false
if (errorMessage != other.errorMessage) return false
if (index != other.index) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.comprehend.model.BatchItemError = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The numeric error code of the error.
*/
public var errorCode: kotlin.String? = null
/**
* A text description of the error.
*/
public var errorMessage: kotlin.String? = 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.BatchItemError) : this() {
this.errorCode = x.errorCode
this.errorMessage = x.errorMessage
this.index = x.index
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.comprehend.model.BatchItemError = BatchItemError(this)
internal fun correctErrors(): Builder {
return this
}
}
}