#[non_exhaustive]pub struct DiskMigrationJobTargetDetails {
pub target_project: String,
pub labels: HashMap<String, String>,
pub encryption: Option<Encryption>,
pub target_storage: Option<TargetStorage>,
/* private fields */
}Expand description
Details of the target disk in Compute Engine.
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: StringRequired. The name of the resource of type TargetProject which represents the Compute Engine project in which to create the disk. Should be of the form: projects/{project}/locations/global/targetProjects/{target-project}
labels: HashMap<String, String>Optional. A map of labels to associate with the disk.
encryption: Option<Encryption>Optional. The encryption to apply to the disk. If the DiskMigrationJob parent Source resource has an encryption, this field must be set to the same encryption key.
target_storage: Option<TargetStorage>The target storage.
Implementations§
Source§impl DiskMigrationJobTargetDetails
impl DiskMigrationJobTargetDetails
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 = DiskMigrationJobTargetDetails::new().set_target_project(format!("projects/{project_id}/locations/{location_id}/targetProjects/{target_project_id}"));Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
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 = DiskMigrationJobTargetDetails::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 = DiskMigrationJobTargetDetails::new().set_or_clear_encryption(Some(Encryption::default()/* use setters */));
let x = DiskMigrationJobTargetDetails::new().set_or_clear_encryption(None::<Encryption>);Sourcepub fn set_target_storage<T: Into<Option<TargetStorage>>>(self, v: T) -> Self
pub fn set_target_storage<T: Into<Option<TargetStorage>>>(self, v: T) -> Self
Sets the value of target_storage.
Note that all the setters affecting target_storage are mutually
exclusive.
§Example
use google_cloud_vmmigration_v1::model::ComputeEngineDisk;
let x = DiskMigrationJobTargetDetails::new().set_target_storage(Some(
google_cloud_vmmigration_v1::model::disk_migration_job_target_details::TargetStorage::TargetDisk(ComputeEngineDisk::default().into())));Sourcepub fn target_disk(&self) -> Option<&Box<ComputeEngineDisk>>
pub fn target_disk(&self) -> Option<&Box<ComputeEngineDisk>>
The value of target_storage
if it holds a TargetDisk, None if the field is not set or
holds a different branch.
Sourcepub fn set_target_disk<T: Into<Box<ComputeEngineDisk>>>(self, v: T) -> Self
pub fn set_target_disk<T: Into<Box<ComputeEngineDisk>>>(self, v: T) -> Self
Sets the value of target_storage
to hold a TargetDisk.
Note that all the setters affecting target_storage are
mutually exclusive.
§Example
use google_cloud_vmmigration_v1::model::ComputeEngineDisk;
let x = DiskMigrationJobTargetDetails::new().set_target_disk(ComputeEngineDisk::default()/* use setters */);
assert!(x.target_disk().is_some());Trait Implementations§
Source§impl Clone for DiskMigrationJobTargetDetails
impl Clone for DiskMigrationJobTargetDetails
Source§fn clone(&self) -> DiskMigrationJobTargetDetails
fn clone(&self) -> DiskMigrationJobTargetDetails
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 DiskMigrationJobTargetDetails
impl Default for DiskMigrationJobTargetDetails
Source§fn default() -> DiskMigrationJobTargetDetails
fn default() -> DiskMigrationJobTargetDetails
Source§impl PartialEq for DiskMigrationJobTargetDetails
impl PartialEq for DiskMigrationJobTargetDetails
Source§fn eq(&self, other: &DiskMigrationJobTargetDetails) -> bool
fn eq(&self, other: &DiskMigrationJobTargetDetails) -> bool
self and other values to be equal, and is used by ==.