@mochabug/adaptkit 1.0.0-rc.12 → 1.0.0-rc.14

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 (48) hide show
  1. package/bin/genproto/buf/validate/validate_pb.d.ts +759 -368
  2. package/bin/genproto/buf/validate/validate_pb.d.ts.map +1 -1
  3. package/bin/genproto/google/api/annotations_pb.d.ts +1 -1
  4. package/bin/genproto/google/api/client_pb.d.ts +46 -16
  5. package/bin/genproto/google/api/client_pb.d.ts.map +1 -1
  6. package/bin/genproto/google/api/http_pb.d.ts +10 -4
  7. package/bin/genproto/google/api/http_pb.d.ts.map +1 -1
  8. package/bin/genproto/google/api/launch_stage_pb.d.ts +1 -1
  9. package/bin/genproto/mochabugapis/adapt/graph/exchange_pb.d.ts +4 -2
  10. package/bin/genproto/mochabugapis/adapt/graph/exchange_pb.d.ts.map +1 -1
  11. package/bin/genproto/mochabugapis/adapt/graph/jtd_schema_pb.d.ts +4 -2
  12. package/bin/genproto/mochabugapis/adapt/graph/jtd_schema_pb.d.ts.map +1 -1
  13. package/bin/genproto/mochabugapis/adapt/graph/receiver_pb.d.ts +4 -2
  14. package/bin/genproto/mochabugapis/adapt/graph/receiver_pb.d.ts.map +1 -1
  15. package/bin/genproto/mochabugapis/adapt/graph/signal_binding_pb.d.ts +4 -2
  16. package/bin/genproto/mochabugapis/adapt/graph/signal_binding_pb.d.ts.map +1 -1
  17. package/bin/genproto/mochabugapis/adapt/graph/signal_descriptor_pb.d.ts +4 -2
  18. package/bin/genproto/mochabugapis/adapt/graph/signal_descriptor_pb.d.ts.map +1 -1
  19. package/bin/genproto/mochabugapis/adapt/graph/transceiver_pb.d.ts +4 -2
  20. package/bin/genproto/mochabugapis/adapt/graph/transceiver_pb.d.ts.map +1 -1
  21. package/bin/genproto/mochabugapis/adapt/graph/transmitter_pb.d.ts +4 -2
  22. package/bin/genproto/mochabugapis/adapt/graph/transmitter_pb.d.ts.map +1 -1
  23. package/bin/genproto/mochabugapis/adapt/graph/vertex_metadata_pb.d.ts +4 -2
  24. package/bin/genproto/mochabugapis/adapt/graph/vertex_metadata_pb.d.ts.map +1 -1
  25. package/bin/genproto/mochabugapis/adapt/plugins/v1/file_pb.d.ts +4 -2
  26. package/bin/genproto/mochabugapis/adapt/plugins/v1/file_pb.d.ts.map +1 -1
  27. package/bin/genproto/mochabugapis/adapt/plugins/v1/manifest_pb.d.ts +4 -2
  28. package/bin/genproto/mochabugapis/adapt/plugins/v1/manifest_pb.d.ts.map +1 -1
  29. package/bin/genproto/mochabugapis/adapt/plugins/v1/oauth2_service_pb.d.ts +25 -9
  30. package/bin/genproto/mochabugapis/adapt/plugins/v1/oauth2_service_pb.d.ts.map +1 -1
  31. package/bin/genproto/mochabugapis/adapt/plugins/v1/oneof_service_pb.d.ts +4 -2
  32. package/bin/genproto/mochabugapis/adapt/plugins/v1/oneof_service_pb.d.ts.map +1 -1
  33. package/bin/genproto/mochabugapis/adapt/plugins/v1/plugins_pb.d.ts +24 -4
  34. package/bin/genproto/mochabugapis/adapt/plugins/v1/plugins_pb.d.ts.map +1 -1
  35. package/bin/genproto/mochabugapis/adapt/plugins/v1/service_binding_pb.d.ts +7 -3
  36. package/bin/genproto/mochabugapis/adapt/plugins/v1/service_binding_pb.d.ts.map +1 -1
  37. package/bin/genproto/mochabugapis/adapt/plugins/v1/service_definition_pb.d.ts +4 -2
  38. package/bin/genproto/mochabugapis/adapt/plugins/v1/service_definition_pb.d.ts.map +1 -1
  39. package/bin/genproto/mochabugapis/adapt/plugins/v1/tls_service_pb.d.ts +7 -15
  40. package/bin/genproto/mochabugapis/adapt/plugins/v1/tls_service_pb.d.ts.map +1 -1
  41. package/bin/genproto/mochabugapis/adapt/plugins/v1/variable_service_pb.d.ts +4 -2
  42. package/bin/genproto/mochabugapis/adapt/plugins/v1/variable_service_pb.d.ts.map +1 -1
  43. package/bin/genproto/mochabugapis/adapt/plugins/v1/vertex_pb.d.ts +20 -2
  44. package/bin/genproto/mochabugapis/adapt/plugins/v1/vertex_pb.d.ts.map +1 -1
  45. package/bin/index.js +122 -149
  46. package/bin/index.js.map +4 -4
  47. package/bin/utils.d.ts.map +1 -1
  48. package/package.json +11 -11
@@ -1,4 +1,4 @@
1
- import type { GenEnum, GenExtension, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
1
+ import type { GenEnum, GenExtension, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
2
2
  import type { Duration, DurationJson, FieldDescriptorProto_Type, FieldDescriptorProto_TypeJson, FieldOptions, MessageOptions, OneofOptions, Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
3
3
  import type { Message } from "@bufbuild/protobuf";
4
4
  /**
@@ -6,10 +6,10 @@ import type { Message } from "@bufbuild/protobuf";
6
6
  */
7
7
  export declare const file_buf_validate_validate: GenFile;
8
8
  /**
9
- * `Constraint` represents a validation rule written in the Common Expression
10
- * Language (CEL) syntax. Each Constraint includes a unique identifier, an
9
+ * `Rule` represents a validation rule written in the Common Expression
10
+ * Language (CEL) syntax. Each Rule includes a unique identifier, an
11
11
  * optional error message, and the CEL expression to evaluate. For more
12
- * information on CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
12
+ * information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
13
13
  *
14
14
  * ```proto
15
15
  * message Foo {
@@ -22,11 +22,11 @@ export declare const file_buf_validate_validate: GenFile;
22
22
  * }
23
23
  * ```
24
24
  *
25
- * @generated from message buf.validate.Constraint
25
+ * @generated from message buf.validate.Rule
26
26
  */
27
- export type Constraint = Message<"buf.validate.Constraint"> & {
27
+ export type Rule = Message<"buf.validate.Rule"> & {
28
28
  /**
29
- * `id` is a string that serves as a machine-readable name for this Constraint.
29
+ * `id` is a string that serves as a machine-readable name for this Rule.
30
30
  * It should be unique within its scope, which could be either a message or a field.
31
31
  *
32
32
  * @generated from field: optional string id = 1;
@@ -34,7 +34,7 @@ export type Constraint = Message<"buf.validate.Constraint"> & {
34
34
  id: string;
35
35
  /**
36
36
  * `message` is an optional field that provides a human-readable error message
37
- * for this Constraint when the CEL expression evaluates to false. If a
37
+ * for this Rule when the CEL expression evaluates to false. If a
38
38
  * non-empty message is provided, any strings resulting from the CEL
39
39
  * expression evaluation are ignored.
40
40
  *
@@ -52,10 +52,10 @@ export type Constraint = Message<"buf.validate.Constraint"> & {
52
52
  expression: string;
53
53
  };
54
54
  /**
55
- * `Constraint` represents a validation rule written in the Common Expression
56
- * Language (CEL) syntax. Each Constraint includes a unique identifier, an
55
+ * `Rule` represents a validation rule written in the Common Expression
56
+ * Language (CEL) syntax. Each Rule includes a unique identifier, an
57
57
  * optional error message, and the CEL expression to evaluate. For more
58
- * information on CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
58
+ * information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
59
59
  *
60
60
  * ```proto
61
61
  * message Foo {
@@ -68,11 +68,11 @@ export type Constraint = Message<"buf.validate.Constraint"> & {
68
68
  * }
69
69
  * ```
70
70
  *
71
- * @generated from message buf.validate.Constraint
71
+ * @generated from message buf.validate.Rule
72
72
  */
73
- export type ConstraintJson = {
73
+ export type RuleJson = {
74
74
  /**
75
- * `id` is a string that serves as a machine-readable name for this Constraint.
75
+ * `id` is a string that serves as a machine-readable name for this Rule.
76
76
  * It should be unique within its scope, which could be either a message or a field.
77
77
  *
78
78
  * @generated from field: optional string id = 1;
@@ -80,7 +80,7 @@ export type ConstraintJson = {
80
80
  id?: string;
81
81
  /**
82
82
  * `message` is an optional field that provides a human-readable error message
83
- * for this Constraint when the CEL expression evaluates to false. If a
83
+ * for this Rule when the CEL expression evaluates to false. If a
84
84
  * non-empty message is provided, any strings resulting from the CEL
85
85
  * expression evaluation are ignored.
86
86
  *
@@ -98,17 +98,19 @@ export type ConstraintJson = {
98
98
  expression?: string;
99
99
  };
100
100
  /**
101
- * Describes the message buf.validate.Constraint.
102
- * Use `create(ConstraintSchema)` to create a new message.
101
+ * Describes the message buf.validate.Rule.
102
+ * Use `create(RuleSchema)` to create a new message.
103
103
  */
104
- export declare const ConstraintSchema: GenMessage<Constraint, ConstraintJson>;
104
+ export declare const RuleSchema: GenMessage<Rule, {
105
+ jsonType: RuleJson;
106
+ }>;
105
107
  /**
106
- * MessageConstraints represents validation rules that are applied to the entire message.
107
- * It includes disabling options and a list of Constraint messages representing Common Expression Language (CEL) validation rules.
108
+ * MessageRules represents validation rules that are applied to the entire message.
109
+ * It includes disabling options and a list of Rule messages representing Common Expression Language (CEL) validation rules.
108
110
  *
109
- * @generated from message buf.validate.MessageConstraints
111
+ * @generated from message buf.validate.MessageRules
110
112
  */
111
- export type MessageConstraints = Message<"buf.validate.MessageConstraints"> & {
113
+ export type MessageRules = Message<"buf.validate.MessageRules"> & {
112
114
  /**
113
115
  * `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
114
116
  * This includes any fields within the message that would otherwise support validation.
@@ -124,9 +126,9 @@ export type MessageConstraints = Message<"buf.validate.MessageConstraints"> & {
124
126
  */
125
127
  disabled: boolean;
126
128
  /**
127
- * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
128
- * These constraints are written in Common Expression Language (CEL) syntax. For more information on
129
- * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
129
+ * `cel` is a repeated field of type Rule. Each Rule specifies a validation rule to be applied to this message.
130
+ * These rules are written in Common Expression Language (CEL) syntax. For more information,
131
+ * [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
130
132
  *
131
133
  *
132
134
  * ```proto
@@ -141,17 +143,56 @@ export type MessageConstraints = Message<"buf.validate.MessageConstraints"> & {
141
143
  * }
142
144
  * ```
143
145
  *
144
- * @generated from field: repeated buf.validate.Constraint cel = 3;
146
+ * @generated from field: repeated buf.validate.Rule cel = 3;
145
147
  */
146
- cel: Constraint[];
148
+ cel: Rule[];
149
+ /**
150
+ * `oneof` is a repeated field of type MessageOneofRule that specifies a list of fields
151
+ * of which at most one can be present. If `required` is also specified, then exactly one
152
+ * of the specified fields _must_ be present.
153
+ *
154
+ * This will enforce oneof-like constraints with a few features not provided by
155
+ * actual Protobuf oneof declarations:
156
+ * 1. Repeated and map fields are allowed in this validation. In a Protobuf oneof,
157
+ * only scalar fields are allowed.
158
+ * 2. Fields with implicit presence are allowed. In a Protobuf oneof, all member
159
+ * fields have explicit presence. This means that, for the purpose of determining
160
+ * how many fields are set, explicitly setting such a field to its zero value is
161
+ * effectively the same as not setting it at all.
162
+ * 3. This will always generate validation errors for a message unmarshalled from
163
+ * serialized data that sets more than one field. With a Protobuf oneof, when
164
+ * multiple fields are present in the serialized form, earlier values are usually
165
+ * silently ignored when unmarshalling, with only the last field being set when
166
+ * unmarshalling completes.
167
+ *
168
+ * Note that adding a field to a `oneof` will also set the IGNORE_IF_UNPOPULATED on the fields. This means
169
+ * only the field that is set will be validated and the unset fields are not validated according to the field rules.
170
+ * This behavior can be overridden by setting `ignore` against a field.
171
+ *
172
+ * ```proto
173
+ * message MyMessage {
174
+ * // Only one of `field1` or `field2` _can_ be present in this message.
175
+ * option (buf.validate.message).oneof = { fields: ["field1", "field2"] };
176
+ * // Exactly one of `field3` or `field4` _must_ be present in this message.
177
+ * option (buf.validate.message).oneof = { fields: ["field3", "field4"], required: true };
178
+ * string field1 = 1;
179
+ * bytes field2 = 2;
180
+ * bool field3 = 3;
181
+ * int32 field4 = 4;
182
+ * }
183
+ * ```
184
+ *
185
+ * @generated from field: repeated buf.validate.MessageOneofRule oneof = 4;
186
+ */
187
+ oneof: MessageOneofRule[];
147
188
  };
148
189
  /**
149
- * MessageConstraints represents validation rules that are applied to the entire message.
150
- * It includes disabling options and a list of Constraint messages representing Common Expression Language (CEL) validation rules.
190
+ * MessageRules represents validation rules that are applied to the entire message.
191
+ * It includes disabling options and a list of Rule messages representing Common Expression Language (CEL) validation rules.
151
192
  *
152
- * @generated from message buf.validate.MessageConstraints
193
+ * @generated from message buf.validate.MessageRules
153
194
  */
154
- export type MessageConstraintsJson = {
195
+ export type MessageRulesJson = {
155
196
  /**
156
197
  * `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
157
198
  * This includes any fields within the message that would otherwise support validation.
@@ -167,9 +208,9 @@ export type MessageConstraintsJson = {
167
208
  */
168
209
  disabled?: boolean;
169
210
  /**
170
- * `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
171
- * These constraints are written in Common Expression Language (CEL) syntax. For more information on
172
- * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
211
+ * `cel` is a repeated field of type Rule. Each Rule specifies a validation rule to be applied to this message.
212
+ * These rules are written in Common Expression Language (CEL) syntax. For more information,
213
+ * [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
173
214
  *
174
215
  *
175
216
  * ```proto
@@ -184,26 +225,112 @@ export type MessageConstraintsJson = {
184
225
  * }
185
226
  * ```
186
227
  *
187
- * @generated from field: repeated buf.validate.Constraint cel = 3;
228
+ * @generated from field: repeated buf.validate.Rule cel = 3;
229
+ */
230
+ cel?: RuleJson[];
231
+ /**
232
+ * `oneof` is a repeated field of type MessageOneofRule that specifies a list of fields
233
+ * of which at most one can be present. If `required` is also specified, then exactly one
234
+ * of the specified fields _must_ be present.
235
+ *
236
+ * This will enforce oneof-like constraints with a few features not provided by
237
+ * actual Protobuf oneof declarations:
238
+ * 1. Repeated and map fields are allowed in this validation. In a Protobuf oneof,
239
+ * only scalar fields are allowed.
240
+ * 2. Fields with implicit presence are allowed. In a Protobuf oneof, all member
241
+ * fields have explicit presence. This means that, for the purpose of determining
242
+ * how many fields are set, explicitly setting such a field to its zero value is
243
+ * effectively the same as not setting it at all.
244
+ * 3. This will always generate validation errors for a message unmarshalled from
245
+ * serialized data that sets more than one field. With a Protobuf oneof, when
246
+ * multiple fields are present in the serialized form, earlier values are usually
247
+ * silently ignored when unmarshalling, with only the last field being set when
248
+ * unmarshalling completes.
249
+ *
250
+ * Note that adding a field to a `oneof` will also set the IGNORE_IF_UNPOPULATED on the fields. This means
251
+ * only the field that is set will be validated and the unset fields are not validated according to the field rules.
252
+ * This behavior can be overridden by setting `ignore` against a field.
253
+ *
254
+ * ```proto
255
+ * message MyMessage {
256
+ * // Only one of `field1` or `field2` _can_ be present in this message.
257
+ * option (buf.validate.message).oneof = { fields: ["field1", "field2"] };
258
+ * // Exactly one of `field3` or `field4` _must_ be present in this message.
259
+ * option (buf.validate.message).oneof = { fields: ["field3", "field4"], required: true };
260
+ * string field1 = 1;
261
+ * bytes field2 = 2;
262
+ * bool field3 = 3;
263
+ * int32 field4 = 4;
264
+ * }
265
+ * ```
266
+ *
267
+ * @generated from field: repeated buf.validate.MessageOneofRule oneof = 4;
268
+ */
269
+ oneof?: MessageOneofRuleJson[];
270
+ };
271
+ /**
272
+ * Describes the message buf.validate.MessageRules.
273
+ * Use `create(MessageRulesSchema)` to create a new message.
274
+ */
275
+ export declare const MessageRulesSchema: GenMessage<MessageRules, {
276
+ jsonType: MessageRulesJson;
277
+ }>;
278
+ /**
279
+ * @generated from message buf.validate.MessageOneofRule
280
+ */
281
+ export type MessageOneofRule = Message<"buf.validate.MessageOneofRule"> & {
282
+ /**
283
+ * A list of field names to include in the oneof. All field names must be
284
+ * defined in the message. At least one field must be specified, and
285
+ * duplicates are not permitted.
286
+ *
287
+ * @generated from field: repeated string fields = 1;
288
+ */
289
+ fields: string[];
290
+ /**
291
+ * If true, one of the fields specified _must_ be set.
292
+ *
293
+ * @generated from field: optional bool required = 2;
294
+ */
295
+ required: boolean;
296
+ };
297
+ /**
298
+ * @generated from message buf.validate.MessageOneofRule
299
+ */
300
+ export type MessageOneofRuleJson = {
301
+ /**
302
+ * A list of field names to include in the oneof. All field names must be
303
+ * defined in the message. At least one field must be specified, and
304
+ * duplicates are not permitted.
305
+ *
306
+ * @generated from field: repeated string fields = 1;
188
307
  */
189
- cel?: ConstraintJson[];
308
+ fields?: string[];
309
+ /**
310
+ * If true, one of the fields specified _must_ be set.
311
+ *
312
+ * @generated from field: optional bool required = 2;
313
+ */
314
+ required?: boolean;
190
315
  };
191
316
  /**
192
- * Describes the message buf.validate.MessageConstraints.
193
- * Use `create(MessageConstraintsSchema)` to create a new message.
317
+ * Describes the message buf.validate.MessageOneofRule.
318
+ * Use `create(MessageOneofRuleSchema)` to create a new message.
194
319
  */
195
- export declare const MessageConstraintsSchema: GenMessage<MessageConstraints, MessageConstraintsJson>;
320
+ export declare const MessageOneofRuleSchema: GenMessage<MessageOneofRule, {
321
+ jsonType: MessageOneofRuleJson;
322
+ }>;
196
323
  /**
197
- * The `OneofConstraints` message type enables you to manage constraints for
324
+ * The `OneofRules` message type enables you to manage rules for
198
325
  * oneof fields in your protobuf messages.
199
326
  *
200
- * @generated from message buf.validate.OneofConstraints
327
+ * @generated from message buf.validate.OneofRules
201
328
  */
202
- export type OneofConstraints = Message<"buf.validate.OneofConstraints"> & {
329
+ export type OneofRules = Message<"buf.validate.OneofRules"> & {
203
330
  /**
204
331
  * If `required` is true, exactly one field of the oneof must be present. A
205
332
  * validation error is returned if no fields in the oneof are present. The
206
- * field itself may still be a default value; further constraints
333
+ * field itself may still be a default value; further rules
207
334
  * should be placed on the fields themselves to ensure they are valid values,
208
335
  * such as `min_len` or `gt`.
209
336
  *
@@ -224,16 +351,16 @@ export type OneofConstraints = Message<"buf.validate.OneofConstraints"> & {
224
351
  required: boolean;
225
352
  };
226
353
  /**
227
- * The `OneofConstraints` message type enables you to manage constraints for
354
+ * The `OneofRules` message type enables you to manage rules for
228
355
  * oneof fields in your protobuf messages.
229
356
  *
230
- * @generated from message buf.validate.OneofConstraints
357
+ * @generated from message buf.validate.OneofRules
231
358
  */
232
- export type OneofConstraintsJson = {
359
+ export type OneofRulesJson = {
233
360
  /**
234
361
  * If `required` is true, exactly one field of the oneof must be present. A
235
362
  * validation error is returned if no fields in the oneof are present. The
236
- * field itself may still be a default value; further constraints
363
+ * field itself may still be a default value; further rules
237
364
  * should be placed on the fields themselves to ensure they are valid values,
238
365
  * such as `min_len` or `gt`.
239
366
  *
@@ -254,21 +381,23 @@ export type OneofConstraintsJson = {
254
381
  required?: boolean;
255
382
  };
256
383
  /**
257
- * Describes the message buf.validate.OneofConstraints.
258
- * Use `create(OneofConstraintsSchema)` to create a new message.
384
+ * Describes the message buf.validate.OneofRules.
385
+ * Use `create(OneofRulesSchema)` to create a new message.
259
386
  */
260
- export declare const OneofConstraintsSchema: GenMessage<OneofConstraints, OneofConstraintsJson>;
387
+ export declare const OneofRulesSchema: GenMessage<OneofRules, {
388
+ jsonType: OneofRulesJson;
389
+ }>;
261
390
  /**
262
- * FieldConstraints encapsulates the rules for each type of field. Depending on
391
+ * FieldRules encapsulates the rules for each type of field. Depending on
263
392
  * the field, the correct set should be used to ensure proper validations.
264
393
  *
265
- * @generated from message buf.validate.FieldConstraints
394
+ * @generated from message buf.validate.FieldRules
266
395
  */
267
- export type FieldConstraints = Message<"buf.validate.FieldConstraints"> & {
396
+ export type FieldRules = Message<"buf.validate.FieldRules"> & {
268
397
  /**
269
398
  * `cel` is a repeated field used to represent a textual expression
270
- * in the Common Expression Language (CEL) syntax. For more information on
271
- * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
399
+ * in the Common Expression Language (CEL) syntax. For more information,
400
+ * [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
272
401
  *
273
402
  * ```proto
274
403
  * message MyMessage {
@@ -281,9 +410,9 @@ export type FieldConstraints = Message<"buf.validate.FieldConstraints"> & {
281
410
  * }
282
411
  * ```
283
412
  *
284
- * @generated from field: repeated buf.validate.Constraint cel = 23;
413
+ * @generated from field: repeated buf.validate.Rule cel = 23;
285
414
  */
286
- cel: Constraint[];
415
+ cel: Rule[];
287
416
  /**
288
417
  * If `required` is true, the field must be populated. A populated field can be
289
418
  * described as "serialized in the wire format," which includes:
@@ -295,6 +424,7 @@ export type FieldConstraints = Message<"buf.validate.FieldConstraints"> & {
295
424
  * - proto2 scalar fields (both optional and required)
296
425
  * - proto3 scalar fields must be non-zero to be considered populated
297
426
  * - repeated and map fields must be non-empty to be considered populated
427
+ * - map keys/values and repeated items are always considered populated
298
428
  *
299
429
  * ```proto
300
430
  * message MyMessage {
@@ -325,7 +455,7 @@ export type FieldConstraints = Message<"buf.validate.FieldConstraints"> & {
325
455
  */
326
456
  ignore: Ignore;
327
457
  /**
328
- * @generated from oneof buf.validate.FieldConstraints.type
458
+ * @generated from oneof buf.validate.FieldRules.type
329
459
  */
330
460
  type: {
331
461
  /**
@@ -465,16 +595,16 @@ export type FieldConstraints = Message<"buf.validate.FieldConstraints"> & {
465
595
  };
466
596
  };
467
597
  /**
468
- * FieldConstraints encapsulates the rules for each type of field. Depending on
598
+ * FieldRules encapsulates the rules for each type of field. Depending on
469
599
  * the field, the correct set should be used to ensure proper validations.
470
600
  *
471
- * @generated from message buf.validate.FieldConstraints
601
+ * @generated from message buf.validate.FieldRules
472
602
  */
473
- export type FieldConstraintsJson = {
603
+ export type FieldRulesJson = {
474
604
  /**
475
605
  * `cel` is a repeated field used to represent a textual expression
476
- * in the Common Expression Language (CEL) syntax. For more information on
477
- * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
606
+ * in the Common Expression Language (CEL) syntax. For more information,
607
+ * [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
478
608
  *
479
609
  * ```proto
480
610
  * message MyMessage {
@@ -487,9 +617,9 @@ export type FieldConstraintsJson = {
487
617
  * }
488
618
  * ```
489
619
  *
490
- * @generated from field: repeated buf.validate.Constraint cel = 23;
620
+ * @generated from field: repeated buf.validate.Rule cel = 23;
491
621
  */
492
- cel?: ConstraintJson[];
622
+ cel?: RuleJson[];
493
623
  /**
494
624
  * If `required` is true, the field must be populated. A populated field can be
495
625
  * described as "serialized in the wire format," which includes:
@@ -501,6 +631,7 @@ export type FieldConstraintsJson = {
501
631
  * - proto2 scalar fields (both optional and required)
502
632
  * - proto3 scalar fields must be non-zero to be considered populated
503
633
  * - repeated and map fields must be non-empty to be considered populated
634
+ * - map keys/values and repeated items are always considered populated
504
635
  *
505
636
  * ```proto
506
637
  * message MyMessage {
@@ -622,21 +753,23 @@ export type FieldConstraintsJson = {
622
753
  timestamp?: TimestampRulesJson;
623
754
  };
624
755
  /**
625
- * Describes the message buf.validate.FieldConstraints.
626
- * Use `create(FieldConstraintsSchema)` to create a new message.
756
+ * Describes the message buf.validate.FieldRules.
757
+ * Use `create(FieldRulesSchema)` to create a new message.
627
758
  */
628
- export declare const FieldConstraintsSchema: GenMessage<FieldConstraints, FieldConstraintsJson>;
759
+ export declare const FieldRulesSchema: GenMessage<FieldRules, {
760
+ jsonType: FieldRulesJson;
761
+ }>;
629
762
  /**
630
- * PredefinedConstraints are custom constraints that can be re-used with
763
+ * PredefinedRules are custom rules that can be re-used with
631
764
  * multiple fields.
632
765
  *
633
- * @generated from message buf.validate.PredefinedConstraints
766
+ * @generated from message buf.validate.PredefinedRules
634
767
  */
635
- export type PredefinedConstraints = Message<"buf.validate.PredefinedConstraints"> & {
768
+ export type PredefinedRules = Message<"buf.validate.PredefinedRules"> & {
636
769
  /**
637
770
  * `cel` is a repeated field used to represent a textual expression
638
- * in the Common Expression Language (CEL) syntax. For more information on
639
- * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
771
+ * in the Common Expression Language (CEL) syntax. For more information,
772
+ * [see our documentation](https://buf.build/docs/protovalidate/schemas/predefined-rules/).
640
773
  *
641
774
  * ```proto
642
775
  * message MyMessage {
@@ -649,21 +782,21 @@ export type PredefinedConstraints = Message<"buf.validate.PredefinedConstraints"
649
782
  * }
650
783
  * ```
651
784
  *
652
- * @generated from field: repeated buf.validate.Constraint cel = 1;
785
+ * @generated from field: repeated buf.validate.Rule cel = 1;
653
786
  */
654
- cel: Constraint[];
787
+ cel: Rule[];
655
788
  };
656
789
  /**
657
- * PredefinedConstraints are custom constraints that can be re-used with
790
+ * PredefinedRules are custom rules that can be re-used with
658
791
  * multiple fields.
659
792
  *
660
- * @generated from message buf.validate.PredefinedConstraints
793
+ * @generated from message buf.validate.PredefinedRules
661
794
  */
662
- export type PredefinedConstraintsJson = {
795
+ export type PredefinedRulesJson = {
663
796
  /**
664
797
  * `cel` is a repeated field used to represent a textual expression
665
- * in the Common Expression Language (CEL) syntax. For more information on
666
- * CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).
798
+ * in the Common Expression Language (CEL) syntax. For more information,
799
+ * [see our documentation](https://buf.build/docs/protovalidate/schemas/predefined-rules/).
667
800
  *
668
801
  * ```proto
669
802
  * message MyMessage {
@@ -676,17 +809,19 @@ export type PredefinedConstraintsJson = {
676
809
  * }
677
810
  * ```
678
811
  *
679
- * @generated from field: repeated buf.validate.Constraint cel = 1;
812
+ * @generated from field: repeated buf.validate.Rule cel = 1;
680
813
  */
681
- cel?: ConstraintJson[];
814
+ cel?: RuleJson[];
682
815
  };
683
816
  /**
684
- * Describes the message buf.validate.PredefinedConstraints.
685
- * Use `create(PredefinedConstraintsSchema)` to create a new message.
817
+ * Describes the message buf.validate.PredefinedRules.
818
+ * Use `create(PredefinedRulesSchema)` to create a new message.
686
819
  */
687
- export declare const PredefinedConstraintsSchema: GenMessage<PredefinedConstraints, PredefinedConstraintsJson>;
820
+ export declare const PredefinedRulesSchema: GenMessage<PredefinedRules, {
821
+ jsonType: PredefinedRulesJson;
822
+ }>;
688
823
  /**
689
- * FloatRules describes the constraints applied to `float` values. These
824
+ * FloatRules describes the rules applied to `float` values. These
690
825
  * rules may also be applied to the `google.protobuf.FloatValue` Well-Known-Type.
691
826
  *
692
827
  * @generated from message buf.validate.FloatRules
@@ -843,14 +978,14 @@ export type FloatRules = Message<"buf.validate.FloatRules"> & {
843
978
  finite: boolean;
844
979
  /**
845
980
  * `example` specifies values that the field may have. These values SHOULD
846
- * conform to other constraints. `example` values will not impact validation
981
+ * conform to other rules. `example` values will not impact validation
847
982
  * but may be used as helpful guidance on how to populate the given field.
848
983
  *
849
984
  * ```proto
850
985
  * message MyFloat {
851
986
  * float value = 1 [
852
987
  * (buf.validate.field).float.example = 1.0,
853
- * (buf.validate.field).float.example = "Infinity"
988
+ * (buf.validate.field).float.example = inf
854
989
  * ];
855
990
  * }
856
991
  * ```
@@ -860,7 +995,7 @@ export type FloatRules = Message<"buf.validate.FloatRules"> & {
860
995
  example: number[];
861
996
  };
862
997
  /**
863
- * FloatRules describes the constraints applied to `float` values. These
998
+ * FloatRules describes the rules applied to `float` values. These
864
999
  * rules may also be applied to the `google.protobuf.FloatValue` Well-Known-Type.
865
1000
  *
866
1001
  * @generated from message buf.validate.FloatRules
@@ -995,14 +1130,14 @@ export type FloatRulesJson = {
995
1130
  finite?: boolean;
996
1131
  /**
997
1132
  * `example` specifies values that the field may have. These values SHOULD
998
- * conform to other constraints. `example` values will not impact validation
1133
+ * conform to other rules. `example` values will not impact validation
999
1134
  * but may be used as helpful guidance on how to populate the given field.
1000
1135
  *
1001
1136
  * ```proto
1002
1137
  * message MyFloat {
1003
1138
  * float value = 1 [
1004
1139
  * (buf.validate.field).float.example = 1.0,
1005
- * (buf.validate.field).float.example = "Infinity"
1140
+ * (buf.validate.field).float.example = inf
1006
1141
  * ];
1007
1142
  * }
1008
1143
  * ```
@@ -1015,9 +1150,11 @@ export type FloatRulesJson = {
1015
1150
  * Describes the message buf.validate.FloatRules.
1016
1151
  * Use `create(FloatRulesSchema)` to create a new message.
1017
1152
  */
1018
- export declare const FloatRulesSchema: GenMessage<FloatRules, FloatRulesJson>;
1153
+ export declare const FloatRulesSchema: GenMessage<FloatRules, {
1154
+ jsonType: FloatRulesJson;
1155
+ }>;
1019
1156
  /**
1020
- * DoubleRules describes the constraints applied to `double` values. These
1157
+ * DoubleRules describes the rules applied to `double` values. These
1021
1158
  * rules may also be applied to the `google.protobuf.DoubleValue` Well-Known-Type.
1022
1159
  *
1023
1160
  * @generated from message buf.validate.DoubleRules
@@ -1174,14 +1311,14 @@ export type DoubleRules = Message<"buf.validate.DoubleRules"> & {
1174
1311
  finite: boolean;
1175
1312
  /**
1176
1313
  * `example` specifies values that the field may have. These values SHOULD
1177
- * conform to other constraints. `example` values will not impact validation
1314
+ * conform to other rules. `example` values will not impact validation
1178
1315
  * but may be used as helpful guidance on how to populate the given field.
1179
1316
  *
1180
1317
  * ```proto
1181
1318
  * message MyDouble {
1182
1319
  * double value = 1 [
1183
1320
  * (buf.validate.field).double.example = 1.0,
1184
- * (buf.validate.field).double.example = "Infinity"
1321
+ * (buf.validate.field).double.example = inf
1185
1322
  * ];
1186
1323
  * }
1187
1324
  * ```
@@ -1191,7 +1328,7 @@ export type DoubleRules = Message<"buf.validate.DoubleRules"> & {
1191
1328
  example: number[];
1192
1329
  };
1193
1330
  /**
1194
- * DoubleRules describes the constraints applied to `double` values. These
1331
+ * DoubleRules describes the rules applied to `double` values. These
1195
1332
  * rules may also be applied to the `google.protobuf.DoubleValue` Well-Known-Type.
1196
1333
  *
1197
1334
  * @generated from message buf.validate.DoubleRules
@@ -1326,14 +1463,14 @@ export type DoubleRulesJson = {
1326
1463
  finite?: boolean;
1327
1464
  /**
1328
1465
  * `example` specifies values that the field may have. These values SHOULD
1329
- * conform to other constraints. `example` values will not impact validation
1466
+ * conform to other rules. `example` values will not impact validation
1330
1467
  * but may be used as helpful guidance on how to populate the given field.
1331
1468
  *
1332
1469
  * ```proto
1333
1470
  * message MyDouble {
1334
1471
  * double value = 1 [
1335
1472
  * (buf.validate.field).double.example = 1.0,
1336
- * (buf.validate.field).double.example = "Infinity"
1473
+ * (buf.validate.field).double.example = inf
1337
1474
  * ];
1338
1475
  * }
1339
1476
  * ```
@@ -1346,9 +1483,11 @@ export type DoubleRulesJson = {
1346
1483
  * Describes the message buf.validate.DoubleRules.
1347
1484
  * Use `create(DoubleRulesSchema)` to create a new message.
1348
1485
  */
1349
- export declare const DoubleRulesSchema: GenMessage<DoubleRules, DoubleRulesJson>;
1486
+ export declare const DoubleRulesSchema: GenMessage<DoubleRules, {
1487
+ jsonType: DoubleRulesJson;
1488
+ }>;
1350
1489
  /**
1351
- * Int32Rules describes the constraints applied to `int32` values. These
1490
+ * Int32Rules describes the rules applied to `int32` values. These
1352
1491
  * rules may also be applied to the `google.protobuf.Int32Value` Well-Known-Type.
1353
1492
  *
1354
1493
  * @generated from message buf.validate.Int32Rules
@@ -1498,7 +1637,7 @@ export type Int32Rules = Message<"buf.validate.Int32Rules"> & {
1498
1637
  notIn: number[];
1499
1638
  /**
1500
1639
  * `example` specifies values that the field may have. These values SHOULD
1501
- * conform to other constraints. `example` values will not impact validation
1640
+ * conform to other rules. `example` values will not impact validation
1502
1641
  * but may be used as helpful guidance on how to populate the given field.
1503
1642
  *
1504
1643
  * ```proto
@@ -1515,7 +1654,7 @@ export type Int32Rules = Message<"buf.validate.Int32Rules"> & {
1515
1654
  example: number[];
1516
1655
  };
1517
1656
  /**
1518
- * Int32Rules describes the constraints applied to `int32` values. These
1657
+ * Int32Rules describes the rules applied to `int32` values. These
1519
1658
  * rules may also be applied to the `google.protobuf.Int32Value` Well-Known-Type.
1520
1659
  *
1521
1660
  * @generated from message buf.validate.Int32Rules
@@ -1643,7 +1782,7 @@ export type Int32RulesJson = {
1643
1782
  notIn?: number[];
1644
1783
  /**
1645
1784
  * `example` specifies values that the field may have. These values SHOULD
1646
- * conform to other constraints. `example` values will not impact validation
1785
+ * conform to other rules. `example` values will not impact validation
1647
1786
  * but may be used as helpful guidance on how to populate the given field.
1648
1787
  *
1649
1788
  * ```proto
@@ -1663,9 +1802,11 @@ export type Int32RulesJson = {
1663
1802
  * Describes the message buf.validate.Int32Rules.
1664
1803
  * Use `create(Int32RulesSchema)` to create a new message.
1665
1804
  */
1666
- export declare const Int32RulesSchema: GenMessage<Int32Rules, Int32RulesJson>;
1805
+ export declare const Int32RulesSchema: GenMessage<Int32Rules, {
1806
+ jsonType: Int32RulesJson;
1807
+ }>;
1667
1808
  /**
1668
- * Int64Rules describes the constraints applied to `int64` values. These
1809
+ * Int64Rules describes the rules applied to `int64` values. These
1669
1810
  * rules may also be applied to the `google.protobuf.Int64Value` Well-Known-Type.
1670
1811
  *
1671
1812
  * @generated from message buf.validate.Int64Rules
@@ -1815,7 +1956,7 @@ export type Int64Rules = Message<"buf.validate.Int64Rules"> & {
1815
1956
  notIn: bigint[];
1816
1957
  /**
1817
1958
  * `example` specifies values that the field may have. These values SHOULD
1818
- * conform to other constraints. `example` values will not impact validation
1959
+ * conform to other rules. `example` values will not impact validation
1819
1960
  * but may be used as helpful guidance on how to populate the given field.
1820
1961
  *
1821
1962
  * ```proto
@@ -1832,7 +1973,7 @@ export type Int64Rules = Message<"buf.validate.Int64Rules"> & {
1832
1973
  example: bigint[];
1833
1974
  };
1834
1975
  /**
1835
- * Int64Rules describes the constraints applied to `int64` values. These
1976
+ * Int64Rules describes the rules applied to `int64` values. These
1836
1977
  * rules may also be applied to the `google.protobuf.Int64Value` Well-Known-Type.
1837
1978
  *
1838
1979
  * @generated from message buf.validate.Int64Rules
@@ -1960,7 +2101,7 @@ export type Int64RulesJson = {
1960
2101
  notIn?: string[];
1961
2102
  /**
1962
2103
  * `example` specifies values that the field may have. These values SHOULD
1963
- * conform to other constraints. `example` values will not impact validation
2104
+ * conform to other rules. `example` values will not impact validation
1964
2105
  * but may be used as helpful guidance on how to populate the given field.
1965
2106
  *
1966
2107
  * ```proto
@@ -1980,9 +2121,11 @@ export type Int64RulesJson = {
1980
2121
  * Describes the message buf.validate.Int64Rules.
1981
2122
  * Use `create(Int64RulesSchema)` to create a new message.
1982
2123
  */
1983
- export declare const Int64RulesSchema: GenMessage<Int64Rules, Int64RulesJson>;
2124
+ export declare const Int64RulesSchema: GenMessage<Int64Rules, {
2125
+ jsonType: Int64RulesJson;
2126
+ }>;
1984
2127
  /**
1985
- * UInt32Rules describes the constraints applied to `uint32` values. These
2128
+ * UInt32Rules describes the rules applied to `uint32` values. These
1986
2129
  * rules may also be applied to the `google.protobuf.UInt32Value` Well-Known-Type.
1987
2130
  *
1988
2131
  * @generated from message buf.validate.UInt32Rules
@@ -2132,7 +2275,7 @@ export type UInt32Rules = Message<"buf.validate.UInt32Rules"> & {
2132
2275
  notIn: number[];
2133
2276
  /**
2134
2277
  * `example` specifies values that the field may have. These values SHOULD
2135
- * conform to other constraints. `example` values will not impact validation
2278
+ * conform to other rules. `example` values will not impact validation
2136
2279
  * but may be used as helpful guidance on how to populate the given field.
2137
2280
  *
2138
2281
  * ```proto
@@ -2149,7 +2292,7 @@ export type UInt32Rules = Message<"buf.validate.UInt32Rules"> & {
2149
2292
  example: number[];
2150
2293
  };
2151
2294
  /**
2152
- * UInt32Rules describes the constraints applied to `uint32` values. These
2295
+ * UInt32Rules describes the rules applied to `uint32` values. These
2153
2296
  * rules may also be applied to the `google.protobuf.UInt32Value` Well-Known-Type.
2154
2297
  *
2155
2298
  * @generated from message buf.validate.UInt32Rules
@@ -2277,7 +2420,7 @@ export type UInt32RulesJson = {
2277
2420
  notIn?: number[];
2278
2421
  /**
2279
2422
  * `example` specifies values that the field may have. These values SHOULD
2280
- * conform to other constraints. `example` values will not impact validation
2423
+ * conform to other rules. `example` values will not impact validation
2281
2424
  * but may be used as helpful guidance on how to populate the given field.
2282
2425
  *
2283
2426
  * ```proto
@@ -2297,9 +2440,11 @@ export type UInt32RulesJson = {
2297
2440
  * Describes the message buf.validate.UInt32Rules.
2298
2441
  * Use `create(UInt32RulesSchema)` to create a new message.
2299
2442
  */
2300
- export declare const UInt32RulesSchema: GenMessage<UInt32Rules, UInt32RulesJson>;
2443
+ export declare const UInt32RulesSchema: GenMessage<UInt32Rules, {
2444
+ jsonType: UInt32RulesJson;
2445
+ }>;
2301
2446
  /**
2302
- * UInt64Rules describes the constraints applied to `uint64` values. These
2447
+ * UInt64Rules describes the rules applied to `uint64` values. These
2303
2448
  * rules may also be applied to the `google.protobuf.UInt64Value` Well-Known-Type.
2304
2449
  *
2305
2450
  * @generated from message buf.validate.UInt64Rules
@@ -2449,7 +2594,7 @@ export type UInt64Rules = Message<"buf.validate.UInt64Rules"> & {
2449
2594
  notIn: bigint[];
2450
2595
  /**
2451
2596
  * `example` specifies values that the field may have. These values SHOULD
2452
- * conform to other constraints. `example` values will not impact validation
2597
+ * conform to other rules. `example` values will not impact validation
2453
2598
  * but may be used as helpful guidance on how to populate the given field.
2454
2599
  *
2455
2600
  * ```proto
@@ -2466,7 +2611,7 @@ export type UInt64Rules = Message<"buf.validate.UInt64Rules"> & {
2466
2611
  example: bigint[];
2467
2612
  };
2468
2613
  /**
2469
- * UInt64Rules describes the constraints applied to `uint64` values. These
2614
+ * UInt64Rules describes the rules applied to `uint64` values. These
2470
2615
  * rules may also be applied to the `google.protobuf.UInt64Value` Well-Known-Type.
2471
2616
  *
2472
2617
  * @generated from message buf.validate.UInt64Rules
@@ -2594,7 +2739,7 @@ export type UInt64RulesJson = {
2594
2739
  notIn?: string[];
2595
2740
  /**
2596
2741
  * `example` specifies values that the field may have. These values SHOULD
2597
- * conform to other constraints. `example` values will not impact validation
2742
+ * conform to other rules. `example` values will not impact validation
2598
2743
  * but may be used as helpful guidance on how to populate the given field.
2599
2744
  *
2600
2745
  * ```proto
@@ -2614,9 +2759,11 @@ export type UInt64RulesJson = {
2614
2759
  * Describes the message buf.validate.UInt64Rules.
2615
2760
  * Use `create(UInt64RulesSchema)` to create a new message.
2616
2761
  */
2617
- export declare const UInt64RulesSchema: GenMessage<UInt64Rules, UInt64RulesJson>;
2762
+ export declare const UInt64RulesSchema: GenMessage<UInt64Rules, {
2763
+ jsonType: UInt64RulesJson;
2764
+ }>;
2618
2765
  /**
2619
- * SInt32Rules describes the constraints applied to `sint32` values.
2766
+ * SInt32Rules describes the rules applied to `sint32` values.
2620
2767
  *
2621
2768
  * @generated from message buf.validate.SInt32Rules
2622
2769
  */
@@ -2765,7 +2912,7 @@ export type SInt32Rules = Message<"buf.validate.SInt32Rules"> & {
2765
2912
  notIn: number[];
2766
2913
  /**
2767
2914
  * `example` specifies values that the field may have. These values SHOULD
2768
- * conform to other constraints. `example` values will not impact validation
2915
+ * conform to other rules. `example` values will not impact validation
2769
2916
  * but may be used as helpful guidance on how to populate the given field.
2770
2917
  *
2771
2918
  * ```proto
@@ -2782,7 +2929,7 @@ export type SInt32Rules = Message<"buf.validate.SInt32Rules"> & {
2782
2929
  example: number[];
2783
2930
  };
2784
2931
  /**
2785
- * SInt32Rules describes the constraints applied to `sint32` values.
2932
+ * SInt32Rules describes the rules applied to `sint32` values.
2786
2933
  *
2787
2934
  * @generated from message buf.validate.SInt32Rules
2788
2935
  */
@@ -2909,7 +3056,7 @@ export type SInt32RulesJson = {
2909
3056
  notIn?: number[];
2910
3057
  /**
2911
3058
  * `example` specifies values that the field may have. These values SHOULD
2912
- * conform to other constraints. `example` values will not impact validation
3059
+ * conform to other rules. `example` values will not impact validation
2913
3060
  * but may be used as helpful guidance on how to populate the given field.
2914
3061
  *
2915
3062
  * ```proto
@@ -2929,9 +3076,11 @@ export type SInt32RulesJson = {
2929
3076
  * Describes the message buf.validate.SInt32Rules.
2930
3077
  * Use `create(SInt32RulesSchema)` to create a new message.
2931
3078
  */
2932
- export declare const SInt32RulesSchema: GenMessage<SInt32Rules, SInt32RulesJson>;
3079
+ export declare const SInt32RulesSchema: GenMessage<SInt32Rules, {
3080
+ jsonType: SInt32RulesJson;
3081
+ }>;
2933
3082
  /**
2934
- * SInt64Rules describes the constraints applied to `sint64` values.
3083
+ * SInt64Rules describes the rules applied to `sint64` values.
2935
3084
  *
2936
3085
  * @generated from message buf.validate.SInt64Rules
2937
3086
  */
@@ -3080,7 +3229,7 @@ export type SInt64Rules = Message<"buf.validate.SInt64Rules"> & {
3080
3229
  notIn: bigint[];
3081
3230
  /**
3082
3231
  * `example` specifies values that the field may have. These values SHOULD
3083
- * conform to other constraints. `example` values will not impact validation
3232
+ * conform to other rules. `example` values will not impact validation
3084
3233
  * but may be used as helpful guidance on how to populate the given field.
3085
3234
  *
3086
3235
  * ```proto
@@ -3097,7 +3246,7 @@ export type SInt64Rules = Message<"buf.validate.SInt64Rules"> & {
3097
3246
  example: bigint[];
3098
3247
  };
3099
3248
  /**
3100
- * SInt64Rules describes the constraints applied to `sint64` values.
3249
+ * SInt64Rules describes the rules applied to `sint64` values.
3101
3250
  *
3102
3251
  * @generated from message buf.validate.SInt64Rules
3103
3252
  */
@@ -3224,7 +3373,7 @@ export type SInt64RulesJson = {
3224
3373
  notIn?: string[];
3225
3374
  /**
3226
3375
  * `example` specifies values that the field may have. These values SHOULD
3227
- * conform to other constraints. `example` values will not impact validation
3376
+ * conform to other rules. `example` values will not impact validation
3228
3377
  * but may be used as helpful guidance on how to populate the given field.
3229
3378
  *
3230
3379
  * ```proto
@@ -3244,9 +3393,11 @@ export type SInt64RulesJson = {
3244
3393
  * Describes the message buf.validate.SInt64Rules.
3245
3394
  * Use `create(SInt64RulesSchema)` to create a new message.
3246
3395
  */
3247
- export declare const SInt64RulesSchema: GenMessage<SInt64Rules, SInt64RulesJson>;
3396
+ export declare const SInt64RulesSchema: GenMessage<SInt64Rules, {
3397
+ jsonType: SInt64RulesJson;
3398
+ }>;
3248
3399
  /**
3249
- * Fixed32Rules describes the constraints applied to `fixed32` values.
3400
+ * Fixed32Rules describes the rules applied to `fixed32` values.
3250
3401
  *
3251
3402
  * @generated from message buf.validate.Fixed32Rules
3252
3403
  */
@@ -3395,7 +3546,7 @@ export type Fixed32Rules = Message<"buf.validate.Fixed32Rules"> & {
3395
3546
  notIn: number[];
3396
3547
  /**
3397
3548
  * `example` specifies values that the field may have. These values SHOULD
3398
- * conform to other constraints. `example` values will not impact validation
3549
+ * conform to other rules. `example` values will not impact validation
3399
3550
  * but may be used as helpful guidance on how to populate the given field.
3400
3551
  *
3401
3552
  * ```proto
@@ -3412,7 +3563,7 @@ export type Fixed32Rules = Message<"buf.validate.Fixed32Rules"> & {
3412
3563
  example: number[];
3413
3564
  };
3414
3565
  /**
3415
- * Fixed32Rules describes the constraints applied to `fixed32` values.
3566
+ * Fixed32Rules describes the rules applied to `fixed32` values.
3416
3567
  *
3417
3568
  * @generated from message buf.validate.Fixed32Rules
3418
3569
  */
@@ -3539,7 +3690,7 @@ export type Fixed32RulesJson = {
3539
3690
  notIn?: number[];
3540
3691
  /**
3541
3692
  * `example` specifies values that the field may have. These values SHOULD
3542
- * conform to other constraints. `example` values will not impact validation
3693
+ * conform to other rules. `example` values will not impact validation
3543
3694
  * but may be used as helpful guidance on how to populate the given field.
3544
3695
  *
3545
3696
  * ```proto
@@ -3559,9 +3710,11 @@ export type Fixed32RulesJson = {
3559
3710
  * Describes the message buf.validate.Fixed32Rules.
3560
3711
  * Use `create(Fixed32RulesSchema)` to create a new message.
3561
3712
  */
3562
- export declare const Fixed32RulesSchema: GenMessage<Fixed32Rules, Fixed32RulesJson>;
3713
+ export declare const Fixed32RulesSchema: GenMessage<Fixed32Rules, {
3714
+ jsonType: Fixed32RulesJson;
3715
+ }>;
3563
3716
  /**
3564
- * Fixed64Rules describes the constraints applied to `fixed64` values.
3717
+ * Fixed64Rules describes the rules applied to `fixed64` values.
3565
3718
  *
3566
3719
  * @generated from message buf.validate.Fixed64Rules
3567
3720
  */
@@ -3710,7 +3863,7 @@ export type Fixed64Rules = Message<"buf.validate.Fixed64Rules"> & {
3710
3863
  notIn: bigint[];
3711
3864
  /**
3712
3865
  * `example` specifies values that the field may have. These values SHOULD
3713
- * conform to other constraints. `example` values will not impact validation
3866
+ * conform to other rules. `example` values will not impact validation
3714
3867
  * but may be used as helpful guidance on how to populate the given field.
3715
3868
  *
3716
3869
  * ```proto
@@ -3727,7 +3880,7 @@ export type Fixed64Rules = Message<"buf.validate.Fixed64Rules"> & {
3727
3880
  example: bigint[];
3728
3881
  };
3729
3882
  /**
3730
- * Fixed64Rules describes the constraints applied to `fixed64` values.
3883
+ * Fixed64Rules describes the rules applied to `fixed64` values.
3731
3884
  *
3732
3885
  * @generated from message buf.validate.Fixed64Rules
3733
3886
  */
@@ -3854,7 +4007,7 @@ export type Fixed64RulesJson = {
3854
4007
  notIn?: string[];
3855
4008
  /**
3856
4009
  * `example` specifies values that the field may have. These values SHOULD
3857
- * conform to other constraints. `example` values will not impact validation
4010
+ * conform to other rules. `example` values will not impact validation
3858
4011
  * but may be used as helpful guidance on how to populate the given field.
3859
4012
  *
3860
4013
  * ```proto
@@ -3874,9 +4027,11 @@ export type Fixed64RulesJson = {
3874
4027
  * Describes the message buf.validate.Fixed64Rules.
3875
4028
  * Use `create(Fixed64RulesSchema)` to create a new message.
3876
4029
  */
3877
- export declare const Fixed64RulesSchema: GenMessage<Fixed64Rules, Fixed64RulesJson>;
4030
+ export declare const Fixed64RulesSchema: GenMessage<Fixed64Rules, {
4031
+ jsonType: Fixed64RulesJson;
4032
+ }>;
3878
4033
  /**
3879
- * SFixed32Rules describes the constraints applied to `fixed32` values.
4034
+ * SFixed32Rules describes the rules applied to `fixed32` values.
3880
4035
  *
3881
4036
  * @generated from message buf.validate.SFixed32Rules
3882
4037
  */
@@ -4025,7 +4180,7 @@ export type SFixed32Rules = Message<"buf.validate.SFixed32Rules"> & {
4025
4180
  notIn: number[];
4026
4181
  /**
4027
4182
  * `example` specifies values that the field may have. These values SHOULD
4028
- * conform to other constraints. `example` values will not impact validation
4183
+ * conform to other rules. `example` values will not impact validation
4029
4184
  * but may be used as helpful guidance on how to populate the given field.
4030
4185
  *
4031
4186
  * ```proto
@@ -4042,7 +4197,7 @@ export type SFixed32Rules = Message<"buf.validate.SFixed32Rules"> & {
4042
4197
  example: number[];
4043
4198
  };
4044
4199
  /**
4045
- * SFixed32Rules describes the constraints applied to `fixed32` values.
4200
+ * SFixed32Rules describes the rules applied to `fixed32` values.
4046
4201
  *
4047
4202
  * @generated from message buf.validate.SFixed32Rules
4048
4203
  */
@@ -4169,7 +4324,7 @@ export type SFixed32RulesJson = {
4169
4324
  notIn?: number[];
4170
4325
  /**
4171
4326
  * `example` specifies values that the field may have. These values SHOULD
4172
- * conform to other constraints. `example` values will not impact validation
4327
+ * conform to other rules. `example` values will not impact validation
4173
4328
  * but may be used as helpful guidance on how to populate the given field.
4174
4329
  *
4175
4330
  * ```proto
@@ -4189,9 +4344,11 @@ export type SFixed32RulesJson = {
4189
4344
  * Describes the message buf.validate.SFixed32Rules.
4190
4345
  * Use `create(SFixed32RulesSchema)` to create a new message.
4191
4346
  */
4192
- export declare const SFixed32RulesSchema: GenMessage<SFixed32Rules, SFixed32RulesJson>;
4347
+ export declare const SFixed32RulesSchema: GenMessage<SFixed32Rules, {
4348
+ jsonType: SFixed32RulesJson;
4349
+ }>;
4193
4350
  /**
4194
- * SFixed64Rules describes the constraints applied to `fixed64` values.
4351
+ * SFixed64Rules describes the rules applied to `fixed64` values.
4195
4352
  *
4196
4353
  * @generated from message buf.validate.SFixed64Rules
4197
4354
  */
@@ -4340,7 +4497,7 @@ export type SFixed64Rules = Message<"buf.validate.SFixed64Rules"> & {
4340
4497
  notIn: bigint[];
4341
4498
  /**
4342
4499
  * `example` specifies values that the field may have. These values SHOULD
4343
- * conform to other constraints. `example` values will not impact validation
4500
+ * conform to other rules. `example` values will not impact validation
4344
4501
  * but may be used as helpful guidance on how to populate the given field.
4345
4502
  *
4346
4503
  * ```proto
@@ -4357,7 +4514,7 @@ export type SFixed64Rules = Message<"buf.validate.SFixed64Rules"> & {
4357
4514
  example: bigint[];
4358
4515
  };
4359
4516
  /**
4360
- * SFixed64Rules describes the constraints applied to `fixed64` values.
4517
+ * SFixed64Rules describes the rules applied to `fixed64` values.
4361
4518
  *
4362
4519
  * @generated from message buf.validate.SFixed64Rules
4363
4520
  */
@@ -4484,7 +4641,7 @@ export type SFixed64RulesJson = {
4484
4641
  notIn?: string[];
4485
4642
  /**
4486
4643
  * `example` specifies values that the field may have. These values SHOULD
4487
- * conform to other constraints. `example` values will not impact validation
4644
+ * conform to other rules. `example` values will not impact validation
4488
4645
  * but may be used as helpful guidance on how to populate the given field.
4489
4646
  *
4490
4647
  * ```proto
@@ -4504,9 +4661,11 @@ export type SFixed64RulesJson = {
4504
4661
  * Describes the message buf.validate.SFixed64Rules.
4505
4662
  * Use `create(SFixed64RulesSchema)` to create a new message.
4506
4663
  */
4507
- export declare const SFixed64RulesSchema: GenMessage<SFixed64Rules, SFixed64RulesJson>;
4664
+ export declare const SFixed64RulesSchema: GenMessage<SFixed64Rules, {
4665
+ jsonType: SFixed64RulesJson;
4666
+ }>;
4508
4667
  /**
4509
- * BoolRules describes the constraints applied to `bool` values. These rules
4668
+ * BoolRules describes the rules applied to `bool` values. These rules
4510
4669
  * may also be applied to the `google.protobuf.BoolValue` Well-Known-Type.
4511
4670
  *
4512
4671
  * @generated from message buf.validate.BoolRules
@@ -4528,7 +4687,7 @@ export type BoolRules = Message<"buf.validate.BoolRules"> & {
4528
4687
  const: boolean;
4529
4688
  /**
4530
4689
  * `example` specifies values that the field may have. These values SHOULD
4531
- * conform to other constraints. `example` values will not impact validation
4690
+ * conform to other rules. `example` values will not impact validation
4532
4691
  * but may be used as helpful guidance on how to populate the given field.
4533
4692
  *
4534
4693
  * ```proto
@@ -4545,7 +4704,7 @@ export type BoolRules = Message<"buf.validate.BoolRules"> & {
4545
4704
  example: boolean[];
4546
4705
  };
4547
4706
  /**
4548
- * BoolRules describes the constraints applied to `bool` values. These rules
4707
+ * BoolRules describes the rules applied to `bool` values. These rules
4549
4708
  * may also be applied to the `google.protobuf.BoolValue` Well-Known-Type.
4550
4709
  *
4551
4710
  * @generated from message buf.validate.BoolRules
@@ -4567,7 +4726,7 @@ export type BoolRulesJson = {
4567
4726
  const?: boolean;
4568
4727
  /**
4569
4728
  * `example` specifies values that the field may have. These values SHOULD
4570
- * conform to other constraints. `example` values will not impact validation
4729
+ * conform to other rules. `example` values will not impact validation
4571
4730
  * but may be used as helpful guidance on how to populate the given field.
4572
4731
  *
4573
4732
  * ```proto
@@ -4587,9 +4746,11 @@ export type BoolRulesJson = {
4587
4746
  * Describes the message buf.validate.BoolRules.
4588
4747
  * Use `create(BoolRulesSchema)` to create a new message.
4589
4748
  */
4590
- export declare const BoolRulesSchema: GenMessage<BoolRules, BoolRulesJson>;
4749
+ export declare const BoolRulesSchema: GenMessage<BoolRules, {
4750
+ jsonType: BoolRulesJson;
4751
+ }>;
4591
4752
  /**
4592
- * StringRules describes the constraints applied to `string` values These
4753
+ * StringRules describes the rules applied to `string` values These
4593
4754
  * rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type.
4594
4755
  *
4595
4756
  * @generated from message buf.validate.StringRules
@@ -4810,15 +4971,21 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
4810
4971
  */
4811
4972
  notIn: string[];
4812
4973
  /**
4813
- * `WellKnown` rules provide advanced constraints against common string
4814
- * patterns
4974
+ * `WellKnown` rules provide advanced rules against common string
4975
+ * patterns.
4815
4976
  *
4816
4977
  * @generated from oneof buf.validate.StringRules.well_known
4817
4978
  */
4818
4979
  wellKnown: {
4819
4980
  /**
4820
- * `email` specifies that the field value must be a valid email address
4821
- * (addr-spec only) as defined by [RFC 5322](https://datatracker.ietf.org/doc/html/rfc5322#section-3.4.1).
4981
+ * `email` specifies that the field value must be a valid email address, for
4982
+ * example "foo@example.com".
4983
+ *
4984
+ * Conforms to the definition for a valid email address from the [HTML standard](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address).
4985
+ * Note that this standard willfully deviates from [RFC 5322](https://datatracker.ietf.org/doc/html/rfc5322),
4986
+ * which allows many unexpected forms of email addresses and will easily match
4987
+ * a typographical error.
4988
+ *
4822
4989
  * If the field value isn't a valid email address, an error message will be generated.
4823
4990
  *
4824
4991
  * ```proto
@@ -4834,10 +5001,18 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
4834
5001
  case: "email";
4835
5002
  } | {
4836
5003
  /**
4837
- * `hostname` specifies that the field value must be a valid
4838
- * hostname as defined by [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034#section-3.5). This constraint doesn't support
4839
- * internationalized domain names (IDNs). If the field value isn't a
4840
- * valid hostname, an error message will be generated.
5004
+ * `hostname` specifies that the field value must be a valid hostname, for
5005
+ * example "foo.example.com".
5006
+ *
5007
+ * A valid hostname follows the rules below:
5008
+ * - The name consists of one or more labels, separated by a dot (".").
5009
+ * - Each label can be 1 to 63 alphanumeric characters.
5010
+ * - A label can contain hyphens ("-"), but must not start or end with a hyphen.
5011
+ * - The right-most label must not be digits only.
5012
+ * - The name can have a trailing dot—for example, "foo.example.com.".
5013
+ * - The name can be 253 characters at most, excluding the optional trailing dot.
5014
+ *
5015
+ * If the field value isn't a valid hostname, an error message will be generated.
4841
5016
  *
4842
5017
  * ```proto
4843
5018
  * message MyString {
@@ -4852,8 +5027,15 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
4852
5027
  case: "hostname";
4853
5028
  } | {
4854
5029
  /**
4855
- * `ip` specifies that the field value must be a valid IP
4856
- * (v4 or v6) address, without surrounding square brackets for IPv6 addresses.
5030
+ * `ip` specifies that the field value must be a valid IP (v4 or v6) address.
5031
+ *
5032
+ * IPv4 addresses are expected in the dotted decimal format—for example, "192.168.5.21".
5033
+ * IPv6 addresses are expected in their text representation—for example, "::1",
5034
+ * or "2001:0DB8:ABCD:0012::0".
5035
+ *
5036
+ * Both formats are well-defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986).
5037
+ * Zone identifiers for IPv6 addresses (for example, "fe80::a%en1") are supported.
5038
+ *
4857
5039
  * If the field value isn't a valid IP address, an error message will be
4858
5040
  * generated.
4859
5041
  *
@@ -4870,9 +5052,9 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
4870
5052
  case: "ip";
4871
5053
  } | {
4872
5054
  /**
4873
- * `ipv4` specifies that the field value must be a valid IPv4
4874
- * address. If the field value isn't a valid IPv4 address, an error message
4875
- * will be generated.
5055
+ * `ipv4` specifies that the field value must be a valid IPv4 address—for
5056
+ * example "192.168.5.21". If the field value isn't a valid IPv4 address, an
5057
+ * error message will be generated.
4876
5058
  *
4877
5059
  * ```proto
4878
5060
  * message MyString {
@@ -4887,9 +5069,9 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
4887
5069
  case: "ipv4";
4888
5070
  } | {
4889
5071
  /**
4890
- * `ipv6` specifies that the field value must be a valid
4891
- * IPv6 address, without surrounding square brackets. If the field value is
4892
- * not a valid IPv6 address, an error message will be generated.
5072
+ * `ipv6` specifies that the field value must be a valid IPv6 address—for
5073
+ * example "::1", or "d7a:115c:a1e0:ab12:4843:cd96:626b:430b". If the field
5074
+ * value is not a valid IPv6 address, an error message will be generated.
4893
5075
  *
4894
5076
  * ```proto
4895
5077
  * message MyString {
@@ -4904,8 +5086,11 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
4904
5086
  case: "ipv6";
4905
5087
  } | {
4906
5088
  /**
4907
- * `uri` specifies that the field value must be a valid URI as defined by
4908
- * [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986#section-3).
5089
+ * `uri` specifies that the field value must be a valid URI, for example
5090
+ * "https://example.com/foo/bar?baz=quux#frag".
5091
+ *
5092
+ * URI is defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986).
5093
+ * Zone Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)).
4909
5094
  *
4910
5095
  * If the field value isn't a valid URI, an error message will be generated.
4911
5096
  *
@@ -4922,11 +5107,13 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
4922
5107
  case: "uri";
4923
5108
  } | {
4924
5109
  /**
4925
- * `uri_ref` specifies that the field value must be a valid URI Reference as
4926
- * defined by [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986#section-4.1).
5110
+ * `uri_ref` specifies that the field value must be a valid URI Reference—either
5111
+ * a URI such as "https://example.com/foo/bar?baz=quux#frag", or a Relative
5112
+ * Reference such as "./foo/bar?query".
4927
5113
  *
4928
- * A URI Reference is either a [URI](https://datatracker.ietf.org/doc/html/rfc3986#section-3),
4929
- * or a [Relative Reference](https://datatracker.ietf.org/doc/html/rfc3986#section-4.2).
5114
+ * URI, URI Reference, and Relative Reference are defined in the internet
5115
+ * standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). Zone
5116
+ * Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)).
4930
5117
  *
4931
5118
  * If the field value isn't a valid URI Reference, an error message will be
4932
5119
  * generated.
@@ -4945,10 +5132,9 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
4945
5132
  } | {
4946
5133
  /**
4947
5134
  * `address` specifies that the field value must be either a valid hostname
4948
- * as defined by [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034#section-3.5)
4949
- * (which doesn't support internationalized domain names or IDNs) or a valid
4950
- * IP (v4 or v6). If the field value isn't a valid hostname or IP, an error
4951
- * message will be generated.
5135
+ * (for example, "example.com"), or a valid IP (v4 or v6) address (for example,
5136
+ * "192.168.0.1", or "::1"). If the field value isn't a valid hostname or IP,
5137
+ * an error message will be generated.
4952
5138
  *
4953
5139
  * ```proto
4954
5140
  * message MyString {
@@ -4998,10 +5184,10 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
4998
5184
  case: "tuuid";
4999
5185
  } | {
5000
5186
  /**
5001
- * `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
5002
- * address with prefix length. If the field value isn't a valid IP with prefix
5003
- * length, an error message will be generated.
5004
- *
5187
+ * `ip_with_prefixlen` specifies that the field value must be a valid IP
5188
+ * (v4 or v6) address with prefix length—for example, "192.168.5.21/16" or
5189
+ * "2001:0DB8:ABCD:0012::F1/64". If the field value isn't a valid IP with
5190
+ * prefix length, an error message will be generated.
5005
5191
  *
5006
5192
  * ```proto
5007
5193
  * message MyString {
@@ -5017,9 +5203,9 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
5017
5203
  } | {
5018
5204
  /**
5019
5205
  * `ipv4_with_prefixlen` specifies that the field value must be a valid
5020
- * IPv4 address with prefix.
5021
- * If the field value isn't a valid IPv4 address with prefix length,
5022
- * an error message will be generated.
5206
+ * IPv4 address with prefix length—for example, "192.168.5.21/16". If the
5207
+ * field value isn't a valid IPv4 address with prefix length, an error
5208
+ * message will be generated.
5023
5209
  *
5024
5210
  * ```proto
5025
5211
  * message MyString {
@@ -5035,7 +5221,7 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
5035
5221
  } | {
5036
5222
  /**
5037
5223
  * `ipv6_with_prefixlen` specifies that the field value must be a valid
5038
- * IPv6 address with prefix length.
5224
+ * IPv6 address with prefix length—for example, "2001:0DB8:ABCD:0012::F1/64".
5039
5225
  * If the field value is not a valid IPv6 address with prefix length,
5040
5226
  * an error message will be generated.
5041
5227
  *
@@ -5052,10 +5238,15 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
5052
5238
  case: "ipv6WithPrefixlen";
5053
5239
  } | {
5054
5240
  /**
5055
- * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
5241
+ * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6)
5242
+ * prefix—for example, "192.168.0.0/16" or "2001:0DB8:ABCD:0012::0/64".
5243
+ *
5244
+ * The prefix must have all zeros for the unmasked bits. For example,
5245
+ * "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the
5246
+ * prefix, and the remaining 64 bits must be zero.
5247
+ *
5056
5248
  * If the field value isn't a valid IP prefix, an error message will be
5057
- * generated. The prefix must have all zeros for the masked bits of the prefix (e.g.,
5058
- * `127.0.0.0/16`, not `127.0.0.1/16`).
5249
+ * generated.
5059
5250
  *
5060
5251
  * ```proto
5061
5252
  * message MyString {
@@ -5071,9 +5262,14 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
5071
5262
  } | {
5072
5263
  /**
5073
5264
  * `ipv4_prefix` specifies that the field value must be a valid IPv4
5074
- * prefix. If the field value isn't a valid IPv4 prefix, an error message
5075
- * will be generated. The prefix must have all zeros for the masked bits of
5076
- * the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`).
5265
+ * prefix, for example "192.168.0.0/16".
5266
+ *
5267
+ * The prefix must have all zeros for the unmasked bits. For example,
5268
+ * "192.168.0.0/16" designates the left-most 16 bits for the prefix,
5269
+ * and the remaining 16 bits must be zero.
5270
+ *
5271
+ * If the field value isn't a valid IPv4 prefix, an error message
5272
+ * will be generated.
5077
5273
  *
5078
5274
  * ```proto
5079
5275
  * message MyString {
@@ -5088,10 +5284,15 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
5088
5284
  case: "ipv4Prefix";
5089
5285
  } | {
5090
5286
  /**
5091
- * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
5287
+ * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix—for
5288
+ * example, "2001:0DB8:ABCD:0012::0/64".
5289
+ *
5290
+ * The prefix must have all zeros for the unmasked bits. For example,
5291
+ * "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the
5292
+ * prefix, and the remaining 64 bits must be zero.
5293
+ *
5092
5294
  * If the field value is not a valid IPv6 prefix, an error message will be
5093
- * generated. The prefix must have all zeros for the masked bits of the prefix
5094
- * (e.g., `2001:db8::/48`, not `2001:db8::1/48`).
5295
+ * generated.
5095
5296
  *
5096
5297
  * ```proto
5097
5298
  * message MyString {
@@ -5106,10 +5307,16 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
5106
5307
  case: "ipv6Prefix";
5107
5308
  } | {
5108
5309
  /**
5109
- * `host_and_port` specifies the field value must be a valid host and port
5110
- * pair. The host must be a valid hostname or IP address while the port
5111
- * must be in the range of 0-65535, inclusive. IPv6 addresses must be delimited
5112
- * with square brackets (e.g., `[::1]:1234`).
5310
+ * `host_and_port` specifies that the field value must be valid host/port
5311
+ * pair—for example, "example.com:8080".
5312
+ *
5313
+ * The host can be one of:
5314
+ * - An IPv4 address in dotted decimal format—for example, "192.168.5.21".
5315
+ * - An IPv6 address enclosed in square brackets—for example, "[2001:0DB8:ABCD:0012::F1]".
5316
+ * - A hostname—for example, "example.com".
5317
+ *
5318
+ * The port is separated by a colon. It must be non-empty, with a decimal number
5319
+ * in the range of 0-65535, inclusive.
5113
5320
  *
5114
5321
  * @generated from field: bool host_and_port = 32;
5115
5322
  */
@@ -5165,7 +5372,7 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
5165
5372
  strict: boolean;
5166
5373
  /**
5167
5374
  * `example` specifies values that the field may have. These values SHOULD
5168
- * conform to other constraints. `example` values will not impact validation
5375
+ * conform to other rules. `example` values will not impact validation
5169
5376
  * but may be used as helpful guidance on how to populate the given field.
5170
5377
  *
5171
5378
  * ```proto
@@ -5182,7 +5389,7 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
5182
5389
  example: string[];
5183
5390
  };
5184
5391
  /**
5185
- * StringRules describes the constraints applied to `string` values These
5392
+ * StringRules describes the rules applied to `string` values These
5186
5393
  * rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type.
5187
5394
  *
5188
5395
  * @generated from message buf.validate.StringRules
@@ -5403,8 +5610,14 @@ export type StringRulesJson = {
5403
5610
  */
5404
5611
  notIn?: string[];
5405
5612
  /**
5406
- * `email` specifies that the field value must be a valid email address
5407
- * (addr-spec only) as defined by [RFC 5322](https://datatracker.ietf.org/doc/html/rfc5322#section-3.4.1).
5613
+ * `email` specifies that the field value must be a valid email address, for
5614
+ * example "foo@example.com".
5615
+ *
5616
+ * Conforms to the definition for a valid email address from the [HTML standard](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address).
5617
+ * Note that this standard willfully deviates from [RFC 5322](https://datatracker.ietf.org/doc/html/rfc5322),
5618
+ * which allows many unexpected forms of email addresses and will easily match
5619
+ * a typographical error.
5620
+ *
5408
5621
  * If the field value isn't a valid email address, an error message will be generated.
5409
5622
  *
5410
5623
  * ```proto
@@ -5418,10 +5631,18 @@ export type StringRulesJson = {
5418
5631
  */
5419
5632
  email?: boolean;
5420
5633
  /**
5421
- * `hostname` specifies that the field value must be a valid
5422
- * hostname as defined by [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034#section-3.5). This constraint doesn't support
5423
- * internationalized domain names (IDNs). If the field value isn't a
5424
- * valid hostname, an error message will be generated.
5634
+ * `hostname` specifies that the field value must be a valid hostname, for
5635
+ * example "foo.example.com".
5636
+ *
5637
+ * A valid hostname follows the rules below:
5638
+ * - The name consists of one or more labels, separated by a dot (".").
5639
+ * - Each label can be 1 to 63 alphanumeric characters.
5640
+ * - A label can contain hyphens ("-"), but must not start or end with a hyphen.
5641
+ * - The right-most label must not be digits only.
5642
+ * - The name can have a trailing dot—for example, "foo.example.com.".
5643
+ * - The name can be 253 characters at most, excluding the optional trailing dot.
5644
+ *
5645
+ * If the field value isn't a valid hostname, an error message will be generated.
5425
5646
  *
5426
5647
  * ```proto
5427
5648
  * message MyString {
@@ -5434,8 +5655,15 @@ export type StringRulesJson = {
5434
5655
  */
5435
5656
  hostname?: boolean;
5436
5657
  /**
5437
- * `ip` specifies that the field value must be a valid IP
5438
- * (v4 or v6) address, without surrounding square brackets for IPv6 addresses.
5658
+ * `ip` specifies that the field value must be a valid IP (v4 or v6) address.
5659
+ *
5660
+ * IPv4 addresses are expected in the dotted decimal format—for example, "192.168.5.21".
5661
+ * IPv6 addresses are expected in their text representation—for example, "::1",
5662
+ * or "2001:0DB8:ABCD:0012::0".
5663
+ *
5664
+ * Both formats are well-defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986).
5665
+ * Zone identifiers for IPv6 addresses (for example, "fe80::a%en1") are supported.
5666
+ *
5439
5667
  * If the field value isn't a valid IP address, an error message will be
5440
5668
  * generated.
5441
5669
  *
@@ -5450,9 +5678,9 @@ export type StringRulesJson = {
5450
5678
  */
5451
5679
  ip?: boolean;
5452
5680
  /**
5453
- * `ipv4` specifies that the field value must be a valid IPv4
5454
- * address. If the field value isn't a valid IPv4 address, an error message
5455
- * will be generated.
5681
+ * `ipv4` specifies that the field value must be a valid IPv4 address—for
5682
+ * example "192.168.5.21". If the field value isn't a valid IPv4 address, an
5683
+ * error message will be generated.
5456
5684
  *
5457
5685
  * ```proto
5458
5686
  * message MyString {
@@ -5465,9 +5693,9 @@ export type StringRulesJson = {
5465
5693
  */
5466
5694
  ipv4?: boolean;
5467
5695
  /**
5468
- * `ipv6` specifies that the field value must be a valid
5469
- * IPv6 address, without surrounding square brackets. If the field value is
5470
- * not a valid IPv6 address, an error message will be generated.
5696
+ * `ipv6` specifies that the field value must be a valid IPv6 address—for
5697
+ * example "::1", or "d7a:115c:a1e0:ab12:4843:cd96:626b:430b". If the field
5698
+ * value is not a valid IPv6 address, an error message will be generated.
5471
5699
  *
5472
5700
  * ```proto
5473
5701
  * message MyString {
@@ -5480,8 +5708,11 @@ export type StringRulesJson = {
5480
5708
  */
5481
5709
  ipv6?: boolean;
5482
5710
  /**
5483
- * `uri` specifies that the field value must be a valid URI as defined by
5484
- * [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986#section-3).
5711
+ * `uri` specifies that the field value must be a valid URI, for example
5712
+ * "https://example.com/foo/bar?baz=quux#frag".
5713
+ *
5714
+ * URI is defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986).
5715
+ * Zone Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)).
5485
5716
  *
5486
5717
  * If the field value isn't a valid URI, an error message will be generated.
5487
5718
  *
@@ -5496,11 +5727,13 @@ export type StringRulesJson = {
5496
5727
  */
5497
5728
  uri?: boolean;
5498
5729
  /**
5499
- * `uri_ref` specifies that the field value must be a valid URI Reference as
5500
- * defined by [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986#section-4.1).
5730
+ * `uri_ref` specifies that the field value must be a valid URI Reference—either
5731
+ * a URI such as "https://example.com/foo/bar?baz=quux#frag", or a Relative
5732
+ * Reference such as "./foo/bar?query".
5501
5733
  *
5502
- * A URI Reference is either a [URI](https://datatracker.ietf.org/doc/html/rfc3986#section-3),
5503
- * or a [Relative Reference](https://datatracker.ietf.org/doc/html/rfc3986#section-4.2).
5734
+ * URI, URI Reference, and Relative Reference are defined in the internet
5735
+ * standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). Zone
5736
+ * Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)).
5504
5737
  *
5505
5738
  * If the field value isn't a valid URI Reference, an error message will be
5506
5739
  * generated.
@@ -5517,10 +5750,9 @@ export type StringRulesJson = {
5517
5750
  uriRef?: boolean;
5518
5751
  /**
5519
5752
  * `address` specifies that the field value must be either a valid hostname
5520
- * as defined by [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034#section-3.5)
5521
- * (which doesn't support internationalized domain names or IDNs) or a valid
5522
- * IP (v4 or v6). If the field value isn't a valid hostname or IP, an error
5523
- * message will be generated.
5753
+ * (for example, "example.com"), or a valid IP (v4 or v6) address (for example,
5754
+ * "192.168.0.1", or "::1"). If the field value isn't a valid hostname or IP,
5755
+ * an error message will be generated.
5524
5756
  *
5525
5757
  * ```proto
5526
5758
  * message MyString {
@@ -5564,10 +5796,10 @@ export type StringRulesJson = {
5564
5796
  */
5565
5797
  tuuid?: boolean;
5566
5798
  /**
5567
- * `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
5568
- * address with prefix length. If the field value isn't a valid IP with prefix
5569
- * length, an error message will be generated.
5570
- *
5799
+ * `ip_with_prefixlen` specifies that the field value must be a valid IP
5800
+ * (v4 or v6) address with prefix length—for example, "192.168.5.21/16" or
5801
+ * "2001:0DB8:ABCD:0012::F1/64". If the field value isn't a valid IP with
5802
+ * prefix length, an error message will be generated.
5571
5803
  *
5572
5804
  * ```proto
5573
5805
  * message MyString {
@@ -5581,9 +5813,9 @@ export type StringRulesJson = {
5581
5813
  ipWithPrefixlen?: boolean;
5582
5814
  /**
5583
5815
  * `ipv4_with_prefixlen` specifies that the field value must be a valid
5584
- * IPv4 address with prefix.
5585
- * If the field value isn't a valid IPv4 address with prefix length,
5586
- * an error message will be generated.
5816
+ * IPv4 address with prefix length—for example, "192.168.5.21/16". If the
5817
+ * field value isn't a valid IPv4 address with prefix length, an error
5818
+ * message will be generated.
5587
5819
  *
5588
5820
  * ```proto
5589
5821
  * message MyString {
@@ -5597,7 +5829,7 @@ export type StringRulesJson = {
5597
5829
  ipv4WithPrefixlen?: boolean;
5598
5830
  /**
5599
5831
  * `ipv6_with_prefixlen` specifies that the field value must be a valid
5600
- * IPv6 address with prefix length.
5832
+ * IPv6 address with prefix length—for example, "2001:0DB8:ABCD:0012::F1/64".
5601
5833
  * If the field value is not a valid IPv6 address with prefix length,
5602
5834
  * an error message will be generated.
5603
5835
  *
@@ -5612,10 +5844,15 @@ export type StringRulesJson = {
5612
5844
  */
5613
5845
  ipv6WithPrefixlen?: boolean;
5614
5846
  /**
5615
- * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
5847
+ * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6)
5848
+ * prefix—for example, "192.168.0.0/16" or "2001:0DB8:ABCD:0012::0/64".
5849
+ *
5850
+ * The prefix must have all zeros for the unmasked bits. For example,
5851
+ * "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the
5852
+ * prefix, and the remaining 64 bits must be zero.
5853
+ *
5616
5854
  * If the field value isn't a valid IP prefix, an error message will be
5617
- * generated. The prefix must have all zeros for the masked bits of the prefix (e.g.,
5618
- * `127.0.0.0/16`, not `127.0.0.1/16`).
5855
+ * generated.
5619
5856
  *
5620
5857
  * ```proto
5621
5858
  * message MyString {
@@ -5629,9 +5866,14 @@ export type StringRulesJson = {
5629
5866
  ipPrefix?: boolean;
5630
5867
  /**
5631
5868
  * `ipv4_prefix` specifies that the field value must be a valid IPv4
5632
- * prefix. If the field value isn't a valid IPv4 prefix, an error message
5633
- * will be generated. The prefix must have all zeros for the masked bits of
5634
- * the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`).
5869
+ * prefix, for example "192.168.0.0/16".
5870
+ *
5871
+ * The prefix must have all zeros for the unmasked bits. For example,
5872
+ * "192.168.0.0/16" designates the left-most 16 bits for the prefix,
5873
+ * and the remaining 16 bits must be zero.
5874
+ *
5875
+ * If the field value isn't a valid IPv4 prefix, an error message
5876
+ * will be generated.
5635
5877
  *
5636
5878
  * ```proto
5637
5879
  * message MyString {
@@ -5644,10 +5886,15 @@ export type StringRulesJson = {
5644
5886
  */
5645
5887
  ipv4Prefix?: boolean;
5646
5888
  /**
5647
- * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
5889
+ * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix—for
5890
+ * example, "2001:0DB8:ABCD:0012::0/64".
5891
+ *
5892
+ * The prefix must have all zeros for the unmasked bits. For example,
5893
+ * "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the
5894
+ * prefix, and the remaining 64 bits must be zero.
5895
+ *
5648
5896
  * If the field value is not a valid IPv6 prefix, an error message will be
5649
- * generated. The prefix must have all zeros for the masked bits of the prefix
5650
- * (e.g., `2001:db8::/48`, not `2001:db8::1/48`).
5897
+ * generated.
5651
5898
  *
5652
5899
  * ```proto
5653
5900
  * message MyString {
@@ -5660,10 +5907,16 @@ export type StringRulesJson = {
5660
5907
  */
5661
5908
  ipv6Prefix?: boolean;
5662
5909
  /**
5663
- * `host_and_port` specifies the field value must be a valid host and port
5664
- * pair. The host must be a valid hostname or IP address while the port
5665
- * must be in the range of 0-65535, inclusive. IPv6 addresses must be delimited
5666
- * with square brackets (e.g., `[::1]:1234`).
5910
+ * `host_and_port` specifies that the field value must be valid host/port
5911
+ * pair—for example, "example.com:8080".
5912
+ *
5913
+ * The host can be one of:
5914
+ * - An IPv4 address in dotted decimal format—for example, "192.168.5.21".
5915
+ * - An IPv6 address enclosed in square brackets—for example, "[2001:0DB8:ABCD:0012::F1]".
5916
+ * - A hostname—for example, "example.com".
5917
+ *
5918
+ * The port is separated by a colon. It must be non-empty, with a decimal number
5919
+ * in the range of 0-65535, inclusive.
5667
5920
  *
5668
5921
  * @generated from field: bool host_and_port = 32;
5669
5922
  */
@@ -5712,7 +5965,7 @@ export type StringRulesJson = {
5712
5965
  strict?: boolean;
5713
5966
  /**
5714
5967
  * `example` specifies values that the field may have. These values SHOULD
5715
- * conform to other constraints. `example` values will not impact validation
5968
+ * conform to other rules. `example` values will not impact validation
5716
5969
  * but may be used as helpful guidance on how to populate the given field.
5717
5970
  *
5718
5971
  * ```proto
@@ -5732,9 +5985,11 @@ export type StringRulesJson = {
5732
5985
  * Describes the message buf.validate.StringRules.
5733
5986
  * Use `create(StringRulesSchema)` to create a new message.
5734
5987
  */
5735
- export declare const StringRulesSchema: GenMessage<StringRules, StringRulesJson>;
5988
+ export declare const StringRulesSchema: GenMessage<StringRules, {
5989
+ jsonType: StringRulesJson;
5990
+ }>;
5736
5991
  /**
5737
- * BytesRules describe the constraints applied to `bytes` values. These rules
5992
+ * BytesRules describe the rules applied to `bytes` values. These rules
5738
5993
  * may also be applied to the `google.protobuf.BytesValue` Well-Known-Type.
5739
5994
  *
5740
5995
  * @generated from message buf.validate.BytesRules
@@ -5892,7 +6147,7 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
5892
6147
  */
5893
6148
  notIn: Uint8Array[];
5894
6149
  /**
5895
- * WellKnown rules provide advanced constraints against common byte
6150
+ * WellKnown rules provide advanced rules against common byte
5896
6151
  * patterns
5897
6152
  *
5898
6153
  * @generated from oneof buf.validate.BytesRules.well_known
@@ -5900,7 +6155,7 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
5900
6155
  wellKnown: {
5901
6156
  /**
5902
6157
  * `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.
5903
- * If the field value doesn't meet this constraint, an error message is generated.
6158
+ * If the field value doesn't meet this rule, an error message is generated.
5904
6159
  *
5905
6160
  * ```proto
5906
6161
  * message MyBytes {
@@ -5916,7 +6171,7 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
5916
6171
  } | {
5917
6172
  /**
5918
6173
  * `ipv4` ensures that the field `value` is a valid IPv4 address in byte format.
5919
- * If the field value doesn't meet this constraint, an error message is generated.
6174
+ * If the field value doesn't meet this rule, an error message is generated.
5920
6175
  *
5921
6176
  * ```proto
5922
6177
  * message MyBytes {
@@ -5932,7 +6187,7 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
5932
6187
  } | {
5933
6188
  /**
5934
6189
  * `ipv6` ensures that the field `value` is a valid IPv6 address in byte format.
5935
- * If the field value doesn't meet this constraint, an error message is generated.
6190
+ * If the field value doesn't meet this rule, an error message is generated.
5936
6191
  * ```proto
5937
6192
  * message MyBytes {
5938
6193
  * // value must be a valid IPv6 address
@@ -5950,7 +6205,7 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
5950
6205
  };
5951
6206
  /**
5952
6207
  * `example` specifies values that the field may have. These values SHOULD
5953
- * conform to other constraints. `example` values will not impact validation
6208
+ * conform to other rules. `example` values will not impact validation
5954
6209
  * but may be used as helpful guidance on how to populate the given field.
5955
6210
  *
5956
6211
  * ```proto
@@ -5967,7 +6222,7 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
5967
6222
  example: Uint8Array[];
5968
6223
  };
5969
6224
  /**
5970
- * BytesRules describe the constraints applied to `bytes` values. These rules
6225
+ * BytesRules describe the rules applied to `bytes` values. These rules
5971
6226
  * may also be applied to the `google.protobuf.BytesValue` Well-Known-Type.
5972
6227
  *
5973
6228
  * @generated from message buf.validate.BytesRules
@@ -6126,7 +6381,7 @@ export type BytesRulesJson = {
6126
6381
  notIn?: string[];
6127
6382
  /**
6128
6383
  * `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.
6129
- * If the field value doesn't meet this constraint, an error message is generated.
6384
+ * If the field value doesn't meet this rule, an error message is generated.
6130
6385
  *
6131
6386
  * ```proto
6132
6387
  * message MyBytes {
@@ -6140,7 +6395,7 @@ export type BytesRulesJson = {
6140
6395
  ip?: boolean;
6141
6396
  /**
6142
6397
  * `ipv4` ensures that the field `value` is a valid IPv4 address in byte format.
6143
- * If the field value doesn't meet this constraint, an error message is generated.
6398
+ * If the field value doesn't meet this rule, an error message is generated.
6144
6399
  *
6145
6400
  * ```proto
6146
6401
  * message MyBytes {
@@ -6154,7 +6409,7 @@ export type BytesRulesJson = {
6154
6409
  ipv4?: boolean;
6155
6410
  /**
6156
6411
  * `ipv6` ensures that the field `value` is a valid IPv6 address in byte format.
6157
- * If the field value doesn't meet this constraint, an error message is generated.
6412
+ * If the field value doesn't meet this rule, an error message is generated.
6158
6413
  * ```proto
6159
6414
  * message MyBytes {
6160
6415
  * // value must be a valid IPv6 address
@@ -6167,7 +6422,7 @@ export type BytesRulesJson = {
6167
6422
  ipv6?: boolean;
6168
6423
  /**
6169
6424
  * `example` specifies values that the field may have. These values SHOULD
6170
- * conform to other constraints. `example` values will not impact validation
6425
+ * conform to other rules. `example` values will not impact validation
6171
6426
  * but may be used as helpful guidance on how to populate the given field.
6172
6427
  *
6173
6428
  * ```proto
@@ -6187,9 +6442,11 @@ export type BytesRulesJson = {
6187
6442
  * Describes the message buf.validate.BytesRules.
6188
6443
  * Use `create(BytesRulesSchema)` to create a new message.
6189
6444
  */
6190
- export declare const BytesRulesSchema: GenMessage<BytesRules, BytesRulesJson>;
6445
+ export declare const BytesRulesSchema: GenMessage<BytesRules, {
6446
+ jsonType: BytesRulesJson;
6447
+ }>;
6191
6448
  /**
6192
- * EnumRules describe the constraints applied to `enum` values.
6449
+ * EnumRules describe the rules applied to `enum` values.
6193
6450
  *
6194
6451
  * @generated from message buf.validate.EnumRules
6195
6452
  */
@@ -6278,7 +6535,7 @@ export type EnumRules = Message<"buf.validate.EnumRules"> & {
6278
6535
  notIn: number[];
6279
6536
  /**
6280
6537
  * `example` specifies values that the field may have. These values SHOULD
6281
- * conform to other constraints. `example` values will not impact validation
6538
+ * conform to other rules. `example` values will not impact validation
6282
6539
  * but may be used as helpful guidance on how to populate the given field.
6283
6540
  *
6284
6541
  * ```proto
@@ -6299,7 +6556,7 @@ export type EnumRules = Message<"buf.validate.EnumRules"> & {
6299
6556
  example: number[];
6300
6557
  };
6301
6558
  /**
6302
- * EnumRules describe the constraints applied to `enum` values.
6559
+ * EnumRules describe the rules applied to `enum` values.
6303
6560
  *
6304
6561
  * @generated from message buf.validate.EnumRules
6305
6562
  */
@@ -6388,7 +6645,7 @@ export type EnumRulesJson = {
6388
6645
  notIn?: number[];
6389
6646
  /**
6390
6647
  * `example` specifies values that the field may have. These values SHOULD
6391
- * conform to other constraints. `example` values will not impact validation
6648
+ * conform to other rules. `example` values will not impact validation
6392
6649
  * but may be used as helpful guidance on how to populate the given field.
6393
6650
  *
6394
6651
  * ```proto
@@ -6412,9 +6669,11 @@ export type EnumRulesJson = {
6412
6669
  * Describes the message buf.validate.EnumRules.
6413
6670
  * Use `create(EnumRulesSchema)` to create a new message.
6414
6671
  */
6415
- export declare const EnumRulesSchema: GenMessage<EnumRules, EnumRulesJson>;
6672
+ export declare const EnumRulesSchema: GenMessage<EnumRules, {
6673
+ jsonType: EnumRulesJson;
6674
+ }>;
6416
6675
  /**
6417
- * RepeatedRules describe the constraints applied to `repeated` values.
6676
+ * RepeatedRules describe the rules applied to `repeated` values.
6418
6677
  *
6419
6678
  * @generated from message buf.validate.RepeatedRules
6420
6679
  */
@@ -6453,7 +6712,7 @@ export type RepeatedRules = Message<"buf.validate.RepeatedRules"> & {
6453
6712
  maxItems: bigint;
6454
6713
  /**
6455
6714
  * `unique` indicates that all elements in this field must
6456
- * be unique. This constraint is strictly applicable to scalar and enum
6715
+ * be unique. This rule is strictly applicable to scalar and enum
6457
6716
  * types, with message types not being supported.
6458
6717
  *
6459
6718
  * ```proto
@@ -6467,13 +6726,16 @@ export type RepeatedRules = Message<"buf.validate.RepeatedRules"> & {
6467
6726
  */
6468
6727
  unique: boolean;
6469
6728
  /**
6470
- * `items` details the constraints to be applied to each item
6729
+ * `items` details the rules to be applied to each item
6471
6730
  * in the field. Even for repeated message fields, validation is executed
6472
6731
  * against each item unless skip is explicitly specified.
6473
6732
  *
6733
+ * Note that repeated items are always considered populated. The `required`
6734
+ * rule does not apply.
6735
+ *
6474
6736
  * ```proto
6475
6737
  * message MyRepeated {
6476
- * // The items in the field `value` must follow the specified constraints.
6738
+ * // The items in the field `value` must follow the specified rules.
6477
6739
  * repeated string value = 1 [(buf.validate.field).repeated.items = {
6478
6740
  * string: {
6479
6741
  * min_len: 3
@@ -6483,12 +6745,12 @@ export type RepeatedRules = Message<"buf.validate.RepeatedRules"> & {
6483
6745
  * }
6484
6746
  * ```
6485
6747
  *
6486
- * @generated from field: optional buf.validate.FieldConstraints items = 4;
6748
+ * @generated from field: optional buf.validate.FieldRules items = 4;
6487
6749
  */
6488
- items?: FieldConstraints;
6750
+ items?: FieldRules;
6489
6751
  };
6490
6752
  /**
6491
- * RepeatedRules describe the constraints applied to `repeated` values.
6753
+ * RepeatedRules describe the rules applied to `repeated` values.
6492
6754
  *
6493
6755
  * @generated from message buf.validate.RepeatedRules
6494
6756
  */
@@ -6527,7 +6789,7 @@ export type RepeatedRulesJson = {
6527
6789
  maxItems?: string;
6528
6790
  /**
6529
6791
  * `unique` indicates that all elements in this field must
6530
- * be unique. This constraint is strictly applicable to scalar and enum
6792
+ * be unique. This rule is strictly applicable to scalar and enum
6531
6793
  * types, with message types not being supported.
6532
6794
  *
6533
6795
  * ```proto
@@ -6541,13 +6803,16 @@ export type RepeatedRulesJson = {
6541
6803
  */
6542
6804
  unique?: boolean;
6543
6805
  /**
6544
- * `items` details the constraints to be applied to each item
6806
+ * `items` details the rules to be applied to each item
6545
6807
  * in the field. Even for repeated message fields, validation is executed
6546
6808
  * against each item unless skip is explicitly specified.
6547
6809
  *
6810
+ * Note that repeated items are always considered populated. The `required`
6811
+ * rule does not apply.
6812
+ *
6548
6813
  * ```proto
6549
6814
  * message MyRepeated {
6550
- * // The items in the field `value` must follow the specified constraints.
6815
+ * // The items in the field `value` must follow the specified rules.
6551
6816
  * repeated string value = 1 [(buf.validate.field).repeated.items = {
6552
6817
  * string: {
6553
6818
  * min_len: 3
@@ -6557,17 +6822,19 @@ export type RepeatedRulesJson = {
6557
6822
  * }
6558
6823
  * ```
6559
6824
  *
6560
- * @generated from field: optional buf.validate.FieldConstraints items = 4;
6825
+ * @generated from field: optional buf.validate.FieldRules items = 4;
6561
6826
  */
6562
- items?: FieldConstraintsJson;
6827
+ items?: FieldRulesJson;
6563
6828
  };
6564
6829
  /**
6565
6830
  * Describes the message buf.validate.RepeatedRules.
6566
6831
  * Use `create(RepeatedRulesSchema)` to create a new message.
6567
6832
  */
6568
- export declare const RepeatedRulesSchema: GenMessage<RepeatedRules, RepeatedRulesJson>;
6833
+ export declare const RepeatedRulesSchema: GenMessage<RepeatedRules, {
6834
+ jsonType: RepeatedRulesJson;
6835
+ }>;
6569
6836
  /**
6570
- * MapRules describe the constraints applied to `map` values.
6837
+ * MapRules describe the rules applied to `map` values.
6571
6838
  *
6572
6839
  * @generated from message buf.validate.MapRules
6573
6840
  */
@@ -6601,11 +6868,14 @@ export type MapRules = Message<"buf.validate.MapRules"> & {
6601
6868
  */
6602
6869
  maxPairs: bigint;
6603
6870
  /**
6604
- * Specifies the constraints to be applied to each key in the field.
6871
+ * Specifies the rules to be applied to each key in the field.
6872
+ *
6873
+ * Note that map keys are always considered populated. The `required`
6874
+ * rule does not apply.
6605
6875
  *
6606
6876
  * ```proto
6607
6877
  * message MyMap {
6608
- * // The keys in the field `value` must follow the specified constraints.
6878
+ * // The keys in the field `value` must follow the specified rules.
6609
6879
  * map<string, string> value = 1 [(buf.validate.field).map.keys = {
6610
6880
  * string: {
6611
6881
  * min_len: 3
@@ -6615,17 +6885,20 @@ export type MapRules = Message<"buf.validate.MapRules"> & {
6615
6885
  * }
6616
6886
  * ```
6617
6887
  *
6618
- * @generated from field: optional buf.validate.FieldConstraints keys = 4;
6888
+ * @generated from field: optional buf.validate.FieldRules keys = 4;
6619
6889
  */
6620
- keys?: FieldConstraints;
6890
+ keys?: FieldRules;
6621
6891
  /**
6622
- * Specifies the constraints to be applied to the value of each key in the
6892
+ * Specifies the rules to be applied to the value of each key in the
6623
6893
  * field. Message values will still have their validations evaluated unless
6624
6894
  * skip is specified here.
6625
6895
  *
6896
+ * Note that map values are always considered populated. The `required`
6897
+ * rule does not apply.
6898
+ *
6626
6899
  * ```proto
6627
6900
  * message MyMap {
6628
- * // The values in the field `value` must follow the specified constraints.
6901
+ * // The values in the field `value` must follow the specified rules.
6629
6902
  * map<string, string> value = 1 [(buf.validate.field).map.values = {
6630
6903
  * string: {
6631
6904
  * min_len: 5
@@ -6635,12 +6908,12 @@ export type MapRules = Message<"buf.validate.MapRules"> & {
6635
6908
  * }
6636
6909
  * ```
6637
6910
  *
6638
- * @generated from field: optional buf.validate.FieldConstraints values = 5;
6911
+ * @generated from field: optional buf.validate.FieldRules values = 5;
6639
6912
  */
6640
- values?: FieldConstraints;
6913
+ values?: FieldRules;
6641
6914
  };
6642
6915
  /**
6643
- * MapRules describe the constraints applied to `map` values.
6916
+ * MapRules describe the rules applied to `map` values.
6644
6917
  *
6645
6918
  * @generated from message buf.validate.MapRules
6646
6919
  */
@@ -6674,11 +6947,14 @@ export type MapRulesJson = {
6674
6947
  */
6675
6948
  maxPairs?: string;
6676
6949
  /**
6677
- * Specifies the constraints to be applied to each key in the field.
6950
+ * Specifies the rules to be applied to each key in the field.
6951
+ *
6952
+ * Note that map keys are always considered populated. The `required`
6953
+ * rule does not apply.
6678
6954
  *
6679
6955
  * ```proto
6680
6956
  * message MyMap {
6681
- * // The keys in the field `value` must follow the specified constraints.
6957
+ * // The keys in the field `value` must follow the specified rules.
6682
6958
  * map<string, string> value = 1 [(buf.validate.field).map.keys = {
6683
6959
  * string: {
6684
6960
  * min_len: 3
@@ -6688,17 +6964,20 @@ export type MapRulesJson = {
6688
6964
  * }
6689
6965
  * ```
6690
6966
  *
6691
- * @generated from field: optional buf.validate.FieldConstraints keys = 4;
6967
+ * @generated from field: optional buf.validate.FieldRules keys = 4;
6692
6968
  */
6693
- keys?: FieldConstraintsJson;
6969
+ keys?: FieldRulesJson;
6694
6970
  /**
6695
- * Specifies the constraints to be applied to the value of each key in the
6971
+ * Specifies the rules to be applied to the value of each key in the
6696
6972
  * field. Message values will still have their validations evaluated unless
6697
6973
  * skip is specified here.
6698
6974
  *
6975
+ * Note that map values are always considered populated. The `required`
6976
+ * rule does not apply.
6977
+ *
6699
6978
  * ```proto
6700
6979
  * message MyMap {
6701
- * // The values in the field `value` must follow the specified constraints.
6980
+ * // The values in the field `value` must follow the specified rules.
6702
6981
  * map<string, string> value = 1 [(buf.validate.field).map.values = {
6703
6982
  * string: {
6704
6983
  * min_len: 5
@@ -6708,17 +6987,19 @@ export type MapRulesJson = {
6708
6987
  * }
6709
6988
  * ```
6710
6989
  *
6711
- * @generated from field: optional buf.validate.FieldConstraints values = 5;
6990
+ * @generated from field: optional buf.validate.FieldRules values = 5;
6712
6991
  */
6713
- values?: FieldConstraintsJson;
6992
+ values?: FieldRulesJson;
6714
6993
  };
6715
6994
  /**
6716
6995
  * Describes the message buf.validate.MapRules.
6717
6996
  * Use `create(MapRulesSchema)` to create a new message.
6718
6997
  */
6719
- export declare const MapRulesSchema: GenMessage<MapRules, MapRulesJson>;
6998
+ export declare const MapRulesSchema: GenMessage<MapRules, {
6999
+ jsonType: MapRulesJson;
7000
+ }>;
6720
7001
  /**
6721
- * AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type.
7002
+ * AnyRules describe rules applied exclusively to the `google.protobuf.Any` well-known type.
6722
7003
  *
6723
7004
  * @generated from message buf.validate.AnyRules
6724
7005
  */
@@ -6731,7 +7012,9 @@ export type AnyRules = Message<"buf.validate.AnyRules"> & {
6731
7012
  * ```proto
6732
7013
  * message MyAny {
6733
7014
  * // The `value` field must have a `type_url` equal to one of the specified values.
6734
- * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
7015
+ * google.protobuf.Any value = 1 [(buf.validate.field).any = {
7016
+ * in: ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]
7017
+ * }];
6735
7018
  * }
6736
7019
  * ```
6737
7020
  *
@@ -6743,8 +7026,10 @@ export type AnyRules = Message<"buf.validate.AnyRules"> & {
6743
7026
  *
6744
7027
  * ```proto
6745
7028
  * message MyAny {
6746
- * // The field `value` must not have a `type_url` equal to any of the specified values.
6747
- * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
7029
+ * // The `value` field must not have a `type_url` equal to any of the specified values.
7030
+ * google.protobuf.Any value = 1 [(buf.validate.field).any = {
7031
+ * not_in: ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]
7032
+ * }];
6748
7033
  * }
6749
7034
  * ```
6750
7035
  *
@@ -6753,7 +7038,7 @@ export type AnyRules = Message<"buf.validate.AnyRules"> & {
6753
7038
  notIn: string[];
6754
7039
  };
6755
7040
  /**
6756
- * AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type.
7041
+ * AnyRules describe rules applied exclusively to the `google.protobuf.Any` well-known type.
6757
7042
  *
6758
7043
  * @generated from message buf.validate.AnyRules
6759
7044
  */
@@ -6766,7 +7051,9 @@ export type AnyRulesJson = {
6766
7051
  * ```proto
6767
7052
  * message MyAny {
6768
7053
  * // The `value` field must have a `type_url` equal to one of the specified values.
6769
- * google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
7054
+ * google.protobuf.Any value = 1 [(buf.validate.field).any = {
7055
+ * in: ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]
7056
+ * }];
6770
7057
  * }
6771
7058
  * ```
6772
7059
  *
@@ -6778,8 +7065,10 @@ export type AnyRulesJson = {
6778
7065
  *
6779
7066
  * ```proto
6780
7067
  * message MyAny {
6781
- * // The field `value` must not have a `type_url` equal to any of the specified values.
6782
- * google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
7068
+ * // The `value` field must not have a `type_url` equal to any of the specified values.
7069
+ * google.protobuf.Any value = 1 [(buf.validate.field).any = {
7070
+ * not_in: ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]
7071
+ * }];
6783
7072
  * }
6784
7073
  * ```
6785
7074
  *
@@ -6791,9 +7080,11 @@ export type AnyRulesJson = {
6791
7080
  * Describes the message buf.validate.AnyRules.
6792
7081
  * Use `create(AnyRulesSchema)` to create a new message.
6793
7082
  */
6794
- export declare const AnyRulesSchema: GenMessage<AnyRules, AnyRulesJson>;
7083
+ export declare const AnyRulesSchema: GenMessage<AnyRules, {
7084
+ jsonType: AnyRulesJson;
7085
+ }>;
6795
7086
  /**
6796
- * DurationRules describe the constraints applied exclusively to the `google.protobuf.Duration` well-known type.
7087
+ * DurationRules describe the rules applied exclusively to the `google.protobuf.Duration` well-known type.
6797
7088
  *
6798
7089
  * @generated from message buf.validate.DurationRules
6799
7090
  */
@@ -6944,7 +7235,7 @@ export type DurationRules = Message<"buf.validate.DurationRules"> & {
6944
7235
  notIn: Duration[];
6945
7236
  /**
6946
7237
  * `example` specifies values that the field may have. These values SHOULD
6947
- * conform to other constraints. `example` values will not impact validation
7238
+ * conform to other rules. `example` values will not impact validation
6948
7239
  * but may be used as helpful guidance on how to populate the given field.
6949
7240
  *
6950
7241
  * ```proto
@@ -6961,7 +7252,7 @@ export type DurationRules = Message<"buf.validate.DurationRules"> & {
6961
7252
  example: Duration[];
6962
7253
  };
6963
7254
  /**
6964
- * DurationRules describe the constraints applied exclusively to the `google.protobuf.Duration` well-known type.
7255
+ * DurationRules describe the rules applied exclusively to the `google.protobuf.Duration` well-known type.
6965
7256
  *
6966
7257
  * @generated from message buf.validate.DurationRules
6967
7258
  */
@@ -7090,7 +7381,7 @@ export type DurationRulesJson = {
7090
7381
  notIn?: DurationJson[];
7091
7382
  /**
7092
7383
  * `example` specifies values that the field may have. These values SHOULD
7093
- * conform to other constraints. `example` values will not impact validation
7384
+ * conform to other rules. `example` values will not impact validation
7094
7385
  * but may be used as helpful guidance on how to populate the given field.
7095
7386
  *
7096
7387
  * ```proto
@@ -7110,9 +7401,11 @@ export type DurationRulesJson = {
7110
7401
  * Describes the message buf.validate.DurationRules.
7111
7402
  * Use `create(DurationRulesSchema)` to create a new message.
7112
7403
  */
7113
- export declare const DurationRulesSchema: GenMessage<DurationRules, DurationRulesJson>;
7404
+ export declare const DurationRulesSchema: GenMessage<DurationRules, {
7405
+ jsonType: DurationRulesJson;
7406
+ }>;
7114
7407
  /**
7115
- * TimestampRules describe the constraints applied exclusively to the `google.protobuf.Timestamp` well-known type.
7408
+ * TimestampRules describe the rules applied exclusively to the `google.protobuf.Timestamp` well-known type.
7116
7409
  *
7117
7410
  * @generated from message buf.validate.TimestampRules
7118
7411
  */
@@ -7268,12 +7561,25 @@ export type TimestampRules = Message<"buf.validate.TimestampRules"> & {
7268
7561
  */
7269
7562
  within?: Duration;
7270
7563
  /**
7564
+ * `example` specifies values that the field may have. These values SHOULD
7565
+ * conform to other rules. `example` values will not impact validation
7566
+ * but may be used as helpful guidance on how to populate the given field.
7567
+ *
7568
+ * ```proto
7569
+ * message MyTimestamp {
7570
+ * google.protobuf.Timestamp value = 1 [
7571
+ * (buf.validate.field).timestamp.example = { seconds: 1672444800 },
7572
+ * (buf.validate.field).timestamp.example = { seconds: 1672531200 },
7573
+ * ];
7574
+ * }
7575
+ * ```
7576
+ *
7271
7577
  * @generated from field: repeated google.protobuf.Timestamp example = 10;
7272
7578
  */
7273
7579
  example: Timestamp[];
7274
7580
  };
7275
7581
  /**
7276
- * TimestampRules describe the constraints applied exclusively to the `google.protobuf.Timestamp` well-known type.
7582
+ * TimestampRules describe the rules applied exclusively to the `google.protobuf.Timestamp` well-known type.
7277
7583
  *
7278
7584
  * @generated from message buf.validate.TimestampRules
7279
7585
  */
@@ -7403,6 +7709,19 @@ export type TimestampRulesJson = {
7403
7709
  */
7404
7710
  within?: DurationJson;
7405
7711
  /**
7712
+ * `example` specifies values that the field may have. These values SHOULD
7713
+ * conform to other rules. `example` values will not impact validation
7714
+ * but may be used as helpful guidance on how to populate the given field.
7715
+ *
7716
+ * ```proto
7717
+ * message MyTimestamp {
7718
+ * google.protobuf.Timestamp value = 1 [
7719
+ * (buf.validate.field).timestamp.example = { seconds: 1672444800 },
7720
+ * (buf.validate.field).timestamp.example = { seconds: 1672531200 },
7721
+ * ];
7722
+ * }
7723
+ * ```
7724
+ *
7406
7725
  * @generated from field: repeated google.protobuf.Timestamp example = 10;
7407
7726
  */
7408
7727
  example?: TimestampJson[];
@@ -7411,10 +7730,12 @@ export type TimestampRulesJson = {
7411
7730
  * Describes the message buf.validate.TimestampRules.
7412
7731
  * Use `create(TimestampRulesSchema)` to create a new message.
7413
7732
  */
7414
- export declare const TimestampRulesSchema: GenMessage<TimestampRules, TimestampRulesJson>;
7733
+ export declare const TimestampRulesSchema: GenMessage<TimestampRules, {
7734
+ jsonType: TimestampRulesJson;
7735
+ }>;
7415
7736
  /**
7416
7737
  * `Violations` is a collection of `Violation` messages. This message type is returned by
7417
- * protovalidate when a proto message fails to meet the requirements set by the `Constraint` validation rules.
7738
+ * Protovalidate when a proto message fails to meet the requirements set by the `Rule` validation rules.
7418
7739
  * Each individual violation is represented by a `Violation` message.
7419
7740
  *
7420
7741
  * @generated from message buf.validate.Violations
@@ -7429,7 +7750,7 @@ export type Violations = Message<"buf.validate.Violations"> & {
7429
7750
  };
7430
7751
  /**
7431
7752
  * `Violations` is a collection of `Violation` messages. This message type is returned by
7432
- * protovalidate when a proto message fails to meet the requirements set by the `Constraint` validation rules.
7753
+ * Protovalidate when a proto message fails to meet the requirements set by the `Rule` validation rules.
7433
7754
  * Each individual violation is represented by a `Violation` message.
7434
7755
  *
7435
7756
  * @generated from message buf.validate.Violations
@@ -7446,18 +7767,51 @@ export type ViolationsJson = {
7446
7767
  * Describes the message buf.validate.Violations.
7447
7768
  * Use `create(ViolationsSchema)` to create a new message.
7448
7769
  */
7449
- export declare const ViolationsSchema: GenMessage<Violations, ViolationsJson>;
7770
+ export declare const ViolationsSchema: GenMessage<Violations, {
7771
+ jsonType: ViolationsJson;
7772
+ }>;
7450
7773
  /**
7451
7774
  * `Violation` represents a single instance where a validation rule, expressed
7452
- * as a `Constraint`, was not met. It provides information about the field that
7453
- * caused the violation, the specific constraint that wasn't fulfilled, and a
7775
+ * as a `Rule`, was not met. It provides information about the field that
7776
+ * caused the violation, the specific rule that wasn't fulfilled, and a
7454
7777
  * human-readable error message.
7455
7778
  *
7779
+ * For example, consider the following message:
7780
+ *
7781
+ * ```proto
7782
+ * message User {
7783
+ * int32 age = 1 [(buf.validate.field).cel = {
7784
+ * id: "user.age",
7785
+ * expression: "this < 18 ? 'User must be at least 18 years old' : ''",
7786
+ * }];
7787
+ * }
7788
+ * ```
7789
+ *
7790
+ * It could produce the following violation:
7791
+ *
7456
7792
  * ```json
7457
7793
  * {
7458
- * "fieldPath": "bar",
7459
- * "constraintId": "foo.bar",
7460
- * "message": "bar must be greater than 0"
7794
+ * "ruleId": "user.age",
7795
+ * "message": "User must be at least 18 years old",
7796
+ * "field": {
7797
+ * "elements": [
7798
+ * {
7799
+ * "fieldNumber": 1,
7800
+ * "fieldName": "age",
7801
+ * "fieldType": "TYPE_INT32"
7802
+ * }
7803
+ * ]
7804
+ * },
7805
+ * "rule": {
7806
+ * "elements": [
7807
+ * {
7808
+ * "fieldNumber": 23,
7809
+ * "fieldName": "cel",
7810
+ * "fieldType": "TYPE_MESSAGE",
7811
+ * "index": "0"
7812
+ * }
7813
+ * ]
7814
+ * }
7461
7815
  * }
7462
7816
  * ```
7463
7817
  *
@@ -7489,9 +7843,9 @@ export type Violation = Message<"buf.validate.Violation"> & {
7489
7843
  */
7490
7844
  field?: FieldPath;
7491
7845
  /**
7492
- * `rule` is a machine-readable path that points to the specific constraint rule that failed validation.
7493
- * This will be a nested field starting from the FieldConstraints of the field that failed validation.
7494
- * For custom constraints, this will provide the path of the constraint, e.g. `cel[0]`.
7846
+ * `rule` is a machine-readable path that points to the specific rule that failed validation.
7847
+ * This will be a nested field starting from the FieldRules of the field that failed validation.
7848
+ * For custom rules, this will provide the path of the rule, e.g. `cel[0]`.
7495
7849
  *
7496
7850
  * For example, consider the following message:
7497
7851
  *
@@ -7499,7 +7853,7 @@ export type Violation = Message<"buf.validate.Violation"> & {
7499
7853
  * message Message {
7500
7854
  * bool a = 1 [(buf.validate.field).required = true];
7501
7855
  * bool b = 2 [(buf.validate.field).cel = {
7502
- * id: "custom_constraint",
7856
+ * id: "custom_rule",
7503
7857
  * expression: "!this ? 'b must be true': ''"
7504
7858
  * }]
7505
7859
  * }
@@ -7522,15 +7876,15 @@ export type Violation = Message<"buf.validate.Violation"> & {
7522
7876
  */
7523
7877
  rule?: FieldPath;
7524
7878
  /**
7525
- * `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.
7526
- * This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated.
7879
+ * `rule_id` is the unique identifier of the `Rule` that was not fulfilled.
7880
+ * This is the same `id` that was specified in the `Rule` message, allowing easy tracing of which rule was violated.
7527
7881
  *
7528
- * @generated from field: optional string constraint_id = 2;
7882
+ * @generated from field: optional string rule_id = 2;
7529
7883
  */
7530
- constraintId: string;
7884
+ ruleId: string;
7531
7885
  /**
7532
7886
  * `message` is a human-readable error message that describes the nature of the violation.
7533
- * This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation.
7887
+ * This can be the default error message from the violated `Rule`, or it can be a custom message that gives more context about the violation.
7534
7888
  *
7535
7889
  * @generated from field: optional string message = 3;
7536
7890
  */
@@ -7544,15 +7898,46 @@ export type Violation = Message<"buf.validate.Violation"> & {
7544
7898
  };
7545
7899
  /**
7546
7900
  * `Violation` represents a single instance where a validation rule, expressed
7547
- * as a `Constraint`, was not met. It provides information about the field that
7548
- * caused the violation, the specific constraint that wasn't fulfilled, and a
7901
+ * as a `Rule`, was not met. It provides information about the field that
7902
+ * caused the violation, the specific rule that wasn't fulfilled, and a
7549
7903
  * human-readable error message.
7550
7904
  *
7905
+ * For example, consider the following message:
7906
+ *
7907
+ * ```proto
7908
+ * message User {
7909
+ * int32 age = 1 [(buf.validate.field).cel = {
7910
+ * id: "user.age",
7911
+ * expression: "this < 18 ? 'User must be at least 18 years old' : ''",
7912
+ * }];
7913
+ * }
7914
+ * ```
7915
+ *
7916
+ * It could produce the following violation:
7917
+ *
7551
7918
  * ```json
7552
7919
  * {
7553
- * "fieldPath": "bar",
7554
- * "constraintId": "foo.bar",
7555
- * "message": "bar must be greater than 0"
7920
+ * "ruleId": "user.age",
7921
+ * "message": "User must be at least 18 years old",
7922
+ * "field": {
7923
+ * "elements": [
7924
+ * {
7925
+ * "fieldNumber": 1,
7926
+ * "fieldName": "age",
7927
+ * "fieldType": "TYPE_INT32"
7928
+ * }
7929
+ * ]
7930
+ * },
7931
+ * "rule": {
7932
+ * "elements": [
7933
+ * {
7934
+ * "fieldNumber": 23,
7935
+ * "fieldName": "cel",
7936
+ * "fieldType": "TYPE_MESSAGE",
7937
+ * "index": "0"
7938
+ * }
7939
+ * ]
7940
+ * }
7556
7941
  * }
7557
7942
  * ```
7558
7943
  *
@@ -7584,9 +7969,9 @@ export type ViolationJson = {
7584
7969
  */
7585
7970
  field?: FieldPathJson;
7586
7971
  /**
7587
- * `rule` is a machine-readable path that points to the specific constraint rule that failed validation.
7588
- * This will be a nested field starting from the FieldConstraints of the field that failed validation.
7589
- * For custom constraints, this will provide the path of the constraint, e.g. `cel[0]`.
7972
+ * `rule` is a machine-readable path that points to the specific rule that failed validation.
7973
+ * This will be a nested field starting from the FieldRules of the field that failed validation.
7974
+ * For custom rules, this will provide the path of the rule, e.g. `cel[0]`.
7590
7975
  *
7591
7976
  * For example, consider the following message:
7592
7977
  *
@@ -7594,7 +7979,7 @@ export type ViolationJson = {
7594
7979
  * message Message {
7595
7980
  * bool a = 1 [(buf.validate.field).required = true];
7596
7981
  * bool b = 2 [(buf.validate.field).cel = {
7597
- * id: "custom_constraint",
7982
+ * id: "custom_rule",
7598
7983
  * expression: "!this ? 'b must be true': ''"
7599
7984
  * }]
7600
7985
  * }
@@ -7617,15 +8002,15 @@ export type ViolationJson = {
7617
8002
  */
7618
8003
  rule?: FieldPathJson;
7619
8004
  /**
7620
- * `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.
7621
- * This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated.
8005
+ * `rule_id` is the unique identifier of the `Rule` that was not fulfilled.
8006
+ * This is the same `id` that was specified in the `Rule` message, allowing easy tracing of which rule was violated.
7622
8007
  *
7623
- * @generated from field: optional string constraint_id = 2;
8008
+ * @generated from field: optional string rule_id = 2;
7624
8009
  */
7625
- constraintId?: string;
8010
+ ruleId?: string;
7626
8011
  /**
7627
8012
  * `message` is a human-readable error message that describes the nature of the violation.
7628
- * This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation.
8013
+ * This can be the default error message from the violated `Rule`, or it can be a custom message that gives more context about the violation.
7629
8014
  *
7630
8015
  * @generated from field: optional string message = 3;
7631
8016
  */
@@ -7641,7 +8026,9 @@ export type ViolationJson = {
7641
8026
  * Describes the message buf.validate.Violation.
7642
8027
  * Use `create(ViolationSchema)` to create a new message.
7643
8028
  */
7644
- export declare const ViolationSchema: GenMessage<Violation, ViolationJson>;
8029
+ export declare const ViolationSchema: GenMessage<Violation, {
8030
+ jsonType: ViolationJson;
8031
+ }>;
7645
8032
  /**
7646
8033
  * `FieldPath` provides a path to a nested protobuf field.
7647
8034
  *
@@ -7678,7 +8065,9 @@ export type FieldPathJson = {
7678
8065
  * Describes the message buf.validate.FieldPath.
7679
8066
  * Use `create(FieldPathSchema)` to create a new message.
7680
8067
  */
7681
- export declare const FieldPathSchema: GenMessage<FieldPath, FieldPathJson>;
8068
+ export declare const FieldPathSchema: GenMessage<FieldPath, {
8069
+ jsonType: FieldPathJson;
8070
+ }>;
7682
8071
  /**
7683
8072
  * `FieldPathElement` provides enough information to nest through a single protobuf field.
7684
8073
  *
@@ -7870,16 +8259,18 @@ export type FieldPathElementJson = {
7870
8259
  * Describes the message buf.validate.FieldPathElement.
7871
8260
  * Use `create(FieldPathElementSchema)` to create a new message.
7872
8261
  */
7873
- export declare const FieldPathElementSchema: GenMessage<FieldPathElement, FieldPathElementJson>;
8262
+ export declare const FieldPathElementSchema: GenMessage<FieldPathElement, {
8263
+ jsonType: FieldPathElementJson;
8264
+ }>;
7874
8265
  /**
7875
- * Specifies how FieldConstraints.ignore behaves. See the documentation for
7876
- * FieldConstraints.required for definitions of "populated" and "nullable".
8266
+ * Specifies how FieldRules.ignore behaves. See the documentation for
8267
+ * FieldRules.required for definitions of "populated" and "nullable".
7877
8268
  *
7878
8269
  * @generated from enum buf.validate.Ignore
7879
8270
  */
7880
8271
  export declare enum Ignore {
7881
8272
  /**
7882
- * Validation is only skipped if it's an unpopulated nullable fields.
8273
+ * Validation is only skipped if it's an unpopulated nullable field.
7883
8274
  *
7884
8275
  * ```proto
7885
8276
  * syntax="proto3";
@@ -8018,7 +8409,7 @@ export declare enum Ignore {
8018
8409
  * The validation rules of this field will be skipped and not evaluated. This
8019
8410
  * is useful for situations that necessitate turning off the rules of a field
8020
8411
  * containing a message that may not make sense in the current context, or to
8021
- * temporarily disable constraints during development.
8412
+ * temporarily disable rules during development.
8022
8413
  *
8023
8414
  * ```proto
8024
8415
  * message MyMessage {
@@ -8034,8 +8425,8 @@ export declare enum Ignore {
8034
8425
  ALWAYS = 3
8035
8426
  }
8036
8427
  /**
8037
- * Specifies how FieldConstraints.ignore behaves. See the documentation for
8038
- * FieldConstraints.required for definitions of "populated" and "nullable".
8428
+ * Specifies how FieldRules.ignore behaves. See the documentation for
8429
+ * FieldRules.required for definitions of "populated" and "nullable".
8039
8430
  *
8040
8431
  * @generated from enum buf.validate.Ignore
8041
8432
  */
@@ -8045,7 +8436,7 @@ export type IgnoreJson = "IGNORE_UNSPECIFIED" | "IGNORE_IF_UNPOPULATED" | "IGNOR
8045
8436
  */
8046
8437
  export declare const IgnoreSchema: GenEnum<Ignore, IgnoreJson>;
8047
8438
  /**
8048
- * WellKnownRegex contain some well-known patterns.
8439
+ * KnownRegex contains some well-known patterns.
8049
8440
  *
8050
8441
  * @generated from enum buf.validate.KnownRegex
8051
8442
  */
@@ -8068,7 +8459,7 @@ export declare enum KnownRegex {
8068
8459
  HTTP_HEADER_VALUE = 2
8069
8460
  }
8070
8461
  /**
8071
- * WellKnownRegex contain some well-known patterns.
8462
+ * KnownRegex contains some well-known patterns.
8072
8463
  *
8073
8464
  * @generated from enum buf.validate.KnownRegex
8074
8465
  */
@@ -8081,25 +8472,25 @@ export declare const KnownRegexSchema: GenEnum<KnownRegex, KnownRegexJson>;
8081
8472
  * Rules specify the validations to be performed on this message. By default,
8082
8473
  * no validation is performed against a message.
8083
8474
  *
8084
- * @generated from extension: optional buf.validate.MessageConstraints message = 1159;
8475
+ * @generated from extension: optional buf.validate.MessageRules message = 1159;
8085
8476
  */
8086
- export declare const message: GenExtension<MessageOptions, MessageConstraints>;
8477
+ export declare const message: GenExtension<MessageOptions, MessageRules>;
8087
8478
  /**
8088
8479
  * Rules specify the validations to be performed on this oneof. By default,
8089
8480
  * no validation is performed against a oneof.
8090
8481
  *
8091
- * @generated from extension: optional buf.validate.OneofConstraints oneof = 1159;
8482
+ * @generated from extension: optional buf.validate.OneofRules oneof = 1159;
8092
8483
  */
8093
- export declare const oneof: GenExtension<OneofOptions, OneofConstraints>;
8484
+ export declare const oneof: GenExtension<OneofOptions, OneofRules>;
8094
8485
  /**
8095
8486
  * Rules specify the validations to be performed on this field. By default,
8096
8487
  * no validation is performed against a field.
8097
8488
  *
8098
- * @generated from extension: optional buf.validate.FieldConstraints field = 1159;
8489
+ * @generated from extension: optional buf.validate.FieldRules field = 1159;
8099
8490
  */
8100
- export declare const field: GenExtension<FieldOptions, FieldConstraints>;
8491
+ export declare const field: GenExtension<FieldOptions, FieldRules>;
8101
8492
  /**
8102
- * Specifies predefined rules. When extending a standard constraint message,
8493
+ * Specifies predefined rules. When extending a standard rule message,
8103
8494
  * this adds additional CEL expressions that apply when the extension is used.
8104
8495
  *
8105
8496
  * ```proto
@@ -8116,7 +8507,7 @@ export declare const field: GenExtension<FieldOptions, FieldConstraints>;
8116
8507
  * }
8117
8508
  * ```
8118
8509
  *
8119
- * @generated from extension: optional buf.validate.PredefinedConstraints predefined = 1160;
8510
+ * @generated from extension: optional buf.validate.PredefinedRules predefined = 1160;
8120
8511
  */
8121
- export declare const predefined: GenExtension<FieldOptions, PredefinedConstraints>;
8512
+ export declare const predefined: GenExtension<FieldOptions, PredefinedRules>;
8122
8513
  //# sourceMappingURL=validate_pb.d.ts.map