BUILD.bazel 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  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//:timestamp_proto",
  29. ],
  30. )
  31. proto_library_with_info(
  32. name = "tpu_proto_with_info",
  33. deps = [
  34. ":tpu_proto",
  35. "//google/cloud:common_resources_proto",
  36. "//google/cloud/location:location_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_v1.yaml",
  66. test_deps = [
  67. ":tpu_java_grpc",
  68. "//google/cloud/location:location_java_grpc",
  69. ],
  70. transport = "grpc",
  71. deps = [
  72. ":tpu_java_proto",
  73. "//google/api:api_java_proto",
  74. "//google/cloud/location:location_java_proto",
  75. ],
  76. )
  77. java_gapic_test(
  78. name = "tpu_java_gapic_test_suite",
  79. test_classes = [
  80. "com.google.cloud.tpu.v1.TpuClientTest",
  81. ],
  82. runtime_deps = [":tpu_java_gapic_test"],
  83. )
  84. # Open Source Packages
  85. java_gapic_assembly_gradle_pkg(
  86. name = "google-cloud-tpu-v1-java",
  87. include_samples = True,
  88. transport = "grpc+rest",
  89. deps = [
  90. ":tpu_java_gapic",
  91. ":tpu_java_grpc",
  92. ":tpu_java_proto",
  93. ":tpu_proto",
  94. ],
  95. )
  96. ##############################################################################
  97. # Go
  98. ##############################################################################
  99. load(
  100. "@com_google_googleapis_imports//:imports.bzl",
  101. "go_gapic_assembly_pkg",
  102. "go_gapic_library",
  103. "go_proto_library",
  104. "go_test",
  105. )
  106. go_proto_library(
  107. name = "tpu_go_proto",
  108. compilers = ["@io_bazel_rules_go//proto:go_grpc"],
  109. importpath = "google.golang.org/genproto/googleapis/cloud/tpu/v1",
  110. protos = [":tpu_proto"],
  111. deps = [
  112. "//google/api:annotations_go_proto",
  113. "//google/longrunning:longrunning_go_proto",
  114. ],
  115. )
  116. go_gapic_library(
  117. name = "tpu_go_gapic",
  118. srcs = [":tpu_proto_with_info"],
  119. grpc_service_config = "tpu_grpc_service_config.json",
  120. importpath = "cloud.google.com/go/tpu/apiv1;tpu",
  121. metadata = True,
  122. rest_numeric_enums = False,
  123. service_yaml = "tpu_v1.yaml",
  124. transport = "grpc+rest",
  125. deps = [
  126. ":tpu_go_proto",
  127. "//google/cloud/location:location_go_proto",
  128. "//google/longrunning:longrunning_go_proto",
  129. "@com_google_cloud_go//longrunning:go_default_library",
  130. "@com_google_cloud_go//longrunning/autogen:go_default_library",
  131. ],
  132. )
  133. go_test(
  134. name = "tpu_go_gapic_test",
  135. srcs = [":tpu_go_gapic_srcjar_test"],
  136. embed = [":tpu_go_gapic"],
  137. importpath = "cloud.google.com/go/tpu/apiv1",
  138. )
  139. # Open Source Packages
  140. go_gapic_assembly_pkg(
  141. name = "gapi-cloud-tpu-v1-go",
  142. deps = [
  143. ":tpu_go_gapic",
  144. ":tpu_go_gapic_srcjar-metadata.srcjar",
  145. ":tpu_go_gapic_srcjar-test.srcjar",
  146. ":tpu_go_proto",
  147. ],
  148. )
  149. ##############################################################################
  150. # Python
  151. ##############################################################################
  152. load(
  153. "@com_google_googleapis_imports//:imports.bzl",
  154. "py_gapic_assembly_pkg",
  155. "py_gapic_library",
  156. "py_test",
  157. )
  158. py_gapic_library(
  159. name = "tpu_py_gapic",
  160. srcs = [":tpu_proto"],
  161. grpc_service_config = "tpu_grpc_service_config.json",
  162. rest_numeric_enums = False,
  163. service_yaml = "tpu_v1.yaml",
  164. transport = "grpc",
  165. deps = [
  166. ],
  167. )
  168. py_test(
  169. name = "tpu_py_gapic_test",
  170. srcs = [
  171. "tpu_py_gapic_pytest.py",
  172. "tpu_py_gapic_test.py",
  173. ],
  174. legacy_create_init = False,
  175. deps = [":tpu_py_gapic"],
  176. )
  177. # Open Source Packages
  178. py_gapic_assembly_pkg(
  179. name = "tpu-v1-py",
  180. deps = [
  181. ":tpu_py_gapic",
  182. ],
  183. )
  184. ##############################################################################
  185. # PHP
  186. ##############################################################################
  187. load(
  188. "@com_google_googleapis_imports//:imports.bzl",
  189. "php_gapic_assembly_pkg",
  190. "php_gapic_library",
  191. "php_grpc_library",
  192. "php_proto_library",
  193. )
  194. php_proto_library(
  195. name = "tpu_php_proto",
  196. deps = [":tpu_proto"],
  197. )
  198. php_grpc_library(
  199. name = "tpu_php_grpc",
  200. srcs = [":tpu_proto"],
  201. deps = [":tpu_php_proto"],
  202. )
  203. php_gapic_library(
  204. name = "tpu_php_gapic",
  205. srcs = [":tpu_proto_with_info"],
  206. grpc_service_config = "tpu_grpc_service_config.json",
  207. rest_numeric_enums = False,
  208. service_yaml = "tpu_v1.yaml",
  209. transport = "grpc+rest",
  210. deps = [
  211. ":tpu_php_grpc",
  212. ":tpu_php_proto",
  213. ],
  214. )
  215. # Open Source Packages
  216. php_gapic_assembly_pkg(
  217. name = "google-cloud-tpu-v1-php",
  218. deps = [
  219. ":tpu_php_gapic",
  220. ":tpu_php_grpc",
  221. ":tpu_php_proto",
  222. ],
  223. )
  224. ##############################################################################
  225. # Node.js
  226. ##############################################################################
  227. load(
  228. "@com_google_googleapis_imports//:imports.bzl",
  229. "nodejs_gapic_assembly_pkg",
  230. "nodejs_gapic_library",
  231. )
  232. nodejs_gapic_library(
  233. name = "tpu_nodejs_gapic",
  234. package_name = "@google-cloud/tpu",
  235. src = ":tpu_proto_with_info",
  236. extra_protoc_parameters = ["metadata"],
  237. grpc_service_config = "tpu_grpc_service_config.json",
  238. package = "google.cloud.tpu.v1",
  239. rest_numeric_enums = False,
  240. service_yaml = "tpu_v1.yaml",
  241. transport = "grpc+rest",
  242. deps = [],
  243. )
  244. nodejs_gapic_assembly_pkg(
  245. name = "tpu-v1-nodejs",
  246. deps = [
  247. ":tpu_nodejs_gapic",
  248. ":tpu_proto",
  249. ],
  250. )
  251. ##############################################################################
  252. # Ruby
  253. ##############################################################################
  254. load(
  255. "@com_google_googleapis_imports//:imports.bzl",
  256. "ruby_cloud_gapic_library",
  257. "ruby_gapic_assembly_pkg",
  258. "ruby_grpc_library",
  259. "ruby_proto_library",
  260. )
  261. ruby_proto_library(
  262. name = "tpu_ruby_proto",
  263. deps = [":tpu_proto"],
  264. )
  265. ruby_grpc_library(
  266. name = "tpu_ruby_grpc",
  267. srcs = [":tpu_proto"],
  268. deps = [":tpu_ruby_proto"],
  269. )
  270. ruby_cloud_gapic_library(
  271. name = "tpu_ruby_gapic",
  272. srcs = [":tpu_proto_with_info"],
  273. extra_protoc_parameters = [
  274. "ruby-cloud-api-id=tpu.googleapis.com",
  275. "ruby-cloud-api-shortname=tpu",
  276. "ruby-cloud-env-prefix=CLOUD_TPU",
  277. "ruby-cloud-gem-name=google-cloud-tpu-v1",
  278. "ruby-cloud-product-url=https://cloud.google.com/tpu/",
  279. ],
  280. grpc_service_config = "tpu_grpc_service_config.json",
  281. rest_numeric_enums = False,
  282. ruby_cloud_description = "Tensor Processing Units (TPUs) are Google's custom-developed application-specific integrated circuits (ASICs) used to accelerate machine learning workloads. Cloud TPUs allow you to access TPUs from Compute Engine, Google Kubernetes Engine and AI Platform.",
  283. ruby_cloud_title = "Cloud TPU V1",
  284. service_yaml = "tpu_v1.yaml",
  285. deps = [
  286. ":tpu_ruby_grpc",
  287. ":tpu_ruby_proto",
  288. ],
  289. )
  290. # Open Source Packages
  291. ruby_gapic_assembly_pkg(
  292. name = "google-cloud-tpu-v1-ruby",
  293. deps = [
  294. ":tpu_ruby_gapic",
  295. ":tpu_ruby_grpc",
  296. ":tpu_ruby_proto",
  297. ],
  298. )
  299. ##############################################################################
  300. # C#
  301. ##############################################################################
  302. load(
  303. "@com_google_googleapis_imports//:imports.bzl",
  304. "csharp_gapic_assembly_pkg",
  305. "csharp_gapic_library",
  306. "csharp_grpc_library",
  307. "csharp_proto_library",
  308. )
  309. csharp_proto_library(
  310. name = "tpu_csharp_proto",
  311. deps = [":tpu_proto"],
  312. )
  313. csharp_grpc_library(
  314. name = "tpu_csharp_grpc",
  315. srcs = [":tpu_proto"],
  316. deps = [":tpu_csharp_proto"],
  317. )
  318. csharp_gapic_library(
  319. name = "tpu_csharp_gapic",
  320. srcs = [":tpu_proto_with_info"],
  321. common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
  322. grpc_service_config = "tpu_grpc_service_config.json",
  323. rest_numeric_enums = False,
  324. service_yaml = "tpu_v1.yaml",
  325. deps = [
  326. ":tpu_csharp_grpc",
  327. ":tpu_csharp_proto",
  328. ],
  329. )
  330. # Open Source Packages
  331. csharp_gapic_assembly_pkg(
  332. name = "google-cloud-tpu-v1-csharp",
  333. deps = [
  334. ":tpu_csharp_gapic",
  335. ":tpu_csharp_grpc",
  336. ":tpu_csharp_proto",
  337. ],
  338. )
  339. ##############################################################################
  340. # C++
  341. ##############################################################################
  342. load(
  343. "@com_google_googleapis_imports//:imports.bzl",
  344. "cc_grpc_library",
  345. "cc_proto_library",
  346. )
  347. cc_proto_library(
  348. name = "tpu_cc_proto",
  349. deps = [":tpu_proto"],
  350. )
  351. cc_grpc_library(
  352. name = "tpu_cc_grpc",
  353. srcs = [":tpu_proto"],
  354. grpc_only = True,
  355. deps = [":tpu_cc_proto"],
  356. )