Class AnyRules.Builder

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

public static final class AnyRules.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<AnyRules.Builder> implements AnyRulesOrBuilder
 AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type.
 
Protobuf type buf.validate.AnyRules
  • Method Summary

    Modifier and Type
    Method
    Description
    `in` requires the field's `type_url` to be equal to one of the specified values.
    requires the field's type_url to be not equal to any of the specified values.
    addIn(String value)
    `in` requires the field's `type_url` to be equal to one of the specified values.
    addInBytes(com.google.protobuf.ByteString value)
    `in` requires the field's `type_url` to be equal to one of the specified values.
    requires the field's type_url to be not equal to any of the specified values.
    addNotInBytes(com.google.protobuf.ByteString value)
    requires the field's type_url to be not equal to any of the specified values.
    addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
     
     
     
     
    clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
     
    `in` requires the field's `type_url` to be equal to one of the specified values.
    requires the field's type_url to be not equal to any of the specified values.
    clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
     
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    getIn(int index)
    `in` requires the field's `type_url` to be equal to one of the specified values.
    com.google.protobuf.ByteString
    getInBytes(int index)
    `in` requires the field's `type_url` to be equal to one of the specified values.
    int
    `in` requires the field's `type_url` to be equal to one of the specified values.
    com.google.protobuf.ProtocolStringList
    `in` requires the field's `type_url` to be equal to one of the specified values.
    getNotIn(int index)
    requires the field's type_url to be not equal to any of the specified values.
    com.google.protobuf.ByteString
    getNotInBytes(int index)
    requires the field's type_url to be not equal to any of the specified values.
    int
    requires the field's type_url to be not equal to any of the specified values.
    com.google.protobuf.ProtocolStringList
    requires the field's type_url to be not equal to any of the specified values.
    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)
     
    setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
     
    setIn(int index, String value)
    `in` requires the field's `type_url` to be equal to one of the specified values.
    setNotIn(int index, String value)
    requires the field's type_url to be not equal to any of the specified 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<AnyRules.Builder>
    • clear

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

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

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

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

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

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

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

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

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

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

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

      public AnyRules.Builder mergeFrom(AnyRules other)
    • isInitialized

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

      public AnyRules.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<AnyRules.Builder>
      Throws:
      IOException
    • getInList

      public com.google.protobuf.ProtocolStringList getInList()
       `in` requires the field's `type_url` to be equal to one of the
      specified values. If it doesn't match any of the specified values, an error
       message is generated.
      
       ```proto
       message MyAny {
         //  The `value` field must have a `type_url` equal to one of the specified values.
         google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
       }
       ```
       
      repeated string in = 2 [json_name = "in"];
      Specified by:
      getInList in interface AnyRulesOrBuilder
      Returns:
      A list containing the in.
    • getInCount

      public int getInCount()
       `in` requires the field's `type_url` to be equal to one of the
      specified values. If it doesn't match any of the specified values, an error
       message is generated.
      
       ```proto
       message MyAny {
         //  The `value` field must have a `type_url` equal to one of the specified values.
         google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
       }
       ```
       
      repeated string in = 2 [json_name = "in"];
      Specified by:
      getInCount in interface AnyRulesOrBuilder
      Returns:
      The count of in.
    • getIn

      public String getIn(int index)
       `in` requires the field's `type_url` to be equal to one of the
      specified values. If it doesn't match any of the specified values, an error
       message is generated.
      
       ```proto
       message MyAny {
         //  The `value` field must have a `type_url` equal to one of the specified values.
         google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
       }
       ```
       
      repeated string in = 2 [json_name = "in"];
      Specified by:
      getIn in interface AnyRulesOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The in at the given index.
    • getInBytes

      public com.google.protobuf.ByteString getInBytes(int index)
       `in` requires the field's `type_url` to be equal to one of the
      specified values. If it doesn't match any of the specified values, an error
       message is generated.
      
       ```proto
       message MyAny {
         //  The `value` field must have a `type_url` equal to one of the specified values.
         google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
       }
       ```
       
      repeated string in = 2 [json_name = "in"];
      Specified by:
      getInBytes in interface AnyRulesOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the in at the given index.
    • setIn

      public AnyRules.Builder setIn(int index, String value)
       `in` requires the field's `type_url` to be equal to one of the
      specified values. If it doesn't match any of the specified values, an error
       message is generated.
      
       ```proto
       message MyAny {
         //  The `value` field must have a `type_url` equal to one of the specified values.
         google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
       }
       ```
       
      repeated string in = 2 [json_name = "in"];
      Parameters:
      index - The index to set the value at.
      value - The in to set.
      Returns:
      This builder for chaining.
    • addIn

      public AnyRules.Builder addIn(String value)
       `in` requires the field's `type_url` to be equal to one of the
      specified values. If it doesn't match any of the specified values, an error
       message is generated.
      
       ```proto
       message MyAny {
         //  The `value` field must have a `type_url` equal to one of the specified values.
         google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
       }
       ```
       
      repeated string in = 2 [json_name = "in"];
      Parameters:
      value - The in to add.
      Returns:
      This builder for chaining.
    • addAllIn

      public AnyRules.Builder addAllIn(Iterable<String> values)
       `in` requires the field's `type_url` to be equal to one of the
      specified values. If it doesn't match any of the specified values, an error
       message is generated.
      
       ```proto
       message MyAny {
         //  The `value` field must have a `type_url` equal to one of the specified values.
         google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
       }
       ```
       
      repeated string in = 2 [json_name = "in"];
      Parameters:
      values - The in to add.
      Returns:
      This builder for chaining.
    • clearIn

      public AnyRules.Builder clearIn()
       `in` requires the field's `type_url` to be equal to one of the
      specified values. If it doesn't match any of the specified values, an error
       message is generated.
      
       ```proto
       message MyAny {
         //  The `value` field must have a `type_url` equal to one of the specified values.
         google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
       }
       ```
       
      repeated string in = 2 [json_name = "in"];
      Returns:
      This builder for chaining.
    • addInBytes

      public AnyRules.Builder addInBytes(com.google.protobuf.ByteString value)
       `in` requires the field's `type_url` to be equal to one of the
      specified values. If it doesn't match any of the specified values, an error
       message is generated.
      
       ```proto
       message MyAny {
         //  The `value` field must have a `type_url` equal to one of the specified values.
         google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
       }
       ```
       
      repeated string in = 2 [json_name = "in"];
      Parameters:
      value - The bytes of the in to add.
      Returns:
      This builder for chaining.
    • getNotInList

      public com.google.protobuf.ProtocolStringList getNotInList()
       requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
      
       ```proto
       message MyAny {
         // The field `value` must not have a `type_url` equal to any of the specified values.
         google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
       }
       ```
       
      repeated string not_in = 3 [json_name = "notIn"];
      Specified by:
      getNotInList in interface AnyRulesOrBuilder
      Returns:
      A list containing the notIn.
    • getNotInCount

      public int getNotInCount()
       requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
      
       ```proto
       message MyAny {
         // The field `value` must not have a `type_url` equal to any of the specified values.
         google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
       }
       ```
       
      repeated string not_in = 3 [json_name = "notIn"];
      Specified by:
      getNotInCount in interface AnyRulesOrBuilder
      Returns:
      The count of notIn.
    • getNotIn

      public String getNotIn(int index)
       requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
      
       ```proto
       message MyAny {
         // The field `value` must not have a `type_url` equal to any of the specified values.
         google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
       }
       ```
       
      repeated string not_in = 3 [json_name = "notIn"];
      Specified by:
      getNotIn in interface AnyRulesOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The notIn at the given index.
    • getNotInBytes

      public com.google.protobuf.ByteString getNotInBytes(int index)
       requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
      
       ```proto
       message MyAny {
         // The field `value` must not have a `type_url` equal to any of the specified values.
         google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
       }
       ```
       
      repeated string not_in = 3 [json_name = "notIn"];
      Specified by:
      getNotInBytes in interface AnyRulesOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the notIn at the given index.
    • setNotIn

      public AnyRules.Builder setNotIn(int index, String value)
       requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
      
       ```proto
       message MyAny {
         // The field `value` must not have a `type_url` equal to any of the specified values.
         google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
       }
       ```
       
      repeated string not_in = 3 [json_name = "notIn"];
      Parameters:
      index - The index to set the value at.
      value - The notIn to set.
      Returns:
      This builder for chaining.
    • addNotIn

      public AnyRules.Builder addNotIn(String value)
       requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
      
       ```proto
       message MyAny {
         // The field `value` must not have a `type_url` equal to any of the specified values.
         google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
       }
       ```
       
      repeated string not_in = 3 [json_name = "notIn"];
      Parameters:
      value - The notIn to add.
      Returns:
      This builder for chaining.
    • addAllNotIn

      public AnyRules.Builder addAllNotIn(Iterable<String> values)
       requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
      
       ```proto
       message MyAny {
         // The field `value` must not have a `type_url` equal to any of the specified values.
         google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
       }
       ```
       
      repeated string not_in = 3 [json_name = "notIn"];
      Parameters:
      values - The notIn to add.
      Returns:
      This builder for chaining.
    • clearNotIn

      public AnyRules.Builder clearNotIn()
       requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
      
       ```proto
       message MyAny {
         // The field `value` must not have a `type_url` equal to any of the specified values.
         google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
       }
       ```
       
      repeated string not_in = 3 [json_name = "notIn"];
      Returns:
      This builder for chaining.
    • addNotInBytes

      public AnyRules.Builder addNotInBytes(com.google.protobuf.ByteString value)
       requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
      
       ```proto
       message MyAny {
         // The field `value` must not have a `type_url` equal to any of the specified values.
         google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
       }
       ```
       
      repeated string not_in = 3 [json_name = "notIn"];
      Parameters:
      value - The bytes of the notIn to add.
      Returns:
      This builder for chaining.
    • setUnknownFields

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

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