#[non_exhaustive]pub struct BackupSchedule {
pub name: String,
pub spec: Option<BackupScheduleSpec>,
pub retention_duration: Option<Duration>,
pub encryption_config: Option<CreateBackupEncryptionConfig>,
pub update_time: Option<Timestamp>,
pub backup_type_spec: Option<BackupTypeSpec>,
/* private fields */
}Expand description
BackupSchedule expresses the automated backup creation specification for a Spanner database. Next ID: 10
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: StringIdentifier. Output only for the
[CreateBackupSchedule][DatabaseAdmin.CreateBackupSchededule] operation.
Required for the
UpdateBackupSchedule
operation. A globally unique identifier for the backup schedule which
cannot be changed. Values are of the form
projects/<project>/instances/<instance>/databases/<database>/backupSchedules/[a-z][a-z0-9_\-]*[a-z0-9]
The final segment of the name must be between 2 and 60 characters in
length.
spec: Option<BackupScheduleSpec>Optional. The schedule specification based on which the backup creations are triggered.
retention_duration: Option<Duration>Optional. The retention duration of a backup that must be at least 6 hours and at most 366 days. The backup is eligible to be automatically deleted once the retention period has elapsed.
encryption_config: Option<CreateBackupEncryptionConfig>Optional. The encryption configuration that will be used to encrypt the backup. If this field is not specified, the backup will use the same encryption configuration as the database.
update_time: Option<Timestamp>Output only. The timestamp at which the schedule was last updated. If the schedule has never been updated, this field contains the timestamp when the schedule was first created.
backup_type_spec: Option<BackupTypeSpec>Required. Backup type spec determines the type of backup that is created by the backup schedule. Currently, only full backups are supported.
Implementations§
Source§impl BackupSchedule
impl BackupSchedule
pub fn new() -> Self
Sourcepub fn set_spec<T>(self, v: T) -> Selfwhere
T: Into<BackupScheduleSpec>,
pub fn set_spec<T>(self, v: T) -> Selfwhere
T: Into<BackupScheduleSpec>,
Sets the value of spec.
Sourcepub fn set_or_clear_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<BackupScheduleSpec>,
pub fn set_or_clear_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<BackupScheduleSpec>,
Sets or clears the value of spec.
Sourcepub fn set_retention_duration<T>(self, v: T) -> Self
pub fn set_retention_duration<T>(self, v: T) -> Self
Sets the value of retention_duration.
Sourcepub fn set_or_clear_retention_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_retention_duration<T>(self, v: Option<T>) -> Self
Sets or clears the value of retention_duration.
Sourcepub fn set_encryption_config<T>(self, v: T) -> Selfwhere
T: Into<CreateBackupEncryptionConfig>,
pub fn set_encryption_config<T>(self, v: T) -> Selfwhere
T: Into<CreateBackupEncryptionConfig>,
Sets the value of encryption_config.
Sourcepub fn set_or_clear_encryption_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<CreateBackupEncryptionConfig>,
pub fn set_or_clear_encryption_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<CreateBackupEncryptionConfig>,
Sets or clears the value of encryption_config.
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.
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.
Sourcepub fn set_backup_type_spec<T: Into<Option<BackupTypeSpec>>>(self, v: T) -> Self
pub fn set_backup_type_spec<T: Into<Option<BackupTypeSpec>>>(self, v: T) -> Self
Sets the value of backup_type_spec.
Note that all the setters affecting backup_type_spec are mutually
exclusive.
Sourcepub fn full_backup_spec(&self) -> Option<&Box<FullBackupSpec>>
pub fn full_backup_spec(&self) -> Option<&Box<FullBackupSpec>>
The value of backup_type_spec
if it holds a FullBackupSpec, None if the field is not set or
holds a different branch.
Sourcepub fn set_full_backup_spec<T: Into<Box<FullBackupSpec>>>(self, v: T) -> Self
pub fn set_full_backup_spec<T: Into<Box<FullBackupSpec>>>(self, v: T) -> Self
Sets the value of backup_type_spec
to hold a FullBackupSpec.
Note that all the setters affecting backup_type_spec are
mutually exclusive.
Sourcepub fn incremental_backup_spec(&self) -> Option<&Box<IncrementalBackupSpec>>
pub fn incremental_backup_spec(&self) -> Option<&Box<IncrementalBackupSpec>>
The value of backup_type_spec
if it holds a IncrementalBackupSpec, None if the field is not set or
holds a different branch.
Sourcepub fn set_incremental_backup_spec<T: Into<Box<IncrementalBackupSpec>>>(
self,
v: T,
) -> Self
pub fn set_incremental_backup_spec<T: Into<Box<IncrementalBackupSpec>>>( self, v: T, ) -> Self
Sets the value of backup_type_spec
to hold a IncrementalBackupSpec.
Note that all the setters affecting backup_type_spec are
mutually exclusive.
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