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