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

commonMain.aws.sdk.kotlin.services.textract.model.GetDocumentAnalysisResponse.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 GetDocumentAnalysisResponse private constructor(builder: Builder) {
    /**
     *
     */
    public val analyzeDocumentModelVersion: kotlin.String? = builder.analyzeDocumentModelVersion
    /**
     * The results of the text-analysis operation.
     */
    public val blocks: List? = builder.blocks
    /**
     * Information about a document that Amazon Textract processed. `DocumentMetadata` is returned in every page of paginated responses from an Amazon Textract video operation.
     */
    public val documentMetadata: aws.sdk.kotlin.services.textract.model.DocumentMetadata? = builder.documentMetadata
    /**
     * The current status of the text detection job.
     */
    public val jobStatus: aws.sdk.kotlin.services.textract.model.JobStatus? = builder.jobStatus
    /**
     * If the response is truncated, Amazon Textract returns this token. You can use this token in the subsequent request to retrieve the next set of text detection results.
     */
    public val nextToken: kotlin.String? = builder.nextToken
    /**
     * Returns if the detection job could not be completed. Contains explanation for what error occured.
     */
    public val statusMessage: kotlin.String? = builder.statusMessage
    /**
     * A list of warnings that occurred during the document-analysis operation.
     */
    public val warnings: List? = builder.warnings

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

    override fun toString(): kotlin.String = buildString {
        append("GetDocumentAnalysisResponse(")
        append("analyzeDocumentModelVersion=$analyzeDocumentModelVersion,")
        append("blocks=$blocks,")
        append("documentMetadata=$documentMetadata,")
        append("jobStatus=$jobStatus,")
        append("nextToken=$nextToken,")
        append("statusMessage=$statusMessage,")
        append("warnings=$warnings")
        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 + (jobStatus?.hashCode() ?: 0)
        result = 31 * result + (nextToken?.hashCode() ?: 0)
        result = 31 * result + (statusMessage?.hashCode() ?: 0)
        result = 31 * result + (warnings?.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 GetDocumentAnalysisResponse

        if (analyzeDocumentModelVersion != other.analyzeDocumentModelVersion) return false
        if (blocks != other.blocks) return false
        if (documentMetadata != other.documentMetadata) return false
        if (jobStatus != other.jobStatus) return false
        if (nextToken != other.nextToken) return false
        if (statusMessage != other.statusMessage) return false
        if (warnings != other.warnings) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         *
         */
        public var analyzeDocumentModelVersion: kotlin.String? = null
        /**
         * The results of the text-analysis operation.
         */
        public var blocks: List? = null
        /**
         * Information about a document that Amazon Textract processed. `DocumentMetadata` is returned in every page of paginated responses from an Amazon Textract video operation.
         */
        public var documentMetadata: aws.sdk.kotlin.services.textract.model.DocumentMetadata? = null
        /**
         * The current status of the text detection job.
         */
        public var jobStatus: aws.sdk.kotlin.services.textract.model.JobStatus? = null
        /**
         * If the response is truncated, Amazon Textract returns this token. You can use this token in the subsequent request to retrieve the next set of text detection results.
         */
        public var nextToken: kotlin.String? = null
        /**
         * Returns if the detection job could not be completed. Contains explanation for what error occured.
         */
        public var statusMessage: kotlin.String? = null
        /**
         * A list of warnings that occurred during the document-analysis operation.
         */
        public var warnings: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.textract.model.GetDocumentAnalysisResponse) : this() {
            this.analyzeDocumentModelVersion = x.analyzeDocumentModelVersion
            this.blocks = x.blocks
            this.documentMetadata = x.documentMetadata
            this.jobStatus = x.jobStatus
            this.nextToken = x.nextToken
            this.statusMessage = x.statusMessage
            this.warnings = x.warnings
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.textract.model.GetDocumentAnalysisResponse = GetDocumentAnalysisResponse(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)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy