Interface RepeatedRulesOrBuilder

  • All Superinterfaces:
    com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder
    All Known Implementing Classes:
    RepeatedRules, RepeatedRules.Builder

    public interface RepeatedRulesOrBuilder
    extends com.google.protobuf.MessageOrBuilder
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      FieldConstraints getItems()
      `items` details the constraints to be applied to each item in the field.
      FieldConstraintsOrBuilder getItemsOrBuilder()
      `items` details the constraints to be applied to each item in the field.
      long getMaxItems()
      `max_items` denotes that this field must not exceed a certain number of items as the upper limit.
      long getMinItems()
      `min_items` requires that this field must contain at least the specified minimum number of items.
      boolean getUnique()
      `unique` indicates that all elements in this field must be unique.
      boolean hasItems()
      `items` details the constraints to be applied to each item in the field.
      boolean hasMaxItems()
      `max_items` denotes that this field must not exceed a certain number of items as the upper limit.
      boolean hasMinItems()
      `min_items` requires that this field must contain at least the specified minimum number of items.
      boolean hasUnique()
      `unique` indicates that all elements in this field must be unique.
      • Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

        isInitialized
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • Method Detail

      • hasMinItems

        boolean hasMinItems()
         `min_items` requires that this field must contain at least the specified
         minimum number of items.
        
         Note that `min_items = 1` is equivalent to setting a field as `required`.
        
         ```proto
         message MyRepeated {
         // value must contain at least  2 items
         repeated string value = 1 [(buf.validate.field).repeated.min_items = 2];
         }
         ```
         
        optional uint64 min_items = 1 [(.buf.validate.priv.field) = { ... }
        Returns:
        Whether the minItems field is set.
      • getMinItems

        long getMinItems()
         `min_items` requires that this field must contain at least the specified
         minimum number of items.
        
         Note that `min_items = 1` is equivalent to setting a field as `required`.
        
         ```proto
         message MyRepeated {
         // value must contain at least  2 items
         repeated string value = 1 [(buf.validate.field).repeated.min_items = 2];
         }
         ```
         
        optional uint64 min_items = 1 [(.buf.validate.priv.field) = { ... }
        Returns:
        The minItems.
      • hasMaxItems

        boolean hasMaxItems()
         `max_items` denotes that this field must not exceed a
         certain number of items as the upper limit. If the field contains more
         items than specified, an error message will be generated, requiring the
         field to maintain no more than the specified number of items.
        
         ```proto
         message MyRepeated {
         // value must contain no more than 3 item(s)
         repeated string value = 1 [(buf.validate.field).repeated.max_items = 3];
         }
         ```
         
        optional uint64 max_items = 2 [(.buf.validate.priv.field) = { ... }
        Returns:
        Whether the maxItems field is set.
      • getMaxItems

        long getMaxItems()
         `max_items` denotes that this field must not exceed a
         certain number of items as the upper limit. If the field contains more
         items than specified, an error message will be generated, requiring the
         field to maintain no more than the specified number of items.
        
         ```proto
         message MyRepeated {
         // value must contain no more than 3 item(s)
         repeated string value = 1 [(buf.validate.field).repeated.max_items = 3];
         }
         ```
         
        optional uint64 max_items = 2 [(.buf.validate.priv.field) = { ... }
        Returns:
        The maxItems.
      • hasUnique

        boolean hasUnique()
         `unique` indicates that all elements in this field must
         be unique. This constraint is strictly applicable to scalar and enum
         types, with message types not being supported.
        
         ```proto
         message MyRepeated {
         // repeated value must contain unique items
         repeated string value = 1 [(buf.validate.field).repeated.unique = true];
         }
         ```
         
        optional bool unique = 3 [(.buf.validate.priv.field) = { ... }
        Returns:
        Whether the unique field is set.
      • getUnique

        boolean getUnique()
         `unique` indicates that all elements in this field must
         be unique. This constraint is strictly applicable to scalar and enum
         types, with message types not being supported.
        
         ```proto
         message MyRepeated {
         // repeated value must contain unique items
         repeated string value = 1 [(buf.validate.field).repeated.unique = true];
         }
         ```
         
        optional bool unique = 3 [(.buf.validate.priv.field) = { ... }
        Returns:
        The unique.
      • hasItems

        boolean hasItems()
         `items` details the constraints to be applied to each item
         in the field. Even for repeated message fields, validation is executed
         against each item unless skip is explicitly specified.
        
         ```proto
         message MyRepeated {
         // The items in the field `value` must follow the specified constraints.
         repeated string value = 1 [(buf.validate.field).repeated.items = {
         string: {
         min_len: 3
         max_len: 10
         }
         }];
         }
         ```
         
        optional .buf.validate.FieldConstraints items = 4;
        Returns:
        Whether the items field is set.
      • getItems

        FieldConstraints getItems()
         `items` details the constraints to be applied to each item
         in the field. Even for repeated message fields, validation is executed
         against each item unless skip is explicitly specified.
        
         ```proto
         message MyRepeated {
         // The items in the field `value` must follow the specified constraints.
         repeated string value = 1 [(buf.validate.field).repeated.items = {
         string: {
         min_len: 3
         max_len: 10
         }
         }];
         }
         ```
         
        optional .buf.validate.FieldConstraints items = 4;
        Returns:
        The items.
      • getItemsOrBuilder

        FieldConstraintsOrBuilder getItemsOrBuilder()
         `items` details the constraints to be applied to each item
         in the field. Even for repeated message fields, validation is executed
         against each item unless skip is explicitly specified.
        
         ```proto
         message MyRepeated {
         // The items in the field `value` must follow the specified constraints.
         repeated string value = 1 [(buf.validate.field).repeated.items = {
         string: {
         min_len: 3
         max_len: 10
         }
         }];
         }
         ```
         
        optional .buf.validate.FieldConstraints items = 4;