public static final class FixedOrPercent.Builder extends GeneratedMessage.Builder<FixedOrPercent.Builder> implements FixedOrPercentOrBuilderEncapsulates numeric value that can be either absolute or relative.
Protobuf type google.cloud.compute.v1.FixedOrPercent
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > FixedOrPercent.BuilderImplements
FixedOrPercentOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public FixedOrPercent build()| Returns | |
|---|---|
| Type | Description |
FixedOrPercent |
|
buildPartial()
public FixedOrPercent buildPartial()| Returns | |
|---|---|
| Type | Description |
FixedOrPercent |
|
clear()
public FixedOrPercent.Builder clear()| Returns | |
|---|---|
| Type | Description |
FixedOrPercent.Builder |
|
clearCalculated()
public FixedOrPercent.Builder clearCalculated()Output only. [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.
optional int32 calculated = 472082878;
| Returns | |
|---|---|
| Type | Description |
FixedOrPercent.Builder |
This builder for chaining. |
clearFixed()
public FixedOrPercent.Builder clearFixed()Specifies a fixed number of VM instances. This must be a positive integer.
optional int32 fixed = 97445748;
| Returns | |
|---|---|
| Type | Description |
FixedOrPercent.Builder |
This builder for chaining. |
clearPercent()
public FixedOrPercent.Builder clearPercent()Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
optional int32 percent = 394814533;
| Returns | |
|---|---|
| Type | Description |
FixedOrPercent.Builder |
This builder for chaining. |
getCalculated()
public int getCalculated()Output only. [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.
optional int32 calculated = 472082878;
| Returns | |
|---|---|
| Type | Description |
int |
The calculated. |
getDefaultInstanceForType()
public FixedOrPercent getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
FixedOrPercent |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getFixed()
public int getFixed()Specifies a fixed number of VM instances. This must be a positive integer.
optional int32 fixed = 97445748;
| Returns | |
|---|---|
| Type | Description |
int |
The fixed. |
getPercent()
public int getPercent()Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
optional int32 percent = 394814533;
| Returns | |
|---|---|
| Type | Description |
int |
The percent. |
hasCalculated()
public boolean hasCalculated()Output only. [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.
optional int32 calculated = 472082878;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the calculated field is set. |
hasFixed()
public boolean hasFixed()Specifies a fixed number of VM instances. This must be a positive integer.
optional int32 fixed = 97445748;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the fixed field is set. |
hasPercent()
public boolean hasPercent()Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
optional int32 percent = 394814533;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the percent field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(FixedOrPercent other)
public FixedOrPercent.Builder mergeFrom(FixedOrPercent other)| Parameter | |
|---|---|
| Name | Description |
other |
FixedOrPercent |
| Returns | |
|---|---|
| Type | Description |
FixedOrPercent.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public FixedOrPercent.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
FixedOrPercent.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public FixedOrPercent.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
FixedOrPercent.Builder |
|
setCalculated(int value)
public FixedOrPercent.Builder setCalculated(int value)Output only. [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.
optional int32 calculated = 472082878;
| Parameter | |
|---|---|
| Name | Description |
value |
intThe calculated to set. |
| Returns | |
|---|---|
| Type | Description |
FixedOrPercent.Builder |
This builder for chaining. |
setFixed(int value)
public FixedOrPercent.Builder setFixed(int value)Specifies a fixed number of VM instances. This must be a positive integer.
optional int32 fixed = 97445748;
| Parameter | |
|---|---|
| Name | Description |
value |
intThe fixed to set. |
| Returns | |
|---|---|
| Type | Description |
FixedOrPercent.Builder |
This builder for chaining. |
setPercent(int value)
public FixedOrPercent.Builder setPercent(int value)Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
optional int32 percent = 394814533;
| Parameter | |
|---|---|
| Name | Description |
value |
intThe percent to set. |
| Returns | |
|---|---|
| Type | Description |
FixedOrPercent.Builder |
This builder for chaining. |