BUILD.bazel 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. # This file was automatically generated by BuildFileGenerator
  2. # https://github.com/googleapis/rules_gapic/tree/master/bazel
  3. # Most of the manual changes to this file will be overwritten.
  4. # It's **only** allowed to change the following rule attribute values:
  5. # - names of *_gapic_assembly_* rules
  6. # - certain parameters of *_gapic_library rules, including but not limited to:
  7. # * extra_protoc_parameters
  8. # * extra_protoc_file_parameters
  9. # The complete list of preserved parameters can be found in the source code.
  10. # This is an API workspace, having public visibility by default makes perfect sense.
  11. package(default_visibility = ["//visibility:public"])
  12. ##############################################################################
  13. # Common
  14. ##############################################################################
  15. load("@rules_proto//proto:defs.bzl", "proto_library")
  16. load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
  17. proto_library(
  18. name = "tpu_proto",
  19. srcs = [
  20. "cloud_tpu.proto",
  21. ],
  22. deps = [
  23. "//google/api:annotations_proto",
  24. "//google/api:client_proto",
  25. "//google/api:field_behavior_proto",
  26. "//google/api:resource_proto",
  27. "//google/longrunning:operations_proto",
  28. "@com_google_protobuf//:field_mask_proto",
  29. "@com_google_protobuf//:timestamp_proto",
  30. ],
  31. )
  32. proto_library_with_info(
  33. name = "tpu_proto_with_info",
  34. deps = [
  35. ":tpu_proto",
  36. "//google/cloud:common_resources_proto",
  37. ],
  38. )
  39. ##############################################################################
  40. # Java
  41. ##############################################################################
  42. load(
  43. "@com_google_googleapis_imports//:imports.bzl",
  44. "java_gapic_assembly_gradle_pkg",
  45. "java_gapic_library",
  46. "java_gapic_test",
  47. "java_grpc_library",
  48. "java_proto_library",
  49. )
  50. java_proto_library(
  51. name = "tpu_java_proto",
  52. deps = [":tpu_proto"],
  53. )
  54. java_grpc_library(
  55. name = "tpu_java_grpc",
  56. srcs = [":tpu_proto"],
  57. deps = [":tpu_java_proto"],
  58. )
  59. java_gapic_library(
  60. name = "tpu_java_gapic",
  61. srcs = [":tpu_proto_with_info"],
  62. gapic_yaml = None,
  63. grpc_service_config = "tpu_grpc_service_config.json",
  64. rest_numeric_enums = False,
  65. service_yaml = "tpu.yaml",
  66. test_deps = [
  67. ":tpu_java_grpc",
  68. ],
  69. transport = "grpc",
  70. deps = [
  71. ":tpu_java_proto",
  72. "//google/api:api_java_proto",
  73. ],
  74. )
  75. java_gapic_test(
  76. name = "tpu_java_gapic_test_suite",
  77. test_classes = [
  78. "com.google.cloud.tpu.v2alpha1.TpuClientTest",
  79. ],
  80. runtime_deps = [":tpu_java_gapic_test"],
  81. )
  82. # Open Source Packages
  83. java_gapic_assembly_gradle_pkg(
  84. name = "google-cloud-tpu-v2alpha1-java",
  85. include_samples = True,
  86. transport = "grpc",
  87. deps = [
  88. ":tpu_java_gapic",
  89. ":tpu_java_grpc",
  90. ":tpu_java_proto",
  91. ":tpu_proto",
  92. ],
  93. )
  94. ##############################################################################
  95. # Go
  96. ##############################################################################
  97. load(
  98. "@com_google_googleapis_imports//:imports.bzl",
  99. "go_gapic_assembly_pkg",
  100. "go_gapic_library",
  101. "go_proto_library",
  102. "go_test",
  103. )
  104. go_proto_library(
  105. name = "tpu_go_proto",
  106. compilers = ["@io_bazel_rules_go//proto:go_grpc"],
  107. importpath = "google.golang.org/genproto/googleapis/cloud/tpu/v2alpha1",
  108. protos = [":tpu_proto"],
  109. deps = [
  110. "//google/api:annotations_go_proto",
  111. "//google/longrunning:longrunning_go_proto",
  112. ],
  113. )
  114. go_gapic_library(
  115. name = "tpu_go_gapic",
  116. srcs = [":tpu_proto_with_info"],
  117. grpc_service_config = "tpu_grpc_service_config.json",
  118. importpath = "cloud.google.com/go/tpu/apiv2alpha1;tpu",
  119. metadata = True,
  120. rest_numeric_enums = False,
  121. service_yaml = "tpu.yaml",
  122. deps = [
  123. ":tpu_go_proto",
  124. "//google/longrunning:longrunning_go_proto",
  125. "@com_google_cloud_go//longrunning:go_default_library",
  126. "@com_google_cloud_go//longrunning/autogen:go_default_library",
  127. ],
  128. )
  129. go_test(
  130. name = "tpu_go_gapic_test",
  131. srcs = [":tpu_go_gapic_srcjar_test"],
  132. embed = [":tpu_go_gapic"],
  133. importpath = "cloud.google.com/go/tpu/apiv2alpha1",
  134. )
  135. # Open Source Packages
  136. go_gapic_assembly_pkg(
  137. name = "gapi-cloud-tpu-v2alpha1-go",
  138. deps = [
  139. ":tpu_go_gapic",
  140. ":tpu_go_gapic_srcjar-metadata.srcjar",
  141. ":tpu_go_gapic_srcjar-test.srcjar",
  142. ":tpu_go_proto",
  143. ],
  144. )
  145. ##############################################################################
  146. # Python
  147. ##############################################################################
  148. load(
  149. "@com_google_googleapis_imports//:imports.bzl",
  150. "py_gapic_assembly_pkg",
  151. "py_gapic_library",
  152. "py_test",
  153. )
  154. py_gapic_library(
  155. name = "tpu_py_gapic",
  156. srcs = [":tpu_proto"],
  157. grpc_service_config = "tpu_grpc_service_config.json",
  158. rest_numeric_enums = False,
  159. transport = "grpc",
  160. )
  161. py_test(
  162. name = "tpu_py_gapic_test",
  163. srcs = [
  164. "tpu_py_gapic_pytest.py",
  165. "tpu_py_gapic_test.py",
  166. ],
  167. legacy_create_init = False,
  168. deps = [":tpu_py_gapic"],
  169. )
  170. # Open Source Packages
  171. py_gapic_assembly_pkg(
  172. name = "tpu-v2alpha1-py",
  173. deps = [
  174. ":tpu_py_gapic",
  175. ],
  176. )
  177. ##############################################################################
  178. # PHP
  179. ##############################################################################
  180. load(
  181. "@com_google_googleapis_imports//:imports.bzl",
  182. "php_gapic_assembly_pkg",
  183. "php_gapic_library",
  184. "php_grpc_library",
  185. "php_proto_library",
  186. )
  187. php_proto_library(
  188. name = "tpu_php_proto",
  189. deps = [":tpu_proto"],
  190. )
  191. php_grpc_library(
  192. name = "tpu_php_grpc",
  193. srcs = [":tpu_proto"],
  194. deps = [":tpu_php_proto"],
  195. )
  196. php_gapic_library(
  197. name = "tpu_php_gapic",
  198. srcs = [":tpu_proto_with_info"],
  199. grpc_service_config = "tpu_grpc_service_config.json",
  200. rest_numeric_enums = False,
  201. service_yaml = "tpu.yaml",
  202. transport = "grpc+rest",
  203. deps = [
  204. ":tpu_php_grpc",
  205. ":tpu_php_proto",
  206. ],
  207. )
  208. # Open Source Packages
  209. php_gapic_assembly_pkg(
  210. name = "google-cloud-tpu-v2alpha1-php",
  211. deps = [
  212. ":tpu_php_gapic",
  213. ":tpu_php_grpc",
  214. ":tpu_php_proto",
  215. ],
  216. )
  217. ##############################################################################
  218. # Node.js
  219. ##############################################################################
  220. load(
  221. "@com_google_googleapis_imports//:imports.bzl",
  222. "nodejs_gapic_assembly_pkg",
  223. "nodejs_gapic_library",
  224. )
  225. nodejs_gapic_library(
  226. name = "tpu_nodejs_gapic",
  227. package_name = "@google-cloud/tpu",
  228. src = ":tpu_proto_with_info",
  229. extra_protoc_parameters = ["metadata"],
  230. grpc_service_config = "tpu_grpc_service_config.json",
  231. package = "google.cloud.tpu.v2alpha1",
  232. rest_numeric_enums = False,
  233. service_yaml = "tpu.yaml",
  234. transport = "grpc+rest",
  235. deps = [],
  236. )
  237. nodejs_gapic_assembly_pkg(
  238. name = "tpu-v2alpha1-nodejs",
  239. deps = [
  240. ":tpu_nodejs_gapic",
  241. ":tpu_proto",
  242. ],
  243. )
  244. ##############################################################################
  245. # Ruby
  246. ##############################################################################
  247. load(
  248. "@com_google_googleapis_imports//:imports.bzl",
  249. "ruby_cloud_gapic_library",
  250. "ruby_gapic_assembly_pkg",
  251. "ruby_grpc_library",
  252. "ruby_proto_library",
  253. )
  254. ruby_proto_library(
  255. name = "tpu_ruby_proto",
  256. deps = [":tpu_proto"],
  257. )
  258. ruby_grpc_library(
  259. name = "tpu_ruby_grpc",
  260. srcs = [":tpu_proto"],
  261. deps = [":tpu_ruby_proto"],
  262. )
  263. ruby_cloud_gapic_library(
  264. name = "tpu_ruby_gapic",
  265. srcs = [":tpu_proto_with_info"],
  266. extra_protoc_parameters = [
  267. "ruby-cloud-gem-name=google-cloud-tpu-v2alpha1",
  268. ],
  269. grpc_service_config = "tpu_grpc_service_config.json",
  270. rest_numeric_enums = False,
  271. deps = [
  272. ":tpu_ruby_grpc",
  273. ":tpu_ruby_proto",
  274. ],
  275. )
  276. # Open Source Packages
  277. ruby_gapic_assembly_pkg(
  278. name = "google-cloud-tpu-v2alpha1-ruby",
  279. deps = [
  280. ":tpu_ruby_gapic",
  281. ":tpu_ruby_grpc",
  282. ":tpu_ruby_proto",
  283. ],
  284. )
  285. ##############################################################################
  286. # C#
  287. ##############################################################################
  288. load(
  289. "@com_google_googleapis_imports//:imports.bzl",
  290. "csharp_gapic_assembly_pkg",
  291. "csharp_gapic_library",
  292. "csharp_grpc_library",
  293. "csharp_proto_library",
  294. )
  295. csharp_proto_library(
  296. name = "tpu_csharp_proto",
  297. deps = [":tpu_proto"],
  298. )
  299. csharp_grpc_library(
  300. name = "tpu_csharp_grpc",
  301. srcs = [":tpu_proto"],
  302. deps = [":tpu_csharp_proto"],
  303. )
  304. csharp_gapic_library(
  305. name = "tpu_csharp_gapic",
  306. srcs = [":tpu_proto_with_info"],
  307. common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
  308. grpc_service_config = "tpu_grpc_service_config.json",
  309. rest_numeric_enums = False,
  310. service_yaml = "tpu.yaml",
  311. deps = [
  312. ":tpu_csharp_grpc",
  313. ":tpu_csharp_proto",
  314. ],
  315. )
  316. # Open Source Packages
  317. csharp_gapic_assembly_pkg(
  318. name = "google-cloud-tpu-v2alpha1-csharp",
  319. deps = [
  320. ":tpu_csharp_gapic",
  321. ":tpu_csharp_grpc",
  322. ":tpu_csharp_proto",
  323. ],
  324. )
  325. ##############################################################################
  326. # C++
  327. ##############################################################################
  328. # Put your C++ rules here