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

commonMain.aws.sdk.kotlin.services.textract.model.DetectDocumentTextRequest.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

public class DetectDocumentTextRequest private constructor(builder: Builder) {
    /**
     * The input document as base64-encoded bytes or an Amazon S3 object. If you use the AWS CLI to call Amazon Textract operations, you can't pass image bytes. The document must be an image in JPEG or PNG format.
     *
     * If you're using an AWS SDK to call Amazon Textract, you might not need to base64-encode image bytes that are passed using the `Bytes` field.
     */
    public val document: aws.sdk.kotlin.services.textract.model.Document? = builder.document

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

    override fun toString(): kotlin.String = buildString {
        append("DetectDocumentTextRequest(")
        append("document=$document")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = document?.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 DetectDocumentTextRequest

        if (document != other.document) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The input document as base64-encoded bytes or an Amazon S3 object. If you use the AWS CLI to call Amazon Textract operations, you can't pass image bytes. The document must be an image in JPEG or PNG format.
         *
         * If you're using an AWS SDK to call Amazon Textract, you might not need to base64-encode image bytes that are passed using the `Bytes` field.
         */
        public var document: aws.sdk.kotlin.services.textract.model.Document? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.textract.model.DetectDocumentTextRequest) : this() {
            this.document = x.document
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy