public final class MessageConstraints extends com.google.protobuf.GeneratedMessageV3 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 | Class and Description |
|---|---|
static class |
MessageConstraints.Builder
MessageConstraints represents validation rules that are applied to the entire message.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
CEL_FIELD_NUMBER |
static int |
DISABLED_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Constraint |
getCel(int index)
`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.
|
static MessageConstraints |
getDefaultInstance() |
MessageConstraints |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
boolean |
getDisabled()
`disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
|
com.google.protobuf.Parser<MessageConstraints> |
getParserForType() |
int |
getSerializedSize() |
boolean |
hasDisabled()
`disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
|
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static MessageConstraints.Builder |
newBuilder() |
static MessageConstraints.Builder |
newBuilder(MessageConstraints prototype) |
MessageConstraints.Builder |
newBuilderForType() |
protected MessageConstraints.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static MessageConstraints |
parseDelimitedFrom(InputStream input) |
static MessageConstraints |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MessageConstraints |
parseFrom(byte[] data) |
static MessageConstraints |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MessageConstraints |
parseFrom(ByteBuffer data) |
static MessageConstraints |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MessageConstraints |
parseFrom(com.google.protobuf.ByteString data) |
static MessageConstraints |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MessageConstraints |
parseFrom(com.google.protobuf.CodedInputStream input) |
static MessageConstraints |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static MessageConstraints |
parseFrom(InputStream input) |
static MessageConstraints |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<MessageConstraints> |
parser() |
MessageConstraints.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int DISABLED_FIELD_NUMBER
public static final int CEL_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public 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 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 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 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 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 final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static MessageConstraints parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MessageConstraints parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MessageConstraints parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MessageConstraints parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MessageConstraints parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MessageConstraints parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static MessageConstraints parseFrom(InputStream input) throws IOException
IOExceptionpublic static MessageConstraints parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static MessageConstraints parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static MessageConstraints parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static MessageConstraints parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static MessageConstraints parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic MessageConstraints.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static MessageConstraints.Builder newBuilder()
public static MessageConstraints.Builder newBuilder(MessageConstraints prototype)
public MessageConstraints.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected MessageConstraints.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static MessageConstraints getDefaultInstance()
public static com.google.protobuf.Parser<MessageConstraints> parser()
public com.google.protobuf.Parser<MessageConstraints> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public MessageConstraints getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024. All rights reserved.