#[non_exhaustive]pub struct ResourcePolicyGroupPlacementPolicy {
pub accelerator_topology_mode: Option<AcceleratorTopologyMode>,
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.accelerator_topology_mode: Option<AcceleratorTopologyMode>Specifies the connection mode for the accelerator topology. If not specified, the default is AUTO_CONNECT.
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
Sourcepub fn set_accelerator_topology_mode<T>(self, v: T) -> Selfwhere
T: Into<AcceleratorTopologyMode>,
pub fn set_accelerator_topology_mode<T>(self, v: T) -> Selfwhere
T: Into<AcceleratorTopologyMode>,
Sets the value of accelerator_topology_mode.
§Example
use google_cloud_compute_v1::model::resource_policy_group_placement_policy::AcceleratorTopologyMode;
let x0 = ResourcePolicyGroupPlacementPolicy::new().set_accelerator_topology_mode(AcceleratorTopologyMode::ProvisionOnly);Sourcepub fn set_or_clear_accelerator_topology_mode<T>(self, v: Option<T>) -> Selfwhere
T: Into<AcceleratorTopologyMode>,
pub fn set_or_clear_accelerator_topology_mode<T>(self, v: Option<T>) -> Selfwhere
T: Into<AcceleratorTopologyMode>,
Sets or clears the value of accelerator_topology_mode.
§Example
use google_cloud_compute_v1::model::resource_policy_group_placement_policy::AcceleratorTopologyMode;
let x0 = ResourcePolicyGroupPlacementPolicy::new().set_or_clear_accelerator_topology_mode(Some(AcceleratorTopologyMode::ProvisionOnly));
let x_none = ResourcePolicyGroupPlacementPolicy::new().set_or_clear_accelerator_topology_mode(None::<AcceleratorTopologyMode>);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 (const: unstable) · 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
impl StructuralPartialEq for ResourcePolicyGroupPlacementPolicy
Auto Trait Implementations§
impl Freeze for ResourcePolicyGroupPlacementPolicy
impl RefUnwindSafe for ResourcePolicyGroupPlacementPolicy
impl Send for ResourcePolicyGroupPlacementPolicy
impl Sync for ResourcePolicyGroupPlacementPolicy
impl Unpin for ResourcePolicyGroupPlacementPolicy
impl UnsafeUnpin for ResourcePolicyGroupPlacementPolicy
impl UnwindSafe for ResourcePolicyGroupPlacementPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request