#[non_exhaustive]pub struct NodeGroupAutoscalingPolicy {
pub max_nodes: Option<i32>,
pub min_nodes: Option<i32>,
pub mode: Option<Mode>,
/* private fields */
}Available on crate feature
node-groups 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.max_nodes: Option<i32>The maximum number of nodes that the group should have. Must be set if autoscaling is enabled. Maximum value allowed is 100.
min_nodes: Option<i32>The minimum number of nodes that the group should have.
mode: Option<Mode>The autoscaling mode. Set to one of: ON, OFF, or ONLY_SCALE_OUT. For more information, see Autoscaler modes.
Implementations§
Source§impl NodeGroupAutoscalingPolicy
impl NodeGroupAutoscalingPolicy
pub fn new() -> Self
Sourcepub fn set_max_nodes<T>(self, v: T) -> Self
pub fn set_max_nodes<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_max_nodes<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_max_nodes<T>(self, v: Option<T>) -> Self
Sourcepub fn set_min_nodes<T>(self, v: T) -> Self
pub fn set_min_nodes<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_min_nodes<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_min_nodes<T>(self, v: Option<T>) -> Self
Sourcepub fn set_mode<T>(self, v: T) -> Self
pub fn set_mode<T>(self, v: T) -> Self
Sets the value of mode.
§Example
ⓘ
use google_cloud_compute_v1::model::node_group_autoscaling_policy::Mode;
let x0 = NodeGroupAutoscalingPolicy::new().set_mode(Mode::Off);
let x1 = NodeGroupAutoscalingPolicy::new().set_mode(Mode::On);
let x2 = NodeGroupAutoscalingPolicy::new().set_mode(Mode::OnlyScaleOut);Sourcepub fn set_or_clear_mode<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_mode<T>(self, v: Option<T>) -> Self
Sets or clears the value of mode.
§Example
ⓘ
use google_cloud_compute_v1::model::node_group_autoscaling_policy::Mode;
let x0 = NodeGroupAutoscalingPolicy::new().set_or_clear_mode(Some(Mode::Off));
let x1 = NodeGroupAutoscalingPolicy::new().set_or_clear_mode(Some(Mode::On));
let x2 = NodeGroupAutoscalingPolicy::new().set_or_clear_mode(Some(Mode::OnlyScaleOut));
let x_none = NodeGroupAutoscalingPolicy::new().set_or_clear_mode(None::<Mode>);Trait Implementations§
Source§impl Clone for NodeGroupAutoscalingPolicy
impl Clone for NodeGroupAutoscalingPolicy
Source§fn clone(&self) -> NodeGroupAutoscalingPolicy
fn clone(&self) -> NodeGroupAutoscalingPolicy
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 NodeGroupAutoscalingPolicy
impl Debug for NodeGroupAutoscalingPolicy
Source§impl Default for NodeGroupAutoscalingPolicy
impl Default for NodeGroupAutoscalingPolicy
Source§fn default() -> NodeGroupAutoscalingPolicy
fn default() -> NodeGroupAutoscalingPolicy
Returns the “default value” for a type. Read more
Source§impl Message for NodeGroupAutoscalingPolicy
impl Message for NodeGroupAutoscalingPolicy
impl StructuralPartialEq for NodeGroupAutoscalingPolicy
Auto Trait Implementations§
impl Freeze for NodeGroupAutoscalingPolicy
impl RefUnwindSafe for NodeGroupAutoscalingPolicy
impl Send for NodeGroupAutoscalingPolicy
impl Sync for NodeGroupAutoscalingPolicy
impl Unpin for NodeGroupAutoscalingPolicy
impl UnwindSafe for NodeGroupAutoscalingPolicy
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