Struct aws_sdk_comprehend::operation::classify_document::builders::ClassifyDocumentOutputBuilder
source · #[non_exhaustive]pub struct ClassifyDocumentOutputBuilder { /* private fields */ }
Expand description
A builder for ClassifyDocumentOutput
.
Implementations§
source§impl ClassifyDocumentOutputBuilder
impl ClassifyDocumentOutputBuilder
sourcepub fn classes(self, input: DocumentClass) -> Self
pub fn classes(self, input: DocumentClass) -> Self
Appends an item to classes
.
To override the contents of this collection use set_classes
.
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.
For prompt classification, the response includes a single class (UNDESIRED_PROMPT
), along with a confidence score. A higher confidence score indicates that the input prompt is undesired in nature.
sourcepub fn set_classes(self, input: Option<Vec<DocumentClass>>) -> Self
pub fn set_classes(self, input: Option<Vec<DocumentClass>>) -> Self
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.
For prompt classification, the response includes a single class (UNDESIRED_PROMPT
), along with a confidence score. A higher confidence score indicates that the input prompt is undesired in nature.
sourcepub fn get_classes(&self) -> &Option<Vec<DocumentClass>>
pub fn get_classes(&self) -> &Option<Vec<DocumentClass>>
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.
For prompt classification, the response includes a single class (UNDESIRED_PROMPT
), along with a confidence score. A higher confidence score indicates that the input prompt is undesired in nature.
sourcepub fn labels(self, input: DocumentLabel) -> Self
pub fn labels(self, input: DocumentLabel) -> Self
Appends an item to labels
.
To override the contents of this collection use set_labels
.
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.
sourcepub fn set_labels(self, input: Option<Vec<DocumentLabel>>) -> Self
pub fn set_labels(self, input: Option<Vec<DocumentLabel>>) -> Self
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.
sourcepub fn get_labels(&self) -> &Option<Vec<DocumentLabel>>
pub fn get_labels(&self) -> &Option<Vec<DocumentLabel>>
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.
sourcepub fn document_metadata(self, input: DocumentMetadata) -> Self
pub fn document_metadata(self, input: DocumentMetadata) -> Self
Extraction information about the document. This field is present in the response only if your request includes the Byte
parameter.
sourcepub fn set_document_metadata(self, input: Option<DocumentMetadata>) -> Self
pub fn set_document_metadata(self, input: Option<DocumentMetadata>) -> Self
Extraction information about the document. This field is present in the response only if your request includes the Byte
parameter.
sourcepub fn get_document_metadata(&self) -> &Option<DocumentMetadata>
pub fn get_document_metadata(&self) -> &Option<DocumentMetadata>
Extraction information about the document. This field is present in the response only if your request includes the Byte
parameter.
sourcepub fn document_type(self, input: DocumentTypeListItem) -> Self
pub fn document_type(self, input: DocumentTypeListItem) -> Self
Appends an item to document_type
.
To override the contents of this collection use set_document_type
.
The document type for each page in the input document. This field is present in the response only if your request includes the Byte
parameter.
sourcepub fn set_document_type(self, input: Option<Vec<DocumentTypeListItem>>) -> Self
pub fn set_document_type(self, input: Option<Vec<DocumentTypeListItem>>) -> Self
The document type for each page in the input document. This field is present in the response only if your request includes the Byte
parameter.
sourcepub fn get_document_type(&self) -> &Option<Vec<DocumentTypeListItem>>
pub fn get_document_type(&self) -> &Option<Vec<DocumentTypeListItem>>
The document type for each page in the input document. This field is present in the response only if your request includes the Byte
parameter.
sourcepub fn errors(self, input: ErrorsListItem) -> Self
pub fn errors(self, input: ErrorsListItem) -> Self
Appends an item to errors
.
To override the contents of this collection use set_errors
.
Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors.
sourcepub fn set_errors(self, input: Option<Vec<ErrorsListItem>>) -> Self
pub fn set_errors(self, input: Option<Vec<ErrorsListItem>>) -> Self
Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors.
sourcepub fn get_errors(&self) -> &Option<Vec<ErrorsListItem>>
pub fn get_errors(&self) -> &Option<Vec<ErrorsListItem>>
Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors.
sourcepub fn warnings(self, input: WarningsListItem) -> Self
pub fn warnings(self, input: WarningsListItem) -> Self
Appends an item to warnings
.
To override the contents of this collection use set_warnings
.
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.
The field is empty if the system generated no warnings.
sourcepub fn set_warnings(self, input: Option<Vec<WarningsListItem>>) -> Self
pub fn set_warnings(self, input: Option<Vec<WarningsListItem>>) -> Self
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.
The field is empty if the system generated no warnings.
sourcepub fn get_warnings(&self) -> &Option<Vec<WarningsListItem>>
pub fn get_warnings(&self) -> &Option<Vec<WarningsListItem>>
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.
The field is empty if the system generated no warnings.
sourcepub fn build(self) -> ClassifyDocumentOutput
pub fn build(self) -> ClassifyDocumentOutput
Consumes the builder and constructs a ClassifyDocumentOutput
.
Trait Implementations§
source§impl Clone for ClassifyDocumentOutputBuilder
impl Clone for ClassifyDocumentOutputBuilder
source§fn clone(&self) -> ClassifyDocumentOutputBuilder
fn clone(&self) -> ClassifyDocumentOutputBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for ClassifyDocumentOutputBuilder
impl Default for ClassifyDocumentOutputBuilder
source§fn default() -> ClassifyDocumentOutputBuilder
fn default() -> ClassifyDocumentOutputBuilder
source§impl PartialEq for ClassifyDocumentOutputBuilder
impl PartialEq for ClassifyDocumentOutputBuilder
source§fn eq(&self, other: &ClassifyDocumentOutputBuilder) -> bool
fn eq(&self, other: &ClassifyDocumentOutputBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.