public static final class MapRules.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder> implements MapRulesOrBuilder
MapRules describe the constraints applied to `map` values.Protobuf type
buf.validate.MapRules| Modifier and Type | Method and Description |
|---|---|
MapRules.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
MapRules |
build() |
MapRules |
buildPartial() |
MapRules.Builder |
clear() |
MapRules.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
MapRules.Builder |
clearKeys()
Specifies the constraints to be applied to each key in the field.
|
MapRules.Builder |
clearMaxPairs()
Specifies the maximum number of key-value pairs allowed.
|
MapRules.Builder |
clearMinPairs()
Specifies the minimum number of key-value pairs allowed.
|
MapRules.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
MapRules.Builder |
clearValues()
Specifies the constraints to be applied to the value of each key in the
field.
|
MapRules.Builder |
clone() |
MapRules |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
FieldConstraints |
getKeys()
Specifies the constraints to be applied to each key in the field.
|
FieldConstraints.Builder |
getKeysBuilder()
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.
|
FieldConstraints.Builder |
getValuesBuilder()
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.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
MapRules.Builder |
mergeKeys(FieldConstraints value)
Specifies the constraints to be applied to each key in the field.
|
MapRules.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
MapRules.Builder |
mergeValues(FieldConstraints value)
Specifies the constraints to be applied to the value of each key in the
field.
|
MapRules.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
MapRules.Builder |
setKeys(FieldConstraints.Builder builderForValue)
Specifies the constraints to be applied to each key in the field.
|
MapRules.Builder |
setKeys(FieldConstraints value)
Specifies the constraints to be applied to each key in the field.
|
MapRules.Builder |
setMaxPairs(long value)
Specifies the maximum number of key-value pairs allowed.
|
MapRules.Builder |
setMinPairs(long value)
Specifies the minimum number of key-value pairs allowed.
|
MapRules.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
MapRules.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
MapRules.Builder |
setValues(FieldConstraints.Builder builderForValue)
Specifies the constraints to be applied to the value of each key in the
field.
|
MapRules.Builder |
setValues(FieldConstraints value)
Specifies the constraints to be applied to the value of each key in the
field.
|
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, isInitialized, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>public MapRules.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>public MapRules getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic MapRules build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic MapRules buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic MapRules.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>public MapRules.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>public MapRules.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>public MapRules.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>public MapRules.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>public MapRules.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>public 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 [json_name = "minPairs", (.buf.validate.priv.field) = { ... }hasMinPairs in interface MapRulesOrBuilderpublic 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) = { ... }getMinPairs in interface MapRulesOrBuilderpublic MapRules.Builder setMinPairs(long value)
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) = { ... }value - The minPairs to set.public MapRules.Builder clearMinPairs()
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) = { ... }public 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) = { ... }hasMaxPairs in interface MapRulesOrBuilderpublic 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) = { ... }getMaxPairs in interface MapRulesOrBuilderpublic MapRules.Builder setMaxPairs(long value)
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) = { ... }value - The maxPairs to set.public MapRules.Builder clearMaxPairs()
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) = { ... }public 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"];hasKeys in interface MapRulesOrBuilderpublic 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"];getKeys in interface MapRulesOrBuilderpublic MapRules.Builder setKeys(FieldConstraints value)
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"];public MapRules.Builder setKeys(FieldConstraints.Builder builderForValue)
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"];public MapRules.Builder mergeKeys(FieldConstraints value)
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"];public MapRules.Builder clearKeys()
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"];public FieldConstraints.Builder getKeysBuilder()
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"];public 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"];getKeysOrBuilder in interface MapRulesOrBuilderpublic 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"];hasValues in interface MapRulesOrBuilderpublic 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"];getValues in interface MapRulesOrBuilderpublic MapRules.Builder setValues(FieldConstraints value)
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"];public MapRules.Builder setValues(FieldConstraints.Builder builderForValue)
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"];public MapRules.Builder mergeValues(FieldConstraints value)
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"];public MapRules.Builder clearValues()
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"];public FieldConstraints.Builder getValuesBuilder()
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"];public 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"];getValuesOrBuilder in interface MapRulesOrBuilderpublic final MapRules.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>public final MapRules.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>Copyright © 2023. All rights reserved.