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

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

There is a newer version: 1.3.35
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

public class AnalyzeDocumentResponse private constructor(builder: Builder) {
    /**
     * The version of the model used to analyze the document.
     */
    public val analyzeDocumentModelVersion: kotlin.String? = builder.analyzeDocumentModelVersion
    /**
     * The items that are detected and analyzed by `AnalyzeDocument`.
     */
    public val blocks: List? = builder.blocks
    /**
     * Metadata about the analyzed document. An example is the number of pages.
     */
    public val documentMetadata: aws.sdk.kotlin.services.textract.model.DocumentMetadata? = builder.documentMetadata
    /**
     * Shows the results of the human in the loop evaluation.
     */
    public val humanLoopActivationOutput: aws.sdk.kotlin.services.textract.model.HumanLoopActivationOutput? = builder.humanLoopActivationOutput

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

    override fun toString(): kotlin.String = buildString {
        append("AnalyzeDocumentResponse(")
        append("analyzeDocumentModelVersion=$analyzeDocumentModelVersion,")
        append("blocks=$blocks,")
        append("documentMetadata=$documentMetadata,")
        append("humanLoopActivationOutput=$humanLoopActivationOutput")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = analyzeDocumentModelVersion?.hashCode() ?: 0
        result = 31 * result + (blocks?.hashCode() ?: 0)
        result = 31 * result + (documentMetadata?.hashCode() ?: 0)
        result = 31 * result + (humanLoopActivationOutput?.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 AnalyzeDocumentResponse

        if (analyzeDocumentModelVersion != other.analyzeDocumentModelVersion) return false
        if (blocks != other.blocks) return false
        if (documentMetadata != other.documentMetadata) return false
        if (humanLoopActivationOutput != other.humanLoopActivationOutput) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The version of the model used to analyze the document.
         */
        public var analyzeDocumentModelVersion: kotlin.String? = null
        /**
         * The items that are detected and analyzed by `AnalyzeDocument`.
         */
        public var blocks: List? = null
        /**
         * Metadata about the analyzed document. An example is the number of pages.
         */
        public var documentMetadata: aws.sdk.kotlin.services.textract.model.DocumentMetadata? = null
        /**
         * Shows the results of the human in the loop evaluation.
         */
        public var humanLoopActivationOutput: aws.sdk.kotlin.services.textract.model.HumanLoopActivationOutput? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.textract.model.AnalyzeDocumentResponse) : this() {
            this.analyzeDocumentModelVersion = x.analyzeDocumentModelVersion
            this.blocks = x.blocks
            this.documentMetadata = x.documentMetadata
            this.humanLoopActivationOutput = x.humanLoopActivationOutput
        }

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy