#[non_exhaustive]pub struct ImageImport {
pub name: String,
pub create_time: Option<Timestamp>,
pub recent_image_import_jobs: Vec<ImageImportJob>,
pub encryption: Option<Encryption>,
pub source: Option<Source>,
pub target_defaults: Option<TargetDefaults>,
/* private fields */
}Expand description
ImageImport describes the configuration of the image import to run.
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.name: StringOutput only. The resource path of the ImageImport.
create_time: Option<Timestamp>Output only. The time the image import was created.
recent_image_import_jobs: Vec<ImageImportJob>Output only. The result of the most recent runs for this ImageImport. All jobs for this ImageImport can be listed via ListImageImportJobs.
encryption: Option<Encryption>Immutable. The encryption details used by the image import process during the image adaptation for Compute Engine.
source: Option<Source>§target_defaults: Option<TargetDefaults>The configuration of the resources that will be created in GCP as a result of the ImageImport.
Implementations§
Source§impl ImageImport
impl ImageImport
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = ImageImport::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = ImageImport::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = ImageImport::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_recent_image_import_jobs<T, V>(self, v: T) -> Self
pub fn set_recent_image_import_jobs<T, V>(self, v: T) -> Self
Sets the value of recent_image_import_jobs.
§Example
use google_cloud_vmmigration_v1::model::ImageImportJob;
let x = ImageImport::new()
.set_recent_image_import_jobs([
ImageImportJob::default()/* use setters */,
ImageImportJob::default()/* use (different) setters */,
]);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 = ImageImport::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 = ImageImport::new().set_or_clear_encryption(Some(Encryption::default()/* use setters */));
let x = ImageImport::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
Sourcepub fn cloud_storage_uri(&self) -> Option<&String>
pub fn cloud_storage_uri(&self) -> Option<&String>
The value of source
if it holds a CloudStorageUri, None if the field is not set or
holds a different branch.
Sourcepub fn set_cloud_storage_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_cloud_storage_uri<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_target_defaults<T: Into<Option<TargetDefaults>>>(self, v: T) -> Self
pub fn set_target_defaults<T: Into<Option<TargetDefaults>>>(self, v: T) -> Self
Sets the value of target_defaults.
Note that all the setters affecting target_defaults are mutually
exclusive.
§Example
use google_cloud_vmmigration_v1::model::DiskImageTargetDetails;
let x = ImageImport::new().set_target_defaults(Some(
google_cloud_vmmigration_v1::model::image_import::TargetDefaults::DiskImageTargetDefaults(DiskImageTargetDetails::default().into())));Sourcepub fn disk_image_target_defaults(&self) -> Option<&Box<DiskImageTargetDetails>>
pub fn disk_image_target_defaults(&self) -> Option<&Box<DiskImageTargetDetails>>
The value of target_defaults
if it holds a DiskImageTargetDefaults, None if the field is not set or
holds a different branch.
Sourcepub fn set_disk_image_target_defaults<T: Into<Box<DiskImageTargetDetails>>>(
self,
v: T,
) -> Self
pub fn set_disk_image_target_defaults<T: Into<Box<DiskImageTargetDetails>>>( self, v: T, ) -> Self
Sets the value of target_defaults
to hold a DiskImageTargetDefaults.
Note that all the setters affecting target_defaults are
mutually exclusive.
§Example
use google_cloud_vmmigration_v1::model::DiskImageTargetDetails;
let x = ImageImport::new().set_disk_image_target_defaults(DiskImageTargetDetails::default()/* use setters */);
assert!(x.disk_image_target_defaults().is_some());
assert!(x.machine_image_target_defaults().is_none());Sourcepub fn machine_image_target_defaults(
&self,
) -> Option<&Box<MachineImageTargetDetails>>
pub fn machine_image_target_defaults( &self, ) -> Option<&Box<MachineImageTargetDetails>>
The value of target_defaults
if it holds a MachineImageTargetDefaults, None if the field is not set or
holds a different branch.
Sourcepub fn set_machine_image_target_defaults<T: Into<Box<MachineImageTargetDetails>>>(
self,
v: T,
) -> Self
pub fn set_machine_image_target_defaults<T: Into<Box<MachineImageTargetDetails>>>( self, v: T, ) -> Self
Sets the value of target_defaults
to hold a MachineImageTargetDefaults.
Note that all the setters affecting target_defaults are
mutually exclusive.
§Example
use google_cloud_vmmigration_v1::model::MachineImageTargetDetails;
let x = ImageImport::new().set_machine_image_target_defaults(MachineImageTargetDetails::default()/* use setters */);
assert!(x.machine_image_target_defaults().is_some());
assert!(x.disk_image_target_defaults().is_none());Trait Implementations§
Source§impl Clone for ImageImport
impl Clone for ImageImport
Source§fn clone(&self) -> ImageImport
fn clone(&self) -> ImageImport
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 ImageImport
impl Debug for ImageImport
Source§impl Default for ImageImport
impl Default for ImageImport
Source§fn default() -> ImageImport
fn default() -> ImageImport
Source§impl Message for ImageImport
impl Message for ImageImport
Source§impl PartialEq for ImageImport
impl PartialEq for ImageImport
Source§fn eq(&self, other: &ImageImport) -> bool
fn eq(&self, other: &ImageImport) -> bool
self and other values to be equal, and is used by ==.