@producerflow/producerflowapi 0.0.1

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