Class 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.GeneratedMessageV3.Builder<FixedOrPercent.Builder>
    implements FixedOrPercentOrBuilder
     Encapsulates numeric value that can be either absolute or relative.
     
    Protobuf type google.cloud.compute.v1.FixedOrPercent
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public FixedOrPercent.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<FixedOrPercent.Builder>
      • setField

        public FixedOrPercent.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                               Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<FixedOrPercent.Builder>
      • clearField

        public FixedOrPercent.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<FixedOrPercent.Builder>
      • clearOneof

        public FixedOrPercent.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<FixedOrPercent.Builder>
      • setRepeatedField

        public FixedOrPercent.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                       int index,
                                                       Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<FixedOrPercent.Builder>
      • addRepeatedField

        public FixedOrPercent.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                       Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<FixedOrPercent.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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] 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] 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] 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] 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.
      • setUnknownFields

        public final FixedOrPercent.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<FixedOrPercent.Builder>
      • mergeUnknownFields

        public final FixedOrPercent.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<FixedOrPercent.Builder>