commonMain.aws.sdk.kotlin.services.textract.model.DetectDocumentTextResponse.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 DetectDocumentTextResponse private constructor(builder: Builder) {
/**
* An array of `Block` objects that contain the text that's detected in the document.
*/
public val blocks: List? = builder.blocks
/**
*
*/
public val detectDocumentTextModelVersion: kotlin.String? = builder.detectDocumentTextModelVersion
/**
* Metadata about the document. It contains the number of pages that are detected in the document.
*/
public val documentMetadata: aws.sdk.kotlin.services.textract.model.DocumentMetadata? = builder.documentMetadata
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.textract.model.DetectDocumentTextResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DetectDocumentTextResponse(")
append("blocks=$blocks,")
append("detectDocumentTextModelVersion=$detectDocumentTextModelVersion,")
append("documentMetadata=$documentMetadata")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = blocks?.hashCode() ?: 0
result = 31 * result + (detectDocumentTextModelVersion?.hashCode() ?: 0)
result = 31 * result + (documentMetadata?.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 DetectDocumentTextResponse
if (blocks != other.blocks) return false
if (detectDocumentTextModelVersion != other.detectDocumentTextModelVersion) return false
if (documentMetadata != other.documentMetadata) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.textract.model.DetectDocumentTextResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An array of `Block` objects that contain the text that's detected in the document.
*/
public var blocks: List? = null
/**
*
*/
public var detectDocumentTextModelVersion: kotlin.String? = null
/**
* Metadata about the document. It contains the number of pages that are detected in the document.
*/
public var documentMetadata: aws.sdk.kotlin.services.textract.model.DocumentMetadata? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.textract.model.DetectDocumentTextResponse) : this() {
this.blocks = x.blocks
this.detectDocumentTextModelVersion = x.detectDocumentTextModelVersion
this.documentMetadata = x.documentMetadata
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.textract.model.DetectDocumentTextResponse = DetectDocumentTextResponse(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
}
}
}