Interface MapRulesOrBuilder

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

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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      FieldConstraints getKeys()
      Specifies the constraints to be applied to each key in the field.
      FieldConstraintsOrBuilder getKeysOrBuilder()
      Specifies the constraints to be applied to each key in the field.
      long getMaxPairs()
      Specifies the maximum number of key-value pairs allowed.
      long getMinPairs()
      Specifies the minimum number of key-value pairs allowed.
      FieldConstraints getValues()
      Specifies the constraints to be applied to the value of each key in the field.
      FieldConstraintsOrBuilder getValuesOrBuilder()
      Specifies the constraints to be applied to the value of each key in the field.
      boolean hasKeys()
      Specifies the constraints to be applied to each key in the field.
      boolean hasMaxPairs()
      Specifies the maximum number of key-value pairs allowed.
      boolean hasMinPairs()
      Specifies the minimum number of key-value pairs allowed.
      boolean hasValues()
      Specifies the constraints to be applied to the value of each key in the field.
      • 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

      • hasMinPairs

        boolean hasMinPairs()
         Specifies the minimum number of key-value pairs allowed. If the field has
         fewer key-value pairs than specified, an error message is generated.
        
         ```proto
         message MyMap {
         // The field `value` must have at least 2 key-value pairs.
         map<string, string> value = 1 [(buf.validate.field).map.min_pairs = 2];
         }
         ```
         
        optional uint64 min_pairs = 1 [(.buf.validate.priv.field) = { ... }
        Returns:
        Whether the minPairs field is set.
      • getMinPairs

        long getMinPairs()
         Specifies the minimum number of key-value pairs allowed. If the field has
         fewer key-value pairs than specified, an error message is generated.
        
         ```proto
         message MyMap {
         // The field `value` must have at least 2 key-value pairs.
         map<string, string> value = 1 [(buf.validate.field).map.min_pairs = 2];
         }
         ```
         
        optional uint64 min_pairs = 1 [(.buf.validate.priv.field) = { ... }
        Returns:
        The minPairs.
      • hasMaxPairs

        boolean hasMaxPairs()
         Specifies the maximum number of key-value pairs allowed. If the field has
         more key-value pairs than specified, an error message is generated.
        
         ```proto
         message MyMap {
         // The field `value` must have at most 3 key-value pairs.
         map<string, string> value = 1 [(buf.validate.field).map.max_pairs = 3];
         }
         ```
         
        optional uint64 max_pairs = 2 [(.buf.validate.priv.field) = { ... }
        Returns:
        Whether the maxPairs field is set.
      • getMaxPairs

        long getMaxPairs()
         Specifies the maximum number of key-value pairs allowed. If the field has
         more key-value pairs than specified, an error message is generated.
        
         ```proto
         message MyMap {
         // The field `value` must have at most 3 key-value pairs.
         map<string, string> value = 1 [(buf.validate.field).map.max_pairs = 3];
         }
         ```
         
        optional uint64 max_pairs = 2 [(.buf.validate.priv.field) = { ... }
        Returns:
        The maxPairs.
      • hasKeys

        boolean hasKeys()
         Specifies the constraints to be applied to each key in the field.
        
         ```proto
         message MyMap {
         // The keys in the field `value` must follow the specified constraints.
         map<string, string> value = 1 [(buf.validate.field).map.keys = {
         string: {
         min_len: 3
         max_len: 10
         }
         }];
         }
         ```
         
        optional .buf.validate.FieldConstraints keys = 4;
        Returns:
        Whether the keys field is set.
      • getKeys

        FieldConstraints getKeys()
         Specifies the constraints to be applied to each key in the field.
        
         ```proto
         message MyMap {
         // The keys in the field `value` must follow the specified constraints.
         map<string, string> value = 1 [(buf.validate.field).map.keys = {
         string: {
         min_len: 3
         max_len: 10
         }
         }];
         }
         ```
         
        optional .buf.validate.FieldConstraints keys = 4;
        Returns:
        The keys.
      • getKeysOrBuilder

        FieldConstraintsOrBuilder getKeysOrBuilder()
         Specifies the constraints to be applied to each key in the field.
        
         ```proto
         message MyMap {
         // The keys in the field `value` must follow the specified constraints.
         map<string, string> value = 1 [(buf.validate.field).map.keys = {
         string: {
         min_len: 3
         max_len: 10
         }
         }];
         }
         ```
         
        optional .buf.validate.FieldConstraints keys = 4;
      • hasValues

        boolean hasValues()
         Specifies the constraints to be applied to the value of each key in the
         field. Message values will still have their validations evaluated unless
         skip is specified here.
        
         ```proto
         message MyMap {
         // The values in the field `value` must follow the specified constraints.
         map<string, string> value = 1 [(buf.validate.field).map.values = {
         string: {
         min_len: 5
         max_len: 20
         }
         }];
         }
         ```
         
        optional .buf.validate.FieldConstraints values = 5;
        Returns:
        Whether the values field is set.
      • getValues

        FieldConstraints getValues()
         Specifies the constraints to be applied to the value of each key in the
         field. Message values will still have their validations evaluated unless
         skip is specified here.
        
         ```proto
         message MyMap {
         // The values in the field `value` must follow the specified constraints.
         map<string, string> value = 1 [(buf.validate.field).map.values = {
         string: {
         min_len: 5
         max_len: 20
         }
         }];
         }
         ```
         
        optional .buf.validate.FieldConstraints values = 5;
        Returns:
        The values.
      • getValuesOrBuilder

        FieldConstraintsOrBuilder getValuesOrBuilder()
         Specifies the constraints to be applied to the value of each key in the
         field. Message values will still have their validations evaluated unless
         skip is specified here.
        
         ```proto
         message MyMap {
         // The values in the field `value` must follow the specified constraints.
         map<string, string> value = 1 [(buf.validate.field).map.values = {
         string: {
         min_len: 5
         max_len: 20
         }
         }];
         }
         ```
         
        optional .buf.validate.FieldConstraints values = 5;