1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 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.v1; 18*d5c09012SAndroid Build Coastguard Worker 19*d5c09012SAndroid Build Coastguard Workerimport "google/api/field_behavior.proto"; 20*d5c09012SAndroid Build Coastguard Workerimport "google/api/resource.proto"; 21*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/timestamp.proto"; 22*d5c09012SAndroid Build Coastguard Worker 23*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; 24*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; 25*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true; 26*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "FileProto"; 27*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.devtools.artifactregistry.v1"; 28*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; 29*d5c09012SAndroid Build Coastguard Workeroption ruby_package = "Google::Cloud::ArtifactRegistry::V1"; 30*d5c09012SAndroid Build Coastguard Worker 31*d5c09012SAndroid Build Coastguard Worker// A hash of file content. 32*d5c09012SAndroid Build Coastguard Workermessage Hash { 33*d5c09012SAndroid Build Coastguard Worker // The algorithm used to compute the hash. 34*d5c09012SAndroid Build Coastguard Worker enum HashType { 35*d5c09012SAndroid Build Coastguard Worker // Unspecified. 36*d5c09012SAndroid Build Coastguard Worker HASH_TYPE_UNSPECIFIED = 0; 37*d5c09012SAndroid Build Coastguard Worker 38*d5c09012SAndroid Build Coastguard Worker // SHA256 hash. 39*d5c09012SAndroid Build Coastguard Worker SHA256 = 1; 40*d5c09012SAndroid Build Coastguard Worker 41*d5c09012SAndroid Build Coastguard Worker // MD5 hash. 42*d5c09012SAndroid Build Coastguard Worker MD5 = 2; 43*d5c09012SAndroid Build Coastguard Worker } 44*d5c09012SAndroid Build Coastguard Worker 45*d5c09012SAndroid Build Coastguard Worker // The algorithm used to compute the hash value. 46*d5c09012SAndroid Build Coastguard Worker HashType type = 1; 47*d5c09012SAndroid Build Coastguard Worker 48*d5c09012SAndroid Build Coastguard Worker // The hash value. 49*d5c09012SAndroid Build Coastguard Worker bytes value = 2; 50*d5c09012SAndroid Build Coastguard Worker} 51*d5c09012SAndroid Build Coastguard Worker 52*d5c09012SAndroid Build Coastguard Worker// Files store content that is potentially associated with Packages or Versions. 53*d5c09012SAndroid Build Coastguard Workermessage File { 54*d5c09012SAndroid Build Coastguard Worker option (google.api.resource) = { 55*d5c09012SAndroid Build Coastguard Worker type: "artifactregistry.googleapis.com/File" 56*d5c09012SAndroid Build Coastguard Worker pattern: "projects/{project}/locations/{location}/repositories/{repository}/files/{file}" 57*d5c09012SAndroid Build Coastguard Worker }; 58*d5c09012SAndroid Build Coastguard Worker 59*d5c09012SAndroid Build Coastguard Worker // The name of the file, for example: 60*d5c09012SAndroid Build Coastguard Worker // "projects/p1/locations/us-central1/repositories/repo1/files/a%2Fb%2Fc.txt". 61*d5c09012SAndroid Build Coastguard Worker // If the file ID part contains slashes, they are escaped. 62*d5c09012SAndroid Build Coastguard Worker string name = 1; 63*d5c09012SAndroid Build Coastguard Worker 64*d5c09012SAndroid Build Coastguard Worker // The size of the File in bytes. 65*d5c09012SAndroid Build Coastguard Worker int64 size_bytes = 3; 66*d5c09012SAndroid Build Coastguard Worker 67*d5c09012SAndroid Build Coastguard Worker // The hashes of the file content. 68*d5c09012SAndroid Build Coastguard Worker repeated Hash hashes = 4; 69*d5c09012SAndroid Build Coastguard Worker 70*d5c09012SAndroid Build Coastguard Worker // Output only. The time when the File was created. 71*d5c09012SAndroid Build Coastguard Worker google.protobuf.Timestamp create_time = 5 72*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OUTPUT_ONLY]; 73*d5c09012SAndroid Build Coastguard Worker 74*d5c09012SAndroid Build Coastguard Worker // Output only. The time when the File was last updated. 75*d5c09012SAndroid Build Coastguard Worker google.protobuf.Timestamp update_time = 6 76*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OUTPUT_ONLY]; 77*d5c09012SAndroid Build Coastguard Worker 78*d5c09012SAndroid Build Coastguard Worker // The name of the Package or Version that owns this file, if any. 79*d5c09012SAndroid Build Coastguard Worker string owner = 7; 80*d5c09012SAndroid Build Coastguard Worker 81*d5c09012SAndroid Build Coastguard Worker // Output only. The time when the last attempt to refresh the file's data was 82*d5c09012SAndroid Build Coastguard Worker // made. Only set when the repository is remote. 83*d5c09012SAndroid Build Coastguard Worker google.protobuf.Timestamp fetch_time = 8 84*d5c09012SAndroid Build Coastguard Worker [(google.api.field_behavior) = OUTPUT_ONLY]; 85*d5c09012SAndroid Build Coastguard Worker} 86*d5c09012SAndroid Build Coastguard Worker 87*d5c09012SAndroid Build Coastguard Worker// The request to list files. 88*d5c09012SAndroid Build Coastguard Workermessage ListFilesRequest { 89*d5c09012SAndroid Build Coastguard Worker // Required. The name of the repository whose files will be listed. For 90*d5c09012SAndroid Build Coastguard Worker // example: "projects/p1/locations/us-central1/repositories/repo1 91*d5c09012SAndroid Build Coastguard Worker string parent = 1 [ 92*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = REQUIRED, 93*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { 94*d5c09012SAndroid Build Coastguard Worker child_type: "artifactregistry.googleapis.com/File" 95*d5c09012SAndroid Build Coastguard Worker } 96*d5c09012SAndroid Build Coastguard Worker ]; 97*d5c09012SAndroid Build Coastguard Worker 98*d5c09012SAndroid Build Coastguard Worker // An expression for filtering the results of the request. Filter rules are 99*d5c09012SAndroid Build Coastguard Worker // case insensitive. The fields eligible for filtering are: 100*d5c09012SAndroid Build Coastguard Worker // 101*d5c09012SAndroid Build Coastguard Worker // * `name` 102*d5c09012SAndroid Build Coastguard Worker // * `owner` 103*d5c09012SAndroid Build Coastguard Worker // 104*d5c09012SAndroid Build Coastguard Worker // An example of using a filter: 105*d5c09012SAndroid Build Coastguard Worker // 106*d5c09012SAndroid Build Coastguard Worker // * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an 107*d5c09012SAndroid Build Coastguard Worker // ID starting with "a/b/". 108*d5c09012SAndroid Build Coastguard Worker // * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` --> 109*d5c09012SAndroid Build Coastguard Worker // Files owned by the version `1.0` in package `pkg1`. 110*d5c09012SAndroid Build Coastguard Worker string filter = 4; 111*d5c09012SAndroid Build Coastguard Worker 112*d5c09012SAndroid Build Coastguard Worker // The maximum number of files to return. 113*d5c09012SAndroid Build Coastguard Worker int32 page_size = 2; 114*d5c09012SAndroid Build Coastguard Worker 115*d5c09012SAndroid Build Coastguard Worker // The next_page_token value returned from a previous list request, if any. 116*d5c09012SAndroid Build Coastguard Worker string page_token = 3; 117*d5c09012SAndroid Build Coastguard Worker 118*d5c09012SAndroid Build Coastguard Worker // The field to order the results by. 119*d5c09012SAndroid Build Coastguard Worker string order_by = 5; 120*d5c09012SAndroid Build Coastguard Worker} 121*d5c09012SAndroid Build Coastguard Worker 122*d5c09012SAndroid Build Coastguard Worker// The response from listing files. 123*d5c09012SAndroid Build Coastguard Workermessage ListFilesResponse { 124*d5c09012SAndroid Build Coastguard Worker // The files returned. 125*d5c09012SAndroid Build Coastguard Worker repeated File files = 1; 126*d5c09012SAndroid Build Coastguard Worker 127*d5c09012SAndroid Build Coastguard Worker // The token to retrieve the next page of files, or empty if there are no 128*d5c09012SAndroid Build Coastguard Worker // more files to return. 129*d5c09012SAndroid Build Coastguard Worker string next_page_token = 2; 130*d5c09012SAndroid Build Coastguard Worker} 131*d5c09012SAndroid Build Coastguard Worker 132*d5c09012SAndroid Build Coastguard Worker// The request to retrieve a file. 133*d5c09012SAndroid Build Coastguard Workermessage GetFileRequest { 134*d5c09012SAndroid Build Coastguard Worker // Required. The name of the file to retrieve. 135*d5c09012SAndroid Build Coastguard Worker string name = 1 [ 136*d5c09012SAndroid Build Coastguard Worker (google.api.field_behavior) = REQUIRED, 137*d5c09012SAndroid Build Coastguard Worker (google.api.resource_reference) = { 138*d5c09012SAndroid Build Coastguard Worker type: "artifactregistry.googleapis.com/File" 139*d5c09012SAndroid Build Coastguard Worker } 140*d5c09012SAndroid Build Coastguard Worker ]; 141*d5c09012SAndroid Build Coastguard Worker} 142