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 Type
    Method
    Description
     
     
     
    Output only.
    Specifies a fixed number of VM instances.
    Specifies a percentage of instances between 0 to 100%, inclusive.
    int
    Output only.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    int
    Specifies a fixed number of VM instances.
    int
    Specifies a percentage of instances between 0 to 100%, inclusive.
    boolean
    Output only.
    boolean
    Specifies a fixed number of VM instances.
    boolean
    Specifies a percentage of instances between 0 to 100%, inclusive.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    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, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods 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:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<FixedOrPercent.Builder>
    • clear

      public FixedOrPercent.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<FixedOrPercent.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<FixedOrPercent.Builder>
    • getDefaultInstanceForType

      public FixedOrPercent getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public FixedOrPercent build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public FixedOrPercent buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public FixedOrPercent.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<FixedOrPercent.Builder>
    • mergeFrom

      public FixedOrPercent.Builder mergeFrom(FixedOrPercent other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.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:
      hasCalculated in interface FixedOrPercentOrBuilder
      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:
      getCalculated in interface FixedOrPercentOrBuilder
      Returns:
      The calculated.
    • setCalculated

      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;
      Parameters:
      value - The calculated to set.
      Returns:
      This builder for chaining.
    • 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:
      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:
      hasFixed in interface FixedOrPercentOrBuilder
      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:
      getFixed in interface FixedOrPercentOrBuilder
      Returns:
      The fixed.
    • setFixed

      public FixedOrPercent.Builder setFixed(int value)
       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

      public FixedOrPercent.Builder 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:
      hasPercent in interface FixedOrPercentOrBuilder
      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:
      getPercent in interface FixedOrPercentOrBuilder
      Returns:
      The percent.
    • setPercent

      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;
      Parameters:
      value - The percent to set.
      Returns:
      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:
      This builder for chaining.