#[non_exhaustive]pub struct DistributionPolicy {
pub target_shape: Option<TargetShape>,
pub zones: Vec<DistributionPolicyZoneConfiguration>,
/* private fields */
}Available on crate features
instance-group-managers or region-instance-group-managers only.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.target_shape: Option<TargetShape>The distribution shape to which the group converges either proactively or on resize events (depending on the value set inupdatePolicy.instanceRedistributionType).
zones: Vec<DistributionPolicyZoneConfiguration>Zones where the regional managed instance group will create and manage its instances.
Implementations§
Source§impl DistributionPolicy
impl DistributionPolicy
pub fn new() -> Self
Sourcepub fn set_target_shape<T>(self, v: T) -> Selfwhere
T: Into<TargetShape>,
pub fn set_target_shape<T>(self, v: T) -> Selfwhere
T: Into<TargetShape>,
Sets the value of target_shape.
§Example
ⓘ
use google_cloud_compute_v1::model::distribution_policy::TargetShape;
let x0 = DistributionPolicy::new().set_target_shape(TargetShape::AnySingleZone);
let x1 = DistributionPolicy::new().set_target_shape(TargetShape::Balanced);
let x2 = DistributionPolicy::new().set_target_shape(TargetShape::Even);Sourcepub fn set_or_clear_target_shape<T>(self, v: Option<T>) -> Selfwhere
T: Into<TargetShape>,
pub fn set_or_clear_target_shape<T>(self, v: Option<T>) -> Selfwhere
T: Into<TargetShape>,
Sets or clears the value of target_shape.
§Example
ⓘ
use google_cloud_compute_v1::model::distribution_policy::TargetShape;
let x0 = DistributionPolicy::new().set_or_clear_target_shape(Some(TargetShape::AnySingleZone));
let x1 = DistributionPolicy::new().set_or_clear_target_shape(Some(TargetShape::Balanced));
let x2 = DistributionPolicy::new().set_or_clear_target_shape(Some(TargetShape::Even));
let x_none = DistributionPolicy::new().set_or_clear_target_shape(None::<TargetShape>);Sourcepub fn set_zones<T, V>(self, v: T) -> Self
pub fn set_zones<T, V>(self, v: T) -> Self
Sets the value of zones.
§Example
ⓘ
use google_cloud_compute_v1::model::DistributionPolicyZoneConfiguration;
let x = DistributionPolicy::new()
.set_zones([
DistributionPolicyZoneConfiguration::default()/* use setters */,
DistributionPolicyZoneConfiguration::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for DistributionPolicy
impl Clone for DistributionPolicy
Source§fn clone(&self) -> DistributionPolicy
fn clone(&self) -> DistributionPolicy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DistributionPolicy
impl Debug for DistributionPolicy
Source§impl Default for DistributionPolicy
impl Default for DistributionPolicy
Source§fn default() -> DistributionPolicy
fn default() -> DistributionPolicy
Returns the “default value” for a type. Read more
Source§impl Message for DistributionPolicy
impl Message for DistributionPolicy
Source§impl PartialEq for DistributionPolicy
impl PartialEq for DistributionPolicy
impl StructuralPartialEq for DistributionPolicy
Auto Trait Implementations§
impl Freeze for DistributionPolicy
impl RefUnwindSafe for DistributionPolicy
impl Send for DistributionPolicy
impl Sync for DistributionPolicy
impl Unpin for DistributionPolicy
impl UnwindSafe for DistributionPolicy
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
Mutably borrows from an owned value. Read more