@opentdf/sdk 0.3.0 → 0.3.2-beta.1

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