#[non_exhaustive]pub struct RestoreDatabaseMetadata {
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub operation_state: OperationState,
pub database: String,
pub backup: String,
pub progress_percentage: Option<Progress>,
/* private fields */
}Expand description
Metadata for the long-running operation from the [RestoreDatabase][google.firestore.admin.v1.RestoreDatabase] 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 restore was started.
end_time: Option<Timestamp>The time the restore finished, unset for ongoing restores.
operation_state: OperationStateThe operation state of the restore.
database: StringThe name of the database being restored to.
backup: StringThe name of the backup restoring from.
progress_percentage: Option<Progress>How far along the restore is as an estimated percentage of remaining time.
Implementations§
Source§impl RestoreDatabaseMetadata
impl RestoreDatabaseMetadata
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 = RestoreDatabaseMetadata::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 = RestoreDatabaseMetadata::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
let x = RestoreDatabaseMetadata::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 = RestoreDatabaseMetadata::new().set_operation_state(OperationState::Initializing);
let x1 = RestoreDatabaseMetadata::new().set_operation_state(OperationState::Processing);
let x2 = RestoreDatabaseMetadata::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_backup<T: Into<String>>(self, v: T) -> Self
pub fn set_backup<T: Into<String>>(self, v: T) -> Self
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 = RestoreDatabaseMetadata::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 = RestoreDatabaseMetadata::new().set_or_clear_progress_percentage(Some(Progress::default()/* use setters */));
let x = RestoreDatabaseMetadata::new().set_or_clear_progress_percentage(None::<Progress>);Trait Implementations§
Source§impl Clone for RestoreDatabaseMetadata
impl Clone for RestoreDatabaseMetadata
Source§fn clone(&self) -> RestoreDatabaseMetadata
fn clone(&self) -> RestoreDatabaseMetadata
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 RestoreDatabaseMetadata
impl Debug for RestoreDatabaseMetadata
Source§impl Default for RestoreDatabaseMetadata
impl Default for RestoreDatabaseMetadata
Source§fn default() -> RestoreDatabaseMetadata
fn default() -> RestoreDatabaseMetadata
Returns the “default value” for a type. Read more
Source§impl Message for RestoreDatabaseMetadata
impl Message for RestoreDatabaseMetadata
Source§impl PartialEq for RestoreDatabaseMetadata
impl PartialEq for RestoreDatabaseMetadata
impl StructuralPartialEq for RestoreDatabaseMetadata
Auto Trait Implementations§
impl Freeze for RestoreDatabaseMetadata
impl RefUnwindSafe for RestoreDatabaseMetadata
impl Send for RestoreDatabaseMetadata
impl Sync for RestoreDatabaseMetadata
impl Unpin for RestoreDatabaseMetadata
impl UnwindSafe for RestoreDatabaseMetadata
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