http.pb.go 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782
  1. // Copyright 2023 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. // Code generated by protoc-gen-go. DO NOT EDIT.
  15. // versions:
  16. // protoc-gen-go v1.26.0
  17. // protoc v3.21.9
  18. // source: google/api/http.proto
  19. package annotations
  20. import (
  21. reflect "reflect"
  22. sync "sync"
  23. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  24. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  25. )
  26. const (
  27. // Verify that this generated code is sufficiently up-to-date.
  28. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  29. // Verify that runtime/protoimpl is sufficiently up-to-date.
  30. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  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. type Http struct {
  36. state protoimpl.MessageState
  37. sizeCache protoimpl.SizeCache
  38. unknownFields protoimpl.UnknownFields
  39. // A list of HTTP configuration rules that apply to individual API methods.
  40. //
  41. // **NOTE:** All service configuration rules follow "last one wins" order.
  42. Rules []*HttpRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
  43. // When set to true, URL path parameters will be fully URI-decoded except in
  44. // cases of single segment matches in reserved expansion, where "%2F" will be
  45. // left encoded.
  46. //
  47. // The default behavior is to not decode RFC 6570 reserved characters in multi
  48. // segment matches.
  49. FullyDecodeReservedExpansion bool `protobuf:"varint,2,opt,name=fully_decode_reserved_expansion,json=fullyDecodeReservedExpansion,proto3" json:"fully_decode_reserved_expansion,omitempty"`
  50. }
  51. func (x *Http) Reset() {
  52. *x = Http{}
  53. if protoimpl.UnsafeEnabled {
  54. mi := &file_google_api_http_proto_msgTypes[0]
  55. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  56. ms.StoreMessageInfo(mi)
  57. }
  58. }
  59. func (x *Http) String() string {
  60. return protoimpl.X.MessageStringOf(x)
  61. }
  62. func (*Http) ProtoMessage() {}
  63. func (x *Http) ProtoReflect() protoreflect.Message {
  64. mi := &file_google_api_http_proto_msgTypes[0]
  65. if protoimpl.UnsafeEnabled && x != nil {
  66. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  67. if ms.LoadMessageInfo() == nil {
  68. ms.StoreMessageInfo(mi)
  69. }
  70. return ms
  71. }
  72. return mi.MessageOf(x)
  73. }
  74. // Deprecated: Use Http.ProtoReflect.Descriptor instead.
  75. func (*Http) Descriptor() ([]byte, []int) {
  76. return file_google_api_http_proto_rawDescGZIP(), []int{0}
  77. }
  78. func (x *Http) GetRules() []*HttpRule {
  79. if x != nil {
  80. return x.Rules
  81. }
  82. return nil
  83. }
  84. func (x *Http) GetFullyDecodeReservedExpansion() bool {
  85. if x != nil {
  86. return x.FullyDecodeReservedExpansion
  87. }
  88. return false
  89. }
  90. // # gRPC Transcoding
  91. //
  92. // gRPC Transcoding is a feature for mapping between a gRPC method and one or
  93. // more HTTP REST endpoints. It allows developers to build a single API service
  94. // that supports both gRPC APIs and REST APIs. Many systems, including [Google
  95. // APIs](https://github.com/googleapis/googleapis),
  96. // [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
  97. // Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
  98. // and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
  99. // and use it for large scale production services.
  100. //
  101. // `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
  102. // how different portions of the gRPC request message are mapped to the URL
  103. // path, URL query parameters, and HTTP request body. It also controls how the
  104. // gRPC response message is mapped to the HTTP response body. `HttpRule` is
  105. // typically specified as an `google.api.http` annotation on the gRPC method.
  106. //
  107. // Each mapping specifies a URL path template and an HTTP method. The path
  108. // template may refer to one or more fields in the gRPC request message, as long
  109. // as each field is a non-repeated field with a primitive (non-message) type.
  110. // The path template controls how fields of the request message are mapped to
  111. // the URL path.
  112. //
  113. // Example:
  114. //
  115. // service Messaging {
  116. // rpc GetMessage(GetMessageRequest) returns (Message) {
  117. // option (google.api.http) = {
  118. // get: "/v1/{name=messages/*}"
  119. // };
  120. // }
  121. // }
  122. // message GetMessageRequest {
  123. // string name = 1; // Mapped to URL path.
  124. // }
  125. // message Message {
  126. // string text = 1; // The resource content.
  127. // }
  128. //
  129. // This enables an HTTP REST to gRPC mapping as below:
  130. //
  131. // HTTP | gRPC
  132. // -----|-----
  133. // `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")`
  134. //
  135. // Any fields in the request message which are not bound by the path template
  136. // automatically become HTTP query parameters if there is no HTTP request body.
  137. // For example:
  138. //
  139. // service Messaging {
  140. // rpc GetMessage(GetMessageRequest) returns (Message) {
  141. // option (google.api.http) = {
  142. // get:"/v1/messages/{message_id}"
  143. // };
  144. // }
  145. // }
  146. // message GetMessageRequest {
  147. // message SubMessage {
  148. // string subfield = 1;
  149. // }
  150. // string message_id = 1; // Mapped to URL path.
  151. // int64 revision = 2; // Mapped to URL query parameter `revision`.
  152. // SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
  153. // }
  154. //
  155. // This enables a HTTP JSON to RPC mapping as below:
  156. //
  157. // HTTP | gRPC
  158. // -----|-----
  159. // `GET /v1/messages/123456?revision=2&sub.subfield=foo` |
  160. // `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield:
  161. // "foo"))`
  162. //
  163. // Note that fields which are mapped to URL query parameters must have a
  164. // primitive type or a repeated primitive type or a non-repeated message type.
  165. // In the case of a repeated type, the parameter can be repeated in the URL
  166. // as `...?param=A&param=B`. In the case of a message type, each field of the
  167. // message is mapped to a separate parameter, such as
  168. // `...?foo.a=A&foo.b=B&foo.c=C`.
  169. //
  170. // For HTTP methods that allow a request body, the `body` field
  171. // specifies the mapping. Consider a REST update method on the
  172. // message resource collection:
  173. //
  174. // service Messaging {
  175. // rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
  176. // option (google.api.http) = {
  177. // patch: "/v1/messages/{message_id}"
  178. // body: "message"
  179. // };
  180. // }
  181. // }
  182. // message UpdateMessageRequest {
  183. // string message_id = 1; // mapped to the URL
  184. // Message message = 2; // mapped to the body
  185. // }
  186. //
  187. // The following HTTP JSON to RPC mapping is enabled, where the
  188. // representation of the JSON in the request body is determined by
  189. // protos JSON encoding:
  190. //
  191. // HTTP | gRPC
  192. // -----|-----
  193. // `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
  194. // "123456" message { text: "Hi!" })`
  195. //
  196. // The special name `*` can be used in the body mapping to define that
  197. // every field not bound by the path template should be mapped to the
  198. // request body. This enables the following alternative definition of
  199. // the update method:
  200. //
  201. // service Messaging {
  202. // rpc UpdateMessage(Message) returns (Message) {
  203. // option (google.api.http) = {
  204. // patch: "/v1/messages/{message_id}"
  205. // body: "*"
  206. // };
  207. // }
  208. // }
  209. // message Message {
  210. // string message_id = 1;
  211. // string text = 2;
  212. // }
  213. //
  214. // The following HTTP JSON to RPC mapping is enabled:
  215. //
  216. // HTTP | gRPC
  217. // -----|-----
  218. // `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
  219. // "123456" text: "Hi!")`
  220. //
  221. // Note that when using `*` in the body mapping, it is not possible to
  222. // have HTTP parameters, as all fields not bound by the path end in
  223. // the body. This makes this option more rarely used in practice when
  224. // defining REST APIs. The common usage of `*` is in custom methods
  225. // which don't use the URL at all for transferring data.
  226. //
  227. // It is possible to define multiple HTTP methods for one RPC by using
  228. // the `additional_bindings` option. Example:
  229. //
  230. // service Messaging {
  231. // rpc GetMessage(GetMessageRequest) returns (Message) {
  232. // option (google.api.http) = {
  233. // get: "/v1/messages/{message_id}"
  234. // additional_bindings {
  235. // get: "/v1/users/{user_id}/messages/{message_id}"
  236. // }
  237. // };
  238. // }
  239. // }
  240. // message GetMessageRequest {
  241. // string message_id = 1;
  242. // string user_id = 2;
  243. // }
  244. //
  245. // This enables the following two alternative HTTP JSON to RPC mappings:
  246. //
  247. // HTTP | gRPC
  248. // -----|-----
  249. // `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
  250. // `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id:
  251. // "123456")`
  252. //
  253. // ## Rules for HTTP mapping
  254. //
  255. // 1. Leaf request fields (recursive expansion nested messages in the request
  256. // message) are classified into three categories:
  257. // - Fields referred by the path template. They are passed via the URL path.
  258. // - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
  259. // are passed via the HTTP
  260. // request body.
  261. // - All other fields are passed via the URL query parameters, and the
  262. // parameter name is the field path in the request message. A repeated
  263. // field can be represented as multiple query parameters under the same
  264. // name.
  265. // 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
  266. // query parameter, all fields
  267. // are passed via URL path and HTTP request body.
  268. // 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
  269. // request body, all
  270. // fields are passed via URL path and URL query parameters.
  271. //
  272. // ### Path template syntax
  273. //
  274. // Template = "/" Segments [ Verb ] ;
  275. // Segments = Segment { "/" Segment } ;
  276. // Segment = "*" | "**" | LITERAL | Variable ;
  277. // Variable = "{" FieldPath [ "=" Segments ] "}" ;
  278. // FieldPath = IDENT { "." IDENT } ;
  279. // Verb = ":" LITERAL ;
  280. //
  281. // The syntax `*` matches a single URL path segment. The syntax `**` matches
  282. // zero or more URL path segments, which must be the last part of the URL path
  283. // except the `Verb`.
  284. //
  285. // The syntax `Variable` matches part of the URL path as specified by its
  286. // template. A variable template must not contain other variables. If a variable
  287. // matches a single path segment, its template may be omitted, e.g. `{var}`
  288. // is equivalent to `{var=*}`.
  289. //
  290. // The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
  291. // contains any reserved character, such characters should be percent-encoded
  292. // before the matching.
  293. //
  294. // If a variable contains exactly one path segment, such as `"{var}"` or
  295. // `"{var=*}"`, when such a variable is expanded into a URL path on the client
  296. // side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
  297. // server side does the reverse decoding. Such variables show up in the
  298. // [Discovery
  299. // Document](https://developers.google.com/discovery/v1/reference/apis) as
  300. // `{var}`.
  301. //
  302. // If a variable contains multiple path segments, such as `"{var=foo/*}"`
  303. // or `"{var=**}"`, when such a variable is expanded into a URL path on the
  304. // client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
  305. // The server side does the reverse decoding, except "%2F" and "%2f" are left
  306. // unchanged. Such variables show up in the
  307. // [Discovery
  308. // Document](https://developers.google.com/discovery/v1/reference/apis) as
  309. // `{+var}`.
  310. //
  311. // ## Using gRPC API Service Configuration
  312. //
  313. // gRPC API Service Configuration (service config) is a configuration language
  314. // for configuring a gRPC service to become a user-facing product. The
  315. // service config is simply the YAML representation of the `google.api.Service`
  316. // proto message.
  317. //
  318. // As an alternative to annotating your proto file, you can configure gRPC
  319. // transcoding in your service config YAML files. You do this by specifying a
  320. // `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
  321. // effect as the proto annotation. This can be particularly useful if you
  322. // have a proto that is reused in multiple services. Note that any transcoding
  323. // specified in the service config will override any matching transcoding
  324. // configuration in the proto.
  325. //
  326. // Example:
  327. //
  328. // http:
  329. // rules:
  330. // # Selects a gRPC method and applies HttpRule to it.
  331. // - selector: example.v1.Messaging.GetMessage
  332. // get: /v1/messages/{message_id}/{sub.subfield}
  333. //
  334. // ## Special notes
  335. //
  336. // When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
  337. // proto to JSON conversion must follow the [proto3
  338. // specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
  339. //
  340. // While the single segment variable follows the semantics of
  341. // [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
  342. // Expansion, the multi segment variable **does not** follow RFC 6570 Section
  343. // 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
  344. // does not expand special characters like `?` and `#`, which would lead
  345. // to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
  346. // for multi segment variables.
  347. //
  348. // The path variables **must not** refer to any repeated or mapped field,
  349. // because client libraries are not capable of handling such variable expansion.
  350. //
  351. // The path variables **must not** capture the leading "/" character. The reason
  352. // is that the most common use case "{var}" does not capture the leading "/"
  353. // character. For consistency, all path variables must share the same behavior.
  354. //
  355. // Repeated message fields must not be mapped to URL query parameters, because
  356. // no client library can support such complicated mapping.
  357. //
  358. // If an API needs to use a JSON array for request or response body, it can map
  359. // the request or response body to a repeated field. However, some gRPC
  360. // Transcoding implementations may not support this feature.
  361. type HttpRule struct {
  362. state protoimpl.MessageState
  363. sizeCache protoimpl.SizeCache
  364. unknownFields protoimpl.UnknownFields
  365. // Selects a method to which this rule applies.
  366. //
  367. // Refer to [selector][google.api.DocumentationRule.selector] for syntax
  368. // details.
  369. Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
  370. // Determines the URL pattern is matched by this rules. This pattern can be
  371. // used with any of the {get|put|post|delete|patch} methods. A custom method
  372. // can be defined using the 'custom' field.
  373. //
  374. // Types that are assignable to Pattern:
  375. //
  376. // *HttpRule_Get
  377. // *HttpRule_Put
  378. // *HttpRule_Post
  379. // *HttpRule_Delete
  380. // *HttpRule_Patch
  381. // *HttpRule_Custom
  382. Pattern isHttpRule_Pattern `protobuf_oneof:"pattern"`
  383. // The name of the request field whose value is mapped to the HTTP request
  384. // body, or `*` for mapping all request fields not captured by the path
  385. // pattern to the HTTP body, or omitted for not having any HTTP request body.
  386. //
  387. // NOTE: the referred field must be present at the top-level of the request
  388. // message type.
  389. Body string `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"`
  390. // Optional. The name of the response field whose value is mapped to the HTTP
  391. // response body. When omitted, the entire response message will be used
  392. // as the HTTP response body.
  393. //
  394. // NOTE: The referred field must be present at the top-level of the response
  395. // message type.
  396. ResponseBody string `protobuf:"bytes,12,opt,name=response_body,json=responseBody,proto3" json:"response_body,omitempty"`
  397. // Additional HTTP bindings for the selector. Nested bindings must
  398. // not contain an `additional_bindings` field themselves (that is,
  399. // the nesting may only be one level deep).
  400. AdditionalBindings []*HttpRule `protobuf:"bytes,11,rep,name=additional_bindings,json=additionalBindings,proto3" json:"additional_bindings,omitempty"`
  401. }
  402. func (x *HttpRule) Reset() {
  403. *x = HttpRule{}
  404. if protoimpl.UnsafeEnabled {
  405. mi := &file_google_api_http_proto_msgTypes[1]
  406. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  407. ms.StoreMessageInfo(mi)
  408. }
  409. }
  410. func (x *HttpRule) String() string {
  411. return protoimpl.X.MessageStringOf(x)
  412. }
  413. func (*HttpRule) ProtoMessage() {}
  414. func (x *HttpRule) ProtoReflect() protoreflect.Message {
  415. mi := &file_google_api_http_proto_msgTypes[1]
  416. if protoimpl.UnsafeEnabled && x != nil {
  417. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  418. if ms.LoadMessageInfo() == nil {
  419. ms.StoreMessageInfo(mi)
  420. }
  421. return ms
  422. }
  423. return mi.MessageOf(x)
  424. }
  425. // Deprecated: Use HttpRule.ProtoReflect.Descriptor instead.
  426. func (*HttpRule) Descriptor() ([]byte, []int) {
  427. return file_google_api_http_proto_rawDescGZIP(), []int{1}
  428. }
  429. func (x *HttpRule) GetSelector() string {
  430. if x != nil {
  431. return x.Selector
  432. }
  433. return ""
  434. }
  435. func (m *HttpRule) GetPattern() isHttpRule_Pattern {
  436. if m != nil {
  437. return m.Pattern
  438. }
  439. return nil
  440. }
  441. func (x *HttpRule) GetGet() string {
  442. if x, ok := x.GetPattern().(*HttpRule_Get); ok {
  443. return x.Get
  444. }
  445. return ""
  446. }
  447. func (x *HttpRule) GetPut() string {
  448. if x, ok := x.GetPattern().(*HttpRule_Put); ok {
  449. return x.Put
  450. }
  451. return ""
  452. }
  453. func (x *HttpRule) GetPost() string {
  454. if x, ok := x.GetPattern().(*HttpRule_Post); ok {
  455. return x.Post
  456. }
  457. return ""
  458. }
  459. func (x *HttpRule) GetDelete() string {
  460. if x, ok := x.GetPattern().(*HttpRule_Delete); ok {
  461. return x.Delete
  462. }
  463. return ""
  464. }
  465. func (x *HttpRule) GetPatch() string {
  466. if x, ok := x.GetPattern().(*HttpRule_Patch); ok {
  467. return x.Patch
  468. }
  469. return ""
  470. }
  471. func (x *HttpRule) GetCustom() *CustomHttpPattern {
  472. if x, ok := x.GetPattern().(*HttpRule_Custom); ok {
  473. return x.Custom
  474. }
  475. return nil
  476. }
  477. func (x *HttpRule) GetBody() string {
  478. if x != nil {
  479. return x.Body
  480. }
  481. return ""
  482. }
  483. func (x *HttpRule) GetResponseBody() string {
  484. if x != nil {
  485. return x.ResponseBody
  486. }
  487. return ""
  488. }
  489. func (x *HttpRule) GetAdditionalBindings() []*HttpRule {
  490. if x != nil {
  491. return x.AdditionalBindings
  492. }
  493. return nil
  494. }
  495. type isHttpRule_Pattern interface {
  496. isHttpRule_Pattern()
  497. }
  498. type HttpRule_Get struct {
  499. // Maps to HTTP GET. Used for listing and getting information about
  500. // resources.
  501. Get string `protobuf:"bytes,2,opt,name=get,proto3,oneof"`
  502. }
  503. type HttpRule_Put struct {
  504. // Maps to HTTP PUT. Used for replacing a resource.
  505. Put string `protobuf:"bytes,3,opt,name=put,proto3,oneof"`
  506. }
  507. type HttpRule_Post struct {
  508. // Maps to HTTP POST. Used for creating a resource or performing an action.
  509. Post string `protobuf:"bytes,4,opt,name=post,proto3,oneof"`
  510. }
  511. type HttpRule_Delete struct {
  512. // Maps to HTTP DELETE. Used for deleting a resource.
  513. Delete string `protobuf:"bytes,5,opt,name=delete,proto3,oneof"`
  514. }
  515. type HttpRule_Patch struct {
  516. // Maps to HTTP PATCH. Used for updating a resource.
  517. Patch string `protobuf:"bytes,6,opt,name=patch,proto3,oneof"`
  518. }
  519. type HttpRule_Custom struct {
  520. // The custom pattern is used for specifying an HTTP method that is not
  521. // included in the `pattern` field, such as HEAD, or "*" to leave the
  522. // HTTP method unspecified for this rule. The wild-card rule is useful
  523. // for services that provide content to Web (HTML) clients.
  524. Custom *CustomHttpPattern `protobuf:"bytes,8,opt,name=custom,proto3,oneof"`
  525. }
  526. func (*HttpRule_Get) isHttpRule_Pattern() {}
  527. func (*HttpRule_Put) isHttpRule_Pattern() {}
  528. func (*HttpRule_Post) isHttpRule_Pattern() {}
  529. func (*HttpRule_Delete) isHttpRule_Pattern() {}
  530. func (*HttpRule_Patch) isHttpRule_Pattern() {}
  531. func (*HttpRule_Custom) isHttpRule_Pattern() {}
  532. // A custom pattern is used for defining custom HTTP verb.
  533. type CustomHttpPattern struct {
  534. state protoimpl.MessageState
  535. sizeCache protoimpl.SizeCache
  536. unknownFields protoimpl.UnknownFields
  537. // The name of this custom HTTP verb.
  538. Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
  539. // The path matched by this custom verb.
  540. Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
  541. }
  542. func (x *CustomHttpPattern) Reset() {
  543. *x = CustomHttpPattern{}
  544. if protoimpl.UnsafeEnabled {
  545. mi := &file_google_api_http_proto_msgTypes[2]
  546. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  547. ms.StoreMessageInfo(mi)
  548. }
  549. }
  550. func (x *CustomHttpPattern) String() string {
  551. return protoimpl.X.MessageStringOf(x)
  552. }
  553. func (*CustomHttpPattern) ProtoMessage() {}
  554. func (x *CustomHttpPattern) ProtoReflect() protoreflect.Message {
  555. mi := &file_google_api_http_proto_msgTypes[2]
  556. if protoimpl.UnsafeEnabled && x != nil {
  557. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  558. if ms.LoadMessageInfo() == nil {
  559. ms.StoreMessageInfo(mi)
  560. }
  561. return ms
  562. }
  563. return mi.MessageOf(x)
  564. }
  565. // Deprecated: Use CustomHttpPattern.ProtoReflect.Descriptor instead.
  566. func (*CustomHttpPattern) Descriptor() ([]byte, []int) {
  567. return file_google_api_http_proto_rawDescGZIP(), []int{2}
  568. }
  569. func (x *CustomHttpPattern) GetKind() string {
  570. if x != nil {
  571. return x.Kind
  572. }
  573. return ""
  574. }
  575. func (x *CustomHttpPattern) GetPath() string {
  576. if x != nil {
  577. return x.Path
  578. }
  579. return ""
  580. }
  581. var File_google_api_http_proto protoreflect.FileDescriptor
  582. var file_google_api_http_proto_rawDesc = []byte{
  583. 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74,
  584. 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
  585. 0x61, 0x70, 0x69, 0x22, 0x79, 0x0a, 0x04, 0x48, 0x74, 0x74, 0x70, 0x12, 0x2a, 0x0a, 0x05, 0x72,
  586. 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f,
  587. 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65,
  588. 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x1f, 0x66, 0x75, 0x6c, 0x6c, 0x79,
  589. 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64,
  590. 0x5f, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08,
  591. 0x52, 0x1c, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73,
  592. 0x65, 0x72, 0x76, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xda,
  593. 0x02, 0x0a, 0x08, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73,
  594. 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73,
  595. 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x03, 0x67, 0x65, 0x74, 0x18, 0x02,
  596. 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x03, 0x70,
  597. 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x70, 0x75, 0x74, 0x12,
  598. 0x14, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
  599. 0x04, 0x70, 0x6f, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18,
  600. 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12,
  601. 0x16, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,
  602. 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x37, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f,
  603. 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
  604. 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50,
  605. 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x48, 0x00, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
  606. 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
  607. 0x62, 0x6f, 0x64, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
  608. 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73,
  609. 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x61, 0x64, 0x64,
  610. 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73,
  611. 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
  612. 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x12, 0x61, 0x64,
  613. 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73,
  614. 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x22, 0x3b, 0x0a, 0x11, 0x43,
  615. 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e,
  616. 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
  617. 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01,
  618. 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x6a, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e,
  619. 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x09, 0x48, 0x74, 0x74, 0x70,
  620. 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
  621. 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72,
  622. 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61,
  623. 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61,
  624. 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x04,
  625. 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  626. }
  627. var (
  628. file_google_api_http_proto_rawDescOnce sync.Once
  629. file_google_api_http_proto_rawDescData = file_google_api_http_proto_rawDesc
  630. )
  631. func file_google_api_http_proto_rawDescGZIP() []byte {
  632. file_google_api_http_proto_rawDescOnce.Do(func() {
  633. file_google_api_http_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_http_proto_rawDescData)
  634. })
  635. return file_google_api_http_proto_rawDescData
  636. }
  637. var file_google_api_http_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
  638. var file_google_api_http_proto_goTypes = []interface{}{
  639. (*Http)(nil), // 0: google.api.Http
  640. (*HttpRule)(nil), // 1: google.api.HttpRule
  641. (*CustomHttpPattern)(nil), // 2: google.api.CustomHttpPattern
  642. }
  643. var file_google_api_http_proto_depIdxs = []int32{
  644. 1, // 0: google.api.Http.rules:type_name -> google.api.HttpRule
  645. 2, // 1: google.api.HttpRule.custom:type_name -> google.api.CustomHttpPattern
  646. 1, // 2: google.api.HttpRule.additional_bindings:type_name -> google.api.HttpRule
  647. 3, // [3:3] is the sub-list for method output_type
  648. 3, // [3:3] is the sub-list for method input_type
  649. 3, // [3:3] is the sub-list for extension type_name
  650. 3, // [3:3] is the sub-list for extension extendee
  651. 0, // [0:3] is the sub-list for field type_name
  652. }
  653. func init() { file_google_api_http_proto_init() }
  654. func file_google_api_http_proto_init() {
  655. if File_google_api_http_proto != nil {
  656. return
  657. }
  658. if !protoimpl.UnsafeEnabled {
  659. file_google_api_http_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  660. switch v := v.(*Http); i {
  661. case 0:
  662. return &v.state
  663. case 1:
  664. return &v.sizeCache
  665. case 2:
  666. return &v.unknownFields
  667. default:
  668. return nil
  669. }
  670. }
  671. file_google_api_http_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  672. switch v := v.(*HttpRule); i {
  673. case 0:
  674. return &v.state
  675. case 1:
  676. return &v.sizeCache
  677. case 2:
  678. return &v.unknownFields
  679. default:
  680. return nil
  681. }
  682. }
  683. file_google_api_http_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  684. switch v := v.(*CustomHttpPattern); i {
  685. case 0:
  686. return &v.state
  687. case 1:
  688. return &v.sizeCache
  689. case 2:
  690. return &v.unknownFields
  691. default:
  692. return nil
  693. }
  694. }
  695. }
  696. file_google_api_http_proto_msgTypes[1].OneofWrappers = []interface{}{
  697. (*HttpRule_Get)(nil),
  698. (*HttpRule_Put)(nil),
  699. (*HttpRule_Post)(nil),
  700. (*HttpRule_Delete)(nil),
  701. (*HttpRule_Patch)(nil),
  702. (*HttpRule_Custom)(nil),
  703. }
  704. type x struct{}
  705. out := protoimpl.TypeBuilder{
  706. File: protoimpl.DescBuilder{
  707. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  708. RawDescriptor: file_google_api_http_proto_rawDesc,
  709. NumEnums: 0,
  710. NumMessages: 3,
  711. NumExtensions: 0,
  712. NumServices: 0,
  713. },
  714. GoTypes: file_google_api_http_proto_goTypes,
  715. DependencyIndexes: file_google_api_http_proto_depIdxs,
  716. MessageInfos: file_google_api_http_proto_msgTypes,
  717. }.Build()
  718. File_google_api_http_proto = out.File
  719. file_google_api_http_proto_rawDesc = nil
  720. file_google_api_http_proto_goTypes = nil
  721. file_google_api_http_proto_depIdxs = nil
  722. }