Package com.google.cloud.compute.v1
Class FixedOrPercent.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<FixedOrPercent.Builder>
com.google.cloud.compute.v1.FixedOrPercent.Builder
- All Implemented Interfaces:
FixedOrPercentOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- FixedOrPercent
public static final class FixedOrPercent.Builder
extends com.google.protobuf.GeneratedMessage.Builder<FixedOrPercent.Builder>
implements FixedOrPercentOrBuilder
Encapsulates numeric value that can be either absolute or relative.Protobuf type
google.cloud.compute.v1.FixedOrPercent-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Output only.Specifies a fixed number of VM instances.Specifies a percentage of instances between 0 to 100%, inclusive.intOutput only.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorintgetFixed()Specifies a fixed number of VM instances.intSpecifies a percentage of instances between 0 to 100%, inclusive.booleanOutput only.booleanhasFixed()Specifies a fixed number of VM instances.booleanSpecifies a percentage of instances between 0 to 100%, inclusive.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(FixedOrPercent other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setCalculated(int value) Output only.setFixed(int value) Specifies a fixed number of VM instances.setPercent(int value) Specifies a percentage of instances between 0 to 100%, inclusive.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<FixedOrPercent.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<FixedOrPercent.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<FixedOrPercent.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<FixedOrPercent.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<FixedOrPercent.Builder>
-
mergeFrom
public FixedOrPercent.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<FixedOrPercent.Builder>- Throws:
IOException
-
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;- Specified by:
hasCalculatedin interfaceFixedOrPercentOrBuilder- Returns:
- Whether the calculated field is set.
-
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;- Specified by:
getCalculatedin interfaceFixedOrPercentOrBuilder- Returns:
- The calculated.
-
setCalculated
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;- Parameters:
value- The calculated to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
hasFixed
public boolean hasFixed()Specifies a fixed number of VM instances. This must be a positive integer.
optional int32 fixed = 97445748;- Specified by:
hasFixedin interfaceFixedOrPercentOrBuilder- Returns:
- Whether the fixed field is set.
-
getFixed
public int getFixed()Specifies a fixed number of VM instances. This must be a positive integer.
optional int32 fixed = 97445748;- Specified by:
getFixedin interfaceFixedOrPercentOrBuilder- Returns:
- The fixed.
-
setFixed
Specifies a fixed number of VM instances. This must be a positive integer.
optional int32 fixed = 97445748;- Parameters:
value- The fixed to set.- Returns:
- This builder for chaining.
-
clearFixed
Specifies a fixed number of VM instances. This must be a positive integer.
optional int32 fixed = 97445748;- Returns:
- This builder for chaining.
-
hasPercent
public boolean hasPercent()Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
optional int32 percent = 394814533;- Specified by:
hasPercentin interfaceFixedOrPercentOrBuilder- Returns:
- Whether the percent field is set.
-
getPercent
public int getPercent()Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
optional int32 percent = 394814533;- Specified by:
getPercentin interfaceFixedOrPercentOrBuilder- Returns:
- The percent.
-
setPercent
Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
optional int32 percent = 394814533;- Parameters:
value- The percent to set.- Returns:
- This builder for chaining.
-
clearPercent
Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
optional int32 percent = 394814533;- Returns:
- This builder for chaining.
-