commonMain.aws.sdk.kotlin.services.textract.model.NormalizedValue.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 relating to dates in a document, including the type of value, and the value.
*/
public class NormalizedValue private constructor(builder: Builder) {
/**
* The value of the date, written as Year-Month-DayTHour:Minute:Second.
*/
public val value: kotlin.String? = builder.value
/**
* The normalized type of the value detected. In this case, DATE.
*/
public val valueType: aws.sdk.kotlin.services.textract.model.ValueType? = builder.valueType
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.textract.model.NormalizedValue = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("NormalizedValue(")
append("value=$value,")
append("valueType=$valueType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = value?.hashCode() ?: 0
result = 31 * result + (valueType?.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 NormalizedValue
if (value != other.value) return false
if (valueType != other.valueType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.textract.model.NormalizedValue = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The value of the date, written as Year-Month-DayTHour:Minute:Second.
*/
public var value: kotlin.String? = null
/**
* The normalized type of the value detected. In this case, DATE.
*/
public var valueType: aws.sdk.kotlin.services.textract.model.ValueType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.textract.model.NormalizedValue) : this() {
this.value = x.value
this.valueType = x.valueType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.textract.model.NormalizedValue = NormalizedValue(this)
internal fun correctErrors(): Builder {
return this
}
}
}