#[non_exhaustive]pub struct CloneDatabaseMetadata {
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub operation_state: OperationState,
pub database: String,
pub pitr_snapshot: Option<PitrSnapshot>,
pub progress_percentage: Option<Progress>,
/* private fields */
}Expand description
Metadata for the long-running operation from the [CloneDatabase][google.firestore.admin.v1.CloneDatabase] request.
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.start_time: Option<Timestamp>The time the clone was started.
end_time: Option<Timestamp>The time the clone finished, unset for ongoing clones.
operation_state: OperationStateThe operation state of the clone.
database: StringThe name of the database being cloned to.
pitr_snapshot: Option<PitrSnapshot>The snapshot from which this database was cloned.
progress_percentage: Option<Progress>How far along the clone is as an estimated percentage of remaining time.
Implementations§
Source§impl CloneDatabaseMetadata
impl CloneDatabaseMetadata
pub fn new() -> Self
Sourcepub fn set_start_time<T>(self, v: T) -> Self
pub fn set_start_time<T>(self, v: T) -> Self
Sets the value of start_time.
§Example
ⓘ
use wkt::Timestamp;
let x = CloneDatabaseMetadata::new().set_start_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_time.
§Example
ⓘ
use wkt::Timestamp;
let x = CloneDatabaseMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
let x = CloneDatabaseMetadata::new().set_or_clear_start_time(None::<Timestamp>);Sourcepub fn set_end_time<T>(self, v: T) -> Self
pub fn set_end_time<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
Sourcepub fn set_operation_state<T: Into<OperationState>>(self, v: T) -> Self
pub fn set_operation_state<T: Into<OperationState>>(self, v: T) -> Self
Sets the value of operation_state.
§Example
ⓘ
use google_cloud_firestore_admin_v1::model::OperationState;
let x0 = CloneDatabaseMetadata::new().set_operation_state(OperationState::Initializing);
let x1 = CloneDatabaseMetadata::new().set_operation_state(OperationState::Processing);
let x2 = CloneDatabaseMetadata::new().set_operation_state(OperationState::Cancelling);Sourcepub fn set_database<T: Into<String>>(self, v: T) -> Self
pub fn set_database<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_pitr_snapshot<T>(self, v: T) -> Selfwhere
T: Into<PitrSnapshot>,
pub fn set_pitr_snapshot<T>(self, v: T) -> Selfwhere
T: Into<PitrSnapshot>,
Sets the value of pitr_snapshot.
§Example
ⓘ
use google_cloud_firestore_admin_v1::model::PitrSnapshot;
let x = CloneDatabaseMetadata::new().set_pitr_snapshot(PitrSnapshot::default()/* use setters */);Sourcepub fn set_or_clear_pitr_snapshot<T>(self, v: Option<T>) -> Selfwhere
T: Into<PitrSnapshot>,
pub fn set_or_clear_pitr_snapshot<T>(self, v: Option<T>) -> Selfwhere
T: Into<PitrSnapshot>,
Sets or clears the value of pitr_snapshot.
§Example
ⓘ
use google_cloud_firestore_admin_v1::model::PitrSnapshot;
let x = CloneDatabaseMetadata::new().set_or_clear_pitr_snapshot(Some(PitrSnapshot::default()/* use setters */));
let x = CloneDatabaseMetadata::new().set_or_clear_pitr_snapshot(None::<PitrSnapshot>);Sourcepub fn set_progress_percentage<T>(self, v: T) -> Self
pub fn set_progress_percentage<T>(self, v: T) -> Self
Sets the value of progress_percentage.
§Example
ⓘ
use google_cloud_firestore_admin_v1::model::Progress;
let x = CloneDatabaseMetadata::new().set_progress_percentage(Progress::default()/* use setters */);Sourcepub fn set_or_clear_progress_percentage<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_progress_percentage<T>(self, v: Option<T>) -> Self
Sets or clears the value of progress_percentage.
§Example
ⓘ
use google_cloud_firestore_admin_v1::model::Progress;
let x = CloneDatabaseMetadata::new().set_or_clear_progress_percentage(Some(Progress::default()/* use setters */));
let x = CloneDatabaseMetadata::new().set_or_clear_progress_percentage(None::<Progress>);Trait Implementations§
Source§impl Clone for CloneDatabaseMetadata
impl Clone for CloneDatabaseMetadata
Source§fn clone(&self) -> CloneDatabaseMetadata
fn clone(&self) -> CloneDatabaseMetadata
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 CloneDatabaseMetadata
impl Debug for CloneDatabaseMetadata
Source§impl Default for CloneDatabaseMetadata
impl Default for CloneDatabaseMetadata
Source§fn default() -> CloneDatabaseMetadata
fn default() -> CloneDatabaseMetadata
Returns the “default value” for a type. Read more
Source§impl Message for CloneDatabaseMetadata
impl Message for CloneDatabaseMetadata
Source§impl PartialEq for CloneDatabaseMetadata
impl PartialEq for CloneDatabaseMetadata
impl StructuralPartialEq for CloneDatabaseMetadata
Auto Trait Implementations§
impl !Freeze for CloneDatabaseMetadata
impl RefUnwindSafe for CloneDatabaseMetadata
impl Send for CloneDatabaseMetadata
impl Sync for CloneDatabaseMetadata
impl Unpin for CloneDatabaseMetadata
impl UnwindSafe for CloneDatabaseMetadata
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