From ba2db0d89a145c14ef11c0ec2eda0c80fe16f17e Mon Sep 17 00:00:00 2001 From: Google APIs Date: Tue, 3 Jan 2023 10:51:22 -0800 Subject: [PATCH] feat: Add location methods PiperOrigin-RevId: 499263614 --- .../devtools/artifactregistry/v1/BUILD.bazel | 129 +++++++++++---- .../v1/artifactregistry_v1.yaml | 1 + .../artifactregistry/v1beta2/BUILD.bazel | 152 +++++++++++++----- .../v1beta2/artifactregistry_v1beta2.yaml | 1 + 4 files changed, 209 insertions(+), 74 deletions(-) diff --git a/google/devtools/artifactregistry/v1/BUILD.bazel b/google/devtools/artifactregistry/v1/BUILD.bazel index ac68f3652f545..61f1a9471c5ed 100644 --- a/google/devtools/artifactregistry/v1/BUILD.bazel +++ b/google/devtools/artifactregistry/v1/BUILD.bazel @@ -9,45 +9,14 @@ # * extra_protoc_file_parameters # The complete list of preserved parameters can be found in the source code. +# 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") -load( - "@com_google_googleapis_imports//:imports.bzl", - "cc_grpc_library", - "cc_proto_library", - "csharp_gapic_assembly_pkg", - "csharp_gapic_library", - "csharp_grpc_library", - "csharp_proto_library", - "go_gapic_assembly_pkg", - "go_gapic_library", - "go_proto_library", - "go_test", - "java_gapic_assembly_gradle_pkg", - "java_gapic_library", - "java_gapic_test", - "java_grpc_library", - "java_proto_library", - "nodejs_gapic_assembly_pkg", - "nodejs_gapic_library", - "php_gapic_assembly_pkg", - "php_gapic_library", - "php_grpc_library", - "php_proto_library", - "proto_library_with_info", - "py_gapic_assembly_pkg", - "py_gapic_library", - "py_test", - "ruby_cloud_gapic_library", - "ruby_gapic_assembly_pkg", - "ruby_grpc_library", - "ruby_proto_library", -) - -# This is an API workspace, having public visibility by default makes perfect sense. -package(default_visibility = ["//visibility:public"]) +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( name = "artifactregistry_proto", @@ -84,9 +53,22 @@ proto_library_with_info( deps = [ ":artifactregistry_proto", "//google/cloud:common_resources_proto", + "//google/cloud/location:location_proto", ], ) +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + java_proto_library( name = "artifactregistry_java_proto", deps = [":artifactregistry_proto"], @@ -107,12 +89,14 @@ java_gapic_library( service_yaml = "artifactregistry_v1.yaml", test_deps = [ ":artifactregistry_java_grpc", + "//google/cloud/location:location_java_grpc", "//google/iam/v1:iam_java_grpc", ], transport = "grpc+rest", deps = [ ":artifactregistry_java_proto", "//google/api:api_java_proto", + "//google/cloud/location:location_java_proto", "//google/iam/v1:iam_java_proto", ], ) @@ -139,6 +123,17 @@ java_gapic_assembly_gradle_pkg( ], ) +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + go_proto_library( name = "artifactregistry_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], @@ -163,6 +158,7 @@ go_gapic_library( transport = "grpc+rest", deps = [ ":artifactregistry_go_proto", + "//google/cloud/location:location_go_proto", "//google/iam/v1:iam_go_proto", "//google/longrunning:longrunning_go_proto", "@com_google_cloud_go_longrunning//:go_default_library", @@ -189,6 +185,16 @@ go_gapic_assembly_pkg( ], ) +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_test", +) + py_gapic_library( name = "artifactregistry_py_gapic", srcs = [":artifactregistry_proto"], @@ -199,6 +205,7 @@ py_gapic_library( "warehouse-package-name=google-cloud-artifact-registry", ], rest_numeric_enums = True, + service_yaml = "artifactregistry_v1.yaml", transport = "grpc", deps = [ "//google/iam/v1:iam_policy_py_proto", @@ -223,6 +230,17 @@ py_gapic_assembly_pkg( ], ) +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + php_proto_library( name = "artifactregistry_php_proto", deps = [":artifactregistry_proto"], @@ -257,6 +275,15 @@ php_gapic_assembly_pkg( ], ) +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + nodejs_gapic_library( name = "artifactregistry_nodejs_gapic", package_name = "@google-cloud/artifact-registry", @@ -278,6 +305,17 @@ nodejs_gapic_assembly_pkg( ], ) +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_cloud_gapic_library", + "ruby_gapic_assembly_pkg", + "ruby_grpc_library", + "ruby_proto_library", +) + ruby_proto_library( name = "artifactregistry_ruby_proto", deps = [":artifactregistry_proto"], @@ -303,6 +341,7 @@ ruby_cloud_gapic_library( rest_numeric_enums = True, ruby_cloud_description = "Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure.", ruby_cloud_title = "Artifact Registry V1", + service_yaml = "artifactregistry_v1.yaml", deps = [ ":artifactregistry_ruby_grpc", ":artifactregistry_ruby_proto", @@ -319,6 +358,17 @@ ruby_gapic_assembly_pkg( ], ) +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + csharp_proto_library( name = "artifactregistry_csharp_proto", deps = [":artifactregistry_proto"], @@ -353,6 +403,15 @@ csharp_gapic_assembly_pkg( ], ) +############################################################################## +# C++ +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + cc_proto_library( name = "artifactregistry_cc_proto", deps = [":artifactregistry_proto"], diff --git a/google/devtools/artifactregistry/v1/artifactregistry_v1.yaml b/google/devtools/artifactregistry/v1/artifactregistry_v1.yaml index 2572b5ad95806..46aebe7b12dd6 100644 --- a/google/devtools/artifactregistry/v1/artifactregistry_v1.yaml +++ b/google/devtools/artifactregistry/v1/artifactregistry_v1.yaml @@ -5,6 +5,7 @@ title: Artifact Registry API apis: - name: google.devtools.artifactregistry.v1.ArtifactRegistry +- name: google.cloud.location.Locations types: - name: google.devtools.artifactregistry.v1.ImportAptArtifactsMetadata diff --git a/google/devtools/artifactregistry/v1beta2/BUILD.bazel b/google/devtools/artifactregistry/v1beta2/BUILD.bazel index e3e88a5e60106..c9db45889021d 100644 --- a/google/devtools/artifactregistry/v1beta2/BUILD.bazel +++ b/google/devtools/artifactregistry/v1beta2/BUILD.bazel @@ -1,5 +1,5 @@ # This file was automatically generated by BuildFileGenerator -# https://github.com/googleapis/gapic-generator/tree/master/rules_gapic/bazel +# https://github.com/googleapis/rules_gapic/tree/master/bazel # Most of the manual changes to this file will be overwritten. # It's **only** allowed to change the following rule attribute values: @@ -9,43 +9,14 @@ # * extra_protoc_file_parameters # The complete list of preserved parameters can be found in the source code. +# 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") -load( - "@com_google_googleapis_imports//:imports.bzl", - "csharp_gapic_assembly_pkg", - "csharp_gapic_library", - "csharp_grpc_library", - "csharp_proto_library", - "go_gapic_assembly_pkg", - "go_gapic_library", - "go_proto_library", - "go_test", - "java_gapic_assembly_gradle_pkg", - "java_gapic_library", - "java_gapic_test", - "java_grpc_library", - "java_proto_library", - "nodejs_gapic_assembly_pkg", - "nodejs_gapic_library", - "php_gapic_assembly_pkg", - "php_gapic_library", - "php_grpc_library", - "php_proto_library", - "proto_library_with_info", - "py_gapic_assembly_pkg", - "py_gapic_library", - "py_test", - "ruby_cloud_gapic_library", - "ruby_gapic_assembly_pkg", - "ruby_grpc_library", - "ruby_proto_library", -) - -# This is an API workspace, having public visibility by default makes perfect sense. -package(default_visibility = ["//visibility:public"]) +load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( name = "artifactregistry_proto", @@ -81,9 +52,22 @@ proto_library_with_info( deps = [ ":artifactregistry_proto", "//google/cloud:common_resources_proto", + "//google/cloud/location:location_proto", ], ) +############################################################################## +# Java +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "java_gapic_assembly_gradle_pkg", + "java_gapic_library", + "java_gapic_test", + "java_grpc_library", + "java_proto_library", +) + java_proto_library( name = "artifactregistry_java_proto", deps = [":artifactregistry_proto"], @@ -98,15 +82,20 @@ java_grpc_library( java_gapic_library( name = "artifactregistry_java_gapic", srcs = [":artifactregistry_proto_with_info"], + gapic_yaml = None, grpc_service_config = "artifactregistry_grpc_service_config.json", rest_numeric_enums = True, + service_yaml = "artifactregistry_v1beta2.yaml", test_deps = [ ":artifactregistry_java_grpc", + "//google/cloud/location:location_java_grpc", "//google/iam/v1:iam_java_grpc", ], transport = "grpc+rest", deps = [ ":artifactregistry_java_proto", + "//google/api:api_java_proto", + "//google/cloud/location:location_java_proto", "//google/iam/v1:iam_java_proto", ], ) @@ -133,6 +122,17 @@ java_gapic_assembly_gradle_pkg( ], ) +############################################################################## +# Go +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "go_gapic_assembly_pkg", + "go_gapic_library", + "go_proto_library", + "go_test", +) + go_proto_library( name = "artifactregistry_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], @@ -151,15 +151,18 @@ go_gapic_library( srcs = [":artifactregistry_proto_with_info"], grpc_service_config = "artifactregistry_grpc_service_config.json", importpath = "cloud.google.com/go/devtools/artifactregistry/apiv1beta2;artifactregistry", + metadata = True, rest_numeric_enums = True, service_yaml = "artifactregistry_v1beta2.yaml", transport = "grpc+rest", deps = [ ":artifactregistry_go_proto", + "//google/cloud/location:location_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", ], ) @@ -175,21 +178,33 @@ go_gapic_assembly_pkg( name = "gapi-cloud-devtools-artifactregistry-v1beta2-go", deps = [ ":artifactregistry_go_gapic", + ":artifactregistry_go_gapic_srcjar-metadata.srcjar", ":artifactregistry_go_gapic_srcjar-test.srcjar", ":artifactregistry_go_proto", ], ) +############################################################################## +# Python +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "py_gapic_assembly_pkg", + "py_gapic_library", + "py_test", +) + py_gapic_library( name = "artifactregistry_py_gapic", 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", ], rest_numeric_enums = True, + service_yaml = "artifactregistry_v1beta2.yaml", transport = "grpc", deps = [ "//google/iam/v1:iam_policy_py_proto", @@ -214,6 +229,17 @@ py_gapic_assembly_pkg( ], ) +############################################################################## +# PHP +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "php_gapic_assembly_pkg", + "php_gapic_library", + "php_grpc_library", + "php_proto_library", +) + php_proto_library( name = "artifactregistry_php_proto", deps = [":artifactregistry_proto"], @@ -248,6 +274,15 @@ php_gapic_assembly_pkg( ], ) +############################################################################## +# Node.js +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "nodejs_gapic_assembly_pkg", + "nodejs_gapic_library", +) + nodejs_gapic_library( name = "artifactregistry_nodejs_gapic", package_name = "@google-cloud/artifact-registry", @@ -269,6 +304,17 @@ nodejs_gapic_assembly_pkg( ], ) +############################################################################## +# Ruby +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "ruby_cloud_gapic_library", + "ruby_gapic_assembly_pkg", + "ruby_grpc_library", + "ruby_proto_library", +) + ruby_proto_library( name = "artifactregistry_ruby_proto", deps = [":artifactregistry_proto"], @@ -284,16 +330,17 @@ ruby_cloud_gapic_library( name = "artifactregistry_ruby_gapic", srcs = [":artifactregistry_proto_with_info"], extra_protoc_parameters = [ - "ruby-cloud-gem-name=google-cloud-artifact_registry-v1beta2", - "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-v1beta2", + "ruby-cloud-product-url=https://cloud.google.com/artifact-registry/", ], grpc_service_config = "artifactregistry_grpc_service_config.json", rest_numeric_enums = True, ruby_cloud_description = "Artifact Registry stores and manages build artifacts in a scalable and integrated service built on Google infrastructure.", ruby_cloud_title = "Artifact Registry V1beta2", + service_yaml = "artifactregistry_v1beta2.yaml", deps = [ ":artifactregistry_ruby_grpc", ":artifactregistry_ruby_proto", @@ -310,6 +357,17 @@ ruby_gapic_assembly_pkg( ], ) +############################################################################## +# C# +############################################################################## +load( + "@com_google_googleapis_imports//:imports.bzl", + "csharp_gapic_assembly_pkg", + "csharp_gapic_library", + "csharp_grpc_library", + "csharp_proto_library", +) + csharp_proto_library( name = "artifactregistry_csharp_proto", deps = [":artifactregistry_proto"], @@ -347,4 +405,20 @@ csharp_gapic_assembly_pkg( ############################################################################## # C++ ############################################################################## -# Put your C++ rules here +load( + "@com_google_googleapis_imports//:imports.bzl", + "cc_grpc_library", + "cc_proto_library", +) + +cc_proto_library( + name = "artifactregistry_cc_proto", + deps = [":artifactregistry_proto"], +) + +cc_grpc_library( + name = "artifactregistry_cc_grpc", + srcs = [":artifactregistry_proto"], + grpc_only = True, + deps = [":artifactregistry_cc_proto"], +) diff --git a/google/devtools/artifactregistry/v1beta2/artifactregistry_v1beta2.yaml b/google/devtools/artifactregistry/v1beta2/artifactregistry_v1beta2.yaml index e43e7b7a1a3dc..67e1989f0cb55 100644 --- a/google/devtools/artifactregistry/v1beta2/artifactregistry_v1beta2.yaml +++ b/google/devtools/artifactregistry/v1beta2/artifactregistry_v1beta2.yaml @@ -5,6 +5,7 @@ title: Artifact Registry API apis: - name: google.devtools.artifactregistry.v1beta2.ArtifactRegistry +- name: google.cloud.location.Locations types: - name: google.devtools.artifactregistry.v1beta2.ImportAptArtifactsResponse