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.artifactregistry.v1; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/protobuf/timestamp.proto"; 22 23option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; 24option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; 25option java_multiple_files = true; 26option java_outer_classname = "ArtifactProto"; 27option java_package = "com.google.devtools.artifactregistry.v1"; 28option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; 29option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; 30 31// DockerImage represents a docker artifact. 32// The following fields are returned as untyped metadata in the Version 33// resource, using camelcase keys (i.e. metadata.imageSizeBytes): 34// * imageSizeBytes 35// * mediaType 36// * buildTime 37message DockerImage { 38 option (google.api.resource) = { 39 type: "artifactregistry.googleapis.com/DockerImage" 40 pattern: "projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}" 41 }; 42 43 // Required. registry_location, project_id, repository_name and image id forms 44 // a unique image 45 // name:`projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>`. 46 // For example, 47 // "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/ 48 // nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf", 49 // where "us-west4" is the registry_location, "test-project" is the 50 // project_id, "test-repo" is the repository_name and 51 // "nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf" 52 // is the image's digest. 53 string name = 1 [(google.api.field_behavior) = REQUIRED]; 54 55 // Required. URL to access the image. 56 // Example: 57 // us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf 58 string uri = 2 [(google.api.field_behavior) = REQUIRED]; 59 60 // Tags attached to this image. 61 repeated string tags = 3; 62 63 // Calculated size of the image. 64 // This field is returned as the 'metadata.imageSizeBytes' field in the 65 // Version resource. 66 int64 image_size_bytes = 4; 67 68 // Time the image was uploaded. 69 google.protobuf.Timestamp upload_time = 5; 70 71 // Media type of this image, e.g. 72 // "application/vnd.docker.distribution.manifest.v2+json". 73 // This field is returned as the 'metadata.mediaType' field in the 74 // Version resource. 75 string media_type = 6; 76 77 // The time this image was built. 78 // This field is returned as the 'metadata.buildTime' field in the 79 // Version resource. 80 // The build time is returned to the client as an RFC 3339 string, which can 81 // be easily used with the JavaScript Date constructor. 82 google.protobuf.Timestamp build_time = 7; 83 84 // Output only. The time when the docker image was last updated. 85 google.protobuf.Timestamp update_time = 8 86 [(google.api.field_behavior) = OUTPUT_ONLY]; 87} 88 89// The request to list docker images. 90message ListDockerImagesRequest { 91 // Required. The name of the parent resource whose docker images will be 92 // listed. 93 string parent = 1 [(google.api.field_behavior) = REQUIRED]; 94 95 // The maximum number of artifacts to return. 96 int32 page_size = 2; 97 98 // The next_page_token value returned from a previous list request, if any. 99 string page_token = 3; 100 101 // The field to order the results by. 102 string order_by = 4; 103} 104 105// The response from listing docker images. 106message ListDockerImagesResponse { 107 // The docker images returned. 108 repeated DockerImage docker_images = 1; 109 110 // The token to retrieve the next page of artifacts, or empty if there are no 111 // more artifacts to return. 112 string next_page_token = 2; 113} 114 115// The request to get docker images. 116message GetDockerImageRequest { 117 // Required. The name of the docker images. 118 string name = 1 [ 119 (google.api.field_behavior) = REQUIRED, 120 (google.api.resource_reference) = { 121 type: "artifactregistry.googleapis.com/DockerImage" 122 } 123 ]; 124} 125 126// MavenArtifact represents a maven artifact. 127message MavenArtifact { 128 option (google.api.resource) = { 129 type: "artifactregistry.googleapis.com/MavenArtifact" 130 pattern: "projects/{project}/locations/{location}/repositories/{repository}/mavenArtifacts/{maven_artifact}" 131 }; 132 133 // Required. registry_location, project_id, repository_name and maven_artifact 134 // forms a unique artifact For example, 135 // "projects/test-project/locations/us-west4/repositories/test-repo/mavenArtifacts/ 136 // com.google.guava:guava:31.0-jre", 137 // where "us-west4" is the registry_location, "test-project" is the 138 // project_id, "test-repo" is the repository_name and 139 // "com.google.guava:guava:31.0-jre" 140 // is the maven artifact. 141 string name = 1 [(google.api.field_behavior) = REQUIRED]; 142 143 // Required. URL to access the pom file of the artifact. 144 // Example: 145 // us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom 146 string pom_uri = 2 [(google.api.field_behavior) = REQUIRED]; 147 148 // Group ID for the artifact. 149 // Example: 150 // com.google.guava 151 string group_id = 3; 152 153 // Artifact ID for the artifact. 154 string artifact_id = 4; 155 156 // Version of this artifact. 157 string version = 5; 158 159 // Output only. Time the artifact was created. 160 google.protobuf.Timestamp create_time = 6 161 [(google.api.field_behavior) = OUTPUT_ONLY]; 162 163 // Output only. Time the artifact was updated. 164 google.protobuf.Timestamp update_time = 7 165 [(google.api.field_behavior) = OUTPUT_ONLY]; 166} 167 168// The request to list maven artifacts. 169message ListMavenArtifactsRequest { 170 // Required. The name of the parent resource whose maven artifacts will be 171 // listed. 172 string parent = 1 [ 173 (google.api.field_behavior) = REQUIRED, 174 (google.api.resource_reference) = { 175 child_type: "artifactregistry.googleapis.com/MavenArtifact" 176 } 177 ]; 178 179 // The maximum number of artifacts to return. 180 int32 page_size = 2; 181 182 // The next_page_token value returned from a previous list request, if any. 183 string page_token = 3; 184} 185 186// The response from listing maven artifacts. 187message ListMavenArtifactsResponse { 188 // The maven artifacts returned. 189 repeated MavenArtifact maven_artifacts = 1; 190 191 // The token to retrieve the next page of artifacts, or empty if there are no 192 // more artifacts to return. 193 string next_page_token = 2; 194} 195 196// The request to get maven artifacts. 197message GetMavenArtifactRequest { 198 // Required. The name of the maven artifact. 199 string name = 1 [ 200 (google.api.field_behavior) = REQUIRED, 201 (google.api.resource_reference) = { 202 type: "artifactregistry.googleapis.com/MavenArtifact" 203 } 204 ]; 205} 206 207// NpmPackage represents an npm artifact. 208message NpmPackage { 209 option (google.api.resource) = { 210 type: "artifactregistry.googleapis.com/NpmPackage" 211 pattern: "projects/{project}/locations/{location}/repositories/{repository}/npmPackages/{npm_package}" 212 }; 213 214 // Required. registry_location, project_id, repository_name and npm_package 215 // forms a unique package For example, 216 // "projects/test-project/locations/us-west4/repositories/test-repo/npmPackages/ 217 // npm_test:1.0.0", 218 // where "us-west4" is the registry_location, "test-project" is the 219 // project_id, "test-repo" is the repository_name and 220 // npm_test:1.0.0" is the npm package. 221 string name = 1 [(google.api.field_behavior) = REQUIRED]; 222 223 // Package for the artifact. 224 string package_name = 3; 225 226 // Version of this package. 227 string version = 4; 228 229 // Tags attached to this package. 230 repeated string tags = 5; 231 232 // Output only. Time the package was created. 233 google.protobuf.Timestamp create_time = 6 234 [(google.api.field_behavior) = OUTPUT_ONLY]; 235 236 // Output only. Time the package was updated. 237 google.protobuf.Timestamp update_time = 7 238 [(google.api.field_behavior) = OUTPUT_ONLY]; 239} 240 241// The request to list npm packages. 242message ListNpmPackagesRequest { 243 // Required. The name of the parent resource whose npm packages will be 244 // listed. 245 string parent = 1 [ 246 (google.api.field_behavior) = REQUIRED, 247 (google.api.resource_reference) = { 248 child_type: "artifactregistry.googleapis.com/NpmPackage" 249 } 250 ]; 251 252 // The maximum number of artifacts to return. 253 int32 page_size = 2; 254 255 // The next_page_token value returned from a previous list request, if any. 256 string page_token = 3; 257} 258 259// The response from listing npm packages. 260message ListNpmPackagesResponse { 261 // The npm packages returned. 262 repeated NpmPackage npm_packages = 1; 263 264 // The token to retrieve the next page of artifacts, or empty if there are no 265 // more artifacts to return. 266 string next_page_token = 2; 267} 268 269// The request to get npm packages. 270message GetNpmPackageRequest { 271 // Required. The name of the npm package. 272 string name = 1 [ 273 (google.api.field_behavior) = REQUIRED, 274 (google.api.resource_reference) = { 275 type: "artifactregistry.googleapis.com/NpmPackage" 276 } 277 ]; 278} 279 280// PythonPackage represents a python artifact. 281message PythonPackage { 282 option (google.api.resource) = { 283 type: "artifactregistry.googleapis.com/PythonPackage" 284 pattern: "projects/{project}/locations/{location}/repositories/{repository}/pythonPackages/{python_package}" 285 }; 286 287 // Required. registry_location, project_id, repository_name and python_package 288 // forms a unique package 289 // name:`projects/<project_id>/locations/<location>/repository/<repository_name>/pythonPackages/<python_package>`. 290 // For example, 291 // "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/ 292 // python_package:1.0.0", 293 // where "us-west4" is the registry_location, "test-project" is the 294 // project_id, "test-repo" is the repository_name and 295 // python_package:1.0.0" is the python package. 296 string name = 1 [(google.api.field_behavior) = REQUIRED]; 297 298 // Required. URL to access the package. 299 // Example: 300 // us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz 301 string uri = 2 [(google.api.field_behavior) = REQUIRED]; 302 303 // Package for the artifact. 304 string package_name = 3; 305 306 // Version of this package. 307 string version = 4; 308 309 // Output only. Time the package was created. 310 google.protobuf.Timestamp create_time = 6 311 [(google.api.field_behavior) = OUTPUT_ONLY]; 312 313 // Output only. Time the package was updated. 314 google.protobuf.Timestamp update_time = 7 315 [(google.api.field_behavior) = OUTPUT_ONLY]; 316} 317 318// The request to list python packages. 319message ListPythonPackagesRequest { 320 // Required. The name of the parent resource whose python packages will be 321 // listed. 322 string parent = 1 [ 323 (google.api.field_behavior) = REQUIRED, 324 (google.api.resource_reference) = { 325 child_type: "artifactregistry.googleapis.com/PythonPackage" 326 } 327 ]; 328 329 // The maximum number of artifacts to return. 330 int32 page_size = 2; 331 332 // The next_page_token value returned from a previous list request, if any. 333 string page_token = 3; 334} 335 336// The response from listing python packages. 337message ListPythonPackagesResponse { 338 // The python packages returned. 339 repeated PythonPackage python_packages = 1; 340 341 // The token to retrieve the next page of artifacts, or empty if there are no 342 // more artifacts to return. 343 string next_page_token = 2; 344} 345 346// The request to get python packages. 347message GetPythonPackageRequest { 348 // Required. The name of the python package. 349 string name = 1 [ 350 (google.api.field_behavior) = REQUIRED, 351 (google.api.resource_reference) = { 352 type: "artifactregistry.googleapis.com/PythonPackage" 353 } 354 ]; 355} 356