#[non_exhaustive]pub struct ResourcePolicyGroupPlacementPolicy {
pub availability_domain_count: Option<i32>,
pub collocation: Option<Collocation>,
pub gpu_topology: Option<String>,
pub vm_count: Option<i32>,
/* private fields */
}resource-policies only.Expand description
A GroupPlacementPolicy specifies resource placement configuration. It specifies the failure bucket separation
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.availability_domain_count: Option<i32>The number of availability domains to spread instances across. If two instances are in different availability domain, they are not in the same low latency network.
collocation: Option<Collocation>Specifies network collocation
gpu_topology: Option<String>Specifies the shape of the GPU slice, in slice based GPU families eg. A4X.
vm_count: Option<i32>Number of VMs in this placement group. Google does not recommend that you use this field unless you use a compact policy and you want your policy to work only if it contains this exact number of VMs.
Implementations§
Source§impl ResourcePolicyGroupPlacementPolicy
impl ResourcePolicyGroupPlacementPolicy
pub fn new() -> Self
Sourcepub fn set_availability_domain_count<T>(self, v: T) -> Self
pub fn set_availability_domain_count<T>(self, v: T) -> Self
Sets the value of availability_domain_count.
§Example
let x = ResourcePolicyGroupPlacementPolicy::new().set_availability_domain_count(42);Sourcepub fn set_or_clear_availability_domain_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_availability_domain_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of availability_domain_count.
§Example
let x = ResourcePolicyGroupPlacementPolicy::new().set_or_clear_availability_domain_count(Some(42));
let x = ResourcePolicyGroupPlacementPolicy::new().set_or_clear_availability_domain_count(None::<i32>);Sourcepub fn set_collocation<T>(self, v: T) -> Selfwhere
T: Into<Collocation>,
pub fn set_collocation<T>(self, v: T) -> Selfwhere
T: Into<Collocation>,
Sets the value of collocation.
§Example
use google_cloud_compute_v1::model::resource_policy_group_placement_policy::Collocation;
let x0 = ResourcePolicyGroupPlacementPolicy::new().set_collocation(Collocation::UnspecifiedCollocation);Sourcepub fn set_or_clear_collocation<T>(self, v: Option<T>) -> Selfwhere
T: Into<Collocation>,
pub fn set_or_clear_collocation<T>(self, v: Option<T>) -> Selfwhere
T: Into<Collocation>,
Sets or clears the value of collocation.
§Example
use google_cloud_compute_v1::model::resource_policy_group_placement_policy::Collocation;
let x0 = ResourcePolicyGroupPlacementPolicy::new().set_or_clear_collocation(Some(Collocation::UnspecifiedCollocation));
let x_none = ResourcePolicyGroupPlacementPolicy::new().set_or_clear_collocation(None::<Collocation>);Sourcepub fn set_gpu_topology<T>(self, v: T) -> Self
pub fn set_gpu_topology<T>(self, v: T) -> Self
Sets the value of gpu_topology.
§Example
let x = ResourcePolicyGroupPlacementPolicy::new().set_gpu_topology("example");Sourcepub fn set_or_clear_gpu_topology<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_gpu_topology<T>(self, v: Option<T>) -> Self
Sets or clears the value of gpu_topology.
§Example
let x = ResourcePolicyGroupPlacementPolicy::new().set_or_clear_gpu_topology(Some("example"));
let x = ResourcePolicyGroupPlacementPolicy::new().set_or_clear_gpu_topology(None::<String>);Sourcepub fn set_vm_count<T>(self, v: T) -> Self
pub fn set_vm_count<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_vm_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_vm_count<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for ResourcePolicyGroupPlacementPolicy
impl Clone for ResourcePolicyGroupPlacementPolicy
Source§fn clone(&self) -> ResourcePolicyGroupPlacementPolicy
fn clone(&self) -> ResourcePolicyGroupPlacementPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for ResourcePolicyGroupPlacementPolicy
impl Default for ResourcePolicyGroupPlacementPolicy
Source§fn default() -> ResourcePolicyGroupPlacementPolicy
fn default() -> ResourcePolicyGroupPlacementPolicy
Source§impl PartialEq for ResourcePolicyGroupPlacementPolicy
impl PartialEq for ResourcePolicyGroupPlacementPolicy
Source§fn eq(&self, other: &ResourcePolicyGroupPlacementPolicy) -> bool
fn eq(&self, other: &ResourcePolicyGroupPlacementPolicy) -> bool
self and other values to be equal, and is used by ==.