commonMain.aws.sdk.kotlin.services.textract.model.SignatureDetection.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
/**
* Information regarding a detected signature on a page.
*/
public class SignatureDetection private constructor(builder: Builder) {
/**
* The confidence, from 0 to 100, in the predicted values for a detected signature.
*/
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
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.textract.model.SignatureDetection = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SignatureDetection(")
append("confidence=$confidence,")
append("geometry=$geometry")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = confidence?.hashCode() ?: 0
result = 31 * result + (geometry?.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 SignatureDetection
if (!(confidence?.equals(other.confidence) ?: (other.confidence == null))) return false
if (geometry != other.geometry) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.textract.model.SignatureDetection = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The confidence, from 0 to 100, in the predicted values for a detected signature.
*/
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
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.textract.model.SignatureDetection) : this() {
this.confidence = x.confidence
this.geometry = x.geometry
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.textract.model.SignatureDetection = SignatureDetection(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
}
}
}