@shaik_munawar/doc-verify 1.0.2

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.
Files changed (43) hide show
  1. package/.github/workflows/test-action.yml +20 -0
  2. package/.github/workflows/verify.yml +43 -0
  3. package/README.md +265 -0
  4. package/action.yml +42 -0
  5. package/dist/ai/cache.js +42 -0
  6. package/dist/ai/prompt.js +483 -0
  7. package/dist/ai/repair.js +131 -0
  8. package/dist/auth.proto +54 -0
  9. package/dist/engine/mocks/network-shim.js +29 -0
  10. package/dist/engine/runner.js +15 -0
  11. package/dist/index.js +110198 -0
  12. package/dist/licenses.txt +4049 -0
  13. package/dist/pagent.exe +0 -0
  14. package/dist/parser/extracts.js +39 -0
  15. package/dist/proto/channelz.proto +564 -0
  16. package/dist/proto/protoc-gen-validate/LICENSE +202 -0
  17. package/dist/proto/protoc-gen-validate/validate/validate.proto +797 -0
  18. package/dist/proto/xds/LICENSE +201 -0
  19. package/dist/proto/xds/xds/data/orca/v3/orca_load_report.proto +58 -0
  20. package/dist/proto/xds/xds/service/orca/v3/orca.proto +36 -0
  21. package/dist/protoc-gen-validate/LICENSE +202 -0
  22. package/dist/protoc-gen-validate/validate/validate.proto +797 -0
  23. package/dist/runners/base-runner.js +96 -0
  24. package/dist/runners/bash-runner.js +12 -0
  25. package/dist/runners/c-runner.js +12 -0
  26. package/dist/runners/cpp-runner.js +12 -0
  27. package/dist/runners/go-runner.js +12 -0
  28. package/dist/runners/index.js +96 -0
  29. package/dist/runners/java-runner.js +12 -0
  30. package/dist/runners/javascript-runner.js +16 -0
  31. package/dist/runners/lua-runner.js +12 -0
  32. package/dist/runners/perl-runner.js +12 -0
  33. package/dist/runners/php-runner.js +12 -0
  34. package/dist/runners/python-runner.js +12 -0
  35. package/dist/runners/ruby-runner.js +12 -0
  36. package/dist/runners/rust-runner.js +12 -0
  37. package/dist/runners/typescript-runner.js +16 -0
  38. package/dist/utils/badge.js +27 -0
  39. package/dist/utils/patcher.js +23 -0
  40. package/dist/xds/LICENSE +201 -0
  41. package/dist/xds/xds/data/orca/v3/orca_load_report.proto +58 -0
  42. package/dist/xds/xds/service/orca/v3/orca.proto +36 -0
  43. package/package.json +42 -0
