BUILD.bazel 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. # This file was automatically generated by BuildFileGenerator
  2. # This is an API workspace, having public visibility by default makes perfect sense.
  3. package(default_visibility = ["//visibility:public"])
  4. exports_files(glob(include = ["*grpc_service_config.json"]))
  5. ##############################################################################
  6. # Discovery
  7. ##############################################################################
  8. load(
  9. "@com_google_disco_to_proto3_converter//rules_gapic:disco_to_proto.bzl",
  10. "gapic_yaml_from_disco",
  11. "grpc_service_config_from_disco",
  12. "proto_from_disco",
  13. )
  14. _MESSAGE_IGNORE_LIST = [
  15. "HttpHealthCheck",
  16. "HttpsHealthCheck",
  17. "HttpHealthCheckList",
  18. "HttpsHealthCheckList",
  19. "GetHttpHealthCheckRequest",
  20. "GetHttpsHealthCheckRequest",
  21. "PatchHttpHealthCheckRequest",
  22. "PatchHttpsHealthCheckRequest",
  23. "UpdateHttpHealthCheckRequest",
  24. "UpdateHttpsHealthCheckRequest",
  25. "InsertHttpHealthCheckRequest",
  26. "InsertHttpsHealthCheckRequest",
  27. "ListHttpHealthChecksRequest",
  28. "ListHttpsHealthChecksRequest",
  29. "DeleteHttpHealthCheckRequest",
  30. "DeleteHttpsHealthCheckRequest",
  31. ]
  32. _SERVICE_IGNORELIST = [
  33. "HttpHealthChecks",
  34. "HttpsHealthChecks",
  35. ]
  36. proto_from_disco(
  37. name = "compute_gen",
  38. src = "compute.v1.json",
  39. previous_proto = "compute.proto",
  40. enums_as_strings = True,
  41. message_ignorelist = _MESSAGE_IGNORE_LIST,
  42. service_ignorelist = _SERVICE_IGNORELIST,
  43. )
  44. grpc_service_config_from_disco(
  45. name = "compute_grpc_service_config_gen",
  46. src = "compute.v1.json",
  47. previous_proto = "compute.proto",
  48. message_ignorelist = _MESSAGE_IGNORE_LIST,
  49. service_ignorelist = _SERVICE_IGNORELIST,
  50. )
  51. gapic_yaml_from_disco(
  52. name = "compute_gapic_gen",
  53. src = "compute.v1.json",
  54. previous_proto = "compute.proto",
  55. message_ignorelist = _MESSAGE_IGNORE_LIST,
  56. service_ignorelist = _SERVICE_IGNORELIST,
  57. )
  58. ##############################################################################
  59. # Common
  60. ##############################################################################
  61. load("@rules_proto//proto:defs.bzl", "proto_library")
  62. load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
  63. proto_library(
  64. name = "compute_proto",
  65. srcs = [
  66. "compute.proto",
  67. ],
  68. deps = [
  69. "@com_google_googleapis//google/api:annotations_proto",
  70. "@com_google_googleapis//google/api:client_proto",
  71. "@com_google_googleapis//google/api:field_behavior_proto",
  72. "@com_google_googleapis//google/api:resource_proto",
  73. "@com_google_googleapis//google/cloud:extended_operations_proto",
  74. "@com_google_protobuf//:descriptor_proto",
  75. ],
  76. )
  77. proto_library_with_info(
  78. name = "compute_proto_with_info",
  79. deps = [
  80. ":compute_proto",
  81. "@com_google_googleapis//google/cloud:common_resources_proto",
  82. ],
  83. )
  84. ##############################################################################
  85. # Java
  86. ##############################################################################
  87. load(
  88. "@com_google_googleapis_imports//:imports.bzl",
  89. "java_gapic_assembly_gradle_pkg",
  90. "java_gapic_library",
  91. "java_gapic_test",
  92. "java_grpc_library",
  93. "java_proto_library",
  94. )
  95. java_proto_library(
  96. name = "compute_java_proto",
  97. deps = [":compute_proto"],
  98. )
  99. java_gapic_library(
  100. name = "compute_java_gapic",
  101. srcs = [":compute_proto_with_info"],
  102. gapic_yaml = "compute_gapic.yaml",
  103. grpc_service_config = ":compute_grpc_service_config.json",
  104. test_deps = [],
  105. transport = "rest",
  106. deps = [
  107. ":compute_java_proto",
  108. ],
  109. )
  110. java_gapic_test(
  111. name = "compute_java_gapic_test_suite",
  112. test_classes = [
  113. "com.google.cloud.compute.v1.AcceleratorTypesClientTest",
  114. "com.google.cloud.compute.v1.AddressesClientTest",
  115. "com.google.cloud.compute.v1.AutoscalersClientTest",
  116. "com.google.cloud.compute.v1.BackendBucketsClientTest",
  117. "com.google.cloud.compute.v1.BackendServicesClientTest",
  118. "com.google.cloud.compute.v1.DiskTypesClientTest",
  119. "com.google.cloud.compute.v1.DisksClientTest",
  120. "com.google.cloud.compute.v1.ExternalVpnGatewaysClientTest",
  121. "com.google.cloud.compute.v1.FirewallPoliciesClientTest",
  122. "com.google.cloud.compute.v1.FirewallsClientTest",
  123. "com.google.cloud.compute.v1.ForwardingRulesClientTest",
  124. "com.google.cloud.compute.v1.GlobalAddressesClientTest",
  125. "com.google.cloud.compute.v1.GlobalForwardingRulesClientTest",
  126. "com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsClientTest",
  127. "com.google.cloud.compute.v1.GlobalOperationsClientTest",
  128. "com.google.cloud.compute.v1.GlobalOrganizationOperationsClientTest",
  129. "com.google.cloud.compute.v1.GlobalPublicDelegatedPrefixesClientTest",
  130. "com.google.cloud.compute.v1.HealthChecksClientTest",
  131. "com.google.cloud.compute.v1.ImageFamilyViewsClientTest",
  132. "com.google.cloud.compute.v1.ImagesClientTest",
  133. "com.google.cloud.compute.v1.InstanceGroupManagersClientTest",
  134. "com.google.cloud.compute.v1.InstanceGroupsClientTest",
  135. "com.google.cloud.compute.v1.InstanceTemplatesClientTest",
  136. "com.google.cloud.compute.v1.InstancesClientTest",
  137. "com.google.cloud.compute.v1.InterconnectAttachmentsClientTest",
  138. "com.google.cloud.compute.v1.InterconnectLocationsClientTest",
  139. "com.google.cloud.compute.v1.InterconnectsClientTest",
  140. "com.google.cloud.compute.v1.LicenseCodesClientTest",
  141. "com.google.cloud.compute.v1.LicensesClientTest",
  142. "com.google.cloud.compute.v1.MachineTypesClientTest",
  143. "com.google.cloud.compute.v1.NetworkEndpointGroupsClientTest",
  144. "com.google.cloud.compute.v1.NetworksClientTest",
  145. "com.google.cloud.compute.v1.NodeGroupsClientTest",
  146. "com.google.cloud.compute.v1.NodeTemplatesClientTest",
  147. "com.google.cloud.compute.v1.NodeTypesClientTest",
  148. "com.google.cloud.compute.v1.PacketMirroringsClientTest",
  149. "com.google.cloud.compute.v1.ProjectsClientTest",
  150. "com.google.cloud.compute.v1.PublicAdvertisedPrefixesClientTest",
  151. "com.google.cloud.compute.v1.PublicDelegatedPrefixesClientTest",
  152. "com.google.cloud.compute.v1.RegionAutoscalersClientTest",
  153. "com.google.cloud.compute.v1.RegionBackendServicesClientTest",
  154. "com.google.cloud.compute.v1.RegionCommitmentsClientTest",
  155. "com.google.cloud.compute.v1.RegionDiskTypesClientTest",
  156. "com.google.cloud.compute.v1.RegionDisksClientTest",
  157. "com.google.cloud.compute.v1.RegionHealthCheckServicesClientTest",
  158. "com.google.cloud.compute.v1.RegionHealthChecksClientTest",
  159. "com.google.cloud.compute.v1.RegionInstanceGroupManagersClientTest",
  160. "com.google.cloud.compute.v1.RegionInstanceGroupsClientTest",
  161. "com.google.cloud.compute.v1.RegionInstancesClientTest",
  162. "com.google.cloud.compute.v1.RegionNetworkEndpointGroupsClientTest",
  163. "com.google.cloud.compute.v1.RegionNotificationEndpointsClientTest",
  164. "com.google.cloud.compute.v1.RegionOperationsClientTest",
  165. "com.google.cloud.compute.v1.RegionSslCertificatesClientTest",
  166. "com.google.cloud.compute.v1.RegionTargetHttpProxiesClientTest",
  167. "com.google.cloud.compute.v1.RegionTargetHttpsProxiesClientTest",
  168. "com.google.cloud.compute.v1.RegionUrlMapsClientTest",
  169. "com.google.cloud.compute.v1.RegionsClientTest",
  170. "com.google.cloud.compute.v1.ReservationsClientTest",
  171. "com.google.cloud.compute.v1.ResourcePoliciesClientTest",
  172. "com.google.cloud.compute.v1.RoutersClientTest",
  173. "com.google.cloud.compute.v1.RoutesClientTest",
  174. "com.google.cloud.compute.v1.SecurityPoliciesClientTest",
  175. "com.google.cloud.compute.v1.ServiceAttachmentsClientTest",
  176. "com.google.cloud.compute.v1.SnapshotsClientTest",
  177. "com.google.cloud.compute.v1.SslCertificatesClientTest",
  178. "com.google.cloud.compute.v1.SslPoliciesClientTest",
  179. "com.google.cloud.compute.v1.SubnetworksClientTest",
  180. "com.google.cloud.compute.v1.TargetGrpcProxiesClientTest",
  181. "com.google.cloud.compute.v1.TargetHttpProxiesClientTest",
  182. "com.google.cloud.compute.v1.TargetHttpsProxiesClientTest",
  183. "com.google.cloud.compute.v1.TargetInstancesClientTest",
  184. "com.google.cloud.compute.v1.TargetPoolsClientTest",
  185. "com.google.cloud.compute.v1.TargetSslProxiesClientTest",
  186. "com.google.cloud.compute.v1.TargetTcpProxiesClientTest",
  187. "com.google.cloud.compute.v1.TargetVpnGatewaysClientTest",
  188. "com.google.cloud.compute.v1.UrlMapsClientTest",
  189. "com.google.cloud.compute.v1.VpnGatewaysClientTest",
  190. "com.google.cloud.compute.v1.VpnTunnelsClientTest",
  191. "com.google.cloud.compute.v1.ZoneOperationsClientTest",
  192. "com.google.cloud.compute.v1.ZonesClientTest",
  193. ],
  194. runtime_deps = [":compute_java_gapic_test"],
  195. )
  196. # Open Source Packages
  197. java_gapic_assembly_gradle_pkg(
  198. name = "google-cloud-compute-v1-java",
  199. transport = "rest",
  200. deps = [
  201. ":compute_java_gapic",
  202. ":compute_java_proto",
  203. ":compute_proto",
  204. ],
  205. )
  206. ##############################################################################
  207. # Python
  208. ##############################################################################
  209. load(
  210. "@com_google_googleapis_imports//:imports.bzl",
  211. "py_gapic_assembly_pkg",
  212. "py_gapic_library",
  213. "py_test",
  214. )
  215. py_gapic_library(
  216. name = "compute_py_gapic",
  217. srcs = [
  218. ":compute_proto",
  219. ],
  220. opt_args = [
  221. "transport=rest",
  222. "autogen-snippets=False",
  223. ],
  224. )
  225. py_test(
  226. name = "compute_py_gapic_test",
  227. srcs = [
  228. "compute_py_gapic_pytest.py",
  229. "compute_py_gapic_test.py",
  230. ],
  231. legacy_create_init = False,
  232. deps = [":compute_py_gapic"],
  233. )
  234. # Open Source Packages
  235. py_gapic_assembly_pkg(
  236. name = "compute-v1-py",
  237. deps = [
  238. ":compute_py_gapic",
  239. ],
  240. )
  241. ##############################################################################
  242. # PHP
  243. ##############################################################################
  244. load(
  245. "@com_google_googleapis_imports//:imports.bzl",
  246. "php_gapic_assembly_pkg",
  247. "php_gapic_library",
  248. "php_proto_library",
  249. )
  250. php_proto_library(
  251. name = "compute_php_proto",
  252. deps = [":compute_proto"],
  253. )
  254. php_gapic_library(
  255. name = "compute_php_gapic",
  256. srcs = [":compute_proto_with_info"],
  257. grpc_service_config = "compute_grpc_service_config.json",
  258. service_yaml = "compute_v1.yaml",
  259. transport = "rest",
  260. deps = [
  261. ":compute_php_proto",
  262. ],
  263. )
  264. # Open Source Packages
  265. php_gapic_assembly_pkg(
  266. name = "google-cloud-compute-v1-php",
  267. deps = [
  268. ":compute_php_gapic",
  269. ":compute_php_proto",
  270. ],
  271. )
  272. ##############################################################################
  273. # Node.js
  274. ##############################################################################
  275. load(
  276. "@com_google_googleapis_imports//:imports.bzl",
  277. "nodejs_gapic_assembly_pkg",
  278. "nodejs_gapic_library",
  279. )
  280. nodejs_gapic_library(
  281. name = "compute_nodejs_gapic",
  282. package_name = "@google-cloud/compute",
  283. src = ":compute_proto_with_info",
  284. extra_protoc_parameters = ["metadata"],
  285. diregapic = True,
  286. deps = [],
  287. )
  288. nodejs_gapic_assembly_pkg(
  289. name = "compute-v1-nodejs",
  290. deps = [
  291. ":compute_nodejs_gapic",
  292. ":compute_proto",
  293. ],
  294. )
  295. ###############################################################################
  296. # Ruby
  297. ###############################################################################
  298. load(
  299. "@com_google_googleapis_imports//:imports.bzl",
  300. "ruby_cloud_gapic_library",
  301. "ruby_gapic_assembly_pkg",
  302. "ruby_proto_library",
  303. )
  304. ruby_proto_library(
  305. name = "compute_ruby_proto",
  306. deps = [":compute_proto"],
  307. )
  308. ruby_cloud_gapic_library(
  309. name = "compute_ruby_gapic",
  310. srcs = [":compute_proto_with_info"],
  311. extra_protoc_parameters = [
  312. "ruby-cloud-api-id=compute.googleapis.com",
  313. "ruby-cloud-api-shortname=compute",
  314. "ruby-cloud-gem-name=google-cloud-compute-v1",
  315. "ruby-cloud-generate-metadata=false",
  316. "ruby-cloud-generate-transports=rest",
  317. "ruby-cloud-env-prefix=COMPUTE",
  318. "ruby-cloud-product-url=https://cloud.google.com/compute/",
  319. "ruby-cloud-wrapper-gem-override=",
  320. "ruby-cloud-extra-dependencies=google-cloud-common=~> 1.0",
  321. ],
  322. grpc_service_config = ":compute_grpc_service_config.json",
  323. ruby_cloud_description = "google-cloud-compute-v1 is the official client library for the Google Cloud Compute V1 API.",
  324. ruby_cloud_title = "Google Cloud Compute V1",
  325. deps = [
  326. ":compute_ruby_proto",
  327. ],
  328. )
  329. ruby_gapic_assembly_pkg(
  330. name = "google-cloud-compute-v1-ruby",
  331. deps = [
  332. ":compute_ruby_gapic",
  333. ":compute_ruby_proto",
  334. ],
  335. )
  336. ##############################################################################
  337. # C#
  338. ##############################################################################
  339. load(
  340. "@com_google_googleapis_imports//:imports.bzl",
  341. "csharp_gapic_assembly_pkg",
  342. "csharp_gapic_library",
  343. "csharp_grpc_library",
  344. "csharp_proto_library",
  345. )
  346. csharp_proto_library(
  347. name = "compute_csharp_proto",
  348. deps = [":compute_proto"],
  349. )
  350. csharp_grpc_library(
  351. name = "compute_csharp_grpc",
  352. srcs = [":compute_proto"],
  353. deps = [":compute_csharp_proto"],
  354. )
  355. csharp_gapic_library(
  356. name = "compute_csharp_gapic",
  357. srcs = [":compute_proto_with_info"],
  358. common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
  359. grpc_service_config = ":compute_grpc_service_config.json",
  360. transport = "rest",
  361. deps = [
  362. ":compute_csharp_grpc",
  363. ":compute_csharp_proto",
  364. ],
  365. )
  366. # Open Source Packages
  367. csharp_gapic_assembly_pkg(
  368. name = "google-cloud-compute-v1-csharp",
  369. deps = [
  370. ":compute_csharp_gapic",
  371. ":compute_csharp_grpc",
  372. ":compute_csharp_proto",
  373. ],
  374. )