aws-sdk-textract 1.99.0

AWS SDK for Amazon Textract
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DetectDocumentTextInput {
    /// <p>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.</p>
    /// <p>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 <code>Bytes</code> field.</p>
    pub document: ::std::option::Option<crate::types::Document>,
}
impl DetectDocumentTextInput {
    /// <p>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.</p>
    /// <p>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 <code>Bytes</code> field.</p>
    pub fn document(&self) -> ::std::option::Option<&crate::types::Document> {
        self.document.as_ref()
    }
}
impl DetectDocumentTextInput {
    /// Creates a new builder-style object to manufacture [`DetectDocumentTextInput`](crate::operation::detect_document_text::DetectDocumentTextInput).
    pub fn builder() -> crate::operation::detect_document_text::builders::DetectDocumentTextInputBuilder {
        crate::operation::detect_document_text::builders::DetectDocumentTextInputBuilder::default()
    }
}

/// A builder for [`DetectDocumentTextInput`](crate::operation::detect_document_text::DetectDocumentTextInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DetectDocumentTextInputBuilder {
    pub(crate) document: ::std::option::Option<crate::types::Document>,
}
impl DetectDocumentTextInputBuilder {
    /// <p>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.</p>
    /// <p>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 <code>Bytes</code> field.</p>
    /// This field is required.
    pub fn document(mut self, input: crate::types::Document) -> Self {
        self.document = ::std::option::Option::Some(input);
        self
    }
    /// <p>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.</p>
    /// <p>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 <code>Bytes</code> field.</p>
    pub fn set_document(mut self, input: ::std::option::Option<crate::types::Document>) -> Self {
        self.document = input;
        self
    }
    /// <p>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.</p>
    /// <p>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 <code>Bytes</code> field.</p>
    pub fn get_document(&self) -> &::std::option::Option<crate::types::Document> {
        &self.document
    }
    /// Consumes the builder and constructs a [`DetectDocumentTextInput`](crate::operation::detect_document_text::DetectDocumentTextInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::detect_document_text::DetectDocumentTextInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::detect_document_text::DetectDocumentTextInput { document: self.document })
    }
}