#[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
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
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
Sets the value of backup_vault.
§Example
let x = BackupConfig::new().set_backup_vault(format!("projects/{project_id}/locations/{location_id}/backupVaults/{backup_vault_id}"));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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
Source§impl Message for BackupConfig
impl Message for BackupConfig
Source§impl PartialEq for BackupConfig
impl PartialEq for BackupConfig
Source§fn eq(&self, other: &BackupConfig) -> bool
fn eq(&self, other: &BackupConfig) -> bool
self and other values to be equal, and is used by ==.