@mochabug/adapt-web 0.0.1-beta

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