#[non_exhaustive]pub struct Source {
pub name: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub labels: HashMap<String, String>,
pub description: String,
pub encryption: Option<Encryption>,
pub source_details: Option<SourceDetails>,
/* private fields */
}Expand description
Source message describes a specific vm migration Source resource. It contains the source environment information.
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 Source name.
create_time: Option<Timestamp>Output only. The create time timestamp.
update_time: Option<Timestamp>Output only. The update time timestamp.
labels: HashMap<String, String>The labels of the source.
description: StringUser-provided description of the source.
encryption: Option<Encryption>Optional. Immutable. The encryption details of the source data stored by the service.
source_details: Option<SourceDetails>Implementations§
Source§impl Source
impl Source
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 = Source::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 = Source::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Source::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = Source::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = Source::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Source::new().set_or_clear_update_time(None::<Timestamp>);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_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(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 = Source::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 = Source::new().set_or_clear_encryption(Some(Encryption::default()/* use setters */));
let x = Source::new().set_or_clear_encryption(None::<Encryption>);Sourcepub fn set_source_details<T: Into<Option<SourceDetails>>>(self, v: T) -> Self
pub fn set_source_details<T: Into<Option<SourceDetails>>>(self, v: T) -> Self
Sets the value of source_details.
Note that all the setters affecting source_details are mutually
exclusive.
§Example
use google_cloud_vmmigration_v1::model::VmwareSourceDetails;
let x = Source::new().set_source_details(Some(
google_cloud_vmmigration_v1::model::source::SourceDetails::Vmware(VmwareSourceDetails::default().into())));Sourcepub fn vmware(&self) -> Option<&Box<VmwareSourceDetails>>
pub fn vmware(&self) -> Option<&Box<VmwareSourceDetails>>
The value of source_details
if it holds a Vmware, None if the field is not set or
holds a different branch.
Sourcepub fn set_vmware<T: Into<Box<VmwareSourceDetails>>>(self, v: T) -> Self
pub fn set_vmware<T: Into<Box<VmwareSourceDetails>>>(self, v: T) -> Self
Sets the value of source_details
to hold a Vmware.
Note that all the setters affecting source_details are
mutually exclusive.
§Example
use google_cloud_vmmigration_v1::model::VmwareSourceDetails;
let x = Source::new().set_vmware(VmwareSourceDetails::default()/* use setters */);
assert!(x.vmware().is_some());
assert!(x.aws().is_none());
assert!(x.azure().is_none());Sourcepub fn aws(&self) -> Option<&Box<AwsSourceDetails>>
pub fn aws(&self) -> Option<&Box<AwsSourceDetails>>
The value of source_details
if it holds a Aws, None if the field is not set or
holds a different branch.
Sourcepub fn set_aws<T: Into<Box<AwsSourceDetails>>>(self, v: T) -> Self
pub fn set_aws<T: Into<Box<AwsSourceDetails>>>(self, v: T) -> Self
Sets the value of source_details
to hold a Aws.
Note that all the setters affecting source_details are
mutually exclusive.
§Example
use google_cloud_vmmigration_v1::model::AwsSourceDetails;
let x = Source::new().set_aws(AwsSourceDetails::default()/* use setters */);
assert!(x.aws().is_some());
assert!(x.vmware().is_none());
assert!(x.azure().is_none());Sourcepub fn azure(&self) -> Option<&Box<AzureSourceDetails>>
pub fn azure(&self) -> Option<&Box<AzureSourceDetails>>
The value of source_details
if it holds a Azure, None if the field is not set or
holds a different branch.
Sourcepub fn set_azure<T: Into<Box<AzureSourceDetails>>>(self, v: T) -> Self
pub fn set_azure<T: Into<Box<AzureSourceDetails>>>(self, v: T) -> Self
Sets the value of source_details
to hold a Azure.
Note that all the setters affecting source_details are
mutually exclusive.
§Example
use google_cloud_vmmigration_v1::model::AzureSourceDetails;
let x = Source::new().set_azure(AzureSourceDetails::default()/* use setters */);
assert!(x.azure().is_some());
assert!(x.vmware().is_none());
assert!(x.aws().is_none());