Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / api / httpbody.proto
1 // Copyright 2018 Google LLC.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15
16 syntax = "proto3";
17
18 package google.api;
19
20 import "google/protobuf/any.proto";
21
22 option cc_enable_arenas = true;
23 option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody";
24 option java_multiple_files = true;
25 option java_outer_classname = "HttpBodyProto";
26 option java_package = "com.google.api";
27 option objc_class_prefix = "GAPI";
28
29 // Message that represents an arbitrary HTTP body. It should only be used for
30 // payload formats that can't be represented as JSON, such as raw binary or
31 // an HTML page.
32 //
33 //
34 // This message can be used both in streaming and non-streaming API methods in
35 // the request as well as the response.
36 //
37 // It can be used as a top-level request field, which is convenient if one
38 // wants to extract parameters from either the URL or HTTP template into the
39 // request fields and also want access to the raw HTTP body.
40 //
41 // Example:
42 //
43 //     message GetResourceRequest {
44 //       // A unique request id.
45 //       string request_id = 1;
46 //
47 //       // The raw HTTP body is bound to this field.
48 //       google.api.HttpBody http_body = 2;
49 //     }
50 //
51 //     service ResourceService {
52 //       rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
53 //       rpc UpdateResource(google.api.HttpBody) returns
54 //       (google.protobuf.Empty);
55 //     }
56 //
57 // Example with streaming methods:
58 //
59 //     service CaldavService {
60 //       rpc GetCalendar(stream google.api.HttpBody)
61 //         returns (stream google.api.HttpBody);
62 //       rpc UpdateCalendar(stream google.api.HttpBody)
63 //         returns (stream google.api.HttpBody);
64 //     }
65 //
66 // Use of this type only changes how the request and response bodies are
67 // handled, all other features will continue to work unchanged.
68 message HttpBody {
69   // The HTTP Content-Type header value specifying the content type of the body.
70   string content_type = 1;
71
72   // The HTTP request/response body as raw binary.
73   bytes data = 2;
74
75   // Application specific response metadata. Must be set in the first response
76   // for streaming APIs.
77   repeated google.protobuf.Any extensions = 3;
78 }