#[non_exhaustive]
pub struct Backup {
Show 19 fields pub database: String, pub version_time: Option<Timestamp>, pub expire_time: Option<Timestamp>, pub name: String, pub create_time: Option<Timestamp>, pub size_bytes: i64, pub freeable_size_bytes: i64, pub exclusive_size_bytes: i64, pub state: State, pub referencing_databases: Vec<String>, pub encryption_info: Option<EncryptionInfo>, pub encryption_information: Vec<EncryptionInfo>, pub database_dialect: DatabaseDialect, pub referencing_backups: Vec<String>, pub max_expire_time: Option<Timestamp>, pub backup_schedules: Vec<String>, pub incremental_backup_chain_id: String, pub oldest_version_time: Option<Timestamp>, pub instance_partitions: Vec<BackupInstancePartition>,
}
Expand description

A backup of a Cloud Spanner database.

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.
§database: String

Required for the CreateBackup operation. Name of the database from which this backup was created. This needs to be in the same instance as the backup. Values are of the form projects/<project>/instances/<instance>/databases/<database>.

§version_time: Option<Timestamp>

The backup will contain an externally consistent copy of the database at the timestamp specified by version_time. If version_time is not specified, the system will set version_time to the create_time of the backup.

§expire_time: Option<Timestamp>

Required for the CreateBackup operation. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 366 days from the time the CreateBackup request is processed. Once the expire_time has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup.

§name: String

Output only for the CreateBackup operation. Required for the UpdateBackup operation.

A globally unique identifier for the backup which cannot be changed. Values are of the form projects/<project>/instances/<instance>/backups/[a-z][a-z0-9_\-]*[a-z0-9] The final segment of the name must be between 2 and 60 characters in length.

The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form projects/<project>/instances/<instance>.

§create_time: Option<Timestamp>

Output only. The time the CreateBackup request is received. If the request does not specify version_time, the version_time of the backup will be equivalent to the create_time.

§size_bytes: i64

Output only. Size of the backup in bytes.

§freeable_size_bytes: i64

Output only. The number of bytes that will be freed by deleting this backup. This value will be zero if, for example, this backup is part of an incremental backup chain and younger backups in the chain require that we keep its data. For backups not in an incremental backup chain, this is always the size of the backup. This value may change if backups on the same chain get created, deleted or expired.

§exclusive_size_bytes: i64

Output only. For a backup in an incremental backup chain, this is the storage space needed to keep the data that has changed since the previous backup. For all other backups, this is always the size of the backup. This value may change if backups on the same chain get deleted or expired.

This field can be used to calculate the total storage space used by a set of backups. For example, the total space used by all backups of a database can be computed by summing up this field.

§state: State

Output only. The current state of the backup.

§referencing_databases: Vec<String>

Output only. The names of the restored databases that reference the backup. The database names are of the form projects/<project>/instances/<instance>/databases/<database>. Referencing databases may exist in different instances. The existence of any referencing database prevents the backup from being deleted. When a restored database from the backup enters the READY state, the reference to the backup is removed.

§encryption_info: Option<EncryptionInfo>

Output only. The encryption information for the backup.

§encryption_information: Vec<EncryptionInfo>

Output only. The encryption information for the backup, whether it is protected by one or more KMS keys. The information includes all Cloud KMS key versions used to encrypt the backup. The encryption_status' field inside of each EncryptionInfo` is not populated. At least one of the key versions must be available for the backup to be restored. If a key version is revoked in the middle of a restore, the restore behavior is undefined.

§database_dialect: DatabaseDialect

Output only. The database dialect information for the backup.

§referencing_backups: Vec<String>

Output only. The names of the destination backups being created by copying this source backup. The backup names are of the form projects/<project>/instances/<instance>/backups/<backup>. Referencing backups may exist in different instances. The existence of any referencing backup prevents the backup from being deleted. When the copy operation is done (either successfully completed or cancelled or the destination backup is deleted), the reference to the backup is removed.

§max_expire_time: Option<Timestamp>

Output only. The max allowed expiration time of the backup, with microseconds granularity. A backup’s expiration time can be configured in multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or copying an existing backup, the expiration time specified must be less than Backup.max_expire_time.

