#[non_exhaustive]pub struct BackupConfig {
pub backup_policies: Vec<String>,
pub backup_vault: String,
pub scheduled_backup_enabled: Option<bool>,
pub backup_chain_bytes: Option<i64>,
/* private fields */
}Expand description
BackupConfig contains backup related config on a volume.
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.backup_policies: Vec<String>Optional. When specified, schedule backups will be created based on the policy configuration.
backup_vault: StringOptional. Name of backup vault. Format: projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}
scheduled_backup_enabled: Option<bool>Optional. When set to true, scheduled backup is enabled on the volume. This field should be nil when there’s no backup policy attached.
backup_chain_bytes: Option<i64>Output only. Total size of all backups in a chain in bytes = baseline backup size + sum(incremental backup size).
Implementations§
Source§impl BackupConfig
impl BackupConfig
pub fn new() -> Self
Sourcepub fn set_backup_policies<T, V>(self, v: T) -> Self
pub fn set_backup_policies<T, V>(self, v: T) -> Self
Sets the value of backup_policies.
§Example
ⓘ
let x = BackupConfig::new().set_backup_policies(["a", "b", "c"]);Sourcepub fn set_backup_vault<T: Into<String>>(self, v: T) -> Self
pub fn set_backup_vault<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_scheduled_backup_enabled<T>(self, v: T) -> Self
pub fn set_scheduled_backup_enabled<T>(self, v: T) -> Self
Sets the value of scheduled_backup_enabled.
§Example
ⓘ
let x = BackupConfig::new().set_scheduled_backup_enabled(true);Sourcepub fn set_or_clear_scheduled_backup_enabled<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_scheduled_backup_enabled<T>(self, v: Option<T>) -> Self
Sets or clears the value of scheduled_backup_enabled.
§Example
ⓘ
let x = BackupConfig::new().set_or_clear_scheduled_backup_enabled(Some(false));
let x = BackupConfig::new().set_or_clear_scheduled_backup_enabled(None::<bool>);Sourcepub fn set_backup_chain_bytes<T>(self, v: T) -> Self
pub fn set_backup_chain_bytes<T>(self, v: T) -> Self
Sets the value of backup_chain_bytes.
§Example
ⓘ
let x = BackupConfig::new().set_backup_chain_bytes(42);Sourcepub fn set_or_clear_backup_chain_bytes<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_backup_chain_bytes<T>(self, v: Option<T>) -> Self
Sets or clears the value of backup_chain_bytes.
§Example
ⓘ
let x = BackupConfig::new().set_or_clear_backup_chain_bytes(Some(42));
let x = BackupConfig::new().set_or_clear_backup_chain_bytes(None::<i32>);Trait Implementations§
Source§impl Clone for BackupConfig
impl Clone for BackupConfig
Source§fn clone(&self) -> BackupConfig
fn clone(&self) -> BackupConfig
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 BackupConfig
impl Debug for BackupConfig
Source§impl Default for BackupConfig
impl Default for BackupConfig
Source§fn default() -> BackupConfig
fn default() -> BackupConfig
Returns the “default value” for a type. Read more
Source§impl Message for BackupConfig
impl Message for BackupConfig
Source§impl PartialEq for BackupConfig
impl PartialEq for BackupConfig
impl StructuralPartialEq for BackupConfig
Auto Trait Implementations§
impl Freeze for BackupConfig
impl RefUnwindSafe for BackupConfig
impl Send for BackupConfig
impl Sync for BackupConfig
impl Unpin for BackupConfig
impl UnwindSafe for BackupConfig
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