#[non_exhaustive]pub struct DiskImageTargetDetails {
pub image_name: String,
pub target_project: String,
pub description: String,
pub family_name: String,
pub labels: HashMap<String, String>,
pub additional_licenses: Vec<String>,
pub single_region_storage: bool,
pub encryption: Option<Encryption>,
pub os_adaptation_config: Option<OsAdaptationConfig>,
/* private fields */
}Expand description
The target details of the image resource that will be created by the import job.
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.image_name: StringRequired. The name of the image to be created.
target_project: StringRequired. Reference to the TargetProject resource that represents the target project in which the imported image will be created.
description: StringOptional. An optional description of the image.
family_name: StringOptional. The name of the image family to which the new image belongs.
labels: HashMap<String, String>Optional. A map of labels to associate with the image.
additional_licenses: Vec<String>Optional. Additional licenses to assign to the image. Format: https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME Or https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME
single_region_storage: boolOptional. Set to true to set the image storageLocations to the single region of the import job. When false, the closest multi-region is selected.
encryption: Option<Encryption>Immutable. The encryption to apply to the image.
os_adaptation_config: Option<OsAdaptationConfig>Implementations§
Source§impl DiskImageTargetDetails
impl DiskImageTargetDetails
Sourcepub fn set_image_name<T: Into<String>>(self, v: T) -> Self
pub fn set_image_name<T: Into<String>>(self, v: T) -> Self
Sets the value of image_name.
§Example
let x = DiskImageTargetDetails::new().set_image_name("example");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 = DiskImageTargetDetails::new().set_target_project(format!("projects/{project_id}/locations/{location_id}/targetProjects/{target_project_id}"));Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sets the value of description.
§Example
let x = DiskImageTargetDetails::new().set_description("example");Sourcepub fn set_family_name<T: Into<String>>(self, v: T) -> Self
pub fn set_family_name<T: Into<String>>(self, v: T) -> Self
Sets the value of family_name.
§Example
let x = DiskImageTargetDetails::new().set_family_name("example");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_additional_licenses<T, V>(self, v: T) -> Self
pub fn set_additional_licenses<T, V>(self, v: T) -> Self
Sets the value of additional_licenses.
§Example
let x = DiskImageTargetDetails::new().set_additional_licenses(["a", "b", "c"]);Sourcepub fn set_single_region_storage<T: Into<bool>>(self, v: T) -> Self
pub fn set_single_region_storage<T: Into<bool>>(self, v: T) -> Self
Sets the value of single_region_storage.
§Example
let x = DiskImageTargetDetails::new().set_single_region_storage(true);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 = DiskImageTargetDetails::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 = DiskImageTargetDetails::new().set_or_clear_encryption(Some(Encryption::default()/* use setters */));
let x = DiskImageTargetDetails::new().set_or_clear_encryption(None::<Encryption>);Sourcepub fn set_os_adaptation_config<T: Into<Option<OsAdaptationConfig>>>(
self,
v: T,
) -> Self
pub fn set_os_adaptation_config<T: Into<Option<OsAdaptationConfig>>>( self, v: T, ) -> Self
Sets the value of os_adaptation_config.
Note that all the setters affecting os_adaptation_config are mutually
exclusive.
§Example
use google_cloud_vmmigration_v1::model::ImageImportOsAdaptationParameters;
let x = DiskImageTargetDetails::new().set_os_adaptation_config(Some(
google_cloud_vmmigration_v1::model::disk_image_target_details::OsAdaptationConfig::OsAdaptationParameters(ImageImportOsAdaptationParameters::default().into())));Sourcepub fn os_adaptation_parameters(
&self,
) -> Option<&Box<ImageImportOsAdaptationParameters>>
pub fn os_adaptation_parameters( &self, ) -> Option<&Box<ImageImportOsAdaptationParameters>>
The value of os_adaptation_config
if it holds a OsAdaptationParameters, None if the field is not set or
holds a different branch.
Sourcepub fn set_os_adaptation_parameters<T: Into<Box<ImageImportOsAdaptationParameters>>>(
self,
v: T,
) -> Self
pub fn set_os_adaptation_parameters<T: Into<Box<ImageImportOsAdaptationParameters>>>( self, v: T, ) -> Self
Sets the value of os_adaptation_config
to hold a OsAdaptationParameters.
Note that all the setters affecting os_adaptation_config are
mutually exclusive.
§Example
use google_cloud_vmmigration_v1::model::ImageImportOsAdaptationParameters;
let x = DiskImageTargetDetails::new().set_os_adaptation_parameters(ImageImportOsAdaptationParameters::default()/* use setters */);
assert!(x.os_adaptation_parameters().is_some());
assert!(x.data_disk_image_import().is_none());Sourcepub fn data_disk_image_import(&self) -> Option<&Box<DataDiskImageImport>>
pub fn data_disk_image_import(&self) -> Option<&Box<DataDiskImageImport>>
The value of os_adaptation_config
if it holds a DataDiskImageImport, None if the field is not set or
holds a different branch.
Sourcepub fn set_data_disk_image_import<T: Into<Box<DataDiskImageImport>>>(
self,
v: T,
) -> Self
pub fn set_data_disk_image_import<T: Into<Box<DataDiskImageImport>>>( self, v: T, ) -> Self
Sets the value of os_adaptation_config
to hold a DataDiskImageImport.
Note that all the setters affecting os_adaptation_config are
mutually exclusive.
§Example
use google_cloud_vmmigration_v1::model::DataDiskImageImport;
let x = DiskImageTargetDetails::new().set_data_disk_image_import(DataDiskImageImport::default()/* use setters */);
assert!(x.data_disk_image_import().is_some());
assert!(x.os_adaptation_parameters().is_none());Trait Implementations§
Source§impl Clone for DiskImageTargetDetails
impl Clone for DiskImageTargetDetails
Source§fn clone(&self) -> DiskImageTargetDetails
fn clone(&self) -> DiskImageTargetDetails
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 DiskImageTargetDetails
impl Debug for DiskImageTargetDetails
Source§impl Default for DiskImageTargetDetails
impl Default for DiskImageTargetDetails
Source§fn default() -> DiskImageTargetDetails
fn default() -> DiskImageTargetDetails
Source§impl Message for DiskImageTargetDetails
impl Message for DiskImageTargetDetails
Source§impl PartialEq for DiskImageTargetDetails
impl PartialEq for DiskImageTargetDetails
Source§fn eq(&self, other: &DiskImageTargetDetails) -> bool
fn eq(&self, other: &DiskImageTargetDetails) -> bool
self and other values to be equal, and is used by ==.