@buyong/pi-devin 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +214 -2
- package/index.ts +16 -0
- package/package.json +62 -3
- package/proto/README.md +78 -0
- package/proto/buf/validate/validate.proto +453 -0
- package/proto/cel/expr/checked.proto +109 -0
- package/proto/cel/expr/eval.proto +44 -0
- package/proto/cel/expr/explain.proto +22 -0
- package/proto/cel/expr/syntax.proto +119 -0
- package/proto/cel/expr/value.proto +47 -0
- package/proto/connectext/grpc/status/v1/status.proto +21 -0
- package/proto/errorspb/errors.proto +58 -0
- package/proto/errorspb/hintdetail.proto +9 -0
- package/proto/errorspb/markers.proto +12 -0
- package/proto/errorspb/tags.proto +14 -0
- package/proto/errorspb/testing.proto +8 -0
- package/proto/exa/analytics_pb/analytics.proto +190 -0
- package/proto/exa/api_server_pb/api_server.proto +2590 -0
- package/proto/exa/auth_pb/auth.proto +21 -0
- package/proto/exa/auto_cascade_common_pb/auto_cascade_common.proto +81 -0
- package/proto/exa/browser_preview_pb/browser_preview.proto +26 -0
- package/proto/exa/bug_checker_pb/bug_checker.proto +24 -0
- package/proto/exa/cascade_plugins_pb/cascade_plugins.proto +264 -0
- package/proto/exa/chat_client_server_pb/chat_client_server.proto +57 -0
- package/proto/exa/chat_pb/chat.proto +452 -0
- package/proto/exa/code_edit/code_edit_pb/code_edit.proto +186 -0
- package/proto/exa/codeium_common_pb/browser_context.proto +31 -0
- package/proto/exa/codeium_common_pb/codeium_common.proto +4183 -0
- package/proto/exa/context_module_pb/context_module.proto +174 -0
- package/proto/exa/cortex_pb/cortex.proto +3288 -0
- package/proto/exa/dev_pb/dev.proto +28 -0
- package/proto/exa/diff_action_pb/diff_action.proto +76 -0
- package/proto/exa/eval/pr_eval/datasets_pb/datasets.proto +106 -0
- package/proto/exa/eval_pb/eval.proto +1318 -0
- package/proto/exa/extension_server_pb/extension_server.proto +555 -0
- package/proto/exa/file_system_provider_pb/file_system_provider.proto +75 -0
- package/proto/exa/index_pb/index.proto +469 -0
- package/proto/exa/knowledge_base_pb/knowledge_base.proto +146 -0
- package/proto/exa/language_server_pb/language_server.proto +2435 -0
- package/proto/exa/model_management_pb/model_management.proto +184 -0
- package/proto/exa/opensearch_clients_pb/opensearch_clients.proto +495 -0
- package/proto/exa/product_analytics_pb/product_analytics.proto +39 -0
- package/proto/exa/prompt_pb/prompt.proto +97 -0
- package/proto/exa/reactive_component_pb/reactive_component.proto +98 -0
- package/proto/exa/seat_management_pb/seat_management.proto +2910 -0
- package/proto/exa/tokenizer_pb/tokenizer.proto +39 -0
- package/proto/exa/trainer_pb/config.proto +643 -0
- package/proto/exa/tree_sitter/language_data_pb/language_data.proto +14 -0
- package/proto/exa/trust_pb/trust.proto +192 -0
- package/proto/exa/user_analytics_pb/user_analytics.proto +752 -0
- package/proto/google/api/expr/v1alpha1/checked.proto +108 -0
- package/proto/google/api/expr/v1alpha1/eval.proto +38 -0
- package/proto/google/api/expr/v1alpha1/explain.proto +22 -0
- package/proto/google/api/expr/v1alpha1/syntax.proto +126 -0
- package/proto/google/api/expr/v1alpha1/value.proto +47 -0
- package/proto/google/protobuf/any.proto +15 -0
- package/proto/google/protobuf/cpp_features.proto +22 -0
- package/proto/google/protobuf/descriptor.proto +473 -0
- package/proto/google/protobuf/duration.proto +16 -0
- package/proto/google/protobuf/empty.proto +14 -0
- package/proto/google/protobuf/go_features.proto +31 -0
- package/proto/google/protobuf/struct.proto +34 -0
- package/proto/google/protobuf/timestamp.proto +16 -0
- package/proto/google/protobuf/wrappers.proto +47 -0
- package/proto/google/rpc/status.proto +18 -0
- package/proto/grpc/binlog/v1/binarylog.proto +89 -0
- package/proto/io/prometheus/client/metrics.proto +103 -0
- package/src/core/auth/access.ts +6 -0
- package/src/core/auth/index.ts +2 -0
- package/src/core/auth/login.ts +177 -0
- package/src/core/auth/rest-exchange.ts +35 -0
- package/src/core/client.ts +153 -0
- package/src/core/index.ts +12 -0
- package/src/core/inference/chat.ts +229 -0
- package/src/core/inference/images.ts +24 -0
- package/src/core/inference/messages.ts +34 -0
- package/src/core/inference/retry.ts +68 -0
- package/src/core/inference/state.ts +8 -0
- package/src/core/models/access.ts +7 -0
- package/src/core/models/catalog.ts +35 -0
- package/src/core/models/index.ts +4 -0
- package/src/core/models/select.ts +43 -0
- package/src/core/models/variants.ts +163 -0
- package/src/core/protocol/device.ts +73 -0
- package/src/core/protocol/fingerprint.ts +59 -0
- package/src/core/protocol/http.ts +109 -0
- package/src/core/protocol/protobuf.ts +112 -0
- package/src/core/protocol/transport.ts +501 -0
- package/src/core/types.ts +115 -0
- package/src/pi/auth.ts +134 -0
- package/src/pi/devin-command.ts +76 -0
- package/src/pi/devin-panel.ts +77 -0
- package/src/pi/devin-settings.ts +50 -0
- package/src/pi/extension.ts +80 -0
- package/src/pi/fusion-command.ts +83 -0
- package/src/pi/fusion-picker.ts +171 -0
- package/src/pi/fusion-settings.ts +44 -0
- package/src/pi/lifecycle.ts +217 -0
- package/src/pi/messages.ts +107 -0
- package/src/pi/models.ts +378 -0
- package/src/pi/provider.ts +241 -0
- package/src/pi/sidekick-report.ts +42 -0
- package/src/pi/sidekick-runtime.ts +287 -0
- package/src/pi/sidekick.ts +190 -0
- package/src/pi/stream.ts +124 -0
- package/src/pi/usage.ts +153 -0
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
syntax = "proto2";
|
|
2
|
+
|
|
3
|
+
package buf.validate;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/descriptor.proto";
|
|
6
|
+
import "google/protobuf/duration.proto";
|
|
7
|
+
import "google/protobuf/timestamp.proto";
|
|
8
|
+
|
|
9
|
+
option java_package = "build.buf.validate";
|
|
10
|
+
option java_outer_classname = "ValidateProto";
|
|
11
|
+
option java_multiple_files = true;
|
|
12
|
+
option go_package = "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate";
|
|
13
|
+
|
|
14
|
+
enum Ignore {
|
|
15
|
+
IGNORE_UNSPECIFIED = 0;
|
|
16
|
+
IGNORE_IF_UNPOPULATED = 1;
|
|
17
|
+
IGNORE_IF_DEFAULT_VALUE = 2;
|
|
18
|
+
IGNORE_ALWAYS = 3;
|
|
19
|
+
reserved "IGNORE_EMPTYIGNORE_DEFAULT";
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
enum KnownRegex {
|
|
23
|
+
KNOWN_REGEX_UNSPECIFIED = 0;
|
|
24
|
+
KNOWN_REGEX_HTTP_HEADER_NAME = 1;
|
|
25
|
+
KNOWN_REGEX_HTTP_HEADER_VALUE = 2;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
message Rule {
|
|
29
|
+
optional string id = 1;
|
|
30
|
+
optional string message = 2;
|
|
31
|
+
optional string expression = 3;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
message MessageRules {
|
|
35
|
+
optional bool disabled = 1;
|
|
36
|
+
repeated Rule cel = 3;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
message OneofRules {
|
|
40
|
+
optional bool required = 1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
message FieldRules {
|
|
44
|
+
repeated Rule cel = 23;
|
|
45
|
+
optional bool required = 25;
|
|
46
|
+
optional Ignore ignore = 27;
|
|
47
|
+
oneof type {
|
|
48
|
+
FloatRules float = 1;
|
|
49
|
+
DoubleRules double = 2;
|
|
50
|
+
Int32Rules int32 = 3;
|
|
51
|
+
Int64Rules int64 = 4;
|
|
52
|
+
UInt32Rules uint32 = 5;
|
|
53
|
+
UInt64Rules uint64 = 6;
|
|
54
|
+
SInt32Rules sint32 = 7;
|
|
55
|
+
SInt64Rules sint64 = 8;
|
|
56
|
+
Fixed32Rules fixed32 = 9;
|
|
57
|
+
Fixed64Rules fixed64 = 10;
|
|
58
|
+
SFixed32Rules sfixed32 = 11;
|
|
59
|
+
SFixed64Rules sfixed64 = 12;
|
|
60
|
+
BoolRules bool = 13;
|
|
61
|
+
StringRules string = 14;
|
|
62
|
+
BytesRules bytes = 15;
|
|
63
|
+
EnumRules enum = 16;
|
|
64
|
+
RepeatedRules repeated = 18;
|
|
65
|
+
MapRules map = 19;
|
|
66
|
+
AnyRules any = 20;
|
|
67
|
+
DurationRules duration = 21;
|
|
68
|
+
TimestampRules timestamp = 22;
|
|
69
|
+
}
|
|
70
|
+
reserved 24;
|
|
71
|
+
reserved 26;
|
|
72
|
+
reserved "skipped";
|
|
73
|
+
reserved "ignore_empty";
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
message PredefinedRules {
|
|
77
|
+
repeated Rule cel = 1;
|
|
78
|
+
reserved 24;
|
|
79
|
+
reserved 26;
|
|
80
|
+
reserved "skippedignore_empty";
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
message FloatRules {
|
|
84
|
+
optional float const = 1 [(buf.validate.predefined) = { cel: [{ id: "float.const", expression: "this != getField(rules, \047const\047) ? \047value must equal %s\047.format([getField(rules, \047const\047)]) : \047\047" }] }];
|
|
85
|
+
oneof less_than {
|
|
86
|
+
float lt = 2 [(buf.validate.predefined) = { cel: [{ id: "float.lt", expression: "!has(rules.gte) && !has(rules.gt) && (this.isNan() || this >= rules.lt)? \047value must be less than %s\047.format([rules.lt]) : \047\047" }] }];
|
|
87
|
+
float lte = 3 [(buf.validate.predefined) = { cel: [{ id: "float.lte", expression: "!has(rules.gte) && !has(rules.gt) && (this.isNan() || this > rules.lte)? \047value must be less than or equal to %s\047.format([rules.lte]) : \047\047" }] }];
|
|
88
|
+
}
|
|
89
|
+
oneof greater_than {
|
|
90
|
+
float gt = 4 [(buf.validate.predefined) = { cel: [{ id: "float.gt", expression: "!has(rules.lt) && !has(rules.lte) && (this.isNan() || this <= rules.gt)? \047value must be greater than %s\047.format([rules.gt]) : \047\047" }, { id: "float.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this.isNan() || this >= rules.lt || this <= rules.gt)? \047value must be greater than %s and less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "float.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (this.isNan() || (rules.lt <= this && this <= rules.gt))? \047value must be greater than %s or less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "float.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this.isNan() || this > rules.lte || this <= rules.gt)? \047value must be greater than %s and less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }, { id: "float.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (this.isNan() || (rules.lte < this && this <= rules.gt))? \047value must be greater than %s or less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }] }];
|
|
91
|
+
float gte = 5 [(buf.validate.predefined) = { cel: [{ id: "float.gte", expression: "!has(rules.lt) && !has(rules.lte) && (this.isNan() || this < rules.gte)? \047value must be greater than or equal to %s\047.format([rules.gte]) : \047\047" }, { id: "float.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this.isNan() || this >= rules.lt || this < rules.gte)? \047value must be greater than or equal to %s and less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "float.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (this.isNan() || (rules.lt <= this && this < rules.gte))? \047value must be greater than or equal to %s or less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "float.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this.isNan() || this > rules.lte || this < rules.gte)? \047value must be greater than or equal to %s and less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }, { id: "float.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (this.isNan() || (rules.lte < this && this < rules.gte))? \047value must be greater than or equal to %s or less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }] }];
|
|
92
|
+
}
|
|
93
|
+
repeated float in = 6 [(buf.validate.predefined) = { cel: [{ id: "float.in", expression: "!(this in getField(rules, \047in\047)) ? \047value must be in list %s\047.format([getField(rules, \047in\047)]) : \047\047" }] }];
|
|
94
|
+
repeated float not_in = 7 [(buf.validate.predefined) = { cel: [{ id: "float.not_in", expression: "this in rules.not_in ? \047value must not be in list %s\047.format([rules.not_in]) : \047\047" }] }];
|
|
95
|
+
optional bool finite = 8 [(buf.validate.predefined) = { cel: [{ id: "float.finite", expression: "rules.finite ? (this.isNan() || this.isInf() ? \047value must be finite\047 : \047\047) : \047\047" }] }];
|
|
96
|
+
repeated float example = 9 [(buf.validate.predefined) = { cel: [{ id: "float.example", expression: "true" }] }];
|
|
97
|
+
extensions 1000 to max;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
message DoubleRules {
|
|
101
|
+
optional double const = 1 [(buf.validate.predefined) = { cel: [{ id: "double.const", expression: "this != getField(rules, \047const\047) ? \047value must equal %s\047.format([getField(rules, \047const\047)]) : \047\047" }] }];
|
|
102
|
+
oneof less_than {
|
|
103
|
+
double lt = 2 [(buf.validate.predefined) = { cel: [{ id: "double.lt", expression: "!has(rules.gte) && !has(rules.gt) && (this.isNan() || this >= rules.lt)? \047value must be less than %s\047.format([rules.lt]) : \047\047" }] }];
|
|
104
|
+
double lte = 3 [(buf.validate.predefined) = { cel: [{ id: "double.lte", expression: "!has(rules.gte) && !has(rules.gt) && (this.isNan() || this > rules.lte)? \047value must be less than or equal to %s\047.format([rules.lte]) : \047\047" }] }];
|
|
105
|
+
}
|
|
106
|
+
oneof greater_than {
|
|
107
|
+
double gt = 4 [(buf.validate.predefined) = { cel: [{ id: "double.gt", expression: "!has(rules.lt) && !has(rules.lte) && (this.isNan() || this <= rules.gt)? \047value must be greater than %s\047.format([rules.gt]) : \047\047" }, { id: "double.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this.isNan() || this >= rules.lt || this <= rules.gt)? \047value must be greater than %s and less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "double.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (this.isNan() || (rules.lt <= this && this <= rules.gt))? \047value must be greater than %s or less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "double.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this.isNan() || this > rules.lte || this <= rules.gt)? \047value must be greater than %s and less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }, { id: "double.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (this.isNan() || (rules.lte < this && this <= rules.gt))? \047value must be greater than %s or less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }] }];
|
|
108
|
+
double gte = 5 [(buf.validate.predefined) = { cel: [{ id: "double.gte", expression: "!has(rules.lt) && !has(rules.lte) && (this.isNan() || this < rules.gte)? \047value must be greater than or equal to %s\047.format([rules.gte]) : \047\047" }, { id: "double.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this.isNan() || this >= rules.lt || this < rules.gte)? \047value must be greater than or equal to %s and less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "double.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (this.isNan() || (rules.lt <= this && this < rules.gte))? \047value must be greater than or equal to %s or less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "double.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this.isNan() || this > rules.lte || this < rules.gte)? \047value must be greater than or equal to %s and less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }, { id: "double.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (this.isNan() || (rules.lte < this && this < rules.gte))? \047value must be greater than or equal to %s or less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }] }];
|
|
109
|
+
}
|
|
110
|
+
repeated double in = 6 [(buf.validate.predefined) = { cel: [{ id: "double.in", expression: "!(this in getField(rules, \047in\047)) ? \047value must be in list %s\047.format([getField(rules, \047in\047)]) : \047\047" }] }];
|
|
111
|
+
repeated double not_in = 7 [(buf.validate.predefined) = { cel: [{ id: "double.not_in", expression: "this in rules.not_in ? \047value must not be in list %s\047.format([rules.not_in]) : \047\047" }] }];
|
|
112
|
+
optional bool finite = 8 [(buf.validate.predefined) = { cel: [{ id: "double.finite", expression: "rules.finite ? (this.isNan() || this.isInf() ? \047value must be finite\047 : \047\047) : \047\047" }] }];
|
|
113
|
+
repeated double example = 9 [(buf.validate.predefined) = { cel: [{ id: "double.example", expression: "true" }] }];
|
|
114
|
+
extensions 1000 to max;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
message Int32Rules {
|
|
118
|
+
optional int32 const = 1 [(buf.validate.predefined) = { cel: [{ id: "int32.const", expression: "this != getField(rules, \047const\047) ? \047value must equal %s\047.format([getField(rules, \047const\047)]) : \047\047" }] }];
|
|
119
|
+
oneof less_than {
|
|
120
|
+
int32 lt = 2 [(buf.validate.predefined) = { cel: [{ id: "int32.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \047value must be less than %s\047.format([rules.lt]) : \047\047" }] }];
|
|
121
|
+
int32 lte = 3 [(buf.validate.predefined) = { cel: [{ id: "int32.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? \047value must be less than or equal to %s\047.format([rules.lte]) : \047\047" }] }];
|
|
122
|
+
}
|
|
123
|
+
oneof greater_than {
|
|
124
|
+
int32 gt = 4 [(buf.validate.predefined) = { cel: [{ id: "int32.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \047value must be greater than %s\047.format([rules.gt]) : \047\047" }, { id: "int32.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \047value must be greater than %s and less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "int32.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \047value must be greater than %s or less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "int32.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \047value must be greater than %s and less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }, { id: "int32.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \047value must be greater than %s or less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }] }];
|
|
125
|
+
int32 gte = 5 [(buf.validate.predefined) = { cel: [{ id: "int32.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? \047value must be greater than or equal to %s\047.format([rules.gte]) : \047\047" }, { id: "int32.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \047value must be greater than or equal to %s and less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "int32.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \047value must be greater than or equal to %s or less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "int32.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \047value must be greater than or equal to %s and less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }, { id: "int32.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \047value must be greater than or equal to %s or less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }] }];
|
|
126
|
+
}
|
|
127
|
+
repeated int32 in = 6 [(buf.validate.predefined) = { cel: [{ id: "int32.in", expression: "!(this in getField(rules, \047in\047)) ? \047value must be in list %s\047.format([getField(rules, \047in\047)]) : \047\047" }] }];
|
|
128
|
+
repeated int32 not_in = 7 [(buf.validate.predefined) = { cel: [{ id: "int32.not_in", expression: "this in rules.not_in ? \047value must not be in list %s\047.format([rules.not_in]) : \047\047" }] }];
|
|
129
|
+
repeated int32 example = 8 [(buf.validate.predefined) = { cel: [{ id: "int32.example", expression: "true" }] }];
|
|
130
|
+
extensions 1000 to max;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
message Int64Rules {
|
|
134
|
+
optional int64 const = 1 [(buf.validate.predefined) = { cel: [{ id: "int64.const", expression: "this != getField(rules, \047const\047) ? \047value must equal %s\047.format([getField(rules, \047const\047)]) : \047\047" }] }];
|
|
135
|
+
oneof less_than {
|
|
136
|
+
int64 lt = 2 [(buf.validate.predefined) = { cel: [{ id: "int64.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \047value must be less than %s\047.format([rules.lt]) : \047\047" }] }];
|
|
137
|
+
int64 lte = 3 [(buf.validate.predefined) = { cel: [{ id: "int64.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? \047value must be less than or equal to %s\047.format([rules.lte]) : \047\047" }] }];
|
|
138
|
+
}
|
|
139
|
+
oneof greater_than {
|
|
140
|
+
int64 gt = 4 [(buf.validate.predefined) = { cel: [{ id: "int64.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \047value must be greater than %s\047.format([rules.gt]) : \047\047" }, { id: "int64.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \047value must be greater than %s and less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "int64.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \047value must be greater than %s or less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "int64.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \047value must be greater than %s and less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }, { id: "int64.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \047value must be greater than %s or less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }] }];
|
|
141
|
+
int64 gte = 5 [(buf.validate.predefined) = { cel: [{ id: "int64.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? \047value must be greater than or equal to %s\047.format([rules.gte]) : \047\047" }, { id: "int64.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \047value must be greater than or equal to %s and less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "int64.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \047value must be greater than or equal to %s or less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "int64.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \047value must be greater than or equal to %s and less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }, { id: "int64.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \047value must be greater than or equal to %s or less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }] }];
|
|
142
|
+
}
|
|
143
|
+
repeated int64 in = 6 [(buf.validate.predefined) = { cel: [{ id: "int64.in", expression: "!(this in getField(rules, \047in\047)) ? \047value must be in list %s\047.format([getField(rules, \047in\047)]) : \047\047" }] }];
|
|
144
|
+
repeated int64 not_in = 7 [(buf.validate.predefined) = { cel: [{ id: "int64.not_in", expression: "this in rules.not_in ? \047value must not be in list %s\047.format([rules.not_in]) : \047\047" }] }];
|
|
145
|
+
repeated int64 example = 9 [(buf.validate.predefined) = { cel: [{ id: "int64.example", expression: "true" }] }];
|
|
146
|
+
extensions 1000 to max;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
message UInt32Rules {
|
|
150
|
+
optional uint32 const = 1 [(buf.validate.predefined) = { cel: [{ id: "uint32.const", expression: "this != getField(rules, \047const\047) ? \047value must equal %s\047.format([getField(rules, \047const\047)]) : \047\047" }] }];
|
|
151
|
+
oneof less_than {
|
|
152
|
+
uint32 lt = 2 [(buf.validate.predefined) = { cel: [{ id: "uint32.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \047value must be less than %s\047.format([rules.lt]) : \047\047" }] }];
|
|
153
|
+
uint32 lte = 3 [(buf.validate.predefined) = { cel: [{ id: "uint32.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? \047value must be less than or equal to %s\047.format([rules.lte]) : \047\047" }] }];
|
|
154
|
+
}
|
|
155
|
+
oneof greater_than {
|
|
156
|
+
uint32 gt = 4 [(buf.validate.predefined) = { cel: [{ id: "uint32.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \047value must be greater than %s\047.format([rules.gt]) : \047\047" }, { id: "uint32.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \047value must be greater than %s and less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "uint32.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \047value must be greater than %s or less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "uint32.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \047value must be greater than %s and less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }, { id: "uint32.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \047value must be greater than %s or less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }] }];
|
|
157
|
+
uint32 gte = 5 [(buf.validate.predefined) = { cel: [{ id: "uint32.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? \047value must be greater than or equal to %s\047.format([rules.gte]) : \047\047" }, { id: "uint32.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \047value must be greater than or equal to %s and less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "uint32.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \047value must be greater than or equal to %s or less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "uint32.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \047value must be greater than or equal to %s and less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }, { id: "uint32.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \047value must be greater than or equal to %s or less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }] }];
|
|
158
|
+
}
|
|
159
|
+
repeated uint32 in = 6 [(buf.validate.predefined) = { cel: [{ id: "uint32.in", expression: "!(this in getField(rules, \047in\047)) ? \047value must be in list %s\047.format([getField(rules, \047in\047)]) : \047\047" }] }];
|
|
160
|
+
repeated uint32 not_in = 7 [(buf.validate.predefined) = { cel: [{ id: "uint32.not_in", expression: "this in rules.not_in ? \047value must not be in list %s\047.format([rules.not_in]) : \047\047" }] }];
|
|
161
|
+
repeated uint32 example = 8 [(buf.validate.predefined) = { cel: [{ id: "uint32.example", expression: "true" }] }];
|
|
162
|
+
extensions 1000 to max;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
message UInt64Rules {
|
|
166
|
+
optional uint64 const = 1 [(buf.validate.predefined) = { cel: [{ id: "uint64.const", expression: "this != getField(rules, \047const\047) ? \047value must equal %s\047.format([getField(rules, \047const\047)]) : \047\047" }] }];
|
|
167
|
+
oneof less_than {
|
|
168
|
+
uint64 lt = 2 [(buf.validate.predefined) = { cel: [{ id: "uint64.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \047value must be less than %s\047.format([rules.lt]) : \047\047" }] }];
|
|
169
|
+
uint64 lte = 3 [(buf.validate.predefined) = { cel: [{ id: "uint64.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? \047value must be less than or equal to %s\047.format([rules.lte]) : \047\047" }] }];
|
|
170
|
+
}
|
|
171
|
+
oneof greater_than {
|
|
172
|
+
uint64 gt = 4 [(buf.validate.predefined) = { cel: [{ id: "uint64.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \047value must be greater than %s\047.format([rules.gt]) : \047\047" }, { id: "uint64.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \047value must be greater than %s and less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "uint64.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \047value must be greater than %s or less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "uint64.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \047value must be greater than %s and less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }, { id: "uint64.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \047value must be greater than %s or less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }] }];
|
|
173
|
+
uint64 gte = 5 [(buf.validate.predefined) = { cel: [{ id: "uint64.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? \047value must be greater than or equal to %s\047.format([rules.gte]) : \047\047" }, { id: "uint64.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \047value must be greater than or equal to %s and less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "uint64.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \047value must be greater than or equal to %s or less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "uint64.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \047value must be greater than or equal to %s and less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }, { id: "uint64.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \047value must be greater than or equal to %s or less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }] }];
|
|
174
|
+
}
|
|
175
|
+
repeated uint64 in = 6 [(buf.validate.predefined) = { cel: [{ id: "uint64.in", expression: "!(this in getField(rules, \047in\047)) ? \047value must be in list %s\047.format([getField(rules, \047in\047)]) : \047\047" }] }];
|
|
176
|
+
repeated uint64 not_in = 7 [(buf.validate.predefined) = { cel: [{ id: "uint64.not_in", expression: "this in rules.not_in ? \047value must not be in list %s\047.format([rules.not_in]) : \047\047" }] }];
|
|
177
|
+
repeated uint64 example = 8 [(buf.validate.predefined) = { cel: [{ id: "uint64.example", expression: "true" }] }];
|
|
178
|
+
extensions 1000 to max;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
message SInt32Rules {
|
|
182
|
+
optional sint32 const = 1 [(buf.validate.predefined) = { cel: [{ id: "sint32.const", expression: "this != getField(rules, \047const\047) ? \047value must equal %s\047.format([getField(rules, \047const\047)]) : \047\047" }] }];
|
|
183
|
+
oneof less_than {
|
|
184
|
+
sint32 lt = 2 [(buf.validate.predefined) = { cel: [{ id: "sint32.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \047value must be less than %s\047.format([rules.lt]) : \047\047" }] }];
|
|
185
|
+
sint32 lte = 3 [(buf.validate.predefined) = { cel: [{ id: "sint32.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? \047value must be less than or equal to %s\047.format([rules.lte]) : \047\047" }] }];
|
|
186
|
+
}
|
|
187
|
+
oneof greater_than {
|
|
188
|
+
sint32 gt = 4 [(buf.validate.predefined) = { cel: [{ id: "sint32.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \047value must be greater than %s\047.format([rules.gt]) : \047\047" }, { id: "sint32.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \047value must be greater than %s and less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "sint32.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \047value must be greater than %s or less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "sint32.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \047value must be greater than %s and less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }, { id: "sint32.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \047value must be greater than %s or less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }] }];
|
|
189
|
+
sint32 gte = 5 [(buf.validate.predefined) = { cel: [{ id: "sint32.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? \047value must be greater than or equal to %s\047.format([rules.gte]) : \047\047" }, { id: "sint32.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \047value must be greater than or equal to %s and less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "sint32.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \047value must be greater than or equal to %s or less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "sint32.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \047value must be greater than or equal to %s and less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }, { id: "sint32.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \047value must be greater than or equal to %s or less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }] }];
|
|
190
|
+
}
|
|
191
|
+
repeated sint32 in = 6 [(buf.validate.predefined) = { cel: [{ id: "sint32.in", expression: "!(this in getField(rules, \047in\047)) ? \047value must be in list %s\047.format([getField(rules, \047in\047)]) : \047\047" }] }];
|
|
192
|
+
repeated sint32 not_in = 7 [(buf.validate.predefined) = { cel: [{ id: "sint32.not_in", expression: "this in rules.not_in ? \047value must not be in list %s\047.format([rules.not_in]) : \047\047" }] }];
|
|
193
|
+
repeated sint32 example = 8 [(buf.validate.predefined) = { cel: [{ id: "sint32.example", expression: "true" }] }];
|
|
194
|
+
extensions 1000 to max;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
message SInt64Rules {
|
|
198
|
+
optional sint64 const = 1 [(buf.validate.predefined) = { cel: [{ id: "sint64.const", expression: "this != getField(rules, \047const\047) ? \047value must equal %s\047.format([getField(rules, \047const\047)]) : \047\047" }] }];
|
|
199
|
+
oneof less_than {
|
|
200
|
+
sint64 lt = 2 [(buf.validate.predefined) = { cel: [{ id: "sint64.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \047value must be less than %s\047.format([rules.lt]) : \047\047" }] }];
|
|
201
|
+
sint64 lte = 3 [(buf.validate.predefined) = { cel: [{ id: "sint64.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? \047value must be less than or equal to %s\047.format([rules.lte]) : \047\047" }] }];
|
|
202
|
+
}
|
|
203
|
+
oneof greater_than {
|
|
204
|
+
sint64 gt = 4 [(buf.validate.predefined) = { cel: [{ id: "sint64.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \047value must be greater than %s\047.format([rules.gt]) : \047\047" }, { id: "sint64.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \047value must be greater than %s and less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "sint64.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \047value must be greater than %s or less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "sint64.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \047value must be greater than %s and less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }, { id: "sint64.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \047value must be greater than %s or less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }] }];
|
|
205
|
+
sint64 gte = 5 [(buf.validate.predefined) = { cel: [{ id: "sint64.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? \047value must be greater than or equal to %s\047.format([rules.gte]) : \047\047" }, { id: "sint64.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \047value must be greater than or equal to %s and less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "sint64.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \047value must be greater than or equal to %s or less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "sint64.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \047value must be greater than or equal to %s and less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }, { id: "sint64.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \047value must be greater than or equal to %s or less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }] }];
|
|
206
|
+
}
|
|
207
|
+
repeated sint64 in = 6 [(buf.validate.predefined) = { cel: [{ id: "sint64.in", expression: "!(this in getField(rules, \047in\047)) ? \047value must be in list %s\047.format([getField(rules, \047in\047)]) : \047\047" }] }];
|
|
208
|
+
repeated sint64 not_in = 7 [(buf.validate.predefined) = { cel: [{ id: "sint64.not_in", expression: "this in rules.not_in ? \047value must not be in list %s\047.format([rules.not_in]) : \047\047" }] }];
|
|
209
|
+
repeated sint64 example = 8 [(buf.validate.predefined) = { cel: [{ id: "sint64.example", expression: "true" }] }];
|
|
210
|
+
extensions 1000 to max;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
message Fixed32Rules {
|
|
214
|
+
optional fixed32 const = 1 [(buf.validate.predefined) = { cel: [{ id: "fixed32.const", expression: "this != getField(rules, \047const\047) ? \047value must equal %s\047.format([getField(rules, \047const\047)]) : \047\047" }] }];
|
|
215
|
+
oneof less_than {
|
|
216
|
+
fixed32 lt = 2 [(buf.validate.predefined) = { cel: [{ id: "fixed32.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \047value must be less than %s\047.format([rules.lt]) : \047\047" }] }];
|
|
217
|
+
fixed32 lte = 3 [(buf.validate.predefined) = { cel: [{ id: "fixed32.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? \047value must be less than or equal to %s\047.format([rules.lte]) : \047\047" }] }];
|
|
218
|
+
}
|
|
219
|
+
oneof greater_than {
|
|
220
|
+
fixed32 gt = 4 [(buf.validate.predefined) = { cel: [{ id: "fixed32.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \047value must be greater than %s\047.format([rules.gt]) : \047\047" }, { id: "fixed32.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \047value must be greater than %s and less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "fixed32.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \047value must be greater than %s or less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "fixed32.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \047value must be greater than %s and less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }, { id: "fixed32.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \047value must be greater than %s or less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }] }];
|
|
221
|
+
fixed32 gte = 5 [(buf.validate.predefined) = { cel: [{ id: "fixed32.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? \047value must be greater than or equal to %s\047.format([rules.gte]) : \047\047" }, { id: "fixed32.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \047value must be greater than or equal to %s and less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "fixed32.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \047value must be greater than or equal to %s or less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "fixed32.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \047value must be greater than or equal to %s and less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }, { id: "fixed32.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \047value must be greater than or equal to %s or less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }] }];
|
|
222
|
+
}
|
|
223
|
+
repeated fixed32 in = 6 [(buf.validate.predefined) = { cel: [{ id: "fixed32.in", expression: "!(this in getField(rules, \047in\047)) ? \047value must be in list %s\047.format([getField(rules, \047in\047)]) : \047\047" }] }];
|
|
224
|
+
repeated fixed32 not_in = 7 [(buf.validate.predefined) = { cel: [{ id: "fixed32.not_in", expression: "this in rules.not_in ? \047value must not be in list %s\047.format([rules.not_in]) : \047\047" }] }];
|
|
225
|
+
repeated fixed32 example = 8 [(buf.validate.predefined) = { cel: [{ id: "fixed32.example", expression: "true" }] }];
|
|
226
|
+
extensions 1000 to max;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
message Fixed64Rules {
|
|
230
|
+
optional fixed64 const = 1 [(buf.validate.predefined) = { cel: [{ id: "fixed64.const", expression: "this != getField(rules, \047const\047) ? \047value must equal %s\047.format([getField(rules, \047const\047)]) : \047\047" }] }];
|
|
231
|
+
oneof less_than {
|
|
232
|
+
fixed64 lt = 2 [(buf.validate.predefined) = { cel: [{ id: "fixed64.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \047value must be less than %s\047.format([rules.lt]) : \047\047" }] }];
|
|
233
|
+
fixed64 lte = 3 [(buf.validate.predefined) = { cel: [{ id: "fixed64.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? \047value must be less than or equal to %s\047.format([rules.lte]) : \047\047" }] }];
|
|
234
|
+
}
|
|
235
|
+
oneof greater_than {
|
|
236
|
+
fixed64 gt = 4 [(buf.validate.predefined) = { cel: [{ id: "fixed64.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \047value must be greater than %s\047.format([rules.gt]) : \047\047" }, { id: "fixed64.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \047value must be greater than %s and less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "fixed64.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \047value must be greater than %s or less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "fixed64.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \047value must be greater than %s and less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }, { id: "fixed64.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \047value must be greater than %s or less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }] }];
|
|
237
|
+
fixed64 gte = 5 [(buf.validate.predefined) = { cel: [{ id: "fixed64.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? \047value must be greater than or equal to %s\047.format([rules.gte]) : \047\047" }, { id: "fixed64.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \047value must be greater than or equal to %s and less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "fixed64.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \047value must be greater than or equal to %s or less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "fixed64.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \047value must be greater than or equal to %s and less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }, { id: "fixed64.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \047value must be greater than or equal to %s or less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }] }];
|
|
238
|
+
}
|
|
239
|
+
repeated fixed64 in = 6 [(buf.validate.predefined) = { cel: [{ id: "fixed64.in", expression: "!(this in getField(rules, \047in\047)) ? \047value must be in list %s\047.format([getField(rules, \047in\047)]) : \047\047" }] }];
|
|
240
|
+
repeated fixed64 not_in = 7 [(buf.validate.predefined) = { cel: [{ id: "fixed64.not_in", expression: "this in rules.not_in ? \047value must not be in list %s\047.format([rules.not_in]) : \047\047" }] }];
|
|
241
|
+
repeated fixed64 example = 8 [(buf.validate.predefined) = { cel: [{ id: "fixed64.example", expression: "true" }] }];
|
|
242
|
+
extensions 1000 to max;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
message SFixed32Rules {
|
|
246
|
+
optional sfixed32 const = 1 [(buf.validate.predefined) = { cel: [{ id: "sfixed32.const", expression: "this != getField(rules, \047const\047) ? \047value must equal %s\047.format([getField(rules, \047const\047)]) : \047\047" }] }];
|
|
247
|
+
oneof less_than {
|
|
248
|
+
sfixed32 lt = 2 [(buf.validate.predefined) = { cel: [{ id: "sfixed32.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \047value must be less than %s\047.format([rules.lt]) : \047\047" }] }];
|
|
249
|
+
sfixed32 lte = 3 [(buf.validate.predefined) = { cel: [{ id: "sfixed32.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? \047value must be less than or equal to %s\047.format([rules.lte]) : \047\047" }] }];
|
|
250
|
+
}
|
|
251
|
+
oneof greater_than {
|
|
252
|
+
sfixed32 gt = 4 [(buf.validate.predefined) = { cel: [{ id: "sfixed32.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \047value must be greater than %s\047.format([rules.gt]) : \047\047" }, { id: "sfixed32.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \047value must be greater than %s and less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "sfixed32.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \047value must be greater than %s or less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "sfixed32.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \047value must be greater than %s and less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }, { id: "sfixed32.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \047value must be greater than %s or less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }] }];
|
|
253
|
+
sfixed32 gte = 5 [(buf.validate.predefined) = { cel: [{ id: "sfixed32.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? \047value must be greater than or equal to %s\047.format([rules.gte]) : \047\047" }, { id: "sfixed32.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \047value must be greater than or equal to %s and less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "sfixed32.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \047value must be greater than or equal to %s or less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "sfixed32.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \047value must be greater than or equal to %s and less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }, { id: "sfixed32.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \047value must be greater than or equal to %s or less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }] }];
|
|
254
|
+
}
|
|
255
|
+
repeated sfixed32 in = 6 [(buf.validate.predefined) = { cel: [{ id: "sfixed32.in", expression: "!(this in getField(rules, \047in\047)) ? \047value must be in list %s\047.format([getField(rules, \047in\047)]) : \047\047" }] }];
|
|
256
|
+
repeated sfixed32 not_in = 7 [(buf.validate.predefined) = { cel: [{ id: "sfixed32.not_in", expression: "this in rules.not_in ? \047value must not be in list %s\047.format([rules.not_in]) : \047\047" }] }];
|
|
257
|
+
repeated sfixed32 example = 8 [(buf.validate.predefined) = { cel: [{ id: "sfixed32.example", expression: "true" }] }];
|
|
258
|
+
extensions 1000 to max;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
message SFixed64Rules {
|
|
262
|
+
optional sfixed64 const = 1 [(buf.validate.predefined) = { cel: [{ id: "sfixed64.const", expression: "this != getField(rules, \047const\047) ? \047value must equal %s\047.format([getField(rules, \047const\047)]) : \047\047" }] }];
|
|
263
|
+
oneof less_than {
|
|
264
|
+
sfixed64 lt = 2 [(buf.validate.predefined) = { cel: [{ id: "sfixed64.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \047value must be less than %s\047.format([rules.lt]) : \047\047" }] }];
|
|
265
|
+
sfixed64 lte = 3 [(buf.validate.predefined) = { cel: [{ id: "sfixed64.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? \047value must be less than or equal to %s\047.format([rules.lte]) : \047\047" }] }];
|
|
266
|
+
}
|
|
267
|
+
oneof greater_than {
|
|
268
|
+
sfixed64 gt = 4 [(buf.validate.predefined) = { cel: [{ id: "sfixed64.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \047value must be greater than %s\047.format([rules.gt]) : \047\047" }, { id: "sfixed64.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \047value must be greater than %s and less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "sfixed64.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \047value must be greater than %s or less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "sfixed64.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \047value must be greater than %s and less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }, { id: "sfixed64.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \047value must be greater than %s or less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }] }];
|
|
269
|
+
sfixed64 gte = 5 [(buf.validate.predefined) = { cel: [{ id: "sfixed64.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? \047value must be greater than or equal to %s\047.format([rules.gte]) : \047\047" }, { id: "sfixed64.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \047value must be greater than or equal to %s and less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "sfixed64.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \047value must be greater than or equal to %s or less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "sfixed64.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \047value must be greater than or equal to %s and less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }, { id: "sfixed64.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \047value must be greater than or equal to %s or less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }] }];
|
|
270
|
+
}
|
|
271
|
+
repeated sfixed64 in = 6 [(buf.validate.predefined) = { cel: [{ id: "sfixed64.in", expression: "!(this in getField(rules, \047in\047)) ? \047value must be in list %s\047.format([getField(rules, \047in\047)]) : \047\047" }] }];
|
|
272
|
+
repeated sfixed64 not_in = 7 [(buf.validate.predefined) = { cel: [{ id: "sfixed64.not_in", expression: "this in rules.not_in ? \047value must not be in list %s\047.format([rules.not_in]) : \047\047" }] }];
|
|
273
|
+
repeated sfixed64 example = 8 [(buf.validate.predefined) = { cel: [{ id: "sfixed64.example", expression: "true" }] }];
|
|
274
|
+
extensions 1000 to max;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
message BoolRules {
|
|
278
|
+
optional bool const = 1 [(buf.validate.predefined) = { cel: [{ id: "bool.const", expression: "this != getField(rules, \047const\047) ? \047value must equal %s\047.format([getField(rules, \047const\047)]) : \047\047" }] }];
|
|
279
|
+
repeated bool example = 2 [(buf.validate.predefined) = { cel: [{ id: "bool.example", expression: "true" }] }];
|
|
280
|
+
extensions 1000 to max;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
message StringRules {
|
|
284
|
+
optional string const = 1 [(buf.validate.predefined) = { cel: [{ id: "string.const", expression: "this != getField(rules, \047const\047) ? \047value must equal `%s`\047.format([getField(rules, \047const\047)]) : \047\047" }] }];
|
|
285
|
+
optional uint64 len = 19 [(buf.validate.predefined) = { cel: [{ id: "string.len", expression: "uint(this.size()) != rules.len ? \047value length must be %s characters\047.format([rules.len]) : \047\047" }] }];
|
|
286
|
+
optional uint64 min_len = 2 [(buf.validate.predefined) = { cel: [{ id: "string.min_len", expression: "uint(this.size()) < rules.min_len ? \047value length must be at least %s characters\047.format([rules.min_len]) : \047\047" }] }];
|
|
287
|
+
optional uint64 max_len = 3 [(buf.validate.predefined) = { cel: [{ id: "string.max_len", expression: "uint(this.size()) > rules.max_len ? \047value length must be at most %s characters\047.format([rules.max_len]) : \047\047" }] }];
|
|
288
|
+
optional uint64 len_bytes = 20 [(buf.validate.predefined) = { cel: [{ id: "string.len_bytes", expression: "uint(bytes(this).size()) != rules.len_bytes ? \047value length must be %s bytes\047.format([rules.len_bytes]) : \047\047" }] }];
|
|
289
|
+
optional uint64 min_bytes = 4 [(buf.validate.predefined) = { cel: [{ id: "string.min_bytes", expression: "uint(bytes(this).size()) < rules.min_bytes ? \047value length must be at least %s bytes\047.format([rules.min_bytes]) : \047\047" }] }];
|
|
290
|
+
optional uint64 max_bytes = 5 [(buf.validate.predefined) = { cel: [{ id: "string.max_bytes", expression: "uint(bytes(this).size()) > rules.max_bytes ? \047value length must be at most %s bytes\047.format([rules.max_bytes]) : \047\047" }] }];
|
|
291
|
+
optional string pattern = 6 [(buf.validate.predefined) = { cel: [{ id: "string.pattern", expression: "!this.matches(rules.pattern) ? \047value does not match regex pattern `%s`\047.format([rules.pattern]) : \047\047" }] }];
|
|
292
|
+
optional string prefix = 7 [(buf.validate.predefined) = { cel: [{ id: "string.prefix", expression: "!this.startsWith(rules.prefix) ? \047value does not have prefix `%s`\047.format([rules.prefix]) : \047\047" }] }];
|
|
293
|
+
optional string suffix = 8 [(buf.validate.predefined) = { cel: [{ id: "string.suffix", expression: "!this.endsWith(rules.suffix) ? \047value does not have suffix `%s`\047.format([rules.suffix]) : \047\047" }] }];
|
|
294
|
+
optional string contains = 9 [(buf.validate.predefined) = { cel: [{ id: "string.contains", expression: "!this.contains(rules.contains) ? \047value does not contain substring `%s`\047.format([rules.contains]) : \047\047" }] }];
|
|
295
|
+
optional string not_contains = 23 [(buf.validate.predefined) = { cel: [{ id: "string.not_contains", expression: "this.contains(rules.not_contains) ? \047value contains substring `%s`\047.format([rules.not_contains]) : \047\047" }] }];
|
|
296
|
+
repeated string in = 10 [(buf.validate.predefined) = { cel: [{ id: "string.in", expression: "!(this in getField(rules, \047in\047)) ? \047value must be in list %s\047.format([getField(rules, \047in\047)]) : \047\047" }] }];
|
|
297
|
+
repeated string not_in = 11 [(buf.validate.predefined) = { cel: [{ id: "string.not_in", expression: "this in rules.not_in ? \047value must not be in list %s\047.format([rules.not_in]) : \047\047" }] }];
|
|
298
|
+
oneof well_known {
|
|
299
|
+
bool email = 12 [(buf.validate.predefined) = { cel: [{ id: "string.email", message: "value must be a valid email address", expression: "!rules.email || this == \047\047 || this.isEmail()" }, { id: "string.email_empty", message: "value is empty, which is not a valid email address", expression: "!rules.email || this != \047\047" }] }];
|
|
300
|
+
bool hostname = 13 [(buf.validate.predefined) = { cel: [{ id: "string.hostname", message: "value must be a valid hostname", expression: "!rules.hostname || this == \047\047 || this.isHostname()" }, { id: "string.hostname_empty", message: "value is empty, which is not a valid hostname", expression: "!rules.hostname || this != \047\047" }] }];
|
|
301
|
+
bool ip = 14 [(buf.validate.predefined) = { cel: [{ id: "string.ip", message: "value must be a valid IP address", expression: "!rules.ip || this == \047\047 || this.isIp()" }, { id: "string.ip_empty", message: "value is empty, which is not a valid IP address", expression: "!rules.ip || this != \047\047" }] }];
|
|
302
|
+
bool ipv4 = 15 [(buf.validate.predefined) = { cel: [{ id: "string.ipv4", message: "value must be a valid IPv4 address", expression: "!rules.ipv4 || this == \047\047 || this.isIp(4)" }, { id: "string.ipv4_empty", message: "value is empty, which is not a valid IPv4 address", expression: "!rules.ipv4 || this != \047\047" }] }];
|
|
303
|
+
bool ipv6 = 16 [(buf.validate.predefined) = { cel: [{ id: "string.ipv6", message: "value must be a valid IPv6 address", expression: "!rules.ipv6 || this == \047\047 || this.isIp(6)" }, { id: "string.ipv6_empty", message: "value is empty, which is not a valid IPv6 address", expression: "!rules.ipv6 || this != \047\047" }] }];
|
|
304
|
+
bool uri = 17 [(buf.validate.predefined) = { cel: [{ id: "string.uri", message: "value must be a valid URI", expression: "!rules.uri || this == \047\047 || this.isUri()" }, { id: "string.uri_empty", message: "value is empty, which is not a valid URI", expression: "!rules.uri || this != \047\047" }] }];
|
|
305
|
+
bool uri_ref = 18 [(buf.validate.predefined) = { cel: [{ id: "string.uri_ref", message: "value must be a valid URI Reference", expression: "!rules.uri_ref || this.isUriRef()" }] }];
|
|
306
|
+
bool address = 21 [(buf.validate.predefined) = { cel: [{ id: "string.address", message: "value must be a valid hostname, or ip address", expression: "!rules.address || this == \047\047 || this.isHostname() || this.isIp()" }, { id: "string.address_empty", message: "value is empty, which is not a valid hostname, or ip address", expression: "!rules.address || this != \047\047" }] }];
|
|
307
|
+
bool uuid = 22 [(buf.validate.predefined) = { cel: [{ id: "string.uuid", message: "value must be a valid UUID", expression: "!rules.uuid || this == \047\047 || this.matches(\047^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\047)" }, { id: "string.uuid_empty", message: "value is empty, which is not a valid UUID", expression: "!rules.uuid || this != \047\047" }] }];
|
|
308
|
+
bool tuuid = 33 [(buf.validate.predefined) = { cel: [{ id: "string.tuuid", message: "value must be a valid trimmed UUID", expression: "!rules.tuuid || this == \047\047 || this.matches(\047^[0-9a-fA-F]{32}$\047)" }, { id: "string.tuuid_empty", message: "value is empty, which is not a valid trimmed UUID", expression: "!rules.tuuid || this != \047\047" }] }];
|
|
309
|
+
bool ip_with_prefixlen = 26 [(buf.validate.predefined) = { cel: [{ id: "string.ip_with_prefixlen", message: "value must be a valid IP prefix", expression: "!rules.ip_with_prefixlen || this == \047\047 || this.isIpPrefix()" }, { id: "string.ip_with_prefixlen_empty", message: "value is empty, which is not a valid IP prefix", expression: "!rules.ip_with_prefixlen || this != \047\047" }] }];
|
|
310
|
+
bool ipv4_with_prefixlen = 27 [(buf.validate.predefined) = { cel: [{ id: "string.ipv4_with_prefixlen", message: "value must be a valid IPv4 address with prefix length", expression: "!rules.ipv4_with_prefixlen || this == \047\047 || this.isIpPrefix(4)" }, { id: "string.ipv4_with_prefixlen_empty", message: "value is empty, which is not a valid IPv4 address with prefix length", expression: "!rules.ipv4_with_prefixlen || this != \047\047" }] }];
|
|
311
|
+
bool ipv6_with_prefixlen = 28 [(buf.validate.predefined) = { cel: [{ id: "string.ipv6_with_prefixlen", message: "value must be a valid IPv6 address with prefix length", expression: "!rules.ipv6_with_prefixlen || this == \047\047 || this.isIpPrefix(6)" }, { id: "string.ipv6_with_prefixlen_empty", message: "value is empty, which is not a valid IPv6 address with prefix length", expression: "!rules.ipv6_with_prefixlen || this != \047\047" }] }];
|
|
312
|
+
bool ip_prefix = 29 [(buf.validate.predefined) = { cel: [{ id: "string.ip_prefix", message: "value must be a valid IP prefix", expression: "!rules.ip_prefix || this == \047\047 || this.isIpPrefix(true)" }, { id: "string.ip_prefix_empty", message: "value is empty, which is not a valid IP prefix", expression: "!rules.ip_prefix || this != \047\047" }] }];
|
|
313
|
+
bool ipv4_prefix = 30 [(buf.validate.predefined) = { cel: [{ id: "string.ipv4_prefix", message: "value must be a valid IPv4 prefix", expression: "!rules.ipv4_prefix || this == \047\047 || this.isIpPrefix(4, true)" }, { id: "string.ipv4_prefix_empty", message: "value is empty, which is not a valid IPv4 prefix", expression: "!rules.ipv4_prefix || this != \047\047" }] }];
|
|
314
|
+
bool ipv6_prefix = 31 [(buf.validate.predefined) = { cel: [{ id: "string.ipv6_prefix", message: "value must be a valid IPv6 prefix", expression: "!rules.ipv6_prefix || this == \047\047 || this.isIpPrefix(6, true)" }, { id: "string.ipv6_prefix_empty", message: "value is empty, which is not a valid IPv6 prefix", expression: "!rules.ipv6_prefix || this != \047\047" }] }];
|
|
315
|
+
bool host_and_port = 32 [(buf.validate.predefined) = { cel: [{ id: "string.host_and_port", message: "value must be a valid host (hostname or IP address) and port pair", expression: "!rules.host_and_port || this == \047\047 || this.isHostAndPort(true)" }, { id: "string.host_and_port_empty", message: "value is empty, which is not a valid host and port pair", expression: "!rules.host_and_port || this != \047\047" }] }];
|
|
316
|
+
KnownRegex well_known_regex = 24 [(buf.validate.predefined) = { cel: [{ id: "string.well_known_regex.header_name", message: "value must be a valid HTTP header name", expression: "rules.well_known_regex != 1 || this == \047\047 || this.matches(!has(rules.strict) || rules.strict ?\047^:?[0-9a-zA-Z!#$%&\134\047*+-.^_|~\134x60]+$\047 :\047^[^\134u0000\134u000A\134u000D]+$\047)" }, { id: "string.well_known_regex.header_name_empty", message: "value is empty, which is not a valid HTTP header name", expression: "rules.well_known_regex != 1 || this != \047\047" }, { id: "string.well_known_regex.header_value", message: "value must be a valid HTTP header value", expression: "rules.well_known_regex != 2 || this.matches(!has(rules.strict) || rules.strict ?\047^[^\134u0000-\134u0008\134u000A-\134u001F\134u007F]*$\047 :\047^[^\134u0000\134u000A\134u000D]*$\047)" }] }];
|
|
317
|
+
}
|
|
318
|
+
optional bool strict = 25;
|
|
319
|
+
repeated string example = 34 [(buf.validate.predefined) = { cel: [{ id: "string.example", expression: "true" }] }];
|
|
320
|
+
extensions 1000 to max;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
message BytesRules {
|
|
324
|
+
optional bytes const = 1 [(buf.validate.predefined) = { cel: [{ id: "bytes.const", expression: "this != getField(rules, \047const\047) ? \047value must be %x\047.format([getField(rules, \047const\047)]) : \047\047" }] }];
|
|
325
|
+
optional uint64 len = 13 [(buf.validate.predefined) = { cel: [{ id: "bytes.len", expression: "uint(this.size()) != rules.len ? \047value length must be %s bytes\047.format([rules.len]) : \047\047" }] }];
|
|
326
|
+
optional uint64 min_len = 2 [(buf.validate.predefined) = { cel: [{ id: "bytes.min_len", expression: "uint(this.size()) < rules.min_len ? \047value length must be at least %s bytes\047.format([rules.min_len]) : \047\047" }] }];
|
|
327
|
+
optional uint64 max_len = 3 [(buf.validate.predefined) = { cel: [{ id: "bytes.max_len", expression: "uint(this.size()) > rules.max_len ? \047value must be at most %s bytes\047.format([rules.max_len]) : \047\047" }] }];
|
|
328
|
+
optional string pattern = 4 [(buf.validate.predefined) = { cel: [{ id: "bytes.pattern", expression: "!string(this).matches(rules.pattern) ? \047value must match regex pattern `%s`\047.format([rules.pattern]) : \047\047" }] }];
|
|
329
|
+
optional bytes prefix = 5 [(buf.validate.predefined) = { cel: [{ id: "bytes.prefix", expression: "!this.startsWith(rules.prefix) ? \047value does not have prefix %x\047.format([rules.prefix]) : \047\047" }] }];
|
|
330
|
+
optional bytes suffix = 6 [(buf.validate.predefined) = { cel: [{ id: "bytes.suffix", expression: "!this.endsWith(rules.suffix) ? \047value does not have suffix %x\047.format([rules.suffix]) : \047\047" }] }];
|
|
331
|
+
optional bytes contains = 7 [(buf.validate.predefined) = { cel: [{ id: "bytes.contains", expression: "!this.contains(rules.contains) ? \047value does not contain %x\047.format([rules.contains]) : \047\047" }] }];
|
|
332
|
+
repeated bytes in = 8 [(buf.validate.predefined) = { cel: [{ id: "bytes.in", expression: "getField(rules, \047in\047).size() > 0 && !(this in getField(rules, \047in\047)) ? \047value must be in list %s\047.format([getField(rules, \047in\047)]) : \047\047" }] }];
|
|
333
|
+
repeated bytes not_in = 9 [(buf.validate.predefined) = { cel: [{ id: "bytes.not_in", expression: "this in rules.not_in ? \047value must not be in list %s\047.format([rules.not_in]) : \047\047" }] }];
|
|
334
|
+
oneof well_known {
|
|
335
|
+
bool ip = 10 [(buf.validate.predefined) = { cel: [{ id: "bytes.ip", message: "value must be a valid IP address", expression: "!rules.ip || this.size() == 0 || this.size() == 4 || this.size() == 16" }, { id: "bytes.ip_empty", message: "value is empty, which is not a valid IP address", expression: "!rules.ip || this.size() != 0" }] }];
|
|
336
|
+
bool ipv4 = 11 [(buf.validate.predefined) = { cel: [{ id: "bytes.ipv4", message: "value must be a valid IPv4 address", expression: "!rules.ipv4 || this.size() == 0 || this.size() == 4" }, { id: "bytes.ipv4_empty", message: "value is empty, which is not a valid IPv4 address", expression: "!rules.ipv4 || this.size() != 0" }] }];
|
|
337
|
+
bool ipv6 = 12 [(buf.validate.predefined) = { cel: [{ id: "bytes.ipv6", message: "value must be a valid IPv6 address", expression: "!rules.ipv6 || this.size() == 0 || this.size() == 16" }, { id: "bytes.ipv6_empty", message: "value is empty, which is not a valid IPv6 address", expression: "!rules.ipv6 || this.size() != 0" }] }];
|
|
338
|
+
}
|
|
339
|
+
repeated bytes example = 14 [(buf.validate.predefined) = { cel: [{ id: "bytes.example", expression: "true" }] }];
|
|
340
|
+
extensions 1000 to max;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
message EnumRules {
|
|
344
|
+
optional int32 const = 1 [(buf.validate.predefined) = { cel: [{ id: "enum.const", expression: "this != getField(rules, \047const\047) ? \047value must equal %s\047.format([getField(rules, \047const\047)]) : \047\047" }] }];
|
|
345
|
+
optional bool defined_only = 2;
|
|
346
|
+
repeated int32 in = 3 [(buf.validate.predefined) = { cel: [{ id: "enum.in", expression: "!(this in getField(rules, \047in\047)) ? \047value must be in list %s\047.format([getField(rules, \047in\047)]) : \047\047" }] }];
|
|
347
|
+
repeated int32 not_in = 4 [(buf.validate.predefined) = { cel: [{ id: "enum.not_in", expression: "this in rules.not_in ? \047value must not be in list %s\047.format([rules.not_in]) : \047\047" }] }];
|
|
348
|
+
repeated int32 example = 5 [(buf.validate.predefined) = { cel: [{ id: "enum.example", expression: "true" }] }];
|
|
349
|
+
extensions 1000 to max;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
message RepeatedRules {
|
|
353
|
+
optional uint64 min_items = 1 [(buf.validate.predefined) = { cel: [{ id: "repeated.min_items", expression: "uint(this.size()) < rules.min_items ? \047value must contain at least %d item(s)\047.format([rules.min_items]) : \047\047" }] }];
|
|
354
|
+
optional uint64 max_items = 2 [(buf.validate.predefined) = { cel: [{ id: "repeated.max_items", expression: "uint(this.size()) > rules.max_items ? \047value must contain no more than %s item(s)\047.format([rules.max_items]) : \047\047" }] }];
|
|
355
|
+
optional bool unique = 3 [(buf.validate.predefined) = { cel: [{ id: "repeated.unique", message: "repeated value must contain unique items", expression: "!rules.unique || this.unique()" }] }];
|
|
356
|
+
optional FieldRules items = 4;
|
|
357
|
+
extensions 1000 to max;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
message MapRules {
|
|
361
|
+
optional uint64 min_pairs = 1 [(buf.validate.predefined) = { cel: [{ id: "map.min_pairs", expression: "uint(this.size()) < rules.min_pairs ? \047map must be at least %d entries\047.format([rules.min_pairs]) : \047\047" }] }];
|
|
362
|
+
optional uint64 max_pairs = 2 [(buf.validate.predefined) = { cel: [{ id: "map.max_pairs", expression: "uint(this.size()) > rules.max_pairs ? \047map must be at most %d entries\047.format([rules.max_pairs]) : \047\047" }] }];
|
|
363
|
+
optional FieldRules keys = 4;
|
|
364
|
+
optional FieldRules values = 5;
|
|
365
|
+
extensions 1000 to max;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
message AnyRules {
|
|
369
|
+
repeated string in = 2;
|
|
370
|
+
repeated string not_in = 3;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
message DurationRules {
|
|
374
|
+
optional .google.protobuf.Duration const = 2 [(buf.validate.predefined) = { cel: [{ id: "duration.const", expression: "this != getField(rules, \047const\047) ? \047value must equal %s\047.format([getField(rules, \047const\047)]) : \047\047" }] }];
|
|
375
|
+
oneof less_than {
|
|
376
|
+
.google.protobuf.Duration lt = 3 [(buf.validate.predefined) = { cel: [{ id: "duration.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \047value must be less than %s\047.format([rules.lt]) : \047\047" }] }];
|
|
377
|
+
.google.protobuf.Duration lte = 4 [(buf.validate.predefined) = { cel: [{ id: "duration.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? \047value must be less than or equal to %s\047.format([rules.lte]) : \047\047" }] }];
|
|
378
|
+
}
|
|
379
|
+
oneof greater_than {
|
|
380
|
+
.google.protobuf.Duration gt = 5 [(buf.validate.predefined) = { cel: [{ id: "duration.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \047value must be greater than %s\047.format([rules.gt]) : \047\047" }, { id: "duration.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \047value must be greater than %s and less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "duration.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \047value must be greater than %s or less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "duration.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \047value must be greater than %s and less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }, { id: "duration.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \047value must be greater than %s or less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }] }];
|
|
381
|
+
.google.protobuf.Duration gte = 6 [(buf.validate.predefined) = { cel: [{ id: "duration.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? \047value must be greater than or equal to %s\047.format([rules.gte]) : \047\047" }, { id: "duration.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \047value must be greater than or equal to %s and less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "duration.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \047value must be greater than or equal to %s or less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "duration.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \047value must be greater than or equal to %s and less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }, { id: "duration.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \047value must be greater than or equal to %s or less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }] }];
|
|
382
|
+
}
|
|
383
|
+
repeated .google.protobuf.Duration in = 7 [(buf.validate.predefined) = { cel: [{ id: "duration.in", expression: "!(this in getField(rules, \047in\047)) ? \047value must be in list %s\047.format([getField(rules, \047in\047)]) : \047\047" }] }];
|
|
384
|
+
repeated .google.protobuf.Duration not_in = 8 [(buf.validate.predefined) = { cel: [{ id: "duration.not_in", expression: "this in rules.not_in ? \047value must not be in list %s\047.format([rules.not_in]) : \047\047" }] }];
|
|
385
|
+
repeated .google.protobuf.Duration example = 9 [(buf.validate.predefined) = { cel: [{ id: "duration.example", expression: "true" }] }];
|
|
386
|
+
extensions 1000 to max;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
message TimestampRules {
|
|
390
|
+
optional .google.protobuf.Timestamp const = 2 [(buf.validate.predefined) = { cel: [{ id: "timestamp.const", expression: "this != getField(rules, \047const\047) ? \047value must equal %s\047.format([getField(rules, \047const\047)]) : \047\047" }] }];
|
|
391
|
+
oneof less_than {
|
|
392
|
+
.google.protobuf.Timestamp lt = 3 [(buf.validate.predefined) = { cel: [{ id: "timestamp.lt", expression: "!has(rules.gte) && !has(rules.gt) && this >= rules.lt? \047value must be less than %s\047.format([rules.lt]) : \047\047" }] }];
|
|
393
|
+
.google.protobuf.Timestamp lte = 4 [(buf.validate.predefined) = { cel: [{ id: "timestamp.lte", expression: "!has(rules.gte) && !has(rules.gt) && this > rules.lte? \047value must be less than or equal to %s\047.format([rules.lte]) : \047\047" }] }];
|
|
394
|
+
bool lt_now = 7 [(buf.validate.predefined) = { cel: [{ id: "timestamp.lt_now", expression: "(rules.lt_now && this > now) ? \047value must be less than now\047 : \047\047" }] }];
|
|
395
|
+
}
|
|
396
|
+
oneof greater_than {
|
|
397
|
+
.google.protobuf.Timestamp gt = 5 [(buf.validate.predefined) = { cel: [{ id: "timestamp.gt", expression: "!has(rules.lt) && !has(rules.lte) && this <= rules.gt? \047value must be greater than %s\047.format([rules.gt]) : \047\047" }, { id: "timestamp.gt_lt", expression: "has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? \047value must be greater than %s and less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "timestamp.gt_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? \047value must be greater than %s or less than %s\047.format([rules.gt, rules.lt]) : \047\047" }, { id: "timestamp.gt_lte", expression: "has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? \047value must be greater than %s and less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }, { id: "timestamp.gt_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? \047value must be greater than %s or less than or equal to %s\047.format([rules.gt, rules.lte]) : \047\047" }] }];
|
|
398
|
+
.google.protobuf.Timestamp gte = 6 [(buf.validate.predefined) = { cel: [{ id: "timestamp.gte", expression: "!has(rules.lt) && !has(rules.lte) && this < rules.gte? \047value must be greater than or equal to %s\047.format([rules.gte]) : \047\047" }, { id: "timestamp.gte_lt", expression: "has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? \047value must be greater than or equal to %s and less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "timestamp.gte_lt_exclusive", expression: "has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? \047value must be greater than or equal to %s or less than %s\047.format([rules.gte, rules.lt]) : \047\047" }, { id: "timestamp.gte_lte", expression: "has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? \047value must be greater than or equal to %s and less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }, { id: "timestamp.gte_lte_exclusive", expression: "has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? \047value must be greater than or equal to %s or less than or equal to %s\047.format([rules.gte, rules.lte]) : \047\047" }] }];
|
|
399
|
+
bool gt_now = 8 [(buf.validate.predefined) = { cel: [{ id: "timestamp.gt_now", expression: "(rules.gt_now && this < now) ? \047value must be greater than now\047 : \047\047" }] }];
|
|
400
|
+
}
|
|
401
|
+
optional .google.protobuf.Duration within = 9 [(buf.validate.predefined) = { cel: [{ id: "timestamp.within", expression: "this < now-rules.within || this > now+rules.within ? \047value must be within %s of now\047.format([rules.within]) : \047\047" }] }];
|
|
402
|
+
repeated .google.protobuf.Timestamp example = 10 [(buf.validate.predefined) = { cel: [{ id: "timestamp.example", expression: "true" }] }];
|
|
403
|
+
extensions 1000 to max;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
message Violations {
|
|
407
|
+
repeated Violation violations = 1;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
message Violation {
|
|
411
|
+
optional FieldPath field = 5;
|
|
412
|
+
optional FieldPath rule = 6;
|
|
413
|
+
optional string rule_id = 2;
|
|
414
|
+
optional string message = 3;
|
|
415
|
+
optional bool for_key = 4;
|
|
416
|
+
reserved 1;
|
|
417
|
+
reserved "field_path";
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
message FieldPath {
|
|
421
|
+
repeated FieldPathElement elements = 1;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
message FieldPathElement {
|
|
425
|
+
optional int32 field_number = 1;
|
|
426
|
+
optional string field_name = 2;
|
|
427
|
+
optional .google.protobuf.FieldDescriptorProto.Type field_type = 3;
|
|
428
|
+
optional .google.protobuf.FieldDescriptorProto.Type key_type = 4;
|
|
429
|
+
optional .google.protobuf.FieldDescriptorProto.Type value_type = 5;
|
|
430
|
+
oneof subscript {
|
|
431
|
+
uint64 index = 6;
|
|
432
|
+
bool bool_key = 7;
|
|
433
|
+
int64 int_key = 8;
|
|
434
|
+
uint64 uint_key = 9;
|
|
435
|
+
string string_key = 10;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
extend .google.protobuf.MessageOptions {
|
|
440
|
+
optional MessageRules message = 1159;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
extend .google.protobuf.OneofOptions {
|
|
444
|
+
optional OneofRules oneof = 1159;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
extend .google.protobuf.FieldOptions {
|
|
448
|
+
optional FieldRules field = 1159;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
extend .google.protobuf.FieldOptions {
|
|
452
|
+
optional PredefinedRules predefined = 1160;
|
|
453
|
+
}
|