atlas.js-protos 0.1.0

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 (195) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +85 -0
  3. package/dist/filetree/index.d.ts +2 -0
  4. package/dist/filetree/index.js +8 -0
  5. package/dist/filetree/index.mjs +3 -0
  6. package/dist/filetree/query.d.ts +1 -0
  7. package/dist/filetree/query.js +13 -0
  8. package/dist/filetree/query.mjs +2 -0
  9. package/dist/filetree/tx.d.ts +1 -0
  10. package/dist/filetree/tx.js +11 -0
  11. package/dist/filetree/tx.mjs +2 -0
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.js +17 -0
  14. package/dist/index.mjs +1 -0
  15. package/dist/storage/index.d.ts +5 -0
  16. package/dist/storage/index.js +16 -0
  17. package/dist/storage/index.mjs +6 -0
  18. package/dist/storage/query.d.ts +1 -0
  19. package/dist/storage/query.js +27 -0
  20. package/dist/storage/query.mjs +2 -0
  21. package/dist/storage/tx.d.ts +1 -0
  22. package/dist/storage/tx.js +21 -0
  23. package/dist/storage/tx.mjs +2 -0
  24. package/dist/types/amino/amino.d.ts +1 -0
  25. package/dist/types/amino/amino.js +2 -0
  26. package/dist/types/amino/amino.mjs +1 -0
  27. package/dist/types/amino/bundle.d.ts +1 -0
  28. package/dist/types/amino/bundle.js +41 -0
  29. package/dist/types/amino/bundle.mjs +5 -0
  30. package/dist/types/atlas/bundle.d.ts +905 -0
  31. package/dist/types/atlas/bundle.js +98 -0
  32. package/dist/types/atlas/bundle.mjs +62 -0
  33. package/dist/types/atlas/filetree/v1/genesis.d.ts +45 -0
  34. package/dist/types/atlas/filetree/v1/genesis.js +107 -0
  35. package/dist/types/atlas/filetree/v1/genesis.mjs +71 -0
  36. package/dist/types/atlas/filetree/v1/params.d.ts +40 -0
  37. package/dist/types/atlas/filetree/v1/params.js +94 -0
  38. package/dist/types/atlas/filetree/v1/params.mjs +58 -0
  39. package/dist/types/atlas/filetree/v1/query.d.ts +330 -0
  40. package/dist/types/atlas/filetree/v1/query.js +567 -0
  41. package/dist/types/atlas/filetree/v1/query.mjs +531 -0
  42. package/dist/types/atlas/filetree/v1/query.rpc.Query.d.ts +28 -0
  43. package/dist/types/atlas/filetree/v1/query.rpc.Query.js +89 -0
  44. package/dist/types/atlas/filetree/v1/query.rpc.Query.mjs +51 -0
  45. package/dist/types/atlas/filetree/v1/query.rpc.func.d.ts +29 -0
  46. package/dist/types/atlas/filetree/v1/query.rpc.func.js +58 -0
  47. package/dist/types/atlas/filetree/v1/query.rpc.func.mjs +55 -0
  48. package/dist/types/atlas/filetree/v1/tree.d.ts +44 -0
  49. package/dist/types/atlas/filetree/v1/tree.js +124 -0
  50. package/dist/types/atlas/filetree/v1/tree.mjs +88 -0
  51. package/dist/types/atlas/filetree/v1/tx.d.ts +260 -0
  52. package/dist/types/atlas/filetree/v1/tx.js +449 -0
  53. package/dist/types/atlas/filetree/v1/tx.mjs +413 -0
  54. package/dist/types/atlas/filetree/v1/tx.rpc.func.d.ts +23 -0
  55. package/dist/types/atlas/filetree/v1/tx.rpc.func.js +34 -0
  56. package/dist/types/atlas/filetree/v1/tx.rpc.func.mjs +31 -0
  57. package/dist/types/atlas/filetree/v1/tx.rpc.msg.d.ts +22 -0
  58. package/dist/types/atlas/filetree/v1/tx.rpc.msg.js +67 -0
  59. package/dist/types/atlas/filetree/v1/tx.rpc.msg.mjs +29 -0
  60. package/dist/types/atlas/rpc.query.d.ts +49 -0
  61. package/dist/types/atlas/rpc.query.js +59 -0
  62. package/dist/types/atlas/rpc.query.mjs +22 -0
  63. package/dist/types/atlas/rpc.tx.d.ts +18 -0
  64. package/dist/types/atlas/rpc.tx.js +52 -0
  65. package/dist/types/atlas/rpc.tx.mjs +15 -0
  66. package/dist/types/atlas/storage/v1/file.d.ts +59 -0
  67. package/dist/types/atlas/storage/v1/file.js +173 -0
  68. package/dist/types/atlas/storage/v1/file.mjs +137 -0
  69. package/dist/types/atlas/storage/v1/genesis.d.ts +45 -0
  70. package/dist/types/atlas/storage/v1/genesis.js +107 -0
  71. package/dist/types/atlas/storage/v1/genesis.mjs +71 -0
  72. package/dist/types/atlas/storage/v1/params.d.ts +48 -0
  73. package/dist/types/atlas/storage/v1/params.js +127 -0
  74. package/dist/types/atlas/storage/v1/params.mjs +91 -0
  75. package/dist/types/atlas/storage/v1/proof.d.ts +145 -0
  76. package/dist/types/atlas/storage/v1/proof.js +318 -0
  77. package/dist/types/atlas/storage/v1/proof.mjs +282 -0
  78. package/dist/types/atlas/storage/v1/provider.d.ts +51 -0
  79. package/dist/types/atlas/storage/v1/provider.js +141 -0
  80. package/dist/types/atlas/storage/v1/provider.mjs +105 -0
  81. package/dist/types/atlas/storage/v1/query.d.ts +914 -0
  82. package/dist/types/atlas/storage/v1/query.js +1570 -0
  83. package/dist/types/atlas/storage/v1/query.mjs +1534 -0
  84. package/dist/types/atlas/storage/v1/query.rpc.Query.d.ts +56 -0
  85. package/dist/types/atlas/storage/v1/query.rpc.Query.js +154 -0
  86. package/dist/types/atlas/storage/v1/query.rpc.Query.mjs +116 -0
  87. package/dist/types/atlas/storage/v1/query.rpc.func.d.ts +78 -0
  88. package/dist/types/atlas/storage/v1/query.rpc.func.js +149 -0
  89. package/dist/types/atlas/storage/v1/query.rpc.func.mjs +146 -0
  90. package/dist/types/atlas/storage/v1/subscription.d.ts +55 -0
  91. package/dist/types/atlas/storage/v1/subscription.js +159 -0
  92. package/dist/types/atlas/storage/v1/subscription.mjs +123 -0
  93. package/dist/types/atlas/storage/v1/tx.d.ts +694 -0
  94. package/dist/types/atlas/storage/v1/tx.js +1203 -0
  95. package/dist/types/atlas/storage/v1/tx.mjs +1167 -0
  96. package/dist/types/atlas/storage/v1/tx.rpc.func.d.ts +56 -0
  97. package/dist/types/atlas/storage/v1/tx.rpc.func.js +77 -0
  98. package/dist/types/atlas/storage/v1/tx.rpc.func.mjs +74 -0
  99. package/dist/types/atlas/storage/v1/tx.rpc.msg.d.ts +35 -0
  100. package/dist/types/atlas/storage/v1/tx.rpc.msg.js +97 -0
  101. package/dist/types/atlas/storage/v1/tx.rpc.msg.mjs +59 -0
  102. package/dist/types/cosmos/bank/v1beta1/authz.d.ts +62 -0
  103. package/dist/types/cosmos/bank/v1beta1/authz.js +123 -0
  104. package/dist/types/cosmos/bank/v1beta1/authz.mjs +87 -0
  105. package/dist/types/cosmos/bank/v1beta1/bank.d.ts +391 -0
  106. package/dist/types/cosmos/bank/v1beta1/bank.js +626 -0
  107. package/dist/types/cosmos/bank/v1beta1/bank.mjs +590 -0
  108. package/dist/types/cosmos/bank/v1beta1/genesis.d.ts +122 -0
  109. package/dist/types/cosmos/bank/v1beta1/genesis.js +224 -0
  110. package/dist/types/cosmos/bank/v1beta1/genesis.mjs +188 -0
  111. package/dist/types/cosmos/bank/v1beta1/query.d.ts +1377 -0
  112. package/dist/types/cosmos/bank/v1beta1/query.js +2038 -0
  113. package/dist/types/cosmos/bank/v1beta1/query.mjs +2002 -0
  114. package/dist/types/cosmos/bank/v1beta1/query.rpc.Query.d.ts +119 -0
  115. package/dist/types/cosmos/bank/v1beta1/query.rpc.Query.js +174 -0
  116. package/dist/types/cosmos/bank/v1beta1/query.rpc.Query.mjs +136 -0
  117. package/dist/types/cosmos/bank/v1beta1/query.rpc.func.d.ts +129 -0
  118. package/dist/types/cosmos/bank/v1beta1/query.rpc.func.js +212 -0
  119. package/dist/types/cosmos/bank/v1beta1/query.rpc.func.mjs +209 -0
  120. package/dist/types/cosmos/bank/v1beta1/tx.d.ts +398 -0
  121. package/dist/types/cosmos/bank/v1beta1/tx.js +599 -0
  122. package/dist/types/cosmos/bank/v1beta1/tx.mjs +563 -0
  123. package/dist/types/cosmos/bank/v1beta1/tx.rpc.func.d.ts +37 -0
  124. package/dist/types/cosmos/bank/v1beta1/tx.rpc.func.js +50 -0
  125. package/dist/types/cosmos/bank/v1beta1/tx.rpc.func.mjs +47 -0
  126. package/dist/types/cosmos/bank/v1beta1/tx.rpc.msg.d.ts +34 -0
  127. package/dist/types/cosmos/bank/v1beta1/tx.rpc.msg.js +73 -0
  128. package/dist/types/cosmos/bank/v1beta1/tx.rpc.msg.mjs +35 -0
  129. package/dist/types/cosmos/base/query/v1beta1/pagination.d.ts +163 -0
  130. package/dist/types/cosmos/base/query/v1beta1/pagination.js +219 -0
  131. package/dist/types/cosmos/base/query/v1beta1/pagination.mjs +183 -0
  132. package/dist/types/cosmos/base/v1beta1/coin.d.ts +193 -0
  133. package/dist/types/cosmos/base/v1beta1/coin.js +320 -0
  134. package/dist/types/cosmos/base/v1beta1/coin.mjs +284 -0
  135. package/dist/types/cosmos/bundle.d.ts +761 -0
  136. package/dist/types/cosmos/bundle.js +97 -0
  137. package/dist/types/cosmos/bundle.mjs +61 -0
  138. package/dist/types/cosmos/msg/v1/msg.d.ts +1 -0
  139. package/dist/types/cosmos/msg/v1/msg.js +2 -0
  140. package/dist/types/cosmos/msg/v1/msg.mjs +1 -0
  141. package/dist/types/cosmos/query/v1/query.d.ts +1 -0
  142. package/dist/types/cosmos/query/v1/query.js +2 -0
  143. package/dist/types/cosmos/query/v1/query.mjs +1 -0
  144. package/dist/types/cosmos/rpc.query.d.ts +24 -0
  145. package/dist/types/cosmos/rpc.query.js +51 -0
  146. package/dist/types/cosmos/rpc.query.mjs +14 -0
  147. package/dist/types/cosmos/rpc.tx.d.ts +10 -0
  148. package/dist/types/cosmos/rpc.tx.js +44 -0
  149. package/dist/types/cosmos/rpc.tx.mjs +7 -0
  150. package/dist/types/cosmos_proto/bundle.d.ts +31 -0
  151. package/dist/types/cosmos_proto/bundle.js +41 -0
  152. package/dist/types/cosmos_proto/bundle.mjs +5 -0
  153. package/dist/types/cosmos_proto/cosmos.d.ts +144 -0
  154. package/dist/types/cosmos_proto/cosmos.js +244 -0
  155. package/dist/types/cosmos_proto/cosmos.mjs +206 -0
  156. package/dist/types/extern.d.ts +11 -0
  157. package/dist/types/extern.js +47 -0
  158. package/dist/types/extern.mjs +41 -0
  159. package/dist/types/gogoproto/bundle.d.ts +1 -0
  160. package/dist/types/gogoproto/bundle.js +41 -0
  161. package/dist/types/gogoproto/bundle.mjs +5 -0
  162. package/dist/types/gogoproto/gogo.d.ts +1 -0
  163. package/dist/types/gogoproto/gogo.js +2 -0
  164. package/dist/types/gogoproto/gogo.mjs +1 -0
  165. package/dist/types/google/api/annotations.d.ts +1 -0
  166. package/dist/types/google/api/annotations.js +2 -0
  167. package/dist/types/google/api/annotations.mjs +1 -0
  168. package/dist/types/google/api/http.d.ts +1006 -0
  169. package/dist/types/google/api/http.js +589 -0
  170. package/dist/types/google/api/http.mjs +553 -0
  171. package/dist/types/google/bundle.d.ts +545 -0
  172. package/dist/types/google/bundle.js +52 -0
  173. package/dist/types/google/bundle.mjs +16 -0
  174. package/dist/types/google/protobuf/descriptor.d.ts +2755 -0
  175. package/dist/types/google/protobuf/descriptor.js +4612 -0
  176. package/dist/types/google/protobuf/descriptor.mjs +4535 -0
  177. package/dist/types/google/protobuf/timestamp.d.ts +319 -0
  178. package/dist/types/google/protobuf/timestamp.js +197 -0
  179. package/dist/types/google/protobuf/timestamp.mjs +161 -0
  180. package/dist/types/helper-func-types.d.ts +40 -0
  181. package/dist/types/helper-func-types.js +57 -0
  182. package/dist/types/helper-func-types.mjs +53 -0
  183. package/dist/types/helpers.d.ts +56 -0
  184. package/dist/types/helpers.js +161 -0
  185. package/dist/types/helpers.mjs +110 -0
  186. package/dist/types/index.d.ts +15 -0
  187. package/dist/types/index.js +32 -0
  188. package/dist/types/index.mjs +16 -0
  189. package/dist/types/registry.d.ts +35 -0
  190. package/dist/types/registry.js +200 -0
  191. package/dist/types/registry.mjs +163 -0
  192. package/dist/types/types.d.ts +74 -0
  193. package/dist/types/types.js +8 -0
  194. package/dist/types/types.mjs +7 -0
  195. package/package.json +97 -0