@@ -0,0 +1,797 @@
1
+ syntax = "proto2";
2
+ package validate;
3
+
4
+ option go_package = "github.com/envoyproxy/protoc-gen-validate/validate";
5
+ option java_package = "io.envoyproxy.pgv.validate";
6
+
7
+ import "google/protobuf/descriptor.proto";
8
+ import "google/protobuf/duration.proto";
9
+ import "google/protobuf/timestamp.proto";
10
+
11
+ // Validation rules applied at the message level
12
+ extend google.protobuf.MessageOptions {
13
+ // Disabled nullifies any validation rules for this message, including any
14
+ // message fields associated with it that do support validation.
15
+ optional bool disabled = 1071;
16
+ }
17
+
18
+ // Validation rules applied at the oneof level
19
+ extend google.protobuf.OneofOptions {
20
+ // Required ensures that exactly one the field options in a oneof is set;
21
+ // validation fails if no fields in the oneof are set.
22
+ optional bool required = 1071;
23
+ }
24
+
25
+ // Validation rules applied at the field level
26
+ extend google.protobuf.FieldOptions {
27
+ // Rules specify the validations to be performed on this field. By default,
28
+ // no validation is performed against a field.
29
+ optional FieldRules rules = 1071;
30
+ }
31
+
32
+ // FieldRules encapsulates the rules for each type of field. Depending on the
33
+ // field, the correct set should be used to ensure proper validations.
34
+ message FieldRules {
35
+ optional MessageRules message = 17;
36
+ oneof type {
37
+ // Scalar Field Types
38
+ FloatRules float = 1;
39
+ DoubleRules double = 2;
40
+ Int32Rules int32 = 3;
41
+ Int64Rules int64 = 4;
42
+ UInt32Rules uint32 = 5;
43
+ UInt64Rules uint64 = 6;
44
+ SInt32Rules sint32 = 7;
45
+ SInt64Rules sint64 = 8;
46
+ Fixed32Rules fixed32 = 9;
47
+ Fixed64Rules fixed64 = 10;
48
+ SFixed32Rules sfixed32 = 11;
49
+ SFixed64Rules sfixed64 = 12;
50
+ BoolRules bool = 13;
51
+ StringRules string = 14;
52
+ BytesRules bytes = 15;
53
+
54
+ // Complex Field Types
55
+ EnumRules enum = 16;
56
+ RepeatedRules repeated = 18;
57
+ MapRules map = 19;
58
+
59
+ // Well-Known Field Types
60
+ AnyRules any = 20;
61
+ DurationRules duration = 21;
62
+ TimestampRules timestamp = 22;
63
+ }
64
+ }
65
+
66
+ // FloatRules describes the constraints applied to `float` values
67
+ message FloatRules {
68
+ // Const specifies that this field must be exactly the specified value
69
+ optional float const = 1;
70
+
71
+ // Lt specifies that this field must be less than the specified value,
72
+ // exclusive
73
+ optional float lt = 2;
74
+
75
+ // Lte specifies that this field must be less than or equal to the
76
+ // specified value, inclusive
77
+ optional float lte = 3;
78
+
79
+ // Gt specifies that this field must be greater than the specified value,
80
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
81
+ // range is reversed.
82
+ optional float gt = 4;
83
+
84
+ // Gte specifies that this field must be greater than or equal to the
85
+ // specified value, inclusive. If the value of Gte is larger than a
86
+ // specified Lt or Lte, the range is reversed.
87
+ optional float gte = 5;
88
+
89
+ // In specifies that this field must be equal to one of the specified
90
+ // values
91
+ repeated float in = 6;
92
+
93
+ // NotIn specifies that this field cannot be equal to one of the specified
94
+ // values
95
+ repeated float not_in = 7;
96
+ }
97
+
98
+ // DoubleRules describes the constraints applied to `double` values
99
+ message DoubleRules {
100
+ // Const specifies that this field must be exactly the specified value
101
+ optional double const = 1;
102
+
103
+ // Lt specifies that this field must be less than the specified value,
104
+ // exclusive
105
+ optional double lt = 2;
106
+
107
+ // Lte specifies that this field must be less than or equal to the
108
+ // specified value, inclusive
109
+ optional double lte = 3;
110
+
111
+ // Gt specifies that this field must be greater than the specified value,
112
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
113
+ // range is reversed.
114
+ optional double gt = 4;
115
+
116
+ // Gte specifies that this field must be greater than or equal to the
117
+ // specified value, inclusive. If the value of Gte is larger than a
118
+ // specified Lt or Lte, the range is reversed.
119
+ optional double gte = 5;
120
+
121
+ // In specifies that this field must be equal to one of the specified
122
+ // values
123
+ repeated double in = 6;
124
+
125
+ // NotIn specifies that this field cannot be equal to one of the specified
126
+ // values
127
+ repeated double not_in = 7;
128
+ }
129
+
130
+ // Int32Rules describes the constraints applied to `int32` values
131
+ message Int32Rules {
132
+ // Const specifies that this field must be exactly the specified value
133
+ optional int32 const = 1;
134
+
135
+ // Lt specifies that this field must be less than the specified value,
136
+ // exclusive
137
+ optional int32 lt = 2;
138
+
139
+ // Lte specifies that this field must be less than or equal to the
140
+ // specified value, inclusive
141
+ optional int32 lte = 3;
142
+
143
+ // Gt specifies that this field must be greater than the specified value,
144
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
145
+ // range is reversed.
146
+ optional int32 gt = 4;
147
+
148
+ // Gte specifies that this field must be greater than or equal to the
149
+ // specified value, inclusive. If the value of Gte is larger than a
150
+ // specified Lt or Lte, the range is reversed.
151
+ optional int32 gte = 5;
152
+
153
+ // In specifies that this field must be equal to one of the specified
154
+ // values
155
+ repeated int32 in = 6;
156
+
157
+ // NotIn specifies that this field cannot be equal to one of the specified
158
+ // values
159
+ repeated int32 not_in = 7;
160
+ }
161
+
162
+ // Int64Rules describes the constraints applied to `int64` values
163
+ message Int64Rules {
164
+ // Const specifies that this field must be exactly the specified value
165
+ optional int64 const = 1;
166
+
167
+ // Lt specifies that this field must be less than the specified value,
168
+ // exclusive
169
+ optional int64 lt = 2;
170
+
171
+ // Lte specifies that this field must be less than or equal to the
172
+ // specified value, inclusive
173
+ optional int64 lte = 3;
174
+
175
+ // Gt specifies that this field must be greater than the specified value,
176
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
177
+ // range is reversed.
178
+ optional int64 gt = 4;
179
+
180
+ // Gte specifies that this field must be greater than or equal to the
181
+ // specified value, inclusive. If the value of Gte is larger than a
182
+ // specified Lt or Lte, the range is reversed.
183
+ optional int64 gte = 5;
184
+
185
+ // In specifies that this field must be equal to one of the specified
186
+ // values
187
+ repeated int64 in = 6;
188
+
189
+ // NotIn specifies that this field cannot be equal to one of the specified
190
+ // values
191
+ repeated int64 not_in = 7;
192
+ }
193
+
194
+ // UInt32Rules describes the constraints applied to `uint32` values
195
+ message UInt32Rules {
196
+ // Const specifies that this field must be exactly the specified value
197
+ optional uint32 const = 1;
198
+
199
+ // Lt specifies that this field must be less than the specified value,
200
+ // exclusive
201
+ optional uint32 lt = 2;
202
+
203
+ // Lte specifies that this field must be less than or equal to the
204
+ // specified value, inclusive
205
+ optional uint32 lte = 3;
206
+
207
+ // Gt specifies that this field must be greater than the specified value,
208
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
209
+ // range is reversed.
210
+ optional uint32 gt = 4;
211
+
212
+ // Gte specifies that this field must be greater than or equal to the
213
+ // specified value, inclusive. If the value of Gte is larger than a
214
+ // specified Lt or Lte, the range is reversed.
215
+ optional uint32 gte = 5;
216
+
217
+ // In specifies that this field must be equal to one of the specified
218
+ // values
219
+ repeated uint32 in = 6;
220
+
221
+ // NotIn specifies that this field cannot be equal to one of the specified
222
+ // values
223
+ repeated uint32 not_in = 7;
224
+ }
225
+
226
+ // UInt64Rules describes the constraints applied to `uint64` values
227
+ message UInt64Rules {
228
+ // Const specifies that this field must be exactly the specified value
229
+ optional uint64 const = 1;
230
+
231
+ // Lt specifies that this field must be less than the specified value,
232
+ // exclusive
233
+ optional uint64 lt = 2;
234
+
235
+ // Lte specifies that this field must be less than or equal to the
236
+ // specified value, inclusive
237
+ optional uint64 lte = 3;
238
+
239
+ // Gt specifies that this field must be greater than the specified value,
240
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
241
+ // range is reversed.
242
+ optional uint64 gt = 4;
243
+
244
+ // Gte specifies that this field must be greater than or equal to the
245
+ // specified value, inclusive. If the value of Gte is larger than a
246
+ // specified Lt or Lte, the range is reversed.
247
+ optional uint64 gte = 5;
248
+
249
+ // In specifies that this field must be equal to one of the specified
250
+ // values
251
+ repeated uint64 in = 6;
252
+
253
+ // NotIn specifies that this field cannot be equal to one of the specified
254
+ // values
255
+ repeated uint64 not_in = 7;
256
+ }
257
+
258
+ // SInt32Rules describes the constraints applied to `sint32` values
259
+ message SInt32Rules {
260
+ // Const specifies that this field must be exactly the specified value
261
+ optional sint32 const = 1;
262
+
263
+ // Lt specifies that this field must be less than the specified value,
264
+ // exclusive
265
+ optional sint32 lt = 2;
266
+
267
+ // Lte specifies that this field must be less than or equal to the
268
+ // specified value, inclusive
269
+ optional sint32 lte = 3;
270
+
271
+ // Gt specifies that this field must be greater than the specified value,
272
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
273
+ // range is reversed.
274
+ optional sint32 gt = 4;
275
+
276
+ // Gte specifies that this field must be greater than or equal to the
277
+ // specified value, inclusive. If the value of Gte is larger than a
278
+ // specified Lt or Lte, the range is reversed.
279
+ optional sint32 gte = 5;
280
+
281
+ // In specifies that this field must be equal to one of the specified
282
+ // values
283
+ repeated sint32 in = 6;
284
+
285
+ // NotIn specifies that this field cannot be equal to one of the specified
286
+ // values
287
+ repeated sint32 not_in = 7;
288
+ }
289
+
290
+ // SInt64Rules describes the constraints applied to `sint64` values
291
+ message SInt64Rules {
292
+ // Const specifies that this field must be exactly the specified value
293
+ optional sint64 const = 1;
294
+
295
+ // Lt specifies that this field must be less than the specified value,
296
+ // exclusive
297
+ optional sint64 lt = 2;
298
+
299
+ // Lte specifies that this field must be less than or equal to the
300
+ // specified value, inclusive
301
+ optional sint64 lte = 3;
302
+
303
+ // Gt specifies that this field must be greater than the specified value,
304
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
305
+ // range is reversed.
306
+ optional sint64 gt = 4;
307
+
308
+ // Gte specifies that this field must be greater than or equal to the
309
+ // specified value, inclusive. If the value of Gte is larger than a
310
+ // specified Lt or Lte, the range is reversed.
311
+ optional sint64 gte = 5;
312
+
313
+ // In specifies that this field must be equal to one of the specified
314
+ // values
315
+ repeated sint64 in = 6;
316
+
317
+ // NotIn specifies that this field cannot be equal to one of the specified
318
+ // values
319
+ repeated sint64 not_in = 7;
320
+ }
321
+
322
+ // Fixed32Rules describes the constraints applied to `fixed32` values
323
+ message Fixed32Rules {
324
+ // Const specifies that this field must be exactly the specified value
325
+ optional fixed32 const = 1;
326
+
327
+ // Lt specifies that this field must be less than the specified value,
328
+ // exclusive
329
+ optional fixed32 lt = 2;
330
+
331
+ // Lte specifies that this field must be less than or equal to the
332
+ // specified value, inclusive
333
+ optional fixed32 lte = 3;
334
+
335
+ // Gt specifies that this field must be greater than the specified value,
336
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
337
+ // range is reversed.
338
+ optional fixed32 gt = 4;
339
+
340
+ // Gte specifies that this field must be greater than or equal to the
341
+ // specified value, inclusive. If the value of Gte is larger than a
342
+ // specified Lt or Lte, the range is reversed.
343
+ optional fixed32 gte = 5;
344
+
345
+ // In specifies that this field must be equal to one of the specified
346
+ // values
347
+ repeated fixed32 in = 6;
348
+
349
+ // NotIn specifies that this field cannot be equal to one of the specified
350
+ // values
351
+ repeated fixed32 not_in = 7;
352
+ }
353
+
354
+ // Fixed64Rules describes the constraints applied to `fixed64` values
355
+ message Fixed64Rules {
356
+ // Const specifies that this field must be exactly the specified value
357
+ optional fixed64 const = 1;
358
+
359
+ // Lt specifies that this field must be less than the specified value,
360
+ // exclusive
361
+ optional fixed64 lt = 2;
362
+
363
+ // Lte specifies that this field must be less than or equal to the
364
+ // specified value, inclusive
365
+ optional fixed64 lte = 3;
366
+
367
+ // Gt specifies that this field must be greater than the specified value,
368
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
369
+ // range is reversed.
370
+ optional fixed64 gt = 4;
371
+
372
+ // Gte specifies that this field must be greater than or equal to the
373
+ // specified value, inclusive. If the value of Gte is larger than a
374
+ // specified Lt or Lte, the range is reversed.
375
+ optional fixed64 gte = 5;
376
+
377
+ // In specifies that this field must be equal to one of the specified
378
+ // values
379
+ repeated fixed64 in = 6;
380
+
381
+ // NotIn specifies that this field cannot be equal to one of the specified
382
+ // values
383
+ repeated fixed64 not_in = 7;
384
+ }
385
+
386
+ // SFixed32Rules describes the constraints applied to `sfixed32` values
387
+ message SFixed32Rules {
388
+ // Const specifies that this field must be exactly the specified value
389
+ optional sfixed32 const = 1;
390
+
391
+ // Lt specifies that this field must be less than the specified value,
392
+ // exclusive
393
+ optional sfixed32 lt = 2;
394
+
395
+ // Lte specifies that this field must be less than or equal to the
396
+ // specified value, inclusive
397
+ optional sfixed32 lte = 3;
398
+
399
+ // Gt specifies that this field must be greater than the specified value,
400
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
401
+ // range is reversed.
402
+ optional sfixed32 gt = 4;
403
+
404
+ // Gte specifies that this field must be greater than or equal to the
405
+ // specified value, inclusive. If the value of Gte is larger than a
406
+ // specified Lt or Lte, the range is reversed.
407
+ optional sfixed32 gte = 5;
408
+
409
+ // In specifies that this field must be equal to one of the specified
410
+ // values
411
+ repeated sfixed32 in = 6;
412
+
413
+ // NotIn specifies that this field cannot be equal to one of the specified
414
+ // values
415
+ repeated sfixed32 not_in = 7;
416
+ }
417
+
418
+ // SFixed64Rules describes the constraints applied to `sfixed64` values
419
+ message SFixed64Rules {
420
+ // Const specifies that this field must be exactly the specified value
421
+ optional sfixed64 const = 1;
422
+
423
+ // Lt specifies that this field must be less than the specified value,
424
+ // exclusive
425
+ optional sfixed64 lt = 2;
426
+
427
+ // Lte specifies that this field must be less than or equal to the
428
+ // specified value, inclusive
429
+ optional sfixed64 lte = 3;
430
+
431
+ // Gt specifies that this field must be greater than the specified value,
432
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
433
+ // range is reversed.
434
+ optional sfixed64 gt = 4;
435
+
436
+ // Gte specifies that this field must be greater than or equal to the
437
+ // specified value, inclusive. If the value of Gte is larger than a
438
+ // specified Lt or Lte, the range is reversed.
439
+ optional sfixed64 gte = 5;
440
+
441
+ // In specifies that this field must be equal to one of the specified
442
+ // values
443
+ repeated sfixed64 in = 6;
444
+
445
+ // NotIn specifies that this field cannot be equal to one of the specified
446
+ // values
447
+ repeated sfixed64 not_in = 7;
448
+ }
449
+
450
+ // BoolRules describes the constraints applied to `bool` values
451
+ message BoolRules {
452
+ // Const specifies that this field must be exactly the specified value
453
+ optional bool const = 1;
454
+ }
455
+
456
+ // StringRules describe the constraints applied to `string` values
457
+ message StringRules {
458
+ // Const specifies that this field must be exactly the specified value
459
+ optional string const = 1;
460
+
461
+ // Len specifies that this field must be the specified number of
462
+ // characters (Unicode code points). Note that the number of
463
+ // characters may differ from the number of bytes in the string.
464
+ optional uint64 len = 19;
465
+
466
+ // MinLen specifies that this field must be the specified number of
467
+ // characters (Unicode code points) at a minimum. Note that the number of
468
+ // characters may differ from the number of bytes in the string.
469
+ optional uint64 min_len = 2;
470
+
471
+ // MaxLen specifies that this field must be the specified number of
472
+ // characters (Unicode code points) at a maximum. Note that the number of
473
+ // characters may differ from the number of bytes in the string.
474
+ optional uint64 max_len = 3;
475
+
476
+ // LenBytes specifies that this field must be the specified number of bytes
477
+ // at a minimum
478
+ optional uint64 len_bytes = 20;
479
+
480
+ // MinBytes specifies that this field must be the specified number of bytes
481
+ // at a minimum
482
+ optional uint64 min_bytes = 4;
483
+
484
+ // MaxBytes specifies that this field must be the specified number of bytes
485
+ // at a maximum
486
+ optional uint64 max_bytes = 5;
487
+
488
+ // Pattern specifes that this field must match against the specified
489
+ // regular expression (RE2 syntax). The included expression should elide
490
+ // any delimiters.
491
+ optional string pattern = 6;
492
+
493
+ // Prefix specifies that this field must have the specified substring at
494
+ // the beginning of the string.
495
+ optional string prefix = 7;
496
+
497
+ // Suffix specifies that this field must have the specified substring at
498
+ // the end of the string.
499
+ optional string suffix = 8;
500
+
501
+ // Contains specifies that this field must have the specified substring
502
+ // anywhere in the string.
503
+ optional string contains = 9;
504
+
505
+ // NotContains specifies that this field cannot have the specified substring
506
+ // anywhere in the string.
507
+ optional string not_contains = 23;
508
+
509
+ // In specifies that this field must be equal to one of the specified
510
+ // values
511
+ repeated string in = 10;
512
+
513
+ // NotIn specifies that this field cannot be equal to one of the specified
514
+ // values
515
+ repeated string not_in = 11;
516
+
517
+ // WellKnown rules provide advanced constraints against common string
518
+ // patterns
519
+ oneof well_known {
520
+ // Email specifies that the field must be a valid email address as
521
+ // defined by RFC 5322
522
+ bool email = 12;
523
+
524
+ // Hostname specifies that the field must be a valid hostname as
525
+ // defined by RFC 1034. This constraint does not support
526
+ // internationalized domain names (IDNs).
527
+ bool hostname = 13;
528
+
529
+ // Ip specifies that the field must be a valid IP (v4 or v6) address.
530
+ // Valid IPv6 addresses should not include surrounding square brackets.
531
+ bool ip = 14;
532
+
533
+ // Ipv4 specifies that the field must be a valid IPv4 address.
534
+ bool ipv4 = 15;
535
+
536
+ // Ipv6 specifies that the field must be a valid IPv6 address. Valid
537
+ // IPv6 addresses should not include surrounding square brackets.
538
+ bool ipv6 = 16;
539
+
540
+ // Uri specifies that the field must be a valid, absolute URI as defined
541
+ // by RFC 3986
542
+ bool uri = 17;
543
+
544
+ // UriRef specifies that the field must be a valid URI as defined by RFC
545
+ // 3986 and may be relative or absolute.
546
+ bool uri_ref = 18;
547
+
548
+ // Address specifies that the field must be either a valid hostname as
549
+ // defined by RFC 1034 (which does not support internationalized domain
550
+ // names or IDNs), or it can be a valid IP (v4 or v6).
551
+ bool address = 21;
552
+
553
+ // Uuid specifies that the field must be a valid UUID as defined by
554
+ // RFC 4122
555
+ bool uuid = 22;
556
+
557
+ // WellKnownRegex specifies a common well known pattern defined as a regex.
558
+ KnownRegex well_known_regex = 24;
559
+ }
560
+
561
+ // This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable
562
+ // strict header validation.
563
+ // By default, this is true, and HTTP header validations are RFC-compliant.
564
+ // Setting to false will enable a looser validations that only disallows
565
+ // \r\n\0 characters, which can be used to bypass header matching rules.
566
+ optional bool strict = 25 [default = true];
567
+ }
568
+
569
+ // WellKnownRegex contain some well-known patterns.
570
+ enum KnownRegex {
571
+ UNKNOWN = 0;
572
+
573
+ // HTTP header name as defined by RFC 7230.
574
+ HTTP_HEADER_NAME = 1;
575
+
576
+ // HTTP header value as defined by RFC 7230.
577
+ HTTP_HEADER_VALUE = 2;
578
+ }
579
+
580
+ // BytesRules describe the constraints applied to `bytes` values
581
+ message BytesRules {
582
+ // Const specifies that this field must be exactly the specified value
583
+ optional bytes const = 1;
584
+
585
+ // Len specifies that this field must be the specified number of bytes
586
+ optional uint64 len = 13;
587
+
588
+ // MinLen specifies that this field must be the specified number of bytes
589
+ // at a minimum
590
+ optional uint64 min_len = 2;
591
+
592
+ // MaxLen specifies that this field must be the specified number of bytes
593
+ // at a maximum
594
+ optional uint64 max_len = 3;
595
+
596
+ // Pattern specifes that this field must match against the specified
597
+ // regular expression (RE2 syntax). The included expression should elide
598
+ // any delimiters.
599
+ optional string pattern = 4;
600
+
601
+ // Prefix specifies that this field must have the specified bytes at the
602
+ // beginning of the string.
603
+ optional bytes prefix = 5;
604
+
605
+ // Suffix specifies that this field must have the specified bytes at the
606
+ // end of the string.
607
+ optional bytes suffix = 6;
608
+
609
+ // Contains specifies that this field must have the specified bytes
610
+ // anywhere in the string.
611
+ optional bytes contains = 7;
612
+
613
+ // In specifies that this field must be equal to one of the specified
614
+ // values
615
+ repeated bytes in = 8;
616
+
617
+ // NotIn specifies that this field cannot be equal to one of the specified
618
+ // values
619
+ repeated bytes not_in = 9;
620
+
621
+ // WellKnown rules provide advanced constraints against common byte
622
+ // patterns
623
+ oneof well_known {
624
+ // Ip specifies that the field must be a valid IP (v4 or v6) address in
625
+ // byte format
626
+ bool ip = 10;
627
+
628
+ // Ipv4 specifies that the field must be a valid IPv4 address in byte
629
+ // format
630
+ bool ipv4 = 11;
631
+
632
+ // Ipv6 specifies that the field must be a valid IPv6 address in byte
633
+ // format
634
+ bool ipv6 = 12;
635
+ }
636
+ }
637
+
638
+ // EnumRules describe the constraints applied to enum values
639
+ message EnumRules {
640
+ // Const specifies that this field must be exactly the specified value
641
+ optional int32 const = 1;
642
+
643
+ // DefinedOnly specifies that this field must be only one of the defined
644
+ // values for this enum, failing on any undefined value.
645
+ optional bool defined_only = 2;
646
+
647
+ // In specifies that this field must be equal to one of the specified
648
+ // values
649
+ repeated int32 in = 3;
650
+
651
+ // NotIn specifies that this field cannot be equal to one of the specified
652
+ // values
653
+ repeated int32 not_in = 4;
654
+ }
655
+
656
+ // MessageRules describe the constraints applied to embedded message values.
657
+ // For message-type fields, validation is performed recursively.
658
+ message MessageRules {
659
+ // Skip specifies that the validation rules of this field should not be
660
+ // evaluated
661
+ optional bool skip = 1;
662
+
663
+ // Required specifies that this field must be set
664
+ optional bool required = 2;
665
+ }
666
+
667
+ // RepeatedRules describe the constraints applied to `repeated` values
668
+ message RepeatedRules {
669
+ // MinItems specifies that this field must have the specified number of
670
+ // items at a minimum
671
+ optional uint64 min_items = 1;
672
+
673
+ // MaxItems specifies that this field must have the specified number of
674
+ // items at a maximum
675
+ optional uint64 max_items = 2;
676
+
677
+ // Unique specifies that all elements in this field must be unique. This
678
+ // contraint is only applicable to scalar and enum types (messages are not
679
+ // supported).
680
+ optional bool unique = 3;
681
+
682
+ // Items specifies the contraints to be applied to each item in the field.
683
+ // Repeated message fields will still execute validation against each item
684
+ // unless skip is specified here.
685
+ optional FieldRules items = 4;
686
+ }
687
+
688
+ // MapRules describe the constraints applied to `map` values
689
+ message MapRules {
690
+ // MinPairs specifies that this field must have the specified number of
691
+ // KVs at a minimum
692
+ optional uint64 min_pairs = 1;
693
+
694
+ // MaxPairs specifies that this field must have the specified number of
695
+ // KVs at a maximum
696
+ optional uint64 max_pairs = 2;
697
+
698
+ // NoSparse specifies values in this field cannot be unset. This only
699
+ // applies to map's with message value types.
700
+ optional bool no_sparse = 3;
701
+
702
+ // Keys specifies the constraints to be applied to each key in the field.
703
+ optional FieldRules keys = 4;
704
+
705
+ // Values specifies the constraints to be applied to the value of each key
706
+ // in the field. Message values will still have their validations evaluated
707
+ // unless skip is specified here.
708
+ optional FieldRules values = 5;
709
+ }
710
+
711
+ // AnyRules describe constraints applied exclusively to the
712
+ // `google.protobuf.Any` well-known type
713
+ message AnyRules {
714
+ // Required specifies that this field must be set
715
+ optional bool required = 1;
716
+
717
+ // In specifies that this field's `type_url` must be equal to one of the
718
+ // specified values.
719
+ repeated string in = 2;
720
+
721
+ // NotIn specifies that this field's `type_url` must not be equal to any of
722
+ // the specified values.
723
+ repeated string not_in = 3;
724
+ }
725
+
726
+ // DurationRules describe the constraints applied exclusively to the
727
+ // `google.protobuf.Duration` well-known type
728
+ message DurationRules {
729
+ // Required specifies that this field must be set
730
+ optional bool required = 1;
731
+
732
+ // Const specifies that this field must be exactly the specified value
733
+ optional google.protobuf.Duration const = 2;
734
+
735
+ // Lt specifies that this field must be less than the specified value,
736
+ // exclusive
737
+ optional google.protobuf.Duration lt = 3;
738
+
739
+ // Lt specifies that this field must be less than the specified value,
740
+ // inclusive
741
+ optional google.protobuf.Duration lte = 4;
742
+
743
+ // Gt specifies that this field must be greater than the specified value,
744
+ // exclusive
745
+ optional google.protobuf.Duration gt = 5;
746
+
747
+ // Gte specifies that this field must be greater than the specified value,
748
+ // inclusive
749
+ optional google.protobuf.Duration gte = 6;
750
+
751
+ // In specifies that this field must be equal to one of the specified
752
+ // values
753
+ repeated google.protobuf.Duration in = 7;
754
+
755
+ // NotIn specifies that this field cannot be equal to one of the specified
756
+ // values
757
+ repeated google.protobuf.Duration not_in = 8;
758
+ }
759
+
760
+ // TimestampRules describe the constraints applied exclusively to the
761
+ // `google.protobuf.Timestamp` well-known type
762
+ message TimestampRules {
763
+ // Required specifies that this field must be set
764
+ optional bool required = 1;
765
+
766
+ // Const specifies that this field must be exactly the specified value
767
+ optional google.protobuf.Timestamp const = 2;
768
+
769
+ // Lt specifies that this field must be less than the specified value,
770
+ // exclusive
771
+ optional google.protobuf.Timestamp lt = 3;
772
+
773
+ // Lte specifies that this field must be less than the specified value,
774
+ // inclusive
775
+ optional google.protobuf.Timestamp lte = 4;
776
+
777
+ // Gt specifies that this field must be greater than the specified value,
778
+ // exclusive
779
+ optional google.protobuf.Timestamp gt = 5;
780
+
781
+ // Gte specifies that this field must be greater than the specified value,
782
+ // inclusive
783
+ optional google.protobuf.Timestamp gte = 6;
784
+
785
+ // LtNow specifies that this must be less than the current time. LtNow
786
+ // can only be used with the Within rule.
787
+ optional bool lt_now = 7;
788
+
789
+ // GtNow specifies that this must be greater than the current time. GtNow
790
+ // can only be used with the Within rule.
791
+ optional bool gt_now = 8;
792
+
793
+ // Within specifies that this field must be within this duration of the
794
+ // current time. This constraint can be used alone or with the LtNow and
795
+ // GtNow rules.
796
+ optional google.protobuf.Duration within = 9;
797
+ }