public final class RepeatedRules extends com.google.protobuf.GeneratedMessageV3 implements RepeatedRulesOrBuilder
RepeatedRules describe the constraints applied to `repeated` values.Protobuf type
buf.validate.RepeatedRules| Modifier and Type | Class and Description |
|---|---|
static class |
RepeatedRules.Builder
RepeatedRules describe the constraints applied to `repeated` 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 |
ITEMS_FIELD_NUMBER |
static int |
MAX_ITEMS_FIELD_NUMBER |
static int |
MIN_ITEMS_FIELD_NUMBER |
static int |
UNIQUE_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
static RepeatedRules |
getDefaultInstance() |
RepeatedRules |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
FieldConstraints |
getItems()
`items` details the constraints to be applied to each item
in the field.
|
FieldConstraintsOrBuilder |
getItemsOrBuilder()
`items` details the constraints to be applied to each item
in the field.
|
long |
getMaxItems()
`max_items` denotes that this field must not exceed a
certain number of items as the upper limit.
|
long |
getMinItems()
`min_items` requires that this field must contain at least the specified
minimum number of items.
|
com.google.protobuf.Parser<RepeatedRules> |
getParserForType() |
boolean |
getUnique()
`unique` indicates that all elements in this field must
be unique.
|
boolean |
hasItems()
`items` details the constraints to be applied to each item
in the field.
|
boolean |
hasMaxItems()
`max_items` denotes that this field must not exceed a
certain number of items as the upper limit.
|
boolean |
hasMinItems()
`min_items` requires that this field must contain at least the specified
minimum number of items.
|
boolean |
hasUnique()
`unique` indicates that all elements in this field must
be unique.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
static RepeatedRules.Builder |
newBuilder() |
static RepeatedRules.Builder |
newBuilder(RepeatedRules prototype) |
RepeatedRules.Builder |
newBuilderForType() |
protected RepeatedRules.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static RepeatedRules |
parseDelimitedFrom(InputStream input) |
static RepeatedRules |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RepeatedRules |
parseFrom(byte[] data) |
static RepeatedRules |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RepeatedRules |
parseFrom(ByteBuffer data) |
static RepeatedRules |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RepeatedRules |
parseFrom(com.google.protobuf.ByteString data) |
static RepeatedRules |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RepeatedRules |
parseFrom(com.google.protobuf.CodedInputStream input) |
static RepeatedRules |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RepeatedRules |
parseFrom(InputStream input) |
static RepeatedRules |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<RepeatedRules> |
parser() |
RepeatedRules.Builder |
toBuilder() |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getSerializedSize, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isInitialized, 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, writeStringNoTag, writeToequals, findInitializationErrors, getInitializationErrorString, hashBoolean, hashCode, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int MIN_ITEMS_FIELD_NUMBER
public static final int MAX_ITEMS_FIELD_NUMBER
public static final int UNIQUE_FIELD_NUMBER
public static final int ITEMS_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 hasMinItems()
`min_items` requires that this field must contain at least the specified
minimum number of items.
Note that `min_items = 1` is equivalent to setting a field as `required`.
```proto
message MyRepeated {
// value must contain at least 2 items
repeated string value = 1 [(buf.validate.field).repeated.min_items = 2];
}
```
optional uint64 min_items = 1 [json_name = "minItems", (.buf.validate.priv.field) = { ... }hasMinItems in interface RepeatedRulesOrBuilderpublic long getMinItems()
`min_items` requires that this field must contain at least the specified
minimum number of items.
Note that `min_items = 1` is equivalent to setting a field as `required`.
```proto
message MyRepeated {
// value must contain at least 2 items
repeated string value = 1 [(buf.validate.field).repeated.min_items = 2];
}
```
optional uint64 min_items = 1 [json_name = "minItems", (.buf.validate.priv.field) = { ... }getMinItems in interface RepeatedRulesOrBuilderpublic boolean hasMaxItems()
`max_items` denotes that this field must not exceed a
certain number of items as the upper limit. If the field contains more
items than specified, an error message will be generated, requiring the
field to maintain no more than the specified number of items.
```proto
message MyRepeated {
// value must contain no more than 3 item(s)
repeated string value = 1 [(buf.validate.field).repeated.max_items = 3];
}
```
optional uint64 max_items = 2 [json_name = "maxItems", (.buf.validate.priv.field) = { ... }hasMaxItems in interface RepeatedRulesOrBuilderpublic long getMaxItems()
`max_items` denotes that this field must not exceed a
certain number of items as the upper limit. If the field contains more
items than specified, an error message will be generated, requiring the
field to maintain no more than the specified number of items.
```proto
message MyRepeated {
// value must contain no more than 3 item(s)
repeated string value = 1 [(buf.validate.field).repeated.max_items = 3];
}
```
optional uint64 max_items = 2 [json_name = "maxItems", (.buf.validate.priv.field) = { ... }getMaxItems in interface RepeatedRulesOrBuilderpublic boolean hasUnique()
`unique` indicates that all elements in this field must
be unique. This constraint is strictly applicable to scalar and enum
types, with message types not being supported.
```proto
message MyRepeated {
// repeated value must contain unique items
repeated string value = 1 [(buf.validate.field).repeated.unique = true];
}
```
optional bool unique = 3 [json_name = "unique", (.buf.validate.priv.field) = { ... }hasUnique in interface RepeatedRulesOrBuilderpublic boolean getUnique()
`unique` indicates that all elements in this field must
be unique. This constraint is strictly applicable to scalar and enum
types, with message types not being supported.
```proto
message MyRepeated {
// repeated value must contain unique items
repeated string value = 1 [(buf.validate.field).repeated.unique = true];
}
```
optional bool unique = 3 [json_name = "unique", (.buf.validate.priv.field) = { ... }getUnique in interface RepeatedRulesOrBuilderpublic boolean hasItems()
`items` details the constraints to be applied to each item
in the field. Even for repeated message fields, validation is executed
against each item unless skip is explicitly specified.
```proto
message MyRepeated {
// The items in the field `value` must follow the specified constraints.
repeated string value = 1 [(buf.validate.field).repeated.items = {
string: {
min_len: 3
max_len: 10
}
}];
}
```
optional .buf.validate.FieldConstraints items = 4 [json_name = "items"];hasItems in interface RepeatedRulesOrBuilderpublic FieldConstraints getItems()
`items` details the constraints to be applied to each item
in the field. Even for repeated message fields, validation is executed
against each item unless skip is explicitly specified.
```proto
message MyRepeated {
// The items in the field `value` must follow the specified constraints.
repeated string value = 1 [(buf.validate.field).repeated.items = {
string: {
min_len: 3
max_len: 10
}
}];
}
```
optional .buf.validate.FieldConstraints items = 4 [json_name = "items"];getItems in interface RepeatedRulesOrBuilderpublic FieldConstraintsOrBuilder getItemsOrBuilder()
`items` details the constraints to be applied to each item
in the field. Even for repeated message fields, validation is executed
against each item unless skip is explicitly specified.
```proto
message MyRepeated {
// The items in the field `value` must follow the specified constraints.
repeated string value = 1 [(buf.validate.field).repeated.items = {
string: {
min_len: 3
max_len: 10
}
}];
}
```
optional .buf.validate.FieldConstraints items = 4 [json_name = "items"];getItemsOrBuilder in interface RepeatedRulesOrBuilderpublic static RepeatedRules parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RepeatedRules parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RepeatedRules parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RepeatedRules parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RepeatedRules parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RepeatedRules parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RepeatedRules parseFrom(InputStream input) throws IOException
IOExceptionpublic static RepeatedRules parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RepeatedRules parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static RepeatedRules parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RepeatedRules parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static RepeatedRules parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic RepeatedRules.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static RepeatedRules.Builder newBuilder()
public static RepeatedRules.Builder newBuilder(RepeatedRules prototype)
public RepeatedRules.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected RepeatedRules.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static RepeatedRules getDefaultInstance()
public static com.google.protobuf.Parser<RepeatedRules> parser()
public com.google.protobuf.Parser<RepeatedRules> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public RepeatedRules getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024. All rights reserved.