commonMain.aws.sdk.kotlin.services.textract.model.AnalyzeExpenseRequest.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
public class AnalyzeExpenseRequest private constructor(builder: Builder) {
/**
* The input document, either as bytes or as an S3 object.
*
* You pass image bytes to an Amazon Textract API operation by using the `Bytes` property. For example, you would use the `Bytes` property to pass a document loaded from a local file system. Image bytes passed by using the `Bytes` property must be base64 encoded. Your code might not need to encode document file bytes if you're using an AWS SDK to call Amazon Textract API operations.
*
* You pass images stored in an S3 bucket to an Amazon Textract API operation by using the `S3Object` property. Documents stored in an S3 bucket don't need to be base64 encoded.
*
* The AWS Region for the S3 bucket that contains the S3 object must match the AWS Region that you use for Amazon Textract operations.
*
* If you use the AWS CLI to call Amazon Textract operations, passing image bytes using the Bytes property isn't supported. You must first upload the document to an Amazon S3 bucket, and then call the operation using the S3Object property.
*
* For Amazon Textract to process an S3 object, the user must have permission to access the S3 object.
*/
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.AnalyzeExpenseRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AnalyzeExpenseRequest(")
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 AnalyzeExpenseRequest
if (document != other.document) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.textract.model.AnalyzeExpenseRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The input document, either as bytes or as an S3 object.
*
* You pass image bytes to an Amazon Textract API operation by using the `Bytes` property. For example, you would use the `Bytes` property to pass a document loaded from a local file system. Image bytes passed by using the `Bytes` property must be base64 encoded. Your code might not need to encode document file bytes if you're using an AWS SDK to call Amazon Textract API operations.
*
* You pass images stored in an S3 bucket to an Amazon Textract API operation by using the `S3Object` property. Documents stored in an S3 bucket don't need to be base64 encoded.
*
* The AWS Region for the S3 bucket that contains the S3 object must match the AWS Region that you use for Amazon Textract operations.
*
* If you use the AWS CLI to call Amazon Textract operations, passing image bytes using the Bytes property isn't supported. You must first upload the document to an Amazon S3 bucket, and then call the operation using the S3Object property.
*
* For Amazon Textract to process an S3 object, the user must have permission to access the S3 object.
*/
public var document: aws.sdk.kotlin.services.textract.model.Document? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.textract.model.AnalyzeExpenseRequest) : this() {
this.document = x.document
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.textract.model.AnalyzeExpenseRequest = AnalyzeExpenseRequest(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
}
}
}