@raystack/proton 0.1.0-ce225175aa066e6f296bc489293bb83ed0edcef6

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 (197) hide show
  1. package/google/api/annotations_pb.ts +33 -0
  2. package/google/api/field_behavior.ts +95 -0
  3. package/google/api/field_behavior_pb.ts +139 -0
  4. package/google/api/http.ts +695 -0
  5. package/google/api/http_pb.ts +547 -0
  6. package/google/api/httpbody.ts +159 -0
  7. package/google/api/httpbody_pb.ts +122 -0
  8. package/google/protobuf/any.ts +322 -0
  9. package/google/protobuf/descriptor.ts +3475 -0
  10. package/google/protobuf/duration.ts +231 -0
  11. package/google/protobuf/struct.ts +484 -0
  12. package/google/protobuf/timestamp.ts +290 -0
  13. package/google/protobuf/wrappers.ts +752 -0
  14. package/package.json +47 -0
  15. package/protoc-gen-openapiv2/options/annotations_pb.ts +78 -0
  16. package/protoc-gen-openapiv2/options/openapiv2.ts +3110 -0
  17. package/protoc-gen-openapiv2/options/openapiv2_pb.ts +1995 -0
  18. package/raystack/assets/index.ts +29 -0
  19. package/raystack/assets/v1beta1/bucket.ts +362 -0
  20. package/raystack/assets/v1beta1/bucket_pb.ts +233 -0
  21. package/raystack/assets/v1beta1/dashboard.ts +426 -0
  22. package/raystack/assets/v1beta1/dashboard_pb.ts +275 -0
  23. package/raystack/assets/v1beta1/event.ts +105 -0
  24. package/raystack/assets/v1beta1/event_pb.ts +70 -0
  25. package/raystack/assets/v1beta1/group.ts +223 -0
  26. package/raystack/assets/v1beta1/group_pb.ts +149 -0
  27. package/raystack/assets/v1beta1/job.ts +147 -0
  28. package/raystack/assets/v1beta1/job_pb.ts +100 -0
  29. package/raystack/assets/v1beta1/lineage.ts +90 -0
  30. package/raystack/assets/v1beta1/lineage_pb.ts +61 -0
  31. package/raystack/assets/v1beta1/ownership.ts +179 -0
  32. package/raystack/assets/v1beta1/ownership_pb.ts +119 -0
  33. package/raystack/assets/v1beta1/preview.ts +87 -0
  34. package/raystack/assets/v1beta1/preview_pb.ts +58 -0
  35. package/raystack/assets/v1beta1/properties.ts +116 -0
  36. package/raystack/assets/v1beta1/properties_pb.ts +63 -0
  37. package/raystack/assets/v1beta1/resource.ts +149 -0
  38. package/raystack/assets/v1beta1/resource_pb.ts +96 -0
  39. package/raystack/assets/v1beta1/schema.ts +421 -0
  40. package/raystack/assets/v1beta1/schema_pb.ts +262 -0
  41. package/raystack/assets/v1beta1/table.ts +408 -0
  42. package/raystack/assets/v1beta1/table_pb.ts +266 -0
  43. package/raystack/assets/v1beta1/timestamp.ts +158 -0
  44. package/raystack/assets/v1beta1/timestamp_pb.ts +107 -0
  45. package/raystack/assets/v1beta1/topic.ts +253 -0
  46. package/raystack/assets/v1beta1/topic_pb.ts +171 -0
  47. package/raystack/assets/v1beta1/user.ts +451 -0
  48. package/raystack/assets/v1beta1/user_pb.ts +292 -0
  49. package/raystack/assets/v1beta2/application.ts +125 -0
  50. package/raystack/assets/v1beta2/application_pb.ts +79 -0
  51. package/raystack/assets/v1beta2/asset.ts +269 -0
  52. package/raystack/assets/v1beta2/asset_pb.ts +157 -0
  53. package/raystack/assets/v1beta2/bucket.ts +341 -0
  54. package/raystack/assets/v1beta2/bucket_pb.ts +215 -0
  55. package/raystack/assets/v1beta2/common.ts +392 -0
  56. package/raystack/assets/v1beta2/common_pb.ts +258 -0
  57. package/raystack/assets/v1beta2/dashboard.ts +393 -0
  58. package/raystack/assets/v1beta2/dashboard_pb.ts +247 -0
  59. package/raystack/assets/v1beta2/experiment.ts +274 -0
  60. package/raystack/assets/v1beta2/experiment_pb.ts +180 -0
  61. package/raystack/assets/v1beta2/feature_table.ts +387 -0
  62. package/raystack/assets/v1beta2/feature_table_pb.ts +237 -0
  63. package/raystack/assets/v1beta2/group.ts +178 -0
  64. package/raystack/assets/v1beta2/group_pb.ts +118 -0
  65. package/raystack/assets/v1beta2/job.ts +99 -0
  66. package/raystack/assets/v1beta2/job_pb.ts +65 -0
  67. package/raystack/assets/v1beta2/metric.ts +163 -0
  68. package/raystack/assets/v1beta2/metric_pb.ts +105 -0
  69. package/raystack/assets/v1beta2/model.ts +519 -0
  70. package/raystack/assets/v1beta2/model_pb.ts +322 -0
  71. package/raystack/assets/v1beta2/table.ts +663 -0
  72. package/raystack/assets/v1beta2/table_pb.ts +409 -0
  73. package/raystack/assets/v1beta2/topic.ts +275 -0
  74. package/raystack/assets/v1beta2/topic_pb.ts +181 -0
  75. package/raystack/assets/v1beta2/user.ts +433 -0
  76. package/raystack/assets/v1beta2/user_pb.ts +277 -0
  77. package/raystack/common/index.ts +3 -0
  78. package/raystack/common/v1/service-CommonService_connectquery.ts +21 -0
  79. package/raystack/common/v1/service.client.ts +37 -0
  80. package/raystack/common/v1/service.ts +245 -0
  81. package/raystack/common/v1/service_connect.ts +26 -0
  82. package/raystack/common/v1/service_pb.ts +149 -0
  83. package/raystack/compass/index.ts +3 -0
  84. package/raystack/compass/v1beta1/service-CompassService_connectquery.ts +605 -0
  85. package/raystack/compass/v1beta1/service.client.ts +594 -0
  86. package/raystack/compass/v1beta1/service.ts +8169 -0
  87. package/raystack/compass/v1beta1/service_connect.ts +407 -0
  88. package/raystack/compass/v1beta1/service_pb.ts +4975 -0
  89. package/raystack/entropy/index.ts +6 -0
  90. package/raystack/entropy/v1beta1/module-ModuleService_connectquery.ts +77 -0
  91. package/raystack/entropy/v1beta1/module.client.ts +89 -0
  92. package/raystack/entropy/v1beta1/module.ts +692 -0
  93. package/raystack/entropy/v1beta1/module_connect.ts +62 -0
  94. package/raystack/entropy/v1beta1/module_pb.ts +445 -0
  95. package/raystack/entropy/v1beta1/resource-ResourceService_connectquery.ts +105 -0
  96. package/raystack/entropy/v1beta1/resource.client.ts +129 -0
  97. package/raystack/entropy/v1beta1/resource.ts +1817 -0
  98. package/raystack/entropy/v1beta1/resource_connect.ts +89 -0
  99. package/raystack/entropy/v1beta1/resource_pb.ts +1092 -0
  100. package/raystack/frontier/index.ts +7 -0
  101. package/raystack/frontier/v1beta1/admin-AdminService_connectquery.ts +756 -0
  102. package/raystack/frontier/v1beta1/admin.client.ts +849 -0
  103. package/raystack/frontier/v1beta1/admin.ts +9007 -0
  104. package/raystack/frontier/v1beta1/admin_connect.ts +573 -0
  105. package/raystack/frontier/v1beta1/admin_pb.ts +5615 -0
  106. package/raystack/frontier/v1beta1/frontier-FrontierService_connectquery.ts +2399 -0
  107. package/raystack/frontier/v1beta1/frontier.client.ts +2307 -0
  108. package/raystack/frontier/v1beta1/frontier.ts +23706 -0
  109. package/raystack/frontier/v1beta1/frontier_connect.ts +1574 -0
  110. package/raystack/frontier/v1beta1/frontier_pb.ts +15258 -0
  111. package/raystack/frontier/v1beta1/models.ts +7433 -0
  112. package/raystack/frontier/v1beta1/models_pb.ts +4345 -0
  113. package/raystack/guardian/index.ts +3 -0
  114. package/raystack/guardian/v1beta1/guardian-GuardianService_connectquery.ts +569 -0
  115. package/raystack/guardian/v1beta1/guardian.client.ts +552 -0
  116. package/raystack/guardian/v1beta1/guardian.ts +9688 -0
  117. package/raystack/guardian/v1beta1/guardian_connect.ts +381 -0
  118. package/raystack/guardian/v1beta1/guardian_pb.ts +5858 -0
  119. package/raystack/optimus/core/v1beta1/backup-BackupService_connectquery.ts +49 -0
  120. package/raystack/optimus/core/v1beta1/backup.client.ts +63 -0
  121. package/raystack/optimus/core/v1beta1/backup.ts +708 -0
  122. package/raystack/optimus/core/v1beta1/backup_connect.ts +44 -0
  123. package/raystack/optimus/core/v1beta1/backup_pb.ts +406 -0
  124. package/raystack/optimus/core/v1beta1/job_run-JobRunService_connectquery.ts +71 -0
  125. package/raystack/optimus/core/v1beta1/job_run.client.ts +96 -0
  126. package/raystack/optimus/core/v1beta1/job_run.ts +1008 -0
  127. package/raystack/optimus/core/v1beta1/job_run_connect.ts +63 -0
  128. package/raystack/optimus/core/v1beta1/job_run_pb.ts +612 -0
  129. package/raystack/optimus/core/v1beta1/job_spec-JobSpecificationService_connectquery.ts +249 -0
  130. package/raystack/optimus/core/v1beta1/job_spec.client.ts +363 -0
  131. package/raystack/optimus/core/v1beta1/job_spec.ts +5134 -0
  132. package/raystack/optimus/core/v1beta1/job_spec_connect.ts +233 -0
  133. package/raystack/optimus/core/v1beta1/job_spec_pb.ts +3196 -0
  134. package/raystack/optimus/core/v1beta1/namespace-NamespaceService_connectquery.ts +55 -0
  135. package/raystack/optimus/core/v1beta1/namespace.client.ts +75 -0
  136. package/raystack/optimus/core/v1beta1/namespace.ts +477 -0
  137. package/raystack/optimus/core/v1beta1/namespace_connect.ts +50 -0
  138. package/raystack/optimus/core/v1beta1/namespace_pb.ts +291 -0
  139. package/raystack/optimus/core/v1beta1/project-ProjectService_connectquery.ts +55 -0
  140. package/raystack/optimus/core/v1beta1/project.client.ts +75 -0
  141. package/raystack/optimus/core/v1beta1/project.ts +520 -0
  142. package/raystack/optimus/core/v1beta1/project_connect.ts +50 -0
  143. package/raystack/optimus/core/v1beta1/project_pb.ts +322 -0
  144. package/raystack/optimus/core/v1beta1/replay-ReplayService_connectquery.ts +63 -0
  145. package/raystack/optimus/core/v1beta1/replay.client.ts +76 -0
  146. package/raystack/optimus/core/v1beta1/replay.ts +881 -0
  147. package/raystack/optimus/core/v1beta1/replay_connect.ts +53 -0
  148. package/raystack/optimus/core/v1beta1/replay_pb.ts +522 -0
  149. package/raystack/optimus/core/v1beta1/resource-ResourceService_connectquery.ts +104 -0
  150. package/raystack/optimus/core/v1beta1/resource.client.ts +148 -0
  151. package/raystack/optimus/core/v1beta1/resource.ts +1329 -0
  152. package/raystack/optimus/core/v1beta1/resource_connect.ts +96 -0
  153. package/raystack/optimus/core/v1beta1/resource_pb.ts +791 -0
  154. package/raystack/optimus/core/v1beta1/runtime-RuntimeService_connectquery.ts +23 -0
  155. package/raystack/optimus/core/v1beta1/runtime.client.ts +45 -0
  156. package/raystack/optimus/core/v1beta1/runtime.ts +131 -0
  157. package/raystack/optimus/core/v1beta1/runtime_connect.ts +30 -0
  158. package/raystack/optimus/core/v1beta1/runtime_pb.ts +82 -0
  159. package/raystack/optimus/core/v1beta1/secret-SecretService_connectquery.ts +71 -0
  160. package/raystack/optimus/core/v1beta1/secret.client.ts +92 -0
  161. package/raystack/optimus/core/v1beta1/secret.ts +619 -0
  162. package/raystack/optimus/core/v1beta1/secret_connect.ts +61 -0
  163. package/raystack/optimus/core/v1beta1/secret_pb.ts +393 -0
  164. package/raystack/optimus/core/v1beta1/status.ts +113 -0
  165. package/raystack/optimus/core/v1beta1/status_pb.ts +101 -0
  166. package/raystack/optimus/integration/v1beta1/event.ts +531 -0
  167. package/raystack/optimus/integration/v1beta1/event_pb.ts +362 -0
  168. package/raystack/optimus/plugins/v1beta1/dependency_resolver-DependencyResolverModService_connectquery.ts +72 -0
  169. package/raystack/optimus/plugins/v1beta1/dependency_resolver.client.ts +100 -0
  170. package/raystack/optimus/plugins/v1beta1/dependency_resolver.ts +950 -0
  171. package/raystack/optimus/plugins/v1beta1/dependency_resolver_connect.ts +65 -0
  172. package/raystack/optimus/plugins/v1beta1/dependency_resolver_pb.ts +604 -0
  173. package/raystack/predator/index.ts +2 -0
  174. package/raystack/predator/v1beta1/metrics_log.ts +457 -0
  175. package/raystack/predator/v1beta1/metrics_log_pb.ts +277 -0
  176. package/raystack/predator/v1beta1/result_log.ts +390 -0
  177. package/raystack/predator/v1beta1/result_log_pb.ts +235 -0
  178. package/raystack/raccoon/index.ts +3 -0
  179. package/raystack/raccoon/v1beta1/raccoon-EventService_connectquery.ts +21 -0
  180. package/raystack/raccoon/v1beta1/raccoon.client.ts +37 -0
  181. package/raystack/raccoon/v1beta1/raccoon.ts +442 -0
  182. package/raystack/raccoon/v1beta1/raccoon_connect.ts +26 -0
  183. package/raystack/raccoon/v1beta1/raccoon_pb.ts +324 -0
  184. package/raystack/siren/index.ts +3 -0
  185. package/raystack/siren/v1beta1/siren-SirenService_connectquery.ts +497 -0
  186. package/raystack/siren/v1beta1/siren.client.ts +479 -0
  187. package/raystack/siren/v1beta1/siren.ts +6507 -0
  188. package/raystack/siren/v1beta1/siren_connect.ts +332 -0
  189. package/raystack/siren/v1beta1/siren_pb.ts +3853 -0
  190. package/raystack/stencil/index.ts +3 -0
  191. package/raystack/stencil/v1beta1/stencil-StencilService_connectquery.ts +231 -0
  192. package/raystack/stencil/v1beta1/stencil.client.ts +232 -0
  193. package/raystack/stencil/v1beta1/stencil.ts +2716 -0
  194. package/raystack/stencil/v1beta1/stencil_connect.ts +161 -0
  195. package/raystack/stencil/v1beta1/stencil_pb.ts +1729 -0
  196. package/validate/validate.ts +4130 -0
  197. package/validate/validate_pb.ts +2621 -0
