Skip to main content

MigratingVm

Struct MigratingVm 

Source
#[non_exhaustive]
pub struct MigratingVm {
Show 21 fields pub name: String, pub source_vm_id: String, pub display_name: String, pub description: String, pub policy: Option<SchedulePolicy>, pub create_time: Option<Timestamp>, pub update_time: Option<Timestamp>, pub last_sync: Option<ReplicationSync>, pub state: State, pub state_time: Option<Timestamp>, pub current_sync_info: Option<ReplicationCycle>, pub last_replication_cycle: Option<ReplicationCycle>, pub group: String, pub labels: HashMap<String, String>, pub recent_clone_jobs: Vec<CloneJob>, pub error: Option<Status>, pub recent_cutover_jobs: Vec<CutoverJob>, pub cutover_forecast: Option<CutoverForecast>, pub expiration: Option<Expiration>, pub target_vm_defaults: Option<TargetVmDefaults>, pub source_vm_details: Option<SourceVmDetails>, /* private fields */
}
Expand description

MigratingVm describes the VM that will be migrated from a Source environment and its replication state.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§name: String

Output only. The identifier of the MigratingVm.

§source_vm_id: String

The unique ID of the VM in the source. The VM’s name in vSphere can be changed, so this is not the VM’s name but rather its moRef id. This id is of the form vm-<num>.

§display_name: String

The display name attached to the MigratingVm by the user.

§description: String

The description attached to the migrating VM by the user.

§policy: Option<SchedulePolicy>

The replication schedule policy.

§create_time: Option<Timestamp>

Output only. The time the migrating VM was created (this refers to this resource and not to the time it was installed in the source).

§update_time: Option<Timestamp>

Output only. The last time the migrating VM resource was updated.

§last_sync: Option<ReplicationSync>

Output only. The most updated snapshot created time in the source that finished replication.

§state: State

Output only. State of the MigratingVm.

§state_time: Option<Timestamp>

Output only. The last time the migrating VM state was updated.

§current_sync_info: Option<ReplicationCycle>

Output only. Details of the current running replication cycle.

§last_replication_cycle: Option<ReplicationCycle>

Output only. Details of the last replication cycle. This will be updated whenever a replication cycle is finished and is not to be confused with last_sync which is only updated on successful replication cycles.

§group: String

Output only. The group this migrating vm is included in, if any. The group is represented by the full path of the appropriate Group resource.

§labels: HashMap<String, String>

The labels of the migrating VM.

§recent_clone_jobs: Vec<CloneJob>

Output only. The recent clone jobs performed on the migrating VM. This field holds the vm’s last completed clone job and the vm’s running clone job, if one exists. Note: To have this field populated you need to explicitly request it via the “view” parameter of the Get/List request.

§error: Option<Status>

Output only. Provides details on the state of the Migrating VM in case of an error in replication.

§recent_cutover_jobs: Vec<CutoverJob>

Output only. The recent cutover jobs performed on the migrating VM. This field holds the vm’s last completed cutover job and the vm’s running cutover job, if one exists. Note: To have this field populated you need to explicitly request it via the “view” parameter of the Get/List request.

§cutover_forecast: Option<CutoverForecast>

Output only. Provides details of future CutoverJobs of a MigratingVm. Set to empty when cutover forecast is unavailable.

§expiration: Option<Expiration>

Output only. Provides details about the expiration state of the migrating VM.

§target_vm_defaults: Option<TargetVmDefaults>

The default configuration of the target VM that will be created in Google Cloud as a result of the migration.

§source_vm_details: Option<SourceVmDetails>

Details about the source VM.

Implementations§

Source§

impl MigratingVm

Source

pub fn new() -> Self

Creates a new default instance.

Source

pub fn set_name<T: Into<String>>(self, v: T) -> Self

Sets the value of name.

§Example
let x = MigratingVm::new().set_name(format!("projects/{project_id}/locations/{location_id}/sources/{source_id}/migratingVms/{migrating_vm_id}"));
Source

pub fn set_source_vm_id<T: Into<String>>(self, v: T) -> Self

Sets the value of source_vm_id.

§Example
let x = MigratingVm::new().set_source_vm_id("example");
Source

pub fn set_display_name<T: Into<String>>(self, v: T) -> Self

Sets the value of display_name.

§Example
let x = MigratingVm::new().set_display_name("example");
Source

pub fn set_description<T: Into<String>>(self, v: T) -> Self

Sets the value of description.

§Example
let x = MigratingVm::new().set_description("example");
Source

pub fn set_policy<T>(self, v: T) -> Self
where T: Into<SchedulePolicy>,

Sets the value of policy.

