public interface MapRulesOrBuilder
extends com.google.protobuf.MessageOrBuilder
| Modifier and Type | Method and 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.
|
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofboolean 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 [json_name = "minPairs", (.buf.validate.priv.field) = { ... }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 [json_name = "minPairs", (.buf.validate.priv.field) = { ... }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 [json_name = "maxPairs", (.buf.validate.priv.field) = { ... }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 [json_name = "maxPairs", (.buf.validate.priv.field) = { ... }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 [json_name = "keys"];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 [json_name = "keys"];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 [json_name = "keys"];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 [json_name = "values"];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 [json_name = "values"];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 [json_name = "values"];Copyright © 2024. All rights reserved.