#[non_exhaustive]pub struct BackupSchedule {
pub name: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub retention: Option<Duration>,
pub recurrence: Option<Recurrence>,
/* private fields */
}Expand description
A backup schedule for a Cloud Firestore Database.
This resource is owned by the database it is backing up, and is deleted along with the database. The actual backups are not though.
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.name: StringOutput only. The unique backup schedule identifier across all locations and databases for the given project.
This will be auto-assigned.
Format is
projects/{project}/databases/{database}/backupSchedules/{backup_schedule}
create_time: Option<Timestamp>Output only. The timestamp at which this backup schedule was created and effective since.
No backups will be created for this schedule before this time.
update_time: Option<Timestamp>Output only. The timestamp at which this backup schedule was most recently updated. When a backup schedule is first created, this is the same as create_time.
retention: Option<Duration>At what relative time in the future, compared to its creation time, the backup should be deleted, e.g. keep backups for 7 days.
The maximum supported retention period is 14 weeks.
recurrence: Option<Recurrence>A oneof field to represent when backups will be taken.
Implementations§
Source§impl BackupSchedule
impl BackupSchedule
pub fn new() -> 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 = BackupSchedule::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 = BackupSchedule::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = BackupSchedule::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = BackupSchedule::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = BackupSchedule::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = BackupSchedule::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_retention<T>(self, v: T) -> Self
pub fn set_retention<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_retention<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_retention<T>(self, v: Option<T>) -> Self
Sourcepub fn set_recurrence<T: Into<Option<Recurrence>>>(self, v: T) -> Self
pub fn set_recurrence<T: Into<Option<Recurrence>>>(self, v: T) -> Self
Sets the value of recurrence.
Note that all the setters affecting recurrence are mutually
exclusive.
§Example
use google_cloud_firestore_admin_v1::model::DailyRecurrence;
let x = BackupSchedule::new().set_recurrence(Some(
google_cloud_firestore_admin_v1::model::backup_schedule::Recurrence::DailyRecurrence(DailyRecurrence::default().into())));Sourcepub fn daily_recurrence(&self) -> Option<&Box<DailyRecurrence>>
pub fn daily_recurrence(&self) -> Option<&Box<DailyRecurrence>>
The value of recurrence
if it holds a DailyRecurrence, None if the field is not set or
holds a different branch.
Sourcepub fn set_daily_recurrence<T: Into<Box<DailyRecurrence>>>(self, v: T) -> Self
pub fn set_daily_recurrence<T: Into<Box<DailyRecurrence>>>(self, v: T) -> Self
Sets the value of recurrence
to hold a DailyRecurrence.
Note that all the setters affecting recurrence are
mutually exclusive.
§Example
use google_cloud_firestore_admin_v1::model::DailyRecurrence;
let x = BackupSchedule::new().set_daily_recurrence(DailyRecurrence::default()/* use setters */);
assert!(x.daily_recurrence().is_some());
assert!(x.weekly_recurrence().is_none());Sourcepub fn weekly_recurrence(&self) -> Option<&Box<WeeklyRecurrence>>
pub fn weekly_recurrence(&self) -> Option<&Box<WeeklyRecurrence>>
The value of recurrence
if it holds a WeeklyRecurrence, None if the field is not set or
holds a different branch.
Sourcepub fn set_weekly_recurrence<T: Into<Box<WeeklyRecurrence>>>(self, v: T) -> Self
pub fn set_weekly_recurrence<T: Into<Box<WeeklyRecurrence>>>(self, v: T) -> Self
Sets the value of recurrence
to hold a WeeklyRecurrence.
Note that all the setters affecting recurrence are
mutually exclusive.
§Example
use google_cloud_firestore_admin_v1::model::WeeklyRecurrence;
let x = BackupSchedule::new().set_weekly_recurrence(WeeklyRecurrence::default()/* use setters */);
assert!(x.weekly_recurrence().is_some());
assert!(x.daily_recurrence().is_none());Trait Implementations§
Source§impl Clone for BackupSchedule
impl Clone for BackupSchedule
Source§fn clone(&self) -> BackupSchedule
fn clone(&self) -> BackupSchedule
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more