xref: /aosp_15_r20/external/googleapis/google/devtools/artifactregistry/v1/apt_artifact.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/rpc/status.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 = "AptArtifactProto";
27option java_package = "com.google.devtools.artifactregistry.v1";
28option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1";
29option ruby_package = "Google::Cloud::ArtifactRegistry::V1";
30
31// A detailed representation of an Apt artifact. Information in the record
32// is derived from the archive's control file.
33// See https://www.debian.org/doc/debian-policy/ch-controlfields.html
34message AptArtifact {
35  option (google.api.resource) = {
36    type: "artifactregistry.googleapis.com/AptArtifact"
37    pattern: "projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}"
38  };
39
40  // Package type is either binary or source.
41  enum PackageType {
42    // Package type is not specified.
43    PACKAGE_TYPE_UNSPECIFIED = 0;
44
45    // Binary package.
46    BINARY = 1;
47
48    // Source package.
49    SOURCE = 2;
50  }
51
52  // Output only. The Artifact Registry resource name of the artifact.
53  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
54
55  // Output only. The Apt package name of the artifact.
56  string package_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
57
58  // Output only. An artifact is a binary or source package.
59  PackageType package_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
60
61  // Output only. Operating system architecture of the artifact.
62  string architecture = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
63
64  // Output only. Repository component of the artifact.
65  string component = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
66
67  // Output only. Contents of the artifact's control metadata file.
68  bytes control_file = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
69}
70
71// Google Cloud Storage location where the artifacts currently reside.
72message ImportAptArtifactsGcsSource {
73  // Cloud Storage paths URI (e.g., gs://my_bucket//my_object).
74  repeated string uris = 1;
75
76  // Supports URI wildcards for matching multiple objects from a single URI.
77  bool use_wildcards = 2;
78}
79
80// The request to import new apt artifacts.
81message ImportAptArtifactsRequest {
82  // The source location of the package binaries.
83  oneof source {
84    // Google Cloud Storage location where input content is located.
85    ImportAptArtifactsGcsSource gcs_source = 2;
86  }
87
88  // The name of the parent resource where the artifacts will be imported.
89  string parent = 1;
90}
91
92// Error information explaining why a package was not imported.
93message ImportAptArtifactsErrorInfo {
94  // The source that was not imported.
95  oneof source {
96    // Google Cloud Storage location requested.
97    ImportAptArtifactsGcsSource gcs_source = 1;
98  }
99
100  // The detailed error status.
101  google.rpc.Status error = 2;
102}
103
104// The response message from importing APT artifacts.
105message ImportAptArtifactsResponse {
106  // The Apt artifacts imported.
107  repeated AptArtifact apt_artifacts = 1;
108
109  // Detailed error info for packages that were not imported.
110  repeated ImportAptArtifactsErrorInfo errors = 2;
111}
112
113// The operation metadata for importing artifacts.
114message ImportAptArtifactsMetadata {}
115