@mochabug/adaptkit 0.12.2 → 0.12.4

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.
@@ -0,0 +1,4460 @@
1
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
2
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
3
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
4
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
5
+ import type { PartialMessage } from "@protobuf-ts/runtime";
6
+ import { MessageType } from "@protobuf-ts/runtime";
7
+ import { Timestamp } from "../../google/protobuf/timestamp";
8
+ import { Duration } from "../../google/protobuf/duration";
9
+ /**
10
+ * `Constraint` represents a validation rule written in the Common Expression
11
+ * Language (CEL) syntax. Each Constraint includes a unique identifier, an
12
+ * optional error message, and the CEL expression to evaluate. For more
13
+ * information on CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
14
+ *
15
+ * ```proto
16
+ * message Foo {
17
+ * option (buf.validate.message).cel = {
18
+ * id: "foo.bar"
19
+ * message: "bar must be greater than 0"
20
+ * expression: "this.bar > 0"
21
+ * };
22
+ * int32 bar = 1;
23
+ * }
24
+ * ```
25
+ *
26
+ * @generated from protobuf message buf.validate.Constraint
27
+ */
28
+ export interface Constraint {
29
+ /**
30
+ * `id` is a string that serves as a machine-readable name for this Constraint.
31
+ * It should be unique within its scope, which could be either a message or a field.
32
+ *
33
+ * @generated from protobuf field: optional string id = 1;
34
+ */
35
+ id?: string;
36
+ /**
37
+ * `message` is an optional field that provides a human-readable error message
38
+ * for this Constraint when the CEL expression evaluates to false. If a
39
+ * non-empty message is provided, any strings resulting from the CEL
40
+ * expression evaluation are ignored.
41
+ *
42
+ * @generated from protobuf field: optional string message = 2;
43
+ */
44
+ message?: string;
45
+ /**
46
+ * `expression` is the actual CEL expression that will be evaluated for
47
+ * validation. This string must resolve to either a boolean or a string
48
+ * value. If the expression evaluates to false or a non-empty string, the
49
+ * validation is considered failed, and the message is rejected.
50
+ *
51
+ * @generated from protobuf field: optional string expression = 3;
52
+ */
53
+ expression?: string;
54
+ }
55
+ /**
56
+ * MessageConstraints represents validation rules that are applied to the entire message.
57
+ * It includes disabling options and a list of Constraint messages representing Common Expression Language (CEL) validation rules.
58
+ *
59
+ * @generated from protobuf message buf.validate.MessageConstraints
60
+ */
61
+ export interface MessageConstraints {
62
+ /**
63
+ * `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
64
+ * This includes any fields within the message that would otherwise support validation.
65
+ *
66
+ * ```proto
67
+ * message MyMessage {
68
+ * // validation will be bypassed for this message
69
+ * option (buf.validate.message).disabled = true;
70
+ * }
71
+ * ```
72
+ *
73
+ * @generated from protobuf field: optional bool disabled = 1;
74
+ */
75
+ disabled?: boolean;
76
+ /**
77
+ * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
78
+ * These constraints are written in Common Expression Language (CEL) syntax. For more information on
79
+ * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
80
+ *
81
+ *
82
+ * ```proto
83
+ * message MyMessage {
84
+ * // The field `foo` must be greater than 42.
85
+ * option (buf.validate.message).cel = {
86
+ * id: "my_message.value",
87
+ * message: "value must be greater than 42",
88
+ * expression: "this.foo > 42",
89
+ * };
90
+ * optional int32 foo = 1;
91
+ * }
92
+ * ```
93
+ *
94
+ * @generated from protobuf field: repeated buf.validate.Constraint cel = 3;
95
+ */
96
+ cel: Constraint[];
97
+ }
98
+ /**
99
+ * The `OneofConstraints` message type enables you to manage constraints for
100
+ * oneof fields in your protobuf messages.
101
+ *
102
+ * @generated from protobuf message buf.validate.OneofConstraints
103
+ */
104
+ export interface OneofConstraints {
105
+ /**
106
+ * If `required` is true, exactly one field of the oneof must be present. A
107
+ * validation error is returned if no fields in the oneof are present. The
108
+ * field itself may still be a default value; further constraints
109
+ * should be placed on the fields themselves to ensure they are valid values,
110
+ * such as `min_len` or `gt`.
111
+ *
112
+ * ```proto
113
+ * message MyMessage {
114
+ * oneof value {
115
+ * // Either `a` or `b` must be set. If `a` is set, it must also be
116
+ * // non-empty; whereas if `b` is set, it can still be an empty string.
117
+ * option (buf.validate.oneof).required = true;
118
+ * string a = 1 [(buf.validate.field).string.min_len = 1];
119
+ * string b = 2;
120
+ * }
121
+ * }
122
+ * ```
123
+ *
124
+ * @generated from protobuf field: optional bool required = 1;
125
+ */
126
+ required?: boolean;
127
+ }
128
+ /**
129
+ * FieldConstraints encapsulates the rules for each type of field. Depending on
130
+ * the field, the correct set should be used to ensure proper validations.
131
+ *
132
+ * @generated from protobuf message buf.validate.FieldConstraints
133
+ */
134
+ export interface FieldConstraints {
135
+ /**
136
+ * `cel` is a repeated field used to represent a textual expression
137
+ * in the Common Expression Language (CEL) syntax. For more information on
138
+ * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
139
+ *
140
+ * ```proto
141
+ * message MyMessage {
142
+ * // The field `value` must be greater than 42.
143
+ * optional int32 value = 1 [(buf.validate.field).cel = {
144
+ * id: "my_message.value",
145
+ * message: "value must be greater than 42",
146
+ * expression: "this > 42",
147
+ * }];
148
+ * }
149
+ * ```
150
+ *
151
+ * @generated from protobuf field: repeated buf.validate.Constraint cel = 23;
152
+ */
153
+ cel: Constraint[];
154
+ /**
155
+ * If `required` is true, the field must be populated. A populated field can be
156
+ * described as "serialized in the wire format," which includes:
157
+ *
158
+ * - the following "nullable" fields must be explicitly set to be considered populated:
159
+ * - singular message fields (whose fields may be unpopulated/default values)
160
+ * - member fields of a oneof (may be their default value)
161
+ * - proto3 optional fields (may be their default value)
162
+ * - proto2 scalar fields (both optional and required)
163
+ * - proto3 scalar fields must be non-zero to be considered populated
164
+ * - repeated and map fields must be non-empty to be considered populated
165
+ *
166
+ * ```proto
167
+ * message MyMessage {
168
+ * // The field `value` must be set to a non-null value.
169
+ * optional MyOtherMessage value = 1 [(buf.validate.field).required = true];
170
+ * }
171
+ * ```
172
+ *
173
+ * @generated from protobuf field: optional bool required = 25;
174
+ */
175
+ required?: boolean;
176
+ /**
177
+ * Skip validation on the field if its value matches the specified criteria.
178
+ * See Ignore enum for details.
179
+ *
180
+ * ```proto
181
+ * message UpdateRequest {
182
+ * // The uri rule only applies if the field is populated and not an empty
183
+ * // string.
184
+ * optional string url = 1 [
185
+ * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE,
186
+ * (buf.validate.field).string.uri = true,
187
+ * ];
188
+ * }
189
+ * ```
190
+ *
191
+ * @generated from protobuf field: optional buf.validate.Ignore ignore = 27;
192
+ */
193
+ ignore?: Ignore;
194
+ /**
195
+ * @generated from protobuf oneof: type
196
+ */
197
+ type: {
198
+ oneofKind: "float";
199
+ /**
200
+ * Scalar Field Types
201
+ *
202
+ * @generated from protobuf field: buf.validate.FloatRules float = 1;
203
+ */
204
+ float: FloatRules;
205
+ } | {
206
+ oneofKind: "double";
207
+ /**
208
+ * @generated from protobuf field: buf.validate.DoubleRules double = 2;
209
+ */
210
+ double: DoubleRules;
211
+ } | {
212
+ oneofKind: "int32";
213
+ /**
214
+ * @generated from protobuf field: buf.validate.Int32Rules int32 = 3;
215
+ */
216
+ int32: Int32Rules;
217
+ } | {
218
+ oneofKind: "int64";
219
+ /**
220
+ * @generated from protobuf field: buf.validate.Int64Rules int64 = 4;
221
+ */
222
+ int64: Int64Rules;
223
+ } | {
224
+ oneofKind: "uint32";
225
+ /**
226
+ * @generated from protobuf field: buf.validate.UInt32Rules uint32 = 5;
227
+ */
228
+ uint32: UInt32Rules;
229
+ } | {
230
+ oneofKind: "uint64";
231
+ /**
232
+ * @generated from protobuf field: buf.validate.UInt64Rules uint64 = 6;
233
+ */
234
+ uint64: UInt64Rules;
235
+ } | {
236
+ oneofKind: "sint32";
237
+ /**
238
+ * @generated from protobuf field: buf.validate.SInt32Rules sint32 = 7;
239
+ */
240
+ sint32: SInt32Rules;
241
+ } | {
242
+ oneofKind: "sint64";
243
+ /**
244
+ * @generated from protobuf field: buf.validate.SInt64Rules sint64 = 8;
245
+ */
246
+ sint64: SInt64Rules;
247
+ } | {
248
+ oneofKind: "fixed32";
249
+ /**
250
+ * @generated from protobuf field: buf.validate.Fixed32Rules fixed32 = 9;
251
+ */
252
+ fixed32: Fixed32Rules;
253
+ } | {
254
+ oneofKind: "fixed64";
255
+ /**
256
+ * @generated from protobuf field: buf.validate.Fixed64Rules fixed64 = 10;
257
+ */
258
+ fixed64: Fixed64Rules;
259
+ } | {
260
+ oneofKind: "sfixed32";
261
+ /**
262
+ * @generated from protobuf field: buf.validate.SFixed32Rules sfixed32 = 11;
263
+ */
264
+ sfixed32: SFixed32Rules;
265
+ } | {
266
+ oneofKind: "sfixed64";
267
+ /**
268
+ * @generated from protobuf field: buf.validate.SFixed64Rules sfixed64 = 12;
269
+ */
270
+ sfixed64: SFixed64Rules;
271
+ } | {
272
+ oneofKind: "bool";
273
+ /**
274
+ * @generated from protobuf field: buf.validate.BoolRules bool = 13;
275
+ */
276
+ bool: BoolRules;
277
+ } | {
278
+ oneofKind: "string";
279
+ /**
280
+ * @generated from protobuf field: buf.validate.StringRules string = 14;
281
+ */
282
+ string: StringRules;
283
+ } | {
284
+ oneofKind: "bytes";
285
+ /**
286
+ * @generated from protobuf field: buf.validate.BytesRules bytes = 15;
287
+ */
288
+ bytes: BytesRules;
289
+ } | {
290
+ oneofKind: "enum";
291
+ /**
292
+ * Complex Field Types
293
+ *
294
+ * @generated from protobuf field: buf.validate.EnumRules enum = 16;
295
+ */
296
+ enum: EnumRules;
297
+ } | {
298
+ oneofKind: "repeated";
299
+ /**
300
+ * @generated from protobuf field: buf.validate.RepeatedRules repeated = 18;
301
+ */
302
+ repeated: RepeatedRules;
303
+ } | {
304
+ oneofKind: "map";
305
+ /**
306
+ * @generated from protobuf field: buf.validate.MapRules map = 19;
307
+ */
308
+ map: MapRules;
309
+ } | {
310
+ oneofKind: "any";
311
+ /**
312
+ * Well-Known Field Types
313
+ *
314
+ * @generated from protobuf field: buf.validate.AnyRules any = 20;
315
+ */
316
+ any: AnyRules;
317
+ } | {
318
+ oneofKind: "duration";
319
+ /**
320
+ * @generated from protobuf field: buf.validate.DurationRules duration = 21;
321
+ */
322
+ duration: DurationRules;
323
+ } | {
324
+ oneofKind: "timestamp";
325
+ /**
326
+ * @generated from protobuf field: buf.validate.TimestampRules timestamp = 22;
327
+ */
328
+ timestamp: TimestampRules;
329
+ } | {
330
+ oneofKind: undefined;
331
+ };
332
+ /**
333
+ * DEPRECATED: use ignore=IGNORE_ALWAYS instead. TODO: remove this field pre-v1.
334
+ *
335
+ * @deprecated
336
+ * @generated from protobuf field: optional bool skipped = 24 [deprecated = true];
337
+ */
338
+ skipped?: boolean;
339
+ /**
340
+ * DEPRECATED: use ignore=IGNORE_IF_UNPOPULATED instead. TODO: remove this field pre-v1.
341
+ *
342
+ * @deprecated
343
+ * @generated from protobuf field: optional bool ignore_empty = 26 [deprecated = true];
344
+ */
345
+ ignoreEmpty?: boolean;
346
+ }
347
+ /**
348
+ * PredefinedConstraints are custom constraints that can be re-used with
349
+ * multiple fields.
350
+ *
351
+ * @generated from protobuf message buf.validate.PredefinedConstraints
352
+ */
353
+ export interface PredefinedConstraints {
354
+ /**
355
+ * `cel` is a repeated field used to represent a textual expression
356
+ * in the Common Expression Language (CEL) syntax. For more information on
357
+ * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
358
+ *
359
+ * ```proto
360
+ * message MyMessage {
361
+ * // The field `value` must be greater than 42.
362
+ * optional int32 value = 1 [(buf.validate.predefined).cel = {
363
+ * id: "my_message.value",
364
+ * message: "value must be greater than 42",
365
+ * expression: "this > 42",
366
+ * }];
367
+ * }
368
+ * ```
369
+ *
370
+ * @generated from protobuf field: repeated buf.validate.Constraint cel = 1;
371
+ */
372
+ cel: Constraint[];
373
+ }
374
+ /**
375
+ * FloatRules describes the constraints applied to `float` values. These
376
+ * rules may also be applied to the `google.protobuf.FloatValue` Well-Known-Type.
377
+ *
378
+ * @generated from protobuf message buf.validate.FloatRules
379
+ */
380
+ export interface FloatRules {
381
+ /**
382
+ * `const` requires the field value to exactly match the specified value. If
383
+ * the field value doesn't match, an error message is generated.
384
+ *
385
+ * ```proto
386
+ * message MyFloat {
387
+ * // value must equal 42.0
388
+ * float value = 1 [(buf.validate.field).float.const = 42.0];
389
+ * }
390
+ * ```
391
+ *
392
+ * @generated from protobuf field: optional float const = 1;
393
+ */
394
+ const?: number;
395
+ /**
396
+ * @generated from protobuf oneof: less_than
397
+ */
398
+ lessThan: {
399
+ oneofKind: "lt";
400
+ /**
401
+ * `lt` requires the field value to be less than the specified value (field <
402
+ * value). If the field value is equal to or greater than the specified value,
403
+ * an error message is generated.
404
+ *
405
+ * ```proto
406
+ * message MyFloat {
407
+ * // value must be less than 10.0
408
+ * float value = 1 [(buf.validate.field).float.lt = 10.0];
409
+ * }
410
+ * ```
411
+ *
412
+ * @generated from protobuf field: float lt = 2;
413
+ */
414
+ lt: number;
415
+ } | {
416
+ oneofKind: "lte";
417
+ /**
418
+ * `lte` requires the field value to be less than or equal to the specified
419
+ * value (field <= value). If the field value is greater than the specified
420
+ * value, an error message is generated.
421
+ *
422
+ * ```proto
423
+ * message MyFloat {
424
+ * // value must be less than or equal to 10.0
425
+ * float value = 1 [(buf.validate.field).float.lte = 10.0];
426
+ * }
427
+ * ```
428
+ *
429
+ * @generated from protobuf field: float lte = 3;
430
+ */
431
+ lte: number;
432
+ } | {
433
+ oneofKind: undefined;
434
+ };
435
+ /**
436
+ * @generated from protobuf oneof: greater_than
437
+ */
438
+ greaterThan: {
439
+ oneofKind: "gt";
440
+ /**
441
+ * `gt` requires the field value to be greater than the specified value
442
+ * (exclusive). If the value of `gt` is larger than a specified `lt` or
443
+ * `lte`, the range is reversed, and the field value must be outside the
444
+ * specified range. If the field value doesn't meet the required conditions,
445
+ * an error message is generated.
446
+ *
447
+ * ```proto
448
+ * message MyFloat {
449
+ * // value must be greater than 5.0 [float.gt]
450
+ * float value = 1 [(buf.validate.field).float.gt = 5.0];
451
+ *
452
+ * // value must be greater than 5 and less than 10.0 [float.gt_lt]
453
+ * float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }];
454
+ *
455
+ * // value must be greater than 10 or less than 5.0 [float.gt_lt_exclusive]
456
+ * float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }];
457
+ * }
458
+ * ```
459
+ *
460
+ * @generated from protobuf field: float gt = 4;
461
+ */
462
+ gt: number;
463
+ } | {
464
+ oneofKind: "gte";
465
+ /**
466
+ * `gte` requires the field value to be greater than or equal to the specified
467
+ * value (exclusive). If the value of `gte` is larger than a specified `lt`
468
+ * or `lte`, the range is reversed, and the field value must be outside the
469
+ * specified range. If the field value doesn't meet the required conditions,
470
+ * an error message is generated.
471
+ *
472
+ * ```proto
473
+ * message MyFloat {
474
+ * // value must be greater than or equal to 5.0 [float.gte]
475
+ * float value = 1 [(buf.validate.field).float.gte = 5.0];
476
+ *
477
+ * // value must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt]
478
+ * float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }];
479
+ *
480
+ * // value must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive]
481
+ * float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }];
482
+ * }
483
+ * ```
484
+ *
485
+ * @generated from protobuf field: float gte = 5;
486
+ */
487
+ gte: number;
488
+ } | {
489
+ oneofKind: undefined;
490
+ };
491
+ /**
492
+ * `in` requires the field value to be equal to one of the specified values.
493
+ * If the field value isn't one of the specified values, an error message
494
+ * is generated.
495
+ *
496
+ * ```proto
497
+ * message MyFloat {
498
+ * // value must be in list [1.0, 2.0, 3.0]
499
+ * repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] };
500
+ * }
501
+ * ```
502
+ *
503
+ * @generated from protobuf field: repeated float in = 6;
504
+ */
505
+ in: number[];
506
+ /**
507
+ * `in` requires the field value to not be equal to any of the specified
508
+ * values. If the field value is one of the specified values, an error
509
+ * message is generated.
510
+ *
511
+ * ```proto
512
+ * message MyFloat {
513
+ * // value must not be in list [1.0, 2.0, 3.0]
514
+ * repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] };
515
+ * }
516
+ * ```
517
+ *
518
+ * @generated from protobuf field: repeated float not_in = 7;
519
+ */
520
+ notIn: number[];
521
+ /**
522
+ * `finite` requires the field value to be finite. If the field value is
523
+ * infinite or NaN, an error message is generated.
524
+ *
525
+ * @generated from protobuf field: optional bool finite = 8;
526
+ */
527
+ finite?: boolean;
528
+ /**
529
+ * `example` specifies values that the field may have. These values SHOULD
530
+ * conform to other constraints. `example` values will not impact validation
531
+ * but may be used as helpful guidance on how to populate the given field.
532
+ *
533
+ * ```proto
534
+ * message MyFloat {
535
+ * float value = 1 [
536
+ * (buf.validate.field).float.example = 1.0,
537
+ * (buf.validate.field).float.example = "Infinity"
538
+ * ];
539
+ * }
540
+ * ```
541
+ *
542
+ * @generated from protobuf field: repeated float example = 9;
543
+ */
544
+ example: number[];
545
+ }
546
+ /**
547
+ * DoubleRules describes the constraints applied to `double` values. These
548
+ * rules may also be applied to the `google.protobuf.DoubleValue` Well-Known-Type.
549
+ *
550
+ * @generated from protobuf message buf.validate.DoubleRules
551
+ */
552
+ export interface DoubleRules {
553
+ /**
554
+ * `const` requires the field value to exactly match the specified value. If
555
+ * the field value doesn't match, an error message is generated.
556
+ *
557
+ * ```proto
558
+ * message MyDouble {
559
+ * // value must equal 42.0
560
+ * double value = 1 [(buf.validate.field).double.const = 42.0];
561
+ * }
562
+ * ```
563
+ *
564
+ * @generated from protobuf field: optional double const = 1;
565
+ */
566
+ const?: number;
567
+ /**
568
+ * @generated from protobuf oneof: less_than
569
+ */
570
+ lessThan: {
571
+ oneofKind: "lt";
572
+ /**
573
+ * `lt` requires the field value to be less than the specified value (field <
574
+ * value). If the field value is equal to or greater than the specified
575
+ * value, an error message is generated.
576
+ *
577
+ * ```proto
578
+ * message MyDouble {
579
+ * // value must be less than 10.0
580
+ * double value = 1 [(buf.validate.field).double.lt = 10.0];
581
+ * }
582
+ * ```
583
+ *
584
+ * @generated from protobuf field: double lt = 2;
585
+ */
586
+ lt: number;
587
+ } | {
588
+ oneofKind: "lte";
589
+ /**
590
+ * `lte` requires the field value to be less than or equal to the specified value
591
+ * (field <= value). If the field value is greater than the specified value,
592
+ * an error message is generated.
593
+ *
594
+ * ```proto
595
+ * message MyDouble {
596
+ * // value must be less than or equal to 10.0
597
+ * double value = 1 [(buf.validate.field).double.lte = 10.0];
598
+ * }
599
+ * ```
600
+ *
601
+ * @generated from protobuf field: double lte = 3;
602
+ */
603
+ lte: number;
604
+ } | {
605
+ oneofKind: undefined;
606
+ };
607
+ /**
608
+ * @generated from protobuf oneof: greater_than
609
+ */
610
+ greaterThan: {
611
+ oneofKind: "gt";
612
+ /**
613
+ * `gt` requires the field value to be greater than the specified value
614
+ * (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`,
615
+ * the range is reversed, and the field value must be outside the specified
616
+ * range. If the field value doesn't meet the required conditions, an error
617
+ * message is generated.
618
+ *
619
+ * ```proto
620
+ * message MyDouble {
621
+ * // value must be greater than 5.0 [double.gt]
622
+ * double value = 1 [(buf.validate.field).double.gt = 5.0];
623
+ *
624
+ * // value must be greater than 5 and less than 10.0 [double.gt_lt]
625
+ * double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }];
626
+ *
627
+ * // value must be greater than 10 or less than 5.0 [double.gt_lt_exclusive]
628
+ * double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }];
629
+ * }
630
+ * ```
631
+ *
632
+ * @generated from protobuf field: double gt = 4;
633
+ */
634
+ gt: number;
635
+ } | {
636
+ oneofKind: "gte";
637
+ /**
638
+ * `gte` requires the field value to be greater than or equal to the specified
639
+ * value (exclusive). If the value of `gte` is larger than a specified `lt` or
640
+ * `lte`, the range is reversed, and the field value must be outside the
641
+ * specified range. If the field value doesn't meet the required conditions,
642
+ * an error message is generated.
643
+ *
644
+ * ```proto
645
+ * message MyDouble {
646
+ * // value must be greater than or equal to 5.0 [double.gte]
647
+ * double value = 1 [(buf.validate.field).double.gte = 5.0];
648
+ *
649
+ * // value must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt]
650
+ * double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }];
651
+ *
652
+ * // value must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive]
653
+ * double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }];
654
+ * }
655
+ * ```
656
+ *
657
+ * @generated from protobuf field: double gte = 5;
658
+ */
659
+ gte: number;
660
+ } | {
661
+ oneofKind: undefined;
662
+ };
663
+ /**
664
+ * `in` requires the field value to be equal to one of the specified values.
665
+ * If the field value isn't one of the specified values, an error message is
666
+ * generated.
667
+ *
668
+ * ```proto
669
+ * message MyDouble {
670
+ * // value must be in list [1.0, 2.0, 3.0]
671
+ * repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] };
672
+ * }
673
+ * ```
674
+ *
675
+ * @generated from protobuf field: repeated double in = 6;
676
+ */
677
+ in: number[];
678
+ /**
679
+ * `not_in` requires the field value to not be equal to any of the specified
680
+ * values. If the field value is one of the specified values, an error
681
+ * message is generated.
682
+ *
683
+ * ```proto
684
+ * message MyDouble {
685
+ * // value must not be in list [1.0, 2.0, 3.0]
686
+ * repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] };
687
+ * }
688
+ * ```
689
+ *
690
+ * @generated from protobuf field: repeated double not_in = 7;
691
+ */
692
+ notIn: number[];
693
+ /**
694
+ * `finite` requires the field value to be finite. If the field value is
695
+ * infinite or NaN, an error message is generated.
696
+ *
697
+ * @generated from protobuf field: optional bool finite = 8;
698
+ */
699
+ finite?: boolean;
700
+ /**
701
+ * `example` specifies values that the field may have. These values SHOULD
702
+ * conform to other constraints. `example` values will not impact validation
703
+ * but may be used as helpful guidance on how to populate the given field.
704
+ *
705
+ * ```proto
706
+ * message MyDouble {
707
+ * double value = 1 [
708
+ * (buf.validate.field).double.example = 1.0,
709
+ * (buf.validate.field).double.example = "Infinity"
710
+ * ];
711
+ * }
712
+ * ```
713
+ *
714
+ * @generated from protobuf field: repeated double example = 9;
715
+ */
716
+ example: number[];
717
+ }
718
+ /**
719
+ * Int32Rules describes the constraints applied to `int32` values. These
720
+ * rules may also be applied to the `google.protobuf.Int32Value` Well-Known-Type.
721
+ *
722
+ * @generated from protobuf message buf.validate.Int32Rules
723
+ */
724
+ export interface Int32Rules {
725
+ /**
726
+ * `const` requires the field value to exactly match the specified value. If
727
+ * the field value doesn't match, an error message is generated.
728
+ *
729
+ * ```proto
730
+ * message MyInt32 {
731
+ * // value must equal 42
732
+ * int32 value = 1 [(buf.validate.field).int32.const = 42];
733
+ * }
734
+ * ```
735
+ *
736
+ * @generated from protobuf field: optional int32 const = 1;
737
+ */
738
+ const?: number;
739
+ /**
740
+ * @generated from protobuf oneof: less_than
741
+ */
742
+ lessThan: {
743
+ oneofKind: "lt";
744
+ /**
745
+ * `lt` requires the field value to be less than the specified value (field
746
+ * < value). If the field value is equal to or greater than the specified
747
+ * value, an error message is generated.
748
+ *
749
+ * ```proto
750
+ * message MyInt32 {
751
+ * // value must be less than 10
752
+ * int32 value = 1 [(buf.validate.field).int32.lt = 10];
753
+ * }
754
+ * ```
755
+ *
756
+ * @generated from protobuf field: int32 lt = 2;
757
+ */
758
+ lt: number;
759
+ } | {
760
+ oneofKind: "lte";
761
+ /**
762
+ * `lte` requires the field value to be less than or equal to the specified
763
+ * value (field <= value). If the field value is greater than the specified
764
+ * value, an error message is generated.
765
+ *
766
+ * ```proto
767
+ * message MyInt32 {
768
+ * // value must be less than or equal to 10
769
+ * int32 value = 1 [(buf.validate.field).int32.lte = 10];
770
+ * }
771
+ * ```
772
+ *
773
+ * @generated from protobuf field: int32 lte = 3;
774
+ */
775
+ lte: number;
776
+ } | {
777
+ oneofKind: undefined;
778
+ };
779
+ /**
780
+ * @generated from protobuf oneof: greater_than
781
+ */
782
+ greaterThan: {
783
+ oneofKind: "gt";
784
+ /**
785
+ * `gt` requires the field value to be greater than the specified value
786
+ * (exclusive). If the value of `gt` is larger than a specified `lt` or
787
+ * `lte`, the range is reversed, and the field value must be outside the
788
+ * specified range. If the field value doesn't meet the required conditions,
789
+ * an error message is generated.
790
+ *
791
+ * ```proto
792
+ * message MyInt32 {
793
+ * // value must be greater than 5 [int32.gt]
794
+ * int32 value = 1 [(buf.validate.field).int32.gt = 5];
795
+ *
796
+ * // value must be greater than 5 and less than 10 [int32.gt_lt]
797
+ * int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }];
798
+ *
799
+ * // value must be greater than 10 or less than 5 [int32.gt_lt_exclusive]
800
+ * int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }];
801
+ * }
802
+ * ```
803
+ *
804
+ * @generated from protobuf field: int32 gt = 4;
805
+ */
806
+ gt: number;
807
+ } | {
808
+ oneofKind: "gte";
809
+ /**
810
+ * `gte` requires the field value to be greater than or equal to the specified value
811
+ * (exclusive). If the value of `gte` is larger than a specified `lt` or
812
+ * `lte`, the range is reversed, and the field value must be outside the
813
+ * specified range. If the field value doesn't meet the required conditions,
814
+ * an error message is generated.
815
+ *
816
+ * ```proto
817
+ * message MyInt32 {
818
+ * // value must be greater than or equal to 5 [int32.gte]
819
+ * int32 value = 1 [(buf.validate.field).int32.gte = 5];
820
+ *
821
+ * // value must be greater than or equal to 5 and less than 10 [int32.gte_lt]
822
+ * int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }];
823
+ *
824
+ * // value must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive]
825
+ * int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }];
826
+ * }
827
+ * ```
828
+ *
829
+ * @generated from protobuf field: int32 gte = 5;
830
+ */
831
+ gte: number;
832
+ } | {
833
+ oneofKind: undefined;
834
+ };
835
+ /**
836
+ * `in` requires the field value to be equal to one of the specified values.
837
+ * If the field value isn't one of the specified values, an error message is
838
+ * generated.
839
+ *
840
+ * ```proto
841
+ * message MyInt32 {
842
+ * // value must be in list [1, 2, 3]
843
+ * repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] };
844
+ * }
845
+ * ```
846
+ *
847
+ * @generated from protobuf field: repeated int32 in = 6;
848
+ */
849
+ in: number[];
850
+ /**
851
+ * `not_in` requires the field value to not be equal to any of the specified
852
+ * values. If the field value is one of the specified values, an error message
853
+ * is generated.
854
+ *
855
+ * ```proto
856
+ * message MyInt32 {
857
+ * // value must not be in list [1, 2, 3]
858
+ * repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] };
859
+ * }
860
+ * ```
861
+ *
862
+ * @generated from protobuf field: repeated int32 not_in = 7;
863
+ */
864
+ notIn: number[];
865
+ /**
866
+ * `example` specifies values that the field may have. These values SHOULD
867
+ * conform to other constraints. `example` values will not impact validation
868
+ * but may be used as helpful guidance on how to populate the given field.
869
+ *
870
+ * ```proto
871
+ * message MyInt32 {
872
+ * int32 value = 1 [
873
+ * (buf.validate.field).int32.example = 1,
874
+ * (buf.validate.field).int32.example = -10
875
+ * ];
876
+ * }
877
+ * ```
878
+ *
879
+ * @generated from protobuf field: repeated int32 example = 8;
880
+ */
881
+ example: number[];
882
+ }
883
+ /**
884
+ * Int64Rules describes the constraints applied to `int64` values. These
885
+ * rules may also be applied to the `google.protobuf.Int64Value` Well-Known-Type.
886
+ *
887
+ * @generated from protobuf message buf.validate.Int64Rules
888
+ */
889
+ export interface Int64Rules {
890
+ /**
891
+ * `const` requires the field value to exactly match the specified value. If
892
+ * the field value doesn't match, an error message is generated.
893
+ *
894
+ * ```proto
895
+ * message MyInt64 {
896
+ * // value must equal 42
897
+ * int64 value = 1 [(buf.validate.field).int64.const = 42];
898
+ * }
899
+ * ```
900
+ *
901
+ * @generated from protobuf field: optional int64 const = 1;
902
+ */
903
+ const?: bigint;
904
+ /**
905
+ * @generated from protobuf oneof: less_than
906
+ */
907
+ lessThan: {
908
+ oneofKind: "lt";
909
+ /**
910
+ * `lt` requires the field value to be less than the specified value (field <
911
+ * value). If the field value is equal to or greater than the specified value,
912
+ * an error message is generated.
913
+ *
914
+ * ```proto
915
+ * message MyInt64 {
916
+ * // value must be less than 10
917
+ * int64 value = 1 [(buf.validate.field).int64.lt = 10];
918
+ * }
919
+ * ```
920
+ *
921
+ * @generated from protobuf field: int64 lt = 2;
922
+ */
923
+ lt: bigint;
924
+ } | {
925
+ oneofKind: "lte";
926
+ /**
927
+ * `lte` requires the field value to be less than or equal to the specified
928
+ * value (field <= value). If the field value is greater than the specified
929
+ * value, an error message is generated.
930
+ *
931
+ * ```proto
932
+ * message MyInt64 {
933
+ * // value must be less than or equal to 10
934
+ * int64 value = 1 [(buf.validate.field).int64.lte = 10];
935
+ * }
936
+ * ```
937
+ *
938
+ * @generated from protobuf field: int64 lte = 3;
939
+ */
940
+ lte: bigint;
941
+ } | {
942
+ oneofKind: undefined;
943
+ };
944
+ /**
945
+ * @generated from protobuf oneof: greater_than
946
+ */
947
+ greaterThan: {
948
+ oneofKind: "gt";
949
+ /**
950
+ * `gt` requires the field value to be greater than the specified value
951
+ * (exclusive). If the value of `gt` is larger than a specified `lt` or
952
+ * `lte`, the range is reversed, and the field value must be outside the
953
+ * specified range. If the field value doesn't meet the required conditions,
954
+ * an error message is generated.
955
+ *
956
+ * ```proto
957
+ * message MyInt64 {
958
+ * // value must be greater than 5 [int64.gt]
959
+ * int64 value = 1 [(buf.validate.field).int64.gt = 5];
960
+ *
961
+ * // value must be greater than 5 and less than 10 [int64.gt_lt]
962
+ * int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }];
963
+ *
964
+ * // value must be greater than 10 or less than 5 [int64.gt_lt_exclusive]
965
+ * int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }];
966
+ * }
967
+ * ```
968
+ *
969
+ * @generated from protobuf field: int64 gt = 4;
970
+ */
971
+ gt: bigint;
972
+ } | {
973
+ oneofKind: "gte";
974
+ /**
975
+ * `gte` requires the field value to be greater than or equal to the specified
976
+ * value (exclusive). If the value of `gte` is larger than a specified `lt`
977
+ * or `lte`, the range is reversed, and the field value must be outside the
978
+ * specified range. If the field value doesn't meet the required conditions,
979
+ * an error message is generated.
980
+ *
981
+ * ```proto
982
+ * message MyInt64 {
983
+ * // value must be greater than or equal to 5 [int64.gte]
984
+ * int64 value = 1 [(buf.validate.field).int64.gte = 5];
985
+ *
986
+ * // value must be greater than or equal to 5 and less than 10 [int64.gte_lt]
987
+ * int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }];
988
+ *
989
+ * // value must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive]
990
+ * int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }];
991
+ * }
992
+ * ```
993
+ *
994
+ * @generated from protobuf field: int64 gte = 5;
995
+ */
996
+ gte: bigint;
997
+ } | {
998
+ oneofKind: undefined;
999
+ };
1000
+ /**
1001
+ * `in` requires the field value to be equal to one of the specified values.
1002
+ * If the field value isn't one of the specified values, an error message is
1003
+ * generated.
1004
+ *
1005
+ * ```proto
1006
+ * message MyInt64 {
1007
+ * // value must be in list [1, 2, 3]
1008
+ * repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] };
1009
+ * }
1010
+ * ```
1011
+ *
1012
+ * @generated from protobuf field: repeated int64 in = 6;
1013
+ */
1014
+ in: bigint[];
1015
+ /**
1016
+ * `not_in` requires the field value to not be equal to any of the specified
1017
+ * values. If the field value is one of the specified values, an error
1018
+ * message is generated.
1019
+ *
1020
+ * ```proto
1021
+ * message MyInt64 {
1022
+ * // value must not be in list [1, 2, 3]
1023
+ * repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] };
1024
+ * }
1025
+ * ```
1026
+ *
1027
+ * @generated from protobuf field: repeated int64 not_in = 7;
1028
+ */
1029
+ notIn: bigint[];
1030
+ /**
1031
+ * `example` specifies values that the field may have. These values SHOULD
1032
+ * conform to other constraints. `example` values will not impact validation
1033
+ * but may be used as helpful guidance on how to populate the given field.
1034
+ *
1035
+ * ```proto
1036
+ * message MyInt64 {
1037
+ * int64 value = 1 [
1038
+ * (buf.validate.field).int64.example = 1,
1039
+ * (buf.validate.field).int64.example = -10
1040
+ * ];
1041
+ * }
1042
+ * ```
1043
+ *
1044
+ * @generated from protobuf field: repeated int64 example = 9;
1045
+ */
1046
+ example: bigint[];
1047
+ }
1048
+ /**
1049
+ * UInt32Rules describes the constraints applied to `uint32` values. These
1050
+ * rules may also be applied to the `google.protobuf.UInt32Value` Well-Known-Type.
1051
+ *
1052
+ * @generated from protobuf message buf.validate.UInt32Rules
1053
+ */
1054
+ export interface UInt32Rules {
1055
+ /**
1056
+ * `const` requires the field value to exactly match the specified value. If
1057
+ * the field value doesn't match, an error message is generated.
1058
+ *
1059
+ * ```proto
1060
+ * message MyUInt32 {
1061
+ * // value must equal 42
1062
+ * uint32 value = 1 [(buf.validate.field).uint32.const = 42];
1063
+ * }
1064
+ * ```
1065
+ *
1066
+ * @generated from protobuf field: optional uint32 const = 1;
1067
+ */
1068
+ const?: number;
1069
+ /**
1070
+ * @generated from protobuf oneof: less_than
1071
+ */
1072
+ lessThan: {
1073
+ oneofKind: "lt";
1074
+ /**
1075
+ * `lt` requires the field value to be less than the specified value (field <
1076
+ * value). If the field value is equal to or greater than the specified value,
1077
+ * an error message is generated.
1078
+ *
1079
+ * ```proto
1080
+ * message MyUInt32 {
1081
+ * // value must be less than 10
1082
+ * uint32 value = 1 [(buf.validate.field).uint32.lt = 10];
1083
+ * }
1084
+ * ```
1085
+ *
1086
+ * @generated from protobuf field: uint32 lt = 2;
1087
+ */
1088
+ lt: number;
1089
+ } | {
1090
+ oneofKind: "lte";
1091
+ /**
1092
+ * `lte` requires the field value to be less than or equal to the specified
1093
+ * value (field <= value). If the field value is greater than the specified
1094
+ * value, an error message is generated.
1095
+ *
1096
+ * ```proto
1097
+ * message MyUInt32 {
1098
+ * // value must be less than or equal to 10
1099
+ * uint32 value = 1 [(buf.validate.field).uint32.lte = 10];
1100
+ * }
1101
+ * ```
1102
+ *
1103
+ * @generated from protobuf field: uint32 lte = 3;
1104
+ */
1105
+ lte: number;
1106
+ } | {
1107
+ oneofKind: undefined;
1108
+ };
1109
+ /**
1110
+ * @generated from protobuf oneof: greater_than
1111
+ */
1112
+ greaterThan: {
1113
+ oneofKind: "gt";
1114
+ /**
1115
+ * `gt` requires the field value to be greater than the specified value
1116
+ * (exclusive). If the value of `gt` is larger than a specified `lt` or
1117
+ * `lte`, the range is reversed, and the field value must be outside the
1118
+ * specified range. If the field value doesn't meet the required conditions,
1119
+ * an error message is generated.
1120
+ *
1121
+ * ```proto
1122
+ * message MyUInt32 {
1123
+ * // value must be greater than 5 [uint32.gt]
1124
+ * uint32 value = 1 [(buf.validate.field).uint32.gt = 5];
1125
+ *
1126
+ * // value must be greater than 5 and less than 10 [uint32.gt_lt]
1127
+ * uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }];
1128
+ *
1129
+ * // value must be greater than 10 or less than 5 [uint32.gt_lt_exclusive]
1130
+ * uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }];
1131
+ * }
1132
+ * ```
1133
+ *
1134
+ * @generated from protobuf field: uint32 gt = 4;
1135
+ */
1136
+ gt: number;
1137
+ } | {
1138
+ oneofKind: "gte";
1139
+ /**
1140
+ * `gte` requires the field value to be greater than or equal to the specified
1141
+ * value (exclusive). If the value of `gte` is larger than a specified `lt`
1142
+ * or `lte`, the range is reversed, and the field value must be outside the
1143
+ * specified range. If the field value doesn't meet the required conditions,
1144
+ * an error message is generated.
1145
+ *
1146
+ * ```proto
1147
+ * message MyUInt32 {
1148
+ * // value must be greater than or equal to 5 [uint32.gte]
1149
+ * uint32 value = 1 [(buf.validate.field).uint32.gte = 5];
1150
+ *
1151
+ * // value must be greater than or equal to 5 and less than 10 [uint32.gte_lt]
1152
+ * uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }];
1153
+ *
1154
+ * // value must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive]
1155
+ * uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }];
1156
+ * }
1157
+ * ```
1158
+ *
1159
+ * @generated from protobuf field: uint32 gte = 5;
1160
+ */
1161
+ gte: number;
1162
+ } | {
1163
+ oneofKind: undefined;
1164
+ };
1165
+ /**
1166
+ * `in` requires the field value to be equal to one of the specified values.
1167
+ * If the field value isn't one of the specified values, an error message is
1168
+ * generated.
1169
+ *
1170
+ * ```proto
1171
+ * message MyUInt32 {
1172
+ * // value must be in list [1, 2, 3]
1173
+ * repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] };
1174
+ * }
1175
+ * ```
1176
+ *
1177
+ * @generated from protobuf field: repeated uint32 in = 6;
1178
+ */
1179
+ in: number[];
1180
+ /**
1181
+ * `not_in` requires the field value to not be equal to any of the specified
1182
+ * values. If the field value is one of the specified values, an error
1183
+ * message is generated.
1184
+ *
1185
+ * ```proto
1186
+ * message MyUInt32 {
1187
+ * // value must not be in list [1, 2, 3]
1188
+ * repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] };
1189
+ * }
1190
+ * ```
1191
+ *
1192
+ * @generated from protobuf field: repeated uint32 not_in = 7;
1193
+ */
1194
+ notIn: number[];
1195
+ /**
1196
+ * `example` specifies values that the field may have. These values SHOULD
1197
+ * conform to other constraints. `example` values will not impact validation
1198
+ * but may be used as helpful guidance on how to populate the given field.
1199
+ *
1200
+ * ```proto
1201
+ * message MyUInt32 {
1202
+ * uint32 value = 1 [
1203
+ * (buf.validate.field).uint32.example = 1,
1204
+ * (buf.validate.field).uint32.example = 10
1205
+ * ];
1206
+ * }
1207
+ * ```
1208
+ *
1209
+ * @generated from protobuf field: repeated uint32 example = 8;
1210
+ */
1211
+ example: number[];
1212
+ }
1213
+ /**
1214
+ * UInt64Rules describes the constraints applied to `uint64` values. These
1215
+ * rules may also be applied to the `google.protobuf.UInt64Value` Well-Known-Type.
1216
+ *
1217
+ * @generated from protobuf message buf.validate.UInt64Rules
1218
+ */
1219
+ export interface UInt64Rules {
1220
+ /**
1221
+ * `const` requires the field value to exactly match the specified value. If
1222
+ * the field value doesn't match, an error message is generated.
1223
+ *
1224
+ * ```proto
1225
+ * message MyUInt64 {
1226
+ * // value must equal 42
1227
+ * uint64 value = 1 [(buf.validate.field).uint64.const = 42];
1228
+ * }
1229
+ * ```
1230
+ *
1231
+ * @generated from protobuf field: optional uint64 const = 1;
1232
+ */
1233
+ const?: bigint;
1234
+ /**
1235
+ * @generated from protobuf oneof: less_than
1236
+ */
1237
+ lessThan: {
1238
+ oneofKind: "lt";
1239
+ /**
1240
+ * `lt` requires the field value to be less than the specified value (field <
1241
+ * value). If the field value is equal to or greater than the specified value,
1242
+ * an error message is generated.
1243
+ *
1244
+ * ```proto
1245
+ * message MyUInt64 {
1246
+ * // value must be less than 10
1247
+ * uint64 value = 1 [(buf.validate.field).uint64.lt = 10];
1248
+ * }
1249
+ * ```
1250
+ *
1251
+ * @generated from protobuf field: uint64 lt = 2;
1252
+ */
1253
+ lt: bigint;
1254
+ } | {
1255
+ oneofKind: "lte";
1256
+ /**
1257
+ * `lte` requires the field value to be less than or equal to the specified
1258
+ * value (field <= value). If the field value is greater than the specified
1259
+ * value, an error message is generated.
1260
+ *
1261
+ * ```proto
1262
+ * message MyUInt64 {
1263
+ * // value must be less than or equal to 10
1264
+ * uint64 value = 1 [(buf.validate.field).uint64.lte = 10];
1265
+ * }
1266
+ * ```
1267
+ *
1268
+ * @generated from protobuf field: uint64 lte = 3;
1269
+ */
1270
+ lte: bigint;
1271
+ } | {
1272
+ oneofKind: undefined;
1273
+ };
1274
+ /**
1275
+ * @generated from protobuf oneof: greater_than
1276
+ */
1277
+ greaterThan: {
1278
+ oneofKind: "gt";
1279
+ /**
1280
+ * `gt` requires the field value to be greater than the specified value
1281
+ * (exclusive). If the value of `gt` is larger than a specified `lt` or
1282
+ * `lte`, the range is reversed, and the field value must be outside the
1283
+ * specified range. If the field value doesn't meet the required conditions,
1284
+ * an error message is generated.
1285
+ *
1286
+ * ```proto
1287
+ * message MyUInt64 {
1288
+ * // value must be greater than 5 [uint64.gt]
1289
+ * uint64 value = 1 [(buf.validate.field).uint64.gt = 5];
1290
+ *
1291
+ * // value must be greater than 5 and less than 10 [uint64.gt_lt]
1292
+ * uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }];
1293
+ *
1294
+ * // value must be greater than 10 or less than 5 [uint64.gt_lt_exclusive]
1295
+ * uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }];
1296
+ * }
1297
+ * ```
1298
+ *
1299
+ * @generated from protobuf field: uint64 gt = 4;
1300
+ */
1301
+ gt: bigint;
1302
+ } | {
1303
+ oneofKind: "gte";
1304
+ /**
1305
+ * `gte` requires the field value to be greater than or equal to the specified
1306
+ * value (exclusive). If the value of `gte` is larger than a specified `lt`
1307
+ * or `lte`, the range is reversed, and the field value must be outside the
1308
+ * specified range. If the field value doesn't meet the required conditions,
1309
+ * an error message is generated.
1310
+ *
1311
+ * ```proto
1312
+ * message MyUInt64 {
1313
+ * // value must be greater than or equal to 5 [uint64.gte]
1314
+ * uint64 value = 1 [(buf.validate.field).uint64.gte = 5];
1315
+ *
1316
+ * // value must be greater than or equal to 5 and less than 10 [uint64.gte_lt]
1317
+ * uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }];
1318
+ *
1319
+ * // value must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive]
1320
+ * uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }];
1321
+ * }
1322
+ * ```
1323
+ *
1324
+ * @generated from protobuf field: uint64 gte = 5;
1325
+ */
1326
+ gte: bigint;
1327
+ } | {
1328
+ oneofKind: undefined;
1329
+ };
1330
+ /**
1331
+ * `in` requires the field value to be equal to one of the specified values.
1332
+ * If the field value isn't one of the specified values, an error message is
1333
+ * generated.
1334
+ *
1335
+ * ```proto
1336
+ * message MyUInt64 {
1337
+ * // value must be in list [1, 2, 3]
1338
+ * repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] };
1339
+ * }
1340
+ * ```
1341
+ *
1342
+ * @generated from protobuf field: repeated uint64 in = 6;
1343
+ */
1344
+ in: bigint[];
1345
+ /**
1346
+ * `not_in` requires the field value to not be equal to any of the specified
1347
+ * values. If the field value is one of the specified values, an error
1348
+ * message is generated.
1349
+ *
1350
+ * ```proto
1351
+ * message MyUInt64 {
1352
+ * // value must not be in list [1, 2, 3]
1353
+ * repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] };
1354
+ * }
1355
+ * ```
1356
+ *
1357
+ * @generated from protobuf field: repeated uint64 not_in = 7;
1358
+ */
1359
+ notIn: bigint[];
1360
+ /**
1361
+ * `example` specifies values that the field may have. These values SHOULD
1362
+ * conform to other constraints. `example` values will not impact validation
1363
+ * but may be used as helpful guidance on how to populate the given field.
1364
+ *
1365
+ * ```proto
1366
+ * message MyUInt64 {
1367
+ * uint64 value = 1 [
1368
+ * (buf.validate.field).uint64.example = 1,
1369
+ * (buf.validate.field).uint64.example = -10
1370
+ * ];
1371
+ * }
1372
+ * ```
1373
+ *
1374
+ * @generated from protobuf field: repeated uint64 example = 8;
1375
+ */
1376
+ example: bigint[];
1377
+ }
1378
+ /**
1379
+ * SInt32Rules describes the constraints applied to `sint32` values.
1380
+ *
1381
+ * @generated from protobuf message buf.validate.SInt32Rules
1382
+ */
1383
+ export interface SInt32Rules {
1384
+ /**
1385
+ * `const` requires the field value to exactly match the specified value. If
1386
+ * the field value doesn't match, an error message is generated.
1387
+ *
1388
+ * ```proto
1389
+ * message MySInt32 {
1390
+ * // value must equal 42
1391
+ * sint32 value = 1 [(buf.validate.field).sint32.const = 42];
1392
+ * }
1393
+ * ```
1394
+ *
1395
+ * @generated from protobuf field: optional sint32 const = 1;
1396
+ */
1397
+ const?: number;
1398
+ /**
1399
+ * @generated from protobuf oneof: less_than
1400
+ */
1401
+ lessThan: {
1402
+ oneofKind: "lt";
1403
+ /**
1404
+ * `lt` requires the field value to be less than the specified value (field
1405
+ * < value). If the field value is equal to or greater than the specified
1406
+ * value, an error message is generated.
1407
+ *
1408
+ * ```proto
1409
+ * message MySInt32 {
1410
+ * // value must be less than 10
1411
+ * sint32 value = 1 [(buf.validate.field).sint32.lt = 10];
1412
+ * }
1413
+ * ```
1414
+ *
1415
+ * @generated from protobuf field: sint32 lt = 2;
1416
+ */
1417
+ lt: number;
1418
+ } | {
1419
+ oneofKind: "lte";
1420
+ /**
1421
+ * `lte` requires the field value to be less than or equal to the specified
1422
+ * value (field <= value). If the field value is greater than the specified
1423
+ * value, an error message is generated.
1424
+ *
1425
+ * ```proto
1426
+ * message MySInt32 {
1427
+ * // value must be less than or equal to 10
1428
+ * sint32 value = 1 [(buf.validate.field).sint32.lte = 10];
1429
+ * }
1430
+ * ```
1431
+ *
1432
+ * @generated from protobuf field: sint32 lte = 3;
1433
+ */
1434
+ lte: number;
1435
+ } | {
1436
+ oneofKind: undefined;
1437
+ };
1438
+ /**
1439
+ * @generated from protobuf oneof: greater_than
1440
+ */
1441
+ greaterThan: {
1442
+ oneofKind: "gt";
1443
+ /**
1444
+ * `gt` requires the field value to be greater than the specified value
1445
+ * (exclusive). If the value of `gt` is larger than a specified `lt` or
1446
+ * `lte`, the range is reversed, and the field value must be outside the
1447
+ * specified range. If the field value doesn't meet the required conditions,
1448
+ * an error message is generated.
1449
+ *
1450
+ * ```proto
1451
+ * message MySInt32 {
1452
+ * // value must be greater than 5 [sint32.gt]
1453
+ * sint32 value = 1 [(buf.validate.field).sint32.gt = 5];
1454
+ *
1455
+ * // value must be greater than 5 and less than 10 [sint32.gt_lt]
1456
+ * sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }];
1457
+ *
1458
+ * // value must be greater than 10 or less than 5 [sint32.gt_lt_exclusive]
1459
+ * sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }];
1460
+ * }
1461
+ * ```
1462
+ *
1463
+ * @generated from protobuf field: sint32 gt = 4;
1464
+ */
1465
+ gt: number;
1466
+ } | {
1467
+ oneofKind: "gte";
1468
+ /**
1469
+ * `gte` requires the field value to be greater than or equal to the specified
1470
+ * value (exclusive). If the value of `gte` is larger than a specified `lt`
1471
+ * or `lte`, the range is reversed, and the field value must be outside the
1472
+ * specified range. If the field value doesn't meet the required conditions,
1473
+ * an error message is generated.
1474
+ *
1475
+ * ```proto
1476
+ * message MySInt32 {
1477
+ * // value must be greater than or equal to 5 [sint32.gte]
1478
+ * sint32 value = 1 [(buf.validate.field).sint32.gte = 5];
1479
+ *
1480
+ * // value must be greater than or equal to 5 and less than 10 [sint32.gte_lt]
1481
+ * sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }];
1482
+ *
1483
+ * // value must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive]
1484
+ * sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }];
1485
+ * }
1486
+ * ```
1487
+ *
1488
+ * @generated from protobuf field: sint32 gte = 5;
1489
+ */
1490
+ gte: number;
1491
+ } | {
1492
+ oneofKind: undefined;
1493
+ };
1494
+ /**
1495
+ * `in` requires the field value to be equal to one of the specified values.
1496
+ * If the field value isn't one of the specified values, an error message is
1497
+ * generated.
1498
+ *
1499
+ * ```proto
1500
+ * message MySInt32 {
1501
+ * // value must be in list [1, 2, 3]
1502
+ * repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] };
1503
+ * }
1504
+ * ```
1505
+ *
1506
+ * @generated from protobuf field: repeated sint32 in = 6;
1507
+ */
1508
+ in: number[];
1509
+ /**
1510
+ * `not_in` requires the field value to not be equal to any of the specified
1511
+ * values. If the field value is one of the specified values, an error
1512
+ * message is generated.
1513
+ *
1514
+ * ```proto
1515
+ * message MySInt32 {
1516
+ * // value must not be in list [1, 2, 3]
1517
+ * repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] };
1518
+ * }
1519
+ * ```
1520
+ *
1521
+ * @generated from protobuf field: repeated sint32 not_in = 7;
1522
+ */
1523
+ notIn: number[];
1524
+ /**
1525
+ * `example` specifies values that the field may have. These values SHOULD
1526
+ * conform to other constraints. `example` values will not impact validation
1527
+ * but may be used as helpful guidance on how to populate the given field.
1528
+ *
1529
+ * ```proto
1530
+ * message MySInt32 {
1531
+ * sint32 value = 1 [
1532
+ * (buf.validate.field).sint32.example = 1,
1533
+ * (buf.validate.field).sint32.example = -10
1534
+ * ];
1535
+ * }
1536
+ * ```
1537
+ *
1538
+ * @generated from protobuf field: repeated sint32 example = 8;
1539
+ */
1540
+ example: number[];
1541
+ }
1542
+ /**
1543
+ * SInt64Rules describes the constraints applied to `sint64` values.
1544
+ *
1545
+ * @generated from protobuf message buf.validate.SInt64Rules
1546
+ */
1547
+ export interface SInt64Rules {
1548
+ /**
1549
+ * `const` requires the field value to exactly match the specified value. If
1550
+ * the field value doesn't match, an error message is generated.
1551
+ *
1552
+ * ```proto
1553
+ * message MySInt64 {
1554
+ * // value must equal 42
1555
+ * sint64 value = 1 [(buf.validate.field).sint64.const = 42];
1556
+ * }
1557
+ * ```
1558
+ *
1559
+ * @generated from protobuf field: optional sint64 const = 1;
1560
+ */
1561
+ const?: bigint;
1562
+ /**
1563
+ * @generated from protobuf oneof: less_than
1564
+ */
1565
+ lessThan: {
1566
+ oneofKind: "lt";
1567
+ /**
1568
+ * `lt` requires the field value to be less than the specified value (field
1569
+ * < value). If the field value is equal to or greater than the specified
1570
+ * value, an error message is generated.
1571
+ *
1572
+ * ```proto
1573
+ * message MySInt64 {
1574
+ * // value must be less than 10
1575
+ * sint64 value = 1 [(buf.validate.field).sint64.lt = 10];
1576
+ * }
1577
+ * ```
1578
+ *
1579
+ * @generated from protobuf field: sint64 lt = 2;
1580
+ */
1581
+ lt: bigint;
1582
+ } | {
1583
+ oneofKind: "lte";
1584
+ /**
1585
+ * `lte` requires the field value to be less than or equal to the specified
1586
+ * value (field <= value). If the field value is greater than the specified
1587
+ * value, an error message is generated.
1588
+ *
1589
+ * ```proto
1590
+ * message MySInt64 {
1591
+ * // value must be less than or equal to 10
1592
+ * sint64 value = 1 [(buf.validate.field).sint64.lte = 10];
1593
+ * }
1594
+ * ```
1595
+ *
1596
+ * @generated from protobuf field: sint64 lte = 3;
1597
+ */
1598
+ lte: bigint;
1599
+ } | {
1600
+ oneofKind: undefined;
1601
+ };
1602
+ /**
1603
+ * @generated from protobuf oneof: greater_than
1604
+ */
1605
+ greaterThan: {
1606
+ oneofKind: "gt";
1607
+ /**
1608
+ * `gt` requires the field value to be greater than the specified value
1609
+ * (exclusive). If the value of `gt` is larger than a specified `lt` or
1610
+ * `lte`, the range is reversed, and the field value must be outside the
1611
+ * specified range. If the field value doesn't meet the required conditions,
1612
+ * an error message is generated.
1613
+ *
1614
+ * ```proto
1615
+ * message MySInt64 {
1616
+ * // value must be greater than 5 [sint64.gt]
1617
+ * sint64 value = 1 [(buf.validate.field).sint64.gt = 5];
1618
+ *
1619
+ * // value must be greater than 5 and less than 10 [sint64.gt_lt]
1620
+ * sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }];
1621
+ *
1622
+ * // value must be greater than 10 or less than 5 [sint64.gt_lt_exclusive]
1623
+ * sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }];
1624
+ * }
1625
+ * ```
1626
+ *
1627
+ * @generated from protobuf field: sint64 gt = 4;
1628
+ */
1629
+ gt: bigint;
1630
+ } | {
1631
+ oneofKind: "gte";
1632
+ /**
1633
+ * `gte` requires the field value to be greater than or equal to the specified
1634
+ * value (exclusive). If the value of `gte` is larger than a specified `lt`
1635
+ * or `lte`, the range is reversed, and the field value must be outside the
1636
+ * specified range. If the field value doesn't meet the required conditions,
1637
+ * an error message is generated.
1638
+ *
1639
+ * ```proto
1640
+ * message MySInt64 {
1641
+ * // value must be greater than or equal to 5 [sint64.gte]
1642
+ * sint64 value = 1 [(buf.validate.field).sint64.gte = 5];
1643
+ *
1644
+ * // value must be greater than or equal to 5 and less than 10 [sint64.gte_lt]
1645
+ * sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }];
1646
+ *
1647
+ * // value must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive]
1648
+ * sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }];
1649
+ * }
1650
+ * ```
1651
+ *
1652
+ * @generated from protobuf field: sint64 gte = 5;
1653
+ */
1654
+ gte: bigint;
1655
+ } | {
1656
+ oneofKind: undefined;
1657
+ };
1658
+ /**
1659
+ * `in` requires the field value to be equal to one of the specified values.
1660
+ * If the field value isn't one of the specified values, an error message
1661
+ * is generated.
1662
+ *
1663
+ * ```proto
1664
+ * message MySInt64 {
1665
+ * // value must be in list [1, 2, 3]
1666
+ * repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] };
1667
+ * }
1668
+ * ```
1669
+ *
1670
+ * @generated from protobuf field: repeated sint64 in = 6;
1671
+ */
1672
+ in: bigint[];
1673
+ /**
1674
+ * `not_in` requires the field value to not be equal to any of the specified
1675
+ * values. If the field value is one of the specified values, an error
1676
+ * message is generated.
1677
+ *
1678
+ * ```proto
1679
+ * message MySInt64 {
1680
+ * // value must not be in list [1, 2, 3]
1681
+ * repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] };
1682
+ * }
1683
+ * ```
1684
+ *
1685
+ * @generated from protobuf field: repeated sint64 not_in = 7;
1686
+ */
1687
+ notIn: bigint[];
1688
+ /**
1689
+ * `example` specifies values that the field may have. These values SHOULD
1690
+ * conform to other constraints. `example` values will not impact validation
1691
+ * but may be used as helpful guidance on how to populate the given field.
1692
+ *
1693
+ * ```proto
1694
+ * message MySInt64 {
1695
+ * sint64 value = 1 [
1696
+ * (buf.validate.field).sint64.example = 1,
1697
+ * (buf.validate.field).sint64.example = -10
1698
+ * ];
1699
+ * }
1700
+ * ```
1701
+ *
1702
+ * @generated from protobuf field: repeated sint64 example = 8;
1703
+ */
1704
+ example: bigint[];
1705
+ }
1706
+ /**
1707
+ * Fixed32Rules describes the constraints applied to `fixed32` values.
1708
+ *
1709
+ * @generated from protobuf message buf.validate.Fixed32Rules
1710
+ */
1711
+ export interface Fixed32Rules {
1712
+ /**
1713
+ * `const` requires the field value to exactly match the specified value.
1714
+ * If the field value doesn't match, an error message is generated.
1715
+ *
1716
+ * ```proto
1717
+ * message MyFixed32 {
1718
+ * // value must equal 42
1719
+ * fixed32 value = 1 [(buf.validate.field).fixed32.const = 42];
1720
+ * }
1721
+ * ```
1722
+ *
1723
+ * @generated from protobuf field: optional fixed32 const = 1;
1724
+ */
1725
+ const?: number;
1726
+ /**
1727
+ * @generated from protobuf oneof: less_than
1728
+ */
1729
+ lessThan: {
1730
+ oneofKind: "lt";
1731
+ /**
1732
+ * `lt` requires the field value to be less than the specified value (field <
1733
+ * value). If the field value is equal to or greater than the specified value,
1734
+ * an error message is generated.
1735
+ *
1736
+ * ```proto
1737
+ * message MyFixed32 {
1738
+ * // value must be less than 10
1739
+ * fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10];
1740
+ * }
1741
+ * ```
1742
+ *
1743
+ * @generated from protobuf field: fixed32 lt = 2;
1744
+ */
1745
+ lt: number;
1746
+ } | {
1747
+ oneofKind: "lte";
1748
+ /**
1749
+ * `lte` requires the field value to be less than or equal to the specified
1750
+ * value (field <= value). If the field value is greater than the specified
1751
+ * value, an error message is generated.
1752
+ *
1753
+ * ```proto
1754
+ * message MyFixed32 {
1755
+ * // value must be less than or equal to 10
1756
+ * fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10];
1757
+ * }
1758
+ * ```
1759
+ *
1760
+ * @generated from protobuf field: fixed32 lte = 3;
1761
+ */
1762
+ lte: number;
1763
+ } | {
1764
+ oneofKind: undefined;
1765
+ };
1766
+ /**
1767
+ * @generated from protobuf oneof: greater_than
1768
+ */
1769
+ greaterThan: {
1770
+ oneofKind: "gt";
1771
+ /**
1772
+ * `gt` requires the field value to be greater than the specified value
1773
+ * (exclusive). If the value of `gt` is larger than a specified `lt` or
1774
+ * `lte`, the range is reversed, and the field value must be outside the
1775
+ * specified range. If the field value doesn't meet the required conditions,
1776
+ * an error message is generated.
1777
+ *
1778
+ * ```proto
1779
+ * message MyFixed32 {
1780
+ * // value must be greater than 5 [fixed32.gt]
1781
+ * fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5];
1782
+ *
1783
+ * // value must be greater than 5 and less than 10 [fixed32.gt_lt]
1784
+ * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }];
1785
+ *
1786
+ * // value must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive]
1787
+ * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }];
1788
+ * }
1789
+ * ```
1790
+ *
1791
+ * @generated from protobuf field: fixed32 gt = 4;
1792
+ */
1793
+ gt: number;
1794
+ } | {
1795
+ oneofKind: "gte";
1796
+ /**
1797
+ * `gte` requires the field value to be greater than or equal to the specified
1798
+ * value (exclusive). If the value of `gte` is larger than a specified `lt`
1799
+ * or `lte`, the range is reversed, and the field value must be outside the
1800
+ * specified range. If the field value doesn't meet the required conditions,
1801
+ * an error message is generated.
1802
+ *
1803
+ * ```proto
1804
+ * message MyFixed32 {
1805
+ * // value must be greater than or equal to 5 [fixed32.gte]
1806
+ * fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5];
1807
+ *
1808
+ * // value must be greater than or equal to 5 and less than 10 [fixed32.gte_lt]
1809
+ * fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }];
1810
+ *
1811
+ * // value must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive]
1812
+ * fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }];
1813
+ * }
1814
+ * ```
1815
+ *
1816
+ * @generated from protobuf field: fixed32 gte = 5;
1817
+ */
1818
+ gte: number;
1819
+ } | {
1820
+ oneofKind: undefined;
1821
+ };
1822
+ /**
1823
+ * `in` requires the field value to be equal to one of the specified values.
1824
+ * If the field value isn't one of the specified values, an error message
1825
+ * is generated.
1826
+ *
1827
+ * ```proto
1828
+ * message MyFixed32 {
1829
+ * // value must be in list [1, 2, 3]
1830
+ * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] };
1831
+ * }
1832
+ * ```
1833
+ *
1834
+ * @generated from protobuf field: repeated fixed32 in = 6;
1835
+ */
1836
+ in: number[];
1837
+ /**
1838
+ * `not_in` requires the field value to not be equal to any of the specified
1839
+ * values. If the field value is one of the specified values, an error
1840
+ * message is generated.
1841
+ *
1842
+ * ```proto
1843
+ * message MyFixed32 {
1844
+ * // value must not be in list [1, 2, 3]
1845
+ * repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] };
1846
+ * }
1847
+ * ```
1848
+ *
1849
+ * @generated from protobuf field: repeated fixed32 not_in = 7;
1850
+ */
1851
+ notIn: number[];
1852
+ /**
1853
+ * `example` specifies values that the field may have. These values SHOULD
1854
+ * conform to other constraints. `example` values will not impact validation
1855
+ * but may be used as helpful guidance on how to populate the given field.
1856
+ *
1857
+ * ```proto
1858
+ * message MyFixed32 {
1859
+ * fixed32 value = 1 [
1860
+ * (buf.validate.field).fixed32.example = 1,
1861
+ * (buf.validate.field).fixed32.example = 2
1862
+ * ];
1863
+ * }
1864
+ * ```
1865
+ *
1866
+ * @generated from protobuf field: repeated fixed32 example = 8;
1867
+ */
1868
+ example: number[];
1869
+ }
1870
+ /**
1871
+ * Fixed64Rules describes the constraints applied to `fixed64` values.
1872
+ *
1873
+ * @generated from protobuf message buf.validate.Fixed64Rules
1874
+ */
1875
+ export interface Fixed64Rules {
1876
+ /**
1877
+ * `const` requires the field value to exactly match the specified value. If
1878
+ * the field value doesn't match, an error message is generated.
1879
+ *
1880
+ * ```proto
1881
+ * message MyFixed64 {
1882
+ * // value must equal 42
1883
+ * fixed64 value = 1 [(buf.validate.field).fixed64.const = 42];
1884
+ * }
1885
+ * ```
1886
+ *
1887
+ * @generated from protobuf field: optional fixed64 const = 1;
1888
+ */
1889
+ const?: bigint;
1890
+ /**
1891
+ * @generated from protobuf oneof: less_than
1892
+ */
1893
+ lessThan: {
1894
+ oneofKind: "lt";
1895
+ /**
1896
+ * `lt` requires the field value to be less than the specified value (field <
1897
+ * value). If the field value is equal to or greater than the specified value,
1898
+ * an error message is generated.
1899
+ *
1900
+ * ```proto
1901
+ * message MyFixed64 {
1902
+ * // value must be less than 10
1903
+ * fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10];
1904
+ * }
1905
+ * ```
1906
+ *
1907
+ * @generated from protobuf field: fixed64 lt = 2;
1908
+ */
1909
+ lt: bigint;
1910
+ } | {
1911
+ oneofKind: "lte";
1912
+ /**
1913
+ * `lte` requires the field value to be less than or equal to the specified
1914
+ * value (field <= value). If the field value is greater than the specified
1915
+ * value, an error message is generated.
1916
+ *
1917
+ * ```proto
1918
+ * message MyFixed64 {
1919
+ * // value must be less than or equal to 10
1920
+ * fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10];
1921
+ * }
1922
+ * ```
1923
+ *
1924
+ * @generated from protobuf field: fixed64 lte = 3;
1925
+ */
1926
+ lte: bigint;
1927
+ } | {
1928
+ oneofKind: undefined;
1929
+ };
1930
+ /**
1931
+ * @generated from protobuf oneof: greater_than
1932
+ */
1933
+ greaterThan: {
1934
+ oneofKind: "gt";
1935
+ /**
1936
+ * `gt` requires the field value to be greater than the specified value
1937
+ * (exclusive). If the value of `gt` is larger than a specified `lt` or
1938
+ * `lte`, the range is reversed, and the field value must be outside the
1939
+ * specified range. If the field value doesn't meet the required conditions,
1940
+ * an error message is generated.
1941
+ *
1942
+ * ```proto
1943
+ * message MyFixed64 {
1944
+ * // value must be greater than 5 [fixed64.gt]
1945
+ * fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5];
1946
+ *
1947
+ * // value must be greater than 5 and less than 10 [fixed64.gt_lt]
1948
+ * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }];
1949
+ *
1950
+ * // value must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive]
1951
+ * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }];
1952
+ * }
1953
+ * ```
1954
+ *
1955
+ * @generated from protobuf field: fixed64 gt = 4;
1956
+ */
1957
+ gt: bigint;
1958
+ } | {
1959
+ oneofKind: "gte";
1960
+ /**
1961
+ * `gte` requires the field value to be greater than or equal to the specified
1962
+ * value (exclusive). If the value of `gte` is larger than a specified `lt`
1963
+ * or `lte`, the range is reversed, and the field value must be outside the
1964
+ * specified range. If the field value doesn't meet the required conditions,
1965
+ * an error message is generated.
1966
+ *
1967
+ * ```proto
1968
+ * message MyFixed64 {
1969
+ * // value must be greater than or equal to 5 [fixed64.gte]
1970
+ * fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5];
1971
+ *
1972
+ * // value must be greater than or equal to 5 and less than 10 [fixed64.gte_lt]
1973
+ * fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }];
1974
+ *
1975
+ * // value must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive]
1976
+ * fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }];
1977
+ * }
1978
+ * ```
1979
+ *
1980
+ * @generated from protobuf field: fixed64 gte = 5;
1981
+ */
1982
+ gte: bigint;
1983
+ } | {
1984
+ oneofKind: undefined;
1985
+ };
1986
+ /**
1987
+ * `in` requires the field value to be equal to one of the specified values.
1988
+ * If the field value isn't one of the specified values, an error message is
1989
+ * generated.
1990
+ *
1991
+ * ```proto
1992
+ * message MyFixed64 {
1993
+ * // value must be in list [1, 2, 3]
1994
+ * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] };
1995
+ * }
1996
+ * ```
1997
+ *
1998
+ * @generated from protobuf field: repeated fixed64 in = 6;
1999
+ */
2000
+ in: bigint[];
2001
+ /**
2002
+ * `not_in` requires the field value to not be equal to any of the specified
2003
+ * values. If the field value is one of the specified values, an error
2004
+ * message is generated.
2005
+ *
2006
+ * ```proto
2007
+ * message MyFixed64 {
2008
+ * // value must not be in list [1, 2, 3]
2009
+ * repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] };
2010
+ * }
2011
+ * ```
2012
+ *
2013
+ * @generated from protobuf field: repeated fixed64 not_in = 7;
2014
+ */
2015
+ notIn: bigint[];
2016
+ /**
2017
+ * `example` specifies values that the field may have. These values SHOULD
2018
+ * conform to other constraints. `example` values will not impact validation
2019
+ * but may be used as helpful guidance on how to populate the given field.
2020
+ *
2021
+ * ```proto
2022
+ * message MyFixed64 {
2023
+ * fixed64 value = 1 [
2024
+ * (buf.validate.field).fixed64.example = 1,
2025
+ * (buf.validate.field).fixed64.example = 2
2026
+ * ];
2027
+ * }
2028
+ * ```
2029
+ *
2030
+ * @generated from protobuf field: repeated fixed64 example = 8;
2031
+ */
2032
+ example: bigint[];
2033
+ }
2034
+ /**
2035
+ * SFixed32Rules describes the constraints applied to `fixed32` values.
2036
+ *
2037
+ * @generated from protobuf message buf.validate.SFixed32Rules
2038
+ */
2039
+ export interface SFixed32Rules {
2040
+ /**
2041
+ * `const` requires the field value to exactly match the specified value. If
2042
+ * the field value doesn't match, an error message is generated.
2043
+ *
2044
+ * ```proto
2045
+ * message MySFixed32 {
2046
+ * // value must equal 42
2047
+ * sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42];
2048
+ * }
2049
+ * ```
2050
+ *
2051
+ * @generated from protobuf field: optional sfixed32 const = 1;
2052
+ */
2053
+ const?: number;
2054
+ /**
2055
+ * @generated from protobuf oneof: less_than
2056
+ */
2057
+ lessThan: {
2058
+ oneofKind: "lt";
2059
+ /**
2060
+ * `lt` requires the field value to be less than the specified value (field <
2061
+ * value). If the field value is equal to or greater than the specified value,
2062
+ * an error message is generated.
2063
+ *
2064
+ * ```proto
2065
+ * message MySFixed32 {
2066
+ * // value must be less than 10
2067
+ * sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10];
2068
+ * }
2069
+ * ```
2070
+ *
2071
+ * @generated from protobuf field: sfixed32 lt = 2;
2072
+ */
2073
+ lt: number;
2074
+ } | {
2075
+ oneofKind: "lte";
2076
+ /**
2077
+ * `lte` requires the field value to be less than or equal to the specified
2078
+ * value (field <= value). If the field value is greater than the specified
2079
+ * value, an error message is generated.
2080
+ *
2081
+ * ```proto
2082
+ * message MySFixed32 {
2083
+ * // value must be less than or equal to 10
2084
+ * sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10];
2085
+ * }
2086
+ * ```
2087
+ *
2088
+ * @generated from protobuf field: sfixed32 lte = 3;
2089
+ */
2090
+ lte: number;
2091
+ } | {
2092
+ oneofKind: undefined;
2093
+ };
2094
+ /**
2095
+ * @generated from protobuf oneof: greater_than
2096
+ */
2097
+ greaterThan: {
2098
+ oneofKind: "gt";
2099
+ /**
2100
+ * `gt` requires the field value to be greater than the specified value
2101
+ * (exclusive). If the value of `gt` is larger than a specified `lt` or
2102
+ * `lte`, the range is reversed, and the field value must be outside the
2103
+ * specified range. If the field value doesn't meet the required conditions,
2104
+ * an error message is generated.
2105
+ *
2106
+ * ```proto
2107
+ * message MySFixed32 {
2108
+ * // value must be greater than 5 [sfixed32.gt]
2109
+ * sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5];
2110
+ *
2111
+ * // value must be greater than 5 and less than 10 [sfixed32.gt_lt]
2112
+ * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }];
2113
+ *
2114
+ * // value must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive]
2115
+ * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }];
2116
+ * }
2117
+ * ```
2118
+ *
2119
+ * @generated from protobuf field: sfixed32 gt = 4;
2120
+ */
2121
+ gt: number;
2122
+ } | {
2123
+ oneofKind: "gte";
2124
+ /**
2125
+ * `gte` requires the field value to be greater than or equal to the specified
2126
+ * value (exclusive). If the value of `gte` is larger than a specified `lt`
2127
+ * or `lte`, the range is reversed, and the field value must be outside the
2128
+ * specified range. If the field value doesn't meet the required conditions,
2129
+ * an error message is generated.
2130
+ *
2131
+ * ```proto
2132
+ * message MySFixed32 {
2133
+ * // value must be greater than or equal to 5 [sfixed32.gte]
2134
+ * sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5];
2135
+ *
2136
+ * // value must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt]
2137
+ * sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }];
2138
+ *
2139
+ * // value must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive]
2140
+ * sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }];
2141
+ * }
2142
+ * ```
2143
+ *
2144
+ * @generated from protobuf field: sfixed32 gte = 5;
2145
+ */
2146
+ gte: number;
2147
+ } | {
2148
+ oneofKind: undefined;
2149
+ };
2150
+ /**
2151
+ * `in` requires the field value to be equal to one of the specified values.
2152
+ * If the field value isn't one of the specified values, an error message is
2153
+ * generated.
2154
+ *
2155
+ * ```proto
2156
+ * message MySFixed32 {
2157
+ * // value must be in list [1, 2, 3]
2158
+ * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] };
2159
+ * }
2160
+ * ```
2161
+ *
2162
+ * @generated from protobuf field: repeated sfixed32 in = 6;
2163
+ */
2164
+ in: number[];
2165
+ /**
2166
+ * `not_in` requires the field value to not be equal to any of the specified
2167
+ * values. If the field value is one of the specified values, an error
2168
+ * message is generated.
2169
+ *
2170
+ * ```proto
2171
+ * message MySFixed32 {
2172
+ * // value must not be in list [1, 2, 3]
2173
+ * repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] };
2174
+ * }
2175
+ * ```
2176
+ *
2177
+ * @generated from protobuf field: repeated sfixed32 not_in = 7;
2178
+ */
2179
+ notIn: number[];
2180
+ /**
2181
+ * `example` specifies values that the field may have. These values SHOULD
2182
+ * conform to other constraints. `example` values will not impact validation
2183
+ * but may be used as helpful guidance on how to populate the given field.
2184
+ *
2185
+ * ```proto
2186
+ * message MySFixed32 {
2187
+ * sfixed32 value = 1 [
2188
+ * (buf.validate.field).sfixed32.example = 1,
2189
+ * (buf.validate.field).sfixed32.example = 2
2190
+ * ];
2191
+ * }
2192
+ * ```
2193
+ *
2194
+ * @generated from protobuf field: repeated sfixed32 example = 8;
2195
+ */
2196
+ example: number[];
2197
+ }
2198
+ /**
2199
+ * SFixed64Rules describes the constraints applied to `fixed64` values.
2200
+ *
2201
+ * @generated from protobuf message buf.validate.SFixed64Rules
2202
+ */
2203
+ export interface SFixed64Rules {
2204
+ /**
2205
+ * `const` requires the field value to exactly match the specified value. If
2206
+ * the field value doesn't match, an error message is generated.
2207
+ *
2208
+ * ```proto
2209
+ * message MySFixed64 {
2210
+ * // value must equal 42
2211
+ * sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42];
2212
+ * }
2213
+ * ```
2214
+ *
2215
+ * @generated from protobuf field: optional sfixed64 const = 1;
2216
+ */
2217
+ const?: bigint;
2218
+ /**
2219
+ * @generated from protobuf oneof: less_than
2220
+ */
2221
+ lessThan: {
2222
+ oneofKind: "lt";
2223
+ /**
2224
+ * `lt` requires the field value to be less than the specified value (field <
2225
+ * value). If the field value is equal to or greater than the specified value,
2226
+ * an error message is generated.
2227
+ *
2228
+ * ```proto
2229
+ * message MySFixed64 {
2230
+ * // value must be less than 10
2231
+ * sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10];
2232
+ * }
2233
+ * ```
2234
+ *
2235
+ * @generated from protobuf field: sfixed64 lt = 2;
2236
+ */
2237
+ lt: bigint;
2238
+ } | {
2239
+ oneofKind: "lte";
2240
+ /**
2241
+ * `lte` requires the field value to be less than or equal to the specified
2242
+ * value (field <= value). If the field value is greater than the specified
2243
+ * value, an error message is generated.
2244
+ *
2245
+ * ```proto
2246
+ * message MySFixed64 {
2247
+ * // value must be less than or equal to 10
2248
+ * sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10];
2249
+ * }
2250
+ * ```
2251
+ *
2252
+ * @generated from protobuf field: sfixed64 lte = 3;
2253
+ */
2254
+ lte: bigint;
2255
+ } | {
2256
+ oneofKind: undefined;
2257
+ };
2258
+ /**
2259
+ * @generated from protobuf oneof: greater_than
2260
+ */
2261
+ greaterThan: {
2262
+ oneofKind: "gt";
2263
+ /**
2264
+ * `gt` requires the field value to be greater than the specified value
2265
+ * (exclusive). If the value of `gt` is larger than a specified `lt` or
2266
+ * `lte`, the range is reversed, and the field value must be outside the
2267
+ * specified range. If the field value doesn't meet the required conditions,
2268
+ * an error message is generated.
2269
+ *
2270
+ * ```proto
2271
+ * message MySFixed64 {
2272
+ * // value must be greater than 5 [sfixed64.gt]
2273
+ * sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5];
2274
+ *
2275
+ * // value must be greater than 5 and less than 10 [sfixed64.gt_lt]
2276
+ * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }];
2277
+ *
2278
+ * // value must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive]
2279
+ * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }];
2280
+ * }
2281
+ * ```
2282
+ *
2283
+ * @generated from protobuf field: sfixed64 gt = 4;
2284
+ */
2285
+ gt: bigint;
2286
+ } | {
2287
+ oneofKind: "gte";
2288
+ /**
2289
+ * `gte` requires the field value to be greater than or equal to the specified
2290
+ * value (exclusive). If the value of `gte` is larger than a specified `lt`
2291
+ * or `lte`, the range is reversed, and the field value must be outside the
2292
+ * specified range. If the field value doesn't meet the required conditions,
2293
+ * an error message is generated.
2294
+ *
2295
+ * ```proto
2296
+ * message MySFixed64 {
2297
+ * // value must be greater than or equal to 5 [sfixed64.gte]
2298
+ * sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5];
2299
+ *
2300
+ * // value must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt]
2301
+ * sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }];
2302
+ *
2303
+ * // value must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive]
2304
+ * sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }];
2305
+ * }
2306
+ * ```
2307
+ *
2308
+ * @generated from protobuf field: sfixed64 gte = 5;
2309
+ */
2310
+ gte: bigint;
2311
+ } | {
2312
+ oneofKind: undefined;
2313
+ };
2314
+ /**
2315
+ * `in` requires the field value to be equal to one of the specified values.
2316
+ * If the field value isn't one of the specified values, an error message is
2317
+ * generated.
2318
+ *
2319
+ * ```proto
2320
+ * message MySFixed64 {
2321
+ * // value must be in list [1, 2, 3]
2322
+ * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] };
2323
+ * }
2324
+ * ```
2325
+ *
2326
+ * @generated from protobuf field: repeated sfixed64 in = 6;
2327
+ */
2328
+ in: bigint[];
2329
+ /**
2330
+ * `not_in` requires the field value to not be equal to any of the specified
2331
+ * values. If the field value is one of the specified values, an error
2332
+ * message is generated.
2333
+ *
2334
+ * ```proto
2335
+ * message MySFixed64 {
2336
+ * // value must not be in list [1, 2, 3]
2337
+ * repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] };
2338
+ * }
2339
+ * ```
2340
+ *
2341
+ * @generated from protobuf field: repeated sfixed64 not_in = 7;
2342
+ */
2343
+ notIn: bigint[];
2344
+ /**
2345
+ * `example` specifies values that the field may have. These values SHOULD
2346
+ * conform to other constraints. `example` values will not impact validation
2347
+ * but may be used as helpful guidance on how to populate the given field.
2348
+ *
2349
+ * ```proto
2350
+ * message MySFixed64 {
2351
+ * sfixed64 value = 1 [
2352
+ * (buf.validate.field).sfixed64.example = 1,
2353
+ * (buf.validate.field).sfixed64.example = 2
2354
+ * ];
2355
+ * }
2356
+ * ```
2357
+ *
2358
+ * @generated from protobuf field: repeated sfixed64 example = 8;
2359
+ */
2360
+ example: bigint[];
2361
+ }
2362
+ /**
2363
+ * BoolRules describes the constraints applied to `bool` values. These rules
2364
+ * may also be applied to the `google.protobuf.BoolValue` Well-Known-Type.
2365
+ *
2366
+ * @generated from protobuf message buf.validate.BoolRules
2367
+ */
2368
+ export interface BoolRules {
2369
+ /**
2370
+ * `const` requires the field value to exactly match the specified boolean value.
2371
+ * If the field value doesn't match, an error message is generated.
2372
+ *
2373
+ * ```proto
2374
+ * message MyBool {
2375
+ * // value must equal true
2376
+ * bool value = 1 [(buf.validate.field).bool.const = true];
2377
+ * }
2378
+ * ```
2379
+ *
2380
+ * @generated from protobuf field: optional bool const = 1;
2381
+ */
2382
+ const?: boolean;
2383
+ /**
2384
+ * `example` specifies values that the field may have. These values SHOULD
2385
+ * conform to other constraints. `example` values will not impact validation
2386
+ * but may be used as helpful guidance on how to populate the given field.
2387
+ *
2388
+ * ```proto
2389
+ * message MyBool {
2390
+ * bool value = 1 [
2391
+ * (buf.validate.field).bool.example = 1,
2392
+ * (buf.validate.field).bool.example = 2
2393
+ * ];
2394
+ * }
2395
+ * ```
2396
+ *
2397
+ * @generated from protobuf field: repeated bool example = 2;
2398
+ */
2399
+ example: boolean[];
2400
+ }
2401
+ /**
2402
+ * StringRules describes the constraints applied to `string` values These
2403
+ * rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type.
2404
+ *
2405
+ * @generated from protobuf message buf.validate.StringRules
2406
+ */
2407
+ export interface StringRules {
2408
+ /**
2409
+ * `const` requires the field value to exactly match the specified value. If
2410
+ * the field value doesn't match, an error message is generated.
2411
+ *
2412
+ * ```proto
2413
+ * message MyString {
2414
+ * // value must equal `hello`
2415
+ * string value = 1 [(buf.validate.field).string.const = "hello"];
2416
+ * }
2417
+ * ```
2418
+ *
2419
+ * @generated from protobuf field: optional string const = 1;
2420
+ */
2421
+ const?: string;
2422
+ /**
2423
+ * `len` dictates that the field value must have the specified
2424
+ * number of characters (Unicode code points), which may differ from the number
2425
+ * of bytes in the string. If the field value does not meet the specified
2426
+ * length, an error message will be generated.
2427
+ *
2428
+ * ```proto
2429
+ * message MyString {
2430
+ * // value length must be 5 characters
2431
+ * string value = 1 [(buf.validate.field).string.len = 5];
2432
+ * }
2433
+ * ```
2434
+ *
2435
+ * @generated from protobuf field: optional uint64 len = 19;
2436
+ */
2437
+ len?: bigint;
2438
+ /**
2439
+ * `min_len` specifies that the field value must have at least the specified
2440
+ * number of characters (Unicode code points), which may differ from the number
2441
+ * of bytes in the string. If the field value contains fewer characters, an error
2442
+ * message will be generated.
2443
+ *
2444
+ * ```proto
2445
+ * message MyString {
2446
+ * // value length must be at least 3 characters
2447
+ * string value = 1 [(buf.validate.field).string.min_len = 3];
2448
+ * }
2449
+ * ```
2450
+ *
2451
+ * @generated from protobuf field: optional uint64 min_len = 2;
2452
+ */
2453
+ minLen?: bigint;
2454
+ /**
2455
+ * `max_len` specifies that the field value must have no more than the specified
2456
+ * number of characters (Unicode code points), which may differ from the
2457
+ * number of bytes in the string. If the field value contains more characters,
2458
+ * an error message will be generated.
2459
+ *
2460
+ * ```proto
2461
+ * message MyString {
2462
+ * // value length must be at most 10 characters
2463
+ * string value = 1 [(buf.validate.field).string.max_len = 10];
2464
+ * }
2465
+ * ```
2466
+ *
2467
+ * @generated from protobuf field: optional uint64 max_len = 3;
2468
+ */
2469
+ maxLen?: bigint;
2470
+ /**
2471
+ * `len_bytes` dictates that the field value must have the specified number of
2472
+ * bytes. If the field value does not match the specified length in bytes,
2473
+ * an error message will be generated.
2474
+ *
2475
+ * ```proto
2476
+ * message MyString {
2477
+ * // value length must be 6 bytes
2478
+ * string value = 1 [(buf.validate.field).string.len_bytes = 6];
2479
+ * }
2480
+ * ```
2481
+ *
2482
+ * @generated from protobuf field: optional uint64 len_bytes = 20;
2483
+ */
2484
+ lenBytes?: bigint;
2485
+ /**
2486
+ * `min_bytes` specifies that the field value must have at least the specified
2487
+ * number of bytes. If the field value contains fewer bytes, an error message
2488
+ * will be generated.
2489
+ *
2490
+ * ```proto
2491
+ * message MyString {
2492
+ * // value length must be at least 4 bytes
2493
+ * string value = 1 [(buf.validate.field).string.min_bytes = 4];
2494
+ * }
2495
+ *
2496
+ * ```
2497
+ *
2498
+ * @generated from protobuf field: optional uint64 min_bytes = 4;
2499
+ */
2500
+ minBytes?: bigint;
2501
+ /**
2502
+ * `max_bytes` specifies that the field value must have no more than the
2503
+ * specified number of bytes. If the field value contains more bytes, an
2504
+ * error message will be generated.
2505
+ *
2506
+ * ```proto
2507
+ * message MyString {
2508
+ * // value length must be at most 8 bytes
2509
+ * string value = 1 [(buf.validate.field).string.max_bytes = 8];
2510
+ * }
2511
+ * ```
2512
+ *
2513
+ * @generated from protobuf field: optional uint64 max_bytes = 5;
2514
+ */
2515
+ maxBytes?: bigint;
2516
+ /**
2517
+ * `pattern` specifies that the field value must match the specified
2518
+ * regular expression (RE2 syntax), with the expression provided without any
2519
+ * delimiters. If the field value doesn't match the regular expression, an
2520
+ * error message will be generated.
2521
+ *
2522
+ * ```proto
2523
+ * message MyString {
2524
+ * // value does not match regex pattern `^[a-zA-Z]//$`
2525
+ * string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"];
2526
+ * }
2527
+ * ```
2528
+ *
2529
+ * @generated from protobuf field: optional string pattern = 6;
2530
+ */
2531
+ pattern?: string;
2532
+ /**
2533
+ * `prefix` specifies that the field value must have the
2534
+ * specified substring at the beginning of the string. If the field value
2535
+ * doesn't start with the specified prefix, an error message will be
2536
+ * generated.
2537
+ *
2538
+ * ```proto
2539
+ * message MyString {
2540
+ * // value does not have prefix `pre`
2541
+ * string value = 1 [(buf.validate.field).string.prefix = "pre"];
2542
+ * }
2543
+ * ```
2544
+ *
2545
+ * @generated from protobuf field: optional string prefix = 7;
2546
+ */
2547
+ prefix?: string;
2548
+ /**
2549
+ * `suffix` specifies that the field value must have the
2550
+ * specified substring at the end of the string. If the field value doesn't
2551
+ * end with the specified suffix, an error message will be generated.
2552
+ *
2553
+ * ```proto
2554
+ * message MyString {
2555
+ * // value does not have suffix `post`
2556
+ * string value = 1 [(buf.validate.field).string.suffix = "post"];
2557
+ * }
2558
+ * ```
2559
+ *
2560
+ * @generated from protobuf field: optional string suffix = 8;
2561
+ */
2562
+ suffix?: string;
2563
+ /**
2564
+ * `contains` specifies that the field value must have the
2565
+ * specified substring anywhere in the string. If the field value doesn't
2566
+ * contain the specified substring, an error message will be generated.
2567
+ *
2568
+ * ```proto
2569
+ * message MyString {
2570
+ * // value does not contain substring `inside`.
2571
+ * string value = 1 [(buf.validate.field).string.contains = "inside"];
2572
+ * }
2573
+ * ```
2574
+ *
2575
+ * @generated from protobuf field: optional string contains = 9;
2576
+ */
2577
+ contains?: string;
2578
+ /**
2579
+ * `not_contains` specifies that the field value must not have the
2580
+ * specified substring anywhere in the string. If the field value contains
2581
+ * the specified substring, an error message will be generated.
2582
+ *
2583
+ * ```proto
2584
+ * message MyString {
2585
+ * // value contains substring `inside`.
2586
+ * string value = 1 [(buf.validate.field).string.not_contains = "inside"];
2587
+ * }
2588
+ * ```
2589
+ *
2590
+ * @generated from protobuf field: optional string not_contains = 23;
2591
+ */
2592
+ notContains?: string;
2593
+ /**
2594
+ * `in` specifies that the field value must be equal to one of the specified
2595
+ * values. If the field value isn't one of the specified values, an error
2596
+ * message will be generated.
2597
+ *
2598
+ * ```proto
2599
+ * message MyString {
2600
+ * // value must be in list ["apple", "banana"]
2601
+ * repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
2602
+ * }
2603
+ * ```
2604
+ *
2605
+ * @generated from protobuf field: repeated string in = 10;
2606
+ */
2607
+ in: string[];
2608
+ /**
2609
+ * `not_in` specifies that the field value cannot be equal to any
2610
+ * of the specified values. If the field value is one of the specified values,
2611
+ * an error message will be generated.
2612
+ * ```proto
2613
+ * message MyString {
2614
+ * // value must not be in list ["orange", "grape"]
2615
+ * repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
2616
+ * }
2617
+ * ```
2618
+ *
2619
+ * @generated from protobuf field: repeated string not_in = 11;
2620
+ */
2621
+ notIn: string[];
2622
+ /**
2623
+ * @generated from protobuf oneof: well_known
2624
+ */
2625
+ wellKnown: {
2626
+ oneofKind: "email";
2627
+ /**
2628
+ * `email` specifies that the field value must be a valid email address
2629
+ * (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1).
2630
+ * If the field value isn't a valid email address, an error message will be generated.
2631
+ *
2632
+ * ```proto
2633
+ * message MyString {
2634
+ * // value must be a valid email address
2635
+ * string value = 1 [(buf.validate.field).string.email = true];
2636
+ * }
2637
+ * ```
2638
+ *
2639
+ * @generated from protobuf field: bool email = 12;
2640
+ */
2641
+ email: boolean;
2642
+ } | {
2643
+ oneofKind: "hostname";
2644
+ /**
2645
+ * `hostname` specifies that the field value must be a valid
2646
+ * hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5). This constraint doesn't support
2647
+ * internationalized domain names (IDNs). If the field value isn't a
2648
+ * valid hostname, an error message will be generated.
2649
+ *
2650
+ * ```proto
2651
+ * message MyString {
2652
+ * // value must be a valid hostname
2653
+ * string value = 1 [(buf.validate.field).string.hostname = true];
2654
+ * }
2655
+ * ```
2656
+ *
2657
+ * @generated from protobuf field: bool hostname = 13;
2658
+ */
2659
+ hostname: boolean;
2660
+ } | {
2661
+ oneofKind: "ip";
2662
+ /**
2663
+ * `ip` specifies that the field value must be a valid IP
2664
+ * (v4 or v6) address, without surrounding square brackets for IPv6 addresses.
2665
+ * If the field value isn't a valid IP address, an error message will be
2666
+ * generated.
2667
+ *
2668
+ * ```proto
2669
+ * message MyString {
2670
+ * // value must be a valid IP address
2671
+ * string value = 1 [(buf.validate.field).string.ip = true];
2672
+ * }
2673
+ * ```
2674
+ *
2675
+ * @generated from protobuf field: bool ip = 14;
2676
+ */
2677
+ ip: boolean;
2678
+ } | {
2679
+ oneofKind: "ipv4";
2680
+ /**
2681
+ * `ipv4` specifies that the field value must be a valid IPv4
2682
+ * address. If the field value isn't a valid IPv4 address, an error message
2683
+ * will be generated.
2684
+ *
2685
+ * ```proto
2686
+ * message MyString {
2687
+ * // value must be a valid IPv4 address
2688
+ * string value = 1 [(buf.validate.field).string.ipv4 = true];
2689
+ * }
2690
+ * ```
2691
+ *
2692
+ * @generated from protobuf field: bool ipv4 = 15;
2693
+ */
2694
+ ipv4: boolean;
2695
+ } | {
2696
+ oneofKind: "ipv6";
2697
+ /**
2698
+ * `ipv6` specifies that the field value must be a valid
2699
+ * IPv6 address, without surrounding square brackets. If the field value is
2700
+ * not a valid IPv6 address, an error message will be generated.
2701
+ *
2702
+ * ```proto
2703
+ * message MyString {
2704
+ * // value must be a valid IPv6 address
2705
+ * string value = 1 [(buf.validate.field).string.ipv6 = true];
2706
+ * }
2707
+ * ```
2708
+ *
2709
+ * @generated from protobuf field: bool ipv6 = 16;
2710
+ */
2711
+ ipv6: boolean;
2712
+ } | {
2713
+ oneofKind: "uri";
2714
+ /**
2715
+ * `uri` specifies that the field value must be a valid,
2716
+ * absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3). If the field value isn't a valid,
2717
+ * absolute URI, an error message will be generated.
2718
+ *
2719
+ * ```proto
2720
+ * message MyString {
2721
+ * // value must be a valid URI
2722
+ * string value = 1 [(buf.validate.field).string.uri = true];
2723
+ * }
2724
+ * ```
2725
+ *
2726
+ * @generated from protobuf field: bool uri = 17;
2727
+ */
2728
+ uri: boolean;
2729
+ } | {
2730
+ oneofKind: "uriRef";
2731
+ /**
2732
+ * `uri_ref` specifies that the field value must be a valid URI
2733
+ * as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute. If the
2734
+ * field value isn't a valid URI, an error message will be generated.
2735
+ *
2736
+ * ```proto
2737
+ * message MyString {
2738
+ * // value must be a valid URI
2739
+ * string value = 1 [(buf.validate.field).string.uri_ref = true];
2740
+ * }
2741
+ * ```
2742
+ *
2743
+ * @generated from protobuf field: bool uri_ref = 18;
2744
+ */
2745
+ uriRef: boolean;
2746
+ } | {
2747
+ oneofKind: "address";
2748
+ /**
2749
+ * `address` specifies that the field value must be either a valid hostname
2750
+ * as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5)
2751
+ * (which doesn't support internationalized domain names or IDNs) or a valid
2752
+ * IP (v4 or v6). If the field value isn't a valid hostname or IP, an error
2753
+ * message will be generated.
2754
+ *
2755
+ * ```proto
2756
+ * message MyString {
2757
+ * // value must be a valid hostname, or ip address
2758
+ * string value = 1 [(buf.validate.field).string.address = true];
2759
+ * }
2760
+ * ```
2761
+ *
2762
+ * @generated from protobuf field: bool address = 21;
2763
+ */
2764
+ address: boolean;
2765
+ } | {
2766
+ oneofKind: "uuid";
2767
+ /**
2768
+ * `uuid` specifies that the field value must be a valid UUID as defined by
2769
+ * [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2). If the
2770
+ * field value isn't a valid UUID, an error message will be generated.
2771
+ *
2772
+ * ```proto
2773
+ * message MyString {
2774
+ * // value must be a valid UUID
2775
+ * string value = 1 [(buf.validate.field).string.uuid = true];
2776
+ * }
2777
+ * ```
2778
+ *
2779
+ * @generated from protobuf field: bool uuid = 22;
2780
+ */
2781
+ uuid: boolean;
2782
+ } | {
2783
+ oneofKind: "tuuid";
2784
+ /**
2785
+ * `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as
2786
+ * defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes
2787
+ * omitted. If the field value isn't a valid UUID without dashes, an error message
2788
+ * will be generated.
2789
+ *
2790
+ * ```proto
2791
+ * message MyString {
2792
+ * // value must be a valid trimmed UUID
2793
+ * string value = 1 [(buf.validate.field).string.tuuid = true];
2794
+ * }
2795
+ * ```
2796
+ *
2797
+ * @generated from protobuf field: bool tuuid = 33;
2798
+ */
2799
+ tuuid: boolean;
2800
+ } | {
2801
+ oneofKind: "ipWithPrefixlen";
2802
+ /**
2803
+ * `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
2804
+ * address with prefix length. If the field value isn't a valid IP with prefix
2805
+ * length, an error message will be generated.
2806
+ *
2807
+ *
2808
+ * ```proto
2809
+ * message MyString {
2810
+ * // value must be a valid IP with prefix length
2811
+ * string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true];
2812
+ * }
2813
+ * ```
2814
+ *
2815
+ * @generated from protobuf field: bool ip_with_prefixlen = 26;
2816
+ */
2817
+ ipWithPrefixlen: boolean;
2818
+ } | {
2819
+ oneofKind: "ipv4WithPrefixlen";
2820
+ /**
2821
+ * `ipv4_with_prefixlen` specifies that the field value must be a valid
2822
+ * IPv4 address with prefix.
2823
+ * If the field value isn't a valid IPv4 address with prefix length,
2824
+ * an error message will be generated.
2825
+ *
2826
+ * ```proto
2827
+ * message MyString {
2828
+ * // value must be a valid IPv4 address with prefix length
2829
+ * string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true];
2830
+ * }
2831
+ * ```
2832
+ *
2833
+ * @generated from protobuf field: bool ipv4_with_prefixlen = 27;
2834
+ */
2835
+ ipv4WithPrefixlen: boolean;
2836
+ } | {
2837
+ oneofKind: "ipv6WithPrefixlen";
2838
+ /**
2839
+ * `ipv6_with_prefixlen` specifies that the field value must be a valid
2840
+ * IPv6 address with prefix length.
2841
+ * If the field value is not a valid IPv6 address with prefix length,
2842
+ * an error message will be generated.
2843
+ *
2844
+ * ```proto
2845
+ * message MyString {
2846
+ * // value must be a valid IPv6 address prefix length
2847
+ * string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true];
2848
+ * }
2849
+ * ```
2850
+ *
2851
+ * @generated from protobuf field: bool ipv6_with_prefixlen = 28;
2852
+ */
2853
+ ipv6WithPrefixlen: boolean;
2854
+ } | {
2855
+ oneofKind: "ipPrefix";
2856
+ /**
2857
+ * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
2858
+ * If the field value isn't a valid IP prefix, an error message will be
2859
+ * generated. The prefix must have all zeros for the masked bits of the prefix (e.g.,
2860
+ * `127.0.0.0/16`, not `127.0.0.1/16`).
2861
+ *
2862
+ * ```proto
2863
+ * message MyString {
2864
+ * // value must be a valid IP prefix
2865
+ * string value = 1 [(buf.validate.field).string.ip_prefix = true];
2866
+ * }
2867
+ * ```
2868
+ *
2869
+ * @generated from protobuf field: bool ip_prefix = 29;
2870
+ */
2871
+ ipPrefix: boolean;
2872
+ } | {
2873
+ oneofKind: "ipv4Prefix";
2874
+ /**
2875
+ * `ipv4_prefix` specifies that the field value must be a valid IPv4
2876
+ * prefix. If the field value isn't a valid IPv4 prefix, an error message
2877
+ * will be generated. The prefix must have all zeros for the masked bits of
2878
+ * the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`).
2879
+ *
2880
+ * ```proto
2881
+ * message MyString {
2882
+ * // value must be a valid IPv4 prefix
2883
+ * string value = 1 [(buf.validate.field).string.ipv4_prefix = true];
2884
+ * }
2885
+ * ```
2886
+ *
2887
+ * @generated from protobuf field: bool ipv4_prefix = 30;
2888
+ */
2889
+ ipv4Prefix: boolean;
2890
+ } | {
2891
+ oneofKind: "ipv6Prefix";
2892
+ /**
2893
+ * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
2894
+ * If the field value is not a valid IPv6 prefix, an error message will be
2895
+ * generated. The prefix must have all zeros for the masked bits of the prefix
2896
+ * (e.g., `2001:db8::/48`, not `2001:db8::1/48`).
2897
+ *
2898
+ * ```proto
2899
+ * message MyString {
2900
+ * // value must be a valid IPv6 prefix
2901
+ * string value = 1 [(buf.validate.field).string.ipv6_prefix = true];
2902
+ * }
2903
+ * ```
2904
+ *
2905
+ * @generated from protobuf field: bool ipv6_prefix = 31;
2906
+ */
2907
+ ipv6Prefix: boolean;
2908
+ } | {
2909
+ oneofKind: "hostAndPort";
2910
+ /**
2911
+ * `host_and_port` specifies the field value must be a valid host and port
2912
+ * pair. The host must be a valid hostname or IP address while the port
2913
+ * must be in the range of 0-65535, inclusive. IPv6 addresses must be delimited
2914
+ * with square brackets (e.g., `[::1]:1234`).
2915
+ *
2916
+ * @generated from protobuf field: bool host_and_port = 32;
2917
+ */
2918
+ hostAndPort: boolean;
2919
+ } | {
2920
+ oneofKind: "wellKnownRegex";
2921
+ /**
2922
+ * `well_known_regex` specifies a common well-known pattern
2923
+ * defined as a regex. If the field value doesn't match the well-known
2924
+ * regex, an error message will be generated.
2925
+ *
2926
+ * ```proto
2927
+ * message MyString {
2928
+ * // value must be a valid HTTP header value
2929
+ * string value = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_VALUE];
2930
+ * }
2931
+ * ```
2932
+ *
2933
+ * #### KnownRegex
2934
+ *
2935
+ * `well_known_regex` contains some well-known patterns.
2936
+ *
2937
+ * | Name | Number | Description |
2938
+ * |-------------------------------|--------|-------------------------------------------|
2939
+ * | KNOWN_REGEX_UNSPECIFIED | 0 | |
2940
+ * | KNOWN_REGEX_HTTP_HEADER_NAME | 1 | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2) |
2941
+ * | KNOWN_REGEX_HTTP_HEADER_VALUE | 2 | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) |
2942
+ *
2943
+ * @generated from protobuf field: buf.validate.KnownRegex well_known_regex = 24;
2944
+ */
2945
+ wellKnownRegex: KnownRegex;
2946
+ } | {
2947
+ oneofKind: undefined;
2948
+ };
2949
+ /**
2950
+ * This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to
2951
+ * enable strict header validation. By default, this is true, and HTTP header
2952
+ * validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser
2953
+ * validations that only disallow `\r\n\0` characters, which can be used to
2954
+ * bypass header matching rules.
2955
+ *
2956
+ * ```proto
2957
+ * message MyString {
2958
+ * // The field `value` must have be a valid HTTP headers, but not enforced with strict rules.
2959
+ * string value = 1 [(buf.validate.field).string.strict = false];
2960
+ * }
2961
+ * ```
2962
+ *
2963
+ * @generated from protobuf field: optional bool strict = 25;
2964
+ */
2965
+ strict?: boolean;
2966
+ /**
2967
+ * `example` specifies values that the field may have. These values SHOULD
2968
+ * conform to other constraints. `example` values will not impact validation
2969
+ * but may be used as helpful guidance on how to populate the given field.
2970
+ *
2971
+ * ```proto
2972
+ * message MyString {
2973
+ * string value = 1 [
2974
+ * (buf.validate.field).string.example = 1,
2975
+ * (buf.validate.field).string.example = 2
2976
+ * ];
2977
+ * }
2978
+ * ```
2979
+ *
2980
+ * @generated from protobuf field: repeated string example = 34;
2981
+ */
2982
+ example: string[];
2983
+ }
2984
+ /**
2985
+ * BytesRules describe the constraints applied to `bytes` values. These rules
2986
+ * may also be applied to the `google.protobuf.BytesValue` Well-Known-Type.
2987
+ *
2988
+ * @generated from protobuf message buf.validate.BytesRules
2989
+ */
2990
+ export interface BytesRules {
2991
+ /**
2992
+ * `const` requires the field value to exactly match the specified bytes
2993
+ * value. If the field value doesn't match, an error message is generated.
2994
+ *
2995
+ * ```proto
2996
+ * message MyBytes {
2997
+ * // value must be "\x01\x02\x03\x04"
2998
+ * bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"];
2999
+ * }
3000
+ * ```
3001
+ *
3002
+ * @generated from protobuf field: optional bytes const = 1;
3003
+ */
3004
+ const?: Uint8Array;
3005
+ /**
3006
+ * `len` requires the field value to have the specified length in bytes.
3007
+ * If the field value doesn't match, an error message is generated.
3008
+ *
3009
+ * ```proto
3010
+ * message MyBytes {
3011
+ * // value length must be 4 bytes.
3012
+ * optional bytes value = 1 [(buf.validate.field).bytes.len = 4];
3013
+ * }
3014
+ * ```
3015
+ *
3016
+ * @generated from protobuf field: optional uint64 len = 13;
3017
+ */
3018
+ len?: bigint;
3019
+ /**
3020
+ * `min_len` requires the field value to have at least the specified minimum
3021
+ * length in bytes.
3022
+ * If the field value doesn't meet the requirement, an error message is generated.
3023
+ *
3024
+ * ```proto
3025
+ * message MyBytes {
3026
+ * // value length must be at least 2 bytes.
3027
+ * optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2];
3028
+ * }
3029
+ * ```
3030
+ *
3031
+ * @generated from protobuf field: optional uint64 min_len = 2;
3032
+ */
3033
+ minLen?: bigint;
3034
+ /**
3035
+ * `max_len` requires the field value to have at most the specified maximum
3036
+ * length in bytes.
3037
+ * If the field value exceeds the requirement, an error message is generated.
3038
+ *
3039
+ * ```proto
3040
+ * message MyBytes {
3041
+ * // value must be at most 6 bytes.
3042
+ * optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6];
3043
+ * }
3044
+ * ```
3045
+ *
3046
+ * @generated from protobuf field: optional uint64 max_len = 3;
3047
+ */
3048
+ maxLen?: bigint;
3049
+ /**
3050
+ * `pattern` requires the field value to match the specified regular
3051
+ * expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
3052
+ * The value of the field must be valid UTF-8 or validation will fail with a
3053
+ * runtime error.
3054
+ * If the field value doesn't match the pattern, an error message is generated.
3055
+ *
3056
+ * ```proto
3057
+ * message MyBytes {
3058
+ * // value must match regex pattern "^[a-zA-Z0-9]+$".
3059
+ * optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"];
3060
+ * }
3061
+ * ```
3062
+ *
3063
+ * @generated from protobuf field: optional string pattern = 4;
3064
+ */
3065
+ pattern?: string;
3066
+ /**
3067
+ * `prefix` requires the field value to have the specified bytes at the
3068
+ * beginning of the string.
3069
+ * If the field value doesn't meet the requirement, an error message is generated.
3070
+ *
3071
+ * ```proto
3072
+ * message MyBytes {
3073
+ * // value does not have prefix \x01\x02
3074
+ * optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"];
3075
+ * }
3076
+ * ```
3077
+ *
3078
+ * @generated from protobuf field: optional bytes prefix = 5;
3079
+ */
3080
+ prefix?: Uint8Array;
3081
+ /**
3082
+ * `suffix` requires the field value to have the specified bytes at the end
3083
+ * of the string.
3084
+ * If the field value doesn't meet the requirement, an error message is generated.
3085
+ *
3086
+ * ```proto
3087
+ * message MyBytes {
3088
+ * // value does not have suffix \x03\x04
3089
+ * optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"];
3090
+ * }
3091
+ * ```
3092
+ *
3093
+ * @generated from protobuf field: optional bytes suffix = 6;
3094
+ */
3095
+ suffix?: Uint8Array;
3096
+ /**
3097
+ * `contains` requires the field value to have the specified bytes anywhere in
3098
+ * the string.
3099
+ * If the field value doesn't meet the requirement, an error message is generated.
3100
+ *
3101
+ * ```protobuf
3102
+ * message MyBytes {
3103
+ * // value does not contain \x02\x03
3104
+ * optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"];
3105
+ * }
3106
+ * ```
3107
+ *
3108
+ * @generated from protobuf field: optional bytes contains = 7;
3109
+ */
3110
+ contains?: Uint8Array;
3111
+ /**
3112
+ * `in` requires the field value to be equal to one of the specified
3113
+ * values. If the field value doesn't match any of the specified values, an
3114
+ * error message is generated.
3115
+ *
3116
+ * ```protobuf
3117
+ * message MyBytes {
3118
+ * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
3119
+ * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
3120
+ * }
3121
+ * ```
3122
+ *
3123
+ * @generated from protobuf field: repeated bytes in = 8;
3124
+ */
3125
+ in: Uint8Array[];
3126
+ /**
3127
+ * `not_in` requires the field value to be not equal to any of the specified
3128
+ * values.
3129
+ * If the field value matches any of the specified values, an error message is
3130
+ * generated.
3131
+ *
3132
+ * ```proto
3133
+ * message MyBytes {
3134
+ * // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"]
3135
+ * optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
3136
+ * }
3137
+ * ```
3138
+ *
3139
+ * @generated from protobuf field: repeated bytes not_in = 9;
3140
+ */
3141
+ notIn: Uint8Array[];
3142
+ /**
3143
+ * @generated from protobuf oneof: well_known
3144
+ */
3145
+ wellKnown: {
3146
+ oneofKind: "ip";
3147
+ /**
3148
+ * `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.
3149
+ * If the field value doesn't meet this constraint, an error message is generated.
3150
+ *
3151
+ * ```proto
3152
+ * message MyBytes {
3153
+ * // value must be a valid IP address
3154
+ * optional bytes value = 1 [(buf.validate.field).bytes.ip = true];
3155
+ * }
3156
+ * ```
3157
+ *
3158
+ * @generated from protobuf field: bool ip = 10;
3159
+ */
3160
+ ip: boolean;
3161
+ } | {
3162
+ oneofKind: "ipv4";
3163
+ /**
3164
+ * `ipv4` ensures that the field `value` is a valid IPv4 address in byte format.
3165
+ * If the field value doesn't meet this constraint, an error message is generated.
3166
+ *
3167
+ * ```proto
3168
+ * message MyBytes {
3169
+ * // value must be a valid IPv4 address
3170
+ * optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true];
3171
+ * }
3172
+ * ```
3173
+ *
3174
+ * @generated from protobuf field: bool ipv4 = 11;
3175
+ */
3176
+ ipv4: boolean;
3177
+ } | {
3178
+ oneofKind: "ipv6";
3179
+ /**
3180
+ * `ipv6` ensures that the field `value` is a valid IPv6 address in byte format.
3181
+ * If the field value doesn't meet this constraint, an error message is generated.
3182
+ * ```proto
3183
+ * message MyBytes {
3184
+ * // value must be a valid IPv6 address
3185
+ * optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true];
3186
+ * }
3187
+ * ```
3188
+ *
3189
+ * @generated from protobuf field: bool ipv6 = 12;
3190
+ */
3191
+ ipv6: boolean;
3192
+ } | {
3193
+ oneofKind: undefined;
3194
+ };
3195
+ /**
3196
+ * `example` specifies values that the field may have. These values SHOULD
3197
+ * conform to other constraints. `example` values will not impact validation
3198
+ * but may be used as helpful guidance on how to populate the given field.
3199
+ *
3200
+ * ```proto
3201
+ * message MyBytes {
3202
+ * bytes value = 1 [
3203
+ * (buf.validate.field).bytes.example = "\x01\x02",
3204
+ * (buf.validate.field).bytes.example = "\x02\x03"
3205
+ * ];
3206
+ * }
3207
+ * ```
3208
+ *
3209
+ * @generated from protobuf field: repeated bytes example = 14;
3210
+ */
3211
+ example: Uint8Array[];
3212
+ }
3213
+ /**
3214
+ * EnumRules describe the constraints applied to `enum` values.
3215
+ *
3216
+ * @generated from protobuf message buf.validate.EnumRules
3217
+ */
3218
+ export interface EnumRules {
3219
+ /**
3220
+ * `const` requires the field value to exactly match the specified enum value.
3221
+ * If the field value doesn't match, an error message is generated.
3222
+ *
3223
+ * ```proto
3224
+ * enum MyEnum {
3225
+ * MY_ENUM_UNSPECIFIED = 0;
3226
+ * MY_ENUM_VALUE1 = 1;
3227
+ * MY_ENUM_VALUE2 = 2;
3228
+ * }
3229
+ *
3230
+ * message MyMessage {
3231
+ * // The field `value` must be exactly MY_ENUM_VALUE1.
3232
+ * MyEnum value = 1 [(buf.validate.field).enum.const = 1];
3233
+ * }
3234
+ * ```
3235
+ *
3236
+ * @generated from protobuf field: optional int32 const = 1;
3237
+ */
3238
+ const?: number;
3239
+ /**
3240
+ * `defined_only` requires the field value to be one of the defined values for
3241
+ * this enum, failing on any undefined value.
3242
+ *
3243
+ * ```proto
3244
+ * enum MyEnum {
3245
+ * MY_ENUM_UNSPECIFIED = 0;
3246
+ * MY_ENUM_VALUE1 = 1;
3247
+ * MY_ENUM_VALUE2 = 2;
3248
+ * }
3249
+ *
3250
+ * message MyMessage {
3251
+ * // The field `value` must be a defined value of MyEnum.
3252
+ * MyEnum value = 1 [(buf.validate.field).enum.defined_only = true];
3253
+ * }
3254
+ * ```
3255
+ *
3256
+ * @generated from protobuf field: optional bool defined_only = 2;
3257
+ */
3258
+ definedOnly?: boolean;
3259
+ /**
3260
+ * `in` requires the field value to be equal to one of the
3261
+ * specified enum values. If the field value doesn't match any of the
3262
+ * specified values, an error message is generated.
3263
+ *
3264
+ * ```proto
3265
+ * enum MyEnum {
3266
+ * MY_ENUM_UNSPECIFIED = 0;
3267
+ * MY_ENUM_VALUE1 = 1;
3268
+ * MY_ENUM_VALUE2 = 2;
3269
+ * }
3270
+ *
3271
+ * message MyMessage {
3272
+ * // The field `value` must be equal to one of the specified values.
3273
+ * MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
3274
+ * }
3275
+ * ```
3276
+ *
3277
+ * @generated from protobuf field: repeated int32 in = 3;
3278
+ */
3279
+ in: number[];
3280
+ /**
3281
+ * `not_in` requires the field value to be not equal to any of the
3282
+ * specified enum values. If the field value matches one of the specified
3283
+ * values, an error message is generated.
3284
+ *
3285
+ * ```proto
3286
+ * enum MyEnum {
3287
+ * MY_ENUM_UNSPECIFIED = 0;
3288
+ * MY_ENUM_VALUE1 = 1;
3289
+ * MY_ENUM_VALUE2 = 2;
3290
+ * }
3291
+ *
3292
+ * message MyMessage {
3293
+ * // The field `value` must not be equal to any of the specified values.
3294
+ * MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
3295
+ * }
3296
+ * ```
3297
+ *
3298
+ * @generated from protobuf field: repeated int32 not_in = 4;
3299
+ */
3300
+ notIn: number[];
3301
+ /**
3302
+ * `example` specifies values that the field may have. These values SHOULD
3303
+ * conform to other constraints. `example` values will not impact validation
3304
+ * but may be used as helpful guidance on how to populate the given field.
3305
+ *
3306
+ * ```proto
3307
+ * enum MyEnum {
3308
+ * MY_ENUM_UNSPECIFIED = 0;
3309
+ * MY_ENUM_VALUE1 = 1;
3310
+ * MY_ENUM_VALUE2 = 2;
3311
+ * }
3312
+ *
3313
+ * message MyMessage {
3314
+ * (buf.validate.field).enum.example = 1,
3315
+ * (buf.validate.field).enum.example = 2
3316
+ * }
3317
+ * ```
3318
+ *
3319
+ * @generated from protobuf field: repeated int32 example = 5;
3320
+ */
3321
+ example: number[];
3322
+ }
3323
+ /**
3324
+ * RepeatedRules describe the constraints applied to `repeated` values.
3325
+ *
3326
+ * @generated from protobuf message buf.validate.RepeatedRules
3327
+ */
3328
+ export interface RepeatedRules {
3329
+ /**
3330
+ * `min_items` requires that this field must contain at least the specified
3331
+ * minimum number of items.
3332
+ *
3333
+ * Note that `min_items = 1` is equivalent to setting a field as `required`.
3334
+ *
3335
+ * ```proto
3336
+ * message MyRepeated {
3337
+ * // value must contain at least 2 items
3338
+ * repeated string value = 1 [(buf.validate.field).repeated.min_items = 2];
3339
+ * }
3340
+ * ```
3341
+ *
3342
+ * @generated from protobuf field: optional uint64 min_items = 1;
3343
+ */
3344
+ minItems?: bigint;
3345
+ /**
3346
+ * `max_items` denotes that this field must not exceed a
3347
+ * certain number of items as the upper limit. If the field contains more
3348
+ * items than specified, an error message will be generated, requiring the
3349
+ * field to maintain no more than the specified number of items.
3350
+ *
3351
+ * ```proto
3352
+ * message MyRepeated {
3353
+ * // value must contain no more than 3 item(s)
3354
+ * repeated string value = 1 [(buf.validate.field).repeated.max_items = 3];
3355
+ * }
3356
+ * ```
3357
+ *
3358
+ * @generated from protobuf field: optional uint64 max_items = 2;
3359
+ */
3360
+ maxItems?: bigint;
3361
+ /**
3362
+ * `unique` indicates that all elements in this field must
3363
+ * be unique. This constraint is strictly applicable to scalar and enum
3364
+ * types, with message types not being supported.
3365
+ *
3366
+ * ```proto
3367
+ * message MyRepeated {
3368
+ * // repeated value must contain unique items
3369
+ * repeated string value = 1 [(buf.validate.field).repeated.unique = true];
3370
+ * }
3371
+ * ```
3372
+ *
3373
+ * @generated from protobuf field: optional bool unique = 3;
3374
+ */
3375
+ unique?: boolean;
3376
+ /**
3377
+ * `items` details the constraints to be applied to each item
3378
+ * in the field. Even for repeated message fields, validation is executed
3379
+ * against each item unless skip is explicitly specified.
3380
+ *
3381
+ * ```proto
3382
+ * message MyRepeated {
3383
+ * // The items in the field `value` must follow the specified constraints.
3384
+ * repeated string value = 1 [(buf.validate.field).repeated.items = {
3385
+ * string: {
3386
+ * min_len: 3
3387
+ * max_len: 10
3388
+ * }
3389
+ * }];
3390
+ * }
3391
+ * ```
3392
+ *
3393
+ * @generated from protobuf field: optional buf.validate.FieldConstraints items = 4;
3394
+ */
3395
+ items?: FieldConstraints;
3396
+ }
3397
+ /**
3398
+ * MapRules describe the constraints applied to `map` values.
3399
+ *
3400
+ * @generated from protobuf message buf.validate.MapRules
3401
+ */
3402
+ export interface MapRules {
3403
+ /**
3404
+ * Specifies the minimum number of key-value pairs allowed. If the field has
3405
+ * fewer key-value pairs than specified, an error message is generated.
3406
+ *
3407
+ * ```proto
3408
+ * message MyMap {
3409
+ * // The field `value` must have at least 2 key-value pairs.
3410
+ * map<string, string> value = 1 [(buf.validate.field).map.min_pairs = 2];
3411
+ * }
3412
+ * ```
3413
+ *
3414
+ * @generated from protobuf field: optional uint64 min_pairs = 1;
3415
+ */
3416
+ minPairs?: bigint;
3417
+ /**
3418
+ * Specifies the maximum number of key-value pairs allowed. If the field has
3419
+ * more key-value pairs than specified, an error message is generated.
3420
+ *
3421
+ * ```proto
3422
+ * message MyMap {
3423
+ * // The field `value` must have at most 3 key-value pairs.
3424
+ * map<string, string> value = 1 [(buf.validate.field).map.max_pairs = 3];
3425
+ * }
3426
+ * ```
3427
+ *
3428
+ * @generated from protobuf field: optional uint64 max_pairs = 2;
3429
+ */
3430
+ maxPairs?: bigint;
3431
+ /**
3432
+ * Specifies the constraints to be applied to each key in the field.
3433
+ *
3434
+ * ```proto
3435
+ * message MyMap {
3436
+ * // The keys in the field `value` must follow the specified constraints.
3437
+ * map<string, string> value = 1 [(buf.validate.field).map.keys = {
3438
+ * string: {
3439
+ * min_len: 3
3440
+ * max_len: 10
3441
+ * }
3442
+ * }];
3443
+ * }
3444
+ * ```
3445
+ *
3446
+ * @generated from protobuf field: optional buf.validate.FieldConstraints keys = 4;
3447
+ */
3448
+ keys?: FieldConstraints;
3449
+ /**
3450
+ * Specifies the constraints to be applied to the value of each key in the
3451
+ * field. Message values will still have their validations evaluated unless
3452
+ * skip is specified here.
3453
+ *
3454
+ * ```proto
3455
+ * message MyMap {
3456
+ * // The values in the field `value` must follow the specified constraints.
3457
+ * map<string, string> value = 1 [(buf.validate.field).map.values = {
3458
+ * string: {
3459
+ * min_len: 5
3460
+ * max_len: 20
3461
+ * }
3462
+ * }];
3463
+ * }
3464
+ * ```
3465
+ *
3466
+ * @generated from protobuf field: optional buf.validate.FieldConstraints values = 5;
3467
+ */
3468
+ values?: FieldConstraints;
3469
+ }
3470
+ /**
3471
+ * AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type.
3472
+ *
3473
+ * @generated from protobuf message buf.validate.AnyRules
3474
+ */
3475
+ export interface AnyRules {
3476
+ /**
3477
+ * `in` requires the field's `type_url` to be equal to one of the
3478
+ * specified values. If it doesn't match any of the specified values, an error
3479
+ * message is generated.
3480
+ *
3481
+ * ```proto
3482
+ * message MyAny {
3483
+ * // The `value` field must have a `type_url` equal to one of the specified values.
3484
+ * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
3485
+ * }
3486
+ * ```
3487
+ *
3488
+ * @generated from protobuf field: repeated string in = 2;
3489
+ */
3490
+ in: string[];
3491
+ /**
3492
+ * requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.
3493
+ *
3494
+ * ```proto
3495
+ * message MyAny {
3496
+ * // The field `value` must not have a `type_url` equal to any of the specified values.
3497
+ * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
3498
+ * }
3499
+ * ```
3500
+ *
3501
+ * @generated from protobuf field: repeated string not_in = 3;
3502
+ */
3503
+ notIn: string[];
3504
+ }
3505
+ /**
3506
+ * DurationRules describe the constraints applied exclusively to the `google.protobuf.Duration` well-known type.
3507
+ *
3508
+ * @generated from protobuf message buf.validate.DurationRules
3509
+ */
3510
+ export interface DurationRules {
3511
+ /**
3512
+ * `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
3513
+ * If the field's value deviates from the specified value, an error message
3514
+ * will be generated.
3515
+ *
3516
+ * ```proto
3517
+ * message MyDuration {
3518
+ * // value must equal 5s
3519
+ * google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
3520
+ * }
3521
+ * ```
3522
+ *
3523
+ * @generated from protobuf field: optional google.protobuf.Duration const = 2;
3524
+ */
3525
+ const?: Duration;
3526
+ /**
3527
+ * @generated from protobuf oneof: less_than
3528
+ */
3529
+ lessThan: {
3530
+ oneofKind: "lt";
3531
+ /**
3532
+ * `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
3533
+ * exclusive. If the field's value is greater than or equal to the specified
3534
+ * value, an error message will be generated.
3535
+ *
3536
+ * ```proto
3537
+ * message MyDuration {
3538
+ * // value must be less than 5s
3539
+ * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
3540
+ * }
3541
+ * ```
3542
+ *
3543
+ * @generated from protobuf field: google.protobuf.Duration lt = 3;
3544
+ */
3545
+ lt: Duration;
3546
+ } | {
3547
+ oneofKind: "lte";
3548
+ /**
3549
+ * `lte` indicates that the field must be less than or equal to the specified
3550
+ * value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
3551
+ * an error message will be generated.
3552
+ *
3553
+ * ```proto
3554
+ * message MyDuration {
3555
+ * // value must be less than or equal to 10s
3556
+ * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
3557
+ * }
3558
+ * ```
3559
+ *
3560
+ * @generated from protobuf field: google.protobuf.Duration lte = 4;
3561
+ */
3562
+ lte: Duration;
3563
+ } | {
3564
+ oneofKind: undefined;
3565
+ };
3566
+ /**
3567
+ * @generated from protobuf oneof: greater_than
3568
+ */
3569
+ greaterThan: {
3570
+ oneofKind: "gt";
3571
+ /**
3572
+ * `gt` requires the duration field value to be greater than the specified
3573
+ * value (exclusive). If the value of `gt` is larger than a specified `lt`
3574
+ * or `lte`, the range is reversed, and the field value must be outside the
3575
+ * specified range. If the field value doesn't meet the required conditions,
3576
+ * an error message is generated.
3577
+ *
3578
+ * ```proto
3579
+ * message MyDuration {
3580
+ * // duration must be greater than 5s [duration.gt]
3581
+ * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];
3582
+ *
3583
+ * // duration must be greater than 5s and less than 10s [duration.gt_lt]
3584
+ * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];
3585
+ *
3586
+ * // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
3587
+ * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
3588
+ * }
3589
+ * ```
3590
+ *
3591
+ * @generated from protobuf field: google.protobuf.Duration gt = 5;
3592
+ */
3593
+ gt: Duration;
3594
+ } | {
3595
+ oneofKind: "gte";
3596
+ /**
3597
+ * `gte` requires the duration field value to be greater than or equal to the
3598
+ * specified value (exclusive). If the value of `gte` is larger than a
3599
+ * specified `lt` or `lte`, the range is reversed, and the field value must
3600
+ * be outside the specified range. If the field value doesn't meet the
3601
+ * required conditions, an error message is generated.
3602
+ *
3603
+ * ```proto
3604
+ * message MyDuration {
3605
+ * // duration must be greater than or equal to 5s [duration.gte]
3606
+ * google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];
3607
+ *
3608
+ * // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
3609
+ * google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];
3610
+ *
3611
+ * // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
3612
+ * google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
3613
+ * }
3614
+ * ```
3615
+ *
3616
+ * @generated from protobuf field: google.protobuf.Duration gte = 6;
3617
+ */
3618
+ gte: Duration;
3619
+ } | {
3620
+ oneofKind: undefined;
3621
+ };
3622
+ /**
3623
+ * `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
3624
+ * If the field's value doesn't correspond to any of the specified values,
3625
+ * an error message will be generated.
3626
+ *
3627
+ * ```proto
3628
+ * message MyDuration {
3629
+ * // value must be in list [1s, 2s, 3s]
3630
+ * google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
3631
+ * }
3632
+ * ```
3633
+ *
3634
+ * @generated from protobuf field: repeated google.protobuf.Duration in = 7;
3635
+ */
3636
+ in: Duration[];
3637
+ /**
3638
+ * `not_in` denotes that the field must not be equal to
3639
+ * any of the specified values of the `google.protobuf.Duration` type.
3640
+ * If the field's value matches any of these values, an error message will be
3641
+ * generated.
3642
+ *
3643
+ * ```proto
3644
+ * message MyDuration {
3645
+ * // value must not be in list [1s, 2s, 3s]
3646
+ * google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
3647
+ * }
3648
+ * ```
3649
+ *
3650
+ * @generated from protobuf field: repeated google.protobuf.Duration not_in = 8;
3651
+ */
3652
+ notIn: Duration[];
3653
+ /**
3654
+ * `example` specifies values that the field may have. These values SHOULD
3655
+ * conform to other constraints. `example` values will not impact validation
3656
+ * but may be used as helpful guidance on how to populate the given field.
3657
+ *
3658
+ * ```proto
3659
+ * message MyDuration {
3660
+ * google.protobuf.Duration value = 1 [
3661
+ * (buf.validate.field).duration.example = { seconds: 1 },
3662
+ * (buf.validate.field).duration.example = { seconds: 2 },
3663
+ * ];
3664
+ * }
3665
+ * ```
3666
+ *
3667
+ * @generated from protobuf field: repeated google.protobuf.Duration example = 9;
3668
+ */
3669
+ example: Duration[];
3670
+ }
3671
+ /**
3672
+ * TimestampRules describe the constraints applied exclusively to the `google.protobuf.Timestamp` well-known type.
3673
+ *
3674
+ * @generated from protobuf message buf.validate.TimestampRules
3675
+ */
3676
+ export interface TimestampRules {
3677
+ /**
3678
+ * `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.
3679
+ *
3680
+ * ```proto
3681
+ * message MyTimestamp {
3682
+ * // value must equal 2023-05-03T10:00:00Z
3683
+ * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
3684
+ * }
3685
+ * ```
3686
+ *
3687
+ * @generated from protobuf field: optional google.protobuf.Timestamp const = 2;
3688
+ */
3689
+ const?: Timestamp;
3690
+ /**
3691
+ * @generated from protobuf oneof: less_than
3692
+ */
3693
+ lessThan: {
3694
+ oneofKind: "lt";
3695
+ /**
3696
+ * requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.
3697
+ *
3698
+ * ```proto
3699
+ * message MyDuration {
3700
+ * // duration must be less than 'P3D' [duration.lt]
3701
+ * google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
3702
+ * }
3703
+ * ```
3704
+ *
3705
+ * @generated from protobuf field: google.protobuf.Timestamp lt = 3;
3706
+ */
3707
+ lt: Timestamp;
3708
+ } | {
3709
+ oneofKind: "lte";
3710
+ /**
3711
+ * requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.
3712
+ *
3713
+ * ```proto
3714
+ * message MyTimestamp {
3715
+ * // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
3716
+ * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
3717
+ * }
3718
+ * ```
3719
+ *
3720
+ * @generated from protobuf field: google.protobuf.Timestamp lte = 4;
3721
+ */
3722
+ lte: Timestamp;
3723
+ } | {
3724
+ oneofKind: "ltNow";
3725
+ /**
3726
+ * `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.
3727
+ *
3728
+ * ```proto
3729
+ * message MyTimestamp {
3730
+ * // value must be less than now
3731
+ * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
3732
+ * }
3733
+ * ```
3734
+ *
3735
+ * @generated from protobuf field: bool lt_now = 7;
3736
+ */
3737
+ ltNow: boolean;
3738
+ } | {
3739
+ oneofKind: undefined;
3740
+ };
3741
+ /**
3742
+ * @generated from protobuf oneof: greater_than
3743
+ */
3744
+ greaterThan: {
3745
+ oneofKind: "gt";
3746
+ /**
3747
+ * `gt` requires the timestamp field value to be greater than the specified
3748
+ * value (exclusive). If the value of `gt` is larger than a specified `lt`
3749
+ * or `lte`, the range is reversed, and the field value must be outside the
3750
+ * specified range. If the field value doesn't meet the required conditions,
3751
+ * an error message is generated.
3752
+ *
3753
+ * ```proto
3754
+ * message MyTimestamp {
3755
+ * // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
3756
+ * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];
3757
+ *
3758
+ * // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
3759
+ * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
3760
+ *
3761
+ * // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
3762
+ * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
3763
+ * }
3764
+ * ```
3765
+ *
3766
+ * @generated from protobuf field: google.protobuf.Timestamp gt = 5;
3767
+ */
3768
+ gt: Timestamp;
3769
+ } | {
3770
+ oneofKind: "gte";
3771
+ /**
3772
+ * `gte` requires the timestamp field value to be greater than or equal to the
3773
+ * specified value (exclusive). If the value of `gte` is larger than a
3774
+ * specified `lt` or `lte`, the range is reversed, and the field value
3775
+ * must be outside the specified range. If the field value doesn't meet
3776
+ * the required conditions, an error message is generated.
3777
+ *
3778
+ * ```proto
3779
+ * message MyTimestamp {
3780
+ * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
3781
+ * google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];
3782
+ *
3783
+ * // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
3784
+ * google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];
3785
+ *
3786
+ * // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
3787
+ * google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
3788
+ * }
3789
+ * ```
3790
+ *
3791
+ * @generated from protobuf field: google.protobuf.Timestamp gte = 6;
3792
+ */
3793
+ gte: Timestamp;
3794
+ } | {
3795
+ oneofKind: "gtNow";
3796
+ /**
3797
+ * `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule.
3798
+ *
3799
+ * ```proto
3800
+ * message MyTimestamp {
3801
+ * // value must be greater than now
3802
+ * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true];
3803
+ * }
3804
+ * ```
3805
+ *
3806
+ * @generated from protobuf field: bool gt_now = 8;
3807
+ */
3808
+ gtNow: boolean;
3809
+ } | {
3810
+ oneofKind: undefined;
3811
+ };
3812
+ /**
3813
+ * `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.
3814
+ *
3815
+ * ```proto
3816
+ * message MyTimestamp {
3817
+ * // value must be within 1 hour of now
3818
+ * google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
3819
+ * }
3820
+ * ```
3821
+ *
3822
+ * @generated from protobuf field: optional google.protobuf.Duration within = 9;
3823
+ */
3824
+ within?: Duration;
3825
+ /**
3826
+ * @generated from protobuf field: repeated google.protobuf.Timestamp example = 10;
3827
+ */
3828
+ example: Timestamp[];
3829
+ }
3830
+ /**
3831
+ * `Violations` is a collection of `Violation` messages. This message type is returned by
3832
+ * protovalidate when a proto message fails to meet the requirements set by the `Constraint` validation rules.
3833
+ * Each individual violation is represented by a `Violation` message.
3834
+ *
3835
+ * @generated from protobuf message buf.validate.Violations
3836
+ */
3837
+ export interface Violations {
3838
+ /**
3839
+ * `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected.
3840
+ *
3841
+ * @generated from protobuf field: repeated buf.validate.Violation violations = 1;
3842
+ */
3843
+ violations: Violation[];
3844
+ }
3845
+ /**
3846
+ * `Violation` represents a single instance where a validation rule, expressed
3847
+ * as a `Constraint`, was not met. It provides information about the field that
3848
+ * caused the violation, the specific constraint that wasn't fulfilled, and a
3849
+ * human-readable error message.
3850
+ *
3851
+ * ```json
3852
+ * {
3853
+ * "fieldPath": "bar",
3854
+ * "constraintId": "foo.bar",
3855
+ * "message": "bar must be greater than 0"
3856
+ * }
3857
+ * ```
3858
+ *
3859
+ * @generated from protobuf message buf.validate.Violation
3860
+ */
3861
+ export interface Violation {
3862
+ /**
3863
+ * `field_path` is a machine-readable identifier that points to the specific field that failed the validation.
3864
+ * This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation.
3865
+ *
3866
+ * @generated from protobuf field: optional string field_path = 1;
3867
+ */
3868
+ fieldPath?: string;
3869
+ /**
3870
+ * `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.
3871
+ * This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated.
3872
+ *
3873
+ * @generated from protobuf field: optional string constraint_id = 2;
3874
+ */
3875
+ constraintId?: string;
3876
+ /**
3877
+ * `message` is a human-readable error message that describes the nature of the violation.
3878
+ * This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation.
3879
+ *
3880
+ * @generated from protobuf field: optional string message = 3;
3881
+ */
3882
+ message?: string;
3883
+ /**
3884
+ * `for_key` indicates whether the violation was caused by a map key, rather than a value.
3885
+ *
3886
+ * @generated from protobuf field: optional bool for_key = 4;
3887
+ */
3888
+ forKey?: boolean;
3889
+ }
3890
+ /**
3891
+ * Specifies how FieldConstraints.ignore behaves. See the documentation for
3892
+ * FieldConstraints.required for definitions of "populated" and "nullable".
3893
+ *
3894
+ * @generated from protobuf enum buf.validate.Ignore
3895
+ */
3896
+ export declare enum Ignore {
3897
+ /**
3898
+ * Validation is only skipped if it's an unpopulated nullable fields.
3899
+ *
3900
+ * ```proto
3901
+ * syntax="proto3";
3902
+ *
3903
+ * message Request {
3904
+ * // The uri rule applies to any value, including the empty string.
3905
+ * string foo = 1 [
3906
+ * (buf.validate.field).string.uri = true
3907
+ * ];
3908
+ *
3909
+ * // The uri rule only applies if the field is set, including if it's
3910
+ * // set to the empty string.
3911
+ * optional string bar = 2 [
3912
+ * (buf.validate.field).string.uri = true
3913
+ * ];
3914
+ *
3915
+ * // The min_items rule always applies, even if the list is empty.
3916
+ * repeated string baz = 3 [
3917
+ * (buf.validate.field).repeated.min_items = 3
3918
+ * ];
3919
+ *
3920
+ * // The custom CEL rule applies only if the field is set, including if
3921
+ * // it's the "zero" value of that message.
3922
+ * SomeMessage quux = 4 [
3923
+ * (buf.validate.field).cel = {/* ... *\/}
3924
+ * ];
3925
+ * }
3926
+ * ```
3927
+ *
3928
+ * @generated from protobuf enum value: IGNORE_UNSPECIFIED = 0;
3929
+ */
3930
+ UNSPECIFIED = 0,
3931
+ /**
3932
+ * Validation is skipped if the field is unpopulated. This rule is redundant
3933
+ * if the field is already nullable. This value is equivalent behavior to the
3934
+ * deprecated ignore_empty rule.
3935
+ *
3936
+ * ```proto
3937
+ * syntax="proto3
3938
+ *
3939
+ * message Request {
3940
+ * // The uri rule applies only if the value is not the empty string.
3941
+ * string foo = 1 [
3942
+ * (buf.validate.field).string.uri = true,
3943
+ * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
3944
+ * ];
3945
+ *
3946
+ * // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this
3947
+ * // case: the uri rule only applies if the field is set, including if
3948
+ * // it's set to the empty string.
3949
+ * optional string bar = 2 [
3950
+ * (buf.validate.field).string.uri = true,
3951
+ * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
3952
+ * ];
3953
+ *
3954
+ * // The min_items rule only applies if the list has at least one item.
3955
+ * repeated string baz = 3 [
3956
+ * (buf.validate.field).repeated.min_items = 3,
3957
+ * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
3958
+ * ];
3959
+ *
3960
+ * // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this
3961
+ * // case: the custom CEL rule applies only if the field is set, including
3962
+ * // if it's the "zero" value of that message.
3963
+ * SomeMessage quux = 4 [
3964
+ * (buf.validate.field).cel = {/* ... *\/},
3965
+ * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
3966
+ * ];
3967
+ * }
3968
+ * ```
3969
+ *
3970
+ * @generated from protobuf enum value: IGNORE_IF_UNPOPULATED = 1;
3971
+ */
3972
+ IF_UNPOPULATED = 1,
3973
+ /**
3974
+ * Validation is skipped if the field is unpopulated or if it is a nullable
3975
+ * field populated with its default value. This is typically the zero or
3976
+ * empty value, but proto2 scalars support custom defaults. For messages, the
3977
+ * default is a non-null message with all its fields unpopulated.
3978
+ *
3979
+ * ```proto
3980
+ * syntax="proto3
3981
+ *
3982
+ * message Request {
3983
+ * // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in
3984
+ * // this case; the uri rule applies only if the value is not the empty
3985
+ * // string.
3986
+ * string foo = 1 [
3987
+ * (buf.validate.field).string.uri = true,
3988
+ * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
3989
+ * ];
3990
+ *
3991
+ * // The uri rule only applies if the field is set to a value other than
3992
+ * // the empty string.
3993
+ * optional string bar = 2 [
3994
+ * (buf.validate.field).string.uri = true,
3995
+ * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
3996
+ * ];
3997
+ *
3998
+ * // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in
3999
+ * // this case; the min_items rule only applies if the list has at least
4000
+ * // one item.
4001
+ * repeated string baz = 3 [
4002
+ * (buf.validate.field).repeated.min_items = 3,
4003
+ * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
4004
+ * ];
4005
+ *
4006
+ * // The custom CEL rule only applies if the field is set to a value other
4007
+ * // than an empty message (i.e., fields are unpopulated).
4008
+ * SomeMessage quux = 4 [
4009
+ * (buf.validate.field).cel = {/* ... *\/},
4010
+ * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
4011
+ * ];
4012
+ * }
4013
+ * ```
4014
+ *
4015
+ * This rule is affected by proto2 custom default values:
4016
+ *
4017
+ * ```proto
4018
+ * syntax="proto2";
4019
+ *
4020
+ * message Request {
4021
+ * // The gt rule only applies if the field is set and it's value is not
4022
+ * the default (i.e., not -42). The rule even applies if the field is set
4023
+ * to zero since the default value differs.
4024
+ * optional int32 value = 1 [
4025
+ * default = -42,
4026
+ * (buf.validate.field).int32.gt = 0,
4027
+ * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
4028
+ * ];
4029
+ * }
4030
+ *
4031
+ * @generated from protobuf enum value: IGNORE_IF_DEFAULT_VALUE = 2;
4032
+ */
4033
+ IF_DEFAULT_VALUE = 2,
4034
+ /**
4035
+ * The validation rules of this field will be skipped and not evaluated. This
4036
+ * is useful for situations that necessitate turning off the rules of a field
4037
+ * containing a message that may not make sense in the current context, or to
4038
+ * temporarily disable constraints during development.
4039
+ *
4040
+ * ```proto
4041
+ * message MyMessage {
4042
+ * // The field's rules will always be ignored, including any validation's
4043
+ * // on value's fields.
4044
+ * MyOtherMessage value = 1 [
4045
+ * (buf.validate.field).ignore = IGNORE_ALWAYS];
4046
+ * }
4047
+ * ```
4048
+ *
4049
+ * @generated from protobuf enum value: IGNORE_ALWAYS = 3;
4050
+ */
4051
+ ALWAYS = 3,
4052
+ /**
4053
+ * Validation is skipped if the field is unpopulated. This rule is redundant
4054
+ * if the field is already nullable. This value is equivalent behavior to the
4055
+ * deprecated ignore_empty rule.
4056
+ *
4057
+ * ```proto
4058
+ * syntax="proto3
4059
+ *
4060
+ * message Request {
4061
+ * // The uri rule applies only if the value is not the empty string.
4062
+ * string foo = 1 [
4063
+ * (buf.validate.field).string.uri = true,
4064
+ * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
4065
+ * ];
4066
+ *
4067
+ * // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this
4068
+ * // case: the uri rule only applies if the field is set, including if
4069
+ * // it's set to the empty string.
4070
+ * optional string bar = 2 [
4071
+ * (buf.validate.field).string.uri = true,
4072
+ * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
4073
+ * ];
4074
+ *
4075
+ * // The min_items rule only applies if the list has at least one item.
4076
+ * repeated string baz = 3 [
4077
+ * (buf.validate.field).repeated.min_items = 3,
4078
+ * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
4079
+ * ];
4080
+ *
4081
+ * // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this
4082
+ * // case: the custom CEL rule applies only if the field is set, including
4083
+ * // if it's the "zero" value of that message.
4084
+ * SomeMessage quux = 4 [
4085
+ * (buf.validate.field).cel = {/* ... *\/},
4086
+ * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
4087
+ * ];
4088
+ * }
4089
+ * ```
4090
+ *
4091
+ * @generated from protobuf enum value: IGNORE_IF_UNPOPULATED = 1;
4092
+ */
4093
+ EMPTY = 1,
4094
+ /**
4095
+ * Validation is skipped if the field is unpopulated or if it is a nullable
4096
+ * field populated with its default value. This is typically the zero or
4097
+ * empty value, but proto2 scalars support custom defaults. For messages, the
4098
+ * default is a non-null message with all its fields unpopulated.
4099
+ *
4100
+ * ```proto
4101
+ * syntax="proto3
4102
+ *
4103
+ * message Request {
4104
+ * // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in
4105
+ * // this case; the uri rule applies only if the value is not the empty
4106
+ * // string.
4107
+ * string foo = 1 [
4108
+ * (buf.validate.field).string.uri = true,
4109
+ * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
4110
+ * ];
4111
+ *
4112
+ * // The uri rule only applies if the field is set to a value other than
4113
+ * // the empty string.
4114
+ * optional string bar = 2 [
4115
+ * (buf.validate.field).string.uri = true,
4116
+ * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
4117
+ * ];
4118
+ *
4119
+ * // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in
4120
+ * // this case; the min_items rule only applies if the list has at least
4121
+ * // one item.
4122
+ * repeated string baz = 3 [
4123
+ * (buf.validate.field).repeated.min_items = 3,
4124
+ * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
4125
+ * ];
4126
+ *
4127
+ * // The custom CEL rule only applies if the field is set to a value other
4128
+ * // than an empty message (i.e., fields are unpopulated).
4129
+ * SomeMessage quux = 4 [
4130
+ * (buf.validate.field).cel = {/* ... *\/},
4131
+ * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
4132
+ * ];
4133
+ * }
4134
+ * ```
4135
+ *
4136
+ * This rule is affected by proto2 custom default values:
4137
+ *
4138
+ * ```proto
4139
+ * syntax="proto2";
4140
+ *
4141
+ * message Request {
4142
+ * // The gt rule only applies if the field is set and it's value is not
4143
+ * the default (i.e., not -42). The rule even applies if the field is set
4144
+ * to zero since the default value differs.
4145
+ * optional int32 value = 1 [
4146
+ * default = -42,
4147
+ * (buf.validate.field).int32.gt = 0,
4148
+ * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
4149
+ * ];
4150
+ * }
4151
+ *
4152
+ * @generated from protobuf enum value: IGNORE_IF_DEFAULT_VALUE = 2;
4153
+ */
4154
+ DEFAULT = 2
4155
+ }
4156
+ /**
4157
+ * WellKnownRegex contain some well-known patterns.
4158
+ *
4159
+ * @generated from protobuf enum buf.validate.KnownRegex
4160
+ */
4161
+ export declare enum KnownRegex {
4162
+ /**
4163
+ * @generated from protobuf enum value: KNOWN_REGEX_UNSPECIFIED = 0;
4164
+ */
4165
+ UNSPECIFIED = 0,
4166
+ /**
4167
+ * HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2).
4168
+ *
4169
+ * @generated from protobuf enum value: KNOWN_REGEX_HTTP_HEADER_NAME = 1;
4170
+ */
4171
+ HTTP_HEADER_NAME = 1,
4172
+ /**
4173
+ * HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4).
4174
+ *
4175
+ * @generated from protobuf enum value: KNOWN_REGEX_HTTP_HEADER_VALUE = 2;
4176
+ */
4177
+ HTTP_HEADER_VALUE = 2
4178
+ }
4179
+ declare class Constraint$Type extends MessageType<Constraint> {
4180
+ constructor();
4181
+ create(value?: PartialMessage<Constraint>): Constraint;
4182
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Constraint): Constraint;
4183
+ internalBinaryWrite(message: Constraint, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4184
+ }
4185
+ /**
4186
+ * @generated MessageType for protobuf message buf.validate.Constraint
4187
+ */
4188
+ export declare const Constraint: Constraint$Type;
4189
+ declare class MessageConstraints$Type extends MessageType<MessageConstraints> {
4190
+ constructor();
4191
+ create(value?: PartialMessage<MessageConstraints>): MessageConstraints;
4192
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MessageConstraints): MessageConstraints;
4193
+ internalBinaryWrite(message: MessageConstraints, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4194
+ }
4195
+ /**
4196
+ * @generated MessageType for protobuf message buf.validate.MessageConstraints
4197
+ */
4198
+ export declare const MessageConstraints: MessageConstraints$Type;
4199
+ declare class OneofConstraints$Type extends MessageType<OneofConstraints> {
4200
+ constructor();
4201
+ create(value?: PartialMessage<OneofConstraints>): OneofConstraints;
4202
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: OneofConstraints): OneofConstraints;
4203
+ internalBinaryWrite(message: OneofConstraints, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4204
+ }
4205
+ /**
4206
+ * @generated MessageType for protobuf message buf.validate.OneofConstraints
4207
+ */
4208
+ export declare const OneofConstraints: OneofConstraints$Type;
4209
+ declare class FieldConstraints$Type extends MessageType<FieldConstraints> {
4210
+ constructor();
4211
+ create(value?: PartialMessage<FieldConstraints>): FieldConstraints;
4212
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FieldConstraints): FieldConstraints;
4213
+ internalBinaryWrite(message: FieldConstraints, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4214
+ }
4215
+ /**
4216
+ * @generated MessageType for protobuf message buf.validate.FieldConstraints
4217
+ */
4218
+ export declare const FieldConstraints: FieldConstraints$Type;
4219
+ declare class PredefinedConstraints$Type extends MessageType<PredefinedConstraints> {
4220
+ constructor();
4221
+ create(value?: PartialMessage<PredefinedConstraints>): PredefinedConstraints;
4222
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PredefinedConstraints): PredefinedConstraints;
4223
+ internalBinaryWrite(message: PredefinedConstraints, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4224
+ }
4225
+ /**
4226
+ * @generated MessageType for protobuf message buf.validate.PredefinedConstraints
4227
+ */
4228
+ export declare const PredefinedConstraints: PredefinedConstraints$Type;
4229
+ declare class FloatRules$Type extends MessageType<FloatRules> {
4230
+ constructor();
4231
+ create(value?: PartialMessage<FloatRules>): FloatRules;
4232
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FloatRules): FloatRules;
4233
+ internalBinaryWrite(message: FloatRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4234
+ }
4235
+ /**
4236
+ * @generated MessageType for protobuf message buf.validate.FloatRules
4237
+ */
4238
+ export declare const FloatRules: FloatRules$Type;
4239
+ declare class DoubleRules$Type extends MessageType<DoubleRules> {
4240
+ constructor();
4241
+ create(value?: PartialMessage<DoubleRules>): DoubleRules;
4242
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DoubleRules): DoubleRules;
4243
+ internalBinaryWrite(message: DoubleRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4244
+ }
4245
+ /**
4246
+ * @generated MessageType for protobuf message buf.validate.DoubleRules
4247
+ */
4248
+ export declare const DoubleRules: DoubleRules$Type;
4249
+ declare class Int32Rules$Type extends MessageType<Int32Rules> {
4250
+ constructor();
4251
+ create(value?: PartialMessage<Int32Rules>): Int32Rules;
4252
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Int32Rules): Int32Rules;
4253
+ internalBinaryWrite(message: Int32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4254
+ }
4255
+ /**
4256
+ * @generated MessageType for protobuf message buf.validate.Int32Rules
4257
+ */
4258
+ export declare const Int32Rules: Int32Rules$Type;
4259
+ declare class Int64Rules$Type extends MessageType<Int64Rules> {
4260
+ constructor();
4261
+ create(value?: PartialMessage<Int64Rules>): Int64Rules;
4262
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Int64Rules): Int64Rules;
4263
+ internalBinaryWrite(message: Int64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4264
+ }
4265
+ /**
4266
+ * @generated MessageType for protobuf message buf.validate.Int64Rules
4267
+ */
4268
+ export declare const Int64Rules: Int64Rules$Type;
4269
+ declare class UInt32Rules$Type extends MessageType<UInt32Rules> {
4270
+ constructor();
4271
+ create(value?: PartialMessage<UInt32Rules>): UInt32Rules;
4272
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UInt32Rules): UInt32Rules;
4273
+ internalBinaryWrite(message: UInt32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4274
+ }
4275
+ /**
4276
+ * @generated MessageType for protobuf message buf.validate.UInt32Rules
4277
+ */
4278
+ export declare const UInt32Rules: UInt32Rules$Type;
4279
+ declare class UInt64Rules$Type extends MessageType<UInt64Rules> {
4280
+ constructor();
4281
+ create(value?: PartialMessage<UInt64Rules>): UInt64Rules;
4282
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UInt64Rules): UInt64Rules;
4283
+ internalBinaryWrite(message: UInt64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4284
+ }
4285
+ /**
4286
+ * @generated MessageType for protobuf message buf.validate.UInt64Rules
4287
+ */
4288
+ export declare const UInt64Rules: UInt64Rules$Type;
4289
+ declare class SInt32Rules$Type extends MessageType<SInt32Rules> {
4290
+ constructor();
4291
+ create(value?: PartialMessage<SInt32Rules>): SInt32Rules;
4292
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SInt32Rules): SInt32Rules;
4293
+ internalBinaryWrite(message: SInt32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4294
+ }
4295
+ /**
4296
+ * @generated MessageType for protobuf message buf.validate.SInt32Rules
4297
+ */
4298
+ export declare const SInt32Rules: SInt32Rules$Type;
4299
+ declare class SInt64Rules$Type extends MessageType<SInt64Rules> {
4300
+ constructor();
4301
+ create(value?: PartialMessage<SInt64Rules>): SInt64Rules;
4302
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SInt64Rules): SInt64Rules;
4303
+ internalBinaryWrite(message: SInt64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4304
+ }
4305
+ /**
4306
+ * @generated MessageType for protobuf message buf.validate.SInt64Rules
4307
+ */
4308
+ export declare const SInt64Rules: SInt64Rules$Type;
4309
+ declare class Fixed32Rules$Type extends MessageType<Fixed32Rules> {
4310
+ constructor();
4311
+ create(value?: PartialMessage<Fixed32Rules>): Fixed32Rules;
4312
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Fixed32Rules): Fixed32Rules;
4313
+ internalBinaryWrite(message: Fixed32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4314
+ }
4315
+ /**
4316
+ * @generated MessageType for protobuf message buf.validate.Fixed32Rules
4317
+ */
4318
+ export declare const Fixed32Rules: Fixed32Rules$Type;
4319
+ declare class Fixed64Rules$Type extends MessageType<Fixed64Rules> {
4320
+ constructor();
4321
+ create(value?: PartialMessage<Fixed64Rules>): Fixed64Rules;
4322
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Fixed64Rules): Fixed64Rules;
4323
+ internalBinaryWrite(message: Fixed64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4324
+ }
4325
+ /**
4326
+ * @generated MessageType for protobuf message buf.validate.Fixed64Rules
4327
+ */
4328
+ export declare const Fixed64Rules: Fixed64Rules$Type;
4329
+ declare class SFixed32Rules$Type extends MessageType<SFixed32Rules> {
4330
+ constructor();
4331
+ create(value?: PartialMessage<SFixed32Rules>): SFixed32Rules;
4332
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SFixed32Rules): SFixed32Rules;
4333
+ internalBinaryWrite(message: SFixed32Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4334
+ }
4335
+ /**
4336
+ * @generated MessageType for protobuf message buf.validate.SFixed32Rules
4337
+ */
4338
+ export declare const SFixed32Rules: SFixed32Rules$Type;
4339
+ declare class SFixed64Rules$Type extends MessageType<SFixed64Rules> {
4340
+ constructor();
4341
+ create(value?: PartialMessage<SFixed64Rules>): SFixed64Rules;
4342
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SFixed64Rules): SFixed64Rules;
4343
+ internalBinaryWrite(message: SFixed64Rules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4344
+ }
4345
+ /**
4346
+ * @generated MessageType for protobuf message buf.validate.SFixed64Rules
4347
+ */
4348
+ export declare const SFixed64Rules: SFixed64Rules$Type;
4349
+ declare class BoolRules$Type extends MessageType<BoolRules> {
4350
+ constructor();
4351
+ create(value?: PartialMessage<BoolRules>): BoolRules;
4352
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BoolRules): BoolRules;
4353
+ internalBinaryWrite(message: BoolRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4354
+ }
4355
+ /**
4356
+ * @generated MessageType for protobuf message buf.validate.BoolRules
4357
+ */
4358
+ export declare const BoolRules: BoolRules$Type;
4359
+ declare class StringRules$Type extends MessageType<StringRules> {
4360
+ constructor();
4361
+ create(value?: PartialMessage<StringRules>): StringRules;
4362
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StringRules): StringRules;
4363
+ internalBinaryWrite(message: StringRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4364
+ }
4365
+ /**
4366
+ * @generated MessageType for protobuf message buf.validate.StringRules
4367
+ */
4368
+ export declare const StringRules: StringRules$Type;
4369
+ declare class BytesRules$Type extends MessageType<BytesRules> {
4370
+ constructor();
4371
+ create(value?: PartialMessage<BytesRules>): BytesRules;
4372
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BytesRules): BytesRules;
4373
+ internalBinaryWrite(message: BytesRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4374
+ }
4375
+ /**
4376
+ * @generated MessageType for protobuf message buf.validate.BytesRules
4377
+ */
4378
+ export declare const BytesRules: BytesRules$Type;
4379
+ declare class EnumRules$Type extends MessageType<EnumRules> {
4380
+ constructor();
4381
+ create(value?: PartialMessage<EnumRules>): EnumRules;
4382
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: EnumRules): EnumRules;
4383
+ internalBinaryWrite(message: EnumRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4384
+ }
4385
+ /**
4386
+ * @generated MessageType for protobuf message buf.validate.EnumRules
4387
+ */
4388
+ export declare const EnumRules: EnumRules$Type;
4389
+ declare class RepeatedRules$Type extends MessageType<RepeatedRules> {
4390
+ constructor();
4391
+ create(value?: PartialMessage<RepeatedRules>): RepeatedRules;
4392
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RepeatedRules): RepeatedRules;
4393
+ internalBinaryWrite(message: RepeatedRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4394
+ }
4395
+ /**
4396
+ * @generated MessageType for protobuf message buf.validate.RepeatedRules
4397
+ */
4398
+ export declare const RepeatedRules: RepeatedRules$Type;
4399
+ declare class MapRules$Type extends MessageType<MapRules> {
4400
+ constructor();
4401
+ create(value?: PartialMessage<MapRules>): MapRules;
4402
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MapRules): MapRules;
4403
+ internalBinaryWrite(message: MapRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4404
+ }
4405
+ /**
4406
+ * @generated MessageType for protobuf message buf.validate.MapRules
4407
+ */
4408
+ export declare const MapRules: MapRules$Type;
4409
+ declare class AnyRules$Type extends MessageType<AnyRules> {
4410
+ constructor();
4411
+ create(value?: PartialMessage<AnyRules>): AnyRules;
4412
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AnyRules): AnyRules;
4413
+ internalBinaryWrite(message: AnyRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4414
+ }
4415
+ /**
4416
+ * @generated MessageType for protobuf message buf.validate.AnyRules
4417
+ */
4418
+ export declare const AnyRules: AnyRules$Type;
4419
+ declare class DurationRules$Type extends MessageType<DurationRules> {
4420
+ constructor();
4421
+ create(value?: PartialMessage<DurationRules>): DurationRules;
4422
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DurationRules): DurationRules;
4423
+ internalBinaryWrite(message: DurationRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4424
+ }
4425
+ /**
4426
+ * @generated MessageType for protobuf message buf.validate.DurationRules
4427
+ */
4428
+ export declare const DurationRules: DurationRules$Type;
4429
+ declare class TimestampRules$Type extends MessageType<TimestampRules> {
4430
+ constructor();
4431
+ create(value?: PartialMessage<TimestampRules>): TimestampRules;
4432
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TimestampRules): TimestampRules;
4433
+ internalBinaryWrite(message: TimestampRules, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4434
+ }
4435
+ /**
4436
+ * @generated MessageType for protobuf message buf.validate.TimestampRules
4437
+ */
4438
+ export declare const TimestampRules: TimestampRules$Type;
4439
+ declare class Violations$Type extends MessageType<Violations> {
4440
+ constructor();
4441
+ create(value?: PartialMessage<Violations>): Violations;
4442
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Violations): Violations;
4443
+ internalBinaryWrite(message: Violations, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4444
+ }
4445
+ /**
4446
+ * @generated MessageType for protobuf message buf.validate.Violations
4447
+ */
4448
+ export declare const Violations: Violations$Type;
4449
+ declare class Violation$Type extends MessageType<Violation> {
4450
+ constructor();
4451
+ create(value?: PartialMessage<Violation>): Violation;
4452
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Violation): Violation;
4453
+ internalBinaryWrite(message: Violation, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4454
+ }
4455
+ /**
4456
+ * @generated MessageType for protobuf message buf.validate.Violation
4457
+ */
4458
+ export declare const Violation: Violation$Type;
4459
+ export {};
4460
+ //# sourceMappingURL=validate.d.ts.map