@@ -8,6 +8,7 @@ package(default_visibility = ["//visibility:public"])
88##############################################################################
99load (
1010 "@com_google_disco_to_proto3_converter//rules_gapic:disco_to_proto.bzl" ,
11+ "grpc_service_config_from_disco" ,
1112 "proto_from_disco" ,
1213)
1314
@@ -16,31 +17,47 @@ proto_from_disco(
1617 src = "compute.v1.small.json" ,
1718)
1819
20+ grpc_service_config_from_disco (
21+ name = "compute_small_grpc_service_config_gen" ,
22+ src = "compute.v1.small.json" ,
23+ )
24+
25+ _MESSAGE_IGNORE_LIST = [
26+ "HttpHealthCheck" ,
27+ "HttpsHealthCheck" ,
28+ "HttpHealthCheckList" ,
29+ "HttpsHealthCheckList" ,
30+ "GetHttpHealthCheckRequest" ,
31+ "GetHttpsHealthCheckRequest" ,
32+ "PatchHttpHealthCheckRequest" ,
33+ "PatchHttpsHealthCheckRequest" ,
34+ "UpdateHttpHealthCheckRequest" ,
35+ "UpdateHttpsHealthCheckRequest" ,
36+ "InsertHttpHealthCheckRequest" ,
37+ "InsertHttpsHealthCheckRequest" ,
38+ "ListHttpHealthChecksRequest" ,
39+ "ListHttpsHealthChecksRequest" ,
40+ "DeleteHttpHealthCheckRequest" ,
41+ "DeleteHttpsHealthCheckRequest" ,
42+ ]
43+
44+ _SERVICE_IGNORELIST = [
45+ "HttpHealthChecks" ,
46+ "HttpsHealthChecks" ,
47+ ]
48+
1949proto_from_disco (
2050 name = "compute_gen" ,
2151 src = "compute.v1.json" ,
22- message_ignorelist = [
23- "HttpHealthCheck" ,
24- "HttpsHealthCheck" ,
25- "HttpHealthCheckList" ,
26- "HttpsHealthCheckList" ,
27- "GetHttpHealthCheckRequest" ,
28- "GetHttpsHealthCheckRequest" ,
29- "PatchHttpHealthCheckRequest" ,
30- "PatchHttpsHealthCheckRequest" ,
31- "UpdateHttpHealthCheckRequest" ,
32- "UpdateHttpsHealthCheckRequest" ,
33- "InsertHttpHealthCheckRequest" ,
34- "InsertHttpsHealthCheckRequest" ,
35- "ListHttpHealthChecksRequest" ,
36- "ListHttpsHealthChecksRequest" ,
37- "DeleteHttpHealthCheckRequest" ,
38- "DeleteHttpsHealthCheckRequest" ,
39- ],
40- service_ignorelist = [
41- "HttpHealthChecks" ,
42- "HttpsHealthChecks" ,
43- ],
52+ message_ignorelist = _MESSAGE_IGNORE_LIST ,
53+ service_ignorelist = _SERVICE_IGNORELIST ,
54+ )
55+
56+ grpc_service_config_from_disco (
57+ name = "compute_grpc_service_config_gen" ,
58+ src = "compute.v1.json" ,
59+ message_ignorelist = _MESSAGE_IGNORE_LIST ,
60+ service_ignorelist = _SERVICE_IGNORELIST ,
4461)
4562
4663##############################################################################
@@ -49,12 +66,6 @@ proto_from_disco(
4966load ("@rules_proto//proto:defs.bzl" , "proto_library" )
5067load ("@com_google_googleapis_imports//:imports.bzl" , "proto_library_with_info" )
5168
52- # TODO: Remove legacy rule imports after the monolith has been removed from this repo.
53- load (
54- "@com_google_api_codegen//rules_gapic:gapic.bzl" ,
55- proto_library_with_info_legacy = "proto_library_with_info" ,
56- )
57-
5869proto_library (
5970 name = "compute_proto" ,
6071 srcs = [
@@ -77,14 +88,6 @@ proto_library_with_info(
7788 ],
7889)
7990
80- proto_library_with_info_legacy (
81- name = "compute_proto_with_info_legacy" ,
82- deps = [
83- ":compute_proto" ,
84- "@com_google_googleapis//google/cloud:common_resources_proto" ,
85- ],
86- )
87-
8891proto_library (
8992 name = "compute_small_proto" ,
9093 srcs = [
@@ -108,14 +111,6 @@ proto_library_with_info(
108111 ],
109112)
110113
111- proto_library_with_info_legacy (
112- name = "compute_small_proto_with_info_legacy" ,
113- deps = [
114- ":compute_small_proto" ,
115- "@com_google_googleapis//google/cloud:common_resources_proto" ,
116- ],
117- )
118-
119114##############################################################################
120115# Java
121116##############################################################################
@@ -128,36 +123,23 @@ load(
128123 "java_proto_library" ,
129124)
130125
131- # TODO: Remove legacy rule imports after the monolith has been removed from this repo.
132- load (
133- "@com_google_api_codegen//rules_gapic/java:java_gapic.bzl" ,
134- java_gapic_library_legacy = "java_gapic_library" ,
135- java_gapic_test_legacy = "java_gapic_test" ,
136- )
137- load (
138- "@com_google_api_codegen//rules_gapic/java:java_gapic_pkg.bzl" ,
139- java_gapic_assembly_gradle_pkg_legacy = "java_gapic_assembly_gradle_pkg" ,
140- )
141-
142126java_proto_library (
143127 name = "compute_java_proto" ,
144128 deps = [":compute_proto" ],
145129)
146130
147- java_gapic_library_legacy (
131+ java_gapic_library (
148132 name = "compute_java_gapic" ,
149- src = ":compute_proto_with_info_legacy" ,
150- gapic_yaml = "compute_gapic.yaml" ,
151- package = "google.cloud.compute.v1" ,
152- service_yaml = "compute_v1.yaml" ,
133+ srcs = [":compute_proto_with_info" ],
134+ grpc_service_config = ":compute_grpc_service_config.json" ,
153135 test_deps = [],
154136 transport = "rest" ,
155137 deps = [
156138 ":compute_java_proto" ,
157139 ],
158140)
159141
160- java_gapic_test_legacy (
142+ java_gapic_test (
161143 name = "compute_java_gapic_test_suite" ,
162144 test_classes = [
163145 "com.google.cloud.compute.v1.AcceleratorTypesClientTest" ,
@@ -235,7 +217,7 @@ java_gapic_test_legacy(
235217)
236218
237219# Open Source Packages
238- java_gapic_assembly_gradle_pkg_legacy (
220+ java_gapic_assembly_gradle_pkg (
239221 name = "google-cloud-compute-v1-java" ,
240222 transport = "rest" ,
241223 deps = [
@@ -254,7 +236,8 @@ java_proto_library(
254236# Used for integration tests
255237java_gapic_library (
256238 name = "compute_small_java_gapic" ,
257- srcs = [":compute_small_proto_with_info_legacy" ],
239+ srcs = [":compute_small_proto_with_info" ],
240+ grpc_service_config = ":compute_small_grpc_service_config.json" ,
258241 test_deps = [],
259242 transport = "rest" ,
260243 deps = [
0 commit comments