§Example
use google_cloud_vmmigration_v1::model::SchedulePolicy;
let x = MigratingVm::new().set_policy(SchedulePolicy::default()/* use setters */);
Source

pub fn set_or_clear_policy<T>(self, v: Option<T>) -> Self
where T: Into<SchedulePolicy>,

Sets or clears the value of policy.

§Example
use google_cloud_vmmigration_v1::model::SchedulePolicy;
let x = MigratingVm::new().set_or_clear_policy(Some(SchedulePolicy::default()/* use setters */));
let x = MigratingVm::new().set_or_clear_policy(None::<SchedulePolicy>);
Source

pub fn set_create_time<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of create_time.

§Example
use wkt::Timestamp;
let x = MigratingVm::new().set_create_time(Timestamp::default()/* use setters */);
Source

pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
where T: Into<Timestamp>,

Sets or clears the value of create_time.

§Example
use wkt::Timestamp;
let x = MigratingVm::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = MigratingVm::new().set_or_clear_create_time(None::<Timestamp>);
Source

pub fn set_update_time<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of update_time.

§Example
use wkt::Timestamp;
let x = MigratingVm::new().set_update_time(Timestamp::default()/* use setters */);
Source

pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
where T: Into<Timestamp>,

Sets or clears the value of update_time.

§Example
use wkt::Timestamp;
let x = MigratingVm::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = MigratingVm::new().set_or_clear_update_time(None::<Timestamp>);
Source

pub fn set_last_sync<T>(self, v: T) -> Self

Sets the value of last_sync.

§Example
use google_cloud_vmmigration_v1::model::ReplicationSync;
let x = MigratingVm::new().set_last_sync(ReplicationSync::default()/* use setters */);
Source

pub fn set_or_clear_last_sync<T>(self, v: Option<T>) -> Self

Sets or clears the value of last_sync.

§Example
use google_cloud_vmmigration_v1::model::ReplicationSync;
let x = MigratingVm::new().set_or_clear_last_sync(Some(ReplicationSync::default()/* use setters */));
let x = MigratingVm::new().set_or_clear_last_sync(None::<ReplicationSync>);
Source

pub fn set_state<T: Into<State>>(self, v: T) -> Self

Sets the value of state.

§Example
use google_cloud_vmmigration_v1::model::migrating_vm::State;
let x0 = MigratingVm::new().set_state(State::Pending);
let x1 = MigratingVm::new().set_state(State::Ready);
let x2 = MigratingVm::new().set_state(State::FirstSync);
Source

pub fn set_state_time<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of state_time.

§Example
use wkt::Timestamp;
let x = MigratingVm::new().set_state_time(Timestamp::default()/* use setters */);
Source

pub fn set_or_clear_state_time<T>(self, v: Option<T>) -> Self
where T: Into<Timestamp>,

Sets or clears the value of state_time.

§Example
use wkt::Timestamp;
let x = MigratingVm::new().set_or_clear_state_time(Some(Timestamp::default()/* use setters */));
let x = MigratingVm::new().set_or_clear_state_time(None::<Timestamp>);
Source

pub fn set_current_sync_info<T>(self, v: T) -> Self

Sets the value of current_sync_info.

§Example
use google_cloud_vmmigration_v1::model::ReplicationCycle;
let x = MigratingVm::new().set_current_sync_info(ReplicationCycle::default()/* use setters */);
Source

pub fn set_or_clear_current_sync_info<T>(self, v: Option<T>) -> Self

Sets or clears the value of current_sync_info.

§Example
use google_cloud_vmmigration_v1::model::ReplicationCycle;
let x = MigratingVm::new().set_or_clear_current_sync_info(Some(ReplicationCycle::default()/* use setters */));
let x = MigratingVm::new().set_or_clear_current_sync_info(None::<ReplicationCycle>);
Source

pub fn set_last_replication_cycle<T>(self, v: T) -> Self

Sets the value of last_replication_cycle.

§Example
use google_cloud_vmmigration_v1::model::ReplicationCycle;
let x = MigratingVm::new().set_last_replication_cycle(ReplicationCycle::default()/* use setters */);
Source

pub fn set_or_clear_last_replication_cycle<T>(self, v: Option<T>) -> Self

Sets or clears the value of last_replication_cycle.

§Example
use google_cloud_vmmigration_v1::model::ReplicationCycle;
let x = MigratingVm::new().set_or_clear_last_replication_cycle(Some(ReplicationCycle::default()/* use setters */));
let x = MigratingVm::new().set_or_clear_last_replication_cycle(None::<ReplicationCycle>);
Source

pub fn set_group<T: Into<String>>(self, v: T) -> Self

