commonMain.aws.sdk.kotlin.services.textract.model.Extraction.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
/**
* Contains information extracted by an analysis operation after using StartLendingAnalysis.
*/
public class Extraction private constructor(builder: Builder) {
/**
* The structure holding all the information returned by AnalyzeExpense
*/
public val expenseDocument: aws.sdk.kotlin.services.textract.model.ExpenseDocument? = builder.expenseDocument
/**
* The structure that lists each document processed in an AnalyzeID operation.
*/
public val identityDocument: aws.sdk.kotlin.services.textract.model.IdentityDocument? = builder.identityDocument
/**
* Holds the structured data returned by AnalyzeDocument for lending documents.
*/
public val lendingDocument: aws.sdk.kotlin.services.textract.model.LendingDocument? = builder.lendingDocument
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.textract.model.Extraction = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Extraction(")
append("expenseDocument=$expenseDocument,")
append("identityDocument=$identityDocument,")
append("lendingDocument=$lendingDocument")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = expenseDocument?.hashCode() ?: 0
result = 31 * result + (identityDocument?.hashCode() ?: 0)
result = 31 * result + (lendingDocument?.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 Extraction
if (expenseDocument != other.expenseDocument) return false
if (identityDocument != other.identityDocument) return false
if (lendingDocument != other.lendingDocument) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.textract.model.Extraction = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The structure holding all the information returned by AnalyzeExpense
*/
public var expenseDocument: aws.sdk.kotlin.services.textract.model.ExpenseDocument? = null
/**
* The structure that lists each document processed in an AnalyzeID operation.
*/
public var identityDocument: aws.sdk.kotlin.services.textract.model.IdentityDocument? = null
/**
* Holds the structured data returned by AnalyzeDocument for lending documents.
*/
public var lendingDocument: aws.sdk.kotlin.services.textract.model.LendingDocument? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.textract.model.Extraction) : this() {
this.expenseDocument = x.expenseDocument
this.identityDocument = x.identityDocument
this.lendingDocument = x.lendingDocument
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.textract.model.Extraction = Extraction(this)
/**
* construct an [aws.sdk.kotlin.services.textract.model.ExpenseDocument] inside the given [block]
*/
public fun expenseDocument(block: aws.sdk.kotlin.services.textract.model.ExpenseDocument.Builder.() -> kotlin.Unit) {
this.expenseDocument = aws.sdk.kotlin.services.textract.model.ExpenseDocument.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.textract.model.IdentityDocument] inside the given [block]
*/
public fun identityDocument(block: aws.sdk.kotlin.services.textract.model.IdentityDocument.Builder.() -> kotlin.Unit) {
this.identityDocument = aws.sdk.kotlin.services.textract.model.IdentityDocument.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.textract.model.LendingDocument] inside the given [block]
*/
public fun lendingDocument(block: aws.sdk.kotlin.services.textract.model.LendingDocument.Builder.() -> kotlin.Unit) {
this.lendingDocument = aws.sdk.kotlin.services.textract.model.LendingDocument.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}