@@ -0,0 +1,695 @@
1
+ // @generated by protobuf-ts 2.11.1
2
+ // @generated from protobuf file "google/api/http.proto" (package "google.api", syntax proto3)
3
+ // tslint:disable
4
+ //
5
+ // Copyright 2023 Google LLC
6
+ //
7
+ // Licensed under the Apache License, Version 2.0 (the "License");
8
+ // you may not use this file except in compliance with the License.
9
+ // You may obtain a copy of the License at
10
+ //
11
+ // http://www.apache.org/licenses/LICENSE-2.0
12
+ //
13
+ // Unless required by applicable law or agreed to in writing, software
14
+ // distributed under the License is distributed on an "AS IS" BASIS,
15
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ // See the License for the specific language governing permissions and
17
+ // limitations under the License.
18
+ //
19
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
20
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
21
+ import { WireType } from "@protobuf-ts/runtime";
22
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
23
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
24
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
25
+ import type { PartialMessage } from "@protobuf-ts/runtime";
26
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
27
+ import { MessageType } from "@protobuf-ts/runtime";
28
+ /**
29
+ * Defines the HTTP configuration for an API service. It contains a list of
30
+ * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
31
+ * to one or more HTTP REST API methods.
32
+ *
33
+ * @generated from protobuf message google.api.Http
34
+ */
35
+ export interface Http {
36
+ /**
37
+ * A list of HTTP configuration rules that apply to individual API methods.
38
+ *
39
+ * **NOTE:** All service configuration rules follow "last one wins" order.
40
+ *
41
+ * @generated from protobuf field: repeated google.api.HttpRule rules = 1
42
+ */
43
+ rules: HttpRule[];
44
+ /**
45
+ * When set to true, URL path parameters will be fully URI-decoded except in
46
+ * cases of single segment matches in reserved expansion, where "%2F" will be
47
+ * left encoded.
48
+ *
49
+ * The default behavior is to not decode RFC 6570 reserved characters in multi
50
+ * segment matches.
51
+ *
52
+ * @generated from protobuf field: bool fully_decode_reserved_expansion = 2
53
+ */
54
+ fullyDecodeReservedExpansion: boolean;
55
+ }
56
+ /**
57
+ * # gRPC Transcoding
58
+ *
59
+ * gRPC Transcoding is a feature for mapping between a gRPC method and one or
60
+ * more HTTP REST endpoints. It allows developers to build a single API service
61
+ * that supports both gRPC APIs and REST APIs. Many systems, including [Google
62
+ * APIs](https://github.com/googleapis/googleapis),
63
+ * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
64
+ * Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
65
+ * and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
66
+ * and use it for large scale production services.
67
+ *
68
+ * `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
69
+ * how different portions of the gRPC request message are mapped to the URL
70
+ * path, URL query parameters, and HTTP request body. It also controls how the
71
+ * gRPC response message is mapped to the HTTP response body. `HttpRule` is
72
+ * typically specified as an `google.api.http` annotation on the gRPC method.
73
+ *
74
+ * Each mapping specifies a URL path template and an HTTP method. The path
75
+ * template may refer to one or more fields in the gRPC request message, as long
76
+ * as each field is a non-repeated field with a primitive (non-message) type.
77
+ * The path template controls how fields of the request message are mapped to
78
+ * the URL path.
79
+ *
80
+ * Example:
81
+ *
82
+ * service Messaging {
83
+ * rpc GetMessage(GetMessageRequest) returns (Message) {
84
+ * option (google.api.http) = {
85
+ * get: "/v1/{name=messages/*}"
86
+ * };
87
+ * }
88
+ * }
89
+ * message GetMessageRequest {
90
+ * string name = 1; // Mapped to URL path.
91
+ * }
92
+ * message Message {
93
+ * string text = 1; // The resource content.
94
+ * }
95
+ *
96
+ * This enables an HTTP REST to gRPC mapping as below:
97
+ *
98
+ * HTTP | gRPC
99
+ * -----|-----
100
+ * `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")`
101
+ *
102
+ * Any fields in the request message which are not bound by the path template
103
+ * automatically become HTTP query parameters if there is no HTTP request body.
104
+ * For example:
105
+ *
106
+ * service Messaging {
107
+ * rpc GetMessage(GetMessageRequest) returns (Message) {
108
+ * option (google.api.http) = {
109
+ * get:"/v1/messages/{message_id}"
110
+ * };
111
+ * }
112
+ * }
113
+ * message GetMessageRequest {
114
+ * message SubMessage {
115
+ * string subfield = 1;
116
+ * }
117
+ * string message_id = 1; // Mapped to URL path.
118
+ * int64 revision = 2; // Mapped to URL query parameter `revision`.
119
+ * SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
120
+ * }
121
+ *
122
+ * This enables a HTTP JSON to RPC mapping as below:
123
+ *
124
+ * HTTP | gRPC
125
+ * -----|-----
126
+ * `GET /v1/messages/123456?revision=2&sub.subfield=foo` |
127
+ * `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield:
128
+ * "foo"))`
129
+ *
130
+ * Note that fields which are mapped to URL query parameters must have a
131
+ * primitive type or a repeated primitive type or a non-repeated message type.
132
+ * In the case of a repeated type, the parameter can be repeated in the URL
133
+ * as `...?param=A&param=B`. In the case of a message type, each field of the
134
+ * message is mapped to a separate parameter, such as
135
+ * `...?foo.a=A&foo.b=B&foo.c=C`.
136
+ *
137
+ * For HTTP methods that allow a request body, the `body` field
138
+ * specifies the mapping. Consider a REST update method on the
139
+ * message resource collection:
140
+ *
141
+ * service Messaging {
142
+ * rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
143
+ * option (google.api.http) = {
144
+ * patch: "/v1/messages/{message_id}"
145
+ * body: "message"
146
+ * };
147
+ * }
148
+ * }
149
+ * message UpdateMessageRequest {
150
+ * string message_id = 1; // mapped to the URL
151
+ * Message message = 2; // mapped to the body
152
+ * }
153
+ *
154
+ * The following HTTP JSON to RPC mapping is enabled, where the
155
+ * representation of the JSON in the request body is determined by
156
+ * protos JSON encoding:
157
+ *
158
+ * HTTP | gRPC
159
+ * -----|-----
160
+ * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
161
+ * "123456" message { text: "Hi!" })`
162
+ *
163
+ * The special name `*` can be used in the body mapping to define that
164
+ * every field not bound by the path template should be mapped to the
165
+ * request body. This enables the following alternative definition of
166
+ * the update method:
167
+ *
168
+ * service Messaging {
169
+ * rpc UpdateMessage(Message) returns (Message) {
170
+ * option (google.api.http) = {
171
+ * patch: "/v1/messages/{message_id}"
172
+ * body: "*"
173
+ * };
174
+ * }
175
+ * }
176
+ * message Message {
177
+ * string message_id = 1;
178
+ * string text = 2;
179
+ * }
180
+ *
181
+ *
182
+ * The following HTTP JSON to RPC mapping is enabled:
183
+ *
184
+ * HTTP | gRPC
185
+ * -----|-----
186
+ * `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
187
+ * "123456" text: "Hi!")`
188
+ *
189
+ * Note that when using `*` in the body mapping, it is not possible to
190
+ * have HTTP parameters, as all fields not bound by the path end in
191
+ * the body. This makes this option more rarely used in practice when
192
+ * defining REST APIs. The common usage of `*` is in custom methods
193
+ * which don't use the URL at all for transferring data.
194
+ *
195
+ * It is possible to define multiple HTTP methods for one RPC by using
196
+ * the `additional_bindings` option. Example:
197
+ *
198
+ * service Messaging {
199
+ * rpc GetMessage(GetMessageRequest) returns (Message) {
200
+ * option (google.api.http) = {
201
+ * get: "/v1/messages/{message_id}"
202
+ * additional_bindings {
203
+ * get: "/v1/users/{user_id}/messages/{message_id}"
204
+ * }
205
+ * };
206
+ * }
207
+ * }
208
+ * message GetMessageRequest {
209
+ * string message_id = 1;
210
+ * string user_id = 2;
211
+ * }
212
+ *
213
+ * This enables the following two alternative HTTP JSON to RPC mappings:
214
+ *
215
+ * HTTP | gRPC
216
+ * -----|-----
217
+ * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
218
+ * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id:
219
+ * "123456")`
220
+ *
221
+ * ## Rules for HTTP mapping
222
+ *
223
+ * 1. Leaf request fields (recursive expansion nested messages in the request
224
+ * message) are classified into three categories:
225
+ * - Fields referred by the path template. They are passed via the URL path.
226
+ * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
227
+ * are passed via the HTTP
228
+ * request body.
229
+ * - All other fields are passed via the URL query parameters, and the
230
+ * parameter name is the field path in the request message. A repeated
231
+ * field can be represented as multiple query parameters under the same
232
+ * name.
233
+ * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
234
+ * query parameter, all fields
235
+ * are passed via URL path and HTTP request body.
236
+ * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
237
+ * request body, all
238
+ * fields are passed via URL path and URL query parameters.
239
+ *
240
+ * ### Path template syntax
241
+ *
242
+ * Template = "/" Segments [ Verb ] ;
243
+ * Segments = Segment { "/" Segment } ;
244
+ * Segment = "*" | "**" | LITERAL | Variable ;
245
+ * Variable = "{" FieldPath [ "=" Segments ] "}" ;
246
+ * FieldPath = IDENT { "." IDENT } ;
247
+ * Verb = ":" LITERAL ;
248
+ *
249
+ * The syntax `*` matches a single URL path segment. The syntax `**` matches
250
+ * zero or more URL path segments, which must be the last part of the URL path
251
+ * except the `Verb`.
252
+ *
253
+ * The syntax `Variable` matches part of the URL path as specified by its
254
+ * template. A variable template must not contain other variables. If a variable
255
+ * matches a single path segment, its template may be omitted, e.g. `{var}`
256
+ * is equivalent to `{var=*}`.
257
+ *
258
+ * The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
259
+ * contains any reserved character, such characters should be percent-encoded
260
+ * before the matching.
261
+ *
262
+ * If a variable contains exactly one path segment, such as `"{var}"` or
263
+ * `"{var=*}"`, when such a variable is expanded into a URL path on the client
264
+ * side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
265
+ * server side does the reverse decoding. Such variables show up in the
266
+ * [Discovery
267
+ * Document](https://developers.google.com/discovery/v1/reference/apis) as
268
+ * `{var}`.
269
+ *
270
+ * If a variable contains multiple path segments, such as `"{var=foo/*}"`
271
+ * or `"{var=**}"`, when such a variable is expanded into a URL path on the
272
+ * client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
273
+ * The server side does the reverse decoding, except "%2F" and "%2f" are left
274
+ * unchanged. Such variables show up in the
275
+ * [Discovery
276
+ * Document](https://developers.google.com/discovery/v1/reference/apis) as
277
+ * `{+var}`.
278
+ *
279
+ * ## Using gRPC API Service Configuration
280
+ *
281
+ * gRPC API Service Configuration (service config) is a configuration language
282
+ * for configuring a gRPC service to become a user-facing product. The
283
+ * service config is simply the YAML representation of the `google.api.Service`
284
+ * proto message.
285
+ *
286
+ * As an alternative to annotating your proto file, you can configure gRPC
287
+ * transcoding in your service config YAML files. You do this by specifying a
288
+ * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
289
+ * effect as the proto annotation. This can be particularly useful if you
290
+ * have a proto that is reused in multiple services. Note that any transcoding
291
+ * specified in the service config will override any matching transcoding
292
+ * configuration in the proto.
293
+ *
294
+ * Example:
295
+ *
296
+ * http:
297
+ * rules:
298
+ * # Selects a gRPC method and applies HttpRule to it.
299
+ * - selector: example.v1.Messaging.GetMessage
300
+ * get: /v1/messages/{message_id}/{sub.subfield}
301
+ *
302
+ * ## Special notes
303
+ *
304
+ * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
305
+ * proto to JSON conversion must follow the [proto3
306
+ * specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
307
+ *
308
+ * While the single segment variable follows the semantics of
309
+ * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
310
+ * Expansion, the multi segment variable **does not** follow RFC 6570 Section
311
+ * 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
312
+ * does not expand special characters like `?` and `#`, which would lead
313
+ * to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
314
+ * for multi segment variables.
315
+ *
316
+ * The path variables **must not** refer to any repeated or mapped field,
317
+ * because client libraries are not capable of handling such variable expansion.
318
+ *
319
+ * The path variables **must not** capture the leading "/" character. The reason
320
+ * is that the most common use case "{var}" does not capture the leading "/"
321
+ * character. For consistency, all path variables must share the same behavior.
322
+ *
323
+ * Repeated message fields must not be mapped to URL query parameters, because
324
+ * no client library can support such complicated mapping.
325
+ *
326
+ * If an API needs to use a JSON array for request or response body, it can map
327
+ * the request or response body to a repeated field. However, some gRPC
328
+ * Transcoding implementations may not support this feature.
329
+ *
330
+ * @generated from protobuf message google.api.HttpRule
331
+ */
332
+ export interface HttpRule {
333
+ /**
334
+ * Selects a method to which this rule applies.
335
+ *
336
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
337
+ * details.
338
+ *
339
+ * @generated from protobuf field: string selector = 1
340
+ */
341
+ selector: string;
342
+ /**
343
+ * Determines the URL pattern is matched by this rules. This pattern can be
344
+ * used with any of the {get|put|post|delete|patch} methods. A custom method
345
+ * can be defined using the 'custom' field.
346
+ *
347
+ * @generated from protobuf oneof: pattern
348
+ */
349
+ pattern: {
350
+ oneofKind: "get";
351
+ /**
352
+ * Maps to HTTP GET. Used for listing and getting information about
353
+ * resources.
354
+ *
355
+ * @generated from protobuf field: string get = 2
356
+ */
357
+ get: string;
358
+ } | {
359
+ oneofKind: "put";
360
+ /**
361
+ * Maps to HTTP PUT. Used for replacing a resource.
362
+ *
363
+ * @generated from protobuf field: string put = 3
364
+ */
365
+ put: string;
366
+ } | {
367
+ oneofKind: "post";
368
+ /**
369
+ * Maps to HTTP POST. Used for creating a resource or performing an action.
370
+ *
371
+ * @generated from protobuf field: string post = 4
372
+ */
373
+ post: string;
374
+ } | {
375
+ oneofKind: "delete";
376
+ /**
377
+ * Maps to HTTP DELETE. Used for deleting a resource.
378
+ *
379
+ * @generated from protobuf field: string delete = 5
380
+ */
381
+ delete: string;
382
+ } | {
383
+ oneofKind: "patch";
384
+ /**
385
+ * Maps to HTTP PATCH. Used for updating a resource.
386
+ *
387
+ * @generated from protobuf field: string patch = 6
388
+ */
389
+ patch: string;
390
+ } | {
391
+ oneofKind: "custom";
392
+ /**
393
+ * The custom pattern is used for specifying an HTTP method that is not
394
+ * included in the `pattern` field, such as HEAD, or "*" to leave the
395
+ * HTTP method unspecified for this rule. The wild-card rule is useful
396
+ * for services that provide content to Web (HTML) clients.
397
+ *
398
+ * @generated from protobuf field: google.api.CustomHttpPattern custom = 8
399
+ */
400
+ custom: CustomHttpPattern;
401
+ } | {
402
+ oneofKind: undefined;
403
+ };
404
+ /**
405
+ * The name of the request field whose value is mapped to the HTTP request
406
+ * body, or `*` for mapping all request fields not captured by the path
407
+ * pattern to the HTTP body, or omitted for not having any HTTP request body.
408
+ *
409
+ * NOTE: the referred field must be present at the top-level of the request
410
+ * message type.
411
+ *
412
+ * @generated from protobuf field: string body = 7
413
+ */
414
+ body: string;
415
+ /**
416
+ * Optional. The name of the response field whose value is mapped to the HTTP
417
+ * response body. When omitted, the entire response message will be used
418
+ * as the HTTP response body.
419
+ *
420
+ * NOTE: The referred field must be present at the top-level of the response
421
+ * message type.
422
+ *
423
+ * @generated from protobuf field: string response_body = 12
424
+ */
425
+ responseBody: string;
426
+ /**
427
+ * Additional HTTP bindings for the selector. Nested bindings must
428
+ * not contain an `additional_bindings` field themselves (that is,
429
+ * the nesting may only be one level deep).
430
+ *
431
+ * @generated from protobuf field: repeated google.api.HttpRule additional_bindings = 11
432
+ */
433
+ additionalBindings: HttpRule[];
434
+ }
435
+ /**
436
+ * A custom pattern is used for defining custom HTTP verb.
437
+ *
438
+ * @generated from protobuf message google.api.CustomHttpPattern
439
+ */
440
+ export interface CustomHttpPattern {
441
+ /**
442
+ * The name of this custom HTTP verb.
443
+ *
444
+ * @generated from protobuf field: string kind = 1
445
+ */
446
+ kind: string;
447
+ /**
448
+ * The path matched by this custom verb.
449
+ *
450
+ * @generated from protobuf field: string path = 2
451
+ */
452
+ path: string;
453
+ }
454
+ // @generated message type with reflection information, may provide speed optimized methods
455
+ class Http$Type extends MessageType<Http> {
456
+ constructor() {
457
+ super("google.api.Http", [
458
+ { no: 1, name: "rules", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => HttpRule },
459
+ { no: 2, name: "fully_decode_reserved_expansion", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
460
+ ]);
461
+ }
462
+ create(value?: PartialMessage<Http>): Http {
463
+ const message = globalThis.Object.create((this.messagePrototype!));
464
+ message.rules = [];
465
+ message.fullyDecodeReservedExpansion = false;
466
+ if (value !== undefined)
467
+ reflectionMergePartial<Http>(this, message, value);
468
+ return message;
469
+ }
470
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Http): Http {
471
+ let message = target ?? this.create(), end = reader.pos + length;
472
+ while (reader.pos < end) {
473
+ let [fieldNo, wireType] = reader.tag();
474
+ switch (fieldNo) {
475
+ case /* repeated google.api.HttpRule rules */ 1:
476
+ message.rules.push(HttpRule.internalBinaryRead(reader, reader.uint32(), options));
477
+ break;
478
+ case /* bool fully_decode_reserved_expansion */ 2:
479
+ message.fullyDecodeReservedExpansion = reader.bool();
480
+ break;
481
+ default:
482
+ let u = options.readUnknownField;
483
+ if (u === "throw")
484
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
485
+ let d = reader.skip(wireType);
486
+ if (u !== false)
487
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
488
+ }
489
+ }
490
+ return message;
491
+ }
492
+ internalBinaryWrite(message: Http, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
493
+ /* repeated google.api.HttpRule rules = 1; */
494
+ for (let i = 0; i < message.rules.length; i++)
495
+ HttpRule.internalBinaryWrite(message.rules[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
496
+ /* bool fully_decode_reserved_expansion = 2; */
497
+ if (message.fullyDecodeReservedExpansion !== false)
498
+ writer.tag(2, WireType.Varint).bool(message.fullyDecodeReservedExpansion);
499
+ let u = options.writeUnknownFields;
500
+ if (u !== false)
501
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
502
+ return writer;
503
+ }
504
+ }
505
+ /**
506
+ * @generated MessageType for protobuf message google.api.Http
507
+ */
508
+ export const Http = new Http$Type();
509
+ // @generated message type with reflection information, may provide speed optimized methods
510
+ class HttpRule$Type extends MessageType<HttpRule> {
511
+ constructor() {
512
+ super("google.api.HttpRule", [
513
+ { no: 1, name: "selector", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
514
+ { no: 2, name: "get", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ },
515
+ { no: 3, name: "put", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ },
516
+ { no: 4, name: "post", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ },
517
+ { no: 5, name: "delete", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ },
518
+ { no: 6, name: "patch", kind: "scalar", oneof: "pattern", T: 9 /*ScalarType.STRING*/ },
519
+ { no: 8, name: "custom", kind: "message", oneof: "pattern", T: () => CustomHttpPattern },
520
+ { no: 7, name: "body", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
521
+ { no: 12, name: "response_body", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
522
+ { no: 11, name: "additional_bindings", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => HttpRule }
523
+ ]);
524
+ }
525
+ create(value?: PartialMessage<HttpRule>): HttpRule {
526
+ const message = globalThis.Object.create((this.messagePrototype!));
527
+ message.selector = "";
528
+ message.pattern = { oneofKind: undefined };
529
+ message.body = "";
530
+ message.responseBody = "";
531
+ message.additionalBindings = [];
532
+ if (value !== undefined)
533
+ reflectionMergePartial<HttpRule>(this, message, value);
534
+ return message;
535
+ }
536
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HttpRule): HttpRule {
537
+ let message = target ?? this.create(), end = reader.pos + length;
538
+ while (reader.pos < end) {
539
+ let [fieldNo, wireType] = reader.tag();
540
+ switch (fieldNo) {
541
+ case /* string selector */ 1:
542
+ message.selector = reader.string();
543
+ break;
544
+ case /* string get */ 2:
545
+ message.pattern = {
546
+ oneofKind: "get",
547
+ get: reader.string()
548
+ };
549
+ break;
550
+ case /* string put */ 3:
551
+ message.pattern = {
552
+ oneofKind: "put",
553
+ put: reader.string()
554
+ };
555
+ break;
556
+ case /* string post */ 4:
557
+ message.pattern = {
558
+ oneofKind: "post",
559
+ post: reader.string()
560
+ };
561
+ break;
562
+ case /* string delete */ 5:
563
+ message.pattern = {
564
+ oneofKind: "delete",
565
+ delete: reader.string()
566
+ };
567
+ break;
568
+ case /* string patch */ 6:
569
+ message.pattern = {
570
+ oneofKind: "patch",
571
+ patch: reader.string()
572
+ };
573
+ break;
574
+ case /* google.api.CustomHttpPattern custom */ 8:
575
+ message.pattern = {
576
+ oneofKind: "custom",
577
+ custom: CustomHttpPattern.internalBinaryRead(reader, reader.uint32(), options, (message.pattern as any).custom)
578
+ };
579
+ break;
580
+ case /* string body */ 7:
581
+ message.body = reader.string();
582
+ break;
583
+ case /* string response_body */ 12:
584
+ message.responseBody = reader.string();
585
+ break;
586
+ case /* repeated google.api.HttpRule additional_bindings */ 11:
587
+ message.additionalBindings.push(HttpRule.internalBinaryRead(reader, reader.uint32(), options));
588
+ break;
589
+ default:
590
+ let u = options.readUnknownField;
591
+ if (u === "throw")
592
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
593
+ let d = reader.skip(wireType);
594
+ if (u !== false)
595
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
596
+ }
597
+ }
598
+ return message;
599
+ }
600
+ internalBinaryWrite(message: HttpRule, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
601
+ /* string selector = 1; */
602
+ if (message.selector !== "")
603
+ writer.tag(1, WireType.LengthDelimited).string(message.selector);
604
+ /* string get = 2; */
605
+ if (message.pattern.oneofKind === "get")
606
+ writer.tag(2, WireType.LengthDelimited).string(message.pattern.get);
607
+ /* string put = 3; */
608
+ if (message.pattern.oneofKind === "put")
609
+ writer.tag(3, WireType.LengthDelimited).string(message.pattern.put);
610
+ /* string post = 4; */
611
+ if (message.pattern.oneofKind === "post")
612
+ writer.tag(4, WireType.LengthDelimited).string(message.pattern.post);
613
+ /* string delete = 5; */
614
+ if (message.pattern.oneofKind === "delete")
615
+ writer.tag(5, WireType.LengthDelimited).string(message.pattern.delete);
616
+ /* string patch = 6; */
617
+ if (message.pattern.oneofKind === "patch")
618
+ writer.tag(6, WireType.LengthDelimited).string(message.pattern.patch);
619
+ /* string body = 7; */
620
+ if (message.body !== "")
621
+ writer.tag(7, WireType.LengthDelimited).string(message.body);
622
+ /* google.api.CustomHttpPattern custom = 8; */
623
+ if (message.pattern.oneofKind === "custom")
624
+ CustomHttpPattern.internalBinaryWrite(message.pattern.custom, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
625
+ /* repeated google.api.HttpRule additional_bindings = 11; */
626
+ for (let i = 0; i < message.additionalBindings.length; i++)
627
+ HttpRule.internalBinaryWrite(message.additionalBindings[i], writer.tag(11, WireType.LengthDelimited).fork(), options).join();
628
+ /* string response_body = 12; */
629
+ if (message.responseBody !== "")
630
+ writer.tag(12, WireType.LengthDelimited).string(message.responseBody);
631
+ let u = options.writeUnknownFields;
632
+ if (u !== false)
633
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
634
+ return writer;
635
+ }
636
+ }
637
+ /**
638
+ * @generated MessageType for protobuf message google.api.HttpRule
639
+ */
640
+ export const HttpRule = new HttpRule$Type();
641
+ // @generated message type with reflection information, may provide speed optimized methods
642
+ class CustomHttpPattern$Type extends MessageType<CustomHttpPattern> {
643
+ constructor() {
644
+ super("google.api.CustomHttpPattern", [
645
+ { no: 1, name: "kind", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
646
+ { no: 2, name: "path", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
647
+ ]);
648
+ }
649
+ create(value?: PartialMessage<CustomHttpPattern>): CustomHttpPattern {
650
+ const message = globalThis.Object.create((this.messagePrototype!));
651
+ message.kind = "";
652
+ message.path = "";
653
+ if (value !== undefined)
654
+ reflectionMergePartial<CustomHttpPattern>(this, message, value);
655
+ return message;
656
+ }
657
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CustomHttpPattern): CustomHttpPattern {
658
+ let message = target ?? this.create(), end = reader.pos + length;
659
+ while (reader.pos < end) {
660
+ let [fieldNo, wireType] = reader.tag();
661
+ switch (fieldNo) {
662
+ case /* string kind */ 1:
663
+ message.kind = reader.string();
664
+ break;
665
+ case /* string path */ 2:
666
+ message.path = reader.string();
667
+ break;
668
+ default:
669
+ let u = options.readUnknownField;
670
+ if (u === "throw")
671
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
672
+ let d = reader.skip(wireType);
673
+ if (u !== false)
674
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
675
+ }
676
+ }
677
+ return message;
678
+ }
679
+ internalBinaryWrite(message: CustomHttpPattern, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
680
+ /* string kind = 1; */
681
+ if (message.kind !== "")
682
+ writer.tag(1, WireType.LengthDelimited).string(message.kind);
683
+ /* string path = 2; */
684
+ if (message.path !== "")
685
+ writer.tag(2, WireType.LengthDelimited).string(message.path);
686
+ let u = options.writeUnknownFields;
687
+ if (u !== false)
688
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
689
+ return writer;
690
+ }
691
+ }
692
+ /**
693
+ * @generated MessageType for protobuf message google.api.CustomHttpPattern
694
+ */
695
+ export const CustomHttpPattern = new CustomHttpPattern$Type();