Package build.buf.validate
Interface MessageConstraintsOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
MessageConstraints,MessageConstraints.Builder
public interface MessageConstraintsOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptiongetCel(int index) cel is a repeated field of type Constraint.intcel is a repeated field of type Constraint.cel is a repeated field of type Constraint.getCelOrBuilder(int index) cel is a repeated field of type Constraint.List<? extends ConstraintOrBuilder>cel is a repeated field of type Constraint.booleandisabled is a boolean flag that, when set to true, nullifies any validation rules for this message.booleandisabled is a boolean flag that, when set to true, nullifies any validation rules for this message.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
-
hasDisabled
boolean hasDisabled()disabled is a boolean flag that, when set to true, nullifies any validation rules for this message. This includes any fields within the message that would otherwise support validation. ```proto message MyMessage { // validation will be bypassed for this message option (buf.validate.message).disabled = true; } ```optional bool disabled = 1 [json_name = "disabled"];- Returns:
- Whether the disabled field is set.
-
getDisabled
boolean getDisabled()disabled is a boolean flag that, when set to true, nullifies any validation rules for this message. This includes any fields within the message that would otherwise support validation. ```proto message MyMessage { // validation will be bypassed for this message option (buf.validate.message).disabled = true; } ```optional bool disabled = 1 [json_name = "disabled"];- Returns:
- The disabled.
-
getCelList
List<Constraint> getCelList()cel is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message. These constraints are written in 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 `foo` must be greater than 42. option (buf.validate.message).cel = { id: "my_message.value", message: "value must be greater than 42", expression: "this.foo > 42", }; optional int32 foo = 1; } ```repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; -
getCel
cel is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message. These constraints are written in 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 `foo` must be greater than 42. option (buf.validate.message).cel = { id: "my_message.value", message: "value must be greater than 42", expression: "this.foo > 42", }; optional int32 foo = 1; } ```repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; -
getCelCount
int getCelCount()cel is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message. These constraints are written in 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 `foo` must be greater than 42. option (buf.validate.message).cel = { id: "my_message.value", message: "value must be greater than 42", expression: "this.foo > 42", }; optional int32 foo = 1; } ```repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; -
getCelOrBuilderList
List<? extends ConstraintOrBuilder> getCelOrBuilderList()cel is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message. These constraints are written in 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 `foo` must be greater than 42. option (buf.validate.message).cel = { id: "my_message.value", message: "value must be greater than 42", expression: "this.foo > 42", }; optional int32 foo = 1; } ```repeated .buf.validate.Constraint cel = 3 [json_name = "cel"]; -
getCelOrBuilder
cel is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message. These constraints are written in 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 `foo` must be greater than 42. option (buf.validate.message).cel = { id: "my_message.value", message: "value must be greater than 42", expression: "this.foo > 42", }; optional int32 foo = 1; } ```repeated .buf.validate.Constraint cel = 3 [json_name = "cel"];
-