public static final class FixedOrPercent.Builder extends GeneratedMessageV3.Builder<FixedOrPercent.Builder> implements FixedOrPercentOrBuilder
Encapsulates numeric value that can be either absolute or relative.
Protobuf type google.cloud.compute.v1.FixedOrPercent
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public FixedOrPercent.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public FixedOrPercent build()
Returns
buildPartial()
public FixedOrPercent buildPartial()
Returns
clear()
public FixedOrPercent.Builder clear()
Returns
Overrides
clearCalculated()
public FixedOrPercent.Builder clearCalculated()
[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
clearField(Descriptors.FieldDescriptor field)
public FixedOrPercent.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearFixed()
public FixedOrPercent.Builder clearFixed()
Specifies a fixed number of VM instances. This must be a positive integer.
optional int32 fixed = 97445748;
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public FixedOrPercent.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
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
clone()
public FixedOrPercent.Builder clone()
Returns
Overrides
getCalculated()
public int 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.
optional int32 calculated = 472082878;
Returns
Type | Description |
int | The calculated.
|
getDefaultInstanceForType()
public FixedOrPercent getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
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()
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] 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 GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(FixedOrPercent other)
public FixedOrPercent.Builder mergeFrom(FixedOrPercent other)
Parameter
Returns
public FixedOrPercent.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public FixedOrPercent.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final FixedOrPercent.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
setCalculated(int value)
public FixedOrPercent.Builder setCalculated(int value)
[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 | int
The calculated to set.
|
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public FixedOrPercent.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
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 | int
The fixed to set.
|
Returns
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 | int
The percent to set.
|
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public FixedOrPercent.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final FixedOrPercent.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides