@mochabug/adaptkit 1.0.0-rc.5 → 1.0.0-rc.51

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 (93) hide show
  1. package/README.md +50 -45
  2. package/assets/build.js +1 -1
  3. package/assets/configurator.main.tsx +8 -0
  4. package/assets/configurator_browser_none.main.ts +30 -0
  5. package/assets/configurator_browser_none.ssg.ts +64 -0
  6. package/assets/configurator_none.ts +14 -103
  7. package/assets/configurator_react.tsx +8 -8
  8. package/assets/executor.html +1 -1
  9. package/assets/executor.main.tsx +8 -0
  10. package/assets/executor_action.ts +4 -8
  11. package/assets/{executor_cron_trigger.ts → executor_action_cron.ts} +4 -8
  12. package/assets/executor_browser_none.main.ts +25 -0
  13. package/assets/executor_browser_none.ssg.ts +42 -0
  14. package/assets/executor_browser_none.ts +15 -83
  15. package/assets/executor_browser_none_cron.ts +55 -0
  16. package/assets/executor_browser_react.tsx +9 -13
  17. package/assets/executor_browser_react_cron.tsx +55 -0
  18. package/assets/{executor_external_trigger.ts → executor_external.ts} +8 -12
  19. package/assets/executor_external_cron.ts +45 -0
  20. package/assets/tsconf.json +1 -2
  21. package/bin/add.d.ts.map +1 -1
  22. package/bin/genproto/buf/validate/validate_pb.d.ts +1245 -547
  23. package/bin/genproto/buf/validate/validate_pb.d.ts.map +1 -1
  24. package/bin/genproto/google/api/annotations_pb.d.ts +1 -1
  25. package/bin/genproto/google/api/client_pb.d.ts +46 -16
  26. package/bin/genproto/google/api/client_pb.d.ts.map +1 -1
  27. package/bin/genproto/google/api/http_pb.d.ts +10 -4
  28. package/bin/genproto/google/api/http_pb.d.ts.map +1 -1
  29. package/bin/genproto/google/api/launch_stage_pb.d.ts +1 -1
  30. package/bin/genproto/mochabugapis/adapt/graph/exchange_pb.d.ts +4 -2
  31. package/bin/genproto/mochabugapis/adapt/graph/exchange_pb.d.ts.map +1 -1
  32. package/bin/genproto/mochabugapis/adapt/graph/jtd_schema_pb.d.ts +192 -16
  33. package/bin/genproto/mochabugapis/adapt/graph/jtd_schema_pb.d.ts.map +1 -1
  34. package/bin/genproto/mochabugapis/adapt/graph/receiver_pb.d.ts +4 -2
  35. package/bin/genproto/mochabugapis/adapt/graph/receiver_pb.d.ts.map +1 -1
  36. package/bin/genproto/mochabugapis/adapt/graph/signal_binding_pb.d.ts +309 -53
  37. package/bin/genproto/mochabugapis/adapt/graph/signal_binding_pb.d.ts.map +1 -1
  38. package/bin/genproto/mochabugapis/adapt/graph/signal_data_pb.d.ts +198 -0
  39. package/bin/genproto/mochabugapis/adapt/graph/signal_data_pb.d.ts.map +1 -0
  40. package/bin/genproto/mochabugapis/adapt/graph/signal_descriptor_pb.d.ts +101 -27
  41. package/bin/genproto/mochabugapis/adapt/graph/signal_descriptor_pb.d.ts.map +1 -1
  42. package/bin/genproto/mochabugapis/adapt/graph/signal_format_pb.d.ts +305 -0
  43. package/bin/genproto/mochabugapis/adapt/graph/signal_format_pb.d.ts.map +1 -0
  44. package/bin/genproto/mochabugapis/adapt/graph/transceiver_pb.d.ts +16 -2
  45. package/bin/genproto/mochabugapis/adapt/graph/transceiver_pb.d.ts.map +1 -1
  46. package/bin/genproto/mochabugapis/adapt/graph/transmitter_pb.d.ts +53 -8
  47. package/bin/genproto/mochabugapis/adapt/graph/transmitter_pb.d.ts.map +1 -1
  48. package/bin/genproto/mochabugapis/adapt/graph/user_defined_exchange_options_pb.d.ts +353 -0
  49. package/bin/genproto/mochabugapis/adapt/graph/user_defined_exchange_options_pb.d.ts.map +1 -0
  50. package/bin/genproto/mochabugapis/adapt/graph/{vertex_config_pb.d.ts → vertex_metadata_pb.d.ts} +28 -23
  51. package/bin/genproto/mochabugapis/adapt/graph/vertex_metadata_pb.d.ts.map +1 -0
  52. package/bin/genproto/mochabugapis/adapt/plugins/v1/compound_services_pb.d.ts +347 -0
  53. package/bin/genproto/mochabugapis/adapt/plugins/v1/compound_services_pb.d.ts.map +1 -0
  54. package/bin/genproto/mochabugapis/adapt/plugins/v1/file_pb.d.ts +4 -2
  55. package/bin/genproto/mochabugapis/adapt/plugins/v1/file_pb.d.ts.map +1 -1
  56. package/bin/genproto/mochabugapis/adapt/plugins/v1/http_proxy_service_pb.d.ts +1282 -0
  57. package/bin/genproto/mochabugapis/adapt/plugins/v1/http_proxy_service_pb.d.ts.map +1 -0
  58. package/bin/genproto/mochabugapis/adapt/plugins/v1/manifest_pb.d.ts +188 -23
  59. package/bin/genproto/mochabugapis/adapt/plugins/v1/manifest_pb.d.ts.map +1 -1
  60. package/bin/genproto/mochabugapis/adapt/plugins/v1/oauth2_service_pb.d.ts +129 -39
  61. package/bin/genproto/mochabugapis/adapt/plugins/v1/oauth2_service_pb.d.ts.map +1 -1
  62. package/bin/genproto/mochabugapis/adapt/plugins/v1/plugins_pb.d.ts +50 -6
  63. package/bin/genproto/mochabugapis/adapt/plugins/v1/plugins_pb.d.ts.map +1 -1
  64. package/bin/genproto/mochabugapis/adapt/plugins/v1/service_definition_pb.d.ts +145 -20
  65. package/bin/genproto/mochabugapis/adapt/plugins/v1/service_definition_pb.d.ts.map +1 -1
  66. package/bin/genproto/mochabugapis/adapt/plugins/v1/service_settings_pb.d.ts +539 -0
  67. package/bin/genproto/mochabugapis/adapt/plugins/v1/service_settings_pb.d.ts.map +1 -0
  68. package/bin/genproto/mochabugapis/adapt/plugins/v1/variable_service_pb.d.ts +134 -4
  69. package/bin/genproto/mochabugapis/adapt/plugins/v1/variable_service_pb.d.ts.map +1 -1
  70. package/bin/genproto/mochabugapis/adapt/plugins/v1/vertex_pb.d.ts +92 -55
  71. package/bin/genproto/mochabugapis/adapt/plugins/v1/vertex_pb.d.ts.map +1 -1
  72. package/bin/index.d.ts +5 -0
  73. package/bin/index.d.ts.map +1 -1
  74. package/bin/index.js +709 -652
  75. package/bin/index.js.map +4 -4
  76. package/bin/init.d.ts.map +1 -1
  77. package/bin/oauth2.d.ts +1 -1
  78. package/bin/oauth2.d.ts.map +1 -1
  79. package/bin/publish.d.ts +4 -0
  80. package/bin/publish.d.ts.map +1 -1
  81. package/bin/utils.d.ts +4 -4
  82. package/bin/utils.d.ts.map +1 -1
  83. package/bin/vertices.d.ts +2 -2
  84. package/bin/vertices.d.ts.map +1 -1
  85. package/package.json +23 -18
  86. package/assets/license.md +0 -15
  87. package/bin/genproto/mochabugapis/adapt/graph/vertex_config_pb.d.ts.map +0 -1
  88. package/bin/genproto/mochabugapis/adapt/plugins/v1/oneof_service_pb.d.ts +0 -92
  89. package/bin/genproto/mochabugapis/adapt/plugins/v1/oneof_service_pb.d.ts.map +0 -1
  90. package/bin/genproto/mochabugapis/adapt/plugins/v1/service_binding_pb.d.ts +0 -134
  91. package/bin/genproto/mochabugapis/adapt/plugins/v1/service_binding_pb.d.ts.map +0 -1
  92. package/bin/genproto/mochabugapis/adapt/plugins/v1/tls_service_pb.d.ts +0 -159
  93. package/bin/genproto/mochabugapis/adapt/plugins/v1/tls_service_pb.d.ts.map +0 -1
@@ -1,15 +1,15 @@
1
- import type { GenEnum, GenExtension, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
2
- import type { Duration, DurationJson, FieldDescriptorProto_Type, FieldDescriptorProto_TypeJson, FieldOptions, MessageOptions, OneofOptions, Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
1
+ import type { GenEnum, GenExtension, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
2
+ import type { Duration, DurationJson, FieldDescriptorProto_Type, FieldDescriptorProto_TypeJson, FieldMask, FieldMaskJson, FieldOptions, MessageOptions, OneofOptions, Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
3
3
  import type { Message } from "@bufbuild/protobuf";
4
4
  /**
5
5
  * Describes the file buf/validate/validate.proto.
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,35 +98,46 @@ 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
- * `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
114
- * This includes any fields within the message that would otherwise support validation.
115
+ * `cel_expression` is a repeated field CEL expressions. Each expression specifies a validation
116
+ * rule to be applied to this message. These rules are written in Common Expression Language (CEL) syntax.
117
+ *
118
+ * This is a simplified form of the `cel` Rule field, where only `expression` is set. This allows for
119
+ * simpler syntax when defining CEL Rules where `id` and `message` derived from the `expression`. `id` will
120
+ * be same as the `expression`.
121
+ *
122
+ * For more information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
115
123
  *
116
124
  * ```proto
117
125
  * message MyMessage {
118
- * // validation will be bypassed for this message
119
- * option (buf.validate.message).disabled = true;
126
+ * // The field `foo` must be greater than 42.
127
+ * option (buf.validate.message).cel_expression = "this.foo > 42";
128
+ * // The field `foo` must be less than 84.
129
+ * option (buf.validate.message).cel_expression = "this.foo < 84";
130
+ * optional int32 foo = 1;
120
131
  * }
121
132
  * ```
122
133
  *
123
- * @generated from field: optional bool disabled = 1;
134
+ * @generated from field: repeated string cel_expression = 5;
124
135
  */
125
- disabled: boolean;
136
+ celExpression: string[];
126
137
  /**
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).
138
+ * `cel` is a repeated field of type Rule. Each Rule specifies a validation rule to be applied to this message.
139
+ * These rules are written in Common Expression Language (CEL) syntax. For more information,
140
+ * [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
130
141
  *
131
142
  *
132
143
  * ```proto
@@ -141,35 +152,83 @@ export type MessageConstraints = Message<"buf.validate.MessageConstraints"> & {
141
152
  * }
142
153
  * ```
143
154
  *
144
- * @generated from field: repeated buf.validate.Constraint cel = 3;
155
+ * @generated from field: repeated buf.validate.Rule cel = 3;
145
156
  */
146
- cel: Constraint[];
157
+ cel: Rule[];
158
+ /**
159
+ * `oneof` is a repeated field of type MessageOneofRule that specifies a list of fields
160
+ * of which at most one can be present. If `required` is also specified, then exactly one
161
+ * of the specified fields _must_ be present.
162
+ *
163
+ * This will enforce oneof-like constraints with a few features not provided by
164
+ * actual Protobuf oneof declarations:
165
+ * 1. Repeated and map fields are allowed in this validation. In a Protobuf oneof,
166
+ * only scalar fields are allowed.
167
+ * 2. Fields with implicit presence are allowed. In a Protobuf oneof, all member
168
+ * fields have explicit presence. This means that, for the purpose of determining
169
+ * how many fields are set, explicitly setting such a field to its zero value is
170
+ * effectively the same as not setting it at all.
171
+ * 3. This will always generate validation errors for a message unmarshalled from
172
+ * serialized data that sets more than one field. With a Protobuf oneof, when
173
+ * multiple fields are present in the serialized form, earlier values are usually
174
+ * silently ignored when unmarshalling, with only the last field being set when
175
+ * unmarshalling completes.
176
+ *
177
+ * Note that adding a field to a `oneof` will also set the IGNORE_IF_ZERO_VALUE on the fields. This means
178
+ * only the field that is set will be validated and the unset fields are not validated according to the field rules.
179
+ * This behavior can be overridden by setting `ignore` against a field.
180
+ *
181
+ * ```proto
182
+ * message MyMessage {
183
+ * // Only one of `field1` or `field2` _can_ be present in this message.
184
+ * option (buf.validate.message).oneof = { fields: ["field1", "field2"] };
185
+ * // Exactly one of `field3` or `field4` _must_ be present in this message.
186
+ * option (buf.validate.message).oneof = { fields: ["field3", "field4"], required: true };
187
+ * string field1 = 1;
188
+ * bytes field2 = 2;
189
+ * bool field3 = 3;
190
+ * int32 field4 = 4;
191
+ * }
192
+ * ```
193
+ *
194
+ * @generated from field: repeated buf.validate.MessageOneofRule oneof = 4;
195
+ */
196
+ oneof: MessageOneofRule[];
147
197
  };
148
198
  /**
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.
199
+ * MessageRules represents validation rules that are applied to the entire message.
200
+ * It includes disabling options and a list of Rule messages representing Common Expression Language (CEL) validation rules.
151
201
  *
152
- * @generated from message buf.validate.MessageConstraints
202
+ * @generated from message buf.validate.MessageRules
153
203
  */
154
- export type MessageConstraintsJson = {
204
+ export type MessageRulesJson = {
155
205
  /**
156
- * `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
157
- * This includes any fields within the message that would otherwise support validation.
206
+ * `cel_expression` is a repeated field CEL expressions. Each expression specifies a validation
207
+ * rule to be applied to this message. These rules are written in Common Expression Language (CEL) syntax.
208
+ *
209
+ * This is a simplified form of the `cel` Rule field, where only `expression` is set. This allows for
210
+ * simpler syntax when defining CEL Rules where `id` and `message` derived from the `expression`. `id` will
211
+ * be same as the `expression`.
212
+ *
213
+ * For more information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
158
214
  *
159
215
  * ```proto
160
216
  * message MyMessage {
161
- * // validation will be bypassed for this message
162
- * option (buf.validate.message).disabled = true;
217
+ * // The field `foo` must be greater than 42.
218
+ * option (buf.validate.message).cel_expression = "this.foo > 42";
219
+ * // The field `foo` must be less than 84.
220
+ * option (buf.validate.message).cel_expression = "this.foo < 84";
221
+ * optional int32 foo = 1;
163
222
  * }
164
223
  * ```
165
224
  *
166
- * @generated from field: optional bool disabled = 1;
225
+ * @generated from field: repeated string cel_expression = 5;
167
226
  */
168
- disabled?: boolean;
227
+ celExpression?: string[];
169
228
  /**
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).
229
+ * `cel` is a repeated field of type Rule. Each Rule specifies a validation rule to be applied to this message.
230
+ * These rules are written in Common Expression Language (CEL) syntax. For more information,
231
+ * [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
173
232
  *
174
233
  *
175
234
  * ```proto
@@ -184,26 +243,111 @@ export type MessageConstraintsJson = {
184
243
  * }
185
244
  * ```
186
245
  *
187
- * @generated from field: repeated buf.validate.Constraint cel = 3;
246
+ * @generated from field: repeated buf.validate.Rule cel = 3;
188
247
  */
189
- cel?: ConstraintJson[];
248
+ cel?: RuleJson[];
249
+ /**
250
+ * `oneof` is a repeated field of type MessageOneofRule that specifies a list of fields
251
+ * of which at most one can be present. If `required` is also specified, then exactly one
252
+ * of the specified fields _must_ be present.
253
+ *
254
+ * This will enforce oneof-like constraints with a few features not provided by
255
+ * actual Protobuf oneof declarations:
256
+ * 1. Repeated and map fields are allowed in this validation. In a Protobuf oneof,
257
+ * only scalar fields are allowed.
258
+ * 2. Fields with implicit presence are allowed. In a Protobuf oneof, all member
259
+ * fields have explicit presence. This means that, for the purpose of determining
260
+ * how many fields are set, explicitly setting such a field to its zero value is
261
+ * effectively the same as not setting it at all.
262
+ * 3. This will always generate validation errors for a message unmarshalled from
263
+ * serialized data that sets more than one field. With a Protobuf oneof, when
264
+ * multiple fields are present in the serialized form, earlier values are usually
265
+ * silently ignored when unmarshalling, with only the last field being set when
266
+ * unmarshalling completes.
267
+ *
268
+ * Note that adding a field to a `oneof` will also set the IGNORE_IF_ZERO_VALUE on the fields. This means
269
+ * only the field that is set will be validated and the unset fields are not validated according to the field rules.
270
+ * This behavior can be overridden by setting `ignore` against a field.
271
+ *
272
+ * ```proto
273
+ * message MyMessage {
274
+ * // Only one of `field1` or `field2` _can_ be present in this message.
275
+ * option (buf.validate.message).oneof = { fields: ["field1", "field2"] };
276
+ * // Exactly one of `field3` or `field4` _must_ be present in this message.
277
+ * option (buf.validate.message).oneof = { fields: ["field3", "field4"], required: true };
278
+ * string field1 = 1;
279
+ * bytes field2 = 2;
280
+ * bool field3 = 3;
281
+ * int32 field4 = 4;
282
+ * }
283
+ * ```
284
+ *
285
+ * @generated from field: repeated buf.validate.MessageOneofRule oneof = 4;
286
+ */
287
+ oneof?: MessageOneofRuleJson[];
288
+ };
289
+ /**
290
+ * Describes the message buf.validate.MessageRules.
291
+ * Use `create(MessageRulesSchema)` to create a new message.
292
+ */
293
+ export declare const MessageRulesSchema: GenMessage<MessageRules, {
294
+ jsonType: MessageRulesJson;
295
+ }>;
296
+ /**
297
+ * @generated from message buf.validate.MessageOneofRule
298
+ */
299
+ export type MessageOneofRule = Message<"buf.validate.MessageOneofRule"> & {
300
+ /**
301
+ * A list of field names to include in the oneof. All field names must be
302
+ * defined in the message. At least one field must be specified, and
303
+ * duplicates are not permitted.
304
+ *
305
+ * @generated from field: repeated string fields = 1;
306
+ */
307
+ fields: string[];
308
+ /**
309
+ * If true, one of the fields specified _must_ be set.
310
+ *
311
+ * @generated from field: optional bool required = 2;
312
+ */
313
+ required: boolean;
190
314
  };
191
315
  /**
192
- * Describes the message buf.validate.MessageConstraints.
193
- * Use `create(MessageConstraintsSchema)` to create a new message.
316
+ * @generated from message buf.validate.MessageOneofRule
194
317
  */
195
- export declare const MessageConstraintsSchema: GenMessage<MessageConstraints, MessageConstraintsJson>;
318
+ export type MessageOneofRuleJson = {
319
+ /**
320
+ * A list of field names to include in the oneof. All field names must be
321
+ * defined in the message. At least one field must be specified, and
322
+ * duplicates are not permitted.
323
+ *
324
+ * @generated from field: repeated string fields = 1;
325
+ */
326
+ fields?: string[];
327
+ /**
328
+ * If true, one of the fields specified _must_ be set.
329
+ *
330
+ * @generated from field: optional bool required = 2;
331
+ */
332
+ required?: boolean;
333
+ };
196
334
  /**
197
- * The `OneofConstraints` message type enables you to manage constraints for
335
+ * Describes the message buf.validate.MessageOneofRule.
336
+ * Use `create(MessageOneofRuleSchema)` to create a new message.
337
+ */
338
+ export declare const MessageOneofRuleSchema: GenMessage<MessageOneofRule, {
339
+ jsonType: MessageOneofRuleJson;
340
+ }>;
341
+ /**
342
+ * The `OneofRules` message type enables you to manage rules for
198
343
  * oneof fields in your protobuf messages.
199
344
  *
200
- * @generated from message buf.validate.OneofConstraints
345
+ * @generated from message buf.validate.OneofRules
201
346
  */
202
- export type OneofConstraints = Message<"buf.validate.OneofConstraints"> & {
347
+ export type OneofRules = Message<"buf.validate.OneofRules"> & {
203
348
  /**
204
- * If `required` is true, exactly one field of the oneof must be present. A
205
- * validation error is returned if no fields in the oneof are present. The
206
- * field itself may still be a default value; further constraints
349
+ * If `required` is true, exactly one field of the oneof must be set. A
350
+ * validation error is returned if no fields in the oneof are set. Further rules
207
351
  * should be placed on the fields themselves to ensure they are valid values,
208
352
  * such as `min_len` or `gt`.
209
353
  *
@@ -224,16 +368,15 @@ export type OneofConstraints = Message<"buf.validate.OneofConstraints"> & {
224
368
  required: boolean;
225
369
  };
226
370
  /**
227
- * The `OneofConstraints` message type enables you to manage constraints for
371
+ * The `OneofRules` message type enables you to manage rules for
228
372
  * oneof fields in your protobuf messages.
229
373
  *
230
- * @generated from message buf.validate.OneofConstraints
374
+ * @generated from message buf.validate.OneofRules
231
375
  */
232
- export type OneofConstraintsJson = {
376
+ export type OneofRulesJson = {
233
377
  /**
234
- * If `required` is true, exactly one field of the oneof must be present. A
235
- * validation error is returned if no fields in the oneof are present. The
236
- * field itself may still be a default value; further constraints
378
+ * If `required` is true, exactly one field of the oneof must be set. A
379
+ * validation error is returned if no fields in the oneof are set. Further rules
237
380
  * should be placed on the fields themselves to ensure they are valid values,
238
381
  * such as `min_len` or `gt`.
239
382
  *
@@ -254,21 +397,43 @@ export type OneofConstraintsJson = {
254
397
  required?: boolean;
255
398
  };
256
399
  /**
257
- * Describes the message buf.validate.OneofConstraints.
258
- * Use `create(OneofConstraintsSchema)` to create a new message.
400
+ * Describes the message buf.validate.OneofRules.
401
+ * Use `create(OneofRulesSchema)` to create a new message.
259
402
  */
260
- export declare const OneofConstraintsSchema: GenMessage<OneofConstraints, OneofConstraintsJson>;
403
+ export declare const OneofRulesSchema: GenMessage<OneofRules, {
404
+ jsonType: OneofRulesJson;
405
+ }>;
261
406
  /**
262
- * FieldConstraints encapsulates the rules for each type of field. Depending on
407
+ * FieldRules encapsulates the rules for each type of field. Depending on
263
408
  * the field, the correct set should be used to ensure proper validations.
264
409
  *
265
- * @generated from message buf.validate.FieldConstraints
410
+ * @generated from message buf.validate.FieldRules
266
411
  */
267
- export type FieldConstraints = Message<"buf.validate.FieldConstraints"> & {
412
+ export type FieldRules = Message<"buf.validate.FieldRules"> & {
413
+ /**
414
+ * `cel_expression` is a repeated field CEL expressions. Each expression specifies a validation
415
+ * rule to be applied to this message. These rules are written in Common Expression Language (CEL) syntax.
416
+ *
417
+ * This is a simplified form of the `cel` Rule field, where only `expression` is set. This allows for
418
+ * simpler syntax when defining CEL Rules where `id` and `message` derived from the `expression`. `id` will
419
+ * be same as the `expression`.
420
+ *
421
+ * For more information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
422
+ *
423
+ * ```proto
424
+ * message MyMessage {
425
+ * // The field `value` must be greater than 42.
426
+ * optional int32 value = 1 [(buf.validate.field).cel_expression = "this > 42"];
427
+ * }
428
+ * ```
429
+ *
430
+ * @generated from field: repeated string cel_expression = 29;
431
+ */
432
+ celExpression: string[];
268
433
  /**
269
434
  * `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).
435
+ * in the Common Expression Language (CEL) syntax. For more information,
436
+ * [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
272
437
  *
273
438
  * ```proto
274
439
  * message MyMessage {
@@ -281,42 +446,80 @@ export type FieldConstraints = Message<"buf.validate.FieldConstraints"> & {
281
446
  * }
282
447
  * ```
283
448
  *
284
- * @generated from field: repeated buf.validate.Constraint cel = 23;
449
+ * @generated from field: repeated buf.validate.Rule cel = 23;
285
450
  */
286
- cel: Constraint[];
451
+ cel: Rule[];
287
452
  /**
288
- * If `required` is true, the field must be populated. A populated field can be
289
- * described as "serialized in the wire format," which includes:
453
+ * If `required` is true, the field must be set. A validation error is returned
454
+ * if the field is not set.
290
455
  *
291
- * - the following "nullable" fields must be explicitly set to be considered populated:
292
- * - singular message fields (whose fields may be unpopulated/default values)
293
- * - member fields of a oneof (may be their default value)
294
- * - proto3 optional fields (may be their default value)
295
- * - proto2 scalar fields (both optional and required)
296
- * - proto3 scalar fields must be non-zero to be considered populated
297
- * - repeated and map fields must be non-empty to be considered populated
456
+ * ```proto
457
+ * syntax="proto3";
458
+ *
459
+ * message FieldsWithPresence {
460
+ * // Requires any string to be set, including the empty string.
461
+ * optional string link = 1 [
462
+ * (buf.validate.field).required = true
463
+ * ];
464
+ * // Requires true or false to be set.
465
+ * optional bool disabled = 2 [
466
+ * (buf.validate.field).required = true
467
+ * ];
468
+ * // Requires a message to be set, including the empty message.
469
+ * SomeMessage msg = 4 [
470
+ * (buf.validate.field).required = true
471
+ * ];
472
+ * }
473
+ * ```
474
+ *
475
+ * All fields in the example above track presence. By default, Protovalidate
476
+ * ignores rules on those fields if no value is set. `required` ensures that
477
+ * the fields are set and valid.
478
+ *
479
+ * Fields that don't track presence are always validated by Protovalidate,
480
+ * whether they are set or not. It is not necessary to add `required`. It
481
+ * can be added to indicate that the field cannot be the zero value.
298
482
  *
299
483
  * ```proto
300
- * message MyMessage {
301
- * // The field `value` must be set to a non-null value.
302
- * optional MyOtherMessage value = 1 [(buf.validate.field).required = true];
484
+ * syntax="proto3";
485
+ *
486
+ * message FieldsWithoutPresence {
487
+ * // `string.email` always applies, even to an empty string.
488
+ * string link = 1 [
489
+ * (buf.validate.field).string.email = true
490
+ * ];
491
+ * // `repeated.min_items` always applies, even to an empty list.
492
+ * repeated string labels = 2 [
493
+ * (buf.validate.field).repeated.min_items = 1
494
+ * ];
495
+ * // `required`, for fields that don't track presence, indicates
496
+ * // the value of the field can't be the zero value.
497
+ * int32 zero_value_not_allowed = 3 [
498
+ * (buf.validate.field).required = true
499
+ * ];
303
500
  * }
304
501
  * ```
305
502
  *
503
+ * To learn which fields track presence, see the
504
+ * [Field Presence cheat sheet](https://protobuf.dev/programming-guides/field_presence/#cheat).
505
+ *
506
+ * Note: While field rules can be applied to repeated items, map keys, and map
507
+ * values, the elements are always considered to be set. Consequently,
508
+ * specifying `repeated.items.required` is redundant.
509
+ *
306
510
  * @generated from field: optional bool required = 25;
307
511
  */
308
512
  required: boolean;
309
513
  /**
310
- * Skip validation on the field if its value matches the specified criteria.
311
- * See Ignore enum for details.
514
+ * Ignore validation rules on the field if its value matches the specified
515
+ * criteria. See the `Ignore` enum for details.
312
516
  *
313
517
  * ```proto
314
518
  * message UpdateRequest {
315
- * // The uri rule only applies if the field is populated and not an empty
316
- * // string.
317
- * optional string url = 1 [
318
- * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE,
319
- * (buf.validate.field).string.uri = true,
519
+ * // The uri rule only applies if the field is not an empty string.
520
+ * string url = 1 [
521
+ * (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE,
522
+ * (buf.validate.field).string.uri = true
320
523
  * ];
321
524
  * }
322
525
  * ```
@@ -325,7 +528,7 @@ export type FieldConstraints = Message<"buf.validate.FieldConstraints"> & {
325
528
  */
326
529
  ignore: Ignore;
327
530
  /**
328
- * @generated from oneof buf.validate.FieldConstraints.type
531
+ * @generated from oneof buf.validate.FieldRules.type
329
532
  */
330
533
  type: {
331
534
  /**
@@ -453,6 +656,12 @@ export type FieldConstraints = Message<"buf.validate.FieldConstraints"> & {
453
656
  */
454
657
  value: DurationRules;
455
658
  case: "duration";
659
+ } | {
660
+ /**
661
+ * @generated from field: buf.validate.FieldMaskRules field_mask = 28;
662
+ */
663
+ value: FieldMaskRules;
664
+ case: "fieldMask";
456
665
  } | {
457
666
  /**
458
667
  * @generated from field: buf.validate.TimestampRules timestamp = 22;
@@ -465,16 +674,36 @@ export type FieldConstraints = Message<"buf.validate.FieldConstraints"> & {
465
674
  };
466
675
  };
467
676
  /**
468
- * FieldConstraints encapsulates the rules for each type of field. Depending on
677
+ * FieldRules encapsulates the rules for each type of field. Depending on
469
678
  * the field, the correct set should be used to ensure proper validations.
470
679
  *
471
- * @generated from message buf.validate.FieldConstraints
680
+ * @generated from message buf.validate.FieldRules
472
681
  */
473
- export type FieldConstraintsJson = {
682
+ export type FieldRulesJson = {
683
+ /**
684
+ * `cel_expression` is a repeated field CEL expressions. Each expression specifies a validation
685
+ * rule to be applied to this message. These rules are written in Common Expression Language (CEL) syntax.
686
+ *
687
+ * This is a simplified form of the `cel` Rule field, where only `expression` is set. This allows for
688
+ * simpler syntax when defining CEL Rules where `id` and `message` derived from the `expression`. `id` will
689
+ * be same as the `expression`.
690
+ *
691
+ * For more information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
692
+ *
693
+ * ```proto
694
+ * message MyMessage {
695
+ * // The field `value` must be greater than 42.
696
+ * optional int32 value = 1 [(buf.validate.field).cel_expression = "this > 42"];
697
+ * }
698
+ * ```
699
+ *
700
+ * @generated from field: repeated string cel_expression = 29;
701
+ */
702
+ celExpression?: string[];
474
703
  /**
475
704
  * `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).
705
+ * in the Common Expression Language (CEL) syntax. For more information,
706
+ * [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/).
478
707
  *
479
708
  * ```proto
480
709
  * message MyMessage {
@@ -487,42 +716,80 @@ export type FieldConstraintsJson = {
487
716
  * }
488
717
  * ```
489
718
  *
490
- * @generated from field: repeated buf.validate.Constraint cel = 23;
719
+ * @generated from field: repeated buf.validate.Rule cel = 23;
491
720
  */
492
- cel?: ConstraintJson[];
721
+ cel?: RuleJson[];
493
722
  /**
494
- * If `required` is true, the field must be populated. A populated field can be
495
- * described as "serialized in the wire format," which includes:
723
+ * If `required` is true, the field must be set. A validation error is returned
724
+ * if the field is not set.
725
+ *
726
+ * ```proto
727
+ * syntax="proto3";
496
728
  *
497
- * - the following "nullable" fields must be explicitly set to be considered populated:
498
- * - singular message fields (whose fields may be unpopulated/default values)
499
- * - member fields of a oneof (may be their default value)
500
- * - proto3 optional fields (may be their default value)
501
- * - proto2 scalar fields (both optional and required)
502
- * - proto3 scalar fields must be non-zero to be considered populated
503
- * - repeated and map fields must be non-empty to be considered populated
729
+ * message FieldsWithPresence {
730
+ * // Requires any string to be set, including the empty string.
731
+ * optional string link = 1 [
732
+ * (buf.validate.field).required = true
733
+ * ];
734
+ * // Requires true or false to be set.
735
+ * optional bool disabled = 2 [
736
+ * (buf.validate.field).required = true
737
+ * ];
738
+ * // Requires a message to be set, including the empty message.
739
+ * SomeMessage msg = 4 [
740
+ * (buf.validate.field).required = true
741
+ * ];
742
+ * }
743
+ * ```
744
+ *
745
+ * All fields in the example above track presence. By default, Protovalidate
746
+ * ignores rules on those fields if no value is set. `required` ensures that
747
+ * the fields are set and valid.
748
+ *
749
+ * Fields that don't track presence are always validated by Protovalidate,
750
+ * whether they are set or not. It is not necessary to add `required`. It
751
+ * can be added to indicate that the field cannot be the zero value.
504
752
  *
505
753
  * ```proto
506
- * message MyMessage {
507
- * // The field `value` must be set to a non-null value.
508
- * optional MyOtherMessage value = 1 [(buf.validate.field).required = true];
754
+ * syntax="proto3";
755
+ *
756
+ * message FieldsWithoutPresence {
757
+ * // `string.email` always applies, even to an empty string.
758
+ * string link = 1 [
759
+ * (buf.validate.field).string.email = true
760
+ * ];
761
+ * // `repeated.min_items` always applies, even to an empty list.
762
+ * repeated string labels = 2 [
763
+ * (buf.validate.field).repeated.min_items = 1
764
+ * ];
765
+ * // `required`, for fields that don't track presence, indicates
766
+ * // the value of the field can't be the zero value.
767
+ * int32 zero_value_not_allowed = 3 [
768
+ * (buf.validate.field).required = true
769
+ * ];
509
770
  * }
510
771
  * ```
511
772
  *
773
+ * To learn which fields track presence, see the
774
+ * [Field Presence cheat sheet](https://protobuf.dev/programming-guides/field_presence/#cheat).
775
+ *
776
+ * Note: While field rules can be applied to repeated items, map keys, and map
777
+ * values, the elements are always considered to be set. Consequently,
778
+ * specifying `repeated.items.required` is redundant.
779
+ *
512
780
  * @generated from field: optional bool required = 25;
513
781
  */
514
782
  required?: boolean;
515
783
  /**
516
- * Skip validation on the field if its value matches the specified criteria.
517
- * See Ignore enum for details.
784
+ * Ignore validation rules on the field if its value matches the specified
785
+ * criteria. See the `Ignore` enum for details.
518
786
  *
519
787
  * ```proto
520
788
  * message UpdateRequest {
521
- * // The uri rule only applies if the field is populated and not an empty
522
- * // string.
523
- * optional string url = 1 [
524
- * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE,
525
- * (buf.validate.field).string.uri = true,
789
+ * // The uri rule only applies if the field is not an empty string.
790
+ * string url = 1 [
791
+ * (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE,
792
+ * (buf.validate.field).string.uri = true
526
793
  * ];
527
794
  * }
528
795
  * ```
@@ -616,27 +883,33 @@ export type FieldConstraintsJson = {
616
883
  * @generated from field: buf.validate.DurationRules duration = 21;
617
884
  */
618
885
  duration?: DurationRulesJson;
886
+ /**
887
+ * @generated from field: buf.validate.FieldMaskRules field_mask = 28;
888
+ */
889
+ fieldMask?: FieldMaskRulesJson;
619
890
  /**
620
891
  * @generated from field: buf.validate.TimestampRules timestamp = 22;
621
892
  */
622
893
  timestamp?: TimestampRulesJson;
623
894
  };
624
895
  /**
625
- * Describes the message buf.validate.FieldConstraints.
626
- * Use `create(FieldConstraintsSchema)` to create a new message.
896
+ * Describes the message buf.validate.FieldRules.
897
+ * Use `create(FieldRulesSchema)` to create a new message.
627
898
  */
628
- export declare const FieldConstraintsSchema: GenMessage<FieldConstraints, FieldConstraintsJson>;
899
+ export declare const FieldRulesSchema: GenMessage<FieldRules, {
900
+ jsonType: FieldRulesJson;
901
+ }>;
629
902
  /**
630
- * PredefinedConstraints are custom constraints that can be re-used with
903
+ * PredefinedRules are custom rules that can be re-used with
631
904
  * multiple fields.
632
905
  *
633
- * @generated from message buf.validate.PredefinedConstraints
906
+ * @generated from message buf.validate.PredefinedRules
634
907
  */
635
- export type PredefinedConstraints = Message<"buf.validate.PredefinedConstraints"> & {
908
+ export type PredefinedRules = Message<"buf.validate.PredefinedRules"> & {
636
909
  /**
637
910
  * `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).
911
+ * in the Common Expression Language (CEL) syntax. For more information,
912
+ * [see our documentation](https://buf.build/docs/protovalidate/schemas/predefined-rules/).
640
913
  *
641
914
  * ```proto
642
915
  * message MyMessage {
@@ -649,21 +922,21 @@ export type PredefinedConstraints = Message<"buf.validate.PredefinedConstraints"
649
922
  * }
650
923
  * ```
651
924
  *
652
- * @generated from field: repeated buf.validate.Constraint cel = 1;
925
+ * @generated from field: repeated buf.validate.Rule cel = 1;
653
926
  */
654
- cel: Constraint[];
927
+ cel: Rule[];
655
928
  };
656
929
  /**
657
- * PredefinedConstraints are custom constraints that can be re-used with
930
+ * PredefinedRules are custom rules that can be re-used with
658
931
  * multiple fields.
659
932
  *
660
- * @generated from message buf.validate.PredefinedConstraints
933
+ * @generated from message buf.validate.PredefinedRules
661
934
  */
662
- export type PredefinedConstraintsJson = {
935
+ export type PredefinedRulesJson = {
663
936
  /**
664
937
  * `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).
938
+ * in the Common Expression Language (CEL) syntax. For more information,
939
+ * [see our documentation](https://buf.build/docs/protovalidate/schemas/predefined-rules/).
667
940
  *
668
941
  * ```proto
669
942
  * message MyMessage {
@@ -676,17 +949,19 @@ export type PredefinedConstraintsJson = {
676
949
  * }
677
950
  * ```
678
951
  *
679
- * @generated from field: repeated buf.validate.Constraint cel = 1;
952
+ * @generated from field: repeated buf.validate.Rule cel = 1;
680
953
  */
681
- cel?: ConstraintJson[];
954
+ cel?: RuleJson[];
682
955
  };
683
956
  /**
684
- * Describes the message buf.validate.PredefinedConstraints.
685
- * Use `create(PredefinedConstraintsSchema)` to create a new message.
957
+ * Describes the message buf.validate.PredefinedRules.
958
+ * Use `create(PredefinedRulesSchema)` to create a new message.
686
959
  */
687
- export declare const PredefinedConstraintsSchema: GenMessage<PredefinedConstraints, PredefinedConstraintsJson>;
960
+ export declare const PredefinedRulesSchema: GenMessage<PredefinedRules, {
961
+ jsonType: PredefinedRulesJson;
962
+ }>;
688
963
  /**
689
- * FloatRules describes the constraints applied to `float` values. These
964
+ * FloatRules describes the rules applied to `float` values. These
690
965
  * rules may also be applied to the `google.protobuf.FloatValue` Well-Known-Type.
691
966
  *
692
967
  * @generated from message buf.validate.FloatRules
@@ -843,14 +1118,14 @@ export type FloatRules = Message<"buf.validate.FloatRules"> & {
843
1118
  finite: boolean;
844
1119
  /**
845
1120
  * `example` specifies values that the field may have. These values SHOULD
846
- * conform to other constraints. `example` values will not impact validation
1121
+ * conform to other rules. `example` values will not impact validation
847
1122
  * but may be used as helpful guidance on how to populate the given field.
848
1123
  *
849
1124
  * ```proto
850
1125
  * message MyFloat {
851
1126
  * float value = 1 [
852
1127
  * (buf.validate.field).float.example = 1.0,
853
- * (buf.validate.field).float.example = "Infinity"
1128
+ * (buf.validate.field).float.example = inf
854
1129
  * ];
855
1130
  * }
856
1131
  * ```
@@ -860,7 +1135,7 @@ export type FloatRules = Message<"buf.validate.FloatRules"> & {
860
1135
  example: number[];
861
1136
  };
862
1137
  /**
863
- * FloatRules describes the constraints applied to `float` values. These
1138
+ * FloatRules describes the rules applied to `float` values. These
864
1139
  * rules may also be applied to the `google.protobuf.FloatValue` Well-Known-Type.
865
1140
  *
866
1141
  * @generated from message buf.validate.FloatRules
@@ -995,14 +1270,14 @@ export type FloatRulesJson = {
995
1270
  finite?: boolean;
996
1271
  /**
997
1272
  * `example` specifies values that the field may have. These values SHOULD
998
- * conform to other constraints. `example` values will not impact validation
1273
+ * conform to other rules. `example` values will not impact validation
999
1274
  * but may be used as helpful guidance on how to populate the given field.
1000
1275
  *
1001
1276
  * ```proto
1002
1277
  * message MyFloat {
1003
1278
  * float value = 1 [
1004
1279
  * (buf.validate.field).float.example = 1.0,
1005
- * (buf.validate.field).float.example = "Infinity"
1280
+ * (buf.validate.field).float.example = inf
1006
1281
  * ];
1007
1282
  * }
1008
1283
  * ```
@@ -1015,9 +1290,11 @@ export type FloatRulesJson = {
1015
1290
  * Describes the message buf.validate.FloatRules.
1016
1291
  * Use `create(FloatRulesSchema)` to create a new message.
1017
1292
  */
1018
- export declare const FloatRulesSchema: GenMessage<FloatRules, FloatRulesJson>;
1293
+ export declare const FloatRulesSchema: GenMessage<FloatRules, {
1294
+ jsonType: FloatRulesJson;
1295
+ }>;
1019
1296
  /**
1020
- * DoubleRules describes the constraints applied to `double` values. These
1297
+ * DoubleRules describes the rules applied to `double` values. These
1021
1298
  * rules may also be applied to the `google.protobuf.DoubleValue` Well-Known-Type.
1022
1299
  *
1023
1300
  * @generated from message buf.validate.DoubleRules
@@ -1174,14 +1451,14 @@ export type DoubleRules = Message<"buf.validate.DoubleRules"> & {
1174
1451
  finite: boolean;
1175
1452
  /**
1176
1453
  * `example` specifies values that the field may have. These values SHOULD
1177
- * conform to other constraints. `example` values will not impact validation
1454
+ * conform to other rules. `example` values will not impact validation
1178
1455
  * but may be used as helpful guidance on how to populate the given field.
1179
1456
  *
1180
1457
  * ```proto
1181
1458
  * message MyDouble {
1182
1459
  * double value = 1 [
1183
1460
  * (buf.validate.field).double.example = 1.0,
1184
- * (buf.validate.field).double.example = "Infinity"
1461
+ * (buf.validate.field).double.example = inf
1185
1462
  * ];
1186
1463
  * }
1187
1464
  * ```
@@ -1191,7 +1468,7 @@ export type DoubleRules = Message<"buf.validate.DoubleRules"> & {
1191
1468
  example: number[];
1192
1469
  };
1193
1470
  /**
1194
- * DoubleRules describes the constraints applied to `double` values. These
1471
+ * DoubleRules describes the rules applied to `double` values. These
1195
1472
  * rules may also be applied to the `google.protobuf.DoubleValue` Well-Known-Type.
1196
1473
  *
1197
1474
  * @generated from message buf.validate.DoubleRules
@@ -1326,14 +1603,14 @@ export type DoubleRulesJson = {
1326
1603
  finite?: boolean;
1327
1604
  /**
1328
1605
  * `example` specifies values that the field may have. These values SHOULD
1329
- * conform to other constraints. `example` values will not impact validation
1606
+ * conform to other rules. `example` values will not impact validation
1330
1607
  * but may be used as helpful guidance on how to populate the given field.
1331
1608
  *
1332
1609
  * ```proto
1333
1610
  * message MyDouble {
1334
1611
  * double value = 1 [
1335
1612
  * (buf.validate.field).double.example = 1.0,
1336
- * (buf.validate.field).double.example = "Infinity"
1613
+ * (buf.validate.field).double.example = inf
1337
1614
  * ];
1338
1615
  * }
1339
1616
  * ```
@@ -1346,9 +1623,11 @@ export type DoubleRulesJson = {
1346
1623
  * Describes the message buf.validate.DoubleRules.
1347
1624
  * Use `create(DoubleRulesSchema)` to create a new message.
1348
1625
  */
1349
- export declare const DoubleRulesSchema: GenMessage<DoubleRules, DoubleRulesJson>;
1626
+ export declare const DoubleRulesSchema: GenMessage<DoubleRules, {
1627
+ jsonType: DoubleRulesJson;
1628
+ }>;
1350
1629
  /**
1351
- * Int32Rules describes the constraints applied to `int32` values. These
1630
+ * Int32Rules describes the rules applied to `int32` values. These
1352
1631
  * rules may also be applied to the `google.protobuf.Int32Value` Well-Known-Type.
1353
1632
  *
1354
1633
  * @generated from message buf.validate.Int32Rules
@@ -1498,7 +1777,7 @@ export type Int32Rules = Message<"buf.validate.Int32Rules"> & {
1498
1777
  notIn: number[];
1499
1778
  /**
1500
1779
  * `example` specifies values that the field may have. These values SHOULD
1501
- * conform to other constraints. `example` values will not impact validation
1780
+ * conform to other rules. `example` values will not impact validation
1502
1781
  * but may be used as helpful guidance on how to populate the given field.
1503
1782
  *
1504
1783
  * ```proto
@@ -1515,7 +1794,7 @@ export type Int32Rules = Message<"buf.validate.Int32Rules"> & {
1515
1794
  example: number[];
1516
1795
  };
1517
1796
  /**
1518
- * Int32Rules describes the constraints applied to `int32` values. These
1797
+ * Int32Rules describes the rules applied to `int32` values. These
1519
1798
  * rules may also be applied to the `google.protobuf.Int32Value` Well-Known-Type.
1520
1799
  *
1521
1800
  * @generated from message buf.validate.Int32Rules
@@ -1643,7 +1922,7 @@ export type Int32RulesJson = {
1643
1922
  notIn?: number[];
1644
1923
  /**
1645
1924
  * `example` specifies values that the field may have. These values SHOULD
1646
- * conform to other constraints. `example` values will not impact validation
1925
+ * conform to other rules. `example` values will not impact validation
1647
1926
  * but may be used as helpful guidance on how to populate the given field.
1648
1927
  *
1649
1928
  * ```proto
@@ -1663,9 +1942,11 @@ export type Int32RulesJson = {
1663
1942
  * Describes the message buf.validate.Int32Rules.
1664
1943
  * Use `create(Int32RulesSchema)` to create a new message.
1665
1944
  */
1666
- export declare const Int32RulesSchema: GenMessage<Int32Rules, Int32RulesJson>;
1945
+ export declare const Int32RulesSchema: GenMessage<Int32Rules, {
1946
+ jsonType: Int32RulesJson;
1947
+ }>;
1667
1948
  /**
1668
- * Int64Rules describes the constraints applied to `int64` values. These
1949
+ * Int64Rules describes the rules applied to `int64` values. These
1669
1950
  * rules may also be applied to the `google.protobuf.Int64Value` Well-Known-Type.
1670
1951
  *
1671
1952
  * @generated from message buf.validate.Int64Rules
@@ -1815,7 +2096,7 @@ export type Int64Rules = Message<"buf.validate.Int64Rules"> & {
1815
2096
  notIn: bigint[];
1816
2097
  /**
1817
2098
  * `example` specifies values that the field may have. These values SHOULD
1818
- * conform to other constraints. `example` values will not impact validation
2099
+ * conform to other rules. `example` values will not impact validation
1819
2100
  * but may be used as helpful guidance on how to populate the given field.
1820
2101
  *
1821
2102
  * ```proto
@@ -1832,7 +2113,7 @@ export type Int64Rules = Message<"buf.validate.Int64Rules"> & {
1832
2113
  example: bigint[];
1833
2114
  };
1834
2115
  /**
1835
- * Int64Rules describes the constraints applied to `int64` values. These
2116
+ * Int64Rules describes the rules applied to `int64` values. These
1836
2117
  * rules may also be applied to the `google.protobuf.Int64Value` Well-Known-Type.
1837
2118
  *
1838
2119
  * @generated from message buf.validate.Int64Rules
@@ -1960,7 +2241,7 @@ export type Int64RulesJson = {
1960
2241
  notIn?: string[];
1961
2242
  /**
1962
2243
  * `example` specifies values that the field may have. These values SHOULD
1963
- * conform to other constraints. `example` values will not impact validation
2244
+ * conform to other rules. `example` values will not impact validation
1964
2245
  * but may be used as helpful guidance on how to populate the given field.
1965
2246
  *
1966
2247
  * ```proto
@@ -1980,9 +2261,11 @@ export type Int64RulesJson = {
1980
2261
  * Describes the message buf.validate.Int64Rules.
1981
2262
  * Use `create(Int64RulesSchema)` to create a new message.
1982
2263
  */
1983
- export declare const Int64RulesSchema: GenMessage<Int64Rules, Int64RulesJson>;
2264
+ export declare const Int64RulesSchema: GenMessage<Int64Rules, {
2265
+ jsonType: Int64RulesJson;
2266
+ }>;
1984
2267
  /**
1985
- * UInt32Rules describes the constraints applied to `uint32` values. These
2268
+ * UInt32Rules describes the rules applied to `uint32` values. These
1986
2269
  * rules may also be applied to the `google.protobuf.UInt32Value` Well-Known-Type.
1987
2270
  *
1988
2271
  * @generated from message buf.validate.UInt32Rules
@@ -2132,7 +2415,7 @@ export type UInt32Rules = Message<"buf.validate.UInt32Rules"> & {
2132
2415
  notIn: number[];
2133
2416
  /**
2134
2417
  * `example` specifies values that the field may have. These values SHOULD
2135
- * conform to other constraints. `example` values will not impact validation
2418
+ * conform to other rules. `example` values will not impact validation
2136
2419
  * but may be used as helpful guidance on how to populate the given field.
2137
2420
  *
2138
2421
  * ```proto
@@ -2149,7 +2432,7 @@ export type UInt32Rules = Message<"buf.validate.UInt32Rules"> & {
2149
2432
  example: number[];
2150
2433
  };
2151
2434
  /**
2152
- * UInt32Rules describes the constraints applied to `uint32` values. These
2435
+ * UInt32Rules describes the rules applied to `uint32` values. These
2153
2436
  * rules may also be applied to the `google.protobuf.UInt32Value` Well-Known-Type.
2154
2437
  *
2155
2438
  * @generated from message buf.validate.UInt32Rules
@@ -2277,7 +2560,7 @@ export type UInt32RulesJson = {
2277
2560
  notIn?: number[];
2278
2561
  /**
2279
2562
  * `example` specifies values that the field may have. These values SHOULD
2280
- * conform to other constraints. `example` values will not impact validation
2563
+ * conform to other rules. `example` values will not impact validation
2281
2564
  * but may be used as helpful guidance on how to populate the given field.
2282
2565
  *
2283
2566
  * ```proto
@@ -2297,9 +2580,11 @@ export type UInt32RulesJson = {
2297
2580
  * Describes the message buf.validate.UInt32Rules.
2298
2581
  * Use `create(UInt32RulesSchema)` to create a new message.
2299
2582
  */
2300
- export declare const UInt32RulesSchema: GenMessage<UInt32Rules, UInt32RulesJson>;
2583
+ export declare const UInt32RulesSchema: GenMessage<UInt32Rules, {
2584
+ jsonType: UInt32RulesJson;
2585
+ }>;
2301
2586
  /**
2302
- * UInt64Rules describes the constraints applied to `uint64` values. These
2587
+ * UInt64Rules describes the rules applied to `uint64` values. These
2303
2588
  * rules may also be applied to the `google.protobuf.UInt64Value` Well-Known-Type.
2304
2589
  *
2305
2590
  * @generated from message buf.validate.UInt64Rules
@@ -2449,7 +2734,7 @@ export type UInt64Rules = Message<"buf.validate.UInt64Rules"> & {
2449
2734
  notIn: bigint[];
2450
2735
  /**
2451
2736
  * `example` specifies values that the field may have. These values SHOULD
2452
- * conform to other constraints. `example` values will not impact validation
2737
+ * conform to other rules. `example` values will not impact validation
2453
2738
  * but may be used as helpful guidance on how to populate the given field.
2454
2739
  *
2455
2740
  * ```proto
@@ -2466,7 +2751,7 @@ export type UInt64Rules = Message<"buf.validate.UInt64Rules"> & {
2466
2751
  example: bigint[];
2467
2752
  };
2468
2753
  /**
2469
- * UInt64Rules describes the constraints applied to `uint64` values. These
2754
+ * UInt64Rules describes the rules applied to `uint64` values. These
2470
2755
  * rules may also be applied to the `google.protobuf.UInt64Value` Well-Known-Type.
2471
2756
  *
2472
2757
  * @generated from message buf.validate.UInt64Rules
@@ -2594,7 +2879,7 @@ export type UInt64RulesJson = {
2594
2879
  notIn?: string[];
2595
2880
  /**
2596
2881
  * `example` specifies values that the field may have. These values SHOULD
2597
- * conform to other constraints. `example` values will not impact validation
2882
+ * conform to other rules. `example` values will not impact validation
2598
2883
  * but may be used as helpful guidance on how to populate the given field.
2599
2884
  *
2600
2885
  * ```proto
@@ -2614,9 +2899,11 @@ export type UInt64RulesJson = {
2614
2899
  * Describes the message buf.validate.UInt64Rules.
2615
2900
  * Use `create(UInt64RulesSchema)` to create a new message.
2616
2901
  */
2617
- export declare const UInt64RulesSchema: GenMessage<UInt64Rules, UInt64RulesJson>;
2902
+ export declare const UInt64RulesSchema: GenMessage<UInt64Rules, {
2903
+ jsonType: UInt64RulesJson;
2904
+ }>;
2618
2905
  /**
2619
- * SInt32Rules describes the constraints applied to `sint32` values.
2906
+ * SInt32Rules describes the rules applied to `sint32` values.
2620
2907
  *
2621
2908
  * @generated from message buf.validate.SInt32Rules
2622
2909
  */
@@ -2765,7 +3052,7 @@ export type SInt32Rules = Message<"buf.validate.SInt32Rules"> & {
2765
3052
  notIn: number[];
2766
3053
  /**
2767
3054
  * `example` specifies values that the field may have. These values SHOULD
2768
- * conform to other constraints. `example` values will not impact validation
3055
+ * conform to other rules. `example` values will not impact validation
2769
3056
  * but may be used as helpful guidance on how to populate the given field.
2770
3057
  *
2771
3058
  * ```proto
@@ -2782,7 +3069,7 @@ export type SInt32Rules = Message<"buf.validate.SInt32Rules"> & {
2782
3069
  example: number[];
2783
3070
  };
2784
3071
  /**
2785
- * SInt32Rules describes the constraints applied to `sint32` values.
3072
+ * SInt32Rules describes the rules applied to `sint32` values.
2786
3073
  *
2787
3074
  * @generated from message buf.validate.SInt32Rules
2788
3075
  */
@@ -2909,7 +3196,7 @@ export type SInt32RulesJson = {
2909
3196
  notIn?: number[];
2910
3197
  /**
2911
3198
  * `example` specifies values that the field may have. These values SHOULD
2912
- * conform to other constraints. `example` values will not impact validation
3199
+ * conform to other rules. `example` values will not impact validation
2913
3200
  * but may be used as helpful guidance on how to populate the given field.
2914
3201
  *
2915
3202
  * ```proto
@@ -2929,9 +3216,11 @@ export type SInt32RulesJson = {
2929
3216
  * Describes the message buf.validate.SInt32Rules.
2930
3217
  * Use `create(SInt32RulesSchema)` to create a new message.
2931
3218
  */
2932
- export declare const SInt32RulesSchema: GenMessage<SInt32Rules, SInt32RulesJson>;
3219
+ export declare const SInt32RulesSchema: GenMessage<SInt32Rules, {
3220
+ jsonType: SInt32RulesJson;
3221
+ }>;
2933
3222
  /**
2934
- * SInt64Rules describes the constraints applied to `sint64` values.
3223
+ * SInt64Rules describes the rules applied to `sint64` values.
2935
3224
  *
2936
3225
  * @generated from message buf.validate.SInt64Rules
2937
3226
  */
@@ -3080,7 +3369,7 @@ export type SInt64Rules = Message<"buf.validate.SInt64Rules"> & {
3080
3369
  notIn: bigint[];
3081
3370
  /**
3082
3371
  * `example` specifies values that the field may have. These values SHOULD
3083
- * conform to other constraints. `example` values will not impact validation
3372
+ * conform to other rules. `example` values will not impact validation
3084
3373
  * but may be used as helpful guidance on how to populate the given field.
3085
3374
  *
3086
3375
  * ```proto
@@ -3097,7 +3386,7 @@ export type SInt64Rules = Message<"buf.validate.SInt64Rules"> & {
3097
3386
  example: bigint[];
3098
3387
  };
3099
3388
  /**
3100
- * SInt64Rules describes the constraints applied to `sint64` values.
3389
+ * SInt64Rules describes the rules applied to `sint64` values.
3101
3390
  *
3102
3391
  * @generated from message buf.validate.SInt64Rules
3103
3392
  */
@@ -3224,7 +3513,7 @@ export type SInt64RulesJson = {
3224
3513
  notIn?: string[];
3225
3514
  /**
3226
3515
  * `example` specifies values that the field may have. These values SHOULD
3227
- * conform to other constraints. `example` values will not impact validation
3516
+ * conform to other rules. `example` values will not impact validation
3228
3517
  * but may be used as helpful guidance on how to populate the given field.
3229
3518
  *
3230
3519
  * ```proto
@@ -3244,9 +3533,11 @@ export type SInt64RulesJson = {
3244
3533
  * Describes the message buf.validate.SInt64Rules.
3245
3534
  * Use `create(SInt64RulesSchema)` to create a new message.
3246
3535
  */
3247
- export declare const SInt64RulesSchema: GenMessage<SInt64Rules, SInt64RulesJson>;
3536
+ export declare const SInt64RulesSchema: GenMessage<SInt64Rules, {
3537
+ jsonType: SInt64RulesJson;
3538
+ }>;
3248
3539
  /**
3249
- * Fixed32Rules describes the constraints applied to `fixed32` values.
3540
+ * Fixed32Rules describes the rules applied to `fixed32` values.
3250
3541
  *
3251
3542
  * @generated from message buf.validate.Fixed32Rules
3252
3543
  */
@@ -3395,7 +3686,7 @@ export type Fixed32Rules = Message<"buf.validate.Fixed32Rules"> & {
3395
3686
  notIn: number[];
3396
3687
  /**
3397
3688
  * `example` specifies values that the field may have. These values SHOULD
3398
- * conform to other constraints. `example` values will not impact validation
3689
+ * conform to other rules. `example` values will not impact validation
3399
3690
  * but may be used as helpful guidance on how to populate the given field.
3400
3691
  *
3401
3692
  * ```proto
@@ -3412,7 +3703,7 @@ export type Fixed32Rules = Message<"buf.validate.Fixed32Rules"> & {
3412
3703
  example: number[];
3413
3704
  };
3414
3705
  /**
3415
- * Fixed32Rules describes the constraints applied to `fixed32` values.
3706
+ * Fixed32Rules describes the rules applied to `fixed32` values.
3416
3707
  *
3417
3708
  * @generated from message buf.validate.Fixed32Rules
3418
3709
  */
@@ -3539,7 +3830,7 @@ export type Fixed32RulesJson = {
3539
3830
  notIn?: number[];
3540
3831
  /**
3541
3832
  * `example` specifies values that the field may have. These values SHOULD
3542
- * conform to other constraints. `example` values will not impact validation
3833
+ * conform to other rules. `example` values will not impact validation
3543
3834
  * but may be used as helpful guidance on how to populate the given field.
3544
3835
  *
3545
3836
  * ```proto
@@ -3559,9 +3850,11 @@ export type Fixed32RulesJson = {
3559
3850
  * Describes the message buf.validate.Fixed32Rules.
3560
3851
  * Use `create(Fixed32RulesSchema)` to create a new message.
3561
3852
  */
3562
- export declare const Fixed32RulesSchema: GenMessage<Fixed32Rules, Fixed32RulesJson>;
3853
+ export declare const Fixed32RulesSchema: GenMessage<Fixed32Rules, {
3854
+ jsonType: Fixed32RulesJson;
3855
+ }>;
3563
3856
  /**
3564
- * Fixed64Rules describes the constraints applied to `fixed64` values.
3857
+ * Fixed64Rules describes the rules applied to `fixed64` values.
3565
3858
  *
3566
3859
  * @generated from message buf.validate.Fixed64Rules
3567
3860
  */
@@ -3710,7 +4003,7 @@ export type Fixed64Rules = Message<"buf.validate.Fixed64Rules"> & {
3710
4003
  notIn: bigint[];
3711
4004
  /**
3712
4005
  * `example` specifies values that the field may have. These values SHOULD
3713
- * conform to other constraints. `example` values will not impact validation
4006
+ * conform to other rules. `example` values will not impact validation
3714
4007
  * but may be used as helpful guidance on how to populate the given field.
3715
4008
  *
3716
4009
  * ```proto
@@ -3727,7 +4020,7 @@ export type Fixed64Rules = Message<"buf.validate.Fixed64Rules"> & {
3727
4020
  example: bigint[];
3728
4021
  };
3729
4022
  /**
3730
- * Fixed64Rules describes the constraints applied to `fixed64` values.
4023
+ * Fixed64Rules describes the rules applied to `fixed64` values.
3731
4024
  *
3732
4025
  * @generated from message buf.validate.Fixed64Rules
3733
4026
  */
@@ -3854,7 +4147,7 @@ export type Fixed64RulesJson = {
3854
4147
  notIn?: string[];
3855
4148
  /**
3856
4149
  * `example` specifies values that the field may have. These values SHOULD
3857
- * conform to other constraints. `example` values will not impact validation
4150
+ * conform to other rules. `example` values will not impact validation
3858
4151
  * but may be used as helpful guidance on how to populate the given field.
3859
4152
  *
3860
4153
  * ```proto
@@ -3874,9 +4167,11 @@ export type Fixed64RulesJson = {
3874
4167
  * Describes the message buf.validate.Fixed64Rules.
3875
4168
  * Use `create(Fixed64RulesSchema)` to create a new message.
3876
4169
  */
3877
- export declare const Fixed64RulesSchema: GenMessage<Fixed64Rules, Fixed64RulesJson>;
4170
+ export declare const Fixed64RulesSchema: GenMessage<Fixed64Rules, {
4171
+ jsonType: Fixed64RulesJson;
4172
+ }>;
3878
4173
  /**
3879
- * SFixed32Rules describes the constraints applied to `fixed32` values.
4174
+ * SFixed32Rules describes the rules applied to `fixed32` values.
3880
4175
  *
3881
4176
  * @generated from message buf.validate.SFixed32Rules
3882
4177
  */
@@ -4025,7 +4320,7 @@ export type SFixed32Rules = Message<"buf.validate.SFixed32Rules"> & {
4025
4320
  notIn: number[];
4026
4321
  /**
4027
4322
  * `example` specifies values that the field may have. These values SHOULD
4028
- * conform to other constraints. `example` values will not impact validation
4323
+ * conform to other rules. `example` values will not impact validation
4029
4324
  * but may be used as helpful guidance on how to populate the given field.
4030
4325
  *
4031
4326
  * ```proto
@@ -4042,7 +4337,7 @@ export type SFixed32Rules = Message<"buf.validate.SFixed32Rules"> & {
4042
4337
  example: number[];
4043
4338
  };
4044
4339
  /**
4045
- * SFixed32Rules describes the constraints applied to `fixed32` values.
4340
+ * SFixed32Rules describes the rules applied to `fixed32` values.
4046
4341
  *
4047
4342
  * @generated from message buf.validate.SFixed32Rules
4048
4343
  */
@@ -4169,7 +4464,7 @@ export type SFixed32RulesJson = {
4169
4464
  notIn?: number[];
4170
4465
  /**
4171
4466
  * `example` specifies values that the field may have. These values SHOULD
4172
- * conform to other constraints. `example` values will not impact validation
4467
+ * conform to other rules. `example` values will not impact validation
4173
4468
  * but may be used as helpful guidance on how to populate the given field.
4174
4469
  *
4175
4470
  * ```proto
@@ -4189,9 +4484,11 @@ export type SFixed32RulesJson = {
4189
4484
  * Describes the message buf.validate.SFixed32Rules.
4190
4485
  * Use `create(SFixed32RulesSchema)` to create a new message.
4191
4486
  */
4192
- export declare const SFixed32RulesSchema: GenMessage<SFixed32Rules, SFixed32RulesJson>;
4487
+ export declare const SFixed32RulesSchema: GenMessage<SFixed32Rules, {
4488
+ jsonType: SFixed32RulesJson;
4489
+ }>;
4193
4490
  /**
4194
- * SFixed64Rules describes the constraints applied to `fixed64` values.
4491
+ * SFixed64Rules describes the rules applied to `fixed64` values.
4195
4492
  *
4196
4493
  * @generated from message buf.validate.SFixed64Rules
4197
4494
  */
@@ -4340,7 +4637,7 @@ export type SFixed64Rules = Message<"buf.validate.SFixed64Rules"> & {
4340
4637
  notIn: bigint[];
4341
4638
  /**
4342
4639
  * `example` specifies values that the field may have. These values SHOULD
4343
- * conform to other constraints. `example` values will not impact validation
4640
+ * conform to other rules. `example` values will not impact validation
4344
4641
  * but may be used as helpful guidance on how to populate the given field.
4345
4642
  *
4346
4643
  * ```proto
@@ -4357,7 +4654,7 @@ export type SFixed64Rules = Message<"buf.validate.SFixed64Rules"> & {
4357
4654
  example: bigint[];
4358
4655
  };
4359
4656
  /**
4360
- * SFixed64Rules describes the constraints applied to `fixed64` values.
4657
+ * SFixed64Rules describes the rules applied to `fixed64` values.
4361
4658
  *
4362
4659
  * @generated from message buf.validate.SFixed64Rules
4363
4660
  */
@@ -4484,7 +4781,7 @@ export type SFixed64RulesJson = {
4484
4781
  notIn?: string[];
4485
4782
  /**
4486
4783
  * `example` specifies values that the field may have. These values SHOULD
4487
- * conform to other constraints. `example` values will not impact validation
4784
+ * conform to other rules. `example` values will not impact validation
4488
4785
  * but may be used as helpful guidance on how to populate the given field.
4489
4786
  *
4490
4787
  * ```proto
@@ -4504,9 +4801,11 @@ export type SFixed64RulesJson = {
4504
4801
  * Describes the message buf.validate.SFixed64Rules.
4505
4802
  * Use `create(SFixed64RulesSchema)` to create a new message.
4506
4803
  */
4507
- export declare const SFixed64RulesSchema: GenMessage<SFixed64Rules, SFixed64RulesJson>;
4804
+ export declare const SFixed64RulesSchema: GenMessage<SFixed64Rules, {
4805
+ jsonType: SFixed64RulesJson;
4806
+ }>;
4508
4807
  /**
4509
- * BoolRules describes the constraints applied to `bool` values. These rules
4808
+ * BoolRules describes the rules applied to `bool` values. These rules
4510
4809
  * may also be applied to the `google.protobuf.BoolValue` Well-Known-Type.
4511
4810
  *
4512
4811
  * @generated from message buf.validate.BoolRules
@@ -4528,7 +4827,7 @@ export type BoolRules = Message<"buf.validate.BoolRules"> & {
4528
4827
  const: boolean;
4529
4828
  /**
4530
4829
  * `example` specifies values that the field may have. These values SHOULD
4531
- * conform to other constraints. `example` values will not impact validation
4830
+ * conform to other rules. `example` values will not impact validation
4532
4831
  * but may be used as helpful guidance on how to populate the given field.
4533
4832
  *
4534
4833
  * ```proto
@@ -4545,7 +4844,7 @@ export type BoolRules = Message<"buf.validate.BoolRules"> & {
4545
4844
  example: boolean[];
4546
4845
  };
4547
4846
  /**
4548
- * BoolRules describes the constraints applied to `bool` values. These rules
4847
+ * BoolRules describes the rules applied to `bool` values. These rules
4549
4848
  * may also be applied to the `google.protobuf.BoolValue` Well-Known-Type.
4550
4849
  *
4551
4850
  * @generated from message buf.validate.BoolRules
@@ -4567,7 +4866,7 @@ export type BoolRulesJson = {
4567
4866
  const?: boolean;
4568
4867
  /**
4569
4868
  * `example` specifies values that the field may have. These values SHOULD
4570
- * conform to other constraints. `example` values will not impact validation
4869
+ * conform to other rules. `example` values will not impact validation
4571
4870
  * but may be used as helpful guidance on how to populate the given field.
4572
4871
  *
4573
4872
  * ```proto
@@ -4587,9 +4886,11 @@ export type BoolRulesJson = {
4587
4886
  * Describes the message buf.validate.BoolRules.
4588
4887
  * Use `create(BoolRulesSchema)` to create a new message.
4589
4888
  */
4590
- export declare const BoolRulesSchema: GenMessage<BoolRules, BoolRulesJson>;
4889
+ export declare const BoolRulesSchema: GenMessage<BoolRules, {
4890
+ jsonType: BoolRulesJson;
4891
+ }>;
4591
4892
  /**
4592
- * StringRules describes the constraints applied to `string` values These
4893
+ * StringRules describes the rules applied to `string` values These
4593
4894
  * rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type.
4594
4895
  *
4595
4896
  * @generated from message buf.validate.StringRules
@@ -4810,15 +5111,21 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
4810
5111
  */
4811
5112
  notIn: string[];
4812
5113
  /**
4813
- * `WellKnown` rules provide advanced constraints against common string
4814
- * patterns
5114
+ * `WellKnown` rules provide advanced rules against common string
5115
+ * patterns.
4815
5116
  *
4816
5117
  * @generated from oneof buf.validate.StringRules.well_known
4817
5118
  */
4818
5119
  wellKnown: {
4819
5120
  /**
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).
5121
+ * `email` specifies that the field value must be a valid email address, for
5122
+ * example "foo@example.com".
5123
+ *
5124
+ * 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).
5125
+ * Note that this standard willfully deviates from [RFC 5322](https://datatracker.ietf.org/doc/html/rfc5322),
5126
+ * which allows many unexpected forms of email addresses and will easily match
5127
+ * a typographical error.
5128
+ *
4822
5129
  * If the field value isn't a valid email address, an error message will be generated.
4823
5130
  *
4824
5131
  * ```proto
@@ -4834,10 +5141,18 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
4834
5141
  case: "email";
4835
5142
  } | {
4836
5143
  /**
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.
5144
+ * `hostname` specifies that the field value must be a valid hostname, for
5145
+ * example "foo.example.com".
5146
+ *
5147
+ * A valid hostname follows the rules below:
5148
+ * - The name consists of one or more labels, separated by a dot (".").
5149
+ * - Each label can be 1 to 63 alphanumeric characters.
5150
+ * - A label can contain hyphens ("-"), but must not start or end with a hyphen.
5151
+ * - The right-most label must not be digits only.
5152
+ * - The name can have a trailing dot—for example, "foo.example.com.".
5153
+ * - The name can be 253 characters at most, excluding the optional trailing dot.
5154
+ *
5155
+ * If the field value isn't a valid hostname, an error message will be generated.
4841
5156
  *
4842
5157
  * ```proto
4843
5158
  * message MyString {
@@ -4852,8 +5167,15 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
4852
5167
  case: "hostname";
4853
5168
  } | {
4854
5169
  /**
4855
- * `ip` specifies that the field value must be a valid IP
4856
- * (v4 or v6) address, without surrounding square brackets for IPv6 addresses.
5170
+ * `ip` specifies that the field value must be a valid IP (v4 or v6) address.
5171
+ *
5172
+ * IPv4 addresses are expected in the dotted decimal format—for example, "192.168.5.21".
5173
+ * IPv6 addresses are expected in their text representation—for example, "::1",
5174
+ * or "2001:0DB8:ABCD:0012::0".
5175
+ *
5176
+ * Both formats are well-defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986).
5177
+ * Zone identifiers for IPv6 addresses (for example, "fe80::a%en1") are supported.
5178
+ *
4857
5179
  * If the field value isn't a valid IP address, an error message will be
4858
5180
  * generated.
4859
5181
  *
@@ -4870,9 +5192,9 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
4870
5192
  case: "ip";
4871
5193
  } | {
4872
5194
  /**
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.
5195
+ * `ipv4` specifies that the field value must be a valid IPv4 address—for
5196
+ * example "192.168.5.21". If the field value isn't a valid IPv4 address, an
5197
+ * error message will be generated.
4876
5198
  *
4877
5199
  * ```proto
4878
5200
  * message MyString {
@@ -4887,9 +5209,9 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
4887
5209
  case: "ipv4";
4888
5210
  } | {
4889
5211
  /**
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.
5212
+ * `ipv6` specifies that the field value must be a valid IPv6 address—for
5213
+ * example "::1", or "d7a:115c:a1e0:ab12:4843:cd96:626b:430b". If the field
5214
+ * value is not a valid IPv6 address, an error message will be generated.
4893
5215
  *
4894
5216
  * ```proto
4895
5217
  * message MyString {
@@ -4904,8 +5226,11 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
4904
5226
  case: "ipv6";
4905
5227
  } | {
4906
5228
  /**
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).
5229
+ * `uri` specifies that the field value must be a valid URI, for example
5230
+ * "https://example.com/foo/bar?baz=quux#frag".
5231
+ *
5232
+ * URI is defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986).
5233
+ * Zone Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)).
4909
5234
  *
4910
5235
  * If the field value isn't a valid URI, an error message will be generated.
4911
5236
  *
@@ -4922,11 +5247,13 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
4922
5247
  case: "uri";
4923
5248
  } | {
4924
5249
  /**
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).
5250
+ * `uri_ref` specifies that the field value must be a valid URI Reference—either
5251
+ * a URI such as "https://example.com/foo/bar?baz=quux#frag", or a Relative
5252
+ * Reference such as "./foo/bar?query".
4927
5253
  *
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).
5254
+ * URI, URI Reference, and Relative Reference are defined in the internet
5255
+ * standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). Zone
5256
+ * Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)).
4930
5257
  *
4931
5258
  * If the field value isn't a valid URI Reference, an error message will be
4932
5259
  * generated.
@@ -4945,10 +5272,9 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
4945
5272
  } | {
4946
5273
  /**
4947
5274
  * `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.
5275
+ * (for example, "example.com"), or a valid IP (v4 or v6) address (for example,
5276
+ * "192.168.0.1", or "::1"). If the field value isn't a valid hostname or IP,
5277
+ * an error message will be generated.
4952
5278
  *
4953
5279
  * ```proto
4954
5280
  * message MyString {
@@ -4998,10 +5324,10 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
4998
5324
  case: "tuuid";
4999
5325
  } | {
5000
5326
  /**
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
- *
5327
+ * `ip_with_prefixlen` specifies that the field value must be a valid IP
5328
+ * (v4 or v6) address with prefix length—for example, "192.168.5.21/16" or
5329
+ * "2001:0DB8:ABCD:0012::F1/64". If the field value isn't a valid IP with
5330
+ * prefix length, an error message will be generated.
5005
5331
  *
5006
5332
  * ```proto
5007
5333
  * message MyString {
@@ -5017,9 +5343,9 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
5017
5343
  } | {
5018
5344
  /**
5019
5345
  * `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.
5346
+ * IPv4 address with prefix length—for example, "192.168.5.21/16". If the
5347
+ * field value isn't a valid IPv4 address with prefix length, an error
5348
+ * message will be generated.
5023
5349
  *
5024
5350
  * ```proto
5025
5351
  * message MyString {
@@ -5035,7 +5361,7 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
5035
5361
  } | {
5036
5362
  /**
5037
5363
  * `ipv6_with_prefixlen` specifies that the field value must be a valid
5038
- * IPv6 address with prefix length.
5364
+ * IPv6 address with prefix length—for example, "2001:0DB8:ABCD:0012::F1/64".
5039
5365
  * If the field value is not a valid IPv6 address with prefix length,
5040
5366
  * an error message will be generated.
5041
5367
  *
@@ -5052,10 +5378,15 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
5052
5378
  case: "ipv6WithPrefixlen";
5053
5379
  } | {
5054
5380
  /**
5055
- * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
5381
+ * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6)
5382
+ * prefix—for example, "192.168.0.0/16" or "2001:0DB8:ABCD:0012::0/64".
5383
+ *
5384
+ * The prefix must have all zeros for the unmasked bits. For example,
5385
+ * "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the
5386
+ * prefix, and the remaining 64 bits must be zero.
5387
+ *
5056
5388
  * 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`).
5389
+ * generated.
5059
5390
  *
5060
5391
  * ```proto
5061
5392
  * message MyString {
@@ -5071,9 +5402,14 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
5071
5402
  } | {
5072
5403
  /**
5073
5404
  * `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`).
5405
+ * prefix, for example "192.168.0.0/16".
5406
+ *
5407
+ * The prefix must have all zeros for the unmasked bits. For example,
5408
+ * "192.168.0.0/16" designates the left-most 16 bits for the prefix,
5409
+ * and the remaining 16 bits must be zero.
5410
+ *
5411
+ * If the field value isn't a valid IPv4 prefix, an error message
5412
+ * will be generated.
5077
5413
  *
5078
5414
  * ```proto
5079
5415
  * message MyString {
@@ -5088,10 +5424,15 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
5088
5424
  case: "ipv4Prefix";
5089
5425
  } | {
5090
5426
  /**
5091
- * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
5427
+ * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix—for
5428
+ * example, "2001:0DB8:ABCD:0012::0/64".
5429
+ *
5430
+ * The prefix must have all zeros for the unmasked bits. For example,
5431
+ * "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the
5432
+ * prefix, and the remaining 64 bits must be zero.
5433
+ *
5092
5434
  * 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`).
5435
+ * generated.
5095
5436
  *
5096
5437
  * ```proto
5097
5438
  * message MyString {
@@ -5106,15 +5447,38 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
5106
5447
  case: "ipv6Prefix";
5107
5448
  } | {
5108
5449
  /**
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`).
5450
+ * `host_and_port` specifies that the field value must be valid host/port
5451
+ * pair—for example, "example.com:8080".
5452
+ *
5453
+ * The host can be one of:
5454
+ * - An IPv4 address in dotted decimal format—for example, "192.168.5.21".
5455
+ * - An IPv6 address enclosed in square brackets—for example, "[2001:0DB8:ABCD:0012::F1]".
5456
+ * - A hostname—for example, "example.com".
5457
+ *
5458
+ * The port is separated by a colon. It must be non-empty, with a decimal number
5459
+ * in the range of 0-65535, inclusive.
5113
5460
  *
5114
5461
  * @generated from field: bool host_and_port = 32;
5115
5462
  */
5116
5463
  value: boolean;
5117
5464
  case: "hostAndPort";
5465
+ } | {
5466
+ /**
5467
+ * `ulid` specifies that the field value must be a valid ULID (Universally Unique
5468
+ * Lexicographically Sortable Identifier) as defined by the [ULID specification](https://github.com/ulid/spec).
5469
+ * If the field value isn't a valid ULID, an error message will be generated.
5470
+ *
5471
+ * ```proto
5472
+ * message MyString {
5473
+ * // value must be a valid ULID
5474
+ * string value = 1 [(buf.validate.field).string.ulid = true];
5475
+ * }
5476
+ * ```
5477
+ *
5478
+ * @generated from field: bool ulid = 35;
5479
+ */
5480
+ value: boolean;
5481
+ case: "ulid";
5118
5482
  } | {
5119
5483
  /**
5120
5484
  * `well_known_regex` specifies a common well-known pattern
@@ -5165,7 +5529,7 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
5165
5529
  strict: boolean;
5166
5530
  /**
5167
5531
  * `example` specifies values that the field may have. These values SHOULD
5168
- * conform to other constraints. `example` values will not impact validation
5532
+ * conform to other rules. `example` values will not impact validation
5169
5533
  * but may be used as helpful guidance on how to populate the given field.
5170
5534
  *
5171
5535
  * ```proto
@@ -5182,7 +5546,7 @@ export type StringRules = Message<"buf.validate.StringRules"> & {
5182
5546
  example: string[];
5183
5547
  };
5184
5548
  /**
5185
- * StringRules describes the constraints applied to `string` values These
5549
+ * StringRules describes the rules applied to `string` values These
5186
5550
  * rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type.
5187
5551
  *
5188
5552
  * @generated from message buf.validate.StringRules
@@ -5403,8 +5767,14 @@ export type StringRulesJson = {
5403
5767
  */
5404
5768
  notIn?: string[];
5405
5769
  /**
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).
5770
+ * `email` specifies that the field value must be a valid email address, for
5771
+ * example "foo@example.com".
5772
+ *
5773
+ * 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).
5774
+ * Note that this standard willfully deviates from [RFC 5322](https://datatracker.ietf.org/doc/html/rfc5322),
5775
+ * which allows many unexpected forms of email addresses and will easily match
5776
+ * a typographical error.
5777
+ *
5408
5778
  * If the field value isn't a valid email address, an error message will be generated.
5409
5779
  *
5410
5780
  * ```proto
@@ -5418,10 +5788,18 @@ export type StringRulesJson = {
5418
5788
  */
5419
5789
  email?: boolean;
5420
5790
  /**
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.
5791
+ * `hostname` specifies that the field value must be a valid hostname, for
5792
+ * example "foo.example.com".
5793
+ *
5794
+ * A valid hostname follows the rules below:
5795
+ * - The name consists of one or more labels, separated by a dot (".").
5796
+ * - Each label can be 1 to 63 alphanumeric characters.
5797
+ * - A label can contain hyphens ("-"), but must not start or end with a hyphen.
5798
+ * - The right-most label must not be digits only.
5799
+ * - The name can have a trailing dot—for example, "foo.example.com.".
5800
+ * - The name can be 253 characters at most, excluding the optional trailing dot.
5801
+ *
5802
+ * If the field value isn't a valid hostname, an error message will be generated.
5425
5803
  *
5426
5804
  * ```proto
5427
5805
  * message MyString {
@@ -5434,8 +5812,15 @@ export type StringRulesJson = {
5434
5812
  */
5435
5813
  hostname?: boolean;
5436
5814
  /**
5437
- * `ip` specifies that the field value must be a valid IP
5438
- * (v4 or v6) address, without surrounding square brackets for IPv6 addresses.
5815
+ * `ip` specifies that the field value must be a valid IP (v4 or v6) address.
5816
+ *
5817
+ * IPv4 addresses are expected in the dotted decimal format—for example, "192.168.5.21".
5818
+ * IPv6 addresses are expected in their text representation—for example, "::1",
5819
+ * or "2001:0DB8:ABCD:0012::0".
5820
+ *
5821
+ * Both formats are well-defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986).
5822
+ * Zone identifiers for IPv6 addresses (for example, "fe80::a%en1") are supported.
5823
+ *
5439
5824
  * If the field value isn't a valid IP address, an error message will be
5440
5825
  * generated.
5441
5826
  *
@@ -5450,9 +5835,9 @@ export type StringRulesJson = {
5450
5835
  */
5451
5836
  ip?: boolean;
5452
5837
  /**
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.
5838
+ * `ipv4` specifies that the field value must be a valid IPv4 address—for
5839
+ * example "192.168.5.21". If the field value isn't a valid IPv4 address, an
5840
+ * error message will be generated.
5456
5841
  *
5457
5842
  * ```proto
5458
5843
  * message MyString {
@@ -5465,9 +5850,9 @@ export type StringRulesJson = {
5465
5850
  */
5466
5851
  ipv4?: boolean;
5467
5852
  /**
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.
5853
+ * `ipv6` specifies that the field value must be a valid IPv6 address—for
5854
+ * example "::1", or "d7a:115c:a1e0:ab12:4843:cd96:626b:430b". If the field
5855
+ * value is not a valid IPv6 address, an error message will be generated.
5471
5856
  *
5472
5857
  * ```proto
5473
5858
  * message MyString {
@@ -5480,8 +5865,11 @@ export type StringRulesJson = {
5480
5865
  */
5481
5866
  ipv6?: boolean;
5482
5867
  /**
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).
5868
+ * `uri` specifies that the field value must be a valid URI, for example
5869
+ * "https://example.com/foo/bar?baz=quux#frag".
5870
+ *
5871
+ * URI is defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986).
5872
+ * Zone Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)).
5485
5873
  *
5486
5874
  * If the field value isn't a valid URI, an error message will be generated.
5487
5875
  *
@@ -5496,11 +5884,13 @@ export type StringRulesJson = {
5496
5884
  */
5497
5885
  uri?: boolean;
5498
5886
  /**
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).
5887
+ * `uri_ref` specifies that the field value must be a valid URI Reference—either
5888
+ * a URI such as "https://example.com/foo/bar?baz=quux#frag", or a Relative
5889
+ * Reference such as "./foo/bar?query".
5501
5890
  *
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).
5891
+ * URI, URI Reference, and Relative Reference are defined in the internet
5892
+ * standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). Zone
5893
+ * Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)).
5504
5894
  *
5505
5895
  * If the field value isn't a valid URI Reference, an error message will be
5506
5896
  * generated.
@@ -5517,10 +5907,9 @@ export type StringRulesJson = {
5517
5907
  uriRef?: boolean;
5518
5908
  /**
5519
5909
  * `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.
5910
+ * (for example, "example.com"), or a valid IP (v4 or v6) address (for example,
5911
+ * "192.168.0.1", or "::1"). If the field value isn't a valid hostname or IP,
5912
+ * an error message will be generated.
5524
5913
  *
5525
5914
  * ```proto
5526
5915
  * message MyString {
@@ -5564,10 +5953,10 @@ export type StringRulesJson = {
5564
5953
  */
5565
5954
  tuuid?: boolean;
5566
5955
  /**
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
- *
5956
+ * `ip_with_prefixlen` specifies that the field value must be a valid IP
5957
+ * (v4 or v6) address with prefix length—for example, "192.168.5.21/16" or
5958
+ * "2001:0DB8:ABCD:0012::F1/64". If the field value isn't a valid IP with
5959
+ * prefix length, an error message will be generated.
5571
5960
  *
5572
5961
  * ```proto
5573
5962
  * message MyString {
@@ -5581,9 +5970,9 @@ export type StringRulesJson = {
5581
5970
  ipWithPrefixlen?: boolean;
5582
5971
  /**
5583
5972
  * `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.
5973
+ * IPv4 address with prefix length—for example, "192.168.5.21/16". If the
5974
+ * field value isn't a valid IPv4 address with prefix length, an error
5975
+ * message will be generated.
5587
5976
  *
5588
5977
  * ```proto
5589
5978
  * message MyString {
@@ -5597,7 +5986,7 @@ export type StringRulesJson = {
5597
5986
  ipv4WithPrefixlen?: boolean;
5598
5987
  /**
5599
5988
  * `ipv6_with_prefixlen` specifies that the field value must be a valid
5600
- * IPv6 address with prefix length.
5989
+ * IPv6 address with prefix length—for example, "2001:0DB8:ABCD:0012::F1/64".
5601
5990
  * If the field value is not a valid IPv6 address with prefix length,
5602
5991
  * an error message will be generated.
5603
5992
  *
@@ -5612,10 +6001,15 @@ export type StringRulesJson = {
5612
6001
  */
5613
6002
  ipv6WithPrefixlen?: boolean;
5614
6003
  /**
5615
- * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
6004
+ * `ip_prefix` specifies that the field value must be a valid IP (v4 or v6)
6005
+ * prefix—for example, "192.168.0.0/16" or "2001:0DB8:ABCD:0012::0/64".
6006
+ *
6007
+ * The prefix must have all zeros for the unmasked bits. For example,
6008
+ * "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the
6009
+ * prefix, and the remaining 64 bits must be zero.
6010
+ *
5616
6011
  * 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`).
6012
+ * generated.
5619
6013
  *
5620
6014
  * ```proto
5621
6015
  * message MyString {
@@ -5629,9 +6023,14 @@ export type StringRulesJson = {
5629
6023
  ipPrefix?: boolean;
5630
6024
  /**
5631
6025
  * `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`).
6026
+ * prefix, for example "192.168.0.0/16".
6027
+ *
6028
+ * The prefix must have all zeros for the unmasked bits. For example,
6029
+ * "192.168.0.0/16" designates the left-most 16 bits for the prefix,
6030
+ * and the remaining 16 bits must be zero.
6031
+ *
6032
+ * If the field value isn't a valid IPv4 prefix, an error message
6033
+ * will be generated.
5635
6034
  *
5636
6035
  * ```proto
5637
6036
  * message MyString {
@@ -5644,10 +6043,15 @@ export type StringRulesJson = {
5644
6043
  */
5645
6044
  ipv4Prefix?: boolean;
5646
6045
  /**
5647
- * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
6046
+ * `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix—for
6047
+ * example, "2001:0DB8:ABCD:0012::0/64".
6048
+ *
6049
+ * The prefix must have all zeros for the unmasked bits. For example,
6050
+ * "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the
6051
+ * prefix, and the remaining 64 bits must be zero.
6052
+ *
5648
6053
  * 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`).
6054
+ * generated.
5651
6055
  *
5652
6056
  * ```proto
5653
6057
  * message MyString {
@@ -5660,14 +6064,35 @@ export type StringRulesJson = {
5660
6064
  */
5661
6065
  ipv6Prefix?: boolean;
5662
6066
  /**
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`).
6067
+ * `host_and_port` specifies that the field value must be valid host/port
6068
+ * pair—for example, "example.com:8080".
6069
+ *
6070
+ * The host can be one of:
6071
+ * - An IPv4 address in dotted decimal format—for example, "192.168.5.21".
6072
+ * - An IPv6 address enclosed in square brackets—for example, "[2001:0DB8:ABCD:0012::F1]".
6073
+ * - A hostname—for example, "example.com".
6074
+ *
6075
+ * The port is separated by a colon. It must be non-empty, with a decimal number
6076
+ * in the range of 0-65535, inclusive.
5667
6077
  *
5668
6078
  * @generated from field: bool host_and_port = 32;
5669
6079
  */
5670
6080
  hostAndPort?: boolean;
6081
+ /**
6082
+ * `ulid` specifies that the field value must be a valid ULID (Universally Unique
6083
+ * Lexicographically Sortable Identifier) as defined by the [ULID specification](https://github.com/ulid/spec).
6084
+ * If the field value isn't a valid ULID, an error message will be generated.
6085
+ *
6086
+ * ```proto
6087
+ * message MyString {
6088
+ * // value must be a valid ULID
6089
+ * string value = 1 [(buf.validate.field).string.ulid = true];
6090
+ * }
6091
+ * ```
6092
+ *
6093
+ * @generated from field: bool ulid = 35;
6094
+ */
6095
+ ulid?: boolean;
5671
6096
  /**
5672
6097
  * `well_known_regex` specifies a common well-known pattern
5673
6098
  * defined as a regex. If the field value doesn't match the well-known
@@ -5712,7 +6137,7 @@ export type StringRulesJson = {
5712
6137
  strict?: boolean;
5713
6138
  /**
5714
6139
  * `example` specifies values that the field may have. These values SHOULD
5715
- * conform to other constraints. `example` values will not impact validation
6140
+ * conform to other rules. `example` values will not impact validation
5716
6141
  * but may be used as helpful guidance on how to populate the given field.
5717
6142
  *
5718
6143
  * ```proto
@@ -5732,9 +6157,11 @@ export type StringRulesJson = {
5732
6157
  * Describes the message buf.validate.StringRules.
5733
6158
  * Use `create(StringRulesSchema)` to create a new message.
5734
6159
  */
5735
- export declare const StringRulesSchema: GenMessage<StringRules, StringRulesJson>;
6160
+ export declare const StringRulesSchema: GenMessage<StringRules, {
6161
+ jsonType: StringRulesJson;
6162
+ }>;
5736
6163
  /**
5737
- * BytesRules describe the constraints applied to `bytes` values. These rules
6164
+ * BytesRules describe the rules applied to `bytes` values. These rules
5738
6165
  * may also be applied to the `google.protobuf.BytesValue` Well-Known-Type.
5739
6166
  *
5740
6167
  * @generated from message buf.validate.BytesRules
@@ -5850,7 +6277,7 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
5850
6277
  * the string.
5851
6278
  * If the field value doesn't meet the requirement, an error message is generated.
5852
6279
  *
5853
- * ```protobuf
6280
+ * ```proto
5854
6281
  * message MyBytes {
5855
6282
  * // value does not contain \x02\x03
5856
6283
  * optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"];
@@ -5865,7 +6292,7 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
5865
6292
  * values. If the field value doesn't match any of the specified values, an
5866
6293
  * error message is generated.
5867
6294
  *
5868
- * ```protobuf
6295
+ * ```proto
5869
6296
  * message MyBytes {
5870
6297
  * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
5871
6298
  * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
@@ -5892,7 +6319,7 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
5892
6319
  */
5893
6320
  notIn: Uint8Array[];
5894
6321
  /**
5895
- * WellKnown rules provide advanced constraints against common byte
6322
+ * WellKnown rules provide advanced rules against common byte
5896
6323
  * patterns
5897
6324
  *
5898
6325
  * @generated from oneof buf.validate.BytesRules.well_known
@@ -5900,7 +6327,7 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
5900
6327
  wellKnown: {
5901
6328
  /**
5902
6329
  * `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.
6330
+ * If the field value doesn't meet this rule, an error message is generated.
5904
6331
  *
5905
6332
  * ```proto
5906
6333
  * message MyBytes {
@@ -5916,7 +6343,7 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
5916
6343
  } | {
5917
6344
  /**
5918
6345
  * `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.
6346
+ * If the field value doesn't meet this rule, an error message is generated.
5920
6347
  *
5921
6348
  * ```proto
5922
6349
  * message MyBytes {
@@ -5932,7 +6359,7 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
5932
6359
  } | {
5933
6360
  /**
5934
6361
  * `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.
6362
+ * If the field value doesn't meet this rule, an error message is generated.
5936
6363
  * ```proto
5937
6364
  * message MyBytes {
5938
6365
  * // value must be a valid IPv6 address
@@ -5944,13 +6371,32 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
5944
6371
  */
5945
6372
  value: boolean;
5946
6373
  case: "ipv6";
6374
+ } | {
6375
+ /**
6376
+ * `uuid` ensures that the field `value` encodes the 128-bit UUID data as
6377
+ * defined by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2).
6378
+ * The field must contain exactly 16 bytes
6379
+ * representing the UUID. If the field value isn't a valid UUID, an error
6380
+ * message will be generated.
6381
+ *
6382
+ * ```proto
6383
+ * message MyBytes {
6384
+ * // value must be a valid UUID
6385
+ * optional bytes value = 1 [(buf.validate.field).bytes.uuid = true];
6386
+ * }
6387
+ * ```
6388
+ *
6389
+ * @generated from field: bool uuid = 15;
6390
+ */
6391
+ value: boolean;
6392
+ case: "uuid";
5947
6393
  } | {
5948
6394
  case: undefined;
5949
6395
  value?: undefined;
5950
6396
  };
5951
6397
  /**
5952
6398
  * `example` specifies values that the field may have. These values SHOULD
5953
- * conform to other constraints. `example` values will not impact validation
6399
+ * conform to other rules. `example` values will not impact validation
5954
6400
  * but may be used as helpful guidance on how to populate the given field.
5955
6401
  *
5956
6402
  * ```proto
@@ -5967,7 +6413,7 @@ export type BytesRules = Message<"buf.validate.BytesRules"> & {
5967
6413
  example: Uint8Array[];
5968
6414
  };
5969
6415
  /**
5970
- * BytesRules describe the constraints applied to `bytes` values. These rules
6416
+ * BytesRules describe the rules applied to `bytes` values. These rules
5971
6417
  * may also be applied to the `google.protobuf.BytesValue` Well-Known-Type.
5972
6418
  *
5973
6419
  * @generated from message buf.validate.BytesRules
@@ -6083,7 +6529,7 @@ export type BytesRulesJson = {
6083
6529
  * the string.
6084
6530
  * If the field value doesn't meet the requirement, an error message is generated.
6085
6531
  *
6086
- * ```protobuf
6532
+ * ```proto
6087
6533
  * message MyBytes {
6088
6534
  * // value does not contain \x02\x03
6089
6535
  * optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"];
@@ -6098,7 +6544,7 @@ export type BytesRulesJson = {
6098
6544
  * values. If the field value doesn't match any of the specified values, an
6099
6545
  * error message is generated.
6100
6546
  *
6101
- * ```protobuf
6547
+ * ```proto
6102
6548
  * message MyBytes {
6103
6549
  * // value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
6104
6550
  * optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
@@ -6126,7 +6572,7 @@ export type BytesRulesJson = {
6126
6572
  notIn?: string[];
6127
6573
  /**
6128
6574
  * `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.
6575
+ * If the field value doesn't meet this rule, an error message is generated.
6130
6576
  *
6131
6577
  * ```proto
6132
6578
  * message MyBytes {
@@ -6140,7 +6586,7 @@ export type BytesRulesJson = {
6140
6586
  ip?: boolean;
6141
6587
  /**
6142
6588
  * `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.
6589
+ * If the field value doesn't meet this rule, an error message is generated.
6144
6590
  *
6145
6591
  * ```proto
6146
6592
  * message MyBytes {
@@ -6154,7 +6600,7 @@ export type BytesRulesJson = {
6154
6600
  ipv4?: boolean;
6155
6601
  /**
6156
6602
  * `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.
6603
+ * If the field value doesn't meet this rule, an error message is generated.
6158
6604
  * ```proto
6159
6605
  * message MyBytes {
6160
6606
  * // value must be a valid IPv6 address
@@ -6165,9 +6611,26 @@ export type BytesRulesJson = {
6165
6611
  * @generated from field: bool ipv6 = 12;
6166
6612
  */
6167
6613
  ipv6?: boolean;
6614
+ /**
6615
+ * `uuid` ensures that the field `value` encodes the 128-bit UUID data as
6616
+ * defined by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2).
6617
+ * The field must contain exactly 16 bytes
6618
+ * representing the UUID. If the field value isn't a valid UUID, an error
6619
+ * message will be generated.
6620
+ *
6621
+ * ```proto
6622
+ * message MyBytes {
6623
+ * // value must be a valid UUID
6624
+ * optional bytes value = 1 [(buf.validate.field).bytes.uuid = true];
6625
+ * }
6626
+ * ```
6627
+ *
6628
+ * @generated from field: bool uuid = 15;
6629
+ */
6630
+ uuid?: boolean;
6168
6631
  /**
6169
6632
  * `example` specifies values that the field may have. These values SHOULD
6170
- * conform to other constraints. `example` values will not impact validation
6633
+ * conform to other rules. `example` values will not impact validation
6171
6634
  * but may be used as helpful guidance on how to populate the given field.
6172
6635
  *
6173
6636
  * ```proto
@@ -6187,9 +6650,11 @@ export type BytesRulesJson = {
6187
6650
  * Describes the message buf.validate.BytesRules.
6188
6651
  * Use `create(BytesRulesSchema)` to create a new message.
6189
6652
  */
6190
- export declare const BytesRulesSchema: GenMessage<BytesRules, BytesRulesJson>;
6653
+ export declare const BytesRulesSchema: GenMessage<BytesRules, {
6654
+ jsonType: BytesRulesJson;
6655
+ }>;
6191
6656
  /**
6192
- * EnumRules describe the constraints applied to `enum` values.
6657
+ * EnumRules describe the rules applied to `enum` values.
6193
6658
  *
6194
6659
  * @generated from message buf.validate.EnumRules
6195
6660
  */
@@ -6278,7 +6743,7 @@ export type EnumRules = Message<"buf.validate.EnumRules"> & {
6278
6743
  notIn: number[];
6279
6744
  /**
6280
6745
  * `example` specifies values that the field may have. These values SHOULD
6281
- * conform to other constraints. `example` values will not impact validation
6746
+ * conform to other rules. `example` values will not impact validation
6282
6747
  * but may be used as helpful guidance on how to populate the given field.
6283
6748
  *
6284
6749
  * ```proto
@@ -6299,7 +6764,7 @@ export type EnumRules = Message<"buf.validate.EnumRules"> & {
6299
6764
  example: number[];
6300
6765
  };
6301
6766
  /**
6302
- * EnumRules describe the constraints applied to `enum` values.
6767
+ * EnumRules describe the rules applied to `enum` values.
6303
6768
  *
6304
6769
  * @generated from message buf.validate.EnumRules
6305
6770
  */
@@ -6388,7 +6853,7 @@ export type EnumRulesJson = {
6388
6853
  notIn?: number[];
6389
6854
  /**
6390
6855
  * `example` specifies values that the field may have. These values SHOULD
6391
- * conform to other constraints. `example` values will not impact validation
6856
+ * conform to other rules. `example` values will not impact validation
6392
6857
  * but may be used as helpful guidance on how to populate the given field.
6393
6858
  *
6394
6859
  * ```proto
@@ -6412,9 +6877,11 @@ export type EnumRulesJson = {
6412
6877
  * Describes the message buf.validate.EnumRules.
6413
6878
  * Use `create(EnumRulesSchema)` to create a new message.
6414
6879
  */
6415
- export declare const EnumRulesSchema: GenMessage<EnumRules, EnumRulesJson>;
6880
+ export declare const EnumRulesSchema: GenMessage<EnumRules, {
6881
+ jsonType: EnumRulesJson;
6882
+ }>;
6416
6883
  /**
6417
- * RepeatedRules describe the constraints applied to `repeated` values.
6884
+ * RepeatedRules describe the rules applied to `repeated` values.
6418
6885
  *
6419
6886
  * @generated from message buf.validate.RepeatedRules
6420
6887
  */
@@ -6453,7 +6920,7 @@ export type RepeatedRules = Message<"buf.validate.RepeatedRules"> & {
6453
6920
  maxItems: bigint;
6454
6921
  /**
6455
6922
  * `unique` indicates that all elements in this field must
6456
- * be unique. This constraint is strictly applicable to scalar and enum
6923
+ * be unique. This rule is strictly applicable to scalar and enum
6457
6924
  * types, with message types not being supported.
6458
6925
  *
6459
6926
  * ```proto
@@ -6467,13 +6934,13 @@ export type RepeatedRules = Message<"buf.validate.RepeatedRules"> & {
6467
6934
  */
6468
6935
  unique: boolean;
6469
6936
  /**
6470
- * `items` details the constraints to be applied to each item
6937
+ * `items` details the rules to be applied to each item
6471
6938
  * in the field. Even for repeated message fields, validation is executed
6472
- * against each item unless skip is explicitly specified.
6939
+ * against each item unless `ignore` is specified.
6473
6940
  *
6474
6941
  * ```proto
6475
6942
  * message MyRepeated {
6476
- * // The items in the field `value` must follow the specified constraints.
6943
+ * // The items in the field `value` must follow the specified rules.
6477
6944
  * repeated string value = 1 [(buf.validate.field).repeated.items = {
6478
6945
  * string: {
6479
6946
  * min_len: 3
@@ -6483,12 +6950,15 @@ export type RepeatedRules = Message<"buf.validate.RepeatedRules"> & {
6483
6950
  * }
6484
6951
  * ```
6485
6952
  *
6486
- * @generated from field: optional buf.validate.FieldConstraints items = 4;
6953
+ * Note that the `required` rule does not apply. Repeated items
6954
+ * cannot be unset.
6955
+ *
6956
+ * @generated from field: optional buf.validate.FieldRules items = 4;
6487
6957
  */
6488
- items?: FieldConstraints;
6958
+ items?: FieldRules;
6489
6959
  };
6490
6960
  /**
6491
- * RepeatedRules describe the constraints applied to `repeated` values.
6961
+ * RepeatedRules describe the rules applied to `repeated` values.
6492
6962
  *
6493
6963
  * @generated from message buf.validate.RepeatedRules
6494
6964
  */
@@ -6527,7 +6997,7 @@ export type RepeatedRulesJson = {
6527
6997
  maxItems?: string;
6528
6998
  /**
6529
6999
  * `unique` indicates that all elements in this field must
6530
- * be unique. This constraint is strictly applicable to scalar and enum
7000
+ * be unique. This rule is strictly applicable to scalar and enum
6531
7001
  * types, with message types not being supported.
6532
7002
  *
6533
7003
  * ```proto
@@ -6541,13 +7011,13 @@ export type RepeatedRulesJson = {
6541
7011
  */
6542
7012
  unique?: boolean;
6543
7013
  /**
6544
- * `items` details the constraints to be applied to each item
7014
+ * `items` details the rules to be applied to each item
6545
7015
  * in the field. Even for repeated message fields, validation is executed
6546
- * against each item unless skip is explicitly specified.
7016
+ * against each item unless `ignore` is specified.
6547
7017
  *
6548
7018
  * ```proto
6549
7019
  * message MyRepeated {
6550
- * // The items in the field `value` must follow the specified constraints.
7020
+ * // The items in the field `value` must follow the specified rules.
6551
7021
  * repeated string value = 1 [(buf.validate.field).repeated.items = {
6552
7022
  * string: {
6553
7023
  * min_len: 3
@@ -6557,17 +7027,22 @@ export type RepeatedRulesJson = {
6557
7027
  * }
6558
7028
  * ```
6559
7029
  *
6560
- * @generated from field: optional buf.validate.FieldConstraints items = 4;
7030
+ * Note that the `required` rule does not apply. Repeated items
7031
+ * cannot be unset.
7032
+ *
7033
+ * @generated from field: optional buf.validate.FieldRules items = 4;
6561
7034
  */
6562
- items?: FieldConstraintsJson;
7035
+ items?: FieldRulesJson;
6563
7036
  };
6564
7037
  /**
6565
7038
  * Describes the message buf.validate.RepeatedRules.
6566
7039
  * Use `create(RepeatedRulesSchema)` to create a new message.
6567
7040
  */
6568
- export declare const RepeatedRulesSchema: GenMessage<RepeatedRules, RepeatedRulesJson>;
7041
+ export declare const RepeatedRulesSchema: GenMessage<RepeatedRules, {
7042
+ jsonType: RepeatedRulesJson;
7043
+ }>;
6569
7044
  /**
6570
- * MapRules describe the constraints applied to `map` values.
7045
+ * MapRules describe the rules applied to `map` values.
6571
7046
  *
6572
7047
  * @generated from message buf.validate.MapRules
6573
7048
  */
@@ -6601,11 +7076,11 @@ export type MapRules = Message<"buf.validate.MapRules"> & {
6601
7076
  */
6602
7077
  maxPairs: bigint;
6603
7078
  /**
6604
- * Specifies the constraints to be applied to each key in the field.
7079
+ * Specifies the rules to be applied to each key in the field.
6605
7080
  *
6606
7081
  * ```proto
6607
7082
  * message MyMap {
6608
- * // The keys in the field `value` must follow the specified constraints.
7083
+ * // The keys in the field `value` must follow the specified rules.
6609
7084
  * map<string, string> value = 1 [(buf.validate.field).map.keys = {
6610
7085
  * string: {
6611
7086
  * min_len: 3
@@ -6615,17 +7090,19 @@ export type MapRules = Message<"buf.validate.MapRules"> & {
6615
7090
  * }
6616
7091
  * ```
6617
7092
  *
6618
- * @generated from field: optional buf.validate.FieldConstraints keys = 4;
7093
+ * Note that the `required` rule does not apply. Map keys cannot be unset.
7094
+ *
7095
+ * @generated from field: optional buf.validate.FieldRules keys = 4;
6619
7096
  */
6620
- keys?: FieldConstraints;
7097
+ keys?: FieldRules;
6621
7098
  /**
6622
- * Specifies the constraints to be applied to the value of each key in the
7099
+ * Specifies the rules to be applied to the value of each key in the
6623
7100
  * field. Message values will still have their validations evaluated unless
6624
- * skip is specified here.
7101
+ * `ignore` is specified.
6625
7102
  *
6626
7103
  * ```proto
6627
7104
  * message MyMap {
6628
- * // The values in the field `value` must follow the specified constraints.
7105
+ * // The values in the field `value` must follow the specified rules.
6629
7106
  * map<string, string> value = 1 [(buf.validate.field).map.values = {
6630
7107
  * string: {
6631
7108
  * min_len: 5
@@ -6634,13 +7111,14 @@ export type MapRules = Message<"buf.validate.MapRules"> & {
6634
7111
  * }];
6635
7112
  * }
6636
7113
  * ```
7114
+ * Note that the `required` rule does not apply. Map values cannot be unset.
6637
7115
  *
6638
- * @generated from field: optional buf.validate.FieldConstraints values = 5;
7116
+ * @generated from field: optional buf.validate.FieldRules values = 5;
6639
7117
  */
6640
- values?: FieldConstraints;
7118
+ values?: FieldRules;
6641
7119
  };
6642
7120
  /**
6643
- * MapRules describe the constraints applied to `map` values.
7121
+ * MapRules describe the rules applied to `map` values.
6644
7122
  *
6645
7123
  * @generated from message buf.validate.MapRules
6646
7124
  */
@@ -6674,11 +7152,11 @@ export type MapRulesJson = {
6674
7152
  */
6675
7153
  maxPairs?: string;
6676
7154
  /**
6677
- * Specifies the constraints to be applied to each key in the field.
7155
+ * Specifies the rules to be applied to each key in the field.
6678
7156
  *
6679
7157
  * ```proto
6680
7158
  * message MyMap {
6681
- * // The keys in the field `value` must follow the specified constraints.
7159
+ * // The keys in the field `value` must follow the specified rules.
6682
7160
  * map<string, string> value = 1 [(buf.validate.field).map.keys = {
6683
7161
  * string: {
6684
7162
  * min_len: 3
@@ -6688,17 +7166,19 @@ export type MapRulesJson = {
6688
7166
  * }
6689
7167
  * ```
6690
7168
  *
6691
- * @generated from field: optional buf.validate.FieldConstraints keys = 4;
7169
+ * Note that the `required` rule does not apply. Map keys cannot be unset.
7170
+ *
7171
+ * @generated from field: optional buf.validate.FieldRules keys = 4;
6692
7172
  */
6693
- keys?: FieldConstraintsJson;
7173
+ keys?: FieldRulesJson;
6694
7174
  /**
6695
- * Specifies the constraints to be applied to the value of each key in the
7175
+ * Specifies the rules to be applied to the value of each key in the
6696
7176
  * field. Message values will still have their validations evaluated unless
6697
- * skip is specified here.
7177
+ * `ignore` is specified.
6698
7178
  *
6699
7179
  * ```proto
6700
7180
  * message MyMap {
6701
- * // The values in the field `value` must follow the specified constraints.
7181
+ * // The values in the field `value` must follow the specified rules.
6702
7182
  * map<string, string> value = 1 [(buf.validate.field).map.values = {
6703
7183
  * string: {
6704
7184
  * min_len: 5
@@ -6707,18 +7187,21 @@ export type MapRulesJson = {
6707
7187
  * }];
6708
7188
  * }
6709
7189
  * ```
7190
+ * Note that the `required` rule does not apply. Map values cannot be unset.
6710
7191
  *
6711
- * @generated from field: optional buf.validate.FieldConstraints values = 5;
7192
+ * @generated from field: optional buf.validate.FieldRules values = 5;
6712
7193
  */
6713
- values?: FieldConstraintsJson;
7194
+ values?: FieldRulesJson;
6714
7195
  };
6715
7196
  /**
6716
7197
  * Describes the message buf.validate.MapRules.
6717
7198
  * Use `create(MapRulesSchema)` to create a new message.
6718
7199
  */
6719
- export declare const MapRulesSchema: GenMessage<MapRules, MapRulesJson>;
7200
+ export declare const MapRulesSchema: GenMessage<MapRules, {
7201
+ jsonType: MapRulesJson;
7202
+ }>;
6720
7203
  /**
6721
- * AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type.
7204
+ * AnyRules describe rules applied exclusively to the `google.protobuf.Any` well-known type.
6722
7205
  *
6723
7206
  * @generated from message buf.validate.AnyRules
6724
7207
  */
@@ -6731,7 +7214,9 @@ export type AnyRules = Message<"buf.validate.AnyRules"> & {
6731
7214
  * ```proto
6732
7215
  * message MyAny {
6733
7216
  * // 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"]];
7217
+ * google.protobuf.Any value = 1 [(buf.validate.field).any = {
7218
+ * in: ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]
7219
+ * }];
6735
7220
  * }
6736
7221
  * ```
6737
7222
  *
@@ -6743,8 +7228,10 @@ export type AnyRules = Message<"buf.validate.AnyRules"> & {
6743
7228
  *
6744
7229
  * ```proto
6745
7230
  * 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"]];
7231
+ * // The `value` field must not have a `type_url` equal to any of the specified values.
7232
+ * google.protobuf.Any value = 1 [(buf.validate.field).any = {
7233
+ * not_in: ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]
7234
+ * }];
6748
7235
  * }
6749
7236
  * ```
6750
7237
  *
@@ -6753,7 +7240,7 @@ export type AnyRules = Message<"buf.validate.AnyRules"> & {
6753
7240
  notIn: string[];
6754
7241
  };
6755
7242
  /**
6756
- * AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type.
7243
+ * AnyRules describe rules applied exclusively to the `google.protobuf.Any` well-known type.
6757
7244
  *
6758
7245
  * @generated from message buf.validate.AnyRules
6759
7246
  */
@@ -6766,7 +7253,9 @@ export type AnyRulesJson = {
6766
7253
  * ```proto
6767
7254
  * message MyAny {
6768
7255
  * // 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"]];
7256
+ * google.protobuf.Any value = 1 [(buf.validate.field).any = {
7257
+ * in: ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]
7258
+ * }];
6770
7259
  * }
6771
7260
  * ```
6772
7261
  *
@@ -6778,8 +7267,10 @@ export type AnyRulesJson = {
6778
7267
  *
6779
7268
  * ```proto
6780
7269
  * 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"]];
7270
+ * // The `value` field must not have a `type_url` equal to any of the specified values.
7271
+ * google.protobuf.Any value = 1 [(buf.validate.field).any = {
7272
+ * not_in: ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]
7273
+ * }];
6783
7274
  * }
6784
7275
  * ```
6785
7276
  *
@@ -6791,9 +7282,11 @@ export type AnyRulesJson = {
6791
7282
  * Describes the message buf.validate.AnyRules.
6792
7283
  * Use `create(AnyRulesSchema)` to create a new message.
6793
7284
  */
6794
- export declare const AnyRulesSchema: GenMessage<AnyRules, AnyRulesJson>;
7285
+ export declare const AnyRulesSchema: GenMessage<AnyRules, {
7286
+ jsonType: AnyRulesJson;
7287
+ }>;
6795
7288
  /**
6796
- * DurationRules describe the constraints applied exclusively to the `google.protobuf.Duration` well-known type.
7289
+ * DurationRules describe the rules applied exclusively to the `google.protobuf.Duration` well-known type.
6797
7290
  *
6798
7291
  * @generated from message buf.validate.DurationRules
6799
7292
  */
@@ -6944,7 +7437,7 @@ export type DurationRules = Message<"buf.validate.DurationRules"> & {
6944
7437
  notIn: Duration[];
6945
7438
  /**
6946
7439
  * `example` specifies values that the field may have. These values SHOULD
6947
- * conform to other constraints. `example` values will not impact validation
7440
+ * conform to other rules. `example` values will not impact validation
6948
7441
  * but may be used as helpful guidance on how to populate the given field.
6949
7442
  *
6950
7443
  * ```proto
@@ -6961,7 +7454,7 @@ export type DurationRules = Message<"buf.validate.DurationRules"> & {
6961
7454
  example: Duration[];
6962
7455
  };
6963
7456
  /**
6964
- * DurationRules describe the constraints applied exclusively to the `google.protobuf.Duration` well-known type.
7457
+ * DurationRules describe the rules applied exclusively to the `google.protobuf.Duration` well-known type.
6965
7458
  *
6966
7459
  * @generated from message buf.validate.DurationRules
6967
7460
  */
@@ -7090,7 +7583,7 @@ export type DurationRulesJson = {
7090
7583
  notIn?: DurationJson[];
7091
7584
  /**
7092
7585
  * `example` specifies values that the field may have. These values SHOULD
7093
- * conform to other constraints. `example` values will not impact validation
7586
+ * conform to other rules. `example` values will not impact validation
7094
7587
  * but may be used as helpful guidance on how to populate the given field.
7095
7588
  *
7096
7589
  * ```proto
@@ -7110,9 +7603,176 @@ export type DurationRulesJson = {
7110
7603
  * Describes the message buf.validate.DurationRules.
7111
7604
  * Use `create(DurationRulesSchema)` to create a new message.
7112
7605
  */
7113
- export declare const DurationRulesSchema: GenMessage<DurationRules, DurationRulesJson>;
7606
+ export declare const DurationRulesSchema: GenMessage<DurationRules, {
7607
+ jsonType: DurationRulesJson;
7608
+ }>;
7609
+ /**
7610
+ * FieldMaskRules describe rules applied exclusively to the `google.protobuf.FieldMask` well-known type.
7611
+ *
7612
+ * @generated from message buf.validate.FieldMaskRules
7613
+ */
7614
+ export type FieldMaskRules = Message<"buf.validate.FieldMaskRules"> & {
7615
+ /**
7616
+ * `const` dictates that the field must match the specified value of the `google.protobuf.FieldMask` type exactly.
7617
+ * If the field's value deviates from the specified value, an error message
7618
+ * will be generated.
7619
+ *
7620
+ * ```proto
7621
+ * message MyFieldMask {
7622
+ * // value must equal ["a"]
7623
+ * google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask.const = {
7624
+ * paths: ["a"]
7625
+ * }];
7626
+ * }
7627
+ * ```
7628
+ *
7629
+ * @generated from field: optional google.protobuf.FieldMask const = 1;
7630
+ */
7631
+ const?: FieldMask;
7632
+ /**
7633
+ * `in` requires the field value to only contain paths matching specified
7634
+ * values or their subpaths.
7635
+ * If any of the field value's paths doesn't match the rule,
7636
+ * an error message is generated.
7637
+ * See: https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask
7638
+ *
7639
+ * ```proto
7640
+ * message MyFieldMask {
7641
+ * // The `value` FieldMask must only contain paths listed in `in`.
7642
+ * google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask = {
7643
+ * in: ["a", "b", "c.a"]
7644
+ * }];
7645
+ * }
7646
+ * ```
7647
+ *
7648
+ * @generated from field: repeated string in = 2;
7649
+ */
7650
+ in: string[];
7651
+ /**
7652
+ * `not_in` requires the field value to not contain paths matching specified
7653
+ * values or their subpaths.
7654
+ * If any of the field value's paths matches the rule,
7655
+ * an error message is generated.
7656
+ * See: https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask
7657
+ *
7658
+ * ```proto
7659
+ * message MyFieldMask {
7660
+ * // The `value` FieldMask shall not contain paths listed in `not_in`.
7661
+ * google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask = {
7662
+ * not_in: ["forbidden", "immutable", "c.a"]
7663
+ * }];
7664
+ * }
7665
+ * ```
7666
+ *
7667
+ * @generated from field: repeated string not_in = 3;
7668
+ */
7669
+ notIn: string[];
7670
+ /**
7671
+ * `example` specifies values that the field may have. These values SHOULD
7672
+ * conform to other rules. `example` values will not impact validation
7673
+ * but may be used as helpful guidance on how to populate the given field.
7674
+ *
7675
+ * ```proto
7676
+ * message MyFieldMask {
7677
+ * google.protobuf.FieldMask value = 1 [
7678
+ * (buf.validate.field).field_mask.example = { paths: ["a", "b"] },
7679
+ * (buf.validate.field).field_mask.example = { paths: ["c.a", "d"] },
7680
+ * ];
7681
+ * }
7682
+ * ```
7683
+ *
7684
+ * @generated from field: repeated google.protobuf.FieldMask example = 4;
7685
+ */
7686
+ example: FieldMask[];
7687
+ };
7688
+ /**
7689
+ * FieldMaskRules describe rules applied exclusively to the `google.protobuf.FieldMask` well-known type.
7690
+ *
7691
+ * @generated from message buf.validate.FieldMaskRules
7692
+ */
7693
+ export type FieldMaskRulesJson = {
7694
+ /**
7695
+ * `const` dictates that the field must match the specified value of the `google.protobuf.FieldMask` type exactly.
7696
+ * If the field's value deviates from the specified value, an error message
7697
+ * will be generated.
7698
+ *
7699
+ * ```proto
7700
+ * message MyFieldMask {
7701
+ * // value must equal ["a"]
7702
+ * google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask.const = {
7703
+ * paths: ["a"]
7704
+ * }];
7705
+ * }
7706
+ * ```
7707
+ *
7708
+ * @generated from field: optional google.protobuf.FieldMask const = 1;
7709
+ */
7710
+ const?: FieldMaskJson;
7711
+ /**
7712
+ * `in` requires the field value to only contain paths matching specified
7713
+ * values or their subpaths.
7714
+ * If any of the field value's paths doesn't match the rule,
7715
+ * an error message is generated.
7716
+ * See: https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask
7717
+ *
7718
+ * ```proto
7719
+ * message MyFieldMask {
7720
+ * // The `value` FieldMask must only contain paths listed in `in`.
7721
+ * google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask = {
7722
+ * in: ["a", "b", "c.a"]
7723
+ * }];
7724
+ * }
7725
+ * ```
7726
+ *
7727
+ * @generated from field: repeated string in = 2;
7728
+ */
7729
+ in?: string[];
7730
+ /**
7731
+ * `not_in` requires the field value to not contain paths matching specified
7732
+ * values or their subpaths.
7733
+ * If any of the field value's paths matches the rule,
7734
+ * an error message is generated.
7735
+ * See: https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask
7736
+ *
7737
+ * ```proto
7738
+ * message MyFieldMask {
7739
+ * // The `value` FieldMask shall not contain paths listed in `not_in`.
7740
+ * google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask = {
7741
+ * not_in: ["forbidden", "immutable", "c.a"]
7742
+ * }];
7743
+ * }
7744
+ * ```
7745
+ *
7746
+ * @generated from field: repeated string not_in = 3;
7747
+ */
7748
+ notIn?: string[];
7749
+ /**
7750
+ * `example` specifies values that the field may have. These values SHOULD
7751
+ * conform to other rules. `example` values will not impact validation
7752
+ * but may be used as helpful guidance on how to populate the given field.
7753
+ *
7754
+ * ```proto
7755
+ * message MyFieldMask {
7756
+ * google.protobuf.FieldMask value = 1 [
7757
+ * (buf.validate.field).field_mask.example = { paths: ["a", "b"] },
7758
+ * (buf.validate.field).field_mask.example = { paths: ["c.a", "d"] },
7759
+ * ];
7760
+ * }
7761
+ * ```
7762
+ *
7763
+ * @generated from field: repeated google.protobuf.FieldMask example = 4;
7764
+ */
7765
+ example?: FieldMaskJson[];
7766
+ };
7767
+ /**
7768
+ * Describes the message buf.validate.FieldMaskRules.
7769
+ * Use `create(FieldMaskRulesSchema)` to create a new message.
7770
+ */
7771
+ export declare const FieldMaskRulesSchema: GenMessage<FieldMaskRules, {
7772
+ jsonType: FieldMaskRulesJson;
7773
+ }>;
7114
7774
  /**
7115
- * TimestampRules describe the constraints applied exclusively to the `google.protobuf.Timestamp` well-known type.
7775
+ * TimestampRules describe the rules applied exclusively to the `google.protobuf.Timestamp` well-known type.
7116
7776
  *
7117
7777
  * @generated from message buf.validate.TimestampRules
7118
7778
  */
@@ -7268,12 +7928,25 @@ export type TimestampRules = Message<"buf.validate.TimestampRules"> & {
7268
7928
  */
7269
7929
  within?: Duration;
7270
7930
  /**
7931
+ * `example` specifies values that the field may have. These values SHOULD
7932
+ * conform to other rules. `example` values will not impact validation
7933
+ * but may be used as helpful guidance on how to populate the given field.
7934
+ *
7935
+ * ```proto
7936
+ * message MyTimestamp {
7937
+ * google.protobuf.Timestamp value = 1 [
7938
+ * (buf.validate.field).timestamp.example = { seconds: 1672444800 },
7939
+ * (buf.validate.field).timestamp.example = { seconds: 1672531200 },
7940
+ * ];
7941
+ * }
7942
+ * ```
7943
+ *
7271
7944
  * @generated from field: repeated google.protobuf.Timestamp example = 10;
7272
7945
  */
7273
7946
  example: Timestamp[];
7274
7947
  };
7275
7948
  /**
7276
- * TimestampRules describe the constraints applied exclusively to the `google.protobuf.Timestamp` well-known type.
7949
+ * TimestampRules describe the rules applied exclusively to the `google.protobuf.Timestamp` well-known type.
7277
7950
  *
7278
7951
  * @generated from message buf.validate.TimestampRules
7279
7952
  */
@@ -7403,6 +8076,19 @@ export type TimestampRulesJson = {
7403
8076
  */
7404
8077
  within?: DurationJson;
7405
8078
  /**
8079
+ * `example` specifies values that the field may have. These values SHOULD
8080
+ * conform to other rules. `example` values will not impact validation
8081
+ * but may be used as helpful guidance on how to populate the given field.
8082
+ *
8083
+ * ```proto
8084
+ * message MyTimestamp {
8085
+ * google.protobuf.Timestamp value = 1 [
8086
+ * (buf.validate.field).timestamp.example = { seconds: 1672444800 },
8087
+ * (buf.validate.field).timestamp.example = { seconds: 1672531200 },
8088
+ * ];
8089
+ * }
8090
+ * ```
8091
+ *
7406
8092
  * @generated from field: repeated google.protobuf.Timestamp example = 10;
7407
8093
  */
7408
8094
  example?: TimestampJson[];
@@ -7411,10 +8097,12 @@ export type TimestampRulesJson = {
7411
8097
  * Describes the message buf.validate.TimestampRules.
7412
8098
  * Use `create(TimestampRulesSchema)` to create a new message.
7413
8099
  */
7414
- export declare const TimestampRulesSchema: GenMessage<TimestampRules, TimestampRulesJson>;
8100
+ export declare const TimestampRulesSchema: GenMessage<TimestampRules, {
8101
+ jsonType: TimestampRulesJson;
8102
+ }>;
7415
8103
  /**
7416
8104
  * `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.
8105
+ * Protovalidate when a proto message fails to meet the requirements set by the `Rule` validation rules.
7418
8106
  * Each individual violation is represented by a `Violation` message.
7419
8107
  *
7420
8108
  * @generated from message buf.validate.Violations
@@ -7429,7 +8117,7 @@ export type Violations = Message<"buf.validate.Violations"> & {
7429
8117
  };
7430
8118
  /**
7431
8119
  * `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.
8120
+ * Protovalidate when a proto message fails to meet the requirements set by the `Rule` validation rules.
7433
8121
  * Each individual violation is represented by a `Violation` message.
7434
8122
  *
7435
8123
  * @generated from message buf.validate.Violations
@@ -7446,18 +8134,51 @@ export type ViolationsJson = {
7446
8134
  * Describes the message buf.validate.Violations.
7447
8135
  * Use `create(ViolationsSchema)` to create a new message.
7448
8136
  */
7449
- export declare const ViolationsSchema: GenMessage<Violations, ViolationsJson>;
8137
+ export declare const ViolationsSchema: GenMessage<Violations, {
8138
+ jsonType: ViolationsJson;
8139
+ }>;
7450
8140
  /**
7451
8141
  * `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
8142
+ * as a `Rule`, was not met. It provides information about the field that
8143
+ * caused the violation, the specific rule that wasn't fulfilled, and a
7454
8144
  * human-readable error message.
7455
8145
  *
8146
+ * For example, consider the following message:
8147
+ *
8148
+ * ```proto
8149
+ * message User {
8150
+ * int32 age = 1 [(buf.validate.field).cel = {
8151
+ * id: "user.age",
8152
+ * expression: "this < 18 ? 'User must be at least 18 years old' : ''",
8153
+ * }];
8154
+ * }
8155
+ * ```
8156
+ *
8157
+ * It could produce the following violation:
8158
+ *
7456
8159
  * ```json
7457
8160
  * {
7458
- * "fieldPath": "bar",
7459
- * "constraintId": "foo.bar",
7460
- * "message": "bar must be greater than 0"
8161
+ * "ruleId": "user.age",
8162
+ * "message": "User must be at least 18 years old",
8163
+ * "field": {
8164
+ * "elements": [
8165
+ * {
8166
+ * "fieldNumber": 1,
8167
+ * "fieldName": "age",
8168
+ * "fieldType": "TYPE_INT32"
8169
+ * }
8170
+ * ]
8171
+ * },
8172
+ * "rule": {
8173
+ * "elements": [
8174
+ * {
8175
+ * "fieldNumber": 23,
8176
+ * "fieldName": "cel",
8177
+ * "fieldType": "TYPE_MESSAGE",
8178
+ * "index": "0"
8179
+ * }
8180
+ * ]
8181
+ * }
7461
8182
  * }
7462
8183
  * ```
7463
8184
  *
@@ -7489,9 +8210,9 @@ export type Violation = Message<"buf.validate.Violation"> & {
7489
8210
  */
7490
8211
  field?: FieldPath;
7491
8212
  /**
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]`.
8213
+ * `rule` is a machine-readable path that points to the specific rule that failed validation.
8214
+ * This will be a nested field starting from the FieldRules of the field that failed validation.
8215
+ * For custom rules, this will provide the path of the rule, e.g. `cel[0]`.
7495
8216
  *
7496
8217
  * For example, consider the following message:
7497
8218
  *
@@ -7499,7 +8220,7 @@ export type Violation = Message<"buf.validate.Violation"> & {
7499
8220
  * message Message {
7500
8221
  * bool a = 1 [(buf.validate.field).required = true];
7501
8222
  * bool b = 2 [(buf.validate.field).cel = {
7502
- * id: "custom_constraint",
8223
+ * id: "custom_rule",
7503
8224
  * expression: "!this ? 'b must be true': ''"
7504
8225
  * }]
7505
8226
  * }
@@ -7522,15 +8243,15 @@ export type Violation = Message<"buf.validate.Violation"> & {
7522
8243
  */
7523
8244
  rule?: FieldPath;
7524
8245
  /**
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.
8246
+ * `rule_id` is the unique identifier of the `Rule` that was not fulfilled.
8247
+ * This is the same `id` that was specified in the `Rule` message, allowing easy tracing of which rule was violated.
7527
8248
  *
7528
- * @generated from field: optional string constraint_id = 2;
8249
+ * @generated from field: optional string rule_id = 2;
7529
8250
  */
7530
- constraintId: string;
8251
+ ruleId: string;
7531
8252
  /**
7532
8253
  * `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.
8254
+ * 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
8255
  *
7535
8256
  * @generated from field: optional string message = 3;
7536
8257
  */
@@ -7544,15 +8265,46 @@ export type Violation = Message<"buf.validate.Violation"> & {
7544
8265
  };
7545
8266
  /**
7546
8267
  * `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
8268
+ * as a `Rule`, was not met. It provides information about the field that
8269
+ * caused the violation, the specific rule that wasn't fulfilled, and a
7549
8270
  * human-readable error message.
7550
8271
  *
8272
+ * For example, consider the following message:
8273
+ *
8274
+ * ```proto
8275
+ * message User {
8276
+ * int32 age = 1 [(buf.validate.field).cel = {
8277
+ * id: "user.age",
8278
+ * expression: "this < 18 ? 'User must be at least 18 years old' : ''",
8279
+ * }];
8280
+ * }
8281
+ * ```
8282
+ *
8283
+ * It could produce the following violation:
8284
+ *
7551
8285
  * ```json
7552
8286
  * {
7553
- * "fieldPath": "bar",
7554
- * "constraintId": "foo.bar",
7555
- * "message": "bar must be greater than 0"
8287
+ * "ruleId": "user.age",
8288
+ * "message": "User must be at least 18 years old",
8289
+ * "field": {
8290
+ * "elements": [
8291
+ * {
8292
+ * "fieldNumber": 1,
8293
+ * "fieldName": "age",
8294
+ * "fieldType": "TYPE_INT32"
8295
+ * }
8296
+ * ]
8297
+ * },
8298
+ * "rule": {
8299
+ * "elements": [
8300
+ * {
8301
+ * "fieldNumber": 23,
8302
+ * "fieldName": "cel",
8303
+ * "fieldType": "TYPE_MESSAGE",
8304
+ * "index": "0"
8305
+ * }
8306
+ * ]
8307
+ * }
7556
8308
  * }
7557
8309
  * ```
7558
8310
  *
@@ -7584,9 +8336,9 @@ export type ViolationJson = {
7584
8336
  */
7585
8337
  field?: FieldPathJson;
7586
8338
  /**
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]`.
8339
+ * `rule` is a machine-readable path that points to the specific rule that failed validation.
8340
+ * This will be a nested field starting from the FieldRules of the field that failed validation.
8341
+ * For custom rules, this will provide the path of the rule, e.g. `cel[0]`.
7590
8342
  *
7591
8343
  * For example, consider the following message:
7592
8344
  *
@@ -7594,7 +8346,7 @@ export type ViolationJson = {
7594
8346
  * message Message {
7595
8347
  * bool a = 1 [(buf.validate.field).required = true];
7596
8348
  * bool b = 2 [(buf.validate.field).cel = {
7597
- * id: "custom_constraint",
8349
+ * id: "custom_rule",
7598
8350
  * expression: "!this ? 'b must be true': ''"
7599
8351
  * }]
7600
8352
  * }
@@ -7617,15 +8369,15 @@ export type ViolationJson = {
7617
8369
  */
7618
8370
  rule?: FieldPathJson;
7619
8371
  /**
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.
8372
+ * `rule_id` is the unique identifier of the `Rule` that was not fulfilled.
8373
+ * This is the same `id` that was specified in the `Rule` message, allowing easy tracing of which rule was violated.
7622
8374
  *
7623
- * @generated from field: optional string constraint_id = 2;
8375
+ * @generated from field: optional string rule_id = 2;
7624
8376
  */
7625
- constraintId?: string;
8377
+ ruleId?: string;
7626
8378
  /**
7627
8379
  * `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.
8380
+ * 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
8381
  *
7630
8382
  * @generated from field: optional string message = 3;
7631
8383
  */
@@ -7641,7 +8393,9 @@ export type ViolationJson = {
7641
8393
  * Describes the message buf.validate.Violation.
7642
8394
  * Use `create(ViolationSchema)` to create a new message.
7643
8395
  */
7644
- export declare const ViolationSchema: GenMessage<Violation, ViolationJson>;
8396
+ export declare const ViolationSchema: GenMessage<Violation, {
8397
+ jsonType: ViolationJson;
8398
+ }>;
7645
8399
  /**
7646
8400
  * `FieldPath` provides a path to a nested protobuf field.
7647
8401
  *
@@ -7678,7 +8432,9 @@ export type FieldPathJson = {
7678
8432
  * Describes the message buf.validate.FieldPath.
7679
8433
  * Use `create(FieldPathSchema)` to create a new message.
7680
8434
  */
7681
- export declare const FieldPathSchema: GenMessage<FieldPath, FieldPathJson>;
8435
+ export declare const FieldPathSchema: GenMessage<FieldPath, {
8436
+ jsonType: FieldPathJson;
8437
+ }>;
7682
8438
  /**
7683
8439
  * `FieldPathElement` provides enough information to nest through a single protobuf field.
7684
8440
  *
@@ -7870,162 +8626,104 @@ export type FieldPathElementJson = {
7870
8626
  * Describes the message buf.validate.FieldPathElement.
7871
8627
  * Use `create(FieldPathElementSchema)` to create a new message.
7872
8628
  */
7873
- export declare const FieldPathElementSchema: GenMessage<FieldPathElement, FieldPathElementJson>;
8629
+ export declare const FieldPathElementSchema: GenMessage<FieldPathElement, {
8630
+ jsonType: FieldPathElementJson;
8631
+ }>;
7874
8632
  /**
7875
- * Specifies how FieldConstraints.ignore behaves. See the documentation for
7876
- * FieldConstraints.required for definitions of "populated" and "nullable".
8633
+ * Specifies how `FieldRules.ignore` behaves, depending on the field's value, and
8634
+ * whether the field tracks presence.
7877
8635
  *
7878
8636
  * @generated from enum buf.validate.Ignore
7879
8637
  */
7880
8638
  export declare enum Ignore {
7881
8639
  /**
7882
- * Validation is only skipped if it's an unpopulated nullable fields.
8640
+ * Ignore rules if the field tracks presence and is unset. This is the default
8641
+ * behavior.
8642
+ *
8643
+ * In proto3, only message fields, members of a Protobuf `oneof`, and fields
8644
+ * with the `optional` label track presence. Consequently, the following fields
8645
+ * are always validated, whether a value is set or not:
7883
8646
  *
7884
8647
  * ```proto
7885
8648
  * syntax="proto3";
7886
8649
  *
7887
- * message Request {
7888
- * // The uri rule applies to any value, including the empty string.
7889
- * string foo = 1 [
7890
- * (buf.validate.field).string.uri = true
7891
- * ];
7892
- *
7893
- * // The uri rule only applies if the field is set, including if it's
7894
- * // set to the empty string.
7895
- * optional string bar = 2 [
7896
- * (buf.validate.field).string.uri = true
8650
+ * message RulesApply {
8651
+ * string email = 1 [
8652
+ * (buf.validate.field).string.email = true
7897
8653
  * ];
7898
- *
7899
- * // The min_items rule always applies, even if the list is empty.
7900
- * repeated string baz = 3 [
7901
- * (buf.validate.field).repeated.min_items = 3
8654
+ * int32 age = 2 [
8655
+ * (buf.validate.field).int32.gt = 0
7902
8656
  * ];
7903
- *
7904
- * // The custom CEL rule applies only if the field is set, including if
7905
- * // it's the "zero" value of that message.
7906
- * SomeMessage quux = 4 [
7907
- * (buf.validate.field).cel = {/* ... *\/}
8657
+ * repeated string labels = 3 [
8658
+ * (buf.validate.field).repeated.min_items = 1
7908
8659
  * ];
7909
8660
  * }
7910
8661
  * ```
7911
8662
  *
7912
- * @generated from enum value: IGNORE_UNSPECIFIED = 0;
7913
- */
7914
- UNSPECIFIED = 0,
7915
- /**
7916
- * Validation is skipped if the field is unpopulated. This rule is redundant
7917
- * if the field is already nullable.
8663
+ * In contrast, the following fields track presence, and are only validated if
8664
+ * a value is set:
7918
8665
  *
7919
8666
  * ```proto
7920
- * syntax="proto3
7921
- *
7922
- * message Request {
7923
- * // The uri rule applies only if the value is not the empty string.
7924
- * string foo = 1 [
7925
- * (buf.validate.field).string.uri = true,
7926
- * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
7927
- * ];
7928
- *
7929
- * // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this
7930
- * // case: the uri rule only applies if the field is set, including if
7931
- * // it's set to the empty string.
7932
- * optional string bar = 2 [
7933
- * (buf.validate.field).string.uri = true,
7934
- * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
7935
- * ];
8667
+ * syntax="proto3";
7936
8668
  *
7937
- * // The min_items rule only applies if the list has at least one item.
7938
- * repeated string baz = 3 [
7939
- * (buf.validate.field).repeated.min_items = 3,
7940
- * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
8669
+ * message RulesApplyIfSet {
8670
+ * optional string email = 1 [
8671
+ * (buf.validate.field).string.email = true
7941
8672
  * ];
7942
- *
7943
- * // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this
7944
- * // case: the custom CEL rule applies only if the field is set, including
7945
- * // if it's the "zero" value of that message.
7946
- * SomeMessage quux = 4 [
7947
- * (buf.validate.field).cel = {/* ... *\/},
7948
- * (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
8673
+ * oneof ref {
8674
+ * string reference = 2 [
8675
+ * (buf.validate.field).string.uuid = true
8676
+ * ];
8677
+ * string name = 3 [
8678
+ * (buf.validate.field).string.min_len = 4
8679
+ * ];
8680
+ * }
8681
+ * SomeMessage msg = 4 [
8682
+ * (buf.validate.field).cel = {/* ... *\/}
7949
8683
  * ];
7950
8684
  * }
7951
8685
  * ```
7952
8686
  *
7953
- * @generated from enum value: IGNORE_IF_UNPOPULATED = 1;
7954
- */
7955
- IF_UNPOPULATED = 1,
7956
- /**
7957
- * Validation is skipped if the field is unpopulated or if it is a nullable
7958
- * field populated with its default value. This is typically the zero or
7959
- * empty value, but proto2 scalars support custom defaults. For messages, the
7960
- * default is a non-null message with all its fields unpopulated.
7961
- *
7962
- * ```proto
7963
- * syntax="proto3
7964
- *
7965
- * message Request {
7966
- * // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in
7967
- * // this case; the uri rule applies only if the value is not the empty
7968
- * // string.
7969
- * string foo = 1 [
7970
- * (buf.validate.field).string.uri = true,
7971
- * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
7972
- * ];
7973
- *
7974
- * // The uri rule only applies if the field is set to a value other than
7975
- * // the empty string.
7976
- * optional string bar = 2 [
7977
- * (buf.validate.field).string.uri = true,
7978
- * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
7979
- * ];
7980
- *
7981
- * // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in
7982
- * // this case; the min_items rule only applies if the list has at least
7983
- * // one item.
7984
- * repeated string baz = 3 [
7985
- * (buf.validate.field).repeated.min_items = 3,
7986
- * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
7987
- * ];
8687
+ * To ensure that such a field is set, add the `required` rule.
7988
8688
  *
7989
- * // The custom CEL rule only applies if the field is set to a value other
7990
- * // than an empty message (i.e., fields are unpopulated).
7991
- * SomeMessage quux = 4 [
7992
- * (buf.validate.field).cel = {/* ... *\/},
7993
- * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
7994
- * ];
7995
- * }
7996
- * ```
8689
+ * To learn which fields track presence, see the
8690
+ * [Field Presence cheat sheet](https://protobuf.dev/programming-guides/field_presence/#cheat).
7997
8691
  *
7998
- * This rule is affected by proto2 custom default values:
8692
+ * @generated from enum value: IGNORE_UNSPECIFIED = 0;
8693
+ */
8694
+ UNSPECIFIED = 0,
8695
+ /**
8696
+ * Ignore rules if the field is unset, or set to the zero value.
7999
8697
  *
8000
- * ```proto
8001
- * syntax="proto2";
8698
+ * The zero value depends on the field type:
8699
+ * - For strings, the zero value is the empty string.
8700
+ * - For bytes, the zero value is empty bytes.
8701
+ * - For bool, the zero value is false.
8702
+ * - For numeric types, the zero value is zero.
8703
+ * - For enums, the zero value is the first defined enum value.
8704
+ * - For repeated fields, the zero is an empty list.
8705
+ * - For map fields, the zero is an empty map.
8706
+ * - For message fields, absence of the message (typically a null-value) is considered zero value.
8002
8707
  *
8003
- * message Request {
8004
- * // The gt rule only applies if the field is set and it's value is not
8005
- * the default (i.e., not -42). The rule even applies if the field is set
8006
- * to zero since the default value differs.
8007
- * optional int32 value = 1 [
8008
- * default = -42,
8009
- * (buf.validate.field).int32.gt = 0,
8010
- * (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
8011
- * ];
8012
- * }
8708
+ * For fields that track presence (e.g. adding the `optional` label in proto3),
8709
+ * this a no-op and behavior is the same as the default `IGNORE_UNSPECIFIED`.
8013
8710
  *
8014
- * @generated from enum value: IGNORE_IF_DEFAULT_VALUE = 2;
8711
+ * @generated from enum value: IGNORE_IF_ZERO_VALUE = 1;
8015
8712
  */
8016
- IF_DEFAULT_VALUE = 2,
8713
+ IF_ZERO_VALUE = 1,
8017
8714
  /**
8018
- * The validation rules of this field will be skipped and not evaluated. This
8019
- * is useful for situations that necessitate turning off the rules of a field
8020
- * containing a message that may not make sense in the current context, or to
8021
- * temporarily disable constraints during development.
8715
+ * Always ignore rules, including the `required` rule.
8716
+ *
8717
+ * This is useful for ignoring the rules of a referenced message, or to
8718
+ * temporarily ignore rules during development.
8022
8719
  *
8023
8720
  * ```proto
8024
8721
  * message MyMessage {
8025
- * // The field's rules will always be ignored, including any validation's
8722
+ * // The field's rules will always be ignored, including any validations
8026
8723
  * // on value's fields.
8027
8724
  * MyOtherMessage value = 1 [
8028
- * (buf.validate.field).ignore = IGNORE_ALWAYS];
8725
+ * (buf.validate.field).ignore = IGNORE_ALWAYS
8726
+ * ];
8029
8727
  * }
8030
8728
  * ```
8031
8729
  *
@@ -8034,18 +8732,18 @@ export declare enum Ignore {
8034
8732
  ALWAYS = 3
8035
8733
  }
8036
8734
  /**
8037
- * Specifies how FieldConstraints.ignore behaves. See the documentation for
8038
- * FieldConstraints.required for definitions of "populated" and "nullable".
8735
+ * Specifies how `FieldRules.ignore` behaves, depending on the field's value, and
8736
+ * whether the field tracks presence.
8039
8737
  *
8040
8738
  * @generated from enum buf.validate.Ignore
8041
8739
  */
8042
- export type IgnoreJson = "IGNORE_UNSPECIFIED" | "IGNORE_IF_UNPOPULATED" | "IGNORE_IF_DEFAULT_VALUE" | "IGNORE_ALWAYS";
8740
+ export type IgnoreJson = "IGNORE_UNSPECIFIED" | "IGNORE_IF_ZERO_VALUE" | "IGNORE_ALWAYS";
8043
8741
  /**
8044
8742
  * Describes the enum buf.validate.Ignore.
8045
8743
  */
8046
8744
  export declare const IgnoreSchema: GenEnum<Ignore, IgnoreJson>;
8047
8745
  /**
8048
- * WellKnownRegex contain some well-known patterns.
8746
+ * KnownRegex contains some well-known patterns.
8049
8747
  *
8050
8748
  * @generated from enum buf.validate.KnownRegex
8051
8749
  */
@@ -8068,7 +8766,7 @@ export declare enum KnownRegex {
8068
8766
  HTTP_HEADER_VALUE = 2
8069
8767
  }
8070
8768
  /**
8071
- * WellKnownRegex contain some well-known patterns.
8769
+ * KnownRegex contains some well-known patterns.
8072
8770
  *
8073
8771
  * @generated from enum buf.validate.KnownRegex
8074
8772
  */
@@ -8081,25 +8779,25 @@ export declare const KnownRegexSchema: GenEnum<KnownRegex, KnownRegexJson>;
8081
8779
  * Rules specify the validations to be performed on this message. By default,
8082
8780
  * no validation is performed against a message.
8083
8781
  *
8084
- * @generated from extension: optional buf.validate.MessageConstraints message = 1159;
8782
+ * @generated from extension: optional buf.validate.MessageRules message = 1159;
8085
8783
  */
8086
- export declare const message: GenExtension<MessageOptions, MessageConstraints>;
8784
+ export declare const message: GenExtension<MessageOptions, MessageRules>;
8087
8785
  /**
8088
8786
  * Rules specify the validations to be performed on this oneof. By default,
8089
8787
  * no validation is performed against a oneof.
8090
8788
  *
8091
- * @generated from extension: optional buf.validate.OneofConstraints oneof = 1159;
8789
+ * @generated from extension: optional buf.validate.OneofRules oneof = 1159;
8092
8790
  */
8093
- export declare const oneof: GenExtension<OneofOptions, OneofConstraints>;
8791
+ export declare const oneof: GenExtension<OneofOptions, OneofRules>;
8094
8792
  /**
8095
8793
  * Rules specify the validations to be performed on this field. By default,
8096
8794
  * no validation is performed against a field.
8097
8795
  *
8098
- * @generated from extension: optional buf.validate.FieldConstraints field = 1159;
8796
+ * @generated from extension: optional buf.validate.FieldRules field = 1159;
8099
8797
  */
8100
- export declare const field: GenExtension<FieldOptions, FieldConstraints>;
8798
+ export declare const field: GenExtension<FieldOptions, FieldRules>;
8101
8799
  /**
8102
- * Specifies predefined rules. When extending a standard constraint message,
8800
+ * Specifies predefined rules. When extending a standard rule message,
8103
8801
  * this adds additional CEL expressions that apply when the extension is used.
8104
8802
  *
8105
8803
  * ```proto
@@ -8116,7 +8814,7 @@ export declare const field: GenExtension<FieldOptions, FieldConstraints>;
8116
8814
  * }
8117
8815
  * ```
8118
8816
  *
8119
- * @generated from extension: optional buf.validate.PredefinedConstraints predefined = 1160;
8817
+ * @generated from extension: optional buf.validate.PredefinedRules predefined = 1160;
8120
8818
  */
8121
- export declare const predefined: GenExtension<FieldOptions, PredefinedConstraints>;
8819
+ export declare const predefined: GenExtension<FieldOptions, PredefinedRules>;
8122
8820
  //# sourceMappingURL=validate_pb.d.ts.map