commonMain.aws.sdk.kotlin.services.textract.model.ExpenseField.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
/**
* Breakdown of detected information, seperated into the catagories Type, LabelDetection, and ValueDetection
*/
public class ExpenseField private constructor(builder: Builder) {
/**
* Shows the kind of currency, both the code and confidence associated with any monatary value detected.
*/
public val currency: aws.sdk.kotlin.services.textract.model.ExpenseCurrency? = builder.currency
/**
* Shows which group a response object belongs to, such as whether an address line belongs to the vendor's address or the recipent's address.
*/
public val groupProperties: List? = builder.groupProperties
/**
* The explicitly stated label of a detected element.
*/
public val labelDetection: aws.sdk.kotlin.services.textract.model.ExpenseDetection? = builder.labelDetection
/**
* The page number the value was detected on.
*/
public val pageNumber: kotlin.Int? = builder.pageNumber
/**
* The implied label of a detected element. Present alongside LabelDetection for explicit elements.
*/
public val type: aws.sdk.kotlin.services.textract.model.ExpenseType? = builder.type
/**
* The value of a detected element. Present in explicit and implicit elements.
*/
public val valueDetection: aws.sdk.kotlin.services.textract.model.ExpenseDetection? = builder.valueDetection
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.textract.model.ExpenseField = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ExpenseField(")
append("currency=$currency,")
append("groupProperties=$groupProperties,")
append("labelDetection=$labelDetection,")
append("pageNumber=$pageNumber,")
append("type=$type,")
append("valueDetection=$valueDetection")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = currency?.hashCode() ?: 0
result = 31 * result + (groupProperties?.hashCode() ?: 0)
result = 31 * result + (labelDetection?.hashCode() ?: 0)
result = 31 * result + (pageNumber ?: 0)
result = 31 * result + (type?.hashCode() ?: 0)
result = 31 * result + (valueDetection?.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 ExpenseField
if (currency != other.currency) return false
if (groupProperties != other.groupProperties) return false
if (labelDetection != other.labelDetection) return false
if (pageNumber != other.pageNumber) return false
if (type != other.type) return false
if (valueDetection != other.valueDetection) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.textract.model.ExpenseField = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Shows the kind of currency, both the code and confidence associated with any monatary value detected.
*/
public var currency: aws.sdk.kotlin.services.textract.model.ExpenseCurrency? = null
/**
* Shows which group a response object belongs to, such as whether an address line belongs to the vendor's address or the recipent's address.
*/
public var groupProperties: List? = null
/**
* The explicitly stated label of a detected element.
*/
public var labelDetection: aws.sdk.kotlin.services.textract.model.ExpenseDetection? = null
/**
* The page number the value was detected on.
*/
public var pageNumber: kotlin.Int? = null
/**
* The implied label of a detected element. Present alongside LabelDetection for explicit elements.
*/
public var type: aws.sdk.kotlin.services.textract.model.ExpenseType? = null
/**
* The value of a detected element. Present in explicit and implicit elements.
*/
public var valueDetection: aws.sdk.kotlin.services.textract.model.ExpenseDetection? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.textract.model.ExpenseField) : this() {
this.currency = x.currency
this.groupProperties = x.groupProperties
this.labelDetection = x.labelDetection
this.pageNumber = x.pageNumber
this.type = x.type
this.valueDetection = x.valueDetection
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.textract.model.ExpenseField = ExpenseField(this)
/**
* construct an [aws.sdk.kotlin.services.textract.model.ExpenseCurrency] inside the given [block]
*/
public fun currency(block: aws.sdk.kotlin.services.textract.model.ExpenseCurrency.Builder.() -> kotlin.Unit) {
this.currency = aws.sdk.kotlin.services.textract.model.ExpenseCurrency.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.textract.model.ExpenseDetection] inside the given [block]
*/
public fun labelDetection(block: aws.sdk.kotlin.services.textract.model.ExpenseDetection.Builder.() -> kotlin.Unit) {
this.labelDetection = aws.sdk.kotlin.services.textract.model.ExpenseDetection.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.textract.model.ExpenseType] inside the given [block]
*/
public fun type(block: aws.sdk.kotlin.services.textract.model.ExpenseType.Builder.() -> kotlin.Unit) {
this.type = aws.sdk.kotlin.services.textract.model.ExpenseType.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.textract.model.ExpenseDetection] inside the given [block]
*/
public fun valueDetection(block: aws.sdk.kotlin.services.textract.model.ExpenseDetection.Builder.() -> kotlin.Unit) {
this.valueDetection = aws.sdk.kotlin.services.textract.model.ExpenseDetection.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}