xref: /aosp_15_r20/external/googleapis/google/devtools/resultstore/v2/resultstore_upload.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 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
15syntax = "proto3";
16
17package google.devtools.resultstore.v2;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23import "google/devtools/resultstore/v2/action.proto";
24import "google/devtools/resultstore/v2/configuration.proto";
25import "google/devtools/resultstore/v2/configured_target.proto";
26import "google/devtools/resultstore/v2/file_set.proto";
27import "google/devtools/resultstore/v2/invocation.proto";
28import "google/devtools/resultstore/v2/target.proto";
29import "google/devtools/resultstore/v2/upload_metadata.proto";
30import "google/protobuf/empty.proto";
31import "google/protobuf/field_mask.proto";
32import "google/protobuf/timestamp.proto";
33
34option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
35option java_multiple_files = true;
36option java_outer_classname = "ResultStoreUploadProto";
37option java_package = "com.google.devtools.resultstore.v2";
38
39// This is the interface used to upload information to the ResultStore database,
40// to update that information as necessary, and to make it immutable at the end.
41//
42// This interface intentionally does not support user read-modify-write
43// operations. They may corrupt data, and are too expensive. For the same
44// reason, all upload RPCs will return no resource fields except name and ID. An
45// uploader should hold as little state as possible in memory to avoid running
46// out of memory.
47service ResultStoreUpload {
48  option (google.api.default_host) = "resultstore.googleapis.com";
49  option (google.api.oauth_scopes) =
50      "https://www.googleapis.com/auth/cloud-platform";
51
52  // Creates the given invocation.
53  //
54  // This is not an implicitly idempotent API, so a request id is required to
55  // make it idempotent.
56  //
57  // Returns an empty Invocation proto with only the name and ID fields
58  // populated.
59  //
60  // An error will be reported in the following cases:
61  // - If an invocation with the same ID already exists.
62  rpc CreateInvocation(CreateInvocationRequest) returns (Invocation) {
63    option (google.api.http) = {
64      post: "/v2/invocations"
65      body: "invocation"
66    };
67    option (google.api.method_signature) =
68        "request_id,invocation,invocation_id,authorization_token";
69  }
70
71  // Applies a standard update to the invocation identified by the given proto's
72  // name.  For all types of fields (primitive, message, or repeated), replaces
73  // them with the given proto fields if they are under the given field mask
74  // paths.  Fields that match the mask but aren't populated in the given
75  // invocation are cleared. This is an implicitly idempotent API.
76  //
77  // Returns an empty Invocation proto with only the name and ID fields
78  // populated.
79  //
80  // An error will be reported in the following cases:
81  // - If the invocation does not exist.
82  // - If the invocation is finalized.
83  // - If no field mask was given.
84  rpc UpdateInvocation(UpdateInvocationRequest) returns (Invocation) {
85    option (google.api.http) = {
86      patch: "/v2/{invocation.name=invocations/*}"
87      body: "invocation"
88    };
89    option (google.api.method_signature) =
90        "invocation,update_mask,authorization_token";
91  }
92
93  // Applies a merge update to the invocation identified by the given proto's
94  // name.  For primitive and message fields, replaces them with the ones in
95  // the given proto if they are covered under the field mask paths.  For
96  // repeated fields, merges to them with the given ones if they are covered
97  // under the field mask paths. This is not an implicitly idempotent API, so a
98  // request id is required to make it idempotent.
99  //
100  // Returns an empty Invocation proto with only the name and ID fields
101  // populated.
102  //
103  //
104  // An error will be reported in the following cases:
105  // - If the invocation does not exist.
106  // - If the invocation is finalized.
107  // - If no field mask was given.
108  rpc MergeInvocation(MergeInvocationRequest) returns (Invocation) {
109    option (google.api.http) = {
110      post: "/v2/{invocation.name=invocations/*}:merge"
111      body: "*"
112    };
113  }
114
115  // Touches the invocation identified by the given proto's name.
116  //
117  // This is useful when you need to notify ResultStore that you haven't
118  // abandoned the upload, since abandoned uploads will be automatically
119  // finalized after a set period.
120  //
121  // An error will be reported in the following cases:
122  // - If the invocation does not exist.
123  // - If the invocation is finalized.
124  rpc TouchInvocation(TouchInvocationRequest)
125      returns (TouchInvocationResponse) {
126    option (google.api.http) = {
127      post: "/v2/{name=invocations/*}:touch"
128      body: "*"
129    };
130  }
131
132  // Declares the invocation with the given name as finalized and immutable by
133  // the user. It may still be mutated by post-processing. This is an implicitly
134  // idempotent API.
135  //
136  // If an Invocation is not updated for 24 hours, some time after that
137  // this will be called automatically.
138  //
139  // An error will be reported in the following cases:
140  // - If the invocation does not exist.
141  rpc FinalizeInvocation(FinalizeInvocationRequest)
142      returns (FinalizeInvocationResponse) {
143    option (google.api.http) = {
144      post: "/v2/{name=invocations/*}:finalize"
145      body: "*"
146    };
147  }
148
149  // Deletes an immutable invocation (permanently)
150  // Note: this does not delete indirect data, e.g. files stored in other
151  // services.
152  //
153  // An error will be reported in the following cases:
154  // - If the invocation does not exist.
155  // - If the invocation is not finalized.  This can be retried until it is.
156  rpc DeleteInvocation(DeleteInvocationRequest)
157      returns (google.protobuf.Empty) {
158    option (google.api.http) = {
159      delete: "/v2/{name=invocations/*}"
160    };
161  }
162
163  // Creates the given target under the given parent invocation. The given
164  // target ID is URL encoded, converted to the full resource name, and assigned
165  // to the target's name field. This is not an implicitly idempotent API, so a
166  // request id is required to make it idempotent.
167  //
168  // Returns an empty Target proto with only the name and ID fields populated.
169  //
170  // An error will be reported in the following cases:
171  // - If no target ID is provided.
172  // - If the parent invocation does not exist.
173  // - If the parent invocation is finalized.
174  // - If a target with the same name already exists.
175  rpc CreateTarget(CreateTargetRequest) returns (Target) {
176    option (google.api.http) = {
177      post: "/v2/{parent=invocations/*}/targets"
178      body: "target"
179    };
180    option (google.api.method_signature) =
181        "request_id,parent,target,target_id,authorization_token";
182  }
183
184  // Applies a standard update to the target identified by the given proto's
185  // name. For all types of fields (primitive, message, or repeated), replaces
186  // them with the given proto fields if they are under the given field mask
187  // paths. Fields that match the mask but aren't populated in the given
188  // target are cleared. This is an implicitly idempotent API.
189  //
190  // Returns an empty Target proto with only the name and ID fields populated.
191  //
192  // An error will be reported in the following cases:
193  // - If the target does not exist.
194  // - If the target or parent invocation is finalized.
195  // - If no field mask was given.
196  rpc UpdateTarget(UpdateTargetRequest) returns (Target) {
197    option (google.api.http) = {
198      patch: "/v2/{target.name=invocations/*/targets/*}"
199      body: "target"
200    };
201    option (google.api.method_signature) =
202        "target,update_mask,authorization_token";
203  }
204
205  // Applies a merge update to the target identified by the given proto's
206  // name. For primitive and message fields, replaces them with the ones in the
207  // given proto if they are covered under the field mask paths.  For repeated
208  // fields, merges to them with the given ones if they are covered under the
209  // field mask paths. This is not an implicitly idempotent API, so a request
210  // id is required to make it idempotent.
211  //
212  // Returns an empty Target proto with only the name and ID fields populated.
213  //
214  //
215  // An error will be reported in the following cases:
216  // - If the target does not exist.
217  // - If the target or parent invocation is finalized.
218  // - If no field mask was given.
219  rpc MergeTarget(MergeTargetRequest) returns (Target) {
220    option (google.api.http) = {
221      post: "/v2/{target.name=invocations/*/targets/*}:merge"
222      body: "*"
223    };
224  }
225
226  // Declares the target with the given name as finalized and immutable by the
227  // user. It may still be mutated by post-processing. This is an implicitly
228  // idempotent API.
229  //
230  // An error will be reported in the following cases:
231  // - If the target does not exist.
232  rpc FinalizeTarget(FinalizeTargetRequest) returns (FinalizeTargetResponse) {
233    option (google.api.http) = {
234      post: "/v2/{name=invocations/*/targets/*}:finalize"
235      body: "*"
236    };
237  }
238
239  // Creates the given configured target under the given parent target.
240  // The given configured target ID is URL encoded, converted to the full
241  // resource name, and assigned to the configured target's name field.
242  // This is not an implicitly idempotent API, so a request id is required
243  // to make it idempotent.
244  //
245  // Returns an empty ConfiguredTarget proto with only the name and ID fields
246  // populated.
247  //
248  // An error will be reported in the following cases:
249  // - If no config ID is provided.
250  // - If a configured target with the same ID already exists.
251  // - If the parent target does not exist.
252  // - If the parent target or invocation is finalized.
253  rpc CreateConfiguredTarget(CreateConfiguredTargetRequest)
254      returns (ConfiguredTarget) {
255    option (google.api.http) = {
256      post: "/v2/{parent=invocations/*/targets/*}/configuredTargets"
257      body: "configured_target"
258    };
259    option (google.api.method_signature) =
260        "request_id,parent,configured_target,config_id,authorization_token";
261  }
262
263  // Applies a standard update to the configured target identified by the given
264  // proto's name. For all types of fields (primitive, message, or repeated),
265  // replaces them with the given proto fields if they are under the given
266  // field mask paths. Fields that match the mask but aren't populated in the
267  // given configured target are cleared. This is an implicitly idempotent API.
268  //
269  // Returns an empty ConfiguredTarget proto with only the name and ID fields
270  // populated.
271  //
272  // An error will be reported in the following cases:
273  // - If the configured target does not exist.
274  // - If the parent target or invocation is finalized.
275  // - If no field mask was given.
276  rpc UpdateConfiguredTarget(UpdateConfiguredTargetRequest)
277      returns (ConfiguredTarget) {
278    option (google.api.http) = {
279      patch: "/v2/{configured_target.name=invocations/*/targets/*/configuredTargets/*}"
280      body: "configured_target"
281    };
282    option (google.api.method_signature) =
283        "configured_target,update_mask,authorization_token";
284  }
285
286  // Applies a merge update to the configured target identified by the given
287  // proto's name. For primitive and message fields, replaces them with the
288  // ones in the given proto if they are covered under the field mask paths.
289  // For repeated fields, merges to them with the given ones if they are
290  // covered under the field mask paths. This is not an implicitly idempotent
291  // API, so a request id is required to make it idempotent.
292  //
293  // Returns an empty ConfiguredTarget proto with only the name and ID fields
294  // populated.
295  //
296  //
297  // An error will be reported in the following cases:
298  // - If the configured target does not exist.
299  // - If the parent target or invocation is finalized.
300  // - If no field mask was given.
301  rpc MergeConfiguredTarget(MergeConfiguredTargetRequest)
302      returns (ConfiguredTarget) {
303    option (google.api.http) = {
304      post: "/v2/{configured_target.name=invocations/*/targets/*/configuredTargets/*}:merge"
305      body: "*"
306    };
307  }
308
309  // Declares the configured target with the given name as finalized and
310  // immutable by the user. It may still be mutated by post-processing. This is
311  // an implicitly idempotent API.
312  //
313  // An error will be reported in the following cases:
314  // - If the configured target does not exist.
315  rpc FinalizeConfiguredTarget(FinalizeConfiguredTargetRequest)
316      returns (FinalizeConfiguredTargetResponse) {
317    option (google.api.http) = {
318      post: "/v2/{name=invocations/*/targets/*/configuredTargets/*}:finalize"
319      body: "*"
320    };
321  }
322
323  // Creates the given action under the given configured target. The given
324  // action ID is URL encoded, converted to the full resource name, and
325  // assigned to the action's name field. This is not an implicitly
326  // idempotent API, so a request id is required to make it idempotent.
327  //
328  // Returns an empty Action proto with only the name and ID fields populated.
329  //
330  // An error will be reported in the following cases:
331  // - If no action ID provided.
332  // - If the parent configured target does not exist.
333  // - If the parent target or invocation is finalized.
334  // - If an action  with the same name already exists.
335  rpc CreateAction(CreateActionRequest) returns (Action) {
336    option (google.api.http) = {
337      post: "/v2/{parent=invocations/*/targets/*/configuredTargets/*}/actions"
338      body: "action"
339    };
340    option (google.api.method_signature) =
341        "request_id,parent,action,action_id,authorization_token";
342  }
343
344  // Applies a standard update to the action identified by the given
345  // proto's name.  For all types of fields (primitive, message, or repeated),
346  // replaces them with the given proto fields if they are under the given
347  // field mask paths.  Fields that match the mask but aren't populated in the
348  // given action are cleared.  This is an implicitly idempotent API.
349  //
350  // Returns an empty Action proto with only the name and ID fields populated.
351  //
352  // An error will be reported in the following cases:
353  // - If the action does not exist.
354  // - If the parent target or invocation is finalized.
355  // - If no field mask was given.
356  rpc UpdateAction(UpdateActionRequest) returns (Action) {
357    option (google.api.http) = {
358      patch: "/v2/{action.name=invocations/*/targets/*/configuredTargets/*/actions/*}"
359      body: "action"
360    };
361    option (google.api.method_signature) =
362        "action,update_mask,authorization_token";
363  }
364
365  // Applies a merge update to the action identified by the given
366  // proto's name.  For primitive and message fields, replaces them with the
367  // ones in the given proto if they are covered under the field mask paths.
368  // For repeated fields, merges to them with the given ones if they are
369  // covered under the field mask paths. This is not an implicitly idempotent
370  // API, so a request id is required to make it idempotent.
371  //
372  // Returns an empty Action proto with only the name and ID fields populated.
373  //
374  //
375  // An error will be reported in the following cases:
376  // - If the action does not exist.
377  // - If the parent target or invocation is finalized.
378  // - If no field mask was given.
379  rpc MergeAction(MergeActionRequest) returns (Action) {
380    option (google.api.http) = {
381      post: "/v2/{action.name=invocations/*/targets/*/configuredTargets/*/actions/*}:merge"
382      body: "*"
383    };
384  }
385
386  // Creates the given configuration under the given parent invocation. The
387  // given configuration ID is URL encoded, converted to the full resource name,
388  // and assigned to the configuration's name field. The configuration ID of
389  // "default" should be preferred for the default configuration in a
390  // single-config invocation. This is not an implicitly idempotent API, so a
391  // request id is required to make it idempotent.
392  //
393  // Returns an empty Configuration proto with only the name and ID fields
394  // populated.
395  //
396  // An error will be reported in the following cases:
397  // - If no configuration ID is provided.
398  // - If the parent invocation does not exist.
399  // - If the parent invocation is finalized.
400  // - If a configuration with the same name already exists.
401  rpc CreateConfiguration(CreateConfigurationRequest) returns (Configuration) {
402    option (google.api.http) = {
403      post: "/v2/{parent=invocations/*}/configs"
404      body: "configuration"
405    };
406    option (google.api.method_signature) =
407        "request_id,parent,configuration,config_id,authorization_token";
408  }
409
410  // Applies a standard update to the configuration identified by the given
411  // proto's name. For all types of fields (primitive, message, or repeated),
412  // replaces them with the given proto fields if they are under the given field
413  // mask paths. Fields that match the mask but aren't populated in the given
414  // configuration are cleared. This is an implicitly idempotent API.
415  //
416  // Returns an empty Configuration proto with only the name and ID fields
417  // populated.
418  //
419  // An error will be reported in the following cases:
420  // - If the configuration does not exist.
421  // - If the parent invocation is finalized.
422  // - If no field mask was given.
423  // - If a given field mask path is not valid.
424  rpc UpdateConfiguration(UpdateConfigurationRequest) returns (Configuration) {
425    option (google.api.http) = {
426      patch: "/v2/{configuration.name=invocations/*/configs/*}"
427      body: "configuration"
428    };
429    option (google.api.method_signature) =
430        "configuration,update_mask,authorization_token";
431  }
432
433  // Creates the given file set under the given parent invocation. The given
434  // file set ID is URL encoded, converted to the full resource name, and
435  // assigned to the file set's name field. This is not an implicitly idempotent
436  // API, so a request id is required to make it idempotent.
437  //
438  // Returns an empty FileSet proto with only the name and ID fields populated.
439  //
440  // An error will be reported in the following cases:
441  // - If no file set ID is provided.
442  // - If a file set with the same name already exists.
443  // - If the parent invocation does not exist.
444  // - If the parent invocation is finalized.
445  rpc CreateFileSet(CreateFileSetRequest) returns (FileSet) {
446    option (google.api.http) = {
447      post: "/v2/{parent=invocations/*}/fileSets"
448      body: "file_set"
449    };
450    option (google.api.method_signature) =
451        "request_id,parent,file_set,file_set_id,authorization_token";
452  }
453
454  // Applies a standard update to the file set identified by the given proto's
455  // name. For all types of fields (primitive, message, or repeated), replaces
456  // them with the given proto fields if they are under the given field mask
457  // paths. Fields that match the mask but aren't populated in the given
458  // configuration are cleared. This is an implicitly idempotent API.
459  //
460  // Returns an empty FileSet proto with only the name and ID fields populated.
461  //
462  // An error will be reported in the following cases:
463  // - If the file set does not exist.
464  // - If the parent invocation is finalized.
465  // - If no field mask was given.
466  // - If a given field mask path is not valid.
467  rpc UpdateFileSet(UpdateFileSetRequest) returns (FileSet) {
468    option (google.api.http) = {
469      patch: "/v2/{file_set.name=invocations/*/fileSets/*}"
470      body: "file_set"
471    };
472    option (google.api.method_signature) =
473        "file_set,update_mask,authorization_token";
474  }
475
476  // Applies a merge update to the file set identified by the given proto's
477  // name. For primitive and message fields, updates them with the ones in the
478  // given proto if they are covered under the field mask paths. For repeated
479  // fields, merges to them with the given ones if they are covered under the
480  // field mask paths. This is not an implicitly idempotent API, so a request
481  // id is required to make it idempotent.
482  //
483  // Returns an empty FileSet proto with only the name and ID fields populated.
484  //
485  //
486  // An error will be reported in the following cases:
487  // - If the file set does not exist.
488  // - If the parent invocation is finalized.
489  // - If a given field mask path is not valid.
490  // - If no field mask was given.
491  rpc MergeFileSet(MergeFileSetRequest) returns (FileSet) {
492    option (google.api.http) = {
493      post: "/v2/{file_set.name=invocations/*/fileSets/*}:merge"
494      body: "*"
495    };
496  }
497
498  // This is the RPC used for batch upload. It supports uploading multiple
499  // resources for an invocation in a transaction safe manner.
500  //
501  // To use this RPC, the CreateInvocationRequest must have been provided a
502  // resume_token.
503  //
504  // Combining batch upload with normal upload on a single Invocation is not
505  // supported. If an Invocation is created with a resume_token, all further
506  // calls must be through UploadBatch. If an Invocation is created without
507  // resume_token normal upload, all further upload calls must be through normal
508  // upload RPCs.
509  //
510  // The recommend total size of UploadBatchRequest is 10 MiB. If
511  // it is too large, it may be rejected.
512  rpc UploadBatch(UploadBatchRequest) returns (UploadBatchResponse) {
513    option (google.api.http) = {
514      post: "/v2/{parent=invocations/*}/batch:upload"
515      body: "*"
516    };
517  }
518
519  // Provides a way to read the metadata for an invocation.
520  // The UploadMetadata could still be retrieved by this RPC even the Invocation
521  // has been finalized.
522  // This API requires setting a response FieldMask via 'fields' URL query
523  // parameter or X-Goog-FieldMask HTTP/gRPC header.
524  //
525  // An error will be reported in the following case:
526  // - If the invocation does not exist.
527  // - If no field mask was given.
528  rpc GetInvocationUploadMetadata(GetInvocationUploadMetadataRequest)
529      returns (UploadMetadata) {
530    option (google.api.http) = {
531      get: "/v2/{name=invocations/*/uploadMetadata}"
532    };
533    option (google.api.method_signature) = "name,authorization_token";
534  }
535}
536
537// Request passed into CreateInvocation
538message CreateInvocationRequest {
539  // A unique identifier for this request. Must be set to a different value for
540  // each request that affects a given resource (eg. a random UUID). Required
541  // for the operation to be idempotent. This is achieved by ignoring this
542  // request if the last successful operation on the resource had the same
543  // request ID. If set, invocation_id must also be provided.
544  // Restricted to 36 Unicode characters.
545  string request_id = 1;
546
547  // The invocation ID. It is optional, but strongly recommended.
548  //
549  // If left empty then a new unique ID will be assigned by the server. If
550  // populated, a RFC 4122-compliant v4 UUID is preferred, but v3 or v5 UUIDs
551  // are allowed too.
552  string invocation_id = 2;
553
554  // Required. The invocation to create.  Its name field will be ignored, since
555  // the name will be derived from the id field above and assigned by the
556  // server.
557  Invocation invocation = 3 [(google.api.field_behavior) = REQUIRED];
558
559  // This is a token to authorize upload access to this invocation. It must be
560  // set to a RFC 4122-compliant v3, v4, or v5 UUID. Once this is set in
561  // CreateInvocation, all other upload RPCs for that Invocation and any of its
562  // child resources must also include the exact same token, or they will be
563  // rejected. The generated token should be unique to this invocation, and it
564  // should be kept secret.
565  //
566  // The purpose of this field is to prevent other users and tools from
567  // clobbering your upload intentionally or accidentally. The standard way of
568  // using this token is to create a second v4 UUID when the invocation_id is
569  // created, and storing them together during the upload. Essentially, this is
570  // a "password" to the invocation.
571  string authorization_token = 4;
572
573  // By default, Invocations are auto-finalized if they are not modified for 24
574  // hours. If you need auto-finalize to happen sooner, set this field to the
575  // time you'd like auto-finalize to occur.
576  google.protobuf.Timestamp auto_finalize_time = 6;
577
578  // Client provided unique token for batch upload to ensure data integrity and
579  // to provide a way to resume batch upload in case of a distributed failure on
580  // the client side. The standard uploading client is presumed to have many
581  // machines uploading to ResultStore, and that any given machine could process
582  // any given Invocation at any time. This field is used to coordinate between
583  // the client's machines, resolve concurrency issues, and enforce "exactly
584  // once" semantics on each batch within the upload.
585  //
586  // The typical usage of the resume_token is that it should contain a "key"
587  // indicating to the client where it is in the upload process, so that the
588  // client can use it to resume the upload by reconstructing the state of
589  // upload from the point where it was interrupted.
590  //
591  // If this matches the previously uploaded resume_token, then this request
592  // will silently do nothing, making CreateInvocation idempotent.
593  // If this token is provided, all further upload RPCs must be done through
594  // UploadBatch. This token must not be combined with request_id.
595  // Must be web safe Base64 encoded bytes.
596  string initial_resume_token = 7;
597
598  // Client-specific data used to resume batch upload if an error occurs and
599  // retry is needed. This serves a role closely related to resume_token, as
600  // both fields may be used to provide state required to restore a Batch
601  // Upload, but they differ in two important aspects:
602  //  - it is not compared to previous values, and as such does not provide
603  //    concurrency control;
604  //  - it allows for a larger payload, since the contents are never
605  //    inspected/compared;
606  // The size of the message must be within 1 MiB. Too large requests will be
607  // rejected.
608  bytes uploader_state = 8;
609}
610
611// Request passed into UpdateInvocation
612message UpdateInvocationRequest {
613  // Contains the name and the fields of the invocation to be updated.  The
614  // name format must be: invocations/${INVOCATION_ID}
615  Invocation invocation = 3;
616
617  // Indicates which fields to update.
618  google.protobuf.FieldMask update_mask = 4;
619
620  // This is a token to authorize access to this invocation. It must be set to
621  // the same value that was provided in the CreateInvocationRequest.
622  string authorization_token = 5;
623}
624
625// Request passed into MergeInvocation
626message MergeInvocationRequest {
627  // A unique identifier for this request. Must be set to a different value for
628  // each request that affects a given resource (eg. a random UUID). Required
629  // for the operation to be idempotent. This is achieved by ignoring this
630  // request if the last successful operation on the resource had the same
631  // request ID.  Restricted to 36 Unicode characters.
632  string request_id = 1;
633
634  // Contains the name and the fields of the invocation to be merged.  The
635  // name format must be: invocations/${INVOCATION_ID}
636  Invocation invocation = 3;
637
638  // Indicates which fields to merge.
639  google.protobuf.FieldMask update_mask = 4;
640
641  // This is a token to authorize access to this invocation. It must be set to
642  // the same value that was provided in the CreateInvocationRequest.
643  string authorization_token = 5;
644}
645
646// Request passed into TouchInvocation
647message TouchInvocationRequest {
648  // Required. The name of the invocation.  Its format must be:
649  // invocations/${INVOCATION_ID}
650  string name = 1 [
651    (google.api.field_behavior) = REQUIRED,
652    (google.api.resource_reference) = {
653      type: "resultstore.googleapis.com/Invocation"
654    }
655  ];
656
657  // This is a token to authorize access to this invocation. It must be set to
658  // the same value that was provided in the CreateInvocationRequest.
659  string authorization_token = 2;
660}
661
662// Response returned from TouchInvocation
663message TouchInvocationResponse {
664  // The name of the invocation.  Its format will be:
665  // invocations/${INVOCATION_ID}
666  string name = 1;
667
668  // The resource ID components that identify the Invocation.
669  Invocation.Id id = 2;
670}
671
672// Request passed into DeleteInvocation
673message DeleteInvocationRequest {
674  // Required. The name of the invocation.  Its format must be:
675  // invocations/${INVOCATION_ID}
676  string name = 1 [
677    (google.api.field_behavior) = REQUIRED,
678    (google.api.resource_reference) = {
679      type: "resultstore.googleapis.com/Invocation"
680    }
681  ];
682}
683
684// Request passed into FinalizeInvocation
685message FinalizeInvocationRequest {
686  // Required. The name of the invocation.  Its format must be:
687  // invocations/${INVOCATION_ID}
688  string name = 1 [
689    (google.api.field_behavior) = REQUIRED,
690    (google.api.resource_reference) = {
691      type: "resultstore.googleapis.com/Invocation"
692    }
693  ];
694
695  // This is a token to authorize access to this invocation. It must be set to
696  // the same value that was provided in the CreateInvocationRequest.
697  string authorization_token = 3;
698}
699
700// Response returned from FinalizeInvocation
701message FinalizeInvocationResponse {
702  // The name of the invocation.  Its format will be:
703  // invocations/${INVOCATION_ID}
704  string name = 1;
705
706  // The resource ID components that identify the Invocation.
707  Invocation.Id id = 2;
708}
709
710// Request passed into CreateTarget
711message CreateTargetRequest {
712  // A unique identifier for this request. Must be set to a different value for
713  // each request that affects a given resource (eg. a random UUID). Required
714  // for the operation to be idempotent. This is achieved by ignoring this
715  // request if the last successful operation on the resource had the same
716  // request ID.  Restricted to 36 Unicode characters.
717  string request_id = 1;
718
719  // Required. The name of the parent invocation in which the target is created.
720  // Its format must be invocations/${INVOCATION_ID}
721  string parent = 2 [
722    (google.api.field_behavior) = REQUIRED,
723    (google.api.resource_reference) = {
724      type: "resultstore.googleapis.com/Invocation"
725    }
726  ];
727
728  // The target identifier.  It can be any string up to 1024 Unicode characters
729  // long except for the reserved id '-'.
730  string target_id = 3;
731
732  // Required. The target to create.  Its name field will be ignored, since the
733  // name will be derived from the id field above and assigned by the server.
734  Target target = 4 [(google.api.field_behavior) = REQUIRED];
735
736  // This is a token to authorize access to this invocation. It must be set to
737  // the same value that was provided in the CreateInvocationRequest.
738  string authorization_token = 5;
739}
740
741// Request passed into UpdateTarget
742message UpdateTargetRequest {
743  // Contains the name and the fields of the target to be updated.  The name
744  // format must be:
745  // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}
746  Target target = 3;
747
748  // Indicates which fields to update.
749  google.protobuf.FieldMask update_mask = 4;
750
751  // This is a token to authorize access to this invocation. It must be set to
752  // the same value that was provided in the CreateInvocationRequest.
753  string authorization_token = 5;
754
755  // If true then the Update operation will become a Create operation if the
756  // Target is NOT_FOUND.
757  bool create_if_not_found = 6;
758}
759
760// Request passed into MergeTarget
761message MergeTargetRequest {
762  // A unique identifier for this request. Must be set to a different value for
763  // each request that affects a given resource (eg. a random UUID). Required
764  // for the operation to be idempotent. This is achieved by ignoring this
765  // request if the last successful operation on the resource had the same
766  // request ID.  Restricted to 36 Unicode characters.
767  string request_id = 1;
768
769  // Contains the name and the fields of the target to be merged.  The name
770  // format must be:
771  // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}
772  Target target = 3;
773
774  // Indicates which fields to merge.
775  google.protobuf.FieldMask update_mask = 4;
776
777  // This is a token to authorize access to this invocation. It must be set to
778  // the same value that was provided in the CreateInvocationRequest.
779  string authorization_token = 5;
780
781  // If true then the Merge operation will become a Create operation if the
782  // Target is NOT_FOUND.
783  bool create_if_not_found = 6;
784}
785
786// Request passed into FinalizeTarget
787message FinalizeTargetRequest {
788  // Required. The name of the target.  Its format must be:
789  // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}
790  string name = 1 [
791    (google.api.field_behavior) = REQUIRED,
792    (google.api.resource_reference) = {
793      type: "resultstore.googleapis.com/Target"
794    }
795  ];
796
797  // This is a token to authorize access to this invocation. It must be set to
798  // the same value that was provided in the CreateInvocationRequest.
799  string authorization_token = 3;
800}
801
802// Response returned from FinalizeTarget
803message FinalizeTargetResponse {
804  // The name of the target.  Its format will be:
805  // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}
806  string name = 1;
807
808  // The resource ID components that identify the Target.
809  Target.Id id = 2;
810}
811
812// Request passed into CreateConfiguredTarget
813message CreateConfiguredTargetRequest {
814  // A unique identifier for this request. Must be set to a different value for
815  // each request that affects a given resource (eg. a random UUID). Required
816  // for the operation to be idempotent. This is achieved by ignoring this
817  // request if the last successful operation on the resource had the same
818  // request ID.  Restricted to 36 Unicode characters.
819  string request_id = 1;
820
821  // Required. The name of the parent target in which the configured target is
822  // created. Its format must be:
823  // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}
824  string parent = 2 [
825    (google.api.field_behavior) = REQUIRED,
826    (google.api.resource_reference) = {
827      type: "resultstore.googleapis.com/Target"
828    }
829  ];
830
831  // The configuration identifier. This must match the ID of an existing
832  // Configuration under this Invocation. Cannot be the reserved id '-'.
833  string config_id = 3;
834
835  // Required. The configured target to create. Its name field will be ignored,
836  // since the name will be derived from the id field above and assigned by the
837  // server.
838  ConfiguredTarget configured_target = 4
839      [(google.api.field_behavior) = REQUIRED];
840
841  // This is a token to authorize access to this invocation. It must be set to
842  // the same value that was provided in the CreateInvocationRequest.
843  string authorization_token = 5;
844}
845
846// Request passed into UpdateConfiguredTarget
847message UpdateConfiguredTargetRequest {
848  // Contains the name and the fields of the configured target to be updated.
849  // The name format must be:
850  // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${CONFIG_ID}
851  ConfiguredTarget configured_target = 3;
852
853  // Indicates which fields to update.
854  google.protobuf.FieldMask update_mask = 4;
855
856  // This is a token to authorize access to this invocation. It must be set to
857  // the same value that was provided in the CreateInvocationRequest.
858  string authorization_token = 5;
859
860  // If true then the Update operation will become a Create operation if the
861  // ConfiguredTarget is NOT_FOUND.
862  bool create_if_not_found = 6;
863}
864
865// Request passed into MergeConfiguredTarget
866message MergeConfiguredTargetRequest {
867  // A unique identifier for this request. Must be set to a different value for
868  // each request that affects a given resource (eg. a random UUID). Required
869  // for the operation to be idempotent. This is achieved by ignoring this
870  // request if the last successful operation on the resource had the same
871  // request ID.  Restricted to 36 Unicode characters.
872  string request_id = 1;
873
874  // Contains the name and the fields of the configured target to be merged.
875  // The name format must be:
876  // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${CONFIG_ID}
877  ConfiguredTarget configured_target = 3;
878
879  // Indicates which fields to merge.
880  google.protobuf.FieldMask update_mask = 4;
881
882  // This is a token to authorize access to this invocation. It must be set to
883  // the same value that was provided in the CreateInvocationRequest.
884  string authorization_token = 5;
885
886  // If true then the Merge operation will become a Create operation if the
887  // ConfiguredTarget is NOT_FOUND.
888  bool create_if_not_found = 6;
889}
890
891// Request passed into FinalizeConfiguredTarget
892message FinalizeConfiguredTargetRequest {
893  // Required. The name of the configured target. Its format must be:
894  // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${CONFIG_ID}
895  string name = 1 [
896    (google.api.field_behavior) = REQUIRED,
897    (google.api.resource_reference) = {
898      type: "resultstore.googleapis.com/ConfiguredTarget"
899    }
900  ];
901
902  // This is a token to authorize access to this invocation. It must be set to
903  // the same value that was provided in the CreateInvocationRequest.
904  string authorization_token = 3;
905}
906
907// Response returned from FinalizeConfiguredTarget
908message FinalizeConfiguredTargetResponse {
909  // The name of the configured target. Its format must be:
910  // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${CONFIG_ID}
911  string name = 1;
912
913  // The resource ID components that identify the ConfiguredTarget.
914  ConfiguredTarget.Id id = 2;
915}
916
917// Request passed into CreateAction
918message CreateActionRequest {
919  // A unique identifier for this request. Must be set to a different value for
920  // each request that affects a given resource (eg. a random UUID). Required
921  // for the operation to be idempotent. This is achieved by ignoring this
922  // request if the last successful operation on the resource had the same
923  // request ID.  Restricted to 36 Unicode characters.
924  string request_id = 1;
925
926  // Required. The name of the parent configured target in which the action is
927  // created. Its format must be:
928  // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${CONFIG_ID}
929  string parent = 2 [
930    (google.api.field_behavior) = REQUIRED,
931    (google.api.resource_reference) = {
932      type: "resultstore.googleapis.com/ConfiguredTarget"
933    }
934  ];
935
936  // The action identifier. It can be any string of up to 512 alphanumeric
937  // characters [a-zA-Z_-], except for the reserved id '-'.
938  //
939  // Recommended IDs for Test Actions:
940  // "test": For a single test action.
941  // "test_shard0_run0_attempt0" ... "test_shard9_run9_attempt9": For tests with
942  //  shard/run/attempts.
943  //
944  // Recommended IDs for Build Actions:
945  // "build": If you only have a single build action.
946  string action_id = 3;
947
948  // Required. The action to create.  Its name field will be ignored, since the
949  // name will be derived from the id field above and assigned by the server.
950  Action action = 4 [(google.api.field_behavior) = REQUIRED];
951
952  // This is a token to authorize access to this invocation. It must be set to
953  // the same value that was provided in the CreateInvocationRequest.
954  string authorization_token = 5;
955}
956
957// Request passed into UpdateAction
958message UpdateActionRequest {
959  // Contains the name and the fields of the action to be updated.  The
960  // name format must be:
961  // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${CONFIG_ID}/actions/${ACTION_ID}
962  Action action = 3;
963
964  // Indicates which fields to update.
965  google.protobuf.FieldMask update_mask = 4;
966
967  // This is a token to authorize access to this invocation. It must be set to
968  // the same value that was provided in the CreateInvocationRequest.
969  string authorization_token = 5;
970
971  // If true then the Update operation will become a Create operation if the
972  // Action is NOT_FOUND.
973  bool create_if_not_found = 6;
974}
975
976// Request passed into MergeAction
977message MergeActionRequest {
978  // A unique identifier for this request. Must be set to a different value for
979  // each request that affects a given resource (eg. a random UUID). Required
980  // for the operation to be idempotent. This is achieved by ignoring this
981  // request if the last successful operation on the resource had the same
982  // request ID.  Restricted to 36 Unicode characters.
983  string request_id = 1;
984
985  // Contains the name and the fields of the action to be merged.  The
986  // name format must be:
987  // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${CONFIG_ID}/actions/${ACTION_ID}
988  Action action = 3;
989
990  // Indicates which fields to merge.
991  google.protobuf.FieldMask update_mask = 4;
992
993  // This is a token to authorize access to this invocation. It must be set to
994  // the same value that was provided in the CreateInvocationRequest.
995  string authorization_token = 5;
996
997  // If true then the Merge operation will become a Create operation if the
998  // Action is NOT_FOUND.
999  bool create_if_not_found = 6;
1000}
1001
1002// Request passed into CreateConfiguration
1003message CreateConfigurationRequest {
1004  // A unique identifier for this request. Must be set to a different value for
1005  // each request that affects a given resource (eg. a random UUID). Required
1006  // for the operation to be idempotent. This is achieved by ignoring this
1007  // request if the last successful operation on the resource had the same
1008  // request ID.  Restricted to 36 Unicode characters.
1009  string request_id = 1;
1010
1011  // Required. The name of the parent invocation in which the configuration is
1012  // created. Its format must be invocations/${INVOCATION_ID}
1013  string parent = 2 [
1014    (google.api.field_behavior) = REQUIRED,
1015    (google.api.resource_reference) = {
1016      type: "resultstore.googleapis.com/Invocation"
1017    }
1018  ];
1019
1020  // The configuration identifier.  It can be any string of up to 512
1021  // alphanumeric characters [a-zA-Z_-], except for the reserved id '-'. The
1022  // configuration ID of "default" should be preferred for the default
1023  // configuration in a single-config invocation.
1024  string config_id = 3;
1025
1026  // Required. The configuration to create. Its name field will be ignored,
1027  // since the name will be derived from the id field above and assigned by the
1028  // server.
1029  Configuration configuration = 4 [(google.api.field_behavior) = REQUIRED];
1030
1031  // This is a token to authorize access to this invocation. It must be set to
1032  // the same value that was provided in the CreateInvocationRequest.
1033  string authorization_token = 5;
1034}
1035
1036// Request passed into UpdateConfiguration
1037message UpdateConfigurationRequest {
1038  // Contains the name and fields of the configuration to be updated. The name
1039  // format must be:
1040  // invocations/${INVOCATION_ID}/configs/${CONFIG_ID}
1041  Configuration configuration = 3;
1042
1043  // Indicates which fields to update.
1044  google.protobuf.FieldMask update_mask = 4;
1045
1046  // This is a token to authorize access to this invocation. It must be set to
1047  // the same value that was provided in the CreateInvocationRequest.
1048  string authorization_token = 5;
1049
1050  // If true then the Update operation will become a Create operation if the
1051  // Configuration is NOT_FOUND.
1052  bool create_if_not_found = 6;
1053}
1054
1055// Request passed into CreateFileSet
1056message CreateFileSetRequest {
1057  // A unique identifier for this request. Must be set to a different value for
1058  // each request that affects a given resource (eg. a random UUID). Required
1059  // for the operation to be idempotent. This is achieved by ignoring this
1060  // request if the last successful operation on the resource had the same
1061  // request ID.  Restricted to 36 Unicode characters.
1062  string request_id = 1;
1063
1064  // Required. The name of the parent invocation in which the file set is
1065  // created. Its format must be invocations/${INVOCATION_ID}
1066  string parent = 2 [
1067    (google.api.field_behavior) = REQUIRED,
1068    (google.api.resource_reference) = {
1069      type: "resultstore.googleapis.com/Invocation"
1070    }
1071  ];
1072
1073  // The file set identifier.  It can be any string of up to 512 alphanumeric
1074  // characters [a-zA-Z_-], except for the reserved id '-'.
1075  string file_set_id = 3;
1076
1077  // Required. The file set to create. Its name field will be ignored, since the
1078  // name will be derived from the id field above and assigned by the server.
1079  FileSet file_set = 4 [(google.api.field_behavior) = REQUIRED];
1080
1081  // This is a token to authorize access to this invocation. It must be set to
1082  // the same value that was provided in the CreateInvocationRequest.
1083  string authorization_token = 5;
1084}
1085
1086// Request passed into UpdateFileSet
1087message UpdateFileSetRequest {
1088  // Contains the name and fields of the file set to be updated. The name format
1089  // must be: invocations/${INVOCATION_ID}/fileSets/${FILE_SET_ID}
1090  FileSet file_set = 1;
1091
1092  // Indicates which fields to update.
1093  google.protobuf.FieldMask update_mask = 2;
1094
1095  // This is a token to authorize access to this invocation. It must be set to
1096  // the same value that was provided in the CreateInvocationRequest.
1097  string authorization_token = 3;
1098
1099  // If true then the Update operation will become a Create operation if the
1100  // FileSet is NOT_FOUND.
1101  bool create_if_not_found = 4;
1102}
1103
1104// Request passed into MergeFileSet
1105message MergeFileSetRequest {
1106  // A unique identifier for this request. Must be set to a different value for
1107  // each request that affects a given resource (eg. a random UUID). Required
1108  // for the operation to be idempotent. This is achieved by ignoring this
1109  // request if the last successful operation on the resource had the same
1110  // request ID.  Restricted to 36 Unicode characters.
1111  string request_id = 1;
1112
1113  // Contains the name and fields of the file set to be merged. The name
1114  // format must be:
1115  // invocations/${INVOCATION_ID}/fileSets/${FILE_SET_ID}
1116  FileSet file_set = 2;
1117
1118  // Indicates which fields to merge.
1119  google.protobuf.FieldMask update_mask = 3;
1120
1121  // This is a token to authorize access to this invocation. It must be set to
1122  // the same value that was provided in the CreateInvocationRequest.
1123  string authorization_token = 4;
1124
1125  // If true then the Merge operation will become a Create operation if the
1126  // FileSet is NOT_FOUND.
1127  bool create_if_not_found = 5;
1128}
1129
1130// Request passed into UploadBatch
1131message UploadBatchRequest {
1132  // Required. The name of the invocation being modified.
1133  // The name format must be: invocations/${INVOCATION_ID}
1134  string parent = 1 [(google.api.field_behavior) = REQUIRED];
1135
1136  // Required. A UUID that must match the value provided in
1137  // CreateInvocationRequest.
1138  string authorization_token = 2 [(google.api.field_behavior) = REQUIRED];
1139
1140  // Required. The token of this batch, that will be committed in this
1141  // UploadBatchRequest. If this matches the previously uploaded resume_token,
1142  // then this request will silently do nothing. See
1143  // CreateInvocationRequest.initial_resume_token for more information. Must be
1144  // web safe Base64 encoded bytes.
1145  string next_resume_token = 3 [(google.api.field_behavior) = REQUIRED];
1146
1147  // Required. The token of the previous batch that was committed in a
1148  // UploadBatchRequest. This will be checked after next_resume_token match is
1149  // checked. If this does not match the previously uploaded resume_token, a 409
1150  // Conflict (HTTPS) or ABORTED (gRPC ) error code indicating a concurrency
1151  // failure will be returned, and that the user should call
1152  // GetInvocationUploadMetadata to fetch the current resume_token to
1153  // reconstruct the state of the upload to resume it.
1154  // See CreateInvocationRequest.initial_resume_token for more information.
1155  // Must be web safe Base64 encoded bytes.
1156  string resume_token = 4 [(google.api.field_behavior) = REQUIRED];
1157
1158  // Client-specific data used to resume batch upload if an error occurs and
1159  // retry is needed. This serves a role closely related to resume_token, as
1160  // both fields may be used to provide state required to restore a Batch
1161  // Upload, but they differ in two important aspects:
1162  //  - it is not compared to previous values, and as such does not provide
1163  //    concurrency control;
1164  //  - it allows for a larger payload, since the contents are never
1165  //    inspected/compared;
1166  // The size of the message must be within 1 MiB. Too large requests will be
1167  // rejected.
1168  bytes uploader_state = 6;
1169
1170  // The individual upload requests for this batch.
1171  // This field may be empty, allowing this RPC to be used like TouchInvocation.
1172  repeated UploadRequest upload_requests = 5;
1173}
1174
1175// Response for UploadBatch
1176message UploadBatchResponse {}
1177
1178// The individual upload requests for this batch.
1179message UploadRequest {
1180  // The resource ID components that identify the resource being uploaded.
1181  message Id {
1182    // Required for Target, ConfiguredTarget, or Action.
1183    // The Target ID.
1184    string target_id = 1;
1185
1186    // Required for Configuration, ConfiguredTarget, or Action.
1187    // The Configuration ID.
1188    string configuration_id = 2;
1189
1190    // Required for Action.
1191    // The Action ID.
1192    string action_id = 3;
1193
1194    // Required for FileSet.
1195    // The FileSet ID.
1196    string file_set_id = 4;
1197  }
1198
1199  // The operation for the request (e.g. Create(), Update(), etc.)
1200  enum UploadOperation {
1201    // Unspecified
1202    UPLOAD_OPERATION_UNSPECIFIED = 0;
1203
1204    // Create the given resources except Invocation.
1205    // For more information, check the Create APIs.
1206    CREATE = 1;
1207
1208    // Applies a standard update to the resource identified by the given
1209    // proto's name. For more information, see the Update APIs.
1210    // UploadBatch does not support arbitrary field masks. The list of allowed
1211    // field masks can be found below.
1212    UPDATE = 2;
1213
1214    // Applies an merge update to the resource identified by the given
1215    // proto's name. For more information, see the Merge APIs.
1216    // UploadBatch does not support arbitrary field masks. The list of allowed
1217    // field masks can be found below.
1218    MERGE = 3;
1219
1220    // Declares the resource with the given name as finalized and immutable by
1221    // the uploader. Only supported for Invocation, Target, ConfiguredTarget.
1222    // There must be no operation on child resources after parent resource is
1223    // Finalized. If there is a Finalize of Invocation, it must be the final
1224    // UploadRequest. For more information, see the Finalize APIs.
1225    // An empty resource should be provided below.
1226    FINALIZE = 4;
1227  }
1228
1229  // The resource ID components that identify the resource being uploaded.
1230  Id id = 1;
1231
1232  // The operation for the request (e.g. Create(), Update(), etc.)
1233  UploadOperation upload_operation = 2;
1234
1235  // Required for Update and Merge operations.
1236  // Ignored for Create and Finalize operations.
1237  // Masks the fields of the resource being uploaded. Provides support for a
1238  // more granular upload. FieldMasks are limited to certain fields and must
1239  // match one of the follow patterns, where * means any single field name.
1240  //
1241  // For Update Operations:
1242  //
1243  // Invocation: [*, status_attributes.*, timing.*, invocation_attributes.*,
1244  // workspace_info.*].
1245  // Target: [*, status_attributes.*, timing.*].
1246  // Configuration: [*, status_attributes.*].
1247  // ConfiguredTarget: [*, status_attributes.*].
1248  // Action: [*, status_attributes.*, timing.*, test_action.test_suite,
1249  // test_action.infrastructure_failure_info].
1250  // FileSet: [*].
1251  //
1252  // For Merge Operations:
1253  //
1254  // Invocation: [invocation_attributes.labels, workspace_info.command_lines,
1255  // properties, files, file_processing_errors].
1256  // Target: [files].
1257  // ConfiguredTarget: [files].
1258  // Action: [files, file_processing_errors].
1259  google.protobuf.FieldMask update_mask = 3;
1260
1261  // If true then the Update, Merge operation will become a Create operation if
1262  // the resource is NOT_FOUND. Not supported for Invocation resource.
1263  bool create_if_not_found = 10;
1264
1265  // The proto of the resource being uploaded.
1266  oneof resource {
1267    // The Invocation Resource
1268    Invocation invocation = 4;
1269
1270    // The Target Resource
1271    Target target = 5;
1272
1273    // The Configuration Resource
1274    Configuration configuration = 6;
1275
1276    // The ConfiguredTarget Resource
1277    ConfiguredTarget configured_target = 7;
1278
1279    // The Action Resource
1280    Action action = 8;
1281
1282    // The FileSet Resource
1283    FileSet file_set = 9;
1284  }
1285}
1286
1287// Request passed into GetInvocationUploadMetadata
1288message GetInvocationUploadMetadataRequest {
1289  // Required. The name of the UploadMetadata being requested.
1290  // The name format must be: invocations/${INVOCATION_ID}/uploadMetadata
1291  string name = 1 [
1292    (google.api.field_behavior) = REQUIRED,
1293    (google.api.resource_reference) = {
1294      type: "resultstore.googleapis.com/UploadMetadata"
1295    }
1296  ];
1297
1298  // Required. A UUID that must match the value provided in
1299  // CreateInvocationRequest.
1300  string authorization_token = 2 [(google.api.field_behavior) = REQUIRED];
1301}
1302