§backup_schedules: Vec<String>

Output only. List of backup schedule URIs that are associated with creating this backup. This is only applicable for scheduled backups, and is empty for on-demand backups.

To optimize for storage, whenever possible, multiple schedules are collapsed together to create one backup. In such cases, this field captures the list of all backup schedule URIs that are associated with creating this backup. If collapsing is not done, then this field captures the single backup schedule URI associated with creating this backup.

§incremental_backup_chain_id: String

Output only. Populated only for backups in an incremental backup chain. Backups share the same chain id if and only if they belong to the same incremental backup chain. Use this field to determine which backups are part of the same incremental backup chain. The ordering of backups in the chain can be determined by ordering the backup version_time.

§oldest_version_time: Option<Timestamp>

Output only. Data deleted at a time older than this is guaranteed not to be retained in order to support this backup. For a backup in an incremental backup chain, this is the version time of the oldest backup that exists or ever existed in the chain. For all other backups, this is the version time of the backup. This field can be used to understand what data is being retained by the backup system.

§instance_partitions: Vec<BackupInstancePartition>

Output only. The instance partition(s) storing the backup.

This is the same as the list of the instance partition(s) that the database had footprint in at the backup’s version_time.

Implementations§

Source§

impl Backup

Source

pub fn new() -> Self

Source

pub fn set_database<T: Into<String>>(self, v: T) -> Self

Sets the value of database.

Source

pub fn set_version_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self

Sets the value of version_time.

Source

pub fn set_expire_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self

Sets the value of expire_time.

Source

pub fn set_name<T: Into<String>>(self, v: T) -> Self

Sets the value of name.

Source

pub fn set_create_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self

Sets the value of create_time.

Source

pub fn set_size_bytes<T: Into<i64>>(self, v: T) -> Self

Sets the value of size_bytes.

Source

pub fn set_freeable_size_bytes<T: Into<i64>>(self, v: T) -> Self

Sets the value of freeable_size_bytes.

Source

pub fn set_exclusive_size_bytes<T: Into<i64>>(self, v: T) -> Self

Sets the value of exclusive_size_bytes.

Source

pub fn set_state<T: Into<State>>(self, v: T) -> Self

Sets the value of state.

Source

pub fn set_encryption_info<T: Into<Option<EncryptionInfo>>>(self, v: T) -> Self

Sets the value of encryption_info.

Source

pub fn set_database_dialect<T: Into<DatabaseDialect>>(self, v: T) -> Self

Sets the value of database_dialect.

Source

pub fn set_max_expire_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self

Sets the value of max_expire_time.

Source

pub fn set_incremental_backup_chain_id<T: Into<String>>(self, v: T) -> Self

Sets the value of incremental_backup_chain_id.

Source

pub fn set_oldest_version_time<T: Into<Option<Timestamp>>>(self, v: T) -> Self

Sets the value of oldest_version_time.

Source

pub fn set_referencing_databases<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of referencing_databases.

Source

pub fn set_encryption_information<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<EncryptionInfo>,

Sets the value of encryption_information.

Source

pub fn set_referencing_backups<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of referencing_backups.

Source

pub fn set_backup_schedules<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of backup_schedules.

Source

pub fn set_instance_partitions<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<BackupInstancePartition>,

Sets the value of instance_partitions.

Trait Implementations§

Source§

impl Clone for Backup

Source§

fn clone(&self) -> Backup

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Backup

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Backup

Source§

fn default() -> Backup

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Backup
where Backup: Default,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Message for Backup

Source§

fn typename() -> &'static str

The typename of this message.
Source§

fn to_map(&self) -> Result<Map<String, Value>, AnyError>
where Self: Sized + Serialize,

Store the value into a JSON object.
Source§

fn from_map(map: &Map<String, Value>) -> Result<Self, AnyError>
where Self: DeserializeOwned,

Extract the value from a JSON object.
Source§

impl PartialEq for Backup

Source§

fn eq(&self, other: &Backup) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Backup

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Backup

Auto Trait Implementations§

§

impl Freeze for Backup

§

impl RefUnwindSafe for Backup

§

impl Send for Backup

§

impl Sync for Backup

§

impl Unpin for Backup

§

impl UnwindSafe for Backup

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T