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()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public FixedOrPercent.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public FixedOrPercent build()
buildPartial()
public FixedOrPercent buildPartial()
clear()
public FixedOrPercent.Builder clear()
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;
clearField(Descriptors.FieldDescriptor field)
public FixedOrPercent.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearFixed()
public FixedOrPercent.Builder clearFixed()
Specifies a fixed number of VM instances. This must be a positive integer.
optional int32 fixed = 97445748;
clearOneof(Descriptors.OneofDescriptor oneof)
public FixedOrPercent.Builder clearOneof(Descriptors.OneofDescriptor oneof)
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;
clone()
public FixedOrPercent.Builder clone()
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()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
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()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(FixedOrPercent other)
public FixedOrPercent.Builder mergeFrom(FixedOrPercent other)
public FixedOrPercent.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public FixedOrPercent.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final FixedOrPercent.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
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.
|
setField(Descriptors.FieldDescriptor field, Object value)
public FixedOrPercent.Builder setField(Descriptors.FieldDescriptor field, Object value)
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.
|
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.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public FixedOrPercent.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final FixedOrPercent.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides