public interface FieldConstraintsOrBuilder
extends com.google.protobuf.MessageOrBuilder
| Modifier and Type | Method and Description |
|---|---|
AnyRules |
getAny()
Well-Known Field Types
|
AnyRulesOrBuilder |
getAnyOrBuilder()
Well-Known Field Types
|
BoolRules |
getBool()
.buf.validate.BoolRules bool = 13 [json_name = "bool"]; |
BoolRulesOrBuilder |
getBoolOrBuilder()
.buf.validate.BoolRules bool = 13 [json_name = "bool"]; |
BytesRules |
getBytes()
.buf.validate.BytesRules bytes = 15 [json_name = "bytes"]; |
BytesRulesOrBuilder |
getBytesOrBuilder()
.buf.validate.BytesRules bytes = 15 [json_name = "bytes"]; |
Constraint |
getCel(int index)
`cel` is a repeated field used to represent a textual expression
in the Common Expression Language (CEL) syntax.
|
int |
getCelCount()
`cel` is a repeated field used to represent a textual expression
in the Common Expression Language (CEL) syntax.
|
List<Constraint> |
getCelList()
`cel` is a repeated field used to represent a textual expression
in the Common Expression Language (CEL) syntax.
|
ConstraintOrBuilder |
getCelOrBuilder(int index)
`cel` is a repeated field used to represent a textual expression
in the Common Expression Language (CEL) syntax.
|
List<? extends ConstraintOrBuilder> |
getCelOrBuilderList()
`cel` is a repeated field used to represent a textual expression
in the Common Expression Language (CEL) syntax.
|
DoubleRules |
getDouble()
.buf.validate.DoubleRules double = 2 [json_name = "double"]; |
DoubleRulesOrBuilder |
getDoubleOrBuilder()
.buf.validate.DoubleRules double = 2 [json_name = "double"]; |
DurationRules |
getDuration()
.buf.validate.DurationRules duration = 21 [json_name = "duration"]; |
DurationRulesOrBuilder |
getDurationOrBuilder()
.buf.validate.DurationRules duration = 21 [json_name = "duration"]; |
EnumRules |
getEnum()
Complex Field Types
|
EnumRulesOrBuilder |
getEnumOrBuilder()
Complex Field Types
|
Fixed32Rules |
getFixed32()
.buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"]; |
Fixed32RulesOrBuilder |
getFixed32OrBuilder()
.buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"]; |
Fixed64Rules |
getFixed64()
.buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"]; |
Fixed64RulesOrBuilder |
getFixed64OrBuilder()
.buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"]; |
FloatRules |
getFloat()
Scalar Field Types
|
FloatRulesOrBuilder |
getFloatOrBuilder()
Scalar Field Types
|
Ignore |
getIgnore()
Skip validation on the field if its value matches the specified criteria.
|
boolean |
getIgnoreEmpty()
Deprecated.
buf.validate.FieldConstraints.ignore_empty is deprecated.
See buf/validate/validate.proto;l=198
|
int |
getIgnoreValue()
Skip validation on the field if its value matches the specified criteria.
|
Int32Rules |
getInt32()
.buf.validate.Int32Rules int32 = 3 [json_name = "int32"]; |
Int32RulesOrBuilder |
getInt32OrBuilder()
.buf.validate.Int32Rules int32 = 3 [json_name = "int32"]; |
Int64Rules |
getInt64()
.buf.validate.Int64Rules int64 = 4 [json_name = "int64"]; |
Int64RulesOrBuilder |
getInt64OrBuilder()
.buf.validate.Int64Rules int64 = 4 [json_name = "int64"]; |
MapRules |
getMap()
.buf.validate.MapRules map = 19 [json_name = "map"]; |
MapRulesOrBuilder |
getMapOrBuilder()
.buf.validate.MapRules map = 19 [json_name = "map"]; |
RepeatedRules |
getRepeated()
.buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"]; |
RepeatedRulesOrBuilder |
getRepeatedOrBuilder()
.buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"]; |
boolean |
getRequired()
If `required` is true, the field must be populated.
|
SFixed32Rules |
getSfixed32()
.buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"]; |
SFixed32RulesOrBuilder |
getSfixed32OrBuilder()
.buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"]; |
SFixed64Rules |
getSfixed64()
.buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"]; |
SFixed64RulesOrBuilder |
getSfixed64OrBuilder()
.buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"]; |
SInt32Rules |
getSint32()
.buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"]; |
SInt32RulesOrBuilder |
getSint32OrBuilder()
.buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"]; |
SInt64Rules |
getSint64()
.buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"]; |
SInt64RulesOrBuilder |
getSint64OrBuilder()
.buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"]; |
boolean |
getSkipped()
Deprecated.
buf.validate.FieldConstraints.skipped is deprecated.
See buf/validate/validate.proto;l=196
|
StringRules |
getString()
.buf.validate.StringRules string = 14 [json_name = "string"]; |
StringRulesOrBuilder |
getStringOrBuilder()
.buf.validate.StringRules string = 14 [json_name = "string"]; |
TimestampRules |
getTimestamp()
.buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"]; |
TimestampRulesOrBuilder |
getTimestampOrBuilder()
.buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"]; |
FieldConstraints.TypeCase |
getTypeCase() |
UInt32Rules |
getUint32()
.buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"]; |
UInt32RulesOrBuilder |
getUint32OrBuilder()
.buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"]; |
UInt64Rules |
getUint64()
.buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"]; |
UInt64RulesOrBuilder |
getUint64OrBuilder()
.buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"]; |
boolean |
hasAny()
Well-Known Field Types
|
boolean |
hasBool()
.buf.validate.BoolRules bool = 13 [json_name = "bool"]; |
boolean |
hasBytes()
.buf.validate.BytesRules bytes = 15 [json_name = "bytes"]; |
boolean |
hasDouble()
.buf.validate.DoubleRules double = 2 [json_name = "double"]; |
boolean |
hasDuration()
.buf.validate.DurationRules duration = 21 [json_name = "duration"]; |
boolean |
hasEnum()
Complex Field Types
|
boolean |
hasFixed32()
.buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"]; |
boolean |
hasFixed64()
.buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"]; |
boolean |
hasFloat()
Scalar Field Types
|
boolean |
hasInt32()
.buf.validate.Int32Rules int32 = 3 [json_name = "int32"]; |
boolean |
hasInt64()
.buf.validate.Int64Rules int64 = 4 [json_name = "int64"]; |
boolean |
hasMap()
.buf.validate.MapRules map = 19 [json_name = "map"]; |
boolean |
hasRepeated()
.buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"]; |
boolean |
hasSfixed32()
.buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"]; |
boolean |
hasSfixed64()
.buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"]; |
boolean |
hasSint32()
.buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"]; |
boolean |
hasSint64()
.buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"]; |
boolean |
hasString()
.buf.validate.StringRules string = 14 [json_name = "string"]; |
boolean |
hasTimestamp()
.buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"]; |
boolean |
hasUint32()
.buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"]; |
boolean |
hasUint64()
.buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"]; |
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofList<Constraint> getCelList()
`cel` is a repeated field used to represent a textual expression
in the Common Expression Language (CEL) syntax. For more information on
CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
```proto
message MyMessage {
// The field `value` must be greater than 42.
optional int32 value = 1 [(buf.validate.field).cel = {
id: "my_message.value",
message: "value must be greater than 42",
expression: "this > 42",
}];
}
```
repeated .buf.validate.Constraint cel = 23 [json_name = "cel"];Constraint getCel(int index)
`cel` is a repeated field used to represent a textual expression
in the Common Expression Language (CEL) syntax. For more information on
CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
```proto
message MyMessage {
// The field `value` must be greater than 42.
optional int32 value = 1 [(buf.validate.field).cel = {
id: "my_message.value",
message: "value must be greater than 42",
expression: "this > 42",
}];
}
```
repeated .buf.validate.Constraint cel = 23 [json_name = "cel"];int getCelCount()
`cel` is a repeated field used to represent a textual expression
in the Common Expression Language (CEL) syntax. For more information on
CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
```proto
message MyMessage {
// The field `value` must be greater than 42.
optional int32 value = 1 [(buf.validate.field).cel = {
id: "my_message.value",
message: "value must be greater than 42",
expression: "this > 42",
}];
}
```
repeated .buf.validate.Constraint cel = 23 [json_name = "cel"];List<? extends ConstraintOrBuilder> getCelOrBuilderList()
`cel` is a repeated field used to represent a textual expression
in the Common Expression Language (CEL) syntax. For more information on
CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
```proto
message MyMessage {
// The field `value` must be greater than 42.
optional int32 value = 1 [(buf.validate.field).cel = {
id: "my_message.value",
message: "value must be greater than 42",
expression: "this > 42",
}];
}
```
repeated .buf.validate.Constraint cel = 23 [json_name = "cel"];ConstraintOrBuilder getCelOrBuilder(int index)
`cel` is a repeated field used to represent a textual expression
in the Common Expression Language (CEL) syntax. For more information on
CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
```proto
message MyMessage {
// The field `value` must be greater than 42.
optional int32 value = 1 [(buf.validate.field).cel = {
id: "my_message.value",
message: "value must be greater than 42",
expression: "this > 42",
}];
}
```
repeated .buf.validate.Constraint cel = 23 [json_name = "cel"];boolean getRequired()
If `required` is true, the field must be populated. A populated field can be
described as "serialized in the wire format," which includes:
- the following "nullable" fields must be explicitly set to be considered populated:
- singular message fields (whose fields may be unpopulated/default values)
- member fields of a oneof (may be their default value)
- proto3 optional fields (may be their default value)
- proto2 scalar fields (both optional and required)
- proto3 scalar fields must be non-zero to be considered populated
- repeated and map fields must be non-empty to be considered populated
```proto
message MyMessage {
// The field `value` must be set to a non-null value.
optional MyOtherMessage value = 1 [(buf.validate.field).required = true];
}
```
bool required = 25 [json_name = "required"];int getIgnoreValue()
Skip validation on the field if its value matches the specified criteria.
See Ignore enum for details.
```proto
message UpdateRequest {
// The uri rule only applies if the field is populated and not an empty
// string.
optional string url = 1 [
(buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE,
(buf.validate.field).string.uri = true,
];
}
```
.buf.validate.Ignore ignore = 27 [json_name = "ignore"];Ignore getIgnore()
Skip validation on the field if its value matches the specified criteria.
See Ignore enum for details.
```proto
message UpdateRequest {
// The uri rule only applies if the field is populated and not an empty
// string.
optional string url = 1 [
(buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE,
(buf.validate.field).string.uri = true,
];
}
```
.buf.validate.Ignore ignore = 27 [json_name = "ignore"];boolean hasFloat()
Scalar Field Types
.buf.validate.FloatRules float = 1 [json_name = "float"];FloatRules getFloat()
Scalar Field Types
.buf.validate.FloatRules float = 1 [json_name = "float"];FloatRulesOrBuilder getFloatOrBuilder()
Scalar Field Types
.buf.validate.FloatRules float = 1 [json_name = "float"];boolean hasDouble()
.buf.validate.DoubleRules double = 2 [json_name = "double"];DoubleRules getDouble()
.buf.validate.DoubleRules double = 2 [json_name = "double"];DoubleRulesOrBuilder getDoubleOrBuilder()
.buf.validate.DoubleRules double = 2 [json_name = "double"];boolean hasInt32()
.buf.validate.Int32Rules int32 = 3 [json_name = "int32"];Int32Rules getInt32()
.buf.validate.Int32Rules int32 = 3 [json_name = "int32"];Int32RulesOrBuilder getInt32OrBuilder()
.buf.validate.Int32Rules int32 = 3 [json_name = "int32"];boolean hasInt64()
.buf.validate.Int64Rules int64 = 4 [json_name = "int64"];Int64Rules getInt64()
.buf.validate.Int64Rules int64 = 4 [json_name = "int64"];Int64RulesOrBuilder getInt64OrBuilder()
.buf.validate.Int64Rules int64 = 4 [json_name = "int64"];boolean hasUint32()
.buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"];UInt32Rules getUint32()
.buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"];UInt32RulesOrBuilder getUint32OrBuilder()
.buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"];boolean hasUint64()
.buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"];UInt64Rules getUint64()
.buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"];UInt64RulesOrBuilder getUint64OrBuilder()
.buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"];boolean hasSint32()
.buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"];SInt32Rules getSint32()
.buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"];SInt32RulesOrBuilder getSint32OrBuilder()
.buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"];boolean hasSint64()
.buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"];SInt64Rules getSint64()
.buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"];SInt64RulesOrBuilder getSint64OrBuilder()
.buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"];boolean hasFixed32()
.buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"];Fixed32Rules getFixed32()
.buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"];Fixed32RulesOrBuilder getFixed32OrBuilder()
.buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"];boolean hasFixed64()
.buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"];Fixed64Rules getFixed64()
.buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"];Fixed64RulesOrBuilder getFixed64OrBuilder()
.buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"];boolean hasSfixed32()
.buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"];SFixed32Rules getSfixed32()
.buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"];SFixed32RulesOrBuilder getSfixed32OrBuilder()
.buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"];boolean hasSfixed64()
.buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"];SFixed64Rules getSfixed64()
.buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"];SFixed64RulesOrBuilder getSfixed64OrBuilder()
.buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"];boolean hasBool()
.buf.validate.BoolRules bool = 13 [json_name = "bool"];BoolRules getBool()
.buf.validate.BoolRules bool = 13 [json_name = "bool"];BoolRulesOrBuilder getBoolOrBuilder()
.buf.validate.BoolRules bool = 13 [json_name = "bool"];boolean hasString()
.buf.validate.StringRules string = 14 [json_name = "string"];StringRules getString()
.buf.validate.StringRules string = 14 [json_name = "string"];StringRulesOrBuilder getStringOrBuilder()
.buf.validate.StringRules string = 14 [json_name = "string"];boolean hasBytes()
.buf.validate.BytesRules bytes = 15 [json_name = "bytes"];BytesRules getBytes()
.buf.validate.BytesRules bytes = 15 [json_name = "bytes"];BytesRulesOrBuilder getBytesOrBuilder()
.buf.validate.BytesRules bytes = 15 [json_name = "bytes"];boolean hasEnum()
Complex Field Types
.buf.validate.EnumRules enum = 16 [json_name = "enum"];EnumRules getEnum()
Complex Field Types
.buf.validate.EnumRules enum = 16 [json_name = "enum"];EnumRulesOrBuilder getEnumOrBuilder()
Complex Field Types
.buf.validate.EnumRules enum = 16 [json_name = "enum"];boolean hasRepeated()
.buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"];RepeatedRules getRepeated()
.buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"];RepeatedRulesOrBuilder getRepeatedOrBuilder()
.buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"];boolean hasMap()
.buf.validate.MapRules map = 19 [json_name = "map"];MapRules getMap()
.buf.validate.MapRules map = 19 [json_name = "map"];MapRulesOrBuilder getMapOrBuilder()
.buf.validate.MapRules map = 19 [json_name = "map"];boolean hasAny()
Well-Known Field Types
.buf.validate.AnyRules any = 20 [json_name = "any"];AnyRules getAny()
Well-Known Field Types
.buf.validate.AnyRules any = 20 [json_name = "any"];AnyRulesOrBuilder getAnyOrBuilder()
Well-Known Field Types
.buf.validate.AnyRules any = 20 [json_name = "any"];boolean hasDuration()
.buf.validate.DurationRules duration = 21 [json_name = "duration"];DurationRules getDuration()
.buf.validate.DurationRules duration = 21 [json_name = "duration"];DurationRulesOrBuilder getDurationOrBuilder()
.buf.validate.DurationRules duration = 21 [json_name = "duration"];boolean hasTimestamp()
.buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"];TimestampRules getTimestamp()
.buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"];TimestampRulesOrBuilder getTimestampOrBuilder()
.buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"];@Deprecated boolean getSkipped()
DEPRECATED: use ignore=IGNORE_ALWAYS instead. TODO: remove this field pre-v1.
bool skipped = 24 [json_name = "skipped", deprecated = true];@Deprecated boolean getIgnoreEmpty()
DEPRECATED: use ignore=IGNORE_IF_UNPOPULATED instead. TODO: remove this field pre-v1.
bool ignore_empty = 26 [json_name = "ignoreEmpty", deprecated = true];FieldConstraints.TypeCase getTypeCase()
Copyright © 2024. All rights reserved.