#[non_exhaustive]pub struct ProcessRequest {
pub name: String,
pub skip_human_review: bool,
pub field_mask: Option<FieldMask>,
pub process_options: Option<ProcessOptions>,
pub labels: HashMap<String, String>,
pub imageless_mode: bool,
pub source: Option<Source>,
/* private fields */
}Expand description
Request message for the ProcessDocument method.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringRequired. The resource name of the
Processor or
ProcessorVersion
to use for processing. If a
Processor is specified, the server
will use its default
version.
Format: projects/{project}/locations/{location}/processors/{processor},
or
projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}
skip_human_review: boolWhether human review should be skipped for this request. Default to
false.
field_mask: Option<FieldMask>Specifies which fields to include in the
ProcessResponse.document
output. Only supports top-level document and pages field, so it must be in
the form of {document_field_name} or pages.{page_field_name}.
process_options: Option<ProcessOptions>Inference-time options for the process API
labels: HashMap<String, String>Optional. The labels with user-defined metadata for the request.
Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.
imageless_mode: boolOptional. Option to remove images from the document.
source: Option<Source>The document payload.
Implementations§
Source§impl ProcessRequest
impl ProcessRequest
pub fn new() -> Self
Sourcepub fn set_skip_human_review<T: Into<bool>>(self, v: T) -> Self
pub fn set_skip_human_review<T: Into<bool>>(self, v: T) -> Self
Sets the value of skip_human_review.
Sourcepub fn set_field_mask<T>(self, v: T) -> Self
pub fn set_field_mask<T>(self, v: T) -> Self
Sets the value of field_mask.
Sourcepub fn set_or_clear_field_mask<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_field_mask<T>(self, v: Option<T>) -> Self
Sets or clears the value of field_mask.
Sourcepub fn set_process_options<T>(self, v: T) -> Selfwhere
T: Into<ProcessOptions>,
pub fn set_process_options<T>(self, v: T) -> Selfwhere
T: Into<ProcessOptions>,
Sets the value of process_options.
Sourcepub fn set_or_clear_process_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<ProcessOptions>,
pub fn set_or_clear_process_options<T>(self, v: Option<T>) -> Selfwhere
T: Into<ProcessOptions>,
Sets or clears the value of process_options.
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sets the value of labels.
Sourcepub fn set_imageless_mode<T: Into<bool>>(self, v: T) -> Self
pub fn set_imageless_mode<T: Into<bool>>(self, v: T) -> Self
Sets the value of imageless_mode.
Sourcepub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
Sets the value of source.
Note that all the setters affecting source are mutually
exclusive.
Sourcepub fn inline_document(&self) -> Option<&Box<Document>>
pub fn inline_document(&self) -> Option<&Box<Document>>
The value of source
if it holds a InlineDocument, None if the field is not set or
holds a different branch.
Sourcepub fn set_inline_document<T: Into<Box<Document>>>(self, v: T) -> Self
pub fn set_inline_document<T: Into<Box<Document>>>(self, v: T) -> Self
Sets the value of source
to hold a InlineDocument.
Note that all the setters affecting source are
mutually exclusive.
Sourcepub fn raw_document(&self) -> Option<&Box<RawDocument>>
pub fn raw_document(&self) -> Option<&Box<RawDocument>>
The value of source
if it holds a RawDocument, None if the field is not set or
holds a different branch.
Sourcepub fn set_raw_document<T: Into<Box<RawDocument>>>(self, v: T) -> Self
pub fn set_raw_document<T: Into<Box<RawDocument>>>(self, v: T) -> Self
Sets the value of source
to hold a RawDocument.
Note that all the setters affecting source are
mutually exclusive.
Sourcepub fn gcs_document(&self) -> Option<&Box<GcsDocument>>
pub fn gcs_document(&self) -> Option<&Box<GcsDocument>>
The value of source
if it holds a GcsDocument, None if the field is not set or
holds a different branch.
Sourcepub fn set_gcs_document<T: Into<Box<GcsDocument>>>(self, v: T) -> Self
pub fn set_gcs_document<T: Into<Box<GcsDocument>>>(self, v: T) -> Self
Sets the value of source
to hold a GcsDocument.
Note that all the setters affecting source are
mutually exclusive.
Trait Implementations§
Source§impl Clone for ProcessRequest
impl Clone for ProcessRequest
Source§fn clone(&self) -> ProcessRequest
fn clone(&self) -> ProcessRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more