aws_sdk_textract/operation/analyze_expense/_analyze_expense_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct AnalyzeExpenseInput {
6 /// <p>The input document, either as bytes or as an S3 object.</p>
7 /// <p>You pass image bytes to an Amazon Textract API operation by using the <code>Bytes</code> property. For example, you would use the <code>Bytes</code> property to pass a document loaded from a local file system. Image bytes passed by using the <code>Bytes</code> 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.</p>
8 /// <p>You pass images stored in an S3 bucket to an Amazon Textract API operation by using the <code>S3Object</code> property. Documents stored in an S3 bucket don't need to be base64 encoded.</p>
9 /// <p>The AWS Region for the S3 bucket that contains the S3 object must match the AWS Region that you use for Amazon Textract operations.</p>
10 /// <p>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.</p>
11 /// <p>For Amazon Textract to process an S3 object, the user must have permission to access the S3 object.</p>
12 pub document: ::std::option::Option<crate::types::Document>,
13}
14impl AnalyzeExpenseInput {
15 /// <p>The input document, either as bytes or as an S3 object.</p>
16 /// <p>You pass image bytes to an Amazon Textract API operation by using the <code>Bytes</code> property. For example, you would use the <code>Bytes</code> property to pass a document loaded from a local file system. Image bytes passed by using the <code>Bytes</code> 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.</p>
17 /// <p>You pass images stored in an S3 bucket to an Amazon Textract API operation by using the <code>S3Object</code> property. Documents stored in an S3 bucket don't need to be base64 encoded.</p>
18 /// <p>The AWS Region for the S3 bucket that contains the S3 object must match the AWS Region that you use for Amazon Textract operations.</p>
19 /// <p>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.</p>
20 /// <p>For Amazon Textract to process an S3 object, the user must have permission to access the S3 object.</p>
21 pub fn document(&self) -> ::std::option::Option<&crate::types::Document> {
22 self.document.as_ref()
23 }
24}
25impl AnalyzeExpenseInput {
26 /// Creates a new builder-style object to manufacture [`AnalyzeExpenseInput`](crate::operation::analyze_expense::AnalyzeExpenseInput).
27 pub fn builder() -> crate::operation::analyze_expense::builders::AnalyzeExpenseInputBuilder {
28 crate::operation::analyze_expense::builders::AnalyzeExpenseInputBuilder::default()
29 }
30}
31
32/// A builder for [`AnalyzeExpenseInput`](crate::operation::analyze_expense::AnalyzeExpenseInput).
33#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
34#[non_exhaustive]
35pub struct AnalyzeExpenseInputBuilder {
36 pub(crate) document: ::std::option::Option<crate::types::Document>,
37}
38impl AnalyzeExpenseInputBuilder {
39 /// <p>The input document, either as bytes or as an S3 object.</p>
40 /// <p>You pass image bytes to an Amazon Textract API operation by using the <code>Bytes</code> property. For example, you would use the <code>Bytes</code> property to pass a document loaded from a local file system. Image bytes passed by using the <code>Bytes</code> 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.</p>
41 /// <p>You pass images stored in an S3 bucket to an Amazon Textract API operation by using the <code>S3Object</code> property. Documents stored in an S3 bucket don't need to be base64 encoded.</p>
42 /// <p>The AWS Region for the S3 bucket that contains the S3 object must match the AWS Region that you use for Amazon Textract operations.</p>
43 /// <p>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.</p>
44 /// <p>For Amazon Textract to process an S3 object, the user must have permission to access the S3 object.</p>
45 /// This field is required.
46 pub fn document(mut self, input: crate::types::Document) -> Self {
47 self.document = ::std::option::Option::Some(input);
48 self
49 }
50 /// <p>The input document, either as bytes or as an S3 object.</p>
51 /// <p>You pass image bytes to an Amazon Textract API operation by using the <code>Bytes</code> property. For example, you would use the <code>Bytes</code> property to pass a document loaded from a local file system. Image bytes passed by using the <code>Bytes</code> 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.</p>
52 /// <p>You pass images stored in an S3 bucket to an Amazon Textract API operation by using the <code>S3Object</code> property. Documents stored in an S3 bucket don't need to be base64 encoded.</p>
53 /// <p>The AWS Region for the S3 bucket that contains the S3 object must match the AWS Region that you use for Amazon Textract operations.</p>
54 /// <p>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.</p>
55 /// <p>For Amazon Textract to process an S3 object, the user must have permission to access the S3 object.</p>
56 pub fn set_document(mut self, input: ::std::option::Option<crate::types::Document>) -> Self {
57 self.document = input;
58 self
59 }
60 /// <p>The input document, either as bytes or as an S3 object.</p>
61 /// <p>You pass image bytes to an Amazon Textract API operation by using the <code>Bytes</code> property. For example, you would use the <code>Bytes</code> property to pass a document loaded from a local file system. Image bytes passed by using the <code>Bytes</code> 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.</p>
62 /// <p>You pass images stored in an S3 bucket to an Amazon Textract API operation by using the <code>S3Object</code> property. Documents stored in an S3 bucket don't need to be base64 encoded.</p>
63 /// <p>The AWS Region for the S3 bucket that contains the S3 object must match the AWS Region that you use for Amazon Textract operations.</p>
64 /// <p>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.</p>
65 /// <p>For Amazon Textract to process an S3 object, the user must have permission to access the S3 object.</p>
66 pub fn get_document(&self) -> &::std::option::Option<crate::types::Document> {
67 &self.document
68 }
69 /// Consumes the builder and constructs a [`AnalyzeExpenseInput`](crate::operation::analyze_expense::AnalyzeExpenseInput).
70 pub fn build(
71 self,
72 ) -> ::std::result::Result<crate::operation::analyze_expense::AnalyzeExpenseInput, ::aws_smithy_types::error::operation::BuildError> {
73 ::std::result::Result::Ok(crate::operation::analyze_expense::AnalyzeExpenseInput { document: self.document })
74 }
75}