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