@openstatus/sdk-node 0.0.1

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