public final class MapRules extends com.google.protobuf.GeneratedMessageV3 implements MapRulesOrBuilder
MapRules describe the constraints applied to `map` values.Protobuf type
buf.validate.MapRules| Modifier and Type | Class and Description |
|---|---|
static class |
MapRules.Builder
MapRules describe the constraints applied to `map` values.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
KEYS_FIELD_NUMBER |
static int |
MAX_PAIRS_FIELD_NUMBER |
static int |
MIN_PAIRS_FIELD_NUMBER |
static int |
VALUES_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static MapRules |
getDefaultInstance() |
MapRules |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
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.
|
com.google.protobuf.Parser<MapRules> |
getParserForType() |
int |
getSerializedSize() |
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.
|
int |
hashCode() |
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() |
boolean |
isInitialized() |
static MapRules.Builder |
newBuilder() |
static MapRules.Builder |
newBuilder(MapRules prototype) |
MapRules.Builder |
newBuilderForType() |
protected MapRules.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static MapRules |
parseDelimitedFrom(InputStream input) |
static MapRules |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MapRules |
parseFrom(byte[] data) |
static MapRules |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MapRules |
parseFrom(ByteBuffer data) |
static MapRules |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MapRules |
parseFrom(com.google.protobuf.ByteString data) |
static MapRules |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MapRules |
parseFrom(com.google.protobuf.CodedInputStream input) |
static MapRules |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MapRules |
parseFrom(InputStream input) |
static MapRules |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<MapRules> |
parser() |
MapRules.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int MIN_PAIRS_FIELD_NUMBER
public static final int MAX_PAIRS_FIELD_NUMBER
public static final int KEYS_FIELD_NUMBER
public static final int VALUES_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public 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 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 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 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 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 boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static MapRules parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MapRules parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MapRules parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MapRules parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MapRules parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MapRules parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MapRules parseFrom(InputStream input) throws IOException
IOExceptionpublic static MapRules parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static MapRules parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static MapRules parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static MapRules parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static MapRules parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic MapRules.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static MapRules.Builder newBuilder()
public static MapRules.Builder newBuilder(MapRules prototype)
public MapRules.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected MapRules.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static MapRules getDefaultInstance()
public static com.google.protobuf.Parser<MapRules> parser()
public com.google.protobuf.Parser<MapRules> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public MapRules getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024. All rights reserved.