xref: /aosp_15_r20/external/googleapis/google/devtools/resultstore/v2/file_set.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/resource.proto";
20import "google/devtools/resultstore/v2/file.proto";
21
22option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
23option java_multiple_files = true;
24option java_outer_classname = "FileSetProto";
25option java_package = "com.google.devtools.resultstore.v2";
26
27// This resource represents a set of Files and other (nested) FileSets.
28// A FileSet is a node in the graph, and the file_sets field represents the
29// outgoing edges. A resource may reference various nodes in the graph to
30// represent the transitive closure of all files from those nodes.
31// The FileSets must form a directed acyclic graph. The Upload API is unable to
32// enforce that the graph is acyclic at write time, and if cycles are written,
33// it may cause issues at read time.
34//
35// A FileSet may be referenced by other resources in conjunction with Files.
36//
37// Clients should prefer using Files directly under resources. Clients should
38// not use FileSets unless their usecase requires a directed acyclic graph of
39// Files.
40message FileSet {
41  option (google.api.resource) = {
42    type: "resultstore.googleapis.com/FileSet"
43    pattern: "invocations/{invocation}/fileSets/{file_set}"
44  };
45
46  // The resource ID components that identify the FileSet.
47  message Id {
48    // The Invocation ID.
49    string invocation_id = 1;
50
51    // The FileSet ID.
52    string file_set_id = 2;
53  }
54
55  // The format of this FileSet resource name must be:
56  // invocations/${INVOCATION_ID}/fileSets/${url_encode(FILE_SET_ID)}
57  string name = 1;
58
59  // The resource ID components that identify the file set. They must match the
60  // resource name after proper encoding.
61  Id id = 2;
62
63  // List of names of other file sets that are referenced from this one.
64  // Each name must point to a file set under the same invocation. The name
65  // format must be: invocations/${INVOCATION_ID}/fileSets/${FILE_SET_ID}
66  repeated string file_sets = 3;
67
68  // Files that are contained within this file set.
69  // The uid field in the file should be unique for the Invocation.
70  repeated File files = 4;
71}
72