#[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
Sourcepub fn set_spec<T>(self, v: T) -> Selfwhere
T: Into<BackupScheduleSpec>,
pub fn set_spec<T>(self, v: T) -> Selfwhere
T: Into<BackupScheduleSpec>,
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>,
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.
§Example
use wkt::Duration;
let x = BackupSchedule::new().set_retention_duration(Duration::default()/* use setters */);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.
§Example
use wkt::Duration;
let x = BackupSchedule::new().set_or_clear_retention_duration(Some(Duration::default()/* use setters */));
let x = BackupSchedule::new().set_or_clear_retention_duration(None::<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.
§Example
use google_cloud_spanner_admin_database_v1::model::CreateBackupEncryptionConfig;
let x = BackupSchedule::new().set_encryption_config(CreateBackupEncryptionConfig::default()/* use setters */);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.
§Example
use google_cloud_spanner_admin_database_v1::model::CreateBackupEncryptionConfig;
let x = BackupSchedule::new().set_or_clear_encryption_config(Some(CreateBackupEncryptionConfig::default()/* use setters */));
let x = BackupSchedule::new().set_or_clear_encryption_config(None::<CreateBackupEncryptionConfig>);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_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.
§Example
use google_cloud_spanner_admin_database_v1::model::FullBackupSpec;
let x = BackupSchedule::new().set_backup_type_spec(Some(
google_cloud_spanner_admin_database_v1::model::backup_schedule::BackupTypeSpec::FullBackupSpec(FullBackupSpec::default().into())));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.
§Example
use google_cloud_spanner_admin_database_v1::model::FullBackupSpec;
let x = BackupSchedule::new().set_full_backup_spec(FullBackupSpec::default()/* use setters */);
assert!(x.full_backup_spec().is_some());
assert!(x.incremental_backup_spec().is_none());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.
§Example
use google_cloud_spanner_admin_database_v1::model::IncrementalBackupSpec;
let x = BackupSchedule::new().set_incremental_backup_spec(IncrementalBackupSpec::default()/* use setters */);
assert!(x.incremental_backup_spec().is_some());
assert!(x.full_backup_spec().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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BackupSchedule
impl Debug for BackupSchedule
Source§impl Default for BackupSchedule
impl Default for BackupSchedule
Source§fn default() -> BackupSchedule
fn default() -> BackupSchedule
Source§impl Message for BackupSchedule
impl Message for BackupSchedule
Source§impl PartialEq for BackupSchedule
impl PartialEq for BackupSchedule
impl StructuralPartialEq for BackupSchedule
Auto Trait Implementations§
impl Freeze for BackupSchedule
impl RefUnwindSafe for BackupSchedule
impl Send for BackupSchedule
impl Sync for BackupSchedule
impl Unpin for BackupSchedule
impl UnsafeUnpin for BackupSchedule
impl UnwindSafe for BackupSchedule
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request