All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.textract.model.LendingResult.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.textract.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains the detections for each page analyzed through the Analyze Lending API.
 */
public class LendingResult private constructor(builder: Builder) {
    /**
     * An array of Extraction to hold structured data. e.g. normalized key value pairs instead of raw OCR detections .
     */
    public val extractions: List? = builder.extractions
    /**
     * The page number for a page, with regard to whole submission.
     */
    public val page: kotlin.Int? = builder.page
    /**
     * The classifier result for a given page.
     */
    public val pageClassification: aws.sdk.kotlin.services.textract.model.PageClassification? = builder.pageClassification

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.textract.model.LendingResult = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("LendingResult(")
        append("extractions=$extractions,")
        append("page=$page,")
        append("pageClassification=$pageClassification")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = extractions?.hashCode() ?: 0
        result = 31 * result + (page ?: 0)
        result = 31 * result + (pageClassification?.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 LendingResult

        if (extractions != other.extractions) return false
        if (page != other.page) return false
        if (pageClassification != other.pageClassification) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.textract.model.LendingResult = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * An array of Extraction to hold structured data. e.g. normalized key value pairs instead of raw OCR detections .
         */
        public var extractions: List? = null
        /**
         * The page number for a page, with regard to whole submission.
         */
        public var page: kotlin.Int? = null
        /**
         * The classifier result for a given page.
         */
        public var pageClassification: aws.sdk.kotlin.services.textract.model.PageClassification? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.textract.model.LendingResult) : this() {
            this.extractions = x.extractions
            this.page = x.page
            this.pageClassification = x.pageClassification
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.textract.model.LendingResult = LendingResult(this)

        /**
         * construct an [aws.sdk.kotlin.services.textract.model.PageClassification] inside the given [block]
         */
        public fun pageClassification(block: aws.sdk.kotlin.services.textract.model.PageClassification.Builder.() -> kotlin.Unit) {
            this.pageClassification = aws.sdk.kotlin.services.textract.model.PageClassification.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy