#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReviewDocumentRequest
impl Debug for ReviewDocumentRequest
Source§impl Default for ReviewDocumentRequest
impl Default for ReviewDocumentRequest
Source§fn default() -> ReviewDocumentRequest
fn default() -> ReviewDocumentRequest
Source§impl Message for ReviewDocumentRequest
impl Message for ReviewDocumentRequest
Source§impl PartialEq for ReviewDocumentRequest
impl PartialEq for ReviewDocumentRequest
impl StructuralPartialEq for ReviewDocumentRequest
Auto Trait Implementations§
impl Freeze for ReviewDocumentRequest
impl RefUnwindSafe for ReviewDocumentRequest
impl Send for ReviewDocumentRequest
impl Sync for ReviewDocumentRequest
impl Unpin for ReviewDocumentRequest
impl UnsafeUnpin for ReviewDocumentRequest
impl UnwindSafe for ReviewDocumentRequest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request