#[non_exhaustive]pub struct ComputeScheduling {
pub on_host_maintenance: OnHostMaintenance,
pub restart_type: RestartType,
pub node_affinities: Vec<SchedulingNodeAffinity>,
pub min_node_cpus: i32,
/* private fields */
}Expand description
Scheduling information for VM on maintenance/restart behaviour and node allocation in sole tenant nodes. Options for instance behavior when the host machine undergoes maintenance that may temporarily impact instance performance.
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.on_host_maintenance: OnHostMaintenanceHow the instance should behave when the host machine undergoes maintenance that may temporarily impact instance performance.
restart_type: RestartTypeWhether the Instance should be automatically restarted whenever it is
terminated by Compute Engine (not terminated by user).
This configuration is identical to automaticRestart field in Compute
Engine create instance under scheduling.
It was changed to an enum (instead of a boolean) to match the default
value in Compute Engine which is automatic restart.
node_affinities: Vec<SchedulingNodeAffinity>A set of node affinity and anti-affinity configurations for sole tenant nodes.
min_node_cpus: i32The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node. Ignored if no node_affinites are configured.
Implementations§
Source§impl ComputeScheduling
impl ComputeScheduling
Sourcepub fn set_on_host_maintenance<T: Into<OnHostMaintenance>>(self, v: T) -> Self
pub fn set_on_host_maintenance<T: Into<OnHostMaintenance>>(self, v: T) -> Self
Sets the value of on_host_maintenance.
§Example
use google_cloud_vmmigration_v1::model::compute_scheduling::OnHostMaintenance;
let x0 = ComputeScheduling::new().set_on_host_maintenance(OnHostMaintenance::Terminate);
let x1 = ComputeScheduling::new().set_on_host_maintenance(OnHostMaintenance::Migrate);Sourcepub fn set_restart_type<T: Into<RestartType>>(self, v: T) -> Self
pub fn set_restart_type<T: Into<RestartType>>(self, v: T) -> Self
Sets the value of restart_type.
§Example
use google_cloud_vmmigration_v1::model::compute_scheduling::RestartType;
let x0 = ComputeScheduling::new().set_restart_type(RestartType::AutomaticRestart);
let x1 = ComputeScheduling::new().set_restart_type(RestartType::NoAutomaticRestart);Sourcepub fn set_node_affinities<T, V>(self, v: T) -> Self
pub fn set_node_affinities<T, V>(self, v: T) -> Self
Sets the value of node_affinities.
§Example
use google_cloud_vmmigration_v1::model::SchedulingNodeAffinity;
let x = ComputeScheduling::new()
.set_node_affinities([
SchedulingNodeAffinity::default()/* use setters */,
SchedulingNodeAffinity::default()/* use (different) setters */,
]);Sourcepub fn set_min_node_cpus<T: Into<i32>>(self, v: T) -> Self
pub fn set_min_node_cpus<T: Into<i32>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for ComputeScheduling
impl Clone for ComputeScheduling
Source§fn clone(&self) -> ComputeScheduling
fn clone(&self) -> ComputeScheduling
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 ComputeScheduling
impl Debug for ComputeScheduling
Source§impl Default for ComputeScheduling
impl Default for ComputeScheduling
Source§fn default() -> ComputeScheduling
fn default() -> ComputeScheduling
Source§impl Message for ComputeScheduling
impl Message for ComputeScheduling
Source§impl PartialEq for ComputeScheduling
impl PartialEq for ComputeScheduling
Source§fn eq(&self, other: &ComputeScheduling) -> bool
fn eq(&self, other: &ComputeScheduling) -> bool
self and other values to be equal, and is used by ==.