Struct aws_sdk_comprehend::operation::classify_document::builders::ClassifyDocumentInputBuilder
source · #[non_exhaustive]pub struct ClassifyDocumentInputBuilder { /* private fields */ }
Expand description
A builder for ClassifyDocumentInput
.
Implementations§
source§impl ClassifyDocumentInputBuilder
impl ClassifyDocumentInputBuilder
sourcepub fn text(self, input: impl Into<String>) -> Self
pub fn text(self, input: impl Into<String>) -> Self
The document text to be analyzed. If you enter text using this parameter, do not use the Bytes
parameter.
sourcepub fn set_text(self, input: Option<String>) -> Self
pub fn set_text(self, input: Option<String>) -> Self
The document text to be analyzed. If you enter text using this parameter, do not use the Bytes
parameter.
sourcepub fn get_text(&self) -> &Option<String>
pub fn get_text(&self) -> &Option<String>
The document text to be analyzed. If you enter text using this parameter, do not use the Bytes
parameter.
sourcepub fn endpoint_arn(self, input: impl Into<String>) -> Self
pub fn endpoint_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Number (ARN) of the endpoint.
For prompt safety classification, Amazon Comprehend provides the endpoint ARN. For more information about prompt safety classifiers, see Prompt safety classification in the Amazon Comprehend Developer Guide
For custom classification, you create an endpoint for your custom model. For more information, see Using Amazon Comprehend endpoints.
This field is required.sourcepub fn set_endpoint_arn(self, input: Option<String>) -> Self
pub fn set_endpoint_arn(self, input: Option<String>) -> Self
The Amazon Resource Number (ARN) of the endpoint.
For prompt safety classification, Amazon Comprehend provides the endpoint ARN. For more information about prompt safety classifiers, see Prompt safety classification in the Amazon Comprehend Developer Guide
For custom classification, you create an endpoint for your custom model. For more information, see Using Amazon Comprehend endpoints.
sourcepub fn get_endpoint_arn(&self) -> &Option<String>
pub fn get_endpoint_arn(&self) -> &Option<String>
The Amazon Resource Number (ARN) of the endpoint.
For prompt safety classification, Amazon Comprehend provides the endpoint ARN. For more information about prompt safety classifiers, see Prompt safety classification in the Amazon Comprehend Developer Guide
For custom classification, you create an endpoint for your custom model. For more information, see Using Amazon Comprehend endpoints.
sourcepub fn bytes(self, input: Blob) -> Self
pub fn bytes(self, input: Blob) -> Self
Use the Bytes
parameter to input a text, PDF, Word or image file.
When you classify a document using a custom model, you can also use the Bytes
parameter to input an Amazon Textract DetectDocumentText
or AnalyzeDocument
output file.
To classify a document using the prompt safety classifier, use the Text
parameter for input.
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.
The maximum length of this field depends on the input document type. For details, see Inputs for real-time custom analysis in the Comprehend Developer Guide.
If you use the Bytes
parameter, do not use the Text
parameter.
sourcepub fn set_bytes(self, input: Option<Blob>) -> Self
pub fn set_bytes(self, input: Option<Blob>) -> Self
Use the Bytes
parameter to input a text, PDF, Word or image file.
When you classify a document using a custom model, you can also use the Bytes
parameter to input an Amazon Textract DetectDocumentText
or AnalyzeDocument
output file.
To classify a document using the prompt safety classifier, use the Text
parameter for input.
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.
The maximum length of this field depends on the input document type. For details, see Inputs for real-time custom analysis in the Comprehend Developer Guide.
If you use the Bytes
parameter, do not use the Text
parameter.
sourcepub fn get_bytes(&self) -> &Option<Blob>
pub fn get_bytes(&self) -> &Option<Blob>
Use the Bytes
parameter to input a text, PDF, Word or image file.
When you classify a document using a custom model, you can also use the Bytes
parameter to input an Amazon Textract DetectDocumentText
or AnalyzeDocument
output file.
To classify a document using the prompt safety classifier, use the Text
parameter for input.
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.
The maximum length of this field depends on the input document type. For details, see Inputs for real-time custom analysis in the Comprehend Developer Guide.
If you use the Bytes
parameter, do not use the Text
parameter.
sourcepub fn document_reader_config(self, input: DocumentReaderConfig) -> Self
pub fn document_reader_config(self, input: DocumentReaderConfig) -> Self
Provides configuration parameters to override the default actions for extracting text from PDF documents and image files.
sourcepub fn set_document_reader_config(
self,
input: Option<DocumentReaderConfig>
) -> Self
pub fn set_document_reader_config( self, input: Option<DocumentReaderConfig> ) -> Self
Provides configuration parameters to override the default actions for extracting text from PDF documents and image files.
sourcepub fn get_document_reader_config(&self) -> &Option<DocumentReaderConfig>
pub fn get_document_reader_config(&self) -> &Option<DocumentReaderConfig>
Provides configuration parameters to override the default actions for extracting text from PDF documents and image files.
sourcepub fn build(self) -> Result<ClassifyDocumentInput, BuildError>
pub fn build(self) -> Result<ClassifyDocumentInput, BuildError>
Consumes the builder and constructs a ClassifyDocumentInput
.
source§impl ClassifyDocumentInputBuilder
impl ClassifyDocumentInputBuilder
sourcepub async fn send_with(
self,
client: &Client
) -> Result<ClassifyDocumentOutput, SdkError<ClassifyDocumentError, HttpResponse>>
pub async fn send_with( self, client: &Client ) -> Result<ClassifyDocumentOutput, SdkError<ClassifyDocumentError, HttpResponse>>
Sends a request with this input using the given client.
Trait Implementations§
source§impl Clone for ClassifyDocumentInputBuilder
impl Clone for ClassifyDocumentInputBuilder
source§fn clone(&self) -> ClassifyDocumentInputBuilder
fn clone(&self) -> ClassifyDocumentInputBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ClassifyDocumentInputBuilder
impl Debug for ClassifyDocumentInputBuilder
source§impl Default for ClassifyDocumentInputBuilder
impl Default for ClassifyDocumentInputBuilder
source§fn default() -> ClassifyDocumentInputBuilder
fn default() -> ClassifyDocumentInputBuilder
source§impl PartialEq for ClassifyDocumentInputBuilder
impl PartialEq for ClassifyDocumentInputBuilder
source§fn eq(&self, other: &ClassifyDocumentInputBuilder) -> bool
fn eq(&self, other: &ClassifyDocumentInputBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.