#[non_exhaustive]pub struct ReviewDocumentRequest {
pub human_review_config: String,
pub enable_schema_validation: bool,
pub priority: Priority,
pub document_schema: Option<DocumentSchema>,
pub source: Option<Source>,
/* private fields */
}Expand description
Request message for the ReviewDocument 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.human_review_config: StringRequired. The resource name of the [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the document will be reviewed with.
enable_schema_validation: boolWhether the validation should be performed on the ad-hoc review request.
priority: PriorityThe priority of the human review task.
document_schema: Option<DocumentSchema>The document schema of the human review task.
source: Option<Source>The document payload.
Implementations§
Source§impl ReviewDocumentRequest
impl ReviewDocumentRequest
pub fn new() -> Self
Sourcepub fn set_human_review_config<T: Into<String>>(self, v: T) -> Self
pub fn set_human_review_config<T: Into<String>>(self, v: T) -> Self
Sets the value of human_review_config.
§Example
let x = ReviewDocumentRequest::new().set_human_review_config("example");Sourcepub fn set_enable_schema_validation<T: Into<bool>>(self, v: T) -> Self
pub fn set_enable_schema_validation<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_schema_validation.
§Example
let x = ReviewDocumentRequest::new().set_enable_schema_validation(true);Sourcepub fn set_priority<T: Into<Priority>>(self, v: T) -> Self
pub fn set_priority<T: Into<Priority>>(self, v: T) -> Self
Sourcepub fn set_document_schema<T>(self, v: T) -> Selfwhere
T: Into<DocumentSchema>,
pub fn set_document_schema<T>(self, v: T) -> Selfwhere
T: Into<DocumentSchema>,
Sets the value of document_schema.
§Example
use google_cloud_documentai_v1::model::DocumentSchema;
let x = ReviewDocumentRequest::new().set_document_schema(DocumentSchema::default()/* use setters */);Sourcepub fn set_or_clear_document_schema<T>(self, v: Option<T>) -> Selfwhere
T: Into<DocumentSchema>,
pub fn set_or_clear_document_schema<T>(self, v: Option<T>) -> Selfwhere
T: Into<DocumentSchema>,
Sets or clears the value of document_schema.
§Example
use google_cloud_documentai_v1::model::DocumentSchema;
let x = ReviewDocumentRequest::new().set_or_clear_document_schema(Some(DocumentSchema::default()/* use setters */));
let x = ReviewDocumentRequest::new().set_or_clear_document_schema(None::<DocumentSchema>);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.
§Example
use google_cloud_documentai_v1::model::Document;
let x = ReviewDocumentRequest::new().set_source(Some(
google_cloud_documentai_v1::model::review_document_request::Source::InlineDocument(Document::default().into())));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.
§Example
use google_cloud_documentai_v1::model::Document;
let x = ReviewDocumentRequest::new().set_inline_document(Document::default()/* use setters */);
assert!(x.inline_document().is_some());Trait Implementations§
Source§impl Clone for ReviewDocumentRequest
impl Clone for ReviewDocumentRequest
Source§fn clone(&self) -> ReviewDocumentRequest
fn clone(&self) -> ReviewDocumentRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more