Package build.buf.validate
Interface FieldConstraintsOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
FieldConstraints,FieldConstraints.Builder
public interface FieldConstraintsOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptiongetAny()Well-Known Field TypesWell-Known Field TypesgetBool().buf.validate.BoolRules bool = 13 [json_name = "bool"];.buf.validate.BoolRules bool = 13 [json_name = "bool"];getBytes().buf.validate.BytesRules bytes = 15 [json_name = "bytes"];.buf.validate.BytesRules bytes = 15 [json_name = "bytes"];getCel(int index) `cel` is a repeated field used to represent a textual expression in the Common Expression Language (CEL) syntax.int`cel` is a repeated field used to represent a textual expression in the Common Expression Language (CEL) syntax.`cel` is a repeated field used to represent a textual expression in the Common Expression Language (CEL) syntax.getCelOrBuilder(int index) `cel` is a repeated field used to represent a textual expression in the Common Expression Language (CEL) syntax.List<? extends ConstraintOrBuilder>`cel` is a repeated field used to represent a textual expression in the Common Expression Language (CEL) syntax..buf.validate.DoubleRules double = 2 [json_name = "double"];.buf.validate.DoubleRules double = 2 [json_name = "double"];.buf.validate.DurationRules duration = 21 [json_name = "duration"];.buf.validate.DurationRules duration = 21 [json_name = "duration"];getEnum()Complex Field TypesComplex Field Types.buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"];.buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"];.buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"];.buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"];getFloat()Scalar Field TypesScalar Field TypesbooleanIf `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.getInt32().buf.validate.Int32Rules int32 = 3 [json_name = "int32"];.buf.validate.Int32Rules int32 = 3 [json_name = "int32"];getInt64().buf.validate.Int64Rules int64 = 4 [json_name = "int64"];.buf.validate.Int64Rules int64 = 4 [json_name = "int64"];getMap().buf.validate.MapRules map = 19 [json_name = "map"];.buf.validate.MapRules map = 19 [json_name = "map"];.buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"];.buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"];booleanIf `required` is true, the field must be populated..buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"];.buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"];.buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"];.buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"];.buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"];.buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"];.buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"];.buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"];boolean`skipped` is an optional boolean attribute that specifies that the validation rules of this field should not be evaluated..buf.validate.StringRules string = 14 [json_name = "string"];.buf.validate.StringRules string = 14 [json_name = "string"];.buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"];.buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"];.buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"];.buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"];.buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"];.buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"];booleanhasAny()Well-Known Field TypesbooleanhasBool().buf.validate.BoolRules bool = 13 [json_name = "bool"];booleanhasBytes().buf.validate.BytesRules bytes = 15 [json_name = "bytes"];boolean.buf.validate.DoubleRules double = 2 [json_name = "double"];boolean.buf.validate.DurationRules duration = 21 [json_name = "duration"];booleanhasEnum()Complex Field Typesboolean.buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"];boolean.buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"];booleanhasFloat()Scalar Field TypesbooleanhasInt32().buf.validate.Int32Rules int32 = 3 [json_name = "int32"];booleanhasInt64().buf.validate.Int64Rules int64 = 4 [json_name = "int64"];booleanhasMap().buf.validate.MapRules map = 19 [json_name = "map"];boolean.buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"];boolean.buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"];boolean.buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"];boolean.buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"];boolean.buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"];boolean.buf.validate.StringRules string = 14 [json_name = "string"];boolean.buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"];boolean.buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"];boolean.buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"];Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getCelList
List<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"]; -
getCel
`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"]; -
getCelCount
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"]; -
getCelOrBuilderList
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"]; -
getCelOrBuilder
`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"]; -
getSkipped
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"];- Returns:
- The skipped.
-
getRequired
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"];- Returns:
- The required.
-
getIgnoreEmpty
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"];- Returns:
- The ignoreEmpty.
-
hasFloat
boolean hasFloat()Scalar Field Types
.buf.validate.FloatRules float = 1 [json_name = "float"];- Returns:
- Whether the float field is set.
-
getFloat
FloatRules getFloat()Scalar Field Types
.buf.validate.FloatRules float = 1 [json_name = "float"];- Returns:
- The float.
-
getFloatOrBuilder
FloatRulesOrBuilder getFloatOrBuilder()Scalar Field Types
.buf.validate.FloatRules float = 1 [json_name = "float"]; -
hasDouble
boolean hasDouble().buf.validate.DoubleRules double = 2 [json_name = "double"];- Returns:
- Whether the double field is set.
-
getDouble
DoubleRules getDouble().buf.validate.DoubleRules double = 2 [json_name = "double"];- Returns:
- The double.
-
getDoubleOrBuilder
DoubleRulesOrBuilder getDoubleOrBuilder().buf.validate.DoubleRules double = 2 [json_name = "double"]; -
hasInt32
boolean hasInt32().buf.validate.Int32Rules int32 = 3 [json_name = "int32"];- Returns:
- Whether the int32 field is set.
-
getInt32
Int32Rules getInt32().buf.validate.Int32Rules int32 = 3 [json_name = "int32"];- Returns:
- The int32.
-
getInt32OrBuilder
Int32RulesOrBuilder getInt32OrBuilder().buf.validate.Int32Rules int32 = 3 [json_name = "int32"]; -
hasInt64
boolean hasInt64().buf.validate.Int64Rules int64 = 4 [json_name = "int64"];- Returns:
- Whether the int64 field is set.
-
getInt64
Int64Rules getInt64().buf.validate.Int64Rules int64 = 4 [json_name = "int64"];- Returns:
- The int64.
-
getInt64OrBuilder
Int64RulesOrBuilder getInt64OrBuilder().buf.validate.Int64Rules int64 = 4 [json_name = "int64"]; -
hasUint32
boolean hasUint32().buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"];- Returns:
- Whether the uint32 field is set.
-
getUint32
UInt32Rules getUint32().buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"];- Returns:
- The uint32.
-
getUint32OrBuilder
UInt32RulesOrBuilder getUint32OrBuilder().buf.validate.UInt32Rules uint32 = 5 [json_name = "uint32"]; -
hasUint64
boolean hasUint64().buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"];- Returns:
- Whether the uint64 field is set.
-
getUint64
UInt64Rules getUint64().buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"];- Returns:
- The uint64.
-
getUint64OrBuilder
UInt64RulesOrBuilder getUint64OrBuilder().buf.validate.UInt64Rules uint64 = 6 [json_name = "uint64"]; -
hasSint32
boolean hasSint32().buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"];- Returns:
- Whether the sint32 field is set.
-
getSint32
SInt32Rules getSint32().buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"];- Returns:
- The sint32.
-
getSint32OrBuilder
SInt32RulesOrBuilder getSint32OrBuilder().buf.validate.SInt32Rules sint32 = 7 [json_name = "sint32"]; -
hasSint64
boolean hasSint64().buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"];- Returns:
- Whether the sint64 field is set.
-
getSint64
SInt64Rules getSint64().buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"];- Returns:
- The sint64.
-
getSint64OrBuilder
SInt64RulesOrBuilder getSint64OrBuilder().buf.validate.SInt64Rules sint64 = 8 [json_name = "sint64"]; -
hasFixed32
boolean hasFixed32().buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"];- Returns:
- Whether the fixed32 field is set.
-
getFixed32
Fixed32Rules getFixed32().buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"];- Returns:
- The fixed32.
-
getFixed32OrBuilder
Fixed32RulesOrBuilder getFixed32OrBuilder().buf.validate.Fixed32Rules fixed32 = 9 [json_name = "fixed32"]; -
hasFixed64
boolean hasFixed64().buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"];- Returns:
- Whether the fixed64 field is set.
-
getFixed64
Fixed64Rules getFixed64().buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"];- Returns:
- The fixed64.
-
getFixed64OrBuilder
Fixed64RulesOrBuilder getFixed64OrBuilder().buf.validate.Fixed64Rules fixed64 = 10 [json_name = "fixed64"]; -
hasSfixed32
boolean hasSfixed32().buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"];- Returns:
- Whether the sfixed32 field is set.
-
getSfixed32
SFixed32Rules getSfixed32().buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"];- Returns:
- The sfixed32.
-
getSfixed32OrBuilder
SFixed32RulesOrBuilder getSfixed32OrBuilder().buf.validate.SFixed32Rules sfixed32 = 11 [json_name = "sfixed32"]; -
hasSfixed64
boolean hasSfixed64().buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"];- Returns:
- Whether the sfixed64 field is set.
-
getSfixed64
SFixed64Rules getSfixed64().buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"];- Returns:
- The sfixed64.
-
getSfixed64OrBuilder
SFixed64RulesOrBuilder getSfixed64OrBuilder().buf.validate.SFixed64Rules sfixed64 = 12 [json_name = "sfixed64"]; -
hasBool
boolean hasBool().buf.validate.BoolRules bool = 13 [json_name = "bool"];- Returns:
- Whether the bool field is set.
-
getBool
BoolRules getBool().buf.validate.BoolRules bool = 13 [json_name = "bool"];- Returns:
- The bool.
-
getBoolOrBuilder
BoolRulesOrBuilder getBoolOrBuilder().buf.validate.BoolRules bool = 13 [json_name = "bool"]; -
hasString
boolean hasString().buf.validate.StringRules string = 14 [json_name = "string"];- Returns:
- Whether the string field is set.
-
getString
StringRules getString().buf.validate.StringRules string = 14 [json_name = "string"];- Returns:
- The string.
-
getStringOrBuilder
StringRulesOrBuilder getStringOrBuilder().buf.validate.StringRules string = 14 [json_name = "string"]; -
hasBytes
boolean hasBytes().buf.validate.BytesRules bytes = 15 [json_name = "bytes"];- Returns:
- Whether the bytes field is set.
-
getBytes
BytesRules getBytes().buf.validate.BytesRules bytes = 15 [json_name = "bytes"];- Returns:
- The bytes.
-
getBytesOrBuilder
BytesRulesOrBuilder getBytesOrBuilder().buf.validate.BytesRules bytes = 15 [json_name = "bytes"]; -
hasEnum
boolean hasEnum()Complex Field Types
.buf.validate.EnumRules enum = 16 [json_name = "enum"];- Returns:
- Whether the enum field is set.
-
getEnum
EnumRules getEnum()Complex Field Types
.buf.validate.EnumRules enum = 16 [json_name = "enum"];- Returns:
- The enum.
-
getEnumOrBuilder
EnumRulesOrBuilder getEnumOrBuilder()Complex Field Types
.buf.validate.EnumRules enum = 16 [json_name = "enum"]; -
hasRepeated
boolean hasRepeated().buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"];- Returns:
- Whether the repeated field is set.
-
getRepeated
RepeatedRules getRepeated().buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"];- Returns:
- The repeated.
-
getRepeatedOrBuilder
RepeatedRulesOrBuilder getRepeatedOrBuilder().buf.validate.RepeatedRules repeated = 18 [json_name = "repeated"]; -
hasMap
boolean hasMap().buf.validate.MapRules map = 19 [json_name = "map"];- Returns:
- Whether the map field is set.
-
getMap
MapRules getMap().buf.validate.MapRules map = 19 [json_name = "map"];- Returns:
- The map.
-
getMapOrBuilder
MapRulesOrBuilder getMapOrBuilder().buf.validate.MapRules map = 19 [json_name = "map"]; -
hasAny
boolean hasAny()Well-Known Field Types
.buf.validate.AnyRules any = 20 [json_name = "any"];- Returns:
- Whether the any field is set.
-
getAny
AnyRules getAny()Well-Known Field Types
.buf.validate.AnyRules any = 20 [json_name = "any"];- Returns:
- The any.
-
getAnyOrBuilder
AnyRulesOrBuilder getAnyOrBuilder()Well-Known Field Types
.buf.validate.AnyRules any = 20 [json_name = "any"]; -
hasDuration
boolean hasDuration().buf.validate.DurationRules duration = 21 [json_name = "duration"];- Returns:
- Whether the duration field is set.
-
getDuration
DurationRules getDuration().buf.validate.DurationRules duration = 21 [json_name = "duration"];- Returns:
- The duration.
-
getDurationOrBuilder
DurationRulesOrBuilder getDurationOrBuilder().buf.validate.DurationRules duration = 21 [json_name = "duration"]; -
hasTimestamp
boolean hasTimestamp().buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"];- Returns:
- Whether the timestamp field is set.
-
getTimestamp
TimestampRules getTimestamp().buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"];- Returns:
- The timestamp.
-
getTimestampOrBuilder
TimestampRulesOrBuilder getTimestampOrBuilder().buf.validate.TimestampRules timestamp = 22 [json_name = "timestamp"]; -
getTypeCase
FieldConstraints.TypeCase getTypeCase()
-