plugnmeet-protocol-js 1.0.0

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