![JAR search and dependency download from the Maven repository](/logo.png)
target.apidocs.com.google.api.services.compute.model.FixedOrPercent.html Maven / Gradle / Ivy
FixedOrPercent (Compute Engine API beta-rev20220726-2.0.0)
com.google.api.services.compute.model
Class FixedOrPercent
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.compute.model.FixedOrPercent
-
public final class FixedOrPercent
extends GenericJson
Encapsulates numeric value that can be either absolute or relative.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Compute Engine API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
FixedOrPercent()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
FixedOrPercent
clone()
Integer
getCalculated()
[Output Only] Absolute value of VM instances calculated based on the specific mode.
Integer
getFixed()
Specifies a fixed number of VM instances.
Integer
getPercent()
Specifies a percentage of instances between 0 to 100%, inclusive.
FixedOrPercent
set(String fieldName,
Object value)
FixedOrPercent
setCalculated(Integer calculated)
[Output Only] Absolute value of VM instances calculated based on the specific mode.
FixedOrPercent
setFixed(Integer fixed)
Specifies a fixed number of VM instances.
FixedOrPercent
setPercent(Integer percent)
Specifies a percentage of instances between 0 to 100%, inclusive.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getCalculated
public Integer getCalculated()
[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.
- Returns:
- value or
null
for none
-
setCalculated
public FixedOrPercent setCalculated(Integer calculated)
[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.
- Parameters:
calculated
- calculated or null
for none
-
getFixed
public Integer getFixed()
Specifies a fixed number of VM instances. This must be a positive integer.
- Returns:
- value or
null
for none
-
setFixed
public FixedOrPercent setFixed(Integer fixed)
Specifies a fixed number of VM instances. This must be a positive integer.
- Parameters:
fixed
- fixed or null
for none
-
getPercent
public Integer getPercent()
Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for
80%.
- Returns:
- value or
null
for none
-
setPercent
public FixedOrPercent setPercent(Integer percent)
Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for
80%.
- Parameters:
percent
- percent or null
for none
-
set
public FixedOrPercent set(String fieldName,
Object value)
- Overrides:
set
in class GenericJson
-
clone
public FixedOrPercent clone()
- Overrides:
clone
in class GenericJson
Copyright © 2011–2022 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy