BUILD.bazel 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  1. # This is an API workspace, having public visibility by default makes perfect sense.
  2. package(default_visibility = ["//visibility:public"])
  3. ##############################################################################
  4. # Common
  5. ##############################################################################
  6. load("@rules_proto//proto:defs.bzl", "proto_library")
  7. load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
  8. proto_library(
  9. name = "storage_proto",
  10. srcs = [
  11. "arrow.proto",
  12. "avro.proto",
  13. "storage.proto",
  14. "stream.proto",
  15. ],
  16. deps = [
  17. "//google/api:annotations_proto",
  18. "//google/api:client_proto",
  19. "//google/api:field_behavior_proto",
  20. "//google/api:resource_proto",
  21. "@com_google_protobuf//:timestamp_proto",
  22. ],
  23. )
  24. proto_library_with_info(
  25. name = "storage_proto_with_info",
  26. deps = [
  27. ":storage_proto",
  28. "//google/cloud:common_resources_proto",
  29. ],
  30. )
  31. ##############################################################################
  32. # Java
  33. ##############################################################################
  34. load(
  35. "@com_google_googleapis_imports//:imports.bzl",
  36. "java_gapic_assembly_gradle_pkg",
  37. "java_gapic_library",
  38. "java_gapic_test",
  39. "java_grpc_library",
  40. "java_proto_library",
  41. )
  42. java_proto_library(
  43. name = "storage_java_proto",
  44. deps = [":storage_proto"],
  45. )
  46. java_grpc_library(
  47. name = "storage_java_grpc",
  48. srcs = [":storage_proto"],
  49. deps = [":storage_java_proto"],
  50. )
  51. java_gapic_library(
  52. name = "storage_java_gapic",
  53. srcs = [":storage_proto_with_info"],
  54. gapic_yaml = "bigquerystorage_gapic.yaml",
  55. grpc_service_config = "bigquerystorage_grpc_service_config.json",
  56. test_deps = [
  57. ":storage_java_grpc",
  58. ],
  59. deps = [
  60. ":storage_java_proto",
  61. ],
  62. )
  63. java_gapic_test(
  64. name = "storage_java_gapic_test_suite",
  65. test_classes = [
  66. "com.google.cloud.bigquery.storage.v1.BaseBigQueryReadClientTest",
  67. ],
  68. runtime_deps = [":storage_java_gapic_test"],
  69. )
  70. # Open Source Packages
  71. java_gapic_assembly_gradle_pkg(
  72. name = "google-cloud-bigquery-storage-v1-java",
  73. deps = [
  74. ":storage_java_gapic",
  75. ":storage_java_grpc",
  76. ":storage_java_proto",
  77. ":storage_proto",
  78. ],
  79. )
  80. ##############################################################################
  81. # Go
  82. ##############################################################################
  83. load(
  84. "@com_google_googleapis_imports//:imports.bzl",
  85. "go_gapic_assembly_pkg",
  86. "go_gapic_library",
  87. "go_proto_library",
  88. "go_test",
  89. )
  90. go_proto_library(
  91. name = "storage_go_proto",
  92. compilers = ["@io_bazel_rules_go//proto:go_grpc"],
  93. importpath = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1",
  94. protos = [":storage_proto"],
  95. deps = [
  96. "//google/api:annotations_go_proto",
  97. ],
  98. )
  99. go_gapic_library(
  100. name = "storage_go_gapic",
  101. srcs = [":storage_proto_with_info"],
  102. grpc_service_config = "bigquerystorage_grpc_service_config.json",
  103. importpath = "cloud.google.com/go/bigquery/storage/apiv1;storage",
  104. service_yaml = "bigquerystorage_v1.yaml",
  105. deps = [
  106. ":storage_go_proto",
  107. ],
  108. )
  109. go_test(
  110. name = "storage_go_gapic_test",
  111. srcs = [":storage_go_gapic_srcjar_test"],
  112. embed = [":storage_go_gapic"],
  113. importpath = "cloud.google.com/go/bigquery/storage/apiv1",
  114. )
  115. # Open Source Packages
  116. go_gapic_assembly_pkg(
  117. name = "gapi-cloud-bigquery-storage-v1-go",
  118. deps = [
  119. ":storage_go_gapic",
  120. ":storage_go_gapic_srcjar-test.srcjar",
  121. ":storage_go_proto",
  122. ],
  123. )
  124. ##############################################################################
  125. # Python
  126. ##############################################################################
  127. load(
  128. "@com_google_googleapis_imports//:imports.bzl",
  129. "py_gapic_assembly_pkg",
  130. "py_gapic_library",
  131. )
  132. py_gapic_library(
  133. name = "storage_py_gapic",
  134. srcs = [":storage_proto"],
  135. grpc_service_config = "bigquerystorage_grpc_service_config.json",
  136. opt_args = [
  137. "python-gapic-namespace=google.cloud",
  138. "python-gapic-name=bigquery_storage",
  139. ],
  140. )
  141. py_gapic_assembly_pkg(
  142. name = "bigquery-storage-v1-py",
  143. deps = [
  144. ":storage_py_gapic",
  145. ],
  146. )
  147. ##############################################################################
  148. # PHP
  149. ##############################################################################
  150. load(
  151. "@com_google_googleapis_imports//:imports.bzl",
  152. "php_gapic_assembly_pkg",
  153. "php_gapic_library",
  154. "php_grpc_library",
  155. "php_proto_library",
  156. )
  157. php_proto_library(
  158. name = "storage_php_proto",
  159. deps = [":storage_proto"],
  160. )
  161. php_grpc_library(
  162. name = "storage_php_grpc",
  163. srcs = [":storage_proto"],
  164. deps = [":storage_php_proto"],
  165. )
  166. php_gapic_library(
  167. name = "storage_php_gapic",
  168. srcs = [":storage_proto_with_info"],
  169. grpc_service_config = "bigquerystorage_grpc_service_config.json",
  170. deps = [
  171. ":storage_php_grpc",
  172. ":storage_php_proto",
  173. ],
  174. )
  175. # Open Source Packages
  176. php_gapic_assembly_pkg(
  177. name = "google-cloud-bigquery-storage-v1-php",
  178. deps = [
  179. ":storage_php_gapic",
  180. ":storage_php_grpc",
  181. ":storage_php_proto",
  182. ],
  183. )
  184. ##############################################################################
  185. # Node.js
  186. ##############################################################################
  187. load(
  188. "@com_google_googleapis_imports//:imports.bzl",
  189. "nodejs_gapic_assembly_pkg",
  190. "nodejs_gapic_library",
  191. )
  192. nodejs_gapic_library(
  193. name = "storage_nodejs_gapic",
  194. package_name = "@google-cloud/bigquery-storage",
  195. src = ":storage_proto_with_info",
  196. extra_protoc_parameters = ["metadata"],
  197. grpc_service_config = "bigquerystorage_grpc_service_config.json",
  198. package = "google.cloud.bigquery.storage.v1",
  199. service_yaml = "bigquerystorage_v1.yaml",
  200. deps = [],
  201. )
  202. nodejs_gapic_assembly_pkg(
  203. name = "bigquery-storage-v1-nodejs",
  204. deps = [
  205. ":storage_nodejs_gapic",
  206. ":storage_proto",
  207. ],
  208. )
  209. ##############################################################################
  210. # Ruby
  211. ##############################################################################
  212. load(
  213. "@com_google_googleapis_imports//:imports.bzl",
  214. "ruby_cloud_gapic_library",
  215. "ruby_gapic_assembly_pkg",
  216. "ruby_grpc_library",
  217. "ruby_proto_library",
  218. )
  219. ruby_proto_library(
  220. name = "storage_ruby_proto",
  221. deps = [":storage_proto"],
  222. )
  223. ruby_grpc_library(
  224. name = "storage_ruby_grpc",
  225. srcs = [":storage_proto"],
  226. deps = [":storage_ruby_proto"],
  227. )
  228. ruby_cloud_gapic_library(
  229. name = "storage_ruby_gapic",
  230. srcs = [":storage_proto_with_info"],
  231. extra_protoc_parameters = [
  232. "ruby-cloud-gem-name=google-cloud-bigquery-storage-v1",
  233. "ruby-cloud-env-prefix=BIGQUERY_STORAGE",
  234. "ruby-cloud-product-url=https://cloud.google.com/bigquery/docs/reference/storage",
  235. "ruby-cloud-api-id=bigquerystorage.googleapis.com",
  236. "ruby-cloud-api-shortname=bigquerystorage",
  237. ],
  238. grpc_service_config = "bigquerystorage_grpc_service_config.json",
  239. ruby_cloud_description = "The BigQuery Storage API provides fast access to BigQuery managed storage.",
  240. ruby_cloud_title = "BigQuery Storage V1",
  241. deps = [
  242. ":storage_ruby_grpc",
  243. ":storage_ruby_proto",
  244. ],
  245. )
  246. # Open Source Packages
  247. ruby_gapic_assembly_pkg(
  248. name = "google-cloud-bigquery-storage-v1-ruby",
  249. deps = [
  250. ":storage_ruby_gapic",
  251. ":storage_ruby_grpc",
  252. ":storage_ruby_proto",
  253. ],
  254. )
  255. ##############################################################################
  256. # C#
  257. ##############################################################################
  258. load(
  259. "@com_google_googleapis_imports//:imports.bzl",
  260. "csharp_gapic_assembly_pkg",
  261. "csharp_gapic_library",
  262. "csharp_grpc_library",
  263. "csharp_proto_library",
  264. )
  265. csharp_proto_library(
  266. name = "storage_csharp_proto",
  267. deps = [":storage_proto"],
  268. )
  269. csharp_grpc_library(
  270. name = "storage_csharp_grpc",
  271. srcs = [":storage_proto"],
  272. deps = [":storage_csharp_proto"],
  273. )
  274. csharp_gapic_library(
  275. name = "storage_csharp_gapic",
  276. srcs = [":storage_proto_with_info"],
  277. common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
  278. grpc_service_config = "bigquerystorage_grpc_service_config.json",
  279. deps = [
  280. ":storage_csharp_grpc",
  281. ":storage_csharp_proto",
  282. ],
  283. )
  284. # Open Source Packages
  285. csharp_gapic_assembly_pkg(
  286. name = "google-cloud-bigquery-storage-v1-csharp",
  287. deps = [
  288. ":storage_csharp_gapic",
  289. ":storage_csharp_grpc",
  290. ":storage_csharp_proto",
  291. ],
  292. )
  293. ##############################################################################
  294. # C++
  295. ##############################################################################
  296. load(
  297. "@com_google_googleapis_imports//:imports.bzl",
  298. "cc_grpc_library",
  299. "cc_proto_library",
  300. )
  301. cc_proto_library(
  302. name = "storage_cc_proto",
  303. deps = [":storage_proto"],
  304. )
  305. cc_grpc_library(
  306. name = "storage_cc_grpc",
  307. srcs = [":storage_proto"],
  308. generate_mocks = True,
  309. grpc_only = True,
  310. deps = [":storage_cc_proto"],
  311. )