Class EnumRules.Builder

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

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

    Modifier and Type
    Method
    Description
    addAllIn(Iterable<? extends Integer> values)
    `in` requires the field value to be equal to one of the specified enum values.
    addAllNotIn(Iterable<? extends Integer> values)
    `not_in` requires the field value to be not equal to any of the specified enum values.
    addIn(int value)
    `in` requires the field value to be equal to one of the specified enum values.
    addNotIn(int value)
    `not_in` requires the field value to be not equal to any of the specified enum values.
    addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
     
     
     
     
    `const` requires the field value to exactly match the specified enum value.
    `defined_only` requires the field value to be one of the defined values for this enum, failing on any undefined value.
    clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
     
    `in` requires the field value to be equal to one of the specified enum values.
    `not_in` requires the field value to be not equal to any of the specified enum values.
    clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
     
     
    int
    `const` requires the field value to exactly match the specified enum value.
     
    boolean
    `defined_only` requires the field value to be one of the defined values for this enum, failing on any undefined value.
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    int
    getIn(int index)
    `in` requires the field value to be equal to one of the specified enum values.
    int
    `in` requires the field value to be equal to one of the specified enum values.
    `in` requires the field value to be equal to one of the specified enum values.
    int
    getNotIn(int index)
    `not_in` requires the field value to be not equal to any of the specified enum values.
    int
    `not_in` requires the field value to be not equal to any of the specified enum values.
    `not_in` requires the field value to be not equal to any of the specified enum values.
    boolean
    `const` requires the field value to exactly match the specified enum value.
    boolean
    `defined_only` requires the field value to be one of the defined values for this enum, failing on any undefined value.
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
     
    setConst(int value)
    `const` requires the field value to exactly match the specified enum value.
    setDefinedOnly(boolean value)
    `defined_only` requires the field value to be one of the defined values for this enum, failing on any undefined value.
    setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
     
    setIn(int index, int value)
    `in` requires the field value to be equal to one of the specified enum values.
    setNotIn(int index, int value)
    `not_in` requires the field value to be not equal to any of the specified enum values.
    setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
     
    setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
     

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

    getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, 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.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<EnumRules.Builder>
    • clear

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

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

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

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

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

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

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

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

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

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

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

      public EnumRules.Builder mergeFrom(EnumRules other)
    • isInitialized

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

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

      public boolean hasConst()
       `const` requires the field value to exactly match the specified enum value.
       If the field value doesn't match, an error message is generated.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must be exactly MY_ENUM_VALUE1.
         MyEnum value = 1 [(buf.validate.field).enum.const = 1];
       }
       ```
       
      optional int32 const = 1 [json_name = "const", (.buf.validate.priv.field) = { ... }
      Specified by:
      hasConst in interface EnumRulesOrBuilder
      Returns:
      Whether the const field is set.
    • getConst

      public int getConst()
       `const` requires the field value to exactly match the specified enum value.
       If the field value doesn't match, an error message is generated.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must be exactly MY_ENUM_VALUE1.
         MyEnum value = 1 [(buf.validate.field).enum.const = 1];
       }
       ```
       
      optional int32 const = 1 [json_name = "const", (.buf.validate.priv.field) = { ... }
      Specified by:
      getConst in interface EnumRulesOrBuilder
      Returns:
      The const.
    • setConst

      public EnumRules.Builder setConst(int value)
       `const` requires the field value to exactly match the specified enum value.
       If the field value doesn't match, an error message is generated.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must be exactly MY_ENUM_VALUE1.
         MyEnum value = 1 [(buf.validate.field).enum.const = 1];
       }
       ```
       
      optional int32 const = 1 [json_name = "const", (.buf.validate.priv.field) = { ... }
      Parameters:
      value - The const to set.
      Returns:
      This builder for chaining.
    • clearConst

      public EnumRules.Builder clearConst()
       `const` requires the field value to exactly match the specified enum value.
       If the field value doesn't match, an error message is generated.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must be exactly MY_ENUM_VALUE1.
         MyEnum value = 1 [(buf.validate.field).enum.const = 1];
       }
       ```
       
      optional int32 const = 1 [json_name = "const", (.buf.validate.priv.field) = { ... }
      Returns:
      This builder for chaining.
    • hasDefinedOnly

      public boolean hasDefinedOnly()
       `defined_only` requires the field value to be one of the defined values for
       this enum, failing on any undefined value.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must be a defined value of MyEnum.
         MyEnum value = 1 [(buf.validate.field).enum.defined_only = true];
       }
       ```
       
      optional bool defined_only = 2 [json_name = "definedOnly"];
      Specified by:
      hasDefinedOnly in interface EnumRulesOrBuilder
      Returns:
      Whether the definedOnly field is set.
    • getDefinedOnly

      public boolean getDefinedOnly()
       `defined_only` requires the field value to be one of the defined values for
       this enum, failing on any undefined value.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must be a defined value of MyEnum.
         MyEnum value = 1 [(buf.validate.field).enum.defined_only = true];
       }
       ```
       
      optional bool defined_only = 2 [json_name = "definedOnly"];
      Specified by:
      getDefinedOnly in interface EnumRulesOrBuilder
      Returns:
      The definedOnly.
    • setDefinedOnly

      public EnumRules.Builder setDefinedOnly(boolean value)
       `defined_only` requires the field value to be one of the defined values for
       this enum, failing on any undefined value.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must be a defined value of MyEnum.
         MyEnum value = 1 [(buf.validate.field).enum.defined_only = true];
       }
       ```
       
      optional bool defined_only = 2 [json_name = "definedOnly"];
      Parameters:
      value - The definedOnly to set.
      Returns:
      This builder for chaining.
    • clearDefinedOnly

      public EnumRules.Builder clearDefinedOnly()
       `defined_only` requires the field value to be one of the defined values for
       this enum, failing on any undefined value.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must be a defined value of MyEnum.
         MyEnum value = 1 [(buf.validate.field).enum.defined_only = true];
       }
       ```
       
      optional bool defined_only = 2 [json_name = "definedOnly"];
      Returns:
      This builder for chaining.
    • getInList

      public List<Integer> getInList()
       `in` requires the field value to be equal to one of the
      specified enum values. If the field value doesn't match any of the
      specified values, an error message is generated.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must be equal to one of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
       }
       ```
       
      repeated int32 in = 3 [json_name = "in", (.buf.validate.priv.field) = { ... }
      Specified by:
      getInList in interface EnumRulesOrBuilder
      Returns:
      A list containing the in.
    • getInCount

      public int getInCount()
       `in` requires the field value to be equal to one of the
      specified enum values. If the field value doesn't match any of the
      specified values, an error message is generated.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must be equal to one of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
       }
       ```
       
      repeated int32 in = 3 [json_name = "in", (.buf.validate.priv.field) = { ... }
      Specified by:
      getInCount in interface EnumRulesOrBuilder
      Returns:
      The count of in.
    • getIn

      public int getIn(int index)
       `in` requires the field value to be equal to one of the
      specified enum values. If the field value doesn't match any of the
      specified values, an error message is generated.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must be equal to one of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
       }
       ```
       
      repeated int32 in = 3 [json_name = "in", (.buf.validate.priv.field) = { ... }
      Specified by:
      getIn in interface EnumRulesOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The in at the given index.
    • setIn

      public EnumRules.Builder setIn(int index, int value)
       `in` requires the field value to be equal to one of the
      specified enum values. If the field value doesn't match any of the
      specified values, an error message is generated.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must be equal to one of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
       }
       ```
       
      repeated int32 in = 3 [json_name = "in", (.buf.validate.priv.field) = { ... }
      Parameters:
      index - The index to set the value at.
      value - The in to set.
      Returns:
      This builder for chaining.
    • addIn

      public EnumRules.Builder addIn(int value)
       `in` requires the field value to be equal to one of the
      specified enum values. If the field value doesn't match any of the
      specified values, an error message is generated.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must be equal to one of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
       }
       ```
       
      repeated int32 in = 3 [json_name = "in", (.buf.validate.priv.field) = { ... }
      Parameters:
      value - The in to add.
      Returns:
      This builder for chaining.
    • addAllIn

      public EnumRules.Builder addAllIn(Iterable<? extends Integer> values)
       `in` requires the field value to be equal to one of the
      specified enum values. If the field value doesn't match any of the
      specified values, an error message is generated.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must be equal to one of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
       }
       ```
       
      repeated int32 in = 3 [json_name = "in", (.buf.validate.priv.field) = { ... }
      Parameters:
      values - The in to add.
      Returns:
      This builder for chaining.
    • clearIn

      public EnumRules.Builder clearIn()
       `in` requires the field value to be equal to one of the
      specified enum values. If the field value doesn't match any of the
      specified values, an error message is generated.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must be equal to one of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
       }
       ```
       
      repeated int32 in = 3 [json_name = "in", (.buf.validate.priv.field) = { ... }
      Returns:
      This builder for chaining.
    • getNotInList

      public List<Integer> getNotInList()
       `not_in` requires the field value to be not equal to any of the
      specified enum values. If the field value matches one of the specified
       values, an error message is generated.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must not be equal to any of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
       }
       ```
       
      repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.priv.field) = { ... }
      Specified by:
      getNotInList in interface EnumRulesOrBuilder
      Returns:
      A list containing the notIn.
    • getNotInCount

      public int getNotInCount()
       `not_in` requires the field value to be not equal to any of the
      specified enum values. If the field value matches one of the specified
       values, an error message is generated.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must not be equal to any of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
       }
       ```
       
      repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.priv.field) = { ... }
      Specified by:
      getNotInCount in interface EnumRulesOrBuilder
      Returns:
      The count of notIn.
    • getNotIn

      public int getNotIn(int index)
       `not_in` requires the field value to be not equal to any of the
      specified enum values. If the field value matches one of the specified
       values, an error message is generated.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must not be equal to any of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
       }
       ```
       
      repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.priv.field) = { ... }
      Specified by:
      getNotIn in interface EnumRulesOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The notIn at the given index.
    • setNotIn

      public EnumRules.Builder setNotIn(int index, int value)
       `not_in` requires the field value to be not equal to any of the
      specified enum values. If the field value matches one of the specified
       values, an error message is generated.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must not be equal to any of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
       }
       ```
       
      repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.priv.field) = { ... }
      Parameters:
      index - The index to set the value at.
      value - The notIn to set.
      Returns:
      This builder for chaining.
    • addNotIn

      public EnumRules.Builder addNotIn(int value)
       `not_in` requires the field value to be not equal to any of the
      specified enum values. If the field value matches one of the specified
       values, an error message is generated.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must not be equal to any of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
       }
       ```
       
      repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.priv.field) = { ... }
      Parameters:
      value - The notIn to add.
      Returns:
      This builder for chaining.
    • addAllNotIn

      public EnumRules.Builder addAllNotIn(Iterable<? extends Integer> values)
       `not_in` requires the field value to be not equal to any of the
      specified enum values. If the field value matches one of the specified
       values, an error message is generated.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must not be equal to any of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
       }
       ```
       
      repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.priv.field) = { ... }
      Parameters:
      values - The notIn to add.
      Returns:
      This builder for chaining.
    • clearNotIn

      public EnumRules.Builder clearNotIn()
       `not_in` requires the field value to be not equal to any of the
      specified enum values. If the field value matches one of the specified
       values, an error message is generated.
      
       ```proto
       enum MyEnum {
         MY_ENUM_UNSPECIFIED = 0;
         MY_ENUM_VALUE1 = 1;
         MY_ENUM_VALUE2 = 2;
       }
      
       message MyMessage {
         // The field `value` must not be equal to any of the specified values.
         MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
       }
       ```
       
      repeated int32 not_in = 4 [json_name = "notIn", (.buf.validate.priv.field) = { ... }
      Returns:
      This builder for chaining.
    • setUnknownFields

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

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