Skip to content

Commit 39b7efe

Browse files
Google APIscopybara-github
authored andcommitted
chore: Configure Ruby client library builds for AlloyDB
PiperOrigin-RevId: 517993049
1 parent efcad5e commit 39b7efe

10 files changed

Lines changed: 50 additions & 9 deletions

File tree

google/cloud/alloydb/BUILD.bazel

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This build file includes a target for the Ruby wrapper library for
2+
# google-cloud-alloy_db.
3+
4+
# This is an API workspace, having public visibility by default makes perfect sense.
5+
package(default_visibility = ["//visibility:public"])
6+
7+
# Export yaml configs.
8+
exports_files(glob(["*.yaml"]))
9+
10+
load(
11+
"@com_google_googleapis_imports//:imports.bzl",
12+
"ruby_cloud_gapic_library",
13+
"ruby_gapic_assembly_pkg",
14+
)
15+
16+
# Generates a Ruby wrapper client for alloydb.
17+
# Ruby wrapper clients are versionless, but are generated from source protos
18+
# for a particular service version, v1 in this case.
19+
ruby_cloud_gapic_library(
20+
name = "alloydb_ruby_wrapper",
21+
srcs = ["//google/cloud/alloydb/v1:alloydb_proto_with_info"],
22+
extra_protoc_parameters = [
23+
"ruby-cloud-gem-name=google-cloud-alloy_db",
24+
"ruby-cloud-gem-namespace=Google::Cloud::AlloyDB",
25+
"ruby-cloud-wrapper-of=v1:0.0;v1beta:0.0",
26+
],
27+
service_yaml = "//google/cloud/alloydb/v1:alloydb_v1.yaml",
28+
transport = "grpc+rest",
29+
)
30+
31+
# Open Source package.
32+
ruby_gapic_assembly_pkg(
33+
name = "google-cloud-alloydb-ruby",
34+
deps = [
35+
":alloydb_ruby_wrapper",
36+
],
37+
)

google/cloud/alloydb/v1/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ ruby_cloud_gapic_library(
322322
name = "alloydb_ruby_gapic",
323323
srcs = [":alloydb_proto_with_info"],
324324
extra_protoc_parameters = [
325-
"ruby-cloud-gem-name=google-cloud-alloydb-v1",
325+
"ruby-cloud-gem-name=google-cloud-alloy_db-v1",
326+
"ruby-cloud-gem-namespace=Google::Cloud::AlloyDB::V1",
326327
],
327328
grpc_service_config = "alloydb_v1_grpc_service_config.json",
328329
rest_numeric_enums = True,

google/cloud/alloydb/v1/resources.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ option java_multiple_files = true;
3030
option java_outer_classname = "ResourcesProto";
3131
option java_package = "com.google.cloud.alloydb.v1";
3232
option php_namespace = "Google\\Cloud\\AlloyDb\\V1";
33-
option ruby_package = "Google::Cloud::AlloyDb::V1";
33+
option ruby_package = "Google::Cloud::AlloyDB::V1";
3434
option (google.api.resource_definition) = {
3535
type: "cloudkms.googleapis.com/CryptoKeyVersion"
3636
pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}"

google/cloud/alloydb/v1/service.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ option java_multiple_files = true;
3333
option java_outer_classname = "ServiceProto";
3434
option java_package = "com.google.cloud.alloydb.v1";
3535
option php_namespace = "Google\\Cloud\\AlloyDb\\V1";
36-
option ruby_package = "Google::Cloud::AlloyDb::V1";
36+
option ruby_package = "Google::Cloud::AlloyDB::V1";
3737

3838
// Service describing handlers for resources
3939
service AlloyDBAdmin {

google/cloud/alloydb/v1alpha/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ ruby_cloud_gapic_library(
322322
name = "alloydb_ruby_gapic",
323323
srcs = [":alloydb_proto_with_info"],
324324
extra_protoc_parameters = [
325-
"ruby-cloud-gem-name=google-cloud-alloydb-v1alpha",
325+
"ruby-cloud-gem-name=google-cloud-alloy_db-v1alpha",
326+
"ruby-cloud-gem-namespace=Google::Cloud::AlloyDB::V1alpha",
326327
],
327328
grpc_service_config = "alloydb_v1alpha_grpc_service_config.json",
328329
rest_numeric_enums = True,

google/cloud/alloydb/v1alpha/resources.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ option java_multiple_files = true;
3030
option java_outer_classname = "ResourcesProto";
3131
option java_package = "com.google.cloud.alloydb.v1alpha";
3232
option php_namespace = "Google\\Cloud\\AlloyDb\\V1alpha";
33-
option ruby_package = "Google::Cloud::AlloyDb::V1alpha";
33+
option ruby_package = "Google::Cloud::AlloyDB::V1alpha";
3434
option (google.api.resource_definition) = {
3535
type: "cloudkms.googleapis.com/CryptoKeyVersion"
3636
pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}"

google/cloud/alloydb/v1alpha/service.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ option java_multiple_files = true;
3434
option java_outer_classname = "ServiceProto";
3535
option java_package = "com.google.cloud.alloydb.v1alpha";
3636
option php_namespace = "Google\\Cloud\\AlloyDb\\V1alpha";
37-
option ruby_package = "Google::Cloud::AlloyDb::V1alpha";
37+
option ruby_package = "Google::Cloud::AlloyDB::V1alpha";
3838

3939
// Service describing handlers for resources
4040
service AlloyDBAdmin {

google/cloud/alloydb/v1beta/BUILD.bazel

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,11 +322,13 @@ ruby_cloud_gapic_library(
322322
name = "alloydb_ruby_gapic",
323323
srcs = [":alloydb_proto_with_info"],
324324
extra_protoc_parameters = [
325-
"ruby-cloud-gem-name=google-cloud-alloydb-v1beta",
325+
"ruby-cloud-gem-name=google-cloud-alloy_db-v1beta",
326+
"ruby-cloud-gem-namespace=Google::Cloud::AlloyDB::V1beta",
326327
],
327328
grpc_service_config = "alloydb_v1beta_grpc_service_config.json",
328329
rest_numeric_enums = True,
329330
service_yaml = "alloydb_v1beta.yaml",
331+
transport = "grpc+rest",
330332
deps = [
331333
":alloydb_ruby_grpc",
332334
":alloydb_ruby_proto",

google/cloud/alloydb/v1beta/resources.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ option java_multiple_files = true;
3030
option java_outer_classname = "ResourcesProto";
3131
option java_package = "com.google.cloud.alloydb.v1beta";
3232
option php_namespace = "Google\\Cloud\\AlloyDb\\V1beta";
33-
option ruby_package = "Google::Cloud::AlloyDb::V1beta";
33+
option ruby_package = "Google::Cloud::AlloyDB::V1beta";
3434
option (google.api.resource_definition) = {
3535
type: "cloudkms.googleapis.com/CryptoKeyVersion"
3636
pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}"

google/cloud/alloydb/v1beta/service.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ option java_multiple_files = true;
3434
option java_outer_classname = "ServiceProto";
3535
option java_package = "com.google.cloud.alloydb.v1beta";
3636
option php_namespace = "Google\\Cloud\\AlloyDb\\V1beta";
37-
option ruby_package = "Google::Cloud::AlloyDb::V1beta";
37+
option ruby_package = "Google::Cloud::AlloyDB::V1beta";
3838

3939
// Service describing handlers for resources
4040
service AlloyDBAdmin {

0 commit comments

Comments
 (0)