Package build.buf.validate
Class MapRules.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.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,Cloneable
- Enclosing class:
- MapRules
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-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()clearField(com.google.protobuf.Descriptors.FieldDescriptor field) Specifies the constraints to be applied to each key in the field.Specifies the maximum number of key-value pairs allowed.Specifies the minimum number of key-value pairs allowed.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) Specifies the constraints to be applied to the value of each key in the field.clone()static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetKeys()Specifies the constraints to be applied to each key in the field.Specifies the constraints to be applied to each key in the field.Specifies the constraints to be applied to each key in the field.longSpecifies the maximum number of key-value pairs allowed.longSpecifies the minimum number of key-value pairs allowed.Specifies the constraints to be applied to the value of each key in the field.Specifies the constraints to be applied to the value of each key in the field.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.booleanSpecifies the maximum number of key-value pairs allowed.booleanSpecifies the minimum number of key-value pairs allowed.booleanSpecifies the constraints to be applied to the value of each key in the field.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeKeys(FieldConstraints value) Specifies the constraints to be applied to each key in the field.final MapRules.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) mergeValues(FieldConstraints value) Specifies the constraints to be applied to the value of each key in the field.setKeys(FieldConstraints value) Specifies the constraints to be applied to each key in the field.setKeys(FieldConstraints.Builder builderForValue) Specifies the constraints to be applied to each key in the field.setMaxPairs(long value) Specifies the maximum number of key-value pairs allowed.setMinPairs(long value) Specifies the minimum number of key-value pairs allowed.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) final MapRules.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setValues(FieldConstraints value) Specifies the constraints to be applied to the value of each key in the field.setValues(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.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.Builder<MapRules.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>
-
setField
public MapRules.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>
-
setRepeatedField
public MapRules.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>
-
addRepeatedField
public MapRules.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<MapRules.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>
-
mergeFrom
public MapRules.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws 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:
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 [json_name = "minPairs", (.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 [json_name = "minPairs", (.buf.validate.priv.field) = { ... }- Specified by:
getMinPairsin interfaceMapRulesOrBuilder- Returns:
- The minPairs.
-
setMinPairs
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) = { ... }- Parameters:
value- The minPairs to set.- Returns:
- This builder for chaining.
-
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) = { ... }- 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 [json_name = "maxPairs", (.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 [json_name = "maxPairs", (.buf.validate.priv.field) = { ... }- Specified by:
getMaxPairsin interfaceMapRulesOrBuilder- Returns:
- The maxPairs.
-
setMaxPairs
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) = { ... }- Parameters:
value- The maxPairs to set.- Returns:
- This builder for chaining.
-
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) = { ... }- 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 [json_name = "keys"];- Specified by:
hasKeysin interfaceMapRulesOrBuilder- Returns:
- Whether the keys field is set.
-
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"];- Specified by:
getKeysin interfaceMapRulesOrBuilder- Returns:
- The keys.
-
setKeys
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"]; -
setKeys
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"]; -
mergeKeys
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"]; -
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"]; -
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"]; -
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"];- 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 [json_name = "values"];- Specified by:
hasValuesin interfaceMapRulesOrBuilder- Returns:
- Whether the values field is set.
-
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"];- Specified by:
getValuesin interfaceMapRulesOrBuilder- Returns:
- The values.
-
setValues
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"]; -
setValues
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"]; -
mergeValues
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"]; -
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"]; -
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"]; -
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"];- Specified by:
getValuesOrBuilderin interfaceMapRulesOrBuilder
-
setUnknownFields
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>
-
mergeUnknownFields
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<MapRules.Builder>
-