commonMain.aws.sdk.kotlin.services.textract.model.LendingDetection.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
/**
* The results extracted for a lending document.
*/
public class LendingDetection private constructor(builder: Builder) {
/**
* The confidence level for the text of a detected value in a lending document.
*/
public val confidence: kotlin.Float? = builder.confidence
/**
* Information about where the following items are located on a document page: detected page, text, key-value pairs, tables, table cells, and selection elements.
*/
public val geometry: aws.sdk.kotlin.services.textract.model.Geometry? = builder.geometry
/**
* The selection status of a selection element, such as an option button or check box.
*/
public val selectionStatus: aws.sdk.kotlin.services.textract.model.SelectionStatus? = builder.selectionStatus
/**
* The text extracted for a detected value in a lending document.
*/
public val text: kotlin.String? = builder.text
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.textract.model.LendingDetection = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("LendingDetection(")
append("confidence=$confidence,")
append("geometry=$geometry,")
append("selectionStatus=$selectionStatus,")
append("text=$text")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = confidence?.hashCode() ?: 0
result = 31 * result + (geometry?.hashCode() ?: 0)
result = 31 * result + (selectionStatus?.hashCode() ?: 0)
result = 31 * result + (text?.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 LendingDetection
if (!(confidence?.equals(other.confidence) ?: (other.confidence == null))) return false
if (geometry != other.geometry) return false
if (selectionStatus != other.selectionStatus) return false
if (text != other.text) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.textract.model.LendingDetection = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The confidence level for the text of a detected value in a lending document.
*/
public var confidence: kotlin.Float? = null
/**
* Information about where the following items are located on a document page: detected page, text, key-value pairs, tables, table cells, and selection elements.
*/
public var geometry: aws.sdk.kotlin.services.textract.model.Geometry? = null
/**
* The selection status of a selection element, such as an option button or check box.
*/
public var selectionStatus: aws.sdk.kotlin.services.textract.model.SelectionStatus? = null
/**
* The text extracted for a detected value in a lending document.
*/
public var text: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.textract.model.LendingDetection) : this() {
this.confidence = x.confidence
this.geometry = x.geometry
this.selectionStatus = x.selectionStatus
this.text = x.text
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.textract.model.LendingDetection = LendingDetection(this)
/**
* construct an [aws.sdk.kotlin.services.textract.model.Geometry] inside the given [block]
*/
public fun geometry(block: aws.sdk.kotlin.services.textract.model.Geometry.Builder.() -> kotlin.Unit) {
this.geometry = aws.sdk.kotlin.services.textract.model.Geometry.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}