@virtru/dsp-sdk 0.1.10-pr604.7ef7a158

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