Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / devtools / resultstore / v2 / resultstore_file_download.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.devtools.resultstore.v2;
19
20 import "google/api/annotations.proto";
21
22 option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
23 option java_multiple_files = true;
24 option java_package = "com.google.devtools.resultstore.v2";
25
26 // This API allows download of File messages referenced in
27 // ResultStore resources.
28 service ResultStoreFileDownload {
29   // Retrieves the File with the given uri.
30   // returns a stream of bytes to be stitched together in order.
31   //
32   // An error will be reported in the following cases:
33   // - If the File is not found.
34   // - If the given File uri is badly formatted.
35   rpc GetFile(GetFileRequest) returns (stream GetFileResponse) {
36     option (google.api.http) = {
37       get: "/v2/{uri=file/*}"
38     };
39   }
40
41   // Retrieves the tail of a File with the given uri.
42   //
43   // An error will be reported in the following cases:
44   // - If the File is not found.
45   // - If the given File uri is badly formatted.
46   rpc GetFileTail(GetFileTailRequest) returns (GetFileTailResponse) {
47     option (google.api.http) = {
48       get: "/v2/{uri=file/tail/*}"
49     };
50   }
51 }
52
53 // Request object for GetFile
54 message GetFileRequest {
55   // This corresponds to the uri field in the File message.
56   string uri = 1;
57
58   // The offset for the first byte to return in the read, relative to the start
59   // of the resource.
60   //
61   // A `read_offset` that is negative or greater than the size of the resource
62   // will cause an `OUT_OF_RANGE` error.
63   int64 read_offset = 2;
64
65   // The maximum number of `data` bytes the server is allowed to return in the
66   // sum of all `ReadResponse` messages. A `read_limit` of zero indicates that
67   // there is no limit, and a negative `read_limit` will cause an error.
68   //
69   // If the stream returns fewer bytes than allowed by the `read_limit` and no
70   // error occurred, the stream includes all data from the `read_offset` to the
71   // end of the resource.
72   int64 read_limit = 3;
73 }
74
75 // Response object for GetFile
76 message GetFileResponse {
77   // The file data.
78   bytes data = 1;
79 }
80
81 // Request object for GetFileTail
82 message GetFileTailRequest {
83   // This corresponds to the uri field in the File message.
84   string uri = 1;
85
86   // The offset for the first byte to return in the read, relative to the end
87   // of the resource.
88   //
89   // A `read_offset` that is negative or greater than the size of the resource
90   // will cause an `OUT_OF_RANGE` error.
91   int64 read_offset = 2;
92
93   // The maximum number of `data` bytes the server is allowed to return. The
94   // server will return bytes starting from the tail of the file.
95   //
96   // A `read_limit` of zero indicates that there is no limit, and a negative
97   // `read_limit` will cause an error.
98   int64 read_limit = 3;
99 }
100
101 // Response object for GetFileTail
102 message GetFileTailResponse {
103   // The file data, encoded with UTF-8.
104   bytes data = 1;
105 }