load("@rules_proto//proto:defs.bzl", "proto_library") # This is an API workspace, having public visibility by default makes perfect sense. package(default_visibility = ["//visibility:public"]) # Reading the default service config is useful for custom gRPC clients. exports_files(["cloudkms_grpc_service_config.json"]) ############################################################################## # Common ############################################################################## # buildifier: disable=load-on-top load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info") proto_library( name = "kms_proto", srcs = [ "ekm_service.proto", "resources.proto", "service.proto", ], deps = [ "//google/api:annotations_proto", "//google/api:client_proto", "//google/api:field_behavior_proto", "//google/api:resource_proto", "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:field_mask_proto", "@com_google_protobuf//:struct_proto", "@com_google_protobuf//:timestamp_proto", "@com_google_protobuf//:wrappers_proto", ], ) proto_library_with_info( name = "kms_proto_with_info", deps = [ ":kms_proto", "//google/cloud:common_resources_proto", "//google/cloud/location:location_proto", "//google/iam/v1:iam_policy_proto", "//google/iam/v1:policy_proto", ], ) ############################################################################## # Java ############################################################################## # buildifier: disable=load-on-top # buildifier: disable=same-origin-load 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 = "kms_java_proto", deps = [":kms_proto"], ) java_grpc_library( name = "kms_java_grpc", srcs = [":kms_proto"], deps = [":kms_java_proto"], ) java_gapic_library( name = "kms_java_gapic", srcs = [":kms_proto_with_info"], grpc_service_config = "cloudkms_grpc_service_config.json", service_yaml = "cloudkms_v1.yaml", test_deps = [ ":kms_java_grpc", "//google/cloud/location:location_java_grpc", "//google/iam/v1:iam_java_grpc", ], transport = "grpc+rest", deps = [ ":kms_java_proto", "//google/cloud/location:location_java_proto", "//google/iam/v1:iam_java_proto", ], ) java_gapic_test( name = "kms_java_gapic_test_suite", test_classes = [ "com.google.cloud.kms.v1.KeyManagementServiceClientHttpJsonTest", "com.google.cloud.kms.v1.KeyManagementServiceClientTest", ], runtime_deps = [":kms_java_gapic_test"], ) # Open Source Packages java_gapic_assembly_gradle_pkg( name = "google-cloud-kms-v1-java", include_samples = True, transport = "grpc+rest", deps = [ ":kms_java_gapic", ":kms_java_grpc", ":kms_java_proto", ":kms_proto", ], ) ############################################################################## # Go ############################################################################## # buildifier: disable=load-on-top # buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "go_gapic_assembly_pkg", "go_gapic_library", "go_proto_library", "go_test", ) go_proto_library( name = "kms_go_proto", compilers = ["@io_bazel_rules_go//proto:go_grpc"], importpath = "google.golang.org/genproto/googleapis/cloud/kms/v1", protos = [":kms_proto"], deps = [ "//google/api:annotations_go_proto", "//google/iam/v1:iam_go_proto", ], ) go_gapic_library( name = "kms_go_gapic", srcs = [":kms_proto_with_info"], grpc_service_config = "cloudkms_grpc_service_config.json", importpath = "cloud.google.com/go/kms/apiv1;kms", service_yaml = "cloudkms_v1.yaml", transport = "grpc+rest", deps = [ ":kms_go_proto", "//google/cloud/location:location_go_proto", "//google/iam/v1:iam_go_proto", "@io_bazel_rules_go//proto/wkt:duration_go_proto", ], ) go_test( name = "kms_go_gapic_test", srcs = [":kms_go_gapic_srcjar_test"], embed = [":kms_go_gapic"], importpath = "cloud.google.com/go/kms/apiv1", ) # Open Source Packages go_gapic_assembly_pkg( name = "gapi-cloud-kms-v1-go", deps = [ ":kms_go_gapic", ":kms_go_gapic_srcjar-test.srcjar", ":kms_go_proto", ], ) ############################################################################## # Python ############################################################################## # buildifier: disable=load-on-top # buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "py_gapic_assembly_pkg", "py_gapic_library", "py_test", ) py_gapic_library( name = "kms_py_gapic", srcs = [":kms_proto"], grpc_service_config = "cloudkms_grpc_service_config.json", opt_args = ["add-iam-methods"], transport = "grpc", deps = [ "//google/iam/v1:iam_policy_py_proto", "//google/iam/v1:policy_py_proto", ], ) py_test( name = "kms_py_gapic_test", srcs = [ "kms_py_gapic_pytest.py", "kms_py_gapic_test.py", ], legacy_create_init = False, deps = [":kms_py_gapic"], ) py_gapic_assembly_pkg( name = "kms-v1-py", deps = [ ":kms_py_gapic", ], ) ############################################################################## # PHP ############################################################################## # buildifier: disable=load-on-top # buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "php_gapic_assembly_pkg", "php_gapic_library", "php_grpc_library", "php_proto_library", ) php_proto_library( name = "kms_php_proto", deps = [":kms_proto"], ) php_grpc_library( name = "kms_php_grpc", srcs = [":kms_proto"], deps = [":kms_php_proto"], ) php_gapic_library( name = "kms_php_gapic", srcs = [":kms_proto_with_info"], service_yaml = "cloudkms_v1.yaml", deps = [ ":kms_php_grpc", ":kms_php_proto", ], ) # Open Source Packages php_gapic_assembly_pkg( name = "google-cloud-kms-v1-php", deps = [ ":kms_php_gapic", ":kms_php_grpc", ":kms_php_proto", ], ) ############################################################################## # Node.js ############################################################################## # buildifier: disable=load-on-top # buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "nodejs_gapic_assembly_pkg", "nodejs_gapic_library", ) nodejs_gapic_library( name = "kms_nodejs_gapic", package_name = "@google-cloud/kms", src = ":kms_proto_with_info", extra_protoc_parameters = ["metadata"], grpc_service_config = "cloudkms_grpc_service_config.json", package = "google.cloud.kms.v1", service_yaml = "cloudkms_v1.yaml", deps = [], ) nodejs_gapic_assembly_pkg( name = "kms-v1-nodejs", deps = [ ":kms_nodejs_gapic", ":kms_proto", ], ) ############################################################################## # Ruby ############################################################################## # buildifier: disable=load-on-top # buildifier: disable=same-origin-load 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 = "kms_ruby_proto", deps = [":kms_proto"], ) ruby_grpc_library( name = "kms_ruby_grpc", srcs = [":kms_proto"], deps = [":kms_ruby_proto"], ) ruby_cloud_gapic_library( name = "kms_ruby_gapic", srcs = [":kms_proto_with_info"], extra_protoc_parameters = [ "ruby-cloud-gem-name=google-cloud-kms-v1", "ruby-cloud-env-prefix=KMS", "ruby-cloud-product-url=https://cloud.google.com/kms", "ruby-cloud-api-id=cloudkms.googleapis.com", "ruby-cloud-api-shortname=cloudkms", ], grpc_service_config = "cloudkms_grpc_service_config.json", service_yaml = "cloudkms_v1.yaml", ruby_cloud_description = "Manages keys and performs cryptographic operations in a central cloud service, for direct use by other cloud resources and applications.", ruby_cloud_title = "Cloud Key Management Service (KMS) V1", deps = [ ":kms_ruby_grpc", ":kms_ruby_proto", ], ) # Open Source Packages ruby_gapic_assembly_pkg( name = "google-cloud-kms-v1-ruby", deps = [ ":kms_ruby_gapic", ":kms_ruby_grpc", ":kms_ruby_proto", ], ) ############################################################################## # C# ############################################################################## # buildifier: disable=load-on-top # buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "csharp_gapic_assembly_pkg", "csharp_gapic_library", "csharp_grpc_library", "csharp_proto_library", ) csharp_proto_library( name = "kms_csharp_proto", deps = [":kms_proto"], ) csharp_grpc_library( name = "kms_csharp_grpc", srcs = [":kms_proto"], deps = [":kms_csharp_proto"], ) csharp_gapic_library( name = "kms_csharp_gapic", srcs = [":kms_proto_with_info"], common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json", grpc_service_config = "cloudkms_grpc_service_config.json", service_yaml = "cloudkms_v1.yaml", deps = [ ":kms_csharp_grpc", ":kms_csharp_proto", ], ) # Open Source Packages csharp_gapic_assembly_pkg( name = "google-cloud-kms-v1-csharp", deps = [ ":kms_csharp_gapic", ":kms_csharp_grpc", ":kms_csharp_proto", ], ) ############################################################################## # C++ ############################################################################## # buildifier: disable=load-on-top # buildifier: disable=same-origin-load load( "@com_google_googleapis_imports//:imports.bzl", "cc_grpc_library", "cc_proto_library", ) cc_proto_library( name = "kms_cc_proto", deps = [":kms_proto"], ) cc_grpc_library( name = "kms_cc_grpc", srcs = [":kms_proto"], grpc_only = True, deps = [":kms_cc_proto"], )