#[non_exhaustive]pub struct DocumentMetadata {
pub matcher_value: Option<MatcherValue>,
pub state: State,
pub last_refreshed_time: Option<Timestamp>,
pub data_ingestion_source: String,
/* private fields */
}Available on crate feature
document-service only.Expand description
The metadata of a Document.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.matcher_value: Option<MatcherValue>The value of the matcher that was used to match the Document.
state: StateThe state of the document.
last_refreshed_time: Option<Timestamp>The timestamp of the last time the Document was last indexed.
data_ingestion_source: StringThe data ingestion source of the Document.
Allowed values are:
batch: Data ingested via Batch API, e.g., ImportDocuments.streamingData ingested via Streaming API, e.g., FHIR streaming.
Implementations§
Source§impl DocumentMetadata
impl DocumentMetadata
pub fn new() -> Self
Sourcepub fn set_matcher_value<T>(self, v: T) -> Selfwhere
T: Into<MatcherValue>,
pub fn set_matcher_value<T>(self, v: T) -> Selfwhere
T: Into<MatcherValue>,
Sets the value of matcher_value.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::batch_get_documents_metadata_response::document_metadata::MatcherValue;
let x = DocumentMetadata::new().set_matcher_value(MatcherValue::default()/* use setters */);Sourcepub fn set_or_clear_matcher_value<T>(self, v: Option<T>) -> Selfwhere
T: Into<MatcherValue>,
pub fn set_or_clear_matcher_value<T>(self, v: Option<T>) -> Selfwhere
T: Into<MatcherValue>,
Sets or clears the value of matcher_value.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::batch_get_documents_metadata_response::document_metadata::MatcherValue;
let x = DocumentMetadata::new().set_or_clear_matcher_value(Some(MatcherValue::default()/* use setters */));
let x = DocumentMetadata::new().set_or_clear_matcher_value(None::<MatcherValue>);Sourcepub fn set_state<T: Into<State>>(self, v: T) -> Self
pub fn set_state<T: Into<State>>(self, v: T) -> Self
Sets the value of state.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::batch_get_documents_metadata_response::State;
let x0 = DocumentMetadata::new().set_state(State::Indexed);
let x1 = DocumentMetadata::new().set_state(State::NotInTargetSite);
let x2 = DocumentMetadata::new().set_state(State::NotInIndex);Sourcepub fn set_last_refreshed_time<T>(self, v: T) -> Self
pub fn set_last_refreshed_time<T>(self, v: T) -> Self
Sets the value of last_refreshed_time.
§Example
ⓘ
use wkt::Timestamp;
let x = DocumentMetadata::new().set_last_refreshed_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_last_refreshed_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_last_refreshed_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of last_refreshed_time.
§Example
ⓘ
use wkt::Timestamp;
let x = DocumentMetadata::new().set_or_clear_last_refreshed_time(Some(Timestamp::default()/* use setters */));
let x = DocumentMetadata::new().set_or_clear_last_refreshed_time(None::<Timestamp>);Sourcepub fn set_data_ingestion_source<T: Into<String>>(self, v: T) -> Self
pub fn set_data_ingestion_source<T: Into<String>>(self, v: T) -> Self
Sets the value of data_ingestion_source.
§Example
ⓘ
let x = DocumentMetadata::new().set_data_ingestion_source("example");Trait Implementations§
Source§impl Clone for DocumentMetadata
impl Clone for DocumentMetadata
Source§fn clone(&self) -> DocumentMetadata
fn clone(&self) -> DocumentMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DocumentMetadata
impl Debug for DocumentMetadata
Source§impl Default for DocumentMetadata
impl Default for DocumentMetadata
Source§fn default() -> DocumentMetadata
fn default() -> DocumentMetadata
Returns the “default value” for a type. Read more
Source§impl Message for DocumentMetadata
impl Message for DocumentMetadata
Source§impl PartialEq for DocumentMetadata
impl PartialEq for DocumentMetadata
impl StructuralPartialEq for DocumentMetadata
Auto Trait Implementations§
impl Freeze for DocumentMetadata
impl RefUnwindSafe for DocumentMetadata
impl Send for DocumentMetadata
impl Sync for DocumentMetadata
impl Unpin for DocumentMetadata
impl UnwindSafe for DocumentMetadata
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
Mutably borrows from an owned value. Read more