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
|
boolean |
getIgnoreEmpty()
If `ignore_empty` is true and applied to a non-nullable field (see
`required` for more details), validation is skipped on the field if it is
the default or empty value.
|
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()
`skipped` is an optional boolean attribute that specifies that the
validation rules of this field should not be evaluated.
|
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 getSkipped()
`skipped` is an optional boolean attribute that specifies that the
validation rules of this field should not be evaluated. If skipped is set to
true, any validation rules set for the field will be ignored.
```proto
message MyMessage {
// The field `value` must not be set.
optional MyOtherMessage value = 1 [(buf.validate.field).skipped = true];
}
```
bool skipped = 24 [json_name = "skipped"];boolean getRequired()
If `required` is true, the field must be populated. Field presence can be
described as "serialized in the wire format," which follows the following rules:
- the following "nullable" fields must be explicitly set to be considered present:
- singular message fields (may be their empty value)
- member fields of a oneof (may be their default value)
- proto3 optional fields (may be their default value)
- proto2 scalar fields
- proto3 scalar fields must be non-zero to be considered present
- repeated and map fields must be non-empty to be considered present
```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"];boolean getIgnoreEmpty()
If `ignore_empty` is true and applied to a non-nullable field (see
`required` for more details), validation is skipped on the field if it is
the default or empty value. Adding `ignore_empty` to a "nullable" field is
a noop as these unset fields already skip validation (with the exception
of `required`).
```proto
message MyRepeated {
// The field `value` min_len rule is only applied if the field isn't empty.
repeated string value = 1 [
(buf.validate.field).ignore_empty = true,
(buf.validate.field).min_len = 5
];
}
```
bool ignore_empty = 26 [json_name = "ignoreEmpty"];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"];FieldConstraints.TypeCase getTypeCase()
Copyright © 2023. All rights reserved.