@@ -0,0 +1,1006 @@
1
+ import * as _m0 from "protobufjs/minimal";
2
+ /**
3
+ * Defines the HTTP configuration for an API service. It contains a list of
4
+ * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
5
+ * to one or more HTTP REST API methods.
6
+ * @name Http
7
+ * @package google.api
8
+ * @see proto type: google.api.Http
9
+ */
10
+ export interface Http {
11
+ /**
12
+ * A list of HTTP configuration rules that apply to individual API methods.
13
+ *
14
+ * **NOTE:** All service configuration rules follow "last one wins" order.
15
+ */
16
+ rules: HttpRule[];
17
+ /**
18
+ * When set to true, URL path parameters will be fully URI-decoded except in
19
+ * cases of single segment matches in reserved expansion, where "%2F" will be
20
+ * left encoded.
21
+ *
22
+ * The default behavior is to not decode RFC 6570 reserved characters in multi
23
+ * segment matches.
24
+ */
25
+ fullyDecodeReservedExpansion: boolean;
26
+ }
27
+ export interface HttpProtoMsg {
28
+ typeUrl: "/google.api.Http";
29
+ value: Uint8Array;
30
+ }
31
+ /**
32
+ * Defines the HTTP configuration for an API service. It contains a list of
33
+ * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
34
+ * to one or more HTTP REST API methods.
35
+ * @name HttpSDKType
36
+ * @package google.api
37
+ * @see proto type: google.api.Http
38
+ */
39
+ export interface HttpSDKType {
40
+ rules: HttpRuleSDKType[];
41
+ fully_decode_reserved_expansion: boolean;
42
+ }
43
+ /**
44
+ * gRPC Transcoding
45
+ *
46
+ * gRPC Transcoding is a feature for mapping between a gRPC method and one or
47
+ * more HTTP REST endpoints. It allows developers to build a single API service
48
+ * that supports both gRPC APIs and REST APIs. Many systems, including [Google
49
+ * APIs](https://github.com/googleapis/googleapis),
50
+ * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
51
+ * Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
52
+ * and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
53
+ * and use it for large scale production services.
54
+ *
55
+ * `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
56
+ * how different portions of the gRPC request message are mapped to the URL
57
+ * path, URL query parameters, and HTTP request body. It also controls how the
58
+ * gRPC response message is mapped to the HTTP response body. `HttpRule` is
59
+ * typically specified as an `google.api.http` annotation on the gRPC method.
60
+ *
61
+ * Each mapping specifies a URL path template and an HTTP method. The path
62
+ * template may refer to one or more fields in the gRPC request message, as long
63
+ * as each field is a non-repeated field with a primitive (non-message) type.
64
+ * The path template controls how fields of the request message are mapped to
65
+ * the URL path.
66
+ *
67
+ * Example:
68
+ *
69
+ * service Messaging {
70
+ * rpc GetMessage(GetMessageRequest) returns (Message) {
71
+ * option (google.api.http) = {
72
+ * get: "/v1/{name=messages/*}"
73
+ * };
74
+ * }
75
+ * }
76
+ * message GetMessageRequest {
77
+ * string name = 1; // Mapped to URL path.
78
+ * }
79
+ * message Message {
80
+ * string text = 1; // The resource content.
81
+ * }
82
+ *
83
+ * This enables an HTTP REST to gRPC mapping as below:
84
+ *
85
+ * - HTTP: `GET /v1/messages/123456`
86
+ * - gRPC: `GetMessage(name: "messages/123456")`
87
+ *
88
+ * Any fields in the request message which are not bound by the path template
89
+ * automatically become HTTP query parameters if there is no HTTP request body.
90
+ * For example:
91
+ *
92
+ * service Messaging {
93
+ * rpc GetMessage(GetMessageRequest) returns (Message) {
94
+ * option (google.api.http) = {
95
+ * get:"/v1/messages/{message_id}"
96
+ * };
97
+ * }
98
+ * }
99
+ * message GetMessageRequest {
100
+ * message SubMessage {
101
+ * string subfield = 1;
102
+ * }
103
+ * string message_id = 1; // Mapped to URL path.
104
+ * int64 revision = 2; // Mapped to URL query parameter `revision`.
105
+ * SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
106
+ * }
107
+ *
108
+ * This enables a HTTP JSON to RPC mapping as below:
109
+ *
110
+ * - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`
111
+ * - gRPC: `GetMessage(message_id: "123456" revision: 2 sub:
112
+ * SubMessage(subfield: "foo"))`
113
+ *
114
+ * Note that fields which are mapped to URL query parameters must have a
115
+ * primitive type or a repeated primitive type or a non-repeated message type.
116
+ * In the case of a repeated type, the parameter can be repeated in the URL
117
+ * as `...?param=A&param=B`. In the case of a message type, each field of the
118
+ * message is mapped to a separate parameter, such as
119
+ * `...?foo.a=A&foo.b=B&foo.c=C`.
120
+ *
121
+ * For HTTP methods that allow a request body, the `body` field
122
+ * specifies the mapping. Consider a REST update method on the
123
+ * message resource collection:
124
+ *
125
+ * service Messaging {
126
+ * rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
127
+ * option (google.api.http) = {
128
+ * patch: "/v1/messages/{message_id}"
129
+ * body: "message"
130
+ * };
131
+ * }
132
+ * }
133
+ * message UpdateMessageRequest {
134
+ * string message_id = 1; // mapped to the URL
135
+ * Message message = 2; // mapped to the body
136
+ * }
137
+ *
138
+ * The following HTTP JSON to RPC mapping is enabled, where the
139
+ * representation of the JSON in the request body is determined by
140
+ * protos JSON encoding:
141
+ *
142
+ * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
143
+ * - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
144
+ *
145
+ * The special name `*` can be used in the body mapping to define that
146
+ * every field not bound by the path template should be mapped to the
147
+ * request body. This enables the following alternative definition of
148
+ * the update method:
149
+ *
150
+ * service Messaging {
151
+ * rpc UpdateMessage(Message) returns (Message) {
152
+ * option (google.api.http) = {
153
+ * patch: "/v1/messages/{message_id}"
154
+ * body: "*"
155
+ * };
156
+ * }
157
+ * }
158
+ * message Message {
159
+ * string message_id = 1;
160
+ * string text = 2;
161
+ * }
162
+ *
163
+ *
164
+ * The following HTTP JSON to RPC mapping is enabled:
165
+ *
166
+ * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
167
+ * - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")`
168
+ *
169
+ * Note that when using `*` in the body mapping, it is not possible to
170
+ * have HTTP parameters, as all fields not bound by the path end in
171
+ * the body. This makes this option more rarely used in practice when
172
+ * defining REST APIs. The common usage of `*` is in custom methods
173
+ * which don't use the URL at all for transferring data.
174
+ *
175
+ * It is possible to define multiple HTTP methods for one RPC by using
176
+ * the `additional_bindings` option. Example:
177
+ *
178
+ * service Messaging {
179
+ * rpc GetMessage(GetMessageRequest) returns (Message) {
180
+ * option (google.api.http) = {
181
+ * get: "/v1/messages/{message_id}"
182
+ * additional_bindings {
183
+ * get: "/v1/users/{user_id}/messages/{message_id}"
184
+ * }
185
+ * };
186
+ * }
187
+ * }
188
+ * message GetMessageRequest {
189
+ * string message_id = 1;
190
+ * string user_id = 2;
191
+ * }
192
+ *
193
+ * This enables the following two alternative HTTP JSON to RPC mappings:
194
+ *
195
+ * - HTTP: `GET /v1/messages/123456`
196
+ * - gRPC: `GetMessage(message_id: "123456")`
197
+ *
198
+ * - HTTP: `GET /v1/users/me/messages/123456`
199
+ * - gRPC: `GetMessage(user_id: "me" message_id: "123456")`
200
+ *
201
+ * Rules for HTTP mapping
202
+ *
203
+ * 1. Leaf request fields (recursive expansion nested messages in the request
204
+ * message) are classified into three categories:
205
+ * - Fields referred by the path template. They are passed via the URL path.
206
+ * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
207
+ * are passed via the HTTP
208
+ * request body.
209
+ * - All other fields are passed via the URL query parameters, and the
210
+ * parameter name is the field path in the request message. A repeated
211
+ * field can be represented as multiple query parameters under the same
212
+ * name.
213
+ * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
214
+ * query parameter, all fields
215
+ * are passed via URL path and HTTP request body.
216
+ * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
217
+ * request body, all
218
+ * fields are passed via URL path and URL query parameters.
219
+ *
220
+ * Path template syntax
221
+ *
222
+ * Template = "/" Segments [ Verb ] ;
223
+ * Segments = Segment { "/" Segment } ;
224
+ * Segment = "*" | "**" | LITERAL | Variable ;
225
+ * Variable = "{" FieldPath [ "=" Segments ] "}" ;
226
+ * FieldPath = IDENT { "." IDENT } ;
227
+ * Verb = ":" LITERAL ;
228
+ *
229
+ * The syntax `*` matches a single URL path segment. The syntax `**` matches
230
+ * zero or more URL path segments, which must be the last part of the URL path
231
+ * except the `Verb`.
232
+ *
233
+ * The syntax `Variable` matches part of the URL path as specified by its
234
+ * template. A variable template must not contain other variables. If a variable
235
+ * matches a single path segment, its template may be omitted, e.g. `{var}`
236
+ * is equivalent to `{var=*}`.
237
+ *
238
+ * The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
239
+ * contains any reserved character, such characters should be percent-encoded
240
+ * before the matching.
241
+ *
242
+ * If a variable contains exactly one path segment, such as `"{var}"` or
243
+ * `"{var=*}"`, when such a variable is expanded into a URL path on the client
244
+ * side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
245
+ * server side does the reverse decoding. Such variables show up in the
246
+ * [Discovery
247
+ * Document](https://developers.google.com/discovery/v1/reference/apis) as
248
+ * `{var}`.
249
+ *
250
+ * If a variable contains multiple path segments, such as `"{var=foo/*}"`
251
+ * or `"{var=**}"`, when such a variable is expanded into a URL path on the
252
+ * client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
253
+ * The server side does the reverse decoding, except "%2F" and "%2f" are left
254
+ * unchanged. Such variables show up in the
255
+ * [Discovery
256
+ * Document](https://developers.google.com/discovery/v1/reference/apis) as
257
+ * `{+var}`.
258
+ *
259
+ * Using gRPC API Service Configuration
260
+ *
261
+ * gRPC API Service Configuration (service config) is a configuration language
262
+ * for configuring a gRPC service to become a user-facing product. The
263
+ * service config is simply the YAML representation of the `google.api.Service`
264
+ * proto message.
265
+ *
266
+ * As an alternative to annotating your proto file, you can configure gRPC
267
+ * transcoding in your service config YAML files. You do this by specifying a
268
+ * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
269
+ * effect as the proto annotation. This can be particularly useful if you
270
+ * have a proto that is reused in multiple services. Note that any transcoding
271
+ * specified in the service config will override any matching transcoding
272
+ * configuration in the proto.
273
+ *
274
+ * The following example selects a gRPC method and applies an `HttpRule` to it:
275
+ *
276
+ * http:
277
+ * rules:
278
+ * - selector: example.v1.Messaging.GetMessage
279
+ * get: /v1/messages/{message_id}/{sub.subfield}
280
+ *
281
+ * Special notes
282
+ *
283
+ * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
284
+ * proto to JSON conversion must follow the [proto3
285
+ * specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
286
+ *
287
+ * While the single segment variable follows the semantics of
288
+ * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
289
+ * Expansion, the multi segment variable **does not** follow RFC 6570 Section
290
+ * 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
291
+ * does not expand special characters like `?` and `#`, which would lead
292
+ * to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
293
+ * for multi segment variables.
294
+ *
295
+ * The path variables **must not** refer to any repeated or mapped field,
296
+ * because client libraries are not capable of handling such variable expansion.
297
+ *
298
+ * The path variables **must not** capture the leading "/" character. The reason
299
+ * is that the most common use case "{var}" does not capture the leading "/"
300
+ * character. For consistency, all path variables must share the same behavior.
301
+ *
302
+ * Repeated message fields must not be mapped to URL query parameters, because
303
+ * no client library can support such complicated mapping.
304
+ *
305
+ * If an API needs to use a JSON array for request or response body, it can map
306
+ * the request or response body to a repeated field. However, some gRPC
307
+ * Transcoding implementations may not support this feature.
308
+ * @name HttpRule
309
+ * @package google.api
310
+ * @see proto type: google.api.HttpRule
311
+ */
312
+ export interface HttpRule {
313
+ /**
314
+ * Selects a method to which this rule applies.
315
+ *
316
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax
317
+ * details.
318
+ */
319
+ selector: string;
320
+ /**
321
+ * Maps to HTTP GET. Used for listing and getting information about
322
+ * resources.
323
+ */
324
+ get?: string;
325
+ /**
326
+ * Maps to HTTP PUT. Used for replacing a resource.
327
+ */
328
+ put?: string;
329
+ /**
330
+ * Maps to HTTP POST. Used for creating a resource or performing an action.
331
+ */
332
+ post?: string;
333
+ /**
334
+ * Maps to HTTP DELETE. Used for deleting a resource.
335
+ */
336
+ delete?: string;
337
+ /**
338
+ * Maps to HTTP PATCH. Used for updating a resource.
339
+ */
340
+ patch?: string;
341
+ /**
342
+ * The custom pattern is used for specifying an HTTP method that is not
343
+ * included in the `pattern` field, such as HEAD, or "*" to leave the
344
+ * HTTP method unspecified for this rule. The wild-card rule is useful
345
+ * for services that provide content to Web (HTML) clients.
346
+ */
347
+ custom?: CustomHttpPattern;
348
+ /**
349
+ * The name of the request field whose value is mapped to the HTTP request
350
+ * body, or `*` for mapping all request fields not captured by the path
351
+ * pattern to the HTTP body, or omitted for not having any HTTP request body.
352
+ *
353
+ * NOTE: the referred field must be present at the top-level of the request
354
+ * message type.
355
+ */
356
+ body: string;
357
+ /**
358
+ * Optional. The name of the response field whose value is mapped to the HTTP
359
+ * response body. When omitted, the entire response message will be used
360
+ * as the HTTP response body.
361
+ *
362
+ * NOTE: The referred field must be present at the top-level of the response
363
+ * message type.
364
+ */
365
+ responseBody: string;
366
+ /**
367
+ * Additional HTTP bindings for the selector. Nested bindings must
368
+ * not contain an `additional_bindings` field themselves (that is,
369
+ * the nesting may only be one level deep).
370
+ */
371
+ additionalBindings: HttpRule[];
372
+ }
373
+ export interface HttpRuleProtoMsg {
374
+ typeUrl: "/google.api.HttpRule";
375
+ value: Uint8Array;
376
+ }
377
+ /**
378
+ * gRPC Transcoding
379
+ *
380
+ * gRPC Transcoding is a feature for mapping between a gRPC method and one or
381
+ * more HTTP REST endpoints. It allows developers to build a single API service
382
+ * that supports both gRPC APIs and REST APIs. Many systems, including [Google
383
+ * APIs](https://github.com/googleapis/googleapis),
384
+ * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
385
+ * Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
386
+ * and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
387
+ * and use it for large scale production services.
388
+ *
389
+ * `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
390
+ * how different portions of the gRPC request message are mapped to the URL
391
+ * path, URL query parameters, and HTTP request body. It also controls how the
392
+ * gRPC response message is mapped to the HTTP response body. `HttpRule` is
393
+ * typically specified as an `google.api.http` annotation on the gRPC method.
394
+ *
395
+ * Each mapping specifies a URL path template and an HTTP method. The path
396
+ * template may refer to one or more fields in the gRPC request message, as long
397
+ * as each field is a non-repeated field with a primitive (non-message) type.
398
+ * The path template controls how fields of the request message are mapped to
399
+ * the URL path.
400
+ *
401
+ * Example:
402
+ *
403
+ * service Messaging {
404
+ * rpc GetMessage(GetMessageRequest) returns (Message) {
405
+ * option (google.api.http) = {
406
+ * get: "/v1/{name=messages/*}"
407
+ * };
408
+ * }
409
+ * }
410
+ * message GetMessageRequest {
411
+ * string name = 1; // Mapped to URL path.
412
+ * }
413
+ * message Message {
414
+ * string text = 1; // The resource content.
415
+ * }
416
+ *
417
+ * This enables an HTTP REST to gRPC mapping as below:
418
+ *
419
+ * - HTTP: `GET /v1/messages/123456`
420
+ * - gRPC: `GetMessage(name: "messages/123456")`
421
+ *
422
+ * Any fields in the request message which are not bound by the path template
423
+ * automatically become HTTP query parameters if there is no HTTP request body.
424
+ * For example:
425
+ *
426
+ * service Messaging {
427
+ * rpc GetMessage(GetMessageRequest) returns (Message) {
428
+ * option (google.api.http) = {
429
+ * get:"/v1/messages/{message_id}"
430
+ * };
431
+ * }
432
+ * }
433
+ * message GetMessageRequest {
434
+ * message SubMessage {
435
+ * string subfield = 1;
436
+ * }
437
+ * string message_id = 1; // Mapped to URL path.
438
+ * int64 revision = 2; // Mapped to URL query parameter `revision`.
439
+ * SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
440
+ * }
441
+ *
442
+ * This enables a HTTP JSON to RPC mapping as below:
443
+ *
444
+ * - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`
445
+ * - gRPC: `GetMessage(message_id: "123456" revision: 2 sub:
446
+ * SubMessage(subfield: "foo"))`
447
+ *
448
+ * Note that fields which are mapped to URL query parameters must have a
449
+ * primitive type or a repeated primitive type or a non-repeated message type.
450
+ * In the case of a repeated type, the parameter can be repeated in the URL
451
+ * as `...?param=A&param=B`. In the case of a message type, each field of the
452
+ * message is mapped to a separate parameter, such as
453
+ * `...?foo.a=A&foo.b=B&foo.c=C`.
454
+ *
455
+ * For HTTP methods that allow a request body, the `body` field
456
+ * specifies the mapping. Consider a REST update method on the
457
+ * message resource collection:
458
+ *
459
+ * service Messaging {
460
+ * rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
461
+ * option (google.api.http) = {
462
+ * patch: "/v1/messages/{message_id}"
463
+ * body: "message"
464
+ * };
465
+ * }
466
+ * }
467
+ * message UpdateMessageRequest {
468
+ * string message_id = 1; // mapped to the URL
469
+ * Message message = 2; // mapped to the body
470
+ * }
471
+ *
472
+ * The following HTTP JSON to RPC mapping is enabled, where the
473
+ * representation of the JSON in the request body is determined by
474
+ * protos JSON encoding:
475
+ *
476
+ * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
477
+ * - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
478
+ *
479
+ * The special name `*` can be used in the body mapping to define that
480
+ * every field not bound by the path template should be mapped to the
481
+ * request body. This enables the following alternative definition of
482
+ * the update method:
483
+ *
484
+ * service Messaging {
485
+ * rpc UpdateMessage(Message) returns (Message) {
486
+ * option (google.api.http) = {
487
+ * patch: "/v1/messages/{message_id}"
488
+ * body: "*"
489
+ * };
490
+ * }
491
+ * }
492
+ * message Message {
493
+ * string message_id = 1;
494
+ * string text = 2;
495
+ * }
496
+ *
497
+ *
498
+ * The following HTTP JSON to RPC mapping is enabled:
499
+ *
500
+ * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
501
+ * - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")`
502
+ *
503
+ * Note that when using `*` in the body mapping, it is not possible to
504
+ * have HTTP parameters, as all fields not bound by the path end in
505
+ * the body. This makes this option more rarely used in practice when
506
+ * defining REST APIs. The common usage of `*` is in custom methods
507
+ * which don't use the URL at all for transferring data.
508
+ *
509
+ * It is possible to define multiple HTTP methods for one RPC by using
510
+ * the `additional_bindings` option. Example:
511
+ *
512
+ * service Messaging {
513
+ * rpc GetMessage(GetMessageRequest) returns (Message) {
514
+ * option (google.api.http) = {
515
+ * get: "/v1/messages/{message_id}"
516
+ * additional_bindings {
517
+ * get: "/v1/users/{user_id}/messages/{message_id}"
518
+ * }
519
+ * };
520
+ * }
521
+ * }
522
+ * message GetMessageRequest {
523
+ * string message_id = 1;
524
+ * string user_id = 2;
525
+ * }
526
+ *
527
+ * This enables the following two alternative HTTP JSON to RPC mappings:
528
+ *
529
+ * - HTTP: `GET /v1/messages/123456`
530
+ * - gRPC: `GetMessage(message_id: "123456")`
531
+ *
532
+ * - HTTP: `GET /v1/users/me/messages/123456`
533
+ * - gRPC: `GetMessage(user_id: "me" message_id: "123456")`
534
+ *
535
+ * Rules for HTTP mapping
536
+ *
537
+ * 1. Leaf request fields (recursive expansion nested messages in the request
538
+ * message) are classified into three categories:
539
+ * - Fields referred by the path template. They are passed via the URL path.
540
+ * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
541
+ * are passed via the HTTP
542
+ * request body.
543
+ * - All other fields are passed via the URL query parameters, and the
544
+ * parameter name is the field path in the request message. A repeated
545
+ * field can be represented as multiple query parameters under the same
546
+ * name.
547
+ * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
548
+ * query parameter, all fields
549
+ * are passed via URL path and HTTP request body.
550
+ * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
551
+ * request body, all
552
+ * fields are passed via URL path and URL query parameters.
553
+ *
554
+ * Path template syntax
555
+ *
556
+ * Template = "/" Segments [ Verb ] ;
557
+ * Segments = Segment { "/" Segment } ;
558
+ * Segment = "*" | "**" | LITERAL | Variable ;
559
+ * Variable = "{" FieldPath [ "=" Segments ] "}" ;
560
+ * FieldPath = IDENT { "." IDENT } ;
561
+ * Verb = ":" LITERAL ;
562
+ *
563
+ * The syntax `*` matches a single URL path segment. The syntax `**` matches
564
+ * zero or more URL path segments, which must be the last part of the URL path
565
+ * except the `Verb`.
566
+ *
567
+ * The syntax `Variable` matches part of the URL path as specified by its
568
+ * template. A variable template must not contain other variables. If a variable
569
+ * matches a single path segment, its template may be omitted, e.g. `{var}`
570
+ * is equivalent to `{var=*}`.
571
+ *
572
+ * The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
573
+ * contains any reserved character, such characters should be percent-encoded
574
+ * before the matching.
575
+ *
576
+ * If a variable contains exactly one path segment, such as `"{var}"` or
577
+ * `"{var=*}"`, when such a variable is expanded into a URL path on the client
578
+ * side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
579
+ * server side does the reverse decoding. Such variables show up in the
580
+ * [Discovery
581
+ * Document](https://developers.google.com/discovery/v1/reference/apis) as
582
+ * `{var}`.
583
+ *
584
+ * If a variable contains multiple path segments, such as `"{var=foo/*}"`
585
+ * or `"{var=**}"`, when such a variable is expanded into a URL path on the
586
+ * client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
587
+ * The server side does the reverse decoding, except "%2F" and "%2f" are left
588
+ * unchanged. Such variables show up in the
589
+ * [Discovery
590
+ * Document](https://developers.google.com/discovery/v1/reference/apis) as
591
+ * `{+var}`.
592
+ *
593
+ * Using gRPC API Service Configuration
594
+ *
595
+ * gRPC API Service Configuration (service config) is a configuration language
596
+ * for configuring a gRPC service to become a user-facing product. The
597
+ * service config is simply the YAML representation of the `google.api.Service`
598
+ * proto message.
599
+ *
600
+ * As an alternative to annotating your proto file, you can configure gRPC
601
+ * transcoding in your service config YAML files. You do this by specifying a
602
+ * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
603
+ * effect as the proto annotation. This can be particularly useful if you
604
+ * have a proto that is reused in multiple services. Note that any transcoding
605
+ * specified in the service config will override any matching transcoding
606
+ * configuration in the proto.
607
+ *
608
+ * The following example selects a gRPC method and applies an `HttpRule` to it:
609
+ *
610
+ * http:
611
+ * rules:
612
+ * - selector: example.v1.Messaging.GetMessage
613
+ * get: /v1/messages/{message_id}/{sub.subfield}
614
+ *
615
+ * Special notes
616
+ *
617
+ * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
618
+ * proto to JSON conversion must follow the [proto3
619
+ * specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
620
+ *
621
+ * While the single segment variable follows the semantics of
622
+ * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
623
+ * Expansion, the multi segment variable **does not** follow RFC 6570 Section
624
+ * 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
625
+ * does not expand special characters like `?` and `#`, which would lead
626
+ * to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
627
+ * for multi segment variables.
628
+ *
629
+ * The path variables **must not** refer to any repeated or mapped field,
630
+ * because client libraries are not capable of handling such variable expansion.
631
+ *
632
+ * The path variables **must not** capture the leading "/" character. The reason
633
+ * is that the most common use case "{var}" does not capture the leading "/"
634
+ * character. For consistency, all path variables must share the same behavior.
635
+ *
636
+ * Repeated message fields must not be mapped to URL query parameters, because
637
+ * no client library can support such complicated mapping.
638
+ *
639
+ * If an API needs to use a JSON array for request or response body, it can map
640
+ * the request or response body to a repeated field. However, some gRPC
641
+ * Transcoding implementations may not support this feature.
642
+ * @name HttpRuleSDKType
643
+ * @package google.api
644
+ * @see proto type: google.api.HttpRule
645
+ */
646
+ export interface HttpRuleSDKType {
647
+ selector: string;
648
+ get?: string;
649
+ put?: string;
650
+ post?: string;
651
+ delete?: string;
652
+ patch?: string;
653
+ custom?: CustomHttpPatternSDKType;
654
+ body: string;
655
+ response_body: string;
656
+ additional_bindings: HttpRuleSDKType[];
657
+ }
658
+ /**
659
+ * A custom pattern is used for defining custom HTTP verb.
660
+ * @name CustomHttpPattern
661
+ * @package google.api
662
+ * @see proto type: google.api.CustomHttpPattern
663
+ */
664
+ export interface CustomHttpPattern {
665
+ /**
666
+ * The name of this custom HTTP verb.
667
+ */
668
+ kind: string;
669
+ /**
670
+ * The path matched by this custom verb.
671
+ */
672
+ path: string;
673
+ }
674
+ export interface CustomHttpPatternProtoMsg {
675
+ typeUrl: "/google.api.CustomHttpPattern";
676
+ value: Uint8Array;
677
+ }
678
+ /**
679
+ * A custom pattern is used for defining custom HTTP verb.
680
+ * @name CustomHttpPatternSDKType
681
+ * @package google.api
682
+ * @see proto type: google.api.CustomHttpPattern
683
+ */
684
+ export interface CustomHttpPatternSDKType {
685
+ kind: string;
686
+ path: string;
687
+ }
688
+ /**
689
+ * Defines the HTTP configuration for an API service. It contains a list of
690
+ * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
691
+ * to one or more HTTP REST API methods.
692
+ * @name Http
693
+ * @package google.api
694
+ * @see proto type: google.api.Http
695
+ */
696
+ export declare const Http: {
697
+ typeUrl: string;
698
+ is(o: any): o is Http;
699
+ isSDK(o: any): o is HttpSDKType;
700
+ encode(message: Http, writer?: _m0.Writer): _m0.Writer;
701
+ decode(input: _m0.Reader | Uint8Array, length?: number): Http;
702
+ fromPartial(object: Partial<Http>): Http;
703
+ fromProtoMsg(message: HttpProtoMsg): Http;
704
+ toProto(message: Http): Uint8Array;
705
+ toProtoMsg(message: Http): HttpProtoMsg;
706
+ registerTypeUrl(): void;
707
+ };
708
+ /**
709
+ * gRPC Transcoding
710
+ *
711
+ * gRPC Transcoding is a feature for mapping between a gRPC method and one or
712
+ * more HTTP REST endpoints. It allows developers to build a single API service
713
+ * that supports both gRPC APIs and REST APIs. Many systems, including [Google
714
+ * APIs](https://github.com/googleapis/googleapis),
715
+ * [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
716
+ * Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
717
+ * and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
718
+ * and use it for large scale production services.
719
+ *
720
+ * `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
721
+ * how different portions of the gRPC request message are mapped to the URL
722
+ * path, URL query parameters, and HTTP request body. It also controls how the
723
+ * gRPC response message is mapped to the HTTP response body. `HttpRule` is
724
+ * typically specified as an `google.api.http` annotation on the gRPC method.
725
+ *
726
+ * Each mapping specifies a URL path template and an HTTP method. The path
727
+ * template may refer to one or more fields in the gRPC request message, as long
728
+ * as each field is a non-repeated field with a primitive (non-message) type.
729
+ * The path template controls how fields of the request message are mapped to
730
+ * the URL path.
731
+ *
732
+ * Example:
733
+ *
734
+ * service Messaging {
735
+ * rpc GetMessage(GetMessageRequest) returns (Message) {
736
+ * option (google.api.http) = {
737
+ * get: "/v1/{name=messages/*}"
738
+ * };
739
+ * }
740
+ * }
741
+ * message GetMessageRequest {
742
+ * string name = 1; // Mapped to URL path.
743
+ * }
744
+ * message Message {
745
+ * string text = 1; // The resource content.
746
+ * }
747
+ *
748
+ * This enables an HTTP REST to gRPC mapping as below:
749
+ *
750
+ * - HTTP: `GET /v1/messages/123456`
751
+ * - gRPC: `GetMessage(name: "messages/123456")`
752
+ *
753
+ * Any fields in the request message which are not bound by the path template
754
+ * automatically become HTTP query parameters if there is no HTTP request body.
755
+ * For example:
756
+ *
757
+ * service Messaging {
758
+ * rpc GetMessage(GetMessageRequest) returns (Message) {
759
+ * option (google.api.http) = {
760
+ * get:"/v1/messages/{message_id}"
761
+ * };
762
+ * }
763
+ * }
764
+ * message GetMessageRequest {
765
+ * message SubMessage {
766
+ * string subfield = 1;
767
+ * }
768
+ * string message_id = 1; // Mapped to URL path.
769
+ * int64 revision = 2; // Mapped to URL query parameter `revision`.
770
+ * SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
771
+ * }
772
+ *
773
+ * This enables a HTTP JSON to RPC mapping as below:
774
+ *
775
+ * - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`
776
+ * - gRPC: `GetMessage(message_id: "123456" revision: 2 sub:
777
+ * SubMessage(subfield: "foo"))`
778
+ *
779
+ * Note that fields which are mapped to URL query parameters must have a
780
+ * primitive type or a repeated primitive type or a non-repeated message type.
781
+ * In the case of a repeated type, the parameter can be repeated in the URL
782
+ * as `...?param=A&param=B`. In the case of a message type, each field of the
783
+ * message is mapped to a separate parameter, such as
784
+ * `...?foo.a=A&foo.b=B&foo.c=C`.
785
+ *
786
+ * For HTTP methods that allow a request body, the `body` field
787
+ * specifies the mapping. Consider a REST update method on the
788
+ * message resource collection:
789
+ *
790
+ * service Messaging {
791
+ * rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
792
+ * option (google.api.http) = {
793
+ * patch: "/v1/messages/{message_id}"
794
+ * body: "message"
795
+ * };
796
+ * }
797
+ * }
798
+ * message UpdateMessageRequest {
799
+ * string message_id = 1; // mapped to the URL
800
+ * Message message = 2; // mapped to the body
801
+ * }
802
+ *
803
+ * The following HTTP JSON to RPC mapping is enabled, where the
804
+ * representation of the JSON in the request body is determined by
805
+ * protos JSON encoding:
806
+ *
807
+ * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
808
+ * - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
809
+ *
810
+ * The special name `*` can be used in the body mapping to define that
811
+ * every field not bound by the path template should be mapped to the
812
+ * request body. This enables the following alternative definition of
813
+ * the update method:
814
+ *
815
+ * service Messaging {
816
+ * rpc UpdateMessage(Message) returns (Message) {
817
+ * option (google.api.http) = {
818
+ * patch: "/v1/messages/{message_id}"
819
+ * body: "*"
820
+ * };
821
+ * }
822
+ * }
823
+ * message Message {
824
+ * string message_id = 1;
825
+ * string text = 2;
826
+ * }
827
+ *
828
+ *
829
+ * The following HTTP JSON to RPC mapping is enabled:
830
+ *
831
+ * - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
832
+ * - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")`
833
+ *
834
+ * Note that when using `*` in the body mapping, it is not possible to
835
+ * have HTTP parameters, as all fields not bound by the path end in
836
+ * the body. This makes this option more rarely used in practice when
837
+ * defining REST APIs. The common usage of `*` is in custom methods
838
+ * which don't use the URL at all for transferring data.
839
+ *
840
+ * It is possible to define multiple HTTP methods for one RPC by using
841
+ * the `additional_bindings` option. Example:
842
+ *
843
+ * service Messaging {
844
+ * rpc GetMessage(GetMessageRequest) returns (Message) {
845
+ * option (google.api.http) = {
846
+ * get: "/v1/messages/{message_id}"
847
+ * additional_bindings {
848
+ * get: "/v1/users/{user_id}/messages/{message_id}"
849
+ * }
850
+ * };
851
+ * }
852
+ * }
853
+ * message GetMessageRequest {
854
+ * string message_id = 1;
855
+ * string user_id = 2;
856
+ * }
857
+ *
858
+ * This enables the following two alternative HTTP JSON to RPC mappings:
859
+ *
860
+ * - HTTP: `GET /v1/messages/123456`
861
+ * - gRPC: `GetMessage(message_id: "123456")`
862
+ *
863
+ * - HTTP: `GET /v1/users/me/messages/123456`
864
+ * - gRPC: `GetMessage(user_id: "me" message_id: "123456")`
865
+ *
866
+ * Rules for HTTP mapping
867
+ *
868
+ * 1. Leaf request fields (recursive expansion nested messages in the request
869
+ * message) are classified into three categories:
870
+ * - Fields referred by the path template. They are passed via the URL path.
871
+ * - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
872
+ * are passed via the HTTP
873
+ * request body.
874
+ * - All other fields are passed via the URL query parameters, and the
875
+ * parameter name is the field path in the request message. A repeated
876
+ * field can be represented as multiple query parameters under the same
877
+ * name.
878
+ * 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
879
+ * query parameter, all fields
880
+ * are passed via URL path and HTTP request body.
881
+ * 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
882
+ * request body, all
883
+ * fields are passed via URL path and URL query parameters.
884
+ *
885
+ * Path template syntax
886
+ *
887
+ * Template = "/" Segments [ Verb ] ;
888
+ * Segments = Segment { "/" Segment } ;
889
+ * Segment = "*" | "**" | LITERAL | Variable ;
890
+ * Variable = "{" FieldPath [ "=" Segments ] "}" ;
891
+ * FieldPath = IDENT { "." IDENT } ;
892
+ * Verb = ":" LITERAL ;
893
+ *
894
+ * The syntax `*` matches a single URL path segment. The syntax `**` matches
895
+ * zero or more URL path segments, which must be the last part of the URL path
896
+ * except the `Verb`.
897
+ *
898
+ * The syntax `Variable` matches part of the URL path as specified by its
899
+ * template. A variable template must not contain other variables. If a variable
900
+ * matches a single path segment, its template may be omitted, e.g. `{var}`
901
+ * is equivalent to `{var=*}`.
902
+ *
903
+ * The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
904
+ * contains any reserved character, such characters should be percent-encoded
905
+ * before the matching.
906
+ *
907
+ * If a variable contains exactly one path segment, such as `"{var}"` or
908
+ * `"{var=*}"`, when such a variable is expanded into a URL path on the client
909
+ * side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
910
+ * server side does the reverse decoding. Such variables show up in the
911
+ * [Discovery
912
+ * Document](https://developers.google.com/discovery/v1/reference/apis) as
913
+ * `{var}`.
914
+ *
915
+ * If a variable contains multiple path segments, such as `"{var=foo/*}"`
916
+ * or `"{var=**}"`, when such a variable is expanded into a URL path on the
917
+ * client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
918
+ * The server side does the reverse decoding, except "%2F" and "%2f" are left
919
+ * unchanged. Such variables show up in the
920
+ * [Discovery
921
+ * Document](https://developers.google.com/discovery/v1/reference/apis) as
922
+ * `{+var}`.
923
+ *
924
+ * Using gRPC API Service Configuration
925
+ *
926
+ * gRPC API Service Configuration (service config) is a configuration language
927
+ * for configuring a gRPC service to become a user-facing product. The
928
+ * service config is simply the YAML representation of the `google.api.Service`
929
+ * proto message.
930
+ *
931
+ * As an alternative to annotating your proto file, you can configure gRPC
932
+ * transcoding in your service config YAML files. You do this by specifying a
933
+ * `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
934
+ * effect as the proto annotation. This can be particularly useful if you
935
+ * have a proto that is reused in multiple services. Note that any transcoding
936
+ * specified in the service config will override any matching transcoding
937
+ * configuration in the proto.
938
+ *
939
+ * The following example selects a gRPC method and applies an `HttpRule` to it:
940
+ *
941
+ * http:
942
+ * rules:
943
+ * - selector: example.v1.Messaging.GetMessage
944
+ * get: /v1/messages/{message_id}/{sub.subfield}
945
+ *
946
+ * Special notes
947
+ *
948
+ * When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
949
+ * proto to JSON conversion must follow the [proto3
950
+ * specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
951
+ *
952
+ * While the single segment variable follows the semantics of
953
+ * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
954
+ * Expansion, the multi segment variable **does not** follow RFC 6570 Section
955
+ * 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
956
+ * does not expand special characters like `?` and `#`, which would lead
957
+ * to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
958
+ * for multi segment variables.
959
+ *
960
+ * The path variables **must not** refer to any repeated or mapped field,
961
+ * because client libraries are not capable of handling such variable expansion.
962
+ *
963
+ * The path variables **must not** capture the leading "/" character. The reason
964
+ * is that the most common use case "{var}" does not capture the leading "/"
965
+ * character. For consistency, all path variables must share the same behavior.
966
+ *
967
+ * Repeated message fields must not be mapped to URL query parameters, because
968
+ * no client library can support such complicated mapping.
969
+ *
970
+ * If an API needs to use a JSON array for request or response body, it can map
971
+ * the request or response body to a repeated field. However, some gRPC
972
+ * Transcoding implementations may not support this feature.
973
+ * @name HttpRule
974
+ * @package google.api
975
+ * @see proto type: google.api.HttpRule
976
+ */
977
+ export declare const HttpRule: {
978
+ typeUrl: string;
979
+ is(o: any): o is HttpRule;
980
+ isSDK(o: any): o is HttpRuleSDKType;
981
+ encode(message: HttpRule, writer?: _m0.Writer): _m0.Writer;
982
+ decode(input: _m0.Reader | Uint8Array, length?: number): HttpRule;
983
+ fromPartial(object: Partial<HttpRule>): HttpRule;
984
+ fromProtoMsg(message: HttpRuleProtoMsg): HttpRule;
985
+ toProto(message: HttpRule): Uint8Array;
986
+ toProtoMsg(message: HttpRule): HttpRuleProtoMsg;
987
+ registerTypeUrl(): void;
988
+ };
989
+ /**
990
+ * A custom pattern is used for defining custom HTTP verb.
991
+ * @name CustomHttpPattern
992
+ * @package google.api
993
+ * @see proto type: google.api.CustomHttpPattern
994
+ */
995
+ export declare const CustomHttpPattern: {
996
+ typeUrl: string;
997
+ is(o: any): o is CustomHttpPattern;
998
+ isSDK(o: any): o is CustomHttpPatternSDKType;
999
+ encode(message: CustomHttpPattern, writer?: _m0.Writer): _m0.Writer;
1000
+ decode(input: _m0.Reader | Uint8Array, length?: number): CustomHttpPattern;
1001
+ fromPartial(object: Partial<CustomHttpPattern>): CustomHttpPattern;
1002
+ fromProtoMsg(message: CustomHttpPatternProtoMsg): CustomHttpPattern;
1003
+ toProto(message: CustomHttpPattern): Uint8Array;
1004
+ toProtoMsg(message: CustomHttpPattern): CustomHttpPatternProtoMsg;
1005
+ registerTypeUrl(): void;
1006
+ };