Skip to content

Commit

Permalink
feat: promote v1beta2 features to v1
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 436510287
  • Loading branch information
Google APIs authored and copybara-github committed Mar 22, 2022
1 parent 42efaa7 commit 4008372
Show file tree
Hide file tree
Showing 12 changed files with 1,180 additions and 21 deletions.
33 changes: 26 additions & 7 deletions google/devtools/artifactregistry/v1/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,29 @@ load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
proto_library(
name = "artifactregistry_proto",
srcs = [
"apt_artifact.proto",
"artifact.proto",
"file.proto",
"package.proto",
"repository.proto",
"service.proto",
"settings.proto",
"tag.proto",
"version.proto",
"yum_artifact.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",
"//google/rpc:status_proto",
"@com_google_protobuf//:empty_proto",
"@com_google_protobuf//:field_mask_proto",
"@com_google_protobuf//:struct_proto",
"@com_google_protobuf//:timestamp_proto",
],
)
Expand Down Expand Up @@ -121,6 +134,8 @@ go_proto_library(
deps = [
"//google/api:annotations_go_proto",
"//google/iam/v1:iam_go_proto",
"//google/longrunning:longrunning_go_proto",
"//google/rpc:status_go_proto",
],
)

Expand All @@ -129,11 +144,15 @@ go_gapic_library(
srcs = [":artifactregistry_proto_with_info"],
grpc_service_config = "artifactregistry_grpc_service_config.json",
importpath = "cloud.google.com/go/devtools/artifactregistry/apiv1;artifactregistry",
service_yaml = "artifactregistry_v1.yaml",
metadata = True,
service_yaml = "artifactregistry_v1.yaml",
deps = [
":artifactregistry_go_proto",
"//google/iam/v1:iam_go_proto",
"//google/longrunning:longrunning_go_proto",
"@com_google_cloud_go//longrunning:go_default_library",
"@com_google_cloud_go//longrunning/autogen:go_default_library",
"@io_bazel_rules_go//proto/wkt:struct_go_proto",
],
)

Expand All @@ -149,8 +168,8 @@ go_gapic_assembly_pkg(
name = "gapi-cloud-devtools-artifactregistry-v1-go",
deps = [
":artifactregistry_go_gapic",
":artifactregistry_go_gapic_srcjar-test.srcjar",
":artifactregistry_go_gapic_srcjar-metadata.srcjar",
":artifactregistry_go_gapic_srcjar-test.srcjar",
":artifactregistry_go_proto",
],
)
Expand All @@ -169,8 +188,8 @@ py_gapic_library(
srcs = [":artifactregistry_proto"],
grpc_service_config = "artifactregistry_grpc_service_config.json",
opt_args = [
"python-gapic-namespace=google.cloud",
"python-gapic-name=artifactregistry",
"python-gapic-namespace=google.cloud",
"warehouse-package-name=google-cloud-artifact-registry",
],
)
Expand Down Expand Up @@ -259,8 +278,8 @@ nodejs_gapic_assembly_pkg(
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_gapic_assembly_pkg",
"ruby_cloud_gapic_library",
"ruby_gapic_assembly_pkg",
"ruby_grpc_library",
"ruby_proto_library",
)
Expand All @@ -280,11 +299,11 @@ ruby_cloud_gapic_library(
name = "artifactregistry_ruby_gapic",
srcs = [":artifactregistry_proto_with_info"],
extra_protoc_parameters = [
"ruby-cloud-gem-name=google-cloud-artifact_registry-v1",
"ruby-cloud-env-prefix=ARTIFACT_REGISTRY",
"ruby-cloud-product-url=https://cloud.google.com/artifact-registry/",
"ruby-cloud-api-id=artifactregistry.googleapis.com",
"ruby-cloud-api-shortname=artifactregistry",
"ruby-cloud-env-prefix=ARTIFACT_REGISTRY",
"ruby-cloud-gem-name=google-cloud-artifact_registry-v1",
"ruby-cloud-product-url=https://cloud.google.com/artifact-registry/",
],
grpc_service_config = "artifactregistry_grpc_service_config.json",
ruby_cloud_description = "Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure.",
Expand Down
116 changes: 116 additions & 0 deletions google/devtools/artifactregistry/v1/apt_artifact.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
// Copyright 2022 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.v1;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/rpc/status.proto";

option csharp_namespace = "Google.Cloud.ArtifactRegistry.V1";
option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1;artifactregistry";
option java_multiple_files = true;
option java_outer_classname = "AptArtifactProto";
option java_package = "com.google.devtools.artifactregistry.v1";
option php_namespace = "Google\\Cloud\\ArtifactRegistry\\V1";
option ruby_package = "Google::Cloud::ArtifactRegistry::V1";

// A detailed representation of an Apt artifact. Information in the record
// is derived from the archive's control file.
// See https://www.debian.org/doc/debian-policy/ch-controlfields.html
message AptArtifact {
option (google.api.resource) = {
type: "artifactregistry.googleapis.com/AptArtifact"
pattern: "projects/{project}/locations/{location}/repositories/{repository}/aptArtifacts/{apt_artifact}"
};

// Package type is either binary or source.
enum PackageType {
// Package type is not specified.
PACKAGE_TYPE_UNSPECIFIED = 0;

// Binary package.
BINARY = 1;

// Source package.
SOURCE = 2;
}

// Output only. The Artifact Registry resource name of the artifact.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The Apt package name of the artifact.
string package_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. An artifact is a binary or source package.
PackageType package_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Operating system architecture of the artifact.
string architecture = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Repository component of the artifact.
string component = 5 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Contents of the artifact's control metadata file.
bytes control_file = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Google Cloud Storage location where the artifacts currently reside.
message ImportAptArtifactsGcsSource {
// Cloud Storage paths URI (e.g., gs://my_bucket//my_object).
repeated string uris = 1;

// Supports URI wildcards for matching multiple objects from a single URI.
bool use_wildcards = 2;
}

// The request to import new apt artifacts.
message ImportAptArtifactsRequest {
// The source location of the package binaries.
oneof source {
// Google Cloud Storage location where input content is located.
ImportAptArtifactsGcsSource gcs_source = 2;
}

// The name of the parent resource where the artifacts will be imported.
string parent = 1;
}

// Error information explaining why a package was not imported.
message ImportAptArtifactsErrorInfo {
// The source that was not imported.
oneof source {
// Google Cloud Storage location requested.
ImportAptArtifactsGcsSource gcs_source = 1;
}

// The detailed error status.
google.rpc.Status error = 2;
}

// The response message from importing APT artifacts.
message ImportAptArtifactsResponse {
// The Apt artifacts imported.
repeated AptArtifact apt_artifacts = 1;

// Detailed error info for packages that were not imported.
repeated ImportAptArtifactsErrorInfo errors = 2;
}

// The operation metadata for importing artifacts.
message ImportAptArtifactsMetadata {

}
14 changes: 12 additions & 2 deletions google/devtools/artifactregistry/v1/artifact.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -19,7 +19,6 @@ package google.devtools.artifactregistry.v1;
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.V1";
option go_package = "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1;artifactregistry";
Expand Down Expand Up @@ -104,3 +103,14 @@ message ListDockerImagesResponse {
// more artifacts to return.
string next_page_token = 2;
}

// The request to get docker images.
message GetDockerImageRequest {
// Required. The name of the docker images.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "artifactregistry.googleapis.com/DockerImage"
}
];
}
62 changes: 55 additions & 7 deletions google/devtools/artifactregistry/v1/artifactregistry_v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ apis:
- name: google.devtools.artifactregistry.v1.ArtifactRegistry

