#[non_exhaustive]pub struct ServiceScaling {
pub min_instance_count: i32,
pub scaling_mode: ScalingMode,
pub max_instance_count: i32,
pub manual_instance_count: Option<i32>,
/* private fields */
}Expand description
Scaling settings applied at the service level rather than at the revision level.
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.min_instance_count: i32Optional. total min instances for the service. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving.
scaling_mode: ScalingModeOptional. The scaling mode for the service.
max_instance_count: i32Optional. total max instances for the service. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving.
manual_instance_count: Option<i32>Optional. total instance count for the service in manual scaling mode. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving.
Implementations§
Source§impl ServiceScaling
impl ServiceScaling
Sourcepub fn set_min_instance_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_min_instance_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of min_instance_count.
§Example
let x = ServiceScaling::new().set_min_instance_count(42);Sourcepub fn set_scaling_mode<T: Into<ScalingMode>>(self, v: T) -> Self
pub fn set_scaling_mode<T: Into<ScalingMode>>(self, v: T) -> Self
Sets the value of scaling_mode.
§Example
use google_cloud_run_v2::model::service_scaling::ScalingMode;
let x0 = ServiceScaling::new().set_scaling_mode(ScalingMode::Automatic);
let x1 = ServiceScaling::new().set_scaling_mode(ScalingMode::Manual);Sourcepub fn set_max_instance_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_max_instance_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of max_instance_count.
§Example
let x = ServiceScaling::new().set_max_instance_count(42);Sourcepub fn set_manual_instance_count<T>(self, v: T) -> Self
pub fn set_manual_instance_count<T>(self, v: T) -> Self
Sets the value of manual_instance_count.
§Example
let x = ServiceScaling::new().set_manual_instance_count(42);Sourcepub fn set_or_clear_manual_instance_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_manual_instance_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of manual_instance_count.
§Example
let x = ServiceScaling::new().set_or_clear_manual_instance_count(Some(42));
let x = ServiceScaling::new().set_or_clear_manual_instance_count(None::<i32>);Trait Implementations§
Source§impl Clone for ServiceScaling
impl Clone for ServiceScaling
Source§fn clone(&self) -> ServiceScaling
fn clone(&self) -> ServiceScaling
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServiceScaling
impl Debug for ServiceScaling
Source§impl Default for ServiceScaling
impl Default for ServiceScaling
Source§fn default() -> ServiceScaling
fn default() -> ServiceScaling
Source§impl Message for ServiceScaling
impl Message for ServiceScaling
Source§impl PartialEq for ServiceScaling
impl PartialEq for ServiceScaling
Source§fn eq(&self, other: &ServiceScaling) -> bool
fn eq(&self, other: &ServiceScaling) -> bool
self and other values to be equal, and is used by ==.