xref: /aosp_15_r20/external/googleapis/google/devtools/artifactregistry/v1/package.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.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 = "PackageProto";
27option java_package = "com.google.devtools.artifactregistry.v1";
28option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1";
29option ruby_package = "Google::Cloud::ArtifactRegistry::V1";
30
31// Packages are named collections of versions.
32message Package {
33  option (google.api.resource) = {
34    type: "artifactregistry.googleapis.com/Package"
35    pattern: "projects/{project}/locations/{location}/repositories/{repository}/packages/{package}"
36  };
37
38  // The name of the package, for example:
39  // `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
40  // If the package ID part contains slashes, the slashes are escaped.
41  string name = 1;
42
43  // The display name of the package.
44  string display_name = 2;
45
46  // The time when the package was created.
47  google.protobuf.Timestamp create_time = 5;
48
49  // The time when the package was last updated. This includes publishing a new
50  // version of the package.
51  google.protobuf.Timestamp update_time = 6;
52}
53
54// The request to list packages.
55message ListPackagesRequest {
56  // Required. The name of the parent resource whose packages will be listed.
57  string parent = 1 [
58    (google.api.field_behavior) = REQUIRED,
59    (google.api.resource_reference) = {
60      child_type: "artifactregistry.googleapis.com/Package"
61    }
62  ];
63
64  // The maximum number of packages to return. Maximum page size is 1,000.
65  int32 page_size = 2;
66
67  // The next_page_token value returned from a previous list request, if any.
68  string page_token = 3;
69}
70
71// The response from listing packages.
72message ListPackagesResponse {
73  // The packages returned.
74  repeated Package packages = 1;
75
76  // The token to retrieve the next page of packages, or empty if there are no
77  // more packages to return.
78  string next_page_token = 2;
79}
80
81// The request to retrieve a package.
82message GetPackageRequest {
83  // Required. The name of the package to retrieve.
84  string name = 1 [
85    (google.api.field_behavior) = REQUIRED,
86    (google.api.resource_reference) = {
87      type: "artifactregistry.googleapis.com/Package"
88    }
89  ];
90}
91
92// The request to delete a package.
93message DeletePackageRequest {
94  // Required. The name of the package to delete.
95  string name = 1 [
96    (google.api.field_behavior) = REQUIRED,
97    (google.api.resource_reference) = {
98      type: "artifactregistry.googleapis.com/Package"
99    }
100  ];
101}
102