1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`ClassifyDocument`](crate::operation::classify_document::builders::ClassifyDocumentFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`text(impl Into<String>)`](crate::operation::classify_document::builders::ClassifyDocumentFluentBuilder::text) / [`set_text(Option<String>)`](crate::operation::classify_document::builders::ClassifyDocumentFluentBuilder::set_text): <p>The document text to be analyzed. If you enter text using this parameter, do not use the <code>Bytes</code> parameter.</p>
    ///   - [`endpoint_arn(impl Into<String>)`](crate::operation::classify_document::builders::ClassifyDocumentFluentBuilder::endpoint_arn) / [`set_endpoint_arn(Option<String>)`](crate::operation::classify_document::builders::ClassifyDocumentFluentBuilder::set_endpoint_arn): <p>The Amazon Resource Number (ARN) of the endpoint. For information about endpoints, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html">Managing endpoints</a>.</p>
    ///   - [`bytes(Blob)`](crate::operation::classify_document::builders::ClassifyDocumentFluentBuilder::bytes) / [`set_bytes(Option<Blob>)`](crate::operation::classify_document::builders::ClassifyDocumentFluentBuilder::set_bytes): <p>Use the <code>Bytes</code> parameter to input a text, PDF, Word or image file. You can also use the <code>Bytes</code> parameter to input an Amazon Textract <code>DetectDocumentText</code> or <code>AnalyzeDocument</code> output file.</p>  <p>Provide the input document as a sequence of base64-encoded bytes. If your code uses an Amazon Web Services SDK to classify documents, the SDK may encode the document file bytes for you. </p>  <p>The maximum length of this field depends on the input document type. For details, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/idp-inputs-sync.html"> Inputs for real-time custom analysis</a> in the Comprehend Developer Guide. </p>  <p>If you use the <code>Bytes</code> parameter, do not use the <code>Text</code> parameter.</p>
    ///   - [`document_reader_config(DocumentReaderConfig)`](crate::operation::classify_document::builders::ClassifyDocumentFluentBuilder::document_reader_config) / [`set_document_reader_config(Option<DocumentReaderConfig>)`](crate::operation::classify_document::builders::ClassifyDocumentFluentBuilder::set_document_reader_config): <p>Provides configuration parameters to override the default actions for extracting text from PDF documents and image files.</p>
    /// - On success, responds with [`ClassifyDocumentOutput`](crate::operation::classify_document::ClassifyDocumentOutput) with field(s):
    ///   - [`classes(Option<Vec<DocumentClass>>)`](crate::operation::classify_document::ClassifyDocumentOutput::classes): <p>The classes used by the document being analyzed. These are used for multi-class trained models. Individual classes are mutually exclusive and each document is expected to have only a single class assigned to it. For example, an animal can be a dog or a cat, but not both at the same time. </p>
    ///   - [`labels(Option<Vec<DocumentLabel>>)`](crate::operation::classify_document::ClassifyDocumentOutput::labels): <p>The labels used the document being analyzed. These are used for multi-label trained models. Individual labels represent different categories that are related in some manner and are not mutually exclusive. For example, a movie can be just an action movie, or it can be an action movie, a science fiction movie, and a comedy, all at the same time. </p>
    ///   - [`document_metadata(Option<DocumentMetadata>)`](crate::operation::classify_document::ClassifyDocumentOutput::document_metadata): <p>Extraction information about the document. This field is present in the response only if your request includes the <code>Byte</code> parameter. </p>
    ///   - [`document_type(Option<Vec<DocumentTypeListItem>>)`](crate::operation::classify_document::ClassifyDocumentOutput::document_type): <p>The document type for each page in the input document. This field is present in the response only if your request includes the <code>Byte</code> parameter. </p>
    ///   - [`errors(Option<Vec<ErrorsListItem>>)`](crate::operation::classify_document::ClassifyDocumentOutput::errors): <p>Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors.</p>
    ///   - [`warnings(Option<Vec<WarningsListItem>>)`](crate::operation::classify_document::ClassifyDocumentOutput::warnings): <p>Warnings detected while processing the input document. The response includes a warning if there is a mismatch between the input document type and the model type associated with the endpoint that you specified. The response can also include warnings for individual pages that have a mismatch. </p>  <p>The field is empty if the system generated no warnings.</p>
    /// - On failure, responds with [`SdkError<ClassifyDocumentError>`](crate::operation::classify_document::ClassifyDocumentError)
    pub fn classify_document(
        &self,
    ) -> crate::operation::classify_document::builders::ClassifyDocumentFluentBuilder {
        crate::operation::classify_document::builders::ClassifyDocumentFluentBuilder::new(
            self.handle.clone(),
        )
    }
}