|
| 1 | +// Copyright 2025 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 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.devtools.artifactregistry.v1; |
| 18 | + |
| 19 | +import "google/api/field_behavior.proto"; |
| 20 | +import "google/api/resource.proto"; |
| 21 | +import "google/devtools/artifactregistry/v1/file.proto"; |
| 22 | +import "google/devtools/artifactregistry/v1/version.proto"; |
| 23 | + |
| 24 | +option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1"; |
| 25 | +option go_package = "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb;artifactregistrypb"; |
| 26 | +option java_multiple_files = true; |
| 27 | +option java_outer_classname = "ExportProto"; |
| 28 | +option java_package = "com.google.devtools.artifactregistry.v1"; |
| 29 | +option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1"; |
| 30 | +option ruby_package = "Google::Cloud::ArtifactRegistry::V1"; |
| 31 | + |
| 32 | +// The request for exporting an artifact to a destination. |
| 33 | +message ExportArtifactRequest { |
| 34 | + // The artifact to be exported. |
| 35 | + oneof source_artifact { |
| 36 | + // The artifact version to export. |
| 37 | + // Format: |
| 38 | + // projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/versions/{version} |
| 39 | + string source_version = 2 [(google.api.resource_reference) = { |
| 40 | + type: "artifactregistry.googleapis.com/Version" |
| 41 | + }]; |
| 42 | + |
| 43 | + // The artifact tag to export. |
| 44 | + // Format:projects/{project}/locations/{location}/repositories/{repository}/packages/{package}/tags/{tag} |
| 45 | + string source_tag = 4 [(google.api.resource_reference) = { |
| 46 | + type: "artifactregistry.googleapis.com/Tag" |
| 47 | + }]; |
| 48 | + } |
| 49 | + |
| 50 | + // The destination to export the artifact to. |
| 51 | + oneof destination { |
| 52 | + // The Cloud Storage path to export the artifact to. Should start with the |
| 53 | + // bucket name, and optionally have a directory path. Examples: |
| 54 | + // `dst_bucket`, `dst_bucket/sub_dir`. |
| 55 | + // Existing objects with the same path will be overwritten. |
| 56 | + string gcs_path = 3; |
| 57 | + } |
| 58 | + |
| 59 | + // Required. The repository of the artifact to export. |
| 60 | + // Format: projects/{project}/locations/{location}/repositories/{repository} |
| 61 | + string repository = 1 [ |
| 62 | + (google.api.field_behavior) = REQUIRED, |
| 63 | + (google.api.resource_reference) = { |
| 64 | + type: "artifactregistry.googleapis.com/Repository" |
| 65 | + } |
| 66 | + ]; |
| 67 | +} |
| 68 | + |
| 69 | +// The response for exporting an artifact to a destination. |
| 70 | +message ExportArtifactResponse { |
| 71 | + // The exported version. Should be the same as the request version with |
| 72 | + // fingerprint resource name. |
| 73 | + Version exported_version = 1; |
| 74 | +} |
| 75 | + |
| 76 | +// The LRO metadata for exporting an artifact. |
| 77 | +message ExportArtifactMetadata { |
| 78 | + // The exported artifact file. |
| 79 | + message ExportedFile { |
| 80 | + // The destination the file was exported to. |
| 81 | + oneof destination { |
| 82 | + // Cloud Storage Object path of the exported file. Examples: |
| 83 | + // `dst_bucket/file1`, `dst_bucket/sub_dir/file1` |
| 84 | + string gcs_object_path = 2; |
| 85 | + } |
| 86 | + |
| 87 | + // Name of the exported artifact file. |
| 88 | + // Format: `projects/p1/locations/us/repositories/repo1/files/file1` |
| 89 | + string name = 1 [(google.api.resource_reference) = { |
| 90 | + type: "artifactregistry.googleapis.com/File" |
| 91 | + }]; |
| 92 | + |
| 93 | + // The hashes of the file content. |
| 94 | + repeated Hash hashes = 3; |
| 95 | + } |
| 96 | + |
| 97 | + // The exported artifact files. |
| 98 | + repeated ExportedFile exported_files = 1; |
| 99 | +} |
0 commit comments