#[non_exhaustive]pub struct DocumentReaderConfigBuilder { /* private fields */ }
Expand description
A builder for DocumentReaderConfig
.
Implementations§
source§impl DocumentReaderConfigBuilder
impl DocumentReaderConfigBuilder
sourcepub fn document_read_action(self, input: DocumentReadAction) -> Self
pub fn document_read_action(self, input: DocumentReadAction) -> Self
This field defines the Amazon Textract API operation that Amazon Comprehend uses to extract text from PDF files and image files. Enter one of the following values:
-
TEXTRACT_DETECT_DOCUMENT_TEXT
- The Amazon Comprehend service uses theDetectDocumentText
API operation. -
TEXTRACT_ANALYZE_DOCUMENT
- The Amazon Comprehend service uses theAnalyzeDocument
API operation.
sourcepub fn set_document_read_action(self, input: Option<DocumentReadAction>) -> Self
pub fn set_document_read_action(self, input: Option<DocumentReadAction>) -> Self
This field defines the Amazon Textract API operation that Amazon Comprehend uses to extract text from PDF files and image files. Enter one of the following values:
-
TEXTRACT_DETECT_DOCUMENT_TEXT
- The Amazon Comprehend service uses theDetectDocumentText
API operation. -
TEXTRACT_ANALYZE_DOCUMENT
- The Amazon Comprehend service uses theAnalyzeDocument
API operation.
sourcepub fn get_document_read_action(&self) -> &Option<DocumentReadAction>
pub fn get_document_read_action(&self) -> &Option<DocumentReadAction>
This field defines the Amazon Textract API operation that Amazon Comprehend uses to extract text from PDF files and image files. Enter one of the following values:
-
TEXTRACT_DETECT_DOCUMENT_TEXT
- The Amazon Comprehend service uses theDetectDocumentText
API operation. -
TEXTRACT_ANALYZE_DOCUMENT
- The Amazon Comprehend service uses theAnalyzeDocument
API operation.
sourcepub fn document_read_mode(self, input: DocumentReadMode) -> Self
pub fn document_read_mode(self, input: DocumentReadMode) -> Self
Determines the text extraction actions for PDF files. Enter one of the following values:
-
SERVICE_DEFAULT
- use the Amazon Comprehend service defaults for PDF files. -
FORCE_DOCUMENT_READ_ACTION
- Amazon Comprehend uses the Textract API specified by DocumentReadAction for all PDF files, including digital PDF files.
sourcepub fn set_document_read_mode(self, input: Option<DocumentReadMode>) -> Self
pub fn set_document_read_mode(self, input: Option<DocumentReadMode>) -> Self
Determines the text extraction actions for PDF files. Enter one of the following values:
-
SERVICE_DEFAULT
- use the Amazon Comprehend service defaults for PDF files. -
FORCE_DOCUMENT_READ_ACTION
- Amazon Comprehend uses the Textract API specified by DocumentReadAction for all PDF files, including digital PDF files.
sourcepub fn get_document_read_mode(&self) -> &Option<DocumentReadMode>
pub fn get_document_read_mode(&self) -> &Option<DocumentReadMode>
Determines the text extraction actions for PDF files. Enter one of the following values:
-
SERVICE_DEFAULT
- use the Amazon Comprehend service defaults for PDF files. -
FORCE_DOCUMENT_READ_ACTION
- Amazon Comprehend uses the Textract API specified by DocumentReadAction for all PDF files, including digital PDF files.
sourcepub fn feature_types(self, input: DocumentReadFeatureTypes) -> Self
pub fn feature_types(self, input: DocumentReadFeatureTypes) -> Self
Appends an item to feature_types
.
To override the contents of this collection use set_feature_types
.
Specifies the type of Amazon Textract features to apply. If you chose TEXTRACT_ANALYZE_DOCUMENT
as the read action, you must specify one or both of the following values:
-
TABLES
- Returns additional information about any tables that are detected in the input document. -
FORMS
- Returns additional information about any forms that are detected in the input document.
sourcepub fn set_feature_types(
self,
input: Option<Vec<DocumentReadFeatureTypes>>
) -> Self
pub fn set_feature_types( self, input: Option<Vec<DocumentReadFeatureTypes>> ) -> Self
Specifies the type of Amazon Textract features to apply. If you chose TEXTRACT_ANALYZE_DOCUMENT
as the read action, you must specify one or both of the following values:
-
TABLES
- Returns additional information about any tables that are detected in the input document. -
FORMS
- Returns additional information about any forms that are detected in the input document.
sourcepub fn get_feature_types(&self) -> &Option<Vec<DocumentReadFeatureTypes>>
pub fn get_feature_types(&self) -> &Option<Vec<DocumentReadFeatureTypes>>
Specifies the type of Amazon Textract features to apply. If you chose TEXTRACT_ANALYZE_DOCUMENT
as the read action, you must specify one or both of the following values:
-
TABLES
- Returns additional information about any tables that are detected in the input document. -
FORMS
- Returns additional information about any forms that are detected in the input document.
sourcepub fn build(self) -> Result<DocumentReaderConfig, BuildError>
pub fn build(self) -> Result<DocumentReaderConfig, BuildError>
Consumes the builder and constructs a DocumentReaderConfig
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for DocumentReaderConfigBuilder
impl Clone for DocumentReaderConfigBuilder
source§fn clone(&self) -> DocumentReaderConfigBuilder
fn clone(&self) -> DocumentReaderConfigBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DocumentReaderConfigBuilder
impl Debug for DocumentReaderConfigBuilder
source§impl Default for DocumentReaderConfigBuilder
impl Default for DocumentReaderConfigBuilder
source§fn default() -> DocumentReaderConfigBuilder
fn default() -> DocumentReaderConfigBuilder
source§impl PartialEq for DocumentReaderConfigBuilder
impl PartialEq for DocumentReaderConfigBuilder
source§fn eq(&self, other: &DocumentReaderConfigBuilder) -> bool
fn eq(&self, other: &DocumentReaderConfigBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for DocumentReaderConfigBuilder
Auto Trait Implementations§
impl Freeze for DocumentReaderConfigBuilder
impl RefUnwindSafe for DocumentReaderConfigBuilder
impl Send for DocumentReaderConfigBuilder
impl Sync for DocumentReaderConfigBuilder
impl Unpin for DocumentReaderConfigBuilder
impl UnwindSafe for DocumentReaderConfigBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more