commonMain.aws.sdk.kotlin.services.textract.model.GetDocumentTextDetectionResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of textract-jvm Show documentation
Show all versions of textract-jvm Show documentation
The AWS SDK for Kotlin client for Textract
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.textract.model
import aws.smithy.kotlin.runtime.SdkDsl
public class GetDocumentTextDetectionResponse private constructor(builder: Builder) {
/**
* The results of the text-detection operation.
*/
public val blocks: List? = builder.blocks
/**
*
*/
public val detectDocumentTextModelVersion: kotlin.String? = builder.detectDocumentTextModelVersion
/**
* Information about a document that Amazon Textract processed. `DocumentMetadata` is returned in every page of paginated responses from an Amazon Textract video operation.
*/
public val documentMetadata: aws.sdk.kotlin.services.textract.model.DocumentMetadata? = builder.documentMetadata
/**
* The current status of the text detection job.
*/
public val jobStatus: aws.sdk.kotlin.services.textract.model.JobStatus? = builder.jobStatus
/**
* If the response is truncated, Amazon Textract returns this token. You can use this token in the subsequent request to retrieve the next set of text-detection results.
*/
public val nextToken: kotlin.String? = builder.nextToken
/**
* Returns if the detection job could not be completed. Contains explanation for what error occured.
*/
public val statusMessage: kotlin.String? = builder.statusMessage
/**
* A list of warnings that occurred during the text-detection operation for the document.
*/
public val warnings: List? = builder.warnings
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.textract.model.GetDocumentTextDetectionResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetDocumentTextDetectionResponse(")
append("blocks=$blocks,")
append("detectDocumentTextModelVersion=$detectDocumentTextModelVersion,")
append("documentMetadata=$documentMetadata,")
append("jobStatus=$jobStatus,")
append("nextToken=$nextToken,")
append("statusMessage=$statusMessage,")
append("warnings=$warnings")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = blocks?.hashCode() ?: 0
result = 31 * result + (detectDocumentTextModelVersion?.hashCode() ?: 0)
result = 31 * result + (documentMetadata?.hashCode() ?: 0)
result = 31 * result + (jobStatus?.hashCode() ?: 0)
result = 31 * result + (nextToken?.hashCode() ?: 0)
result = 31 * result + (statusMessage?.hashCode() ?: 0)
result = 31 * result + (warnings?.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 GetDocumentTextDetectionResponse
if (blocks != other.blocks) return false
if (detectDocumentTextModelVersion != other.detectDocumentTextModelVersion) return false
if (documentMetadata != other.documentMetadata) return false
if (jobStatus != other.jobStatus) return false
if (nextToken != other.nextToken) return false
if (statusMessage != other.statusMessage) return false
if (warnings != other.warnings) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.textract.model.GetDocumentTextDetectionResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The results of the text-detection operation.
*/
public var blocks: List? = null
/**
*
*/
public var detectDocumentTextModelVersion: kotlin.String? = null
/**
* Information about a document that Amazon Textract processed. `DocumentMetadata` is returned in every page of paginated responses from an Amazon Textract video operation.
*/
public var documentMetadata: aws.sdk.kotlin.services.textract.model.DocumentMetadata? = null
/**
* The current status of the text detection job.
*/
public var jobStatus: aws.sdk.kotlin.services.textract.model.JobStatus? = null
/**
* If the response is truncated, Amazon Textract returns this token. You can use this token in the subsequent request to retrieve the next set of text-detection results.
*/
public var nextToken: kotlin.String? = null
/**
* Returns if the detection job could not be completed. Contains explanation for what error occured.
*/
public var statusMessage: kotlin.String? = null
/**
* A list of warnings that occurred during the text-detection operation for the document.
*/
public var warnings: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.textract.model.GetDocumentTextDetectionResponse) : this() {
this.blocks = x.blocks
this.detectDocumentTextModelVersion = x.detectDocumentTextModelVersion
this.documentMetadata = x.documentMetadata
this.jobStatus = x.jobStatus
this.nextToken = x.nextToken
this.statusMessage = x.statusMessage
this.warnings = x.warnings
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.textract.model.GetDocumentTextDetectionResponse = GetDocumentTextDetectionResponse(this)
/**
* construct an [aws.sdk.kotlin.services.textract.model.DocumentMetadata] inside the given [block]
*/
public fun documentMetadata(block: aws.sdk.kotlin.services.textract.model.DocumentMetadata.Builder.() -> kotlin.Unit) {
this.documentMetadata = aws.sdk.kotlin.services.textract.model.DocumentMetadata.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}