#[non_exhaustive]pub struct ReadPoolAutoScaleConfig {
pub enabled: Option<bool>,
pub min_node_count: Option<i32>,
pub max_node_count: Option<i32>,
pub target_metrics: Vec<TargetMetric>,
pub disable_scale_in: Option<bool>,
pub scale_in_cooldown_seconds: Option<i32>,
pub scale_out_cooldown_seconds: Option<i32>,
/* private fields */
}Expand description
The read pool auto-scale configuration.
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.enabled: Option<bool>Indicates whether read pool auto scaling is enabled.
min_node_count: Option<i32>Minimum number of read pool nodes to be maintained.
max_node_count: Option<i32>Maximum number of read pool nodes to be maintained.
target_metrics: Vec<TargetMetric>Optional. Target metrics for read pool auto scaling.
disable_scale_in: Option<bool>Indicates whether read pool auto scaling supports scale in operations (removing nodes).
scale_in_cooldown_seconds: Option<i32>The cooldown period for scale-in operations.
scale_out_cooldown_seconds: Option<i32>The cooldown period for scale-out operations.
Implementations§
Source§impl ReadPoolAutoScaleConfig
impl ReadPoolAutoScaleConfig
pub fn new() -> Self
Sourcepub fn set_enabled<T>(self, v: T) -> Self
pub fn set_enabled<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_enabled<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_enabled<T>(self, v: Option<T>) -> Self
Sourcepub fn set_min_node_count<T>(self, v: T) -> Self
pub fn set_min_node_count<T>(self, v: T) -> Self
Sets the value of min_node_count.
§Example
let x = ReadPoolAutoScaleConfig::new().set_min_node_count(42);Sourcepub fn set_or_clear_min_node_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_min_node_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of min_node_count.
§Example
let x = ReadPoolAutoScaleConfig::new().set_or_clear_min_node_count(Some(42));
let x = ReadPoolAutoScaleConfig::new().set_or_clear_min_node_count(None::<i32>);Sourcepub fn set_max_node_count<T>(self, v: T) -> Self
pub fn set_max_node_count<T>(self, v: T) -> Self
Sets the value of max_node_count.
§Example
let x = ReadPoolAutoScaleConfig::new().set_max_node_count(42);Sourcepub fn set_or_clear_max_node_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_max_node_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of max_node_count.
§Example
let x = ReadPoolAutoScaleConfig::new().set_or_clear_max_node_count(Some(42));
let x = ReadPoolAutoScaleConfig::new().set_or_clear_max_node_count(None::<i32>);Sourcepub fn set_target_metrics<T, V>(self, v: T) -> Self
pub fn set_target_metrics<T, V>(self, v: T) -> Self
Sets the value of target_metrics.
§Example
use google_cloud_sql_v1::model::read_pool_auto_scale_config::TargetMetric;
let x = ReadPoolAutoScaleConfig::new()
.set_target_metrics([
TargetMetric::default()/* use setters */,
TargetMetric::default()/* use (different) setters */,
]);Sourcepub fn set_disable_scale_in<T>(self, v: T) -> Self
pub fn set_disable_scale_in<T>(self, v: T) -> Self
Sets the value of disable_scale_in.
§Example
let x = ReadPoolAutoScaleConfig::new().set_disable_scale_in(true);Sourcepub fn set_or_clear_disable_scale_in<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_disable_scale_in<T>(self, v: Option<T>) -> Self
Sets or clears the value of disable_scale_in.
§Example
let x = ReadPoolAutoScaleConfig::new().set_or_clear_disable_scale_in(Some(false));
let x = ReadPoolAutoScaleConfig::new().set_or_clear_disable_scale_in(None::<bool>);Sourcepub fn set_scale_in_cooldown_seconds<T>(self, v: T) -> Self
pub fn set_scale_in_cooldown_seconds<T>(self, v: T) -> Self
Sets the value of scale_in_cooldown_seconds.
§Example
let x = ReadPoolAutoScaleConfig::new().set_scale_in_cooldown_seconds(42);Sourcepub fn set_or_clear_scale_in_cooldown_seconds<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_scale_in_cooldown_seconds<T>(self, v: Option<T>) -> Self
Sets or clears the value of scale_in_cooldown_seconds.
§Example
let x = ReadPoolAutoScaleConfig::new().set_or_clear_scale_in_cooldown_seconds(Some(42));
let x = ReadPoolAutoScaleConfig::new().set_or_clear_scale_in_cooldown_seconds(None::<i32>);Sourcepub fn set_scale_out_cooldown_seconds<T>(self, v: T) -> Self
pub fn set_scale_out_cooldown_seconds<T>(self, v: T) -> Self
Sets the value of scale_out_cooldown_seconds.
§Example
let x = ReadPoolAutoScaleConfig::new().set_scale_out_cooldown_seconds(42);Sourcepub fn set_or_clear_scale_out_cooldown_seconds<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_scale_out_cooldown_seconds<T>(self, v: Option<T>) -> Self
Sets or clears the value of scale_out_cooldown_seconds.
§Example
let x = ReadPoolAutoScaleConfig::new().set_or_clear_scale_out_cooldown_seconds(Some(42));
let x = ReadPoolAutoScaleConfig::new().set_or_clear_scale_out_cooldown_seconds(None::<i32>);Trait Implementations§
Source§impl Clone for ReadPoolAutoScaleConfig
impl Clone for ReadPoolAutoScaleConfig
Source§fn clone(&self) -> ReadPoolAutoScaleConfig
fn clone(&self) -> ReadPoolAutoScaleConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more