commonMain.aws.sdk.kotlin.services.textract.model.LendingField.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
/**
* Holds the normalized key-value pairs returned by AnalyzeDocument, including the document type, detected text, and geometry.
*/
public class LendingField private constructor(builder: Builder) {
/**
* The results extracted for a lending document.
*/
public val keyDetection: aws.sdk.kotlin.services.textract.model.LendingDetection? = builder.keyDetection
/**
* The type of the lending document.
*/
public val type: kotlin.String? = builder.type
/**
* An array of LendingDetection objects.
*/
public val valueDetections: List? = builder.valueDetections
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.textract.model.LendingField = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("LendingField(")
append("keyDetection=$keyDetection,")
append("type=$type,")
append("valueDetections=$valueDetections")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = keyDetection?.hashCode() ?: 0
result = 31 * result + (type?.hashCode() ?: 0)
result = 31 * result + (valueDetections?.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 LendingField
if (keyDetection != other.keyDetection) return false
if (type != other.type) return false
if (valueDetections != other.valueDetections) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.textract.model.LendingField = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The results extracted for a lending document.
*/
public var keyDetection: aws.sdk.kotlin.services.textract.model.LendingDetection? = null
/**
* The type of the lending document.
*/
public var type: kotlin.String? = null
/**
* An array of LendingDetection objects.
*/
public var valueDetections: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.textract.model.LendingField) : this() {
this.keyDetection = x.keyDetection
this.type = x.type
this.valueDetections = x.valueDetections
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.textract.model.LendingField = LendingField(this)
/**
* construct an [aws.sdk.kotlin.services.textract.model.LendingDetection] inside the given [block]
*/
public fun keyDetection(block: aws.sdk.kotlin.services.textract.model.LendingDetection.Builder.() -> kotlin.Unit) {
this.keyDetection = aws.sdk.kotlin.services.textract.model.LendingDetection.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}