#[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
pub fn new() -> Self
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.