#[non_exhaustive]pub struct ComputeEngineDisksTargetDefaults {
pub target_project: String,
pub disks: Vec<PersistentDiskDefaults>,
pub location: Option<Location>,
pub vm_target: Option<VmTarget>,
/* private fields */
}Expand description
ComputeEngineDisksTargetDefaults is a collection of details for creating Persistent Disks in a target Compute Engine project.
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.target_project: StringThe full path of the resource of type TargetProject which represents the Compute Engine project in which to create the Persistent Disks.
disks: Vec<PersistentDiskDefaults>The details of each Persistent Disk to create.
location: Option<Location>§vm_target: Option<VmTarget>Details of the VM to attach the disks to as the target of this migration.
Implementations§
Source§impl ComputeEngineDisksTargetDefaults
impl ComputeEngineDisksTargetDefaults
Sourcepub fn set_target_project<T: Into<String>>(self, v: T) -> Self
pub fn set_target_project<T: Into<String>>(self, v: T) -> Self
Sets the value of target_project.
§Example
let x = ComputeEngineDisksTargetDefaults::new().set_target_project(format!("projects/{project_id}/locations/{location_id}/targetProjects/{target_project_id}"));Sourcepub fn set_location<T: Into<Option<Location>>>(self, v: T) -> Self
pub fn set_location<T: Into<Option<Location>>>(self, v: T) -> Self
Sets the value of location.
Note that all the setters affecting location are mutually
exclusive.
§Example
use google_cloud_vmmigration_v1::model::compute_engine_disks_target_defaults::Location;
let x = ComputeEngineDisksTargetDefaults::new().set_location(Some(Location::Zone("example".to_string())));Sourcepub fn zone(&self) -> Option<&String>
pub fn zone(&self) -> Option<&String>
The value of location
if it holds a Zone, None if the field is not set or
holds a different branch.
Sourcepub fn set_vm_target<T: Into<Option<VmTarget>>>(self, v: T) -> Self
pub fn set_vm_target<T: Into<Option<VmTarget>>>(self, v: T) -> Self
Sets the value of vm_target.
Note that all the setters affecting vm_target are mutually
exclusive.
§Example
use google_cloud_vmmigration_v1::model::DisksMigrationDisksTargetDefaults;
let x = ComputeEngineDisksTargetDefaults::new().set_vm_target(Some(
google_cloud_vmmigration_v1::model::compute_engine_disks_target_defaults::VmTarget::DisksTargetDefaults(DisksMigrationDisksTargetDefaults::default().into())));Sourcepub fn disks_target_defaults(
&self,
) -> Option<&Box<DisksMigrationDisksTargetDefaults>>
pub fn disks_target_defaults( &self, ) -> Option<&Box<DisksMigrationDisksTargetDefaults>>
The value of vm_target
if it holds a DisksTargetDefaults, None if the field is not set or
holds a different branch.
Sourcepub fn set_disks_target_defaults<T: Into<Box<DisksMigrationDisksTargetDefaults>>>(
self,
v: T,
) -> Self
pub fn set_disks_target_defaults<T: Into<Box<DisksMigrationDisksTargetDefaults>>>( self, v: T, ) -> Self
Sets the value of vm_target
to hold a DisksTargetDefaults.
Note that all the setters affecting vm_target are
mutually exclusive.
§Example
use google_cloud_vmmigration_v1::model::DisksMigrationDisksTargetDefaults;
let x = ComputeEngineDisksTargetDefaults::new().set_disks_target_defaults(DisksMigrationDisksTargetDefaults::default()/* use setters */);
assert!(x.disks_target_defaults().is_some());
assert!(x.vm_target_defaults().is_none());Sourcepub fn vm_target_defaults(&self) -> Option<&Box<DisksMigrationVmTargetDefaults>>
pub fn vm_target_defaults(&self) -> Option<&Box<DisksMigrationVmTargetDefaults>>
The value of vm_target
if it holds a VmTargetDefaults, None if the field is not set or
holds a different branch.
Sourcepub fn set_vm_target_defaults<T: Into<Box<DisksMigrationVmTargetDefaults>>>(
self,
v: T,
) -> Self
pub fn set_vm_target_defaults<T: Into<Box<DisksMigrationVmTargetDefaults>>>( self, v: T, ) -> Self
Sets the value of vm_target
to hold a VmTargetDefaults.
Note that all the setters affecting vm_target are
mutually exclusive.
§Example
use google_cloud_vmmigration_v1::model::DisksMigrationVmTargetDefaults;
let x = ComputeEngineDisksTargetDefaults::new().set_vm_target_defaults(DisksMigrationVmTargetDefaults::default()/* use setters */);
assert!(x.vm_target_defaults().is_some());
assert!(x.disks_target_defaults().is_none());Trait Implementations§
Source§impl Clone for ComputeEngineDisksTargetDefaults
impl Clone for ComputeEngineDisksTargetDefaults
Source§fn clone(&self) -> ComputeEngineDisksTargetDefaults
fn clone(&self) -> ComputeEngineDisksTargetDefaults
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for ComputeEngineDisksTargetDefaults
impl Default for ComputeEngineDisksTargetDefaults
Source§fn default() -> ComputeEngineDisksTargetDefaults
fn default() -> ComputeEngineDisksTargetDefaults
Source§impl PartialEq for ComputeEngineDisksTargetDefaults
impl PartialEq for ComputeEngineDisksTargetDefaults
Source§fn eq(&self, other: &ComputeEngineDisksTargetDefaults) -> bool
fn eq(&self, other: &ComputeEngineDisksTargetDefaults) -> bool
self and other values to be equal, and is used by ==.