public static final class MessageConstraints.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<MessageConstraints.Builder> implements MessageConstraintsOrBuilder
MessageConstraints represents validation rules that are applied to the entire message. It includes disabling options and a list of Constraint messages representing Common Expression Language (CEL) validation rules.Protobuf type
buf.validate.MessageConstraints| Modifier and Type | Method and Description |
|---|---|
MessageConstraints.Builder |
addAllCel(Iterable<? extends Constraint> values)
`cel` is a repeated field of type Constraint.
|
MessageConstraints.Builder |
addCel(Constraint.Builder builderForValue)
`cel` is a repeated field of type Constraint.
|
MessageConstraints.Builder |
addCel(Constraint value)
`cel` is a repeated field of type Constraint.
|
MessageConstraints.Builder |
addCel(int index,
Constraint.Builder builderForValue)
`cel` is a repeated field of type Constraint.
|
MessageConstraints.Builder |
addCel(int index,
Constraint value)
`cel` is a repeated field of type Constraint.
|
Constraint.Builder |
addCelBuilder()
`cel` is a repeated field of type Constraint.
|
Constraint.Builder |
addCelBuilder(int index)
`cel` is a repeated field of type Constraint.
|
MessageConstraints.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
MessageConstraints |
build() |
MessageConstraints |
buildPartial() |
MessageConstraints.Builder |
clear() |
MessageConstraints.Builder |
clearCel()
`cel` is a repeated field of type Constraint.
|
MessageConstraints.Builder |
clearDisabled()
`disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
|
MessageConstraints.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
MessageConstraints.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
MessageConstraints.Builder |
clone() |
Constraint |
getCel(int index)
`cel` is a repeated field of type Constraint.
|
Constraint.Builder |
getCelBuilder(int index)
`cel` is a repeated field of type Constraint.
|
List<Constraint.Builder> |
getCelBuilderList()
`cel` is a repeated field of type Constraint.
|
int |
getCelCount()
`cel` is a repeated field of type Constraint.
|
List<Constraint> |
getCelList()
`cel` is a repeated field of type Constraint.
|
ConstraintOrBuilder |
getCelOrBuilder(int index)
`cel` is a repeated field of type Constraint.
|
List<? extends ConstraintOrBuilder> |
getCelOrBuilderList()
`cel` is a repeated field of type Constraint.
|
MessageConstraints |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
boolean |
getDisabled()
`disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
|
boolean |
hasDisabled()
`disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
MessageConstraints.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
MessageConstraints.Builder |
removeCel(int index)
`cel` is a repeated field of type Constraint.
|
MessageConstraints.Builder |
setCel(int index,
Constraint.Builder builderForValue)
`cel` is a repeated field of type Constraint.
|
MessageConstraints.Builder |
setCel(int index,
Constraint value)
`cel` is a repeated field of type Constraint.
|
MessageConstraints.Builder |
setDisabled(boolean value)
`disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
|
MessageConstraints.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
MessageConstraints.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
MessageConstraints.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, isInitialized, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, 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<MessageConstraints.Builder>public MessageConstraints.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<MessageConstraints.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<MessageConstraints.Builder>public MessageConstraints getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic MessageConstraints build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic MessageConstraints buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic MessageConstraints.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<MessageConstraints.Builder>public MessageConstraints.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<MessageConstraints.Builder>public MessageConstraints.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<MessageConstraints.Builder>public MessageConstraints.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<MessageConstraints.Builder>public MessageConstraints.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<MessageConstraints.Builder>public MessageConstraints.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<MessageConstraints.Builder>public 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"];hasDisabled in interface MessageConstraintsOrBuilderpublic 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"];getDisabled in interface MessageConstraintsOrBuilderpublic MessageConstraints.Builder setDisabled(boolean value)
`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"];value - The disabled to set.public MessageConstraints.Builder clearDisabled()
`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"];public 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"];getCelList in interface MessageConstraintsOrBuilderpublic 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"];getCelCount in interface MessageConstraintsOrBuilderpublic Constraint getCel(int index)
`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 in interface MessageConstraintsOrBuilderpublic MessageConstraints.Builder setCel(int index, Constraint value)
`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"];public MessageConstraints.Builder setCel(int index, Constraint.Builder builderForValue)
`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"];public MessageConstraints.Builder addCel(Constraint value)
`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"];public MessageConstraints.Builder addCel(int index, Constraint value)
`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"];public MessageConstraints.Builder addCel(Constraint.Builder builderForValue)
`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"];public MessageConstraints.Builder addCel(int index, Constraint.Builder builderForValue)
`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"];public MessageConstraints.Builder addAllCel(Iterable<? extends Constraint> values)
`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"];public MessageConstraints.Builder clearCel()
`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"];public MessageConstraints.Builder removeCel(int index)
`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"];public Constraint.Builder getCelBuilder(int index)
`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"];public ConstraintOrBuilder getCelOrBuilder(int index)
`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 in interface MessageConstraintsOrBuilderpublic 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"];getCelOrBuilderList in interface MessageConstraintsOrBuilderpublic Constraint.Builder addCelBuilder()
`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"];public Constraint.Builder addCelBuilder(int index)
`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"];public List<Constraint.Builder> getCelBuilderList()
`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"];public final MessageConstraints.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<MessageConstraints.Builder>public final MessageConstraints.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<MessageConstraints.Builder>Copyright © 2023. All rights reserved.