@mochabug/adaptkit 0.14.6 → 1.0.0-beta.10

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