#[non_exhaustive]pub struct BootDiskDefaults {
pub disk_name: String,
pub disk_type: ComputeEngineDiskType,
pub device_name: String,
pub encryption: Option<Encryption>,
pub source: Option<Source>,
/* private fields */
}Expand description
BootDiskDefaults hold information about the boot disk of a VM.
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.disk_name: StringOptional. The name of the disk.
disk_type: ComputeEngineDiskTypeOptional. The type of disk provisioning to use for the VM.
device_name: StringOptional. Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.
encryption: Option<Encryption>Optional. The encryption to apply to the boot disk.
source: Option<Source>Implementations§
Source§impl BootDiskDefaults
impl BootDiskDefaults
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 = BootDiskDefaults::new().set_disk_type(ComputeEngineDiskType::Standard);
let x1 = BootDiskDefaults::new().set_disk_type(ComputeEngineDiskType::Ssd);
let x2 = BootDiskDefaults::new().set_disk_type(ComputeEngineDiskType::Balanced);Sourcepub fn set_device_name<T: Into<String>>(self, v: T) -> Self
pub fn set_device_name<T: Into<String>>(self, v: T) -> Self
Sets the value of device_name.
§Example
let x = BootDiskDefaults::new().set_device_name("example");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 = BootDiskDefaults::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 = BootDiskDefaults::new().set_or_clear_encryption(Some(Encryption::default()/* use setters */));
let x = BootDiskDefaults::new().set_or_clear_encryption(None::<Encryption>);Sourcepub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
Sets the value of source.
Note that all the setters affecting source are mutually
exclusive.
§Example
use google_cloud_vmmigration_v1::model::boot_disk_defaults::DiskImageDefaults;
let x = BootDiskDefaults::new().set_source(Some(
google_cloud_vmmigration_v1::model::boot_disk_defaults::Source::Image(DiskImageDefaults::default().into())));Sourcepub fn image(&self) -> Option<&Box<DiskImageDefaults>>
pub fn image(&self) -> Option<&Box<DiskImageDefaults>>
The value of source
if it holds a Image, None if the field is not set or
holds a different branch.
Sourcepub fn set_image<T: Into<Box<DiskImageDefaults>>>(self, v: T) -> Self
pub fn set_image<T: Into<Box<DiskImageDefaults>>>(self, v: T) -> Self
Sets the value of source
to hold a Image.
Note that all the setters affecting source are
mutually exclusive.
§Example
use google_cloud_vmmigration_v1::model::boot_disk_defaults::DiskImageDefaults;
let x = BootDiskDefaults::new().set_image(DiskImageDefaults::default()/* use setters */);
assert!(x.image().is_some());Trait Implementations§
Source§impl Clone for BootDiskDefaults
impl Clone for BootDiskDefaults
Source§fn clone(&self) -> BootDiskDefaults
fn clone(&self) -> BootDiskDefaults
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BootDiskDefaults
impl Debug for BootDiskDefaults
Source§impl Default for BootDiskDefaults
impl Default for BootDiskDefaults
Source§fn default() -> BootDiskDefaults
fn default() -> BootDiskDefaults
Source§impl Message for BootDiskDefaults
impl Message for BootDiskDefaults
Source§impl PartialEq for BootDiskDefaults
impl PartialEq for BootDiskDefaults
Source§fn eq(&self, other: &BootDiskDefaults) -> bool
fn eq(&self, other: &BootDiskDefaults) -> bool
self and other values to be equal, and is used by ==.