types:
- name: google.devtools.artifactregistry.v1.DockerImage
- name: google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata
- name: google.devtools.artifactregistry.v1.ImportAptArtifactsResponse
- name: google.devtools.artifactregistry.v1.ImportYumArtifactsMetadata
- name: google.devtools.artifactregistry.v1.ImportYumArtifactsResponse
- name: google.devtools.artifactregistry.v1.OperationMetadata

documentation:
summary: |-
Expand All @@ -34,8 +38,12 @@ documentation:

http:
rules:
- selector: google.cloud.location.Locations.GetLocation
get: '/v1/{name=projects/*/locations/*}'
- selector: google.cloud.location.Locations.ListLocations
get: '/v1/{name=projects/*}/locations'
- selector: google.longrunning.Operations.GetOperation
get: '/v1/{name=operations/*}'
get: '/v1/{name=projects/*/locations/*/operations/*}'

authentication:
rules:
Expand All @@ -54,16 +62,56 @@ authentication:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/cloud-platform.read-only
- selector: 'google.longrunning.Operations.*'
- selector: google.devtools.artifactregistry.v1.ArtifactRegistry.CreateRepository
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/cloud-platform.read-only
- selector: google.longrunning.Operations.CancelOperation
https://www.googleapis.com/auth/cloud-platform
- selector: google.devtools.artifactregistry.v1.ArtifactRegistry.CreateTag
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: google.longrunning.Operations.DeleteOperation
- selector: google.devtools.artifactregistry.v1.ArtifactRegistry.DeletePackage
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteRepository
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteTag
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: google.devtools.artifactregistry.v1.ArtifactRegistry.DeleteVersion
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: google.devtools.artifactregistry.v1.ArtifactRegistry.ImportAptArtifacts
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: google.devtools.artifactregistry.v1.ArtifactRegistry.ImportYumArtifacts
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: google.devtools.artifactregistry.v1.ArtifactRegistry.SetIamPolicy
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateProjectSettings
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateRepository
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: google.devtools.artifactregistry.v1.ArtifactRegistry.UpdateTag
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: google.longrunning.Operations.GetOperation
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/cloud-platform.read-only
Loading

0 comments on commit 4008372

Please sign in to comment.