Sets the value of group.

§Example
let x = MigratingVm::new().set_group(format!("projects/{project_id}/locations/{location_id}"));
Source

pub fn set_labels<T, K, V>(self, v: T) -> Self
where T: IntoIterator<Item = (K, V)>, K: Into<String>, V: Into<String>,

Sets the value of labels.

§Example
let x = MigratingVm::new().set_labels([
    ("key0", "abc"),
    ("key1", "xyz"),
]);
Source

pub fn set_recent_clone_jobs<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<CloneJob>,

Sets the value of recent_clone_jobs.

§Example
use google_cloud_vmmigration_v1::model::CloneJob;
let x = MigratingVm::new()
    .set_recent_clone_jobs([
        CloneJob::default()/* use setters */,
        CloneJob::default()/* use (different) setters */,
    ]);
Source

pub fn set_error<T>(self, v: T) -> Self
where T: Into<Status>,

Sets the value of error.

§Example
use google_cloud_rpc::model::Status;
let x = MigratingVm::new().set_error(Status::default()/* use setters */);
Source

pub fn set_or_clear_error<T>(self, v: Option<T>) -> Self
where T: Into<Status>,

Sets or clears the value of error.

§Example
use google_cloud_rpc::model::Status;
let x = MigratingVm::new().set_or_clear_error(Some(Status::default()/* use setters */));
let x = MigratingVm::new().set_or_clear_error(None::<Status>);
Source

pub fn set_recent_cutover_jobs<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<CutoverJob>,

Sets the value of recent_cutover_jobs.

§Example
use google_cloud_vmmigration_v1::model::CutoverJob;
let x = MigratingVm::new()
    .set_recent_cutover_jobs([
        CutoverJob::default()/* use setters */,
        CutoverJob::default()/* use (different) setters */,
    ]);
Source

pub fn set_cutover_forecast<T>(self, v: T) -> Self

Sets the value of cutover_forecast.

§Example
use google_cloud_vmmigration_v1::model::CutoverForecast;
let x = MigratingVm::new().set_cutover_forecast(CutoverForecast::default()/* use setters */);
Source

pub fn set_or_clear_cutover_forecast<T>(self, v: Option<T>) -> Self

Sets or clears the value of cutover_forecast.

§Example
use google_cloud_vmmigration_v1::model::CutoverForecast;
let x = MigratingVm::new().set_or_clear_cutover_forecast(Some(CutoverForecast::default()/* use setters */));
let x = MigratingVm::new().set_or_clear_cutover_forecast(None::<CutoverForecast>);
Source

pub fn set_expiration<T>(self, v: T) -> Self
where T: Into<Expiration>,

Sets the value of expiration.

§Example
use google_cloud_vmmigration_v1::model::migrating_vm::Expiration;
let x = MigratingVm::new().set_expiration(Expiration::default()/* use setters */);
Source

pub fn set_or_clear_expiration<T>(self, v: Option<T>) -> Self
where T: Into<Expiration>,

Sets or clears the value of expiration.

§Example
use google_cloud_vmmigration_v1::model::migrating_vm::Expiration;
let x = MigratingVm::new().set_or_clear_expiration(Some(Expiration::default()/* use setters */));
let x = MigratingVm::new().set_or_clear_expiration(None::<Expiration>);
Source

pub fn set_target_vm_defaults<T: Into<Option<TargetVmDefaults>>>( self, v: T, ) -> Self

Sets the value of target_vm_defaults.

Note that all the setters affecting target_vm_defaults are mutually exclusive.

§Example
use google_cloud_vmmigration_v1::model::ComputeEngineTargetDefaults;
let x = MigratingVm::new().set_target_vm_defaults(Some(
    google_cloud_vmmigration_v1::model::migrating_vm::TargetVmDefaults::ComputeEngineTargetDefaults(ComputeEngineTargetDefaults::default().into())));
Source

pub fn compute_engine_target_defaults( &self, ) -> Option<&Box<ComputeEngineTargetDefaults>>

The value of target_vm_defaults if it holds a ComputeEngineTargetDefaults, None if the field is not set or holds a different branch.

Source

pub fn set_compute_engine_target_defaults<T: Into<Box<ComputeEngineTargetDefaults>>>( self, v: T, ) -> Self

Sets the value of target_vm_defaults to hold a ComputeEngineTargetDefaults.

Note that all the setters affecting target_vm_defaults are mutually exclusive.

§Example
use google_cloud_vmmigration_v1::model::ComputeEngineTargetDefaults;
let x = MigratingVm::new().set_compute_engine_target_defaults(ComputeEngineTargetDefaults::default()/* use setters */);
assert!(x.compute_engine_target_defaults().is_some());
assert!(x.compute_engine_disks_target_defaults().is_none());
Source

pub fn compute_engine_disks_target_defaults( &self, ) -> Option<&Box<ComputeEngineDisksTargetDefaults>>

The value of target_vm_defaults if it holds a ComputeEngineDisksTargetDefaults, None if the field is not set or holds a different branch.

Source

pub fn set_compute_engine_disks_target_defaults<T: Into<Box<ComputeEngineDisksTargetDefaults>>>( self, v: T, ) -> Self

Sets the value of target_vm_defaults to hold a ComputeEngineDisksTargetDefaults.

Note that all the setters affecting target_vm_defaults are mutually exclusive.

§Example
use google_cloud_vmmigration_v1::model::ComputeEngineDisksTargetDefaults;
let x = MigratingVm::new().set_compute_engine_disks_target_defaults(ComputeEngineDisksTargetDefaults::default()/* use setters */);
assert!(x.compute_engine_disks_target_defaults().is_some());
assert!(x.compute_engine_target_defaults().is_none());
Source

pub fn set_source_vm_details<T: Into<Option<SourceVmDetails>>>( self, v: T, ) -> Self

Sets the value of source_vm_details.

Note that all the setters affecting source_vm_details are mutually exclusive.

§Example
use google_cloud_vmmigration_v1::model::VmwareSourceVmDetails;
let x = MigratingVm::new().set_source_vm_details(Some(
    google_cloud_vmmigration_v1::model::migrating_vm::SourceVmDetails::VmwareSourceVmDetails(VmwareSourceVmDetails::default().into())));
Source

pub fn vmware_source_vm_details(&self) -> Option<&Box<VmwareSourceVmDetails>>

The value of source_vm_details if it holds a VmwareSourceVmDetails, None if the field is not set or holds a different branch.

Source

pub fn set_vmware_source_vm_details<T: Into<Box<VmwareSourceVmDetails>>>( self, v: T, ) -> Self

Sets the value of source_vm_details to hold a VmwareSourceVmDetails.

Note that all the setters affecting source_vm_details are mutually exclusive.

§Example
use google_cloud_vmmigration_v1::model::VmwareSourceVmDetails;
let x = MigratingVm::new().set_vmware_source_vm_details(VmwareSourceVmDetails::default()/* use setters */);
assert!(x.vmware_source_vm_details().is_some());
assert!(x.aws_source_vm_details().is_none());
assert!(x.azure_source_vm_details().is_none());
Source

pub fn aws_source_vm_details(&self) -> Option<&Box<AwsSourceVmDetails>>

The value of source_vm_details if it holds a AwsSourceVmDetails, None if the field is not set or holds a different branch.

Source

pub fn set_aws_source_vm_details<T: Into<Box<AwsSourceVmDetails>>>( self, v: T, ) -> Self

Sets the value of source_vm_details to hold a AwsSourceVmDetails.

Note that all the setters affecting source_vm_details are mutually exclusive.

§Example
use google_cloud_vmmigration_v1::model::AwsSourceVmDetails;
let x = MigratingVm::new().set_aws_source_vm_details(AwsSourceVmDetails::default()/* use setters */);
assert!(x.aws_source_vm_details().is_some());
assert!(x.vmware_source_vm_details().is_none());
assert!(x.azure_source_vm_details().is_none());
Source

pub fn azure_source_vm_details(&self) -> Option<&Box<AzureSourceVmDetails>>

The value of source_vm_details if it holds a AzureSourceVmDetails, None if the field is not set or holds a different branch.

Source

pub fn set_azure_source_vm_details<T: Into<Box<AzureSourceVmDetails>>>( self, v: T, ) -> Self

Sets the value of source_vm_details to hold a AzureSourceVmDetails.

Note that all the setters affecting source_vm_details are mutually exclusive.

§Example
use google_cloud_vmmigration_v1::model::AzureSourceVmDetails;
let x = MigratingVm::new().set_azure_source_vm_details(AzureSourceVmDetails::default()/* use setters */);
assert!(x.azure_source_vm_details().is_some());
assert!(x.vmware_source_vm_details().is_none());
assert!(x.aws_source_vm_details().is_none());

Trait Implementations§

Source§

impl Clone for MigratingVm

Source§

fn clone(&self) -> MigratingVm

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MigratingVm

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MigratingVm

Source§

fn default() -> MigratingVm

Returns the “default value” for a type. Read more
Source§

impl Message for MigratingVm

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for MigratingVm

Source§

fn eq(&self, other: &MigratingVm) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for MigratingVm

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more