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