feat: create the client for artifactregistry API.
PiperOrigin-RevId: 338294847
This commit is contained in:
parent
29b7899129
commit
0f626de454
|
|
@ -0,0 +1,189 @@
|
|||
# This file was automatically generated by BuildFileGenerator
|
||||
|
||||
# This is an API workspace, having public visibility by default makes perfect sense.
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
##############################################################################
|
||||
# Common
|
||||
##############################################################################
|
||||
load("@rules_proto//proto:defs.bzl", "proto_library")
|
||||
|
||||
proto_library(
|
||||
name = "artifactregistry_proto",
|
||||
srcs = [
|
||||
"artifact.proto",
|
||||
"file.proto",
|
||||
"package.proto",
|
||||
"repository.proto",
|
||||
"service.proto",
|
||||
"settings.proto",
|
||||
"tag.proto",
|
||||
"version.proto",
|
||||
],
|
||||
deps = [
|
||||
"//google/api:annotations_proto",
|
||||
"//google/api:client_proto",
|
||||
"//google/api:field_behavior_proto",
|
||||
"//google/api:resource_proto",
|
||||
"//google/iam/v1:iam_policy_proto",
|
||||
"//google/iam/v1:policy_proto",
|
||||
"//google/longrunning:operations_proto",
|
||||
"@com_google_protobuf//:empty_proto",
|
||||
"@com_google_protobuf//:field_mask_proto",
|
||||
"@com_google_protobuf//:timestamp_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Java
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"java_grpc_library",
|
||||
"java_proto_library",
|
||||
)
|
||||
|
||||
java_proto_library(
|
||||
name = "artifactregistry_java_proto",
|
||||
deps = [":artifactregistry_proto"],
|
||||
)
|
||||
|
||||
java_grpc_library(
|
||||
name = "artifactregistry_java_grpc",
|
||||
srcs = [":artifactregistry_proto"],
|
||||
deps = [":artifactregistry_java_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Go
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"go_proto_library",
|
||||
)
|
||||
|
||||
go_proto_library(
|
||||
name = "artifactregistry_go_proto",
|
||||
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
|
||||
importpath = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2",
|
||||
protos = [":artifactregistry_proto"],
|
||||
deps = [
|
||||
"//google/api:annotations_go_proto",
|
||||
"//google/iam/v1:iam_go_proto",
|
||||
"//google/longrunning:longrunning_go_proto",
|
||||
],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Python
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"moved_proto_library",
|
||||
"py_grpc_library",
|
||||
"py_proto_library",
|
||||
)
|
||||
|
||||
moved_proto_library(
|
||||
name = "artifactregistry_moved_proto",
|
||||
srcs = [":artifactregistry_proto"],
|
||||
deps = [
|
||||
"//google/api:annotations_proto",
|
||||
"//google/api:client_proto",
|
||||
"//google/api:field_behavior_proto",
|
||||
"//google/api:resource_proto",
|
||||
"//google/iam/v1:iam_policy_proto",
|
||||
"//google/iam/v1:policy_proto",
|
||||
"//google/longrunning:operations_proto",
|
||||
"@com_google_protobuf//:empty_proto",
|
||||
"@com_google_protobuf//:field_mask_proto",
|
||||
"@com_google_protobuf//:timestamp_proto",
|
||||
],
|
||||
)
|
||||
|
||||
py_proto_library(
|
||||
name = "artifactregistry_py_proto",
|
||||
plugin = "@protoc_docs_plugin//:docs_plugin",
|
||||
deps = [":artifactregistry_moved_proto"],
|
||||
)
|
||||
|
||||
py_grpc_library(
|
||||
name = "artifactregistry_py_grpc",
|
||||
srcs = [":artifactregistry_moved_proto"],
|
||||
deps = [":artifactregistry_py_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# PHP
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"php_grpc_library",
|
||||
"php_proto_library",
|
||||
)
|
||||
|
||||
php_proto_library(
|
||||
name = "artifactregistry_php_proto",
|
||||
deps = [":artifactregistry_proto"],
|
||||
)
|
||||
|
||||
php_grpc_library(
|
||||
name = "artifactregistry_php_grpc",
|
||||
srcs = [":artifactregistry_proto"],
|
||||
deps = [":artifactregistry_php_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# Node.js
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"nodejs_gapic_assembly_pkg",
|
||||
"nodejs_gapic_library",
|
||||
)
|
||||
|
||||
|
||||
##############################################################################
|
||||
# Ruby
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"ruby_grpc_library",
|
||||
"ruby_proto_library",
|
||||
)
|
||||
|
||||
ruby_proto_library(
|
||||
name = "artifactregistry_ruby_proto",
|
||||
deps = [":artifactregistry_proto"],
|
||||
)
|
||||
|
||||
ruby_grpc_library(
|
||||
name = "artifactregistry_ruby_grpc",
|
||||
srcs = [":artifactregistry_proto"],
|
||||
deps = [":artifactregistry_ruby_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# C#
|
||||
##############################################################################
|
||||
load(
|
||||
"@com_google_googleapis_imports//:imports.bzl",
|
||||
"csharp_grpc_library",
|
||||
"csharp_proto_library",
|
||||
)
|
||||
|
||||
csharp_proto_library(
|
||||
name = "artifactregistry_csharp_proto",
|
||||
deps = [":artifactregistry_proto"],
|
||||
)
|
||||
|
||||
csharp_grpc_library(
|
||||
name = "artifactregistry_csharp_grpc",
|
||||
srcs = [":artifactregistry_proto"],
|
||||
deps = [":artifactregistry_csharp_proto"],
|
||||
)
|
||||
|
||||
##############################################################################
|
||||
# C++
|
||||
##############################################################################
|
||||
# Put your C++ code here
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
// Copyright 2020 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.devtools.artifactregistry.v1beta2;
|
||||
|
||||
import "google/api/field_behavior.proto";
|
||||
import "google/api/resource.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2";
|
||||
option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "ArtifactProto";
|
||||
option java_package = "com.google.devtools.artifactregistry.v1beta2";
|
||||
option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2";
|
||||
|
||||
// DockerImage represents a docker artifact.
|
||||
message DockerImage {
|
||||
option (google.api.resource) = {
|
||||
type: "artifactregistry.googleapis.com/DockerImage"
|
||||
pattern: "projects/{project}/locations/{location}/repositories/{repository}/dockerImages/{docker_image}"
|
||||
};
|
||||
|
||||
// Required. registry_location, project_id, repository_name and image id forms a unique
|
||||
// image
|
||||
// name:`projects/<project_id>/locations/<location>/repository/<repository_name>/dockerimages/<image>`.
|
||||
// For example,
|
||||
// "projects/test-project/locations/us-west4/repositories/test-repo/dockerimages/
|
||||
// nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf",
|
||||
// where "us-west4" is the registry_location, "test-project" is the
|
||||
// project_id, "test-repo" is the repository_name and
|
||||
// "nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf"
|
||||
// is the image's digest.
|
||||
string name = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Required. URL to access the image.
|
||||
// Example:
|
||||
// us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
|
||||
string uri = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Tags attached to this image.
|
||||
repeated string tags = 3;
|
||||
|
||||
// Calculated size of the image.
|
||||
int64 image_size_bytes = 4;
|
||||
|
||||
// Time the image was uploaded.
|
||||
google.protobuf.Timestamp upload_time = 5;
|
||||
|
||||
// Media type of this image, e.g.
|
||||
// "application/vnd.docker.distribution.manifest.v2+json".
|
||||
string media_type = 6;
|
||||
}
|
||||
|
||||
// The request to list docker images.
|
||||
message ListDockerImagesRequest {
|
||||
// Required. The name of the parent resource whose docker images will be listed.
|
||||
string parent = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = {
|
||||
type: "artifactregistry.googleapis.com/DockerImage"
|
||||
}
|
||||
];
|
||||
|
||||
// The maximum number of artifacts to return.
|
||||
int32 page_size = 2;
|
||||
|
||||
// The next_page_token value returned from a previous list request, if any.
|
||||
string page_token = 3;
|
||||
}
|
||||
|
||||
// The response from listing docker images.
|
||||
message ListDockerImagesResponse {
|
||||
// The docker images returned.
|
||||
repeated DockerImage docker_images = 1;
|
||||
|
||||
// The token to retrieve the next page of artifacts, or empty if there are no
|
||||
// more artifacts to return.
|
||||
string next_page_token = 2;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
type: com.google.api.codegen.ConfigProto
|
||||
config_schema_version: 2.0.0
|
||||
language_settings:
|
||||
java:
|
||||
package_name: com.google.devtools.artifactregistry.v1beta2
|
||||
python:
|
||||
package_name: google.devtools.artifactregistry_v1.gapic
|
||||
go:
|
||||
package_name: cloud.google.com/go/artifactregistryapiv1beta2
|
||||
csharp:
|
||||
package_name: Google.Devtools.Artifactregistry.V1beta2
|
||||
ruby:
|
||||
package_name: Google::Devtools::Artifactregistry::V1beta2
|
||||
php:
|
||||
package_name: Google\Devtools\Artifactregistry\V1beta2
|
||||
nodejs:
|
||||
package_name: artifactregistry.v1beta2
|
||||
domain_layer_location: google-cloud
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
{
|
||||
"methodConfig": [
|
||||
{
|
||||
"name": [
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "ListRepositories"
|
||||
},
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "GetRepository"
|
||||
},
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "DeleteRepository"
|
||||
},
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "ListPackages"
|
||||
},
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "GetPackage"
|
||||
},
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "DeletePackage"
|
||||
},
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "ListFiles"
|
||||
},
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "GetFile"
|
||||
},
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "ListVersions"
|
||||
},
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "GetVersion"
|
||||
},
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "DeleteVersion"
|
||||
},
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "ListTags"
|
||||
},
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "GetTag"
|
||||
},
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "DeleteTag"
|
||||
},
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "GetIamPolicy"
|
||||
},
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "ListDockerImages"
|
||||
}
|
||||
],
|
||||
"timeout": "30s",
|
||||
"retryPolicy": {
|
||||
"maxAttempts": 5,
|
||||
"initialBackoff": "0.100s",
|
||||
"maxBackoff": "60s",
|
||||
"backoffMultiplier": 1.3,
|
||||
"retryableStatusCodes": [
|
||||
"UNAVAILABLE"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": [
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "CreateRepository"
|
||||
},
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "UpdateRepository"
|
||||
},
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "CreateTag"
|
||||
},
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "UpdateTag"
|
||||
},
|
||||
{
|
||||
"service": "google.devtools.artifactregistry.v1beta2.ArtifactRegistry",
|
||||
"method": "TestIamPermissions"
|
||||
}
|
||||
],
|
||||
"timeout": "30s"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
type: google.api.Service
|
||||
config_version: 3
|
||||
name: artifactregistry.googleapis.com
|
||||
title: Artifact Registry API
|
||||
|
||||
apis:
|
||||
- name: google.devtools.artifactregistry.v1beta2.ArtifactRegistry
|
||||
|
||||
documentation:
|
||||
summary: |-
|
||||
Store and manage build artifacts in a scalable and integrated service built
|
||||
on Google infrastructure.
|
||||
overview: |-
|
||||
With Artifact Registry you can store and manage your build artifacts (e.g.
|
||||
Docker images, Maven packages, npm packages), in a scalable and integrated
|
||||
repository service built on Google infrastructure. You can manage
|
||||
repository access
|
||||
with IAM and interact with repositories via gcloud, Cloud Console, and
|
||||
native package format tools. The service can also be integrated with Cloud
|
||||
Build and other CI/CD systems. Artifact Registry abstracts away
|
||||
infrastructure management, so you can focus on what matters most —
|
||||
delivering value to the users of your services and applications. Note:
|
||||
Enabling the Artifact Registry API will not affect your use of Container
|
||||
Registry in the same project.
|
||||
|
||||
authentication:
|
||||
rules:
|
||||
- selector: 'google.devtools.artifactregistry.v1beta2.ArtifactRegistry.*'
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform,
|
||||
https://www.googleapis.com/auth/cloud-platform.read-only
|
||||
- selector: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateRepository
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform
|
||||
- selector: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.CreateTag
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform
|
||||
- selector: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeletePackage
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform
|
||||
- selector: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteRepository
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform
|
||||
- selector: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteTag
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform
|
||||
- selector: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.DeleteVersion
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform
|
||||
- selector: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.SetIamPolicy
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform
|
||||
- selector: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateRepository
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform
|
||||
- selector: google.devtools.artifactregistry.v1beta2.ArtifactRegistry.UpdateTag
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform
|
||||
- selector: 'google.longrunning.Operations.*'
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform,
|
||||
https://www.googleapis.com/auth/cloud-platform.read-only
|
||||
- selector: google.longrunning.Operations.CancelOperation
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform
|
||||
- selector: google.longrunning.Operations.DeleteOperation
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
// Copyright 2020 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.devtools.artifactregistry.v1beta2;
|
||||
|
||||
import "google/api/resource.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2";
|
||||
option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "FileProto";
|
||||
option java_package = "com.google.devtools.artifactregistry.v1beta2";
|
||||
option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2";
|
||||
|
||||
// A hash of file content.
|
||||
message Hash {
|
||||
// The algorithm used to compute the hash.
|
||||
enum HashType {
|
||||
// Unspecified.
|
||||
HASH_TYPE_UNSPECIFIED = 0;
|
||||
|
||||
// SHA256 hash.
|
||||
SHA256 = 1;
|
||||
}
|
||||
|
||||
// The algorithm used to compute the hash value.
|
||||
HashType type = 1;
|
||||
|
||||
// The hash value.
|
||||
bytes value = 2;
|
||||
}
|
||||
|
||||
// Files store content that is potentially associated with Packages or Versions.
|
||||
message File {
|
||||
option (google.api.resource) = {
|
||||
type: "artifactregistry.googleapis.com/File"
|
||||
pattern: "projects/{project}/locations/{location}/repositories/{repo}/files/{file}"
|
||||
};
|
||||
|
||||
// The name of the file, for example:
|
||||
// "projects/p1/locations/us-central1/repositories/repo1/files/a/b/c.txt".
|
||||
string name = 1;
|
||||
|
||||
// The size of the File in bytes.
|
||||
int64 size_bytes = 3;
|
||||
|
||||
// The hashes of the file content.
|
||||
repeated Hash hashes = 4;
|
||||
|
||||
// The time when the File was created.
|
||||
google.protobuf.Timestamp create_time = 5;
|
||||
|
||||
// The time when the File was last updated.
|
||||
google.protobuf.Timestamp update_time = 6;
|
||||
|
||||
// The name of the Package or Version that owns this file, if any.
|
||||
string owner = 7;
|
||||
}
|
||||
|
||||
// The request to list files.
|
||||
message ListFilesRequest {
|
||||
// The name of the parent resource whose files will be listed.
|
||||
string parent = 1;
|
||||
|
||||
// An expression for filtering the results of the request. Filter rules are
|
||||
// case insensitive. The fields eligible for filtering are:
|
||||
//
|
||||
// * `name`
|
||||
// * `owner`
|
||||
//
|
||||
// An example of using a filter:
|
||||
//
|
||||
// * `name="projects/p1/locations/us-central1/repositories/repo1/files/a/b/*"` --> Files with an
|
||||
// ID starting with "a/b/".
|
||||
// * `owner="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"` -->
|
||||
// Files owned by the version `1.0` in package `pkg1`.
|
||||
string filter = 4;
|
||||
|
||||
// The maximum number of files to return.
|
||||
int32 page_size = 2;
|
||||
|
||||
// The next_page_token value returned from a previous list request, if any.
|
||||
string page_token = 3;
|
||||
}
|
||||
|
||||
// The response from listing files.
|
||||
message ListFilesResponse {
|
||||
// The files returned.
|
||||
repeated File files = 1;
|
||||
|
||||
// The token to retrieve the next page of files, or empty if there are no
|
||||
// more files to return.
|
||||
string next_page_token = 2;
|
||||
}
|
||||
|
||||
// The request to retrieve a file.
|
||||
message GetFileRequest {
|
||||
// The name of the file to retrieve.
|
||||
string name = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
// Copyright 2020 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.devtools.artifactregistry.v1beta2;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2";
|
||||
option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "PackageProto";
|
||||
option java_package = "com.google.devtools.artifactregistry.v1beta2";
|
||||
option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2";
|
||||
|
||||
// Packages are named collections of versions.
|
||||
message Package {
|
||||
// The name of the package, for example:
|
||||
// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
|
||||
string name = 1;
|
||||
|
||||
// The display name of the package.
|
||||
string display_name = 2;
|
||||
|
||||
// The time when the package was created.
|
||||
google.protobuf.Timestamp create_time = 5;
|
||||
|
||||
// The time when the package was last updated. This includes publishing a new
|
||||
// version of the package.
|
||||
google.protobuf.Timestamp update_time = 6;
|
||||
}
|
||||
|
||||
// The request to list packages.
|
||||
message ListPackagesRequest {
|
||||
// The name of the parent resource whose packages will be listed.
|
||||
string parent = 1;
|
||||
|
||||
// The maximum number of packages to return.
|
||||
// Maximum page size is 10,000.
|
||||
int32 page_size = 2;
|
||||
|
||||
// The next_page_token value returned from a previous list request, if any.
|
||||
string page_token = 3;
|
||||
}
|
||||
|
||||
// The response from listing packages.
|
||||
message ListPackagesResponse {
|
||||
// The packages returned.
|
||||
repeated Package packages = 1;
|
||||
|
||||
// The token to retrieve the next page of packages, or empty if there are no
|
||||
// more packages to return.
|
||||
string next_page_token = 2;
|
||||
}
|
||||
|
||||
// The request to retrieve a package.
|
||||
message GetPackageRequest {
|
||||
// The name of the package to retrieve.
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
// The request to delete a package.
|
||||
message DeletePackageRequest {
|
||||
// The name of the package to delete.
|
||||
string name = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,133 @@
|
|||
// Copyright 2020 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.devtools.artifactregistry.v1beta2;
|
||||
|
||||
import "google/api/resource.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2";
|
||||
option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "RepositoryProto";
|
||||
option java_package = "com.google.devtools.artifactregistry.v1beta2";
|
||||
option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2";
|
||||
|
||||
// A Repository for storing artifacts with a specific format.
|
||||
message Repository {
|
||||
option (google.api.resource) = {
|
||||
type: "artifactregistry.googleapis.com/Repository"
|
||||
pattern: "projects/{project}/locations/{location}/repositories/{repository}"
|
||||
};
|
||||
|
||||
// A package format.
|
||||
enum Format {
|
||||
// Unspecified package format.
|
||||
FORMAT_UNSPECIFIED = 0;
|
||||
|
||||
// Docker package format.
|
||||
DOCKER = 1;
|
||||
}
|
||||
|
||||
// The name of the repository, for example:
|
||||
// "projects/p1/locations/us-central1/repositories/repo1".
|
||||
string name = 1;
|
||||
|
||||
// The format of packages that are stored in the repository.
|
||||
Format format = 2;
|
||||
|
||||
// The user-provided description of the repository.
|
||||
string description = 3;
|
||||
|
||||
// Labels with user-defined metadata.
|
||||
// This field may contain up to 64 entries. Label keys and values may be no
|
||||
// longer than 63 characters. Label keys must begin with a lowercase letter
|
||||
// and may only contain lowercase letters, numeric characters, underscores,
|
||||
// and dashes.
|
||||
map<string, string> labels = 4;
|
||||
|
||||
// The time when the repository was created.
|
||||
google.protobuf.Timestamp create_time = 5;
|
||||
|
||||
// The time when the repository was last updated.
|
||||
google.protobuf.Timestamp update_time = 6;
|
||||
|
||||
// The Cloud KMS resource name of the customer managed encryption key that’s
|
||||
// used to encrypt the contents of the Repository. Has the form:
|
||||
// `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`.
|
||||
// This value may not be changed after the Repository has been created.
|
||||
string kms_key_name = 8;
|
||||
}
|
||||
|
||||
// The request to list repositories.
|
||||
message ListRepositoriesRequest {
|
||||
// The name of the parent resource whose repositories will be listed.
|
||||
string parent = 1;
|
||||
|
||||
// The maximum number of repositories to return.
|
||||
// Maximum page size is 10,000.
|
||||
int32 page_size = 2;
|
||||
|
||||
// The next_page_token value returned from a previous list request, if any.
|
||||
string page_token = 3;
|
||||
}
|
||||
|
||||
// The response from listing repositories.
|
||||
message ListRepositoriesResponse {
|
||||
// The repositories returned.
|
||||
repeated Repository repositories = 1;
|
||||
|
||||
// The token to retrieve the next page of repositories, or empty if there are
|
||||
// no more repositories to return.
|
||||
string next_page_token = 2;
|
||||
}
|
||||
|
||||
// The request to retrieve a repository.
|
||||
message GetRepositoryRequest {
|
||||
// The name of the repository to retrieve.
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
// The request to create a new repository.
|
||||
message CreateRepositoryRequest {
|
||||
// The name of the parent resource where the repository will be created.
|
||||
string parent = 1;
|
||||
|
||||
// The repository id to use for this repository.
|
||||
string repository_id = 2;
|
||||
|
||||
// The repository to be created.
|
||||
Repository repository = 3;
|
||||
}
|
||||
|
||||
// The request to update a repository.
|
||||
message UpdateRepositoryRequest {
|
||||
// The repository that replaces the resource on the server.
|
||||
Repository repository = 1;
|
||||
|
||||
// The update mask applies to the resource. For the `FieldMask` definition,
|
||||
// see
|
||||
// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
|
||||
google.protobuf.FieldMask update_mask = 2;
|
||||
}
|
||||
|
||||
// The request to delete a repository.
|
||||
message DeleteRepositoryRequest {
|
||||
// The name of the repository to delete.
|
||||
string name = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,260 @@
|
|||
// Copyright 2020 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.devtools.artifactregistry.v1beta2;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/client.proto";
|
||||
import "google/devtools/artifactregistry/v1beta2/artifact.proto";
|
||||
import "google/devtools/artifactregistry/v1beta2/file.proto";
|
||||
import "google/devtools/artifactregistry/v1beta2/package.proto";
|
||||
import "google/devtools/artifactregistry/v1beta2/repository.proto";
|
||||
import "google/devtools/artifactregistry/v1beta2/tag.proto";
|
||||
import "google/devtools/artifactregistry/v1beta2/version.proto";
|
||||
import "google/iam/v1/iam_policy.proto";
|
||||
import "google/iam/v1/policy.proto";
|
||||
import "google/longrunning/operations.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
|
||||
option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2";
|
||||
option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "ServiceProto";
|
||||
option java_package = "com.google.devtools.artifactregistry.v1beta2";
|
||||
option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2";
|
||||
|
||||
// The Artifact Registry API service.
|
||||
//
|
||||
// Artifact Registry is an artifact management system for storing artifacts
|
||||
// from different package management systems.
|
||||
//
|
||||
// The resources managed by this API are:
|
||||
//
|
||||
// * Repositories, which group packages and their data.
|
||||
// * Packages, which group versions and their tags.
|
||||
// * Versions, which are specific forms of a package.
|
||||
// * Tags, which represent alternative names for versions.
|
||||
// * Files, which contain content and are optionally associated with a Package
|
||||
// or Version.
|
||||
service ArtifactRegistry {
|
||||
option (google.api.default_host) = "artifactregistry.googleapis.com";
|
||||
option (google.api.oauth_scopes) =
|
||||
"https://www.googleapis.com/auth/cloud-platform,"
|
||||
"https://www.googleapis.com/auth/cloud-platform.read-only";
|
||||
|
||||
// Lists repositories.
|
||||
rpc ListRepositories(ListRepositoriesRequest) returns (ListRepositoriesResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1beta2/{parent=projects/*/locations/*}/repositories"
|
||||
};
|
||||
option (google.api.method_signature) = "parent";
|
||||
}
|
||||
|
||||
// Gets a repository.
|
||||
rpc GetRepository(GetRepositoryRequest) returns (Repository) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1beta2/{name=projects/*/locations/*/repositories/*}"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
||||
// Creates a repository. The returned Operation will finish once the
|
||||
// repository has been created. Its response will be the created Repository.
|
||||
rpc CreateRepository(CreateRepositoryRequest) returns (google.longrunning.Operation) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1beta2/{parent=projects/*/locations/*}/repositories"
|
||||
body: "repository"
|
||||
};
|
||||
option (google.api.method_signature) = "parent,repository,repository_id";
|
||||
option (google.longrunning.operation_info) = {
|
||||
response_type: "Repository"
|
||||
metadata_type: "OperationMetadata"
|
||||
};
|
||||
}
|
||||
|
||||
// Updates a repository.
|
||||
rpc UpdateRepository(UpdateRepositoryRequest) returns (Repository) {
|
||||
option (google.api.http) = {
|
||||
patch: "/v1beta2/{repository.name=projects/*/locations/*/repositories/*}"
|
||||
body: "repository"
|
||||
};
|
||||
option (google.api.method_signature) = "repository,update_mask";
|
||||
}
|
||||
|
||||
// Deletes a repository and all of its contents. The returned Operation will
|
||||
// finish once the repository has been deleted. It will not have any Operation
|
||||
// metadata and will return a google.protobuf.Empty response.
|
||||
rpc DeleteRepository(DeleteRepositoryRequest) returns (google.longrunning.Operation) {
|
||||
option (google.api.http) = {
|
||||
delete: "/v1beta2/{name=projects/*/locations/*/repositories/*}"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
option (google.longrunning.operation_info) = {
|
||||
response_type: "google.proto.Empty"
|
||||
metadata_type: "OperationMetadata"
|
||||
};
|
||||
}
|
||||
|
||||
// Lists packages.
|
||||
rpc ListPackages(ListPackagesRequest) returns (ListPackagesResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1beta2/{parent=projects/*/locations/*/repositories/*}/packages"
|
||||
};
|
||||
option (google.api.method_signature) = "parent";
|
||||
}
|
||||
|
||||
// Gets a package.
|
||||
rpc GetPackage(GetPackageRequest) returns (Package) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
||||
// Deletes a package and all of its versions and tags. The returned operation
|
||||
// will complete once the package has been deleted.
|
||||
rpc DeletePackage(DeletePackageRequest) returns (google.longrunning.Operation) {
|
||||
option (google.api.http) = {
|
||||
delete: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*}"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
option (google.longrunning.operation_info) = {
|
||||
response_type: "google.protobuf.Empty"
|
||||
metadata_type: "OperationMetadata"
|
||||
};
|
||||
}
|
||||
|
||||
// Lists versions.
|
||||
rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/versions"
|
||||
};
|
||||
option (google.api.method_signature) = "parent";
|
||||
}
|
||||
|
||||
// Gets a version
|
||||
rpc GetVersion(GetVersionRequest) returns (Version) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
||||
// Deletes a version and all of its content. The returned operation will
|
||||
// complete once the version has been deleted.
|
||||
rpc DeleteVersion(DeleteVersionRequest) returns (google.longrunning.Operation) {
|
||||
option (google.api.http) = {
|
||||
delete: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/versions/*}"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
option (google.longrunning.operation_info) = {
|
||||
response_type: "google.protobuf.Empty"
|
||||
metadata_type: "OperationMetadata"
|
||||
};
|
||||
}
|
||||
|
||||
// Lists files.
|
||||
rpc ListFiles(ListFilesRequest) returns (ListFilesResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1beta2/{parent=projects/*/locations/*/repositories/*}/files"
|
||||
};
|
||||
option (google.api.method_signature) = "parent";
|
||||
}
|
||||
|
||||
// Gets a file.
|
||||
rpc GetFile(GetFileRequest) returns (File) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1beta2/{name=projects/*/locations/*/repositories/*/files/**}"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
||||
// Lists tags.
|
||||
rpc ListTags(ListTagsRequest) returns (ListTagsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags"
|
||||
};
|
||||
option (google.api.method_signature) = "parent";
|
||||
}
|
||||
|
||||
// Gets a tag.
|
||||
rpc GetTag(GetTagRequest) returns (Tag) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
||||
// Creates a tag.
|
||||
rpc CreateTag(CreateTagRequest) returns (Tag) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1beta2/{parent=projects/*/locations/*/repositories/*/packages/*}/tags"
|
||||
body: "tag"
|
||||
};
|
||||
option (google.api.method_signature) = "parent,tag,tag_id";
|
||||
}
|
||||
|
||||
// Updates a tag.
|
||||
rpc UpdateTag(UpdateTagRequest) returns (Tag) {
|
||||
option (google.api.http) = {
|
||||
patch: "/v1beta2/{tag.name=projects/*/locations/*/repositories/*/packages/*/tags/*}"
|
||||
body: "tag"
|
||||
};
|
||||
option (google.api.method_signature) = "tag,update_mask";
|
||||
}
|
||||
|
||||
// Deletes a tag.
|
||||
rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
delete: "/v1beta2/{name=projects/*/locations/*/repositories/*/packages/*/tags/*}"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
||||
// Updates the IAM policy for a given resource.
|
||||
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1beta2/{resource=projects/*/locations/*/repositories/*}:setIamPolicy"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
// Gets the IAM policy for a given resource.
|
||||
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1beta2/{resource=projects/*/locations/*/repositories/*}:getIamPolicy"
|
||||
};
|
||||
}
|
||||
|
||||
// Tests if the caller has a list of permissions on a resource.
|
||||
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1beta2/{resource=projects/*/locations/*/repositories/*}:testIamPermissions"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
// Lists docker images.
|
||||
rpc ListDockerImages(ListDockerImagesRequest) returns (ListDockerImagesResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1beta2/{parent=projects/*/locations/*/repositories/*}/dockerimages"
|
||||
};
|
||||
option (google.api.method_signature) = "parent";
|
||||
}
|
||||
}
|
||||
|
||||
// Metadata type for longrunning-operations, currently empty.
|
||||
message OperationMetadata {}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright 2020 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.devtools.artifactregistry.v1beta2;
|
||||
|
||||
import "google/api/field_behavior.proto";
|
||||
import "google/api/resource.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2";
|
||||
option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "SettingsProto";
|
||||
option java_package = "com.google.devtools.artifactregistry.v1beta2";
|
||||
option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2";
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
// Copyright 2020 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.devtools.artifactregistry.v1beta2;
|
||||
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2";
|
||||
option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "TagProto";
|
||||
option java_package = "com.google.devtools.artifactregistry.v1beta2";
|
||||
option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2";
|
||||
|
||||
// Tags point to a version and represent an alternative name that can be used
|
||||
// to access the version.
|
||||
message Tag {
|
||||
// The name of the tag, for example:
|
||||
// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1".
|
||||
string name = 1;
|
||||
|
||||
// The name of the version the tag refers to, for example:
|
||||
// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811"
|
||||
string version = 2;
|
||||
}
|
||||
|
||||
// The request to list tags.
|
||||
message ListTagsRequest {
|
||||
// The name of the parent resource whose tags will be listed.
|
||||
string parent = 1;
|
||||
|
||||
// An expression for filtering the results of the request. Filter rules are
|
||||
// case insensitive. The fields eligible for filtering are:
|
||||
//
|
||||
// * `version`
|
||||
//
|
||||
// An example of using a filter:
|
||||
//
|
||||
// * `version="projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/1.0"`
|
||||
// --> Tags that are applied to the version `1.0` in package `pkg1`.
|
||||
string filter = 4;
|
||||
|
||||
// The maximum number of tags to return.
|
||||
// Maximum page size is 10,000.
|
||||
int32 page_size = 2;
|
||||
|
||||
// The next_page_token value returned from a previous list request, if any.
|
||||
string page_token = 3;
|
||||
}
|
||||
|
||||
// The response from listing tags.
|
||||
message ListTagsResponse {
|
||||
// The tags returned.
|
||||
repeated Tag tags = 1;
|
||||
|
||||
// The token to retrieve the next page of tags, or empty if there are no
|
||||
// more tags to return.
|
||||
string next_page_token = 2;
|
||||
}
|
||||
|
||||
// The request to retrieve a tag.
|
||||
message GetTagRequest {
|
||||
// The name of the tag to retrieve.
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
// The request to create a new tag.
|
||||
message CreateTagRequest {
|
||||
// The name of the parent resource where the tag will be created.
|
||||
string parent = 1;
|
||||
|
||||
// The tag id to use for this repository.
|
||||
string tag_id = 2;
|
||||
|
||||
// The tag to be created.
|
||||
Tag tag = 3;
|
||||
}
|
||||
|
||||
// The request to create or update a tag.
|
||||
message UpdateTagRequest {
|
||||
// The tag that replaces the resource on the server.
|
||||
Tag tag = 1;
|
||||
|
||||
// The update mask applies to the resource. For the `FieldMask` definition,
|
||||
// see
|
||||
// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
|
||||
google.protobuf.FieldMask update_mask = 2;
|
||||
}
|
||||
|
||||
// The request to delete a tag.
|
||||
message DeleteTagRequest {
|
||||
// The name of the tag to delete.
|
||||
string name = 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
// Copyright 2020 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.devtools.artifactregistry.v1beta2;
|
||||
|
||||
import "google/devtools/artifactregistry/v1beta2/tag.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1Beta2";
|
||||
option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2;artifactregistry";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "VersionProto";
|
||||
option java_package = "com.google.devtools.artifactregistry.v1beta2";
|
||||
option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1beta2";
|
||||
|
||||
// The body of a version resource. A version resource represents a
|
||||
// collection of components, such as files and other data. This may correspond
|
||||
// to a version in many package management schemes.
|
||||
message Version {
|
||||
// The name of the version, for example:
|
||||
// "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1".
|
||||
string name = 1;
|
||||
|
||||
// Optional. Description of the version, as specified in its metadata.
|
||||
string description = 3;
|
||||
|
||||
// The time when the version was created.
|
||||
google.protobuf.Timestamp create_time = 5;
|
||||
|
||||
// The time when the version was last updated.
|
||||
google.protobuf.Timestamp update_time = 6;
|
||||
|
||||
// Output only. A list of related tags. Will contain up to 100 tags that
|
||||
// reference this version.
|
||||
repeated Tag related_tags = 7;
|
||||
}
|
||||
|
||||
// The view, which determines what version information is returned in a
|
||||
// response.
|
||||
enum VersionView {
|
||||
// The default / unset value.
|
||||
// The API will default to the BASIC view.
|
||||
VERSION_VIEW_UNSPECIFIED = 0;
|
||||
|
||||
// Includes basic information about the version, but not any related tags.
|
||||
BASIC = 1;
|
||||
|
||||
// Include everything.
|
||||
FULL = 2;
|
||||
}
|
||||
|
||||
// The request to list versions.
|
||||
message ListVersionsRequest {
|
||||
// The name of the parent resource whose versions will be listed.
|
||||
string parent = 1;
|
||||
|
||||
// The maximum number of versions to return.
|
||||
// Maximum page size is 10,000.
|
||||
int32 page_size = 2;
|
||||
|
||||
// The next_page_token value returned from a previous list request, if any.
|
||||
string page_token = 3;
|
||||
|
||||
// The view that should be returned in the response.
|
||||
VersionView view = 4;
|
||||
}
|
||||
|
||||
// The response from listing versions.
|
||||
message ListVersionsResponse {
|
||||
// The versions returned.
|
||||
repeated Version versions = 1;
|
||||
|
||||
// The token to retrieve the next page of versions, or empty if there are no
|
||||
// more versions to return.
|
||||
string next_page_token = 2;
|
||||
}
|
||||
|
||||
// The request to retrieve a version.
|
||||
message GetVersionRequest {
|
||||
// The name of the version to retrieve.
|
||||
string name = 1;
|
||||
|
||||
// The view that should be returned in the response.
|
||||
VersionView view = 2;
|
||||
}
|
||||
|
||||
// The request to delete a version.
|
||||
message DeleteVersionRequest {
|
||||
// The name of the version to delete.
|
||||
string name = 1;
|
||||
|
||||
// By default, a version that is tagged may not be deleted. If force=true, the
|
||||
// version and any tags pointing to the version are deleted.
|
||||
bool force = 2;
|
||||
}
|
||||
Loading…
Reference in New Issue