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