-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
file.proto
141 lines (116 loc) · 4.36 KB
/
file.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.devtools.artifactregistry.v1;
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/timestamp.proto";
option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1";
option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb";
option java_multiple_files = true;
option java_outer_classname = "FileProto";
option java_package = "com.google.devtools.artifactregistry.v1";
option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1";
option ruby_package = "Google::Cloud::ArtifactRegistry::V1";
// A hash of file content.
message Hash {
// The algorithm used to compute the hash.
enum HashType {
// Unspecified.
HASH_TYPE_UNSPECIFIED = 0;
// SHA256 hash.
SHA256 = 1;
// MD5 hash.
MD5 = 2;
}
// The algorithm used to compute the hash value.
HashType type = 1;
// The hash value.
bytes value = 2;
}
// Files store content that is potentially associated with Packages or Versions.
message File {
option (google.api.resource) = {
type: "artifactregistry.googleapis.com/File"
pattern: "projects/{project}/locations/{location}/repositories/{repository}/files/{file}"
};
// The name of the file, for example:
// "projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt".
// If the file ID part contains slashes, they are escaped.
string name = 1;
// The size of the File in bytes.
int64 size_bytes = 3;
// The hashes of the file content.
repeated Hash hashes = 4;
// Output only. The time when the File was created.
google.protobuf.Timestamp create_time = 5
[(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The time when the File was last updated.
google.protobuf.Timestamp update_time = 6
[(google.api.field_behavior) = OUTPUT_ONLY];
// The name of the Package or Version that owns this file, if any.
string owner = 7;
// Output only. The time when the last attempt to refresh the file's data was
// made. Only set when the repository is remote.
google.protobuf.Timestamp fetch_time = 8
[(google.api.field_behavior) = OUTPUT_ONLY];
}
// The request to list files.
message ListFilesRequest {
// Required. The name of the repository whose files will be listed. For
// example: "projects/p1/locations/us-central1/repositories/repo1
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
child_type: "artifactregistry.googleapis.com/File"
}
];
// An expression for filtering the results of the request. Filter rules are
// case insensitive. The fields eligible for filtering are:
//
// * `name`
// * `owner`
//
// An example of using a filter:
//
// * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an
// ID starting with "a/b/".
// * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` -->
// Files owned by the version `1.0` in package `pkg1`.
string filter = 4;
// The maximum number of files to return.
int32 page_size = 2;
// The next_page_token value returned from a previous list request, if any.
string page_token = 3;
// The field to order the results by.
string order_by = 5;
}
// The response from listing files.
message ListFilesResponse {
// The files returned.
repeated File files = 1;
// The token to retrieve the next page of files, or empty if there are no
// more files to return.
string next_page_token = 2;
}
// The request to retrieve a file.
message GetFileRequest {
// Required. The name of the file to retrieve.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "artifactregistry.googleapis.com/File"
}
];
}