Struct google_compute1::api::FixedOrPercent
source · pub struct FixedOrPercent {
pub calculated: Option<i32>,
pub fixed: Option<i32>,
pub percent: Option<i32>,
}
Expand description
Encapsulates numeric value that can be either absolute or relative.
This type is not used in any activity, and only used as part of another schema.
Fields§
§calculated: Option<i32>
[Output Only] Absolute value of VM instances calculated based on the specific mode. - If the value is fixed, then the calculated value is equal to the fixed value. - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded.
fixed: Option<i32>
Specifies a fixed number of VM instances. This must be a positive integer.
percent: Option<i32>
Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
Trait Implementations§
source§impl Clone for FixedOrPercent
impl Clone for FixedOrPercent
source§fn clone(&self) -> FixedOrPercent
fn clone(&self) -> FixedOrPercent
Returns a copy 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 FixedOrPercent
impl Debug for FixedOrPercent
source§impl Default for FixedOrPercent
impl Default for FixedOrPercent
source§fn default() -> FixedOrPercent
fn default() -> FixedOrPercent
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for FixedOrPercent
impl<'de> Deserialize<'de> for FixedOrPercent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for FixedOrPercent
impl Serialize for FixedOrPercent
impl Part for FixedOrPercent
Auto Trait Implementations§
impl RefUnwindSafe for FixedOrPercent
impl Send for FixedOrPercent
impl Sync for FixedOrPercent
impl Unpin for FixedOrPercent
impl UnwindSafe for FixedOrPercent
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