http.pb.go 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/api/http.proto
  3. package annotations // import "google.golang.org/genproto/googleapis/api/annotations"
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. // Reference imports to suppress errors if they are not otherwise used.
  8. var _ = proto.Marshal
  9. var _ = fmt.Errorf
  10. var _ = math.Inf
  11. // This is a compile-time assertion to ensure that this generated file
  12. // is compatible with the proto package it is being compiled against.
  13. // A compilation error at this line likely means your copy of the
  14. // proto package needs to be updated.
  15. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  16. // Defines the HTTP configuration for an API service. It contains a list of
  17. // [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
  18. // to one or more HTTP REST API methods.
  19. type Http struct {
  20. // A list of HTTP configuration rules that apply to individual API methods.
  21. //
  22. // **NOTE:** All service configuration rules follow "last one wins" order.
  23. Rules []*HttpRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
  24. // When set to true, URL path parmeters will be fully URI-decoded except in
  25. // cases of single segment matches in reserved expansion, where "%2F" will be
  26. // left encoded.
  27. //
  28. // The default behavior is to not decode RFC 6570 reserved characters in multi
  29. // segment matches.
  30. FullyDecodeReservedExpansion bool `protobuf:"varint,2,opt,name=fully_decode_reserved_expansion,json=fullyDecodeReservedExpansion,proto3" json:"fully_decode_reserved_expansion,omitempty"`
  31. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  32. XXX_unrecognized []byte `json:"-"`
  33. XXX_sizecache int32 `json:"-"`
  34. }
  35. func (m *Http) Reset() { *m = Http{} }
  36. func (m *Http) String() string { return proto.CompactTextString(m) }
  37. func (*Http) ProtoMessage() {}
  38. func (*Http) Descriptor() ([]byte, []int) {
  39. return fileDescriptor_http_e457621dddd7365b, []int{0}
  40. }
  41. func (m *Http) XXX_Unmarshal(b []byte) error {
  42. return xxx_messageInfo_Http.Unmarshal(m, b)
  43. }
  44. func (m *Http) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  45. return xxx_messageInfo_Http.Marshal(b, m, deterministic)
  46. }
  47. func (dst *Http) XXX_Merge(src proto.Message) {
  48. xxx_messageInfo_Http.Merge(dst, src)
  49. }
  50. func (m *Http) XXX_Size() int {
  51. return xxx_messageInfo_Http.Size(m)
  52. }
  53. func (m *Http) XXX_DiscardUnknown() {
  54. xxx_messageInfo_Http.DiscardUnknown(m)
  55. }
  56. var xxx_messageInfo_Http proto.InternalMessageInfo
  57. func (m *Http) GetRules() []*HttpRule {
  58. if m != nil {
  59. return m.Rules
  60. }
  61. return nil
  62. }
  63. func (m *Http) GetFullyDecodeReservedExpansion() bool {
  64. if m != nil {
  65. return m.FullyDecodeReservedExpansion
  66. }
  67. return false
  68. }
  69. // `HttpRule` defines the mapping of an RPC method to one or more HTTP
  70. // REST API methods. The mapping specifies how different portions of the RPC
  71. // request message are mapped to URL path, URL query parameters, and
  72. // HTTP request body. The mapping is typically specified as an
  73. // `google.api.http` annotation on the RPC method,
  74. // see "google/api/annotations.proto" for details.
  75. //
  76. // The mapping consists of a field specifying the path template and
  77. // method kind. The path template can refer to fields in the request
  78. // message, as in the example below which describes a REST GET
  79. // operation on a resource collection of messages:
  80. //
  81. //
  82. // service Messaging {
  83. // rpc GetMessage(GetMessageRequest) returns (Message) {
  84. // option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}";
  85. // }
  86. // }
  87. // message GetMessageRequest {
  88. // message SubMessage {
  89. // string subfield = 1;
  90. // }
  91. // string message_id = 1; // mapped to the URL
  92. // SubMessage sub = 2; // `sub.subfield` is url-mapped
  93. // }
  94. // message Message {
  95. // string text = 1; // content of the resource
  96. // }
  97. //
  98. // The same http annotation can alternatively be expressed inside the
  99. // `GRPC API Configuration` YAML file.
  100. //
  101. // http:
  102. // rules:
  103. // - selector: <proto_package_name>.Messaging.GetMessage
  104. // get: /v1/messages/{message_id}/{sub.subfield}
  105. //
  106. // This definition enables an automatic, bidrectional mapping of HTTP
  107. // JSON to RPC. Example:
  108. //
  109. // HTTP | RPC
  110. // -----|-----
  111. // `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))`
  112. //
  113. // In general, not only fields but also field paths can be referenced
  114. // from a path pattern. Fields mapped to the path pattern cannot be
  115. // repeated and must have a primitive (non-message) type.
  116. //
  117. // Any fields in the request message which are not bound by the path
  118. // pattern automatically become (optional) HTTP query
  119. // parameters. Assume the following definition of the request message:
  120. //
  121. //
  122. // service Messaging {
  123. // rpc GetMessage(GetMessageRequest) returns (Message) {
  124. // option (google.api.http).get = "/v1/messages/{message_id}";
  125. // }
  126. // }
  127. // message GetMessageRequest {
  128. // message SubMessage {
  129. // string subfield = 1;
  130. // }
  131. // string message_id = 1; // mapped to the URL
  132. // int64 revision = 2; // becomes a parameter
  133. // SubMessage sub = 3; // `sub.subfield` becomes a parameter
  134. // }
  135. //
  136. //
  137. // This enables a HTTP JSON to RPC mapping as below:
  138. //
  139. // HTTP | RPC
  140. // -----|-----
  141. // `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))`
  142. //
  143. // Note that fields which are mapped to HTTP parameters must have a
  144. // primitive type or a repeated primitive type. Message types are not
  145. // allowed. In the case of a repeated type, the parameter can be
  146. // repeated in the URL, as in `...?param=A&param=B`.
  147. //
  148. // For HTTP method kinds which allow a request body, the `body` field
  149. // specifies the mapping. Consider a REST update method on the
  150. // message resource collection:
  151. //
  152. //
  153. // service Messaging {
  154. // rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
  155. // option (google.api.http) = {
  156. // put: "/v1/messages/{message_id}"
  157. // body: "message"
  158. // };
  159. // }
  160. // }
  161. // message UpdateMessageRequest {
  162. // string message_id = 1; // mapped to the URL
  163. // Message message = 2; // mapped to the body
  164. // }
  165. //
  166. //
  167. // The following HTTP JSON to RPC mapping is enabled, where the
  168. // representation of the JSON in the request body is determined by
  169. // protos JSON encoding:
  170. //
  171. // HTTP | RPC
  172. // -----|-----
  173. // `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
  174. //
  175. // The special name `*` can be used in the body mapping to define that
  176. // every field not bound by the path template should be mapped to the
  177. // request body. This enables the following alternative definition of
  178. // the update method:
  179. //
  180. // service Messaging {
  181. // rpc UpdateMessage(Message) returns (Message) {
  182. // option (google.api.http) = {
  183. // put: "/v1/messages/{message_id}"
  184. // body: "*"
  185. // };
  186. // }
  187. // }
  188. // message Message {
  189. // string message_id = 1;
  190. // string text = 2;
  191. // }
  192. //
  193. //
  194. // The following HTTP JSON to RPC mapping is enabled:
  195. //
  196. // HTTP | RPC
  197. // -----|-----
  198. // `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")`
  199. //
  200. // Note that when using `*` in the body mapping, it is not possible to
  201. // have HTTP parameters, as all fields not bound by the path end in
  202. // the body. This makes this option more rarely used in practice of
  203. // defining REST APIs. The common usage of `*` is in custom methods
  204. // which don't use the URL at all for transferring data.
  205. //
  206. // It is possible to define multiple HTTP methods for one RPC by using
  207. // the `additional_bindings` option. Example:
  208. //
  209. // service Messaging {
  210. // rpc GetMessage(GetMessageRequest) returns (Message) {
  211. // option (google.api.http) = {
  212. // get: "/v1/messages/{message_id}"
  213. // additional_bindings {
  214. // get: "/v1/users/{user_id}/messages/{message_id}"
  215. // }
  216. // };
  217. // }
  218. // }
  219. // message GetMessageRequest {
  220. // string message_id = 1;
  221. // string user_id = 2;
  222. // }
  223. //
  224. //
  225. // This enables the following two alternative HTTP JSON to RPC
  226. // mappings:
  227. //
  228. // HTTP | RPC
  229. // -----|-----
  230. // `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
  231. // `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")`
  232. //
  233. // # Rules for HTTP mapping
  234. //
  235. // The rules for mapping HTTP path, query parameters, and body fields
  236. // to the request message are as follows:
  237. //
  238. // 1. The `body` field specifies either `*` or a field path, or is
  239. // omitted. If omitted, it indicates there is no HTTP request body.
  240. // 2. Leaf fields (recursive expansion of nested messages in the
  241. // request) can be classified into three types:
  242. // (a) Matched in the URL template.
  243. // (b) Covered by body (if body is `*`, everything except (a) fields;
  244. // else everything under the body field)
  245. // (c) All other fields.
  246. // 3. URL query parameters found in the HTTP request are mapped to (c) fields.
  247. // 4. Any body sent with an HTTP request can contain only (b) fields.
  248. //
  249. // The syntax of the path template is as follows:
  250. //
  251. // Template = "/" Segments [ Verb ] ;
  252. // Segments = Segment { "/" Segment } ;
  253. // Segment = "*" | "**" | LITERAL | Variable ;
  254. // Variable = "{" FieldPath [ "=" Segments ] "}" ;
  255. // FieldPath = IDENT { "." IDENT } ;
  256. // Verb = ":" LITERAL ;
  257. //
  258. // The syntax `*` matches a single path segment. The syntax `**` matches zero
  259. // or more path segments, which must be the last part of the path except the
  260. // `Verb`. The syntax `LITERAL` matches literal text in the path.
  261. //
  262. // The syntax `Variable` matches part of the URL path as specified by its
  263. // template. A variable template must not contain other variables. If a variable
  264. // matches a single path segment, its template may be omitted, e.g. `{var}`
  265. // is equivalent to `{var=*}`.
  266. //
  267. // If a variable contains exactly one path segment, such as `"{var}"` or
  268. // `"{var=*}"`, when such a variable is expanded into a URL path, all characters
  269. // except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the
  270. // Discovery Document as `{var}`.
  271. //
  272. // If a variable contains one or more path segments, such as `"{var=foo/*}"`
  273. // or `"{var=**}"`, when such a variable is expanded into a URL path, all
  274. // characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables
  275. // show up in the Discovery Document as `{+var}`.
  276. //
  277. // NOTE: While the single segment variable matches the semantics of
  278. // [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2
  279. // Simple String Expansion, the multi segment variable **does not** match
  280. // RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion
  281. // does not expand special characters like `?` and `#`, which would lead
  282. // to invalid URLs.
  283. //
  284. // NOTE: the field paths in variables and in the `body` must not refer to
  285. // repeated fields or map fields.
  286. type HttpRule struct {
  287. // Selects methods to which this rule applies.
  288. //
  289. // Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
  290. Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
  291. // Determines the URL pattern is matched by this rules. This pattern can be
  292. // used with any of the {get|put|post|delete|patch} methods. A custom method
  293. // can be defined using the 'custom' field.
  294. //
  295. // Types that are valid to be assigned to Pattern:
  296. // *HttpRule_Get
  297. // *HttpRule_Put
  298. // *HttpRule_Post
  299. // *HttpRule_Delete
  300. // *HttpRule_Patch
  301. // *HttpRule_Custom
  302. Pattern isHttpRule_Pattern `protobuf_oneof:"pattern"`
  303. // The name of the request field whose value is mapped to the HTTP body, or
  304. // `*` for mapping all fields not captured by the path pattern to the HTTP
  305. // body. NOTE: the referred field must not be a repeated field and must be
  306. // present at the top-level of request message type.
  307. Body string `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"`
  308. // Optional. The name of the response field whose value is mapped to the HTTP
  309. // body of response. Other response fields are ignored. When
  310. // not set, the response message will be used as HTTP body of response.
  311. ResponseBody string `protobuf:"bytes,12,opt,name=response_body,json=responseBody,proto3" json:"response_body,omitempty"`
  312. // Additional HTTP bindings for the selector. Nested bindings must
  313. // not contain an `additional_bindings` field themselves (that is,
  314. // the nesting may only be one level deep).
  315. AdditionalBindings []*HttpRule `protobuf:"bytes,11,rep,name=additional_bindings,json=additionalBindings,proto3" json:"additional_bindings,omitempty"`
  316. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  317. XXX_unrecognized []byte `json:"-"`
  318. XXX_sizecache int32 `json:"-"`
  319. }
  320. func (m *HttpRule) Reset() { *m = HttpRule{} }
  321. func (m *HttpRule) String() string { return proto.CompactTextString(m) }
  322. func (*HttpRule) ProtoMessage() {}
  323. func (*HttpRule) Descriptor() ([]byte, []int) {
  324. return fileDescriptor_http_e457621dddd7365b, []int{1}
  325. }
  326. func (m *HttpRule) XXX_Unmarshal(b []byte) error {
  327. return xxx_messageInfo_HttpRule.Unmarshal(m, b)
  328. }
  329. func (m *HttpRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  330. return xxx_messageInfo_HttpRule.Marshal(b, m, deterministic)
  331. }
  332. func (dst *HttpRule) XXX_Merge(src proto.Message) {
  333. xxx_messageInfo_HttpRule.Merge(dst, src)
  334. }
  335. func (m *HttpRule) XXX_Size() int {
  336. return xxx_messageInfo_HttpRule.Size(m)
  337. }
  338. func (m *HttpRule) XXX_DiscardUnknown() {
  339. xxx_messageInfo_HttpRule.DiscardUnknown(m)
  340. }
  341. var xxx_messageInfo_HttpRule proto.InternalMessageInfo
  342. func (m *HttpRule) GetSelector() string {
  343. if m != nil {
  344. return m.Selector
  345. }
  346. return ""
  347. }
  348. type isHttpRule_Pattern interface {
  349. isHttpRule_Pattern()
  350. }
  351. type HttpRule_Get struct {
  352. Get string `protobuf:"bytes,2,opt,name=get,proto3,oneof"`
  353. }
  354. type HttpRule_Put struct {
  355. Put string `protobuf:"bytes,3,opt,name=put,proto3,oneof"`
  356. }
  357. type HttpRule_Post struct {
  358. Post string `protobuf:"bytes,4,opt,name=post,proto3,oneof"`
  359. }
  360. type HttpRule_Delete struct {
  361. Delete string `protobuf:"bytes,5,opt,name=delete,proto3,oneof"`
  362. }
  363. type HttpRule_Patch struct {
  364. Patch string `protobuf:"bytes,6,opt,name=patch,proto3,oneof"`
  365. }
  366. type HttpRule_Custom struct {
  367. Custom *CustomHttpPattern `protobuf:"bytes,8,opt,name=custom,proto3,oneof"`
  368. }
  369. func (*HttpRule_Get) isHttpRule_Pattern() {}
  370. func (*HttpRule_Put) isHttpRule_Pattern() {}
  371. func (*HttpRule_Post) isHttpRule_Pattern() {}
  372. func (*HttpRule_Delete) isHttpRule_Pattern() {}
  373. func (*HttpRule_Patch) isHttpRule_Pattern() {}
  374. func (*HttpRule_Custom) isHttpRule_Pattern() {}
  375. func (m *HttpRule) GetPattern() isHttpRule_Pattern {
  376. if m != nil {
  377. return m.Pattern
  378. }
  379. return nil
  380. }
  381. func (m *HttpRule) GetGet() string {
  382. if x, ok := m.GetPattern().(*HttpRule_Get); ok {
  383. return x.Get
  384. }
  385. return ""
  386. }
  387. func (m *HttpRule) GetPut() string {
  388. if x, ok := m.GetPattern().(*HttpRule_Put); ok {
  389. return x.Put
  390. }
  391. return ""
  392. }
  393. func (m *HttpRule) GetPost() string {
  394. if x, ok := m.GetPattern().(*HttpRule_Post); ok {
  395. return x.Post
  396. }
  397. return ""
  398. }
  399. func (m *HttpRule) GetDelete() string {
  400. if x, ok := m.GetPattern().(*HttpRule_Delete); ok {
  401. return x.Delete
  402. }
  403. return ""
  404. }
  405. func (m *HttpRule) GetPatch() string {
  406. if x, ok := m.GetPattern().(*HttpRule_Patch); ok {
  407. return x.Patch
  408. }
  409. return ""
  410. }
  411. func (m *HttpRule) GetCustom() *CustomHttpPattern {
  412. if x, ok := m.GetPattern().(*HttpRule_Custom); ok {
  413. return x.Custom
  414. }
  415. return nil
  416. }
  417. func (m *HttpRule) GetBody() string {
  418. if m != nil {
  419. return m.Body
  420. }
  421. return ""
  422. }
  423. func (m *HttpRule) GetResponseBody() string {
  424. if m != nil {
  425. return m.ResponseBody
  426. }
  427. return ""
  428. }
  429. func (m *HttpRule) GetAdditionalBindings() []*HttpRule {
  430. if m != nil {
  431. return m.AdditionalBindings
  432. }
  433. return nil
  434. }
  435. // XXX_OneofFuncs is for the internal use of the proto package.
  436. func (*HttpRule) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
  437. return _HttpRule_OneofMarshaler, _HttpRule_OneofUnmarshaler, _HttpRule_OneofSizer, []interface{}{
  438. (*HttpRule_Get)(nil),
  439. (*HttpRule_Put)(nil),
  440. (*HttpRule_Post)(nil),
  441. (*HttpRule_Delete)(nil),
  442. (*HttpRule_Patch)(nil),
  443. (*HttpRule_Custom)(nil),
  444. }
  445. }
  446. func _HttpRule_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  447. m := msg.(*HttpRule)
  448. // pattern
  449. switch x := m.Pattern.(type) {
  450. case *HttpRule_Get:
  451. b.EncodeVarint(2<<3 | proto.WireBytes)
  452. b.EncodeStringBytes(x.Get)
  453. case *HttpRule_Put:
  454. b.EncodeVarint(3<<3 | proto.WireBytes)
  455. b.EncodeStringBytes(x.Put)
  456. case *HttpRule_Post:
  457. b.EncodeVarint(4<<3 | proto.WireBytes)
  458. b.EncodeStringBytes(x.Post)
  459. case *HttpRule_Delete:
  460. b.EncodeVarint(5<<3 | proto.WireBytes)
  461. b.EncodeStringBytes(x.Delete)
  462. case *HttpRule_Patch:
  463. b.EncodeVarint(6<<3 | proto.WireBytes)
  464. b.EncodeStringBytes(x.Patch)
  465. case *HttpRule_Custom:
  466. b.EncodeVarint(8<<3 | proto.WireBytes)
  467. if err := b.EncodeMessage(x.Custom); err != nil {
  468. return err
  469. }
  470. case nil:
  471. default:
  472. return fmt.Errorf("HttpRule.Pattern has unexpected type %T", x)
  473. }
  474. return nil
  475. }
  476. func _HttpRule_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  477. m := msg.(*HttpRule)
  478. switch tag {
  479. case 2: // pattern.get
  480. if wire != proto.WireBytes {
  481. return true, proto.ErrInternalBadWireType
  482. }
  483. x, err := b.DecodeStringBytes()
  484. m.Pattern = &HttpRule_Get{x}
  485. return true, err
  486. case 3: // pattern.put
  487. if wire != proto.WireBytes {
  488. return true, proto.ErrInternalBadWireType
  489. }
  490. x, err := b.DecodeStringBytes()
  491. m.Pattern = &HttpRule_Put{x}
  492. return true, err
  493. case 4: // pattern.post
  494. if wire != proto.WireBytes {
  495. return true, proto.ErrInternalBadWireType
  496. }
  497. x, err := b.DecodeStringBytes()
  498. m.Pattern = &HttpRule_Post{x}
  499. return true, err
  500. case 5: // pattern.delete
  501. if wire != proto.WireBytes {
  502. return true, proto.ErrInternalBadWireType
  503. }
  504. x, err := b.DecodeStringBytes()
  505. m.Pattern = &HttpRule_Delete{x}
  506. return true, err
  507. case 6: // pattern.patch
  508. if wire != proto.WireBytes {
  509. return true, proto.ErrInternalBadWireType
  510. }
  511. x, err := b.DecodeStringBytes()
  512. m.Pattern = &HttpRule_Patch{x}
  513. return true, err
  514. case 8: // pattern.custom
  515. if wire != proto.WireBytes {
  516. return true, proto.ErrInternalBadWireType
  517. }
  518. msg := new(CustomHttpPattern)
  519. err := b.DecodeMessage(msg)
  520. m.Pattern = &HttpRule_Custom{msg}
  521. return true, err
  522. default:
  523. return false, nil
  524. }
  525. }
  526. func _HttpRule_OneofSizer(msg proto.Message) (n int) {
  527. m := msg.(*HttpRule)
  528. // pattern
  529. switch x := m.Pattern.(type) {
  530. case *HttpRule_Get:
  531. n += 1 // tag and wire
  532. n += proto.SizeVarint(uint64(len(x.Get)))
  533. n += len(x.Get)
  534. case *HttpRule_Put:
  535. n += 1 // tag and wire
  536. n += proto.SizeVarint(uint64(len(x.Put)))
  537. n += len(x.Put)
  538. case *HttpRule_Post:
  539. n += 1 // tag and wire
  540. n += proto.SizeVarint(uint64(len(x.Post)))
  541. n += len(x.Post)
  542. case *HttpRule_Delete:
  543. n += 1 // tag and wire
  544. n += proto.SizeVarint(uint64(len(x.Delete)))
  545. n += len(x.Delete)
  546. case *HttpRule_Patch:
  547. n += 1 // tag and wire
  548. n += proto.SizeVarint(uint64(len(x.Patch)))
  549. n += len(x.Patch)
  550. case *HttpRule_Custom:
  551. s := proto.Size(x.Custom)
  552. n += 1 // tag and wire
  553. n += proto.SizeVarint(uint64(s))
  554. n += s
  555. case nil:
  556. default:
  557. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  558. }
  559. return n
  560. }
  561. // A custom pattern is used for defining custom HTTP verb.
  562. type CustomHttpPattern struct {
  563. // The name of this custom HTTP verb.
  564. Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
  565. // The path matched by this custom verb.
  566. Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
  567. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  568. XXX_unrecognized []byte `json:"-"`
  569. XXX_sizecache int32 `json:"-"`
  570. }
  571. func (m *CustomHttpPattern) Reset() { *m = CustomHttpPattern{} }
  572. func (m *CustomHttpPattern) String() string { return proto.CompactTextString(m) }
  573. func (*CustomHttpPattern) ProtoMessage() {}
  574. func (*CustomHttpPattern) Descriptor() ([]byte, []int) {
  575. return fileDescriptor_http_e457621dddd7365b, []int{2}
  576. }
  577. func (m *CustomHttpPattern) XXX_Unmarshal(b []byte) error {
  578. return xxx_messageInfo_CustomHttpPattern.Unmarshal(m, b)
  579. }
  580. func (m *CustomHttpPattern) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  581. return xxx_messageInfo_CustomHttpPattern.Marshal(b, m, deterministic)
  582. }
  583. func (dst *CustomHttpPattern) XXX_Merge(src proto.Message) {
  584. xxx_messageInfo_CustomHttpPattern.Merge(dst, src)
  585. }
  586. func (m *CustomHttpPattern) XXX_Size() int {
  587. return xxx_messageInfo_CustomHttpPattern.Size(m)
  588. }
  589. func (m *CustomHttpPattern) XXX_DiscardUnknown() {
  590. xxx_messageInfo_CustomHttpPattern.DiscardUnknown(m)
  591. }
  592. var xxx_messageInfo_CustomHttpPattern proto.InternalMessageInfo
  593. func (m *CustomHttpPattern) GetKind() string {
  594. if m != nil {
  595. return m.Kind
  596. }
  597. return ""
  598. }
  599. func (m *CustomHttpPattern) GetPath() string {
  600. if m != nil {
  601. return m.Path
  602. }
  603. return ""
  604. }
  605. func init() {
  606. proto.RegisterType((*Http)(nil), "google.api.Http")
  607. proto.RegisterType((*HttpRule)(nil), "google.api.HttpRule")
  608. proto.RegisterType((*CustomHttpPattern)(nil), "google.api.CustomHttpPattern")
  609. }
  610. func init() { proto.RegisterFile("google/api/http.proto", fileDescriptor_http_e457621dddd7365b) }
  611. var fileDescriptor_http_e457621dddd7365b = []byte{
  612. // 419 bytes of a gzipped FileDescriptorProto
  613. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xc1, 0x8e, 0xd3, 0x30,
  614. 0x10, 0x86, 0x49, 0x9b, 0x76, 0xdb, 0xe9, 0x82, 0x84, 0x59, 0x90, 0x85, 0x40, 0x54, 0xe5, 0x52,
  615. 0x71, 0x48, 0xa5, 0xe5, 0xc0, 0x61, 0x4f, 0x1b, 0xa8, 0x58, 0x6e, 0x55, 0x8e, 0x5c, 0x22, 0x37,
  616. 0x1e, 0x52, 0x83, 0xd7, 0xb6, 0xe2, 0x09, 0xa2, 0xaf, 0xc3, 0x63, 0xf1, 0x24, 0x1c, 0x91, 0x9d,
  617. 0x84, 0x56, 0x42, 0xe2, 0x36, 0xf3, 0xff, 0x9f, 0xa7, 0x7f, 0x27, 0x03, 0x4f, 0x6b, 0x6b, 0x6b,
  618. 0x8d, 0x1b, 0xe1, 0xd4, 0xe6, 0x40, 0xe4, 0x32, 0xd7, 0x58, 0xb2, 0x0c, 0x3a, 0x39, 0x13, 0x4e,
  619. 0xad, 0x8e, 0x90, 0xde, 0x11, 0x39, 0xf6, 0x06, 0x26, 0x4d, 0xab, 0xd1, 0xf3, 0x64, 0x39, 0x5e,
  620. 0x2f, 0xae, 0xaf, 0xb2, 0x13, 0x93, 0x05, 0xa0, 0x68, 0x35, 0x16, 0x1d, 0xc2, 0xb6, 0xf0, 0xea,
  621. 0x4b, 0xab, 0xf5, 0xb1, 0x94, 0x58, 0x59, 0x89, 0x65, 0x83, 0x1e, 0x9b, 0xef, 0x28, 0x4b, 0xfc,
  622. 0xe1, 0x84, 0xf1, 0xca, 0x1a, 0x3e, 0x5a, 0x26, 0xeb, 0x59, 0xf1, 0x22, 0x62, 0x1f, 0x22, 0x55,
  623. 0xf4, 0xd0, 0x76, 0x60, 0x56, 0xbf, 0x46, 0x30, 0x1b, 0x46, 0xb3, 0xe7, 0x30, 0xf3, 0xa8, 0xb1,
  624. 0x22, 0xdb, 0xf0, 0x64, 0x99, 0xac, 0xe7, 0xc5, 0xdf, 0x9e, 0x31, 0x18, 0xd7, 0x48, 0x71, 0xe6,
  625. 0xfc, 0xee, 0x41, 0x11, 0x9a, 0xa0, 0xb9, 0x96, 0xf8, 0x78, 0xd0, 0x5c, 0x4b, 0xec, 0x0a, 0x52,
  626. 0x67, 0x3d, 0xf1, 0xb4, 0x17, 0x63, 0xc7, 0x38, 0x4c, 0x25, 0x6a, 0x24, 0xe4, 0x93, 0x5e, 0xef,
  627. 0x7b, 0xf6, 0x0c, 0x26, 0x4e, 0x50, 0x75, 0xe0, 0xd3, 0xde, 0xe8, 0x5a, 0xf6, 0x0e, 0xa6, 0x55,
  628. 0xeb, 0xc9, 0xde, 0xf3, 0xd9, 0x32, 0x59, 0x2f, 0xae, 0x5f, 0x9e, 0x2f, 0xe3, 0x7d, 0x74, 0x42,
  629. 0xee, 0x9d, 0x20, 0xc2, 0xc6, 0x84, 0x81, 0x1d, 0xce, 0x18, 0xa4, 0x7b, 0x2b, 0x8f, 0xfc, 0x22,
  630. 0xfe, 0x81, 0x58, 0xb3, 0xd7, 0xf0, 0xb0, 0x41, 0xef, 0xac, 0xf1, 0x58, 0x46, 0xf3, 0x32, 0x9a,
  631. 0x97, 0x83, 0x98, 0x07, 0x68, 0x0b, 0x4f, 0x84, 0x94, 0x8a, 0x94, 0x35, 0x42, 0x97, 0x7b, 0x65,
  632. 0xa4, 0x32, 0xb5, 0xe7, 0x8b, 0xff, 0x7c, 0x0b, 0x76, 0x7a, 0x90, 0xf7, 0x7c, 0x3e, 0x87, 0x0b,
  633. 0xd7, 0x85, 0x5a, 0xdd, 0xc0, 0xe3, 0x7f, 0x92, 0x86, 0x7c, 0xdf, 0x94, 0x91, 0xfd, 0x82, 0x63,
  634. 0x1d, 0x34, 0x27, 0xe8, 0xd0, 0x6d, 0xb7, 0x88, 0x75, 0xfe, 0x15, 0x1e, 0x55, 0xf6, 0xfe, 0xec,
  635. 0x67, 0xf3, 0x79, 0x1c, 0x13, 0xae, 0x67, 0x97, 0x7c, 0xbe, 0xed, 0x8d, 0xda, 0x6a, 0x61, 0xea,
  636. 0xcc, 0x36, 0xf5, 0xa6, 0x46, 0x13, 0x6f, 0x6b, 0xd3, 0x59, 0xc2, 0x29, 0x1f, 0xaf, 0x4e, 0x18,
  637. 0x63, 0x49, 0x84, 0x98, 0xfe, 0xe6, 0xac, 0xfe, 0x9d, 0x24, 0x3f, 0x47, 0xe9, 0xc7, 0xdb, 0xdd,
  638. 0xa7, 0xfd, 0x34, 0xbe, 0x7b, 0xfb, 0x27, 0x00, 0x00, 0xff, 0xff, 0xae, 0xde, 0xa1, 0xd0, 0xac,
  639. 0x02, 0x00, 0x00,
  640. }