#[non_exhaustive]pub struct Backup {
pub name: String,
pub source_table: String,
pub source_backup: String,
pub expire_time: Option<Timestamp>,
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub size_bytes: i64,
pub state: State,
pub encryption_info: Option<EncryptionInfo>,
pub backup_type: BackupType,
pub hot_to_standard_time: Option<Timestamp>,
/* private fields */
}Expand description
A backup of a Cloud Bigtable table.
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: StringA globally unique identifier for the backup which cannot be
changed. Values are of the form
projects/{project}/instances/{instance}/clusters/{cluster}/ backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*
The final segment of the name must be between 1 and 50 characters
in length.
The backup is stored in the cluster identified by the prefix of the backup
name of the form
projects/{project}/instances/{instance}/clusters/{cluster}.
source_table: StringRequired. Immutable. Name of the table 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}/tables/{source_table}.
source_backup: StringOutput only. Name of the backup from which this backup was copied. If a backup is not created by copying a backup, this field will be empty. Values are of the form: projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>
expire_time: Option<Timestamp>Required. The expiration time of the backup.
When creating a backup or updating its expire_time, the value must be
greater than the backup creation time by:
- At least 6 hours
- At most 90 days
Once the expire_time has passed, Cloud Bigtable will delete the backup.
start_time: Option<Timestamp>Output only. start_time is the time that the backup was started
(i.e. approximately the time the
CreateBackup
request is received). The row data in this backup will be no older than
this timestamp.
end_time: Option<Timestamp>Output only. end_time is the time that the backup was finished. The row
data in the backup will be no newer than this timestamp.
size_bytes: i64Output only. Size of the backup in bytes.
state: StateOutput only. The current state of the backup.
encryption_info: Option<EncryptionInfo>Output only. The encryption information for the backup.
backup_type: BackupTypeIndicates the backup type of the backup.
hot_to_standard_time: Option<Timestamp>The time at which the hot backup will be converted to a standard backup.
Once the hot_to_standard_time has passed, Cloud Bigtable will convert the
hot backup to a standard backup. This value must be greater than the backup
creation time by:
- At least 24 hours
This field only applies for hot backups. When creating or updating a standard backup, attempting to set this field will fail the request.
Implementations§
Source§impl Backup
impl Backup
pub fn new() -> Self
Sourcepub fn set_source_table<T: Into<String>>(self, v: T) -> Self
pub fn set_source_table<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_source_backup<T: Into<String>>(self, v: T) -> Self
pub fn set_source_backup<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_expire_time<T>(self, v: T) -> Self
pub fn set_expire_time<T>(self, v: T) -> Self
Sets the value of expire_time.
§Example
use wkt::Timestamp;
let x = Backup::new().set_expire_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_expire_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_expire_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of expire_time.
§Example
use wkt::Timestamp;
let x = Backup::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
let x = Backup::new().set_or_clear_expire_time(None::<Timestamp>);Sourcepub fn set_start_time<T>(self, v: T) -> Self
pub fn set_start_time<T>(self, v: T) -> Self
Sets the value of start_time.
§Example
use wkt::Timestamp;
let x = Backup::new().set_start_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_time.
§Example
use wkt::Timestamp;
let x = Backup::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
let x = Backup::new().set_or_clear_start_time(None::<Timestamp>);Sourcepub fn set_end_time<T>(self, v: T) -> Self
pub fn set_end_time<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
Sourcepub fn set_size_bytes<T: Into<i64>>(self, v: T) -> Self
pub fn set_size_bytes<T: Into<i64>>(self, v: T) -> Self
Sourcepub fn set_encryption_info<T>(self, v: T) -> Selfwhere
T: Into<EncryptionInfo>,
pub fn set_encryption_info<T>(self, v: T) -> Selfwhere
T: Into<EncryptionInfo>,
Sets the value of encryption_info.
§Example
use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
let x = Backup::new().set_encryption_info(EncryptionInfo::default()/* use setters */);Sourcepub fn set_or_clear_encryption_info<T>(self, v: Option<T>) -> Selfwhere
T: Into<EncryptionInfo>,
pub fn set_or_clear_encryption_info<T>(self, v: Option<T>) -> Selfwhere
T: Into<EncryptionInfo>,
Sets or clears the value of encryption_info.
§Example
use google_cloud_bigtable_admin_v2::model::EncryptionInfo;
let x = Backup::new().set_or_clear_encryption_info(Some(EncryptionInfo::default()/* use setters */));
let x = Backup::new().set_or_clear_encryption_info(None::<EncryptionInfo>);Sourcepub fn set_backup_type<T: Into<BackupType>>(self, v: T) -> Self
pub fn set_backup_type<T: Into<BackupType>>(self, v: T) -> Self
Sets the value of backup_type.
§Example
use google_cloud_bigtable_admin_v2::model::backup::BackupType;
let x0 = Backup::new().set_backup_type(BackupType::Standard);
let x1 = Backup::new().set_backup_type(BackupType::Hot);Sourcepub fn set_hot_to_standard_time<T>(self, v: T) -> Self
pub fn set_hot_to_standard_time<T>(self, v: T) -> Self
Sets the value of hot_to_standard_time.
§Example
use wkt::Timestamp;
let x = Backup::new().set_hot_to_standard_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_hot_to_standard_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_hot_to_standard_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of hot_to_standard_time.
§Example
use wkt::Timestamp;
let x = Backup::new().set_or_clear_hot_to_standard_time(Some(Timestamp::default()/* use setters */));
let x = Backup::new().set_or_clear_hot_to_standard_time(None::<Timestamp>);