@paakd/api 0.0.1 → 0.0.2

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