#[non_exhaustive]pub struct PersistentDiskDefaults {
pub source_disk_number: i32,
pub disk_name: String,
pub disk_type: ComputeEngineDiskType,
pub additional_labels: HashMap<String, String>,
pub encryption: Option<Encryption>,
pub vm_attachment_details: Option<VmAttachmentDetails>,
/* private fields */
}Expand description
Details for creation of a Persistent Disk.
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.source_disk_number: i32Required. The ordinal number of the source VM disk.
disk_name: StringOptional. The name of the Persistent Disk to create.
disk_type: ComputeEngineDiskTypeThe disk type to use.
additional_labels: HashMap<String, String>A map of labels to associate with the Persistent Disk.
encryption: Option<Encryption>Optional. The encryption to apply to the disk.
vm_attachment_details: Option<VmAttachmentDetails>Optional. Details for attachment of the disk to a VM. Used when the disk is set to be attached to a target VM.
Implementations§
Source§impl PersistentDiskDefaults
impl PersistentDiskDefaults
Sourcepub fn set_source_disk_number<T: Into<i32>>(self, v: T) -> Self
pub fn set_source_disk_number<T: Into<i32>>(self, v: T) -> Self
Sets the value of source_disk_number.
§Example
ⓘ
let x = PersistentDiskDefaults::new().set_source_disk_number(42);Sourcepub fn set_disk_name<T: Into<String>>(self, v: T) -> Self
pub fn set_disk_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_disk_type<T: Into<ComputeEngineDiskType>>(self, v: T) -> Self
pub fn set_disk_type<T: Into<ComputeEngineDiskType>>(self, v: T) -> Self
Sets the value of disk_type.
§Example
ⓘ
use google_cloud_vmmigration_v1::model::ComputeEngineDiskType;
let x0 = PersistentDiskDefaults::new().set_disk_type(ComputeEngineDiskType::Standard);
let x1 = PersistentDiskDefaults::new().set_disk_type(ComputeEngineDiskType::Ssd);
let x2 = PersistentDiskDefaults::new().set_disk_type(ComputeEngineDiskType::Balanced);Sourcepub fn set_additional_labels<T, K, V>(self, v: T) -> Self
pub fn set_additional_labels<T, K, V>(self, v: T) -> Self
Sets the value of additional_labels.
§Example
ⓘ
let x = PersistentDiskDefaults::new().set_additional_labels([
("key0", "abc"),
("key1", "xyz"),
]);Sourcepub fn set_encryption<T>(self, v: T) -> Selfwhere
T: Into<Encryption>,
pub fn set_encryption<T>(self, v: T) -> Selfwhere
T: Into<Encryption>,
Sets the value of encryption.
§Example
ⓘ
use google_cloud_vmmigration_v1::model::Encryption;
let x = PersistentDiskDefaults::new().set_encryption(Encryption::default()/* use setters */);Sourcepub fn set_or_clear_encryption<T>(self, v: Option<T>) -> Selfwhere
T: Into<Encryption>,
pub fn set_or_clear_encryption<T>(self, v: Option<T>) -> Selfwhere
T: Into<Encryption>,
Sets or clears the value of encryption.
§Example
ⓘ
use google_cloud_vmmigration_v1::model::Encryption;
let x = PersistentDiskDefaults::new().set_or_clear_encryption(Some(Encryption::default()/* use setters */));
let x = PersistentDiskDefaults::new().set_or_clear_encryption(None::<Encryption>);Sourcepub fn set_vm_attachment_details<T>(self, v: T) -> Selfwhere
T: Into<VmAttachmentDetails>,
pub fn set_vm_attachment_details<T>(self, v: T) -> Selfwhere
T: Into<VmAttachmentDetails>,
Sets the value of vm_attachment_details.
§Example
ⓘ
use google_cloud_vmmigration_v1::model::VmAttachmentDetails;
let x = PersistentDiskDefaults::new().set_vm_attachment_details(VmAttachmentDetails::default()/* use setters */);Sourcepub fn set_or_clear_vm_attachment_details<T>(self, v: Option<T>) -> Selfwhere
T: Into<VmAttachmentDetails>,
pub fn set_or_clear_vm_attachment_details<T>(self, v: Option<T>) -> Selfwhere
T: Into<VmAttachmentDetails>,
Sets or clears the value of vm_attachment_details.
§Example
ⓘ
use google_cloud_vmmigration_v1::model::VmAttachmentDetails;
let x = PersistentDiskDefaults::new().set_or_clear_vm_attachment_details(Some(VmAttachmentDetails::default()/* use setters */));
let x = PersistentDiskDefaults::new().set_or_clear_vm_attachment_details(None::<VmAttachmentDetails>);Trait Implementations§
Source§impl Clone for PersistentDiskDefaults
impl Clone for PersistentDiskDefaults
Source§fn clone(&self) -> PersistentDiskDefaults
fn clone(&self) -> PersistentDiskDefaults
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PersistentDiskDefaults
impl Debug for PersistentDiskDefaults
Source§impl Default for PersistentDiskDefaults
impl Default for PersistentDiskDefaults
Source§fn default() -> PersistentDiskDefaults
fn default() -> PersistentDiskDefaults
Returns the “default value” for a type. Read more
Source§impl Message for PersistentDiskDefaults
impl Message for PersistentDiskDefaults
Source§impl PartialEq for PersistentDiskDefaults
impl PartialEq for PersistentDiskDefaults
Source§fn eq(&self, other: &PersistentDiskDefaults) -> bool
fn eq(&self, other: &PersistentDiskDefaults) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PersistentDiskDefaults
Auto Trait Implementations§
impl Freeze for PersistentDiskDefaults
impl RefUnwindSafe for PersistentDiskDefaults
impl Send for PersistentDiskDefaults
impl Sync for PersistentDiskDefaults
impl Unpin for PersistentDiskDefaults
impl UnsafeUnpin for PersistentDiskDefaults
impl UnwindSafe for PersistentDiskDefaults
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