#[non_exhaustive]pub struct Snapshot {
pub name: String,
pub state: State,
pub state_details: String,
pub description: String,
pub used_bytes: f64,
pub create_time: Option<Timestamp>,
pub labels: HashMap<String, String>,
/* private fields */
}Expand description
Snapshot is a point-in-time version of a Volume’s content.
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.name: StringIdentifier. The resource name of the snapshot.
Format:
projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}.
state: StateOutput only. The snapshot state.
state_details: StringOutput only. State details of the storage pool
description: StringA description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected.
used_bytes: f64Output only. Current storage usage for the snapshot in bytes.
create_time: Option<Timestamp>Output only. The time when the snapshot was created.
labels: HashMap<String, String>Resource labels to represent user provided metadata.
Implementations§
Source§impl Snapshot
impl Snapshot
pub fn new() -> Self
Sourcepub fn set_state_details<T: Into<String>>(self, v: T) -> Self
pub fn set_state_details<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_used_bytes<T: Into<f64>>(self, v: T) -> Self
pub fn set_used_bytes<T: Into<f64>>(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>);Trait Implementations§
impl StructuralPartialEq for Snapshot
Auto Trait Implementations§
impl Freeze for Snapshot
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnsafeUnpin for Snapshot
impl UnwindSafe for Snapshot
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
Mutably borrows from an owned value. Read more