public static final class RepeatedRules.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<RepeatedRules.Builder> implements RepeatedRulesOrBuilder
RepeatedRules describe the constraints applied to `repeated` values.Protobuf type
buf.validate.RepeatedRules| Modifier and Type | Method and Description |
|---|---|
RepeatedRules.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
RepeatedRules |
build() |
RepeatedRules |
buildPartial() |
RepeatedRules.Builder |
clear() |
RepeatedRules.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
RepeatedRules.Builder |
clearItems()
`items` details the constraints to be applied to each item
in the field.
|
RepeatedRules.Builder |
clearMaxItems()
`max_items` denotes that this field must not exceed a
certain number of items as the upper limit.
|
RepeatedRules.Builder |
clearMinItems()
`min_items` requires that this field must contain at least the specified
minimum number of items.
|
RepeatedRules.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
RepeatedRules.Builder |
clearUnique()
`unique` indicates that all elements in this field must
be unique.
|
RepeatedRules.Builder |
clone() |
RepeatedRules |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
FieldConstraints |
getItems()
`items` details the constraints to be applied to each item
in the field.
|
FieldConstraints.Builder |
getItemsBuilder()
`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.
|
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() |
boolean |
isInitialized() |
RepeatedRules.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
RepeatedRules.Builder |
mergeFrom(com.google.protobuf.Message other) |
RepeatedRules.Builder |
mergeFrom(RepeatedRules other) |
RepeatedRules.Builder |
mergeItems(FieldConstraints value)
`items` details the constraints to be applied to each item
in the field.
|
RepeatedRules.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
RepeatedRules.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
RepeatedRules.Builder |
setItems(FieldConstraints.Builder builderForValue)
`items` details the constraints to be applied to each item
in the field.
|
RepeatedRules.Builder |
setItems(FieldConstraints value)
`items` details the constraints to be applied to each item
in the field.
|
RepeatedRules.Builder |
setMaxItems(long value)
`max_items` denotes that this field must not exceed a
certain number of items as the upper limit.
|
RepeatedRules.Builder |
setMinItems(long value)
`min_items` requires that this field must contain at least the specified
minimum number of items.
|
RepeatedRules.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
RepeatedRules.Builder |
setUnique(boolean value)
`unique` indicates that all elements in this field must
be unique.
|
RepeatedRules.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
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, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, 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<RepeatedRules.Builder>public RepeatedRules.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<RepeatedRules.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<RepeatedRules.Builder>public RepeatedRules getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic RepeatedRules build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic RepeatedRules buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic RepeatedRules.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<RepeatedRules.Builder>public RepeatedRules.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<RepeatedRules.Builder>public RepeatedRules.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<RepeatedRules.Builder>public RepeatedRules.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<RepeatedRules.Builder>public RepeatedRules.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<RepeatedRules.Builder>public RepeatedRules.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<RepeatedRules.Builder>public RepeatedRules.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<RepeatedRules.Builder>public RepeatedRules.Builder mergeFrom(RepeatedRules other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<RepeatedRules.Builder>public RepeatedRules.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<RepeatedRules.Builder>IOExceptionpublic 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 RepeatedRules.Builder setMinItems(long value)
`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) = { ... }value - The minItems to set.public RepeatedRules.Builder clearMinItems()
`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) = { ... }public 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 RepeatedRules.Builder setMaxItems(long value)
`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) = { ... }value - The maxItems to set.public RepeatedRules.Builder clearMaxItems()
`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) = { ... }public 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 RepeatedRules.Builder setUnique(boolean value)
`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) = { ... }value - The unique to set.public RepeatedRules.Builder clearUnique()
`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) = { ... }public 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 RepeatedRules.Builder setItems(FieldConstraints value)
`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"];public RepeatedRules.Builder setItems(FieldConstraints.Builder builderForValue)
`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"];public RepeatedRules.Builder mergeItems(FieldConstraints value)
`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"];public RepeatedRules.Builder clearItems()
`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"];public FieldConstraints.Builder getItemsBuilder()
`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"];public 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 final RepeatedRules.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RepeatedRules.Builder>public final RepeatedRules.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RepeatedRules.Builder>Copyright © 2024. All rights reserved.