1 // Copyright 2018 Google LLC.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 package google.devtools.resultstore.v2;
20 import "google/api/annotations.proto";
21 import "google/devtools/resultstore/v2/action.proto";
22 import "google/devtools/resultstore/v2/common.proto";
23 import "google/devtools/resultstore/v2/configuration.proto";
24 import "google/devtools/resultstore/v2/configured_target.proto";
25 import "google/devtools/resultstore/v2/file_set.proto";
26 import "google/devtools/resultstore/v2/invocation.proto";
27 import "google/devtools/resultstore/v2/target.proto";
29 option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
30 option java_multiple_files = true;
31 option java_package = "com.google.devtools.resultstore.v2";
33 // This is the interface used to download information from the database.
35 // Most APIs require setting a response FieldMask via the 'fields' URL query
36 // parameter or the X-Goog-FieldMask HTTP/gRPC header.
37 // Each resource in this interface carries a name field that
38 // identifies the resource.
39 service ResultStoreDownload {
40 // Retrieves the invocation with the given name.
42 // An error will be reported in the following cases:
43 // - If the invocation is not found.
44 // - If the given invocation name is badly formatted.
45 // - If no field mask was given.
46 rpc GetInvocation(GetInvocationRequest) returns (Invocation) {
47 option (google.api.http) = {
48 get: "/v2/{name=invocations/*}"
52 // Searches for invocations matching the given query parameters.
55 // An error will be reported in the following cases:
56 // - If a query string is not provided
57 // - If no field mask was given.
58 rpc SearchInvocations(SearchInvocationsRequest)
59 returns (SearchInvocationsResponse) {
60 option (google.api.http) = {
61 get: "/v2/invocations:search"
65 // Retrieves the configuration with the given name.
67 // An error will be reported in the following cases:
68 // - If the configuration or its parent invocation is not found.
69 // - If the given configuration name is badly formatted.
70 // - If no field mask was given.
71 rpc GetConfiguration(GetConfigurationRequest) returns (Configuration) {
72 option (google.api.http) = {
73 get: "/v2/{name=invocations/*/configs/*}"
77 // Retrieves all configurations for a parent invocation.
78 // This might be limited by user or server,
79 // in which case a continuation token is provided.
81 // An error will be reported in the following cases:
82 // - If the parent invocation is not found.
83 // - If the given parent invocation name is badly formatted.
84 // - If no field mask was given.
85 rpc ListConfigurations(ListConfigurationsRequest)
86 returns (ListConfigurationsResponse) {
87 option (google.api.http) = {
88 get: "/v2/{parent=invocations/*}/configs"
92 // Retrieves the target with the given name.
94 // An error will be reported in the following cases:
95 // - If the target or its parent invocation is not found.
96 // - If the given target name is badly formatted.
97 // - If no field mask was given.
98 rpc GetTarget(GetTargetRequest) returns (Target) {
99 option (google.api.http) = {
100 get: "/v2/{name=invocations/*/targets/*}"
104 // Retrieves all targets for a parent invocation. This might be limited by
105 // user or server, in which case a continuation token is provided.
107 // An error will be reported in the following cases:
108 // - If the parent is not found.
109 // - If the given parent name is badly formatted.
110 // - If no field mask was given.
111 rpc ListTargets(ListTargetsRequest) returns (ListTargetsResponse) {
112 option (google.api.http) = {
113 get: "/v2/{parent=invocations/*}/targets"
117 // Retrieves the configured target with the given name.
119 // An error will be reported in the following cases:
120 // - If the configured target is not found.
121 // - If the given name is badly formatted.
122 // - If no field mask was given.
123 rpc GetConfiguredTarget(GetConfiguredTargetRequest)
124 returns (ConfiguredTarget) {
125 option (google.api.http) = {
126 get: "/v2/{name=invocations/*/targets/*/configuredTargets/*}"
130 // Retrieves all configured targets for a parent invocation/target.
131 // This might be limited by user or server, in which case a continuation
132 // token is provided. Supports '-' for targetId meaning all targets.
134 // An error will be reported in the following cases:
135 // - If the parent is not found.
136 // - If the given parent name is badly formatted.
137 // - If no field mask was given.
138 rpc ListConfiguredTargets(ListConfiguredTargetsRequest)
139 returns (ListConfiguredTargetsResponse) {
140 option (google.api.http) = {
141 get: "/v2/{parent=invocations/*/targets/*}/configuredTargets"
145 // Retrieves the action with the given name.
147 // An error will be reported in the following cases:
148 // - If the action is not found.
149 // - If the given name is badly formatted.
150 // - If no field mask was given.
151 rpc GetAction(GetActionRequest) returns (Action) {
152 option (google.api.http) = {
153 get: "/v2/{name=invocations/*/targets/*/configuredTargets/*/actions/*}"
157 // Retrieves all actions for a parent invocation/target/configuration.
158 // This might be limited by user or server, in which case a continuation
159 // token is provided. Supports '-' for configurationId to mean all
160 // actions for all configurations for a target, or '-' for targetId and
161 // configurationId to mean all actions for all configurations and all targets.
162 // Does not support targetId '-' with a specified configuration.
164 // An error will be reported in the following cases:
165 // - If the parent is not found.
166 // - If the given parent name is badly formatted.
167 // - If no field mask was given.
168 rpc ListActions(ListActionsRequest) returns (ListActionsResponse) {
169 option (google.api.http) = {
170 get: "/v2/{parent=invocations/*/targets/*/configuredTargets/*}/actions"
174 // Retrieves the file set with the given name.
176 // An error will be reported in the following cases:
177 // - If the file set or its parent invocation is not found.
178 // - If the given file set name is badly formatted.
179 // - If no field mask was given.
180 rpc GetFileSet(GetFileSetRequest) returns (FileSet) {
181 option (google.api.http) = {
182 get: "/v2/{name=invocations/*/fileSets/*}"
186 // Retrieves all file sets for a parent invocation.
187 // This might be limited by user or server,
188 // in which case a continuation token is provided.
190 // An error will be reported in the following cases:
191 // - If the parent invocation is not found.
192 // - If the given parent invocation name is badly formatted.
193 // - If no field mask was given.
194 rpc ListFileSets(ListFileSetsRequest) returns (ListFileSetsResponse) {
195 option (google.api.http) = {
196 get: "/v2/{parent=invocations/*}/fileSets"
201 // Request passed into GetInvocation
202 message GetInvocationRequest {
203 // The name of the invocation to retrieve. It must match this format:
204 // invocations/${INVOCATION_ID}
205 // where INVOCATION_ID must be an RFC 4122-compliant random UUID.
209 // Request passed into SearchInvocations
210 message SearchInvocationsRequest {
211 // The maximum number of items to return. Zero means all, but may be capped by
215 // Options for pagination.
217 // The next_page_token value returned from a previous Search request, if
219 string page_token = 2;
221 // Absolute number of results to skip.
225 // A filtering query string.
228 // The project id to search under.
229 string project_id = 5;
232 // Response from calling SearchInvocations
233 message SearchInvocationsResponse {
234 // Invocations matching the search, possibly capped at request.page_size or a
236 repeated Invocation invocations = 1;
238 // Token to retrieve the next page of results, or empty if there are no
240 string next_page_token = 2;
243 // Request passed into GetConfiguration
244 message GetConfigurationRequest {
245 // The name of the configuration to retrieve. It must match this format:
246 // invocations/${INVOCATION_ID}/configs/${CONFIGURATION_ID}
250 // Request passed into ListConfigurations
251 message ListConfigurationsRequest {
252 // The invocation name of the configurations to retrieve.
253 // It must match this format: invocations/${INVOCATION_ID}
256 // The maximum number of items to return.
257 // Zero means all, but may be capped by the server.
260 // Options for pagination.
262 // The next_page_token value returned from a previous List request, if any.
263 string page_token = 3;
265 // Absolute number of results to skip.
270 // Response from calling ListConfigurations
271 message ListConfigurationsResponse {
272 // Configurations matching the request invocation,
273 // possibly capped at request.page_size or a server limit.
274 repeated Configuration configurations = 1;
276 // Token to retrieve the next page of results, or empty if there are no
277 // more results in the list.
278 string next_page_token = 2;
281 // Request passed into GetTarget
282 message GetTargetRequest {
283 // The name of the target to retrieve. It must match this format:
284 // invocations/${INVOCATION_ID}/targets/${TARGET_ID}
288 // Request passed into ListTargets
289 message ListTargetsRequest {
290 // The invocation name of the targets to retrieve. It must match this format:
291 // invocations/${INVOCATION_ID}
294 // The maximum number of items to return.
295 // Zero means all, but may be capped by the server.
298 // Options for pagination.
300 // The next_page_token value returned from a previous List request, if any.
301 string page_token = 3;
303 // Absolute number of results to skip.
308 // Response from calling ListTargetsResponse
309 message ListTargetsResponse {
310 // Targets matching the request invocation,
311 // possibly capped at request.page_size or a server limit.
312 repeated Target targets = 1;
314 // Token to retrieve the next page of results, or empty if there are no
315 // more results in the list.
316 string next_page_token = 2;
319 // Request passed into GetConfiguredTarget
320 message GetConfiguredTargetRequest {
321 // The name of the configured target to retrieve. It must match this format:
322 // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIGURATION_ID}
326 // Request passed into ListConfiguredTargets
327 message ListConfiguredTargetsRequest {
328 // The invocation and target name of the configured targets to retrieve.
329 // It must match this format:
330 // invocations/${INVOCATION_ID}/targets/${TARGET_ID}
333 // The maximum number of items to return.
334 // Zero means all, but may be capped by the server.
337 // Options for pagination.
339 // The next_page_token value returned from a previous List request, if any.
340 string page_token = 3;
342 // Absolute number of results to skip.
347 // Response from calling ListConfiguredTargets
348 message ListConfiguredTargetsResponse {
349 // ConfiguredTargets matching the request,
350 // possibly capped at request.page_size or a server limit.
351 repeated ConfiguredTarget configured_targets = 1;
353 // Token to retrieve the next page of results, or empty if there are no
354 // more results in the list.
355 string next_page_token = 2;
358 // Request passed into GetAction
359 message GetActionRequest {
360 // The name of the action to retrieve. It must match this format:
361 // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIGURATION_ID}/actions/${ACTION_ID}
365 // Request passed into ListActions
366 message ListActionsRequest {
367 // The invocation, target, and configuration name of the action to retrieve.
368 // It must match this format:
369 // invocations/${INVOCATION_ID}/targets/${TARGET_ID}/configuredTargets/${CONFIGURATION_ID}
372 // The maximum number of items to return.
373 // Zero means all, but may be capped by the server.
376 // Options for pagination.
378 // The next_page_token value returned from a previous List request, if any.
379 string page_token = 3;
381 // Absolute number of results to skip.
386 // Response from calling ListActions
387 message ListActionsResponse {
388 // Actions matching the request,
389 // possibly capped at request.page_size or a server limit.
390 repeated Action actions = 1;
392 // Token to retrieve the next page of results, or empty if there are no
393 // more results in the list.
394 string next_page_token = 2;
397 // Request passed into GetFileSet
398 message GetFileSetRequest {
399 // The name of the file set to retrieve. It must match this format:
400 // invocations/${INVOCATION_ID}/fileSets/${FILE_SET_ID}
404 // Request passed into ListFileSets
405 message ListFileSetsRequest {
406 // The invocation name of the file sets to retrieve.
407 // It must match this format: invocations/${INVOCATION_ID}
410 // The maximum number of items to return.
411 // Zero means all, but may be capped by the server.
414 // Options for pagination.
416 // The next_page_token value returned from a previous List request, if any.
417 string page_token = 3;
419 // Absolute number of results to skip.
424 // Response from calling ListFileSets
425 message ListFileSetsResponse {
426 // File sets matching the request,
427 // possibly capped at request.page_size or a server limit.
428 repeated FileSet file_sets = 1;
430 // Token to retrieve the next page of results, or empty if there are no
431 // more results in the list.
432 string next_page_token = 2;