#[non_exhaustive]pub struct Revision {
pub id: String,
pub parent: Vec<i32>,
pub parent_ids: Vec<String>,
pub create_time: Option<Timestamp>,
pub human_review: Option<HumanReview>,
pub source: Option<Source>,
/* private fields */
}Expand description
Contains past or forward revisions of this document.
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.id: StringId of the revision, internally generated by doc proto storage. Unique within the context of the document.
parent: Vec<i32>The revisions that this revision is based on. This can include one or
more parent (when documents are merged.) This field represents the
index into the revisions field.
parent_ids: Vec<String>The revisions that this revision is based on. Must include all the ids
that have anything to do with this revision - eg. there are
provenance.parent.revision fields that index into this field.
create_time: Option<Timestamp>The time that the revision was created, internally generated by doc proto storage at the time of create.
human_review: Option<HumanReview>Human Review information of this revision.
source: Option<Source>Who/what made the change
Implementations§
Source§impl Revision
impl Revision
Sourcepub fn set_parent<T, V>(self, v: T) -> Self
👎Deprecated
pub fn set_parent<T, V>(self, v: T) -> Self
Sourcepub fn set_parent_ids<T, V>(self, v: T) -> Self
pub fn set_parent_ids<T, V>(self, v: T) -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = Revision::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = Revision::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Revision::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_human_review<T>(self, v: T) -> Selfwhere
T: Into<HumanReview>,
pub fn set_human_review<T>(self, v: T) -> Selfwhere
T: Into<HumanReview>,
Sets the value of human_review.
§Example
use google_cloud_documentai_v1::model::document::revision::HumanReview;
let x = Revision::new().set_human_review(HumanReview::default()/* use setters */);Sourcepub fn set_or_clear_human_review<T>(self, v: Option<T>) -> Selfwhere
T: Into<HumanReview>,
pub fn set_or_clear_human_review<T>(self, v: Option<T>) -> Selfwhere
T: Into<HumanReview>,
Sets or clears the value of human_review.
§Example
use google_cloud_documentai_v1::model::document::revision::HumanReview;
let x = Revision::new().set_or_clear_human_review(Some(HumanReview::default()/* use setters */));
let x = Revision::new().set_or_clear_human_review(None::<HumanReview>);Sourcepub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
Sourcepub fn agent(&self) -> Option<&String>
pub fn agent(&self) -> Option<&String>
The value of source
if it holds a Agent, None if the field is not set or
holds a different branch.
Trait Implementations§
impl StructuralPartialEq for Revision
Auto Trait Implementations§
impl Freeze for Revision
impl RefUnwindSafe for Revision
impl Send for Revision
impl Sync for Revision
impl Unpin for Revision
impl UnsafeUnpin for Revision
impl UnwindSafe for Revision
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