Class Validate.EnumRules.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<Validate.EnumRules.Builder>
io.envoyproxy.pgv.validate.Validate.EnumRules.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Validate.EnumRulesOrBuilder, Cloneable
Enclosing class:
Validate.EnumRules

public static final class Validate.EnumRules.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Validate.EnumRules.Builder> implements Validate.EnumRulesOrBuilder
 EnumRules describe the constraints applied to enum values
 
Protobuf type validate.EnumRules
  • Method Details

    • 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<Validate.EnumRules.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<Validate.EnumRules.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<Validate.EnumRules.Builder>
    • getDefaultInstanceForType

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

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

      public Validate.EnumRules buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.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<Validate.EnumRules.Builder>
    • setField

      public Validate.EnumRules.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<Validate.EnumRules.Builder>
    • clearField

      public Validate.EnumRules.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<Validate.EnumRules.Builder>
    • clearOneof

      public Validate.EnumRules.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<Validate.EnumRules.Builder>
    • setRepeatedField

      public Validate.EnumRules.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<Validate.EnumRules.Builder>
    • addRepeatedField

      public Validate.EnumRules.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<Validate.EnumRules.Builder>
    • mergeFrom

      public Validate.EnumRules.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<Validate.EnumRules.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Validate.EnumRules.Builder>
    • mergeFrom

      public Validate.EnumRules.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<Validate.EnumRules.Builder>
      Throws:
      IOException
    • hasConst

      public boolean hasConst()
       Const specifies that this field must be exactly the specified value
       
      optional int32 const = 1;
      Specified by:
      hasConst in interface Validate.EnumRulesOrBuilder
      Returns:
      Whether the const field is set.
    • getConst

      public int getConst()
       Const specifies that this field must be exactly the specified value
       
      optional int32 const = 1;
      Specified by:
      getConst in interface Validate.EnumRulesOrBuilder
      Returns:
      The const.
    • setConst

      public Validate.EnumRules.Builder setConst(int value)
       Const specifies that this field must be exactly the specified value
       
      optional int32 const = 1;
      Parameters:
      value - The const to set.
      Returns:
      This builder for chaining.
    • clearConst

      public Validate.EnumRules.Builder clearConst()
       Const specifies that this field must be exactly the specified value
       
      optional int32 const = 1;
      Returns:
      This builder for chaining.
    • hasDefinedOnly

      public boolean hasDefinedOnly()
       DefinedOnly specifies that this field must be only one of the defined
       values for this enum, failing on any undefined value.
       
      optional bool defined_only = 2;
      Specified by:
      hasDefinedOnly in interface Validate.EnumRulesOrBuilder
      Returns:
      Whether the definedOnly field is set.
    • getDefinedOnly

      public boolean getDefinedOnly()
       DefinedOnly specifies that this field must be only one of the defined
       values for this enum, failing on any undefined value.
       
      optional bool defined_only = 2;
      Specified by:
      getDefinedOnly in interface Validate.EnumRulesOrBuilder
      Returns:
      The definedOnly.
    • setDefinedOnly

      public Validate.EnumRules.Builder setDefinedOnly(boolean value)
       DefinedOnly specifies that this field must be only one of the defined
       values for this enum, failing on any undefined value.
       
      optional bool defined_only = 2;
      Parameters:
      value - The definedOnly to set.
      Returns:
      This builder for chaining.
    • clearDefinedOnly

      public Validate.EnumRules.Builder clearDefinedOnly()
       DefinedOnly specifies that this field must be only one of the defined
       values for this enum, failing on any undefined value.
       
      optional bool defined_only = 2;
      Returns:
      This builder for chaining.
    • getInList

      public List<Integer> getInList()
       In specifies that this field must be equal to one of the specified
       values
       
      repeated int32 in = 3;
      Specified by:
      getInList in interface Validate.EnumRulesOrBuilder
      Returns:
      A list containing the in.
    • getInCount

      public int getInCount()
       In specifies that this field must be equal to one of the specified
       values
       
      repeated int32 in = 3;
      Specified by:
      getInCount in interface Validate.EnumRulesOrBuilder
      Returns:
      The count of in.
    • getIn

      public int getIn(int index)
       In specifies that this field must be equal to one of the specified
       values
       
      repeated int32 in = 3;
      Specified by:
      getIn in interface Validate.EnumRulesOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The in at the given index.
    • setIn

      public Validate.EnumRules.Builder setIn(int index, int value)
       In specifies that this field must be equal to one of the specified
       values
       
      repeated int32 in = 3;
      Parameters:
      index - The index to set the value at.
      value - The in to set.
      Returns:
      This builder for chaining.
    • addIn

      public Validate.EnumRules.Builder addIn(int value)
       In specifies that this field must be equal to one of the specified
       values
       
      repeated int32 in = 3;
      Parameters:
      value - The in to add.
      Returns:
      This builder for chaining.
    • addAllIn

      public Validate.EnumRules.Builder addAllIn(Iterable<? extends Integer> values)
       In specifies that this field must be equal to one of the specified
       values
       
      repeated int32 in = 3;
      Parameters:
      values - The in to add.
      Returns:
      This builder for chaining.
    • clearIn

      public Validate.EnumRules.Builder clearIn()
       In specifies that this field must be equal to one of the specified
       values
       
      repeated int32 in = 3;
      Returns:
      This builder for chaining.
    • getNotInList

      public List<Integer> getNotInList()
       NotIn specifies that this field cannot be equal to one of the specified
       values
       
      repeated int32 not_in = 4;
      Specified by:
      getNotInList in interface Validate.EnumRulesOrBuilder
      Returns:
      A list containing the notIn.
    • getNotInCount

      public int getNotInCount()
       NotIn specifies that this field cannot be equal to one of the specified
       values
       
      repeated int32 not_in = 4;
      Specified by:
      getNotInCount in interface Validate.EnumRulesOrBuilder
      Returns:
      The count of notIn.
    • getNotIn

      public int getNotIn(int index)
       NotIn specifies that this field cannot be equal to one of the specified
       values
       
      repeated int32 not_in = 4;
      Specified by:
      getNotIn in interface Validate.EnumRulesOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The notIn at the given index.
    • setNotIn

      public Validate.EnumRules.Builder setNotIn(int index, int value)
       NotIn specifies that this field cannot be equal to one of the specified
       values
       
      repeated int32 not_in = 4;
      Parameters:
      index - The index to set the value at.
      value - The notIn to set.
      Returns:
      This builder for chaining.
    • addNotIn

      public Validate.EnumRules.Builder addNotIn(int value)
       NotIn specifies that this field cannot be equal to one of the specified
       values
       
      repeated int32 not_in = 4;
      Parameters:
      value - The notIn to add.
      Returns:
      This builder for chaining.
    • addAllNotIn

      public Validate.EnumRules.Builder addAllNotIn(Iterable<? extends Integer> values)
       NotIn specifies that this field cannot be equal to one of the specified
       values
       
      repeated int32 not_in = 4;
      Parameters:
      values - The notIn to add.
      Returns:
      This builder for chaining.
    • clearNotIn

      public Validate.EnumRules.Builder clearNotIn()
       NotIn specifies that this field cannot be equal to one of the specified
       values
       
      repeated int32 not_in = 4;
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final Validate.EnumRules.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<Validate.EnumRules.Builder>
    • mergeUnknownFields

      public final Validate.EnumRules.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<Validate.EnumRules.Builder>