#[non_exhaustive]pub struct Snapshot {
pub name: String,
pub source_table: Option<Table>,
pub data_size_bytes: i64,
pub create_time: Option<Timestamp>,
pub delete_time: Option<Timestamp>,
pub state: State,
pub description: String,
/* private fields */
}Expand description
A snapshot of a table at a particular time. A snapshot can be used as a checkpoint for data restoration or a data source for a new table.
Note: This is a private alpha release of Cloud Bigtable snapshots. This feature is not currently available to most Cloud Bigtable customers. This feature might be changed in backward-incompatible ways and is not recommended for production use. It is not subject to any SLA or deprecation policy.
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: StringThe unique name of the snapshot.
Values are of the form
projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}.
source_table: Option<Table>Output only. The source table at the time the snapshot was taken.
data_size_bytes: i64Output only. The size of the data in the source table at the time the snapshot was taken. In some cases, this value may be computed asynchronously via a background process and a placeholder of 0 will be used in the meantime.
create_time: Option<Timestamp>Output only. The time when the snapshot is created.
delete_time: Option<Timestamp>The time when the snapshot will be deleted. The maximum amount of time a snapshot can stay active is 365 days. If ‘ttl’ is not specified, the default maximum of 365 days will be used.
state: StateOutput only. The current state of the snapshot.
description: StringDescription of the snapshot.
Implementations§
Source§impl Snapshot
impl Snapshot
pub fn new() -> Self
Sourcepub fn set_source_table<T>(self, v: T) -> Self
pub fn set_source_table<T>(self, v: T) -> Self
Sets the value of source_table.
§Example
use google_cloud_bigtable_admin_v2::model::Table;
let x = Snapshot::new().set_source_table(Table::default()/* use setters */);Sourcepub fn set_or_clear_source_table<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_source_table<T>(self, v: Option<T>) -> Self
Sets or clears the value of source_table.
§Example
use google_cloud_bigtable_admin_v2::model::Table;
let x = Snapshot::new().set_or_clear_source_table(Some(Table::default()/* use setters */));
let x = Snapshot::new().set_or_clear_source_table(None::<Table>);Sourcepub fn set_data_size_bytes<T: Into<i64>>(self, v: T) -> Self
pub fn set_data_size_bytes<T: Into<i64>>(self, v: T) -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = Snapshot::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = Snapshot::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Snapshot::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_delete_time<T>(self, v: T) -> Self
pub fn set_delete_time<T>(self, v: T) -> Self
Sets the value of delete_time.
§Example
use wkt::Timestamp;
let x = Snapshot::new().set_delete_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_delete_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_delete_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of delete_time.
§Example
use wkt::Timestamp;
let x = Snapshot::new().set_or_clear_delete_time(Some(Timestamp::default()/* use setters */));
let x = Snapshot::new().set_or_clear_delete_time(None::<Timestamp>);