#[non_exhaustive]pub struct AutomatedBackupConfig {
pub automated_backup_mode: AutomatedBackupMode,
pub retention: Option<Duration>,
pub schedule: Option<Schedule>,
/* private fields */
}Expand description
The automated backup config for an instance.
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.automated_backup_mode: AutomatedBackupModeOptional. The automated backup mode. If the mode is disabled, the other fields will be ignored.
retention: Option<Duration>Optional. How long to keep automated backups before the backups are deleted. The value should be between 1 day and 365 days. If not specified, the default value is 35 days.
schedule: Option<Schedule>The schedule of automated backups.
Implementations§
Source§impl AutomatedBackupConfig
impl AutomatedBackupConfig
pub fn new() -> Self
Sourcepub fn set_automated_backup_mode<T: Into<AutomatedBackupMode>>(
self,
v: T,
) -> Self
pub fn set_automated_backup_mode<T: Into<AutomatedBackupMode>>( self, v: T, ) -> Self
Sets the value of automated_backup_mode.
§Example
ⓘ
use google_cloud_memorystore_v1::model::automated_backup_config::AutomatedBackupMode;
let x0 = AutomatedBackupConfig::new().set_automated_backup_mode(AutomatedBackupMode::Disabled);
let x1 = AutomatedBackupConfig::new().set_automated_backup_mode(AutomatedBackupMode::Enabled);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_schedule<T: Into<Option<Schedule>>>(self, v: T) -> Self
pub fn set_schedule<T: Into<Option<Schedule>>>(self, v: T) -> Self
Sets the value of schedule.
Note that all the setters affecting schedule are mutually
exclusive.
§Example
ⓘ
use google_cloud_memorystore_v1::model::automated_backup_config::FixedFrequencySchedule;
let x = AutomatedBackupConfig::new().set_schedule(Some(
google_cloud_memorystore_v1::model::automated_backup_config::Schedule::FixedFrequencySchedule(FixedFrequencySchedule::default().into())));Sourcepub fn fixed_frequency_schedule(&self) -> Option<&Box<FixedFrequencySchedule>>
pub fn fixed_frequency_schedule(&self) -> Option<&Box<FixedFrequencySchedule>>
The value of schedule
if it holds a FixedFrequencySchedule, None if the field is not set or
holds a different branch.
Sourcepub fn set_fixed_frequency_schedule<T: Into<Box<FixedFrequencySchedule>>>(
self,
v: T,
) -> Self
pub fn set_fixed_frequency_schedule<T: Into<Box<FixedFrequencySchedule>>>( self, v: T, ) -> Self
Sets the value of schedule
to hold a FixedFrequencySchedule.
Note that all the setters affecting schedule are
mutually exclusive.
§Example
ⓘ
use google_cloud_memorystore_v1::model::automated_backup_config::FixedFrequencySchedule;
let x = AutomatedBackupConfig::new().set_fixed_frequency_schedule(FixedFrequencySchedule::default()/* use setters */);
assert!(x.fixed_frequency_schedule().is_some());Trait Implementations§
Source§impl Clone for AutomatedBackupConfig
impl Clone for AutomatedBackupConfig
Source§fn clone(&self) -> AutomatedBackupConfig
fn clone(&self) -> AutomatedBackupConfig
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 AutomatedBackupConfig
impl Debug for AutomatedBackupConfig
Source§impl Default for AutomatedBackupConfig
impl Default for AutomatedBackupConfig
Source§fn default() -> AutomatedBackupConfig
fn default() -> AutomatedBackupConfig
Returns the “default value” for a type. Read more
Source§impl Message for AutomatedBackupConfig
impl Message for AutomatedBackupConfig
Source§impl PartialEq for AutomatedBackupConfig
impl PartialEq for AutomatedBackupConfig
impl StructuralPartialEq for AutomatedBackupConfig
Auto Trait Implementations§
impl Freeze for AutomatedBackupConfig
impl RefUnwindSafe for AutomatedBackupConfig
impl Send for AutomatedBackupConfig
impl Sync for AutomatedBackupConfig
impl Unpin for AutomatedBackupConfig
impl UnwindSafe for AutomatedBackupConfig
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