#[non_exhaustive]pub struct CreateVolumeSnapshotRequest {
pub parent: String,
pub volume_snapshot: Option<VolumeSnapshot>,
/* private fields */
}Expand description
Message for creating a volume snapshot.
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.parent: StringRequired. The volume to snapshot.
volume_snapshot: Option<VolumeSnapshot>Required. The snapshot to create.
Implementations§
Source§impl CreateVolumeSnapshotRequest
impl CreateVolumeSnapshotRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_volume_snapshot<T>(self, v: T) -> Selfwhere
T: Into<VolumeSnapshot>,
pub fn set_volume_snapshot<T>(self, v: T) -> Selfwhere
T: Into<VolumeSnapshot>,
Sets the value of volume_snapshot.
§Example
ⓘ
use google_cloud_baremetalsolution_v2::model::VolumeSnapshot;
let x = CreateVolumeSnapshotRequest::new().set_volume_snapshot(VolumeSnapshot::default()/* use setters */);Sourcepub fn set_or_clear_volume_snapshot<T>(self, v: Option<T>) -> Selfwhere
T: Into<VolumeSnapshot>,
pub fn set_or_clear_volume_snapshot<T>(self, v: Option<T>) -> Selfwhere
T: Into<VolumeSnapshot>,
Sets or clears the value of volume_snapshot.
§Example
ⓘ
use google_cloud_baremetalsolution_v2::model::VolumeSnapshot;
let x = CreateVolumeSnapshotRequest::new().set_or_clear_volume_snapshot(Some(VolumeSnapshot::default()/* use setters */));
let x = CreateVolumeSnapshotRequest::new().set_or_clear_volume_snapshot(None::<VolumeSnapshot>);Trait Implementations§
Source§impl Clone for CreateVolumeSnapshotRequest
impl Clone for CreateVolumeSnapshotRequest
Source§fn clone(&self) -> CreateVolumeSnapshotRequest
fn clone(&self) -> CreateVolumeSnapshotRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateVolumeSnapshotRequest
impl Debug for CreateVolumeSnapshotRequest
Source§impl Default for CreateVolumeSnapshotRequest
impl Default for CreateVolumeSnapshotRequest
Source§fn default() -> CreateVolumeSnapshotRequest
fn default() -> CreateVolumeSnapshotRequest
Returns the “default value” for a type. Read more
impl StructuralPartialEq for CreateVolumeSnapshotRequest
Auto Trait Implementations§
impl Freeze for CreateVolumeSnapshotRequest
impl RefUnwindSafe for CreateVolumeSnapshotRequest
impl Send for CreateVolumeSnapshotRequest
impl Sync for CreateVolumeSnapshotRequest
impl Unpin for CreateVolumeSnapshotRequest
impl UnwindSafe for CreateVolumeSnapshotRequest
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