@companyhelm/protos 0.1.0 → 0.2.0

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