public static class FixedOrPercent.Builder extends Object
Modifier and Type | Method and Description |
---|---|
FixedOrPercent |
build() |
FixedOrPercent.Builder |
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.Builder |
mergeFrom(FixedOrPercent other) |
FixedOrPercent.Builder |
setCalculated(Integer calculated)
[Output Only] Absolute value of VM instances calculated based on the specific mode.
|
FixedOrPercent.Builder |
setFixed(Integer fixed)
Specifies a fixed number of VM instances.
|
FixedOrPercent.Builder |
setPercent(Integer percent)
Specifies a percentage of instances between 0 to 100%, inclusive.
|
public FixedOrPercent.Builder mergeFrom(FixedOrPercent other)
public Integer getCalculated()
- 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 up.
public FixedOrPercent.Builder setCalculated(Integer calculated)
- 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 up.
public Integer getFixed()
public FixedOrPercent.Builder setFixed(Integer fixed)
public Integer getPercent()
public FixedOrPercent.Builder setPercent(Integer percent)
public FixedOrPercent build()
public FixedOrPercent.Builder clone()
Copyright © 2019 Google LLC. All rights reserved.