Package build.buf.validate
Class MapRules.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessage.Builder<MapRules.Builder>
-
- build.buf.validate.MapRules.Builder
-
- All Implemented Interfaces:
MapRulesOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,java.lang.Cloneable
- Enclosing class:
- MapRules
public static final class MapRules.Builder extends com.google.protobuf.GeneratedMessage.Builder<MapRules.Builder> implements MapRulesOrBuilder
MapRules describe the constraints applied to `map` values.
Protobuf typebuf.validate.MapRules
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MapRulesbuild()MapRulesbuildPartial()MapRules.Builderclear()MapRules.BuilderclearKeys()Specifies the constraints to be applied to each key in the field.MapRules.BuilderclearMaxPairs()Specifies the maximum number of key-value pairs allowed.MapRules.BuilderclearMinPairs()Specifies the minimum number of key-value pairs allowed.MapRules.BuilderclearValues()Specifies the constraints to be applied to the value of each key in the field.MapRulesgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()FieldConstraintsgetKeys()Specifies the constraints to be applied to each key in the field.FieldConstraints.BuildergetKeysBuilder()Specifies the constraints to be applied to each key in the field.FieldConstraintsOrBuildergetKeysOrBuilder()Specifies the constraints to be applied to each key in the field.longgetMaxPairs()Specifies the maximum number of key-value pairs allowed.longgetMinPairs()Specifies the minimum number of key-value pairs allowed.FieldConstraintsgetValues()Specifies the constraints to be applied to the value of each key in the field.FieldConstraints.BuildergetValuesBuilder()Specifies the constraints to be applied to the value of each key in the field.FieldConstraintsOrBuildergetValuesOrBuilder()Specifies the constraints to be applied to the value of each key in the field.booleanhasKeys()Specifies the constraints to be applied to each key in the field.booleanhasMaxPairs()Specifies the maximum number of key-value pairs allowed.booleanhasMinPairs()Specifies the minimum number of key-value pairs allowed.booleanhasValues()Specifies the constraints to be applied to the value of each key in the field.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()MapRules.BuildermergeFrom(MapRules other)MapRules.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)MapRules.BuildermergeFrom(com.google.protobuf.Message other)MapRules.BuildermergeKeys(FieldConstraints value)Specifies the constraints to be applied to each key in the field.MapRules.BuildermergeValues(FieldConstraints value)Specifies the constraints to be applied to the value of each key in the field.MapRules.BuildersetKeys(FieldConstraints value)Specifies the constraints to be applied to each key in the field.MapRules.BuildersetKeys(FieldConstraints.Builder builderForValue)Specifies the constraints to be applied to each key in the field.MapRules.BuildersetMaxPairs(long value)Specifies the maximum number of key-value pairs allowed.MapRules.BuildersetMinPairs(long value)Specifies the minimum number of key-value pairs allowed.MapRules.BuildersetValues(FieldConstraints value)Specifies the constraints to be applied to the value of each key in the field.MapRules.BuildersetValues(FieldConstraints.Builder builderForValue)Specifies the constraints to be applied to the value of each key in the field.-
Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, 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
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<MapRules.Builder>
-
clear
public MapRules.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<MapRules.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<MapRules.Builder>
-
getDefaultInstanceForType
public MapRules getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public MapRules build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public MapRules buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
public MapRules.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MapRules.Builder>
-
mergeFrom
public MapRules.Builder mergeFrom(MapRules other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<MapRules.Builder>
-
mergeFrom
public MapRules.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MapRules.Builder>- Throws:
java.io.IOException
-
hasMinPairs
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 [(.buf.validate.priv.field) = { ... }- Specified by:
hasMinPairsin interfaceMapRulesOrBuilder- Returns:
- Whether the minPairs field is set.
-
getMinPairs
public 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) = { ... }- Specified by:
getMinPairsin interfaceMapRulesOrBuilder- Returns:
- The minPairs.
-
setMinPairs
public 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 [(.buf.validate.priv.field) = { ... }- Parameters:
value- The minPairs to set.- Returns:
- This builder for chaining.
-
clearMinPairs
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 [(.buf.validate.priv.field) = { ... }- Returns:
- This builder for chaining.
-
hasMaxPairs
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 [(.buf.validate.priv.field) = { ... }- Specified by:
hasMaxPairsin interfaceMapRulesOrBuilder- Returns:
- Whether the maxPairs field is set.
-
getMaxPairs
public 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) = { ... }- Specified by:
getMaxPairsin interfaceMapRulesOrBuilder- Returns:
- The maxPairs.
-
setMaxPairs
public 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 [(.buf.validate.priv.field) = { ... }- Parameters:
value- The maxPairs to set.- Returns:
- This builder for chaining.
-
clearMaxPairs
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 [(.buf.validate.priv.field) = { ... }- Returns:
- This builder for chaining.
-
hasKeys
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;- Specified by:
hasKeysin interfaceMapRulesOrBuilder- Returns:
- Whether the keys field is set.
-
getKeys
public 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;- Specified by:
getKeysin interfaceMapRulesOrBuilder- Returns:
- The keys.
-
setKeys
public 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;
-
setKeys
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;
-
mergeKeys
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;
-
clearKeys
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;
-
getKeysBuilder
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;
-
getKeysOrBuilder
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;- Specified by:
getKeysOrBuilderin interfaceMapRulesOrBuilder
-
hasValues
public 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;- Specified by:
hasValuesin interfaceMapRulesOrBuilder- Returns:
- Whether the values field is set.
-
getValues
public 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;- Specified by:
getValuesin interfaceMapRulesOrBuilder- Returns:
- The values.
-
setValues
public 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;
-
setValues
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;
-
mergeValues
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;
-
clearValues
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;
-
getValuesBuilder
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;
-
getValuesOrBuilder
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;- Specified by:
getValuesOrBuilderin interfaceMapRulesOrBuilder
-
-