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