BUILD.bazel 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  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. ##############################################################################
  11. # Common
  12. ##############################################################################
  13. load("@rules_proto//proto:defs.bzl", "proto_library")
  14. load(
  15. "@com_google_googleapis_imports//:imports.bzl",
  16. "cc_grpc_library",
  17. "cc_proto_library",
  18. "go_gapic_assembly_pkg",
  19. "go_gapic_library",
  20. "go_proto_library",
  21. "go_test",
  22. "java_gapic_assembly_gradle_pkg",
  23. "java_gapic_library",
  24. "java_gapic_test",
  25. "java_grpc_library",
  26. "java_proto_library",
  27. "nodejs_gapic_assembly_pkg",
  28. "nodejs_gapic_library",
  29. "php_gapic_assembly_pkg",
  30. "php_gapic_library",
  31. "php_grpc_library",
  32. "php_proto_library",
  33. "proto_library_with_info",
  34. "py_gapic_assembly_pkg",
  35. "py_gapic_library",
  36. "ruby_cloud_gapic_library",
  37. "ruby_gapic_assembly_pkg",
  38. "ruby_grpc_library",
  39. "ruby_proto_library",
  40. )
  41. # This is an API workspace, having public visibility by default makes perfect sense.
  42. package(default_visibility = ["//visibility:public"])
  43. proto_library(
  44. name = "storage_proto",
  45. srcs = [
  46. "storage.proto",
  47. ],
  48. deps = [
  49. "//google/api:client_proto",
  50. "//google/api:field_behavior_proto",
  51. "//google/api:resource_proto",
  52. "//google/api:routing_proto",
  53. "//google/iam/v1:iam_policy_proto",
  54. "//google/iam/v1:policy_proto",
  55. "//google/type:date_proto",
  56. "@com_google_protobuf//:empty_proto",
  57. "@com_google_protobuf//:field_mask_proto",
  58. "@com_google_protobuf//:timestamp_proto",
  59. ],
  60. )
  61. proto_library_with_info(
  62. name = "storage_proto_with_info",
  63. deps = [
  64. ":storage_proto",
  65. "//google/cloud:common_resources_proto",
  66. ],
  67. )
  68. java_proto_library(
  69. name = "storage_java_proto",
  70. deps = [":storage_proto"],
  71. )
  72. java_grpc_library(
  73. name = "storage_java_grpc",
  74. srcs = [":storage_proto"],
  75. deps = [":storage_java_proto"],
  76. )
  77. java_gapic_library(
  78. name = "storage_java_gapic",
  79. srcs = [":storage_proto_with_info"],
  80. grpc_service_config = "storage_grpc_service_config.json",
  81. rest_numeric_enums = False,
  82. test_deps = [
  83. ":storage_java_grpc",
  84. "//google/iam/v1:iam_java_grpc",
  85. ],
  86. transport = "grpc",
  87. deps = [
  88. ":storage_java_proto",
  89. "//google/iam/v1:iam_java_proto",
  90. ],
  91. )
  92. java_gapic_test(
  93. name = "storage_java_gapic_test_suite",
  94. test_classes = [
  95. "com.google.storage.v2.StorageClientTest",
  96. ],
  97. runtime_deps = [":storage_java_gapic_test"],
  98. )
  99. # Open Source Packages
  100. java_gapic_assembly_gradle_pkg(
  101. name = "google-cloud-storage-v2-java",
  102. include_samples = True,
  103. transport = "grpc",
  104. deps = [
  105. ":storage_java_gapic",
  106. ":storage_java_grpc",
  107. ":storage_java_proto",
  108. ":storage_proto",
  109. ],
  110. )
  111. go_proto_library(
  112. name = "storage_go_proto",
  113. compilers = ["@io_bazel_rules_go//proto:go_grpc"],
  114. importpath = "google.golang.org/genproto/googleapis/storage/v2",
  115. protos = [":storage_proto"],
  116. deps = [
  117. "//google/api:annotations_go_proto",
  118. "//google/iam/v1:iam_go_proto",
  119. "//google/type:date_go_proto",
  120. ],
  121. )
  122. go_gapic_library(
  123. name = "storage_go_gapic",
  124. srcs = [":storage_proto_with_info"],
  125. grpc_service_config = "storage_grpc_service_config.json",
  126. importpath = "cloud.google.com/go/storage/apiv2;storage",
  127. metadata = True,
  128. rest_numeric_enums = False,
  129. transport = "grpc",
  130. service_yaml = "storage_v2.yaml",
  131. deps = [
  132. ":storage_go_proto",
  133. "//google/iam/v1:iam_go_proto",
  134. ],
  135. )
  136. go_test(
  137. name = "storage_go_gapic_test",
  138. srcs = [":storage_go_gapic_srcjar_test"],
  139. embed = [":storage_go_gapic"],
  140. importpath = "cloud.google.com/go/storage/apiv2",
  141. )
  142. # Open Source Packages
  143. go_gapic_assembly_pkg(
  144. name = "gapi-cloud-storage-v2-go",
  145. deps = [
  146. ":storage_go_gapic",
  147. ":storage_go_gapic_srcjar-metadata.srcjar",
  148. ":storage_go_gapic_srcjar-test.srcjar",
  149. ":storage_go_proto",
  150. ],
  151. )
  152. py_gapic_library(
  153. name = "storage_py_gapic",
  154. srcs = [":storage_proto"],
  155. grpc_service_config = "storage_grpc_service_config.json",
  156. rest_numeric_enums = False,
  157. transport = "grpc",
  158. deps = [
  159. "//google/iam/v1:iam_policy_py_proto",
  160. "//google/iam/v1:policy_py_proto",
  161. ],
  162. )
  163. # Uncomment once https://github.com/googleapis/gapic-generator-python/issues/1377 is fixed
  164. #py_test(
  165. # name = "storage_py_gapic_test",
  166. # srcs = [
  167. # "storage_py_gapic_pytest.py",
  168. # "storage_py_gapic_test.py",
  169. # ],
  170. # legacy_create_init = False,
  171. # deps = [":storage_py_gapic"],
  172. #)
  173. # Open Source Packages
  174. py_gapic_assembly_pkg(
  175. name = "storage-v2-py",
  176. deps = [
  177. ":storage_py_gapic",
  178. ],
  179. )
  180. php_proto_library(
  181. name = "storage_php_proto",
  182. deps = [":storage_proto"],
  183. )
  184. php_grpc_library(
  185. name = "storage_php_grpc",
  186. srcs = [":storage_proto"],
  187. deps = [":storage_php_proto"],
  188. )
  189. # PHP always supports gRPC and REST, but there is no PHP GAPIC for this API.
  190. php_gapic_library(
  191. name = "storage_php_gapic",
  192. srcs = [":storage_proto_with_info"],
  193. grpc_service_config = "storage_grpc_service_config.json",
  194. rest_numeric_enums = False,
  195. service_yaml = "storage_v2.yaml",
  196. transport = "grpc+rest",
  197. deps = [
  198. ":storage_php_grpc",
  199. ":storage_php_proto",
  200. ],
  201. )
  202. # Open Source Packages
  203. php_gapic_assembly_pkg(
  204. name = "google-cloud-storage-v2-php",
  205. deps = [
  206. ":storage_php_gapic",
  207. ":storage_php_grpc",
  208. ":storage_php_proto",
  209. ],
  210. )
  211. nodejs_gapic_library(
  212. name = "storage_nodejs_gapic",
  213. package_name = "@google-cloud/storage",
  214. src = ":storage_proto_with_info",
  215. extra_protoc_parameters = ["metadata"],
  216. grpc_service_config = "storage_grpc_service_config.json",
  217. package = "google.storage.v2",
  218. rest_numeric_enums = False,
  219. service_yaml = "storage_v2.yaml",
  220. transport = "grpc",
  221. deps = [],
  222. )
  223. nodejs_gapic_assembly_pkg(
  224. name = "storage-v2-nodejs",
  225. deps = [
  226. ":storage_nodejs_gapic",
  227. ":storage_proto",
  228. ],
  229. )
  230. ruby_proto_library(
  231. name = "storage_ruby_proto",
  232. deps = [":storage_proto"],
  233. )
  234. ruby_grpc_library(
  235. name = "storage_ruby_grpc",
  236. srcs = [":storage_proto"],
  237. deps = [":storage_ruby_proto"],
  238. )
  239. ruby_cloud_gapic_library(
  240. name = "storage_ruby_gapic",
  241. srcs = [":storage_proto_with_info"],
  242. extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-storage-v2"],
  243. grpc_service_config = "storage_grpc_service_config.json",
  244. rest_numeric_enums = False,
  245. deps = [
  246. ":storage_ruby_grpc",
  247. ":storage_ruby_proto",
  248. ],
  249. )
  250. # Open Source Packages
  251. ruby_gapic_assembly_pkg(
  252. name = "google-cloud-storage-v2-ruby",
  253. deps = [
  254. ":storage_ruby_gapic",
  255. ":storage_ruby_grpc",
  256. ":storage_ruby_proto",
  257. ],
  258. )
  259. ##############################################################################
  260. # C#
  261. ##############################################################################
  262. #
  263. # C# generation is disabled because generation fails as gapic-generator-csharp
  264. # doesn't support client-streaming RPCs.
  265. #
  266. # load(
  267. # "@com_google_googleapis_imports//:imports.bzl",
  268. # "csharp_gapic_assembly_pkg",
  269. # "csharp_gapic_library",
  270. # "csharp_grpc_library",
  271. # "csharp_proto_library",
  272. # )
  273. #
  274. # csharp_proto_library(
  275. # name = "storage_csharp_proto",
  276. # deps = [":storage_proto"],
  277. # )
  278. #
  279. # csharp_grpc_library(
  280. # name = "storage_csharp_grpc",
  281. # srcs = [":storage_proto"],
  282. # deps = [":storage_csharp_proto"],
  283. # )
  284. #
  285. # csharp_gapic_library(
  286. # name = "storage_csharp_gapic",
  287. # srcs = [":storage_proto_with_info"],
  288. # common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
  289. # grpc_service_config = "storage_grpc_service_config.json",
  290. # deps = [
  291. # ":storage_csharp_grpc",
  292. # ":storage_csharp_proto",
  293. # ],
  294. # )
  295. #
  296. # # Open Source Packages
  297. # csharp_gapic_assembly_pkg(
  298. # name = "google-cloud-storage-v2-csharp",
  299. # deps = [
  300. # ":storage_csharp_gapic",
  301. # ":storage_csharp_grpc",
  302. # ":storage_csharp_proto",
  303. # ],
  304. # )
  305. cc_proto_library(
  306. name = "storage_cc_proto",
  307. deps = [":storage_proto"],
  308. )
  309. cc_grpc_library(
  310. name = "storage_cc_grpc",
  311. srcs = [":storage_proto"],
  312. generate_mocks = True,
  313. grpc_only = True,
  314. deps = [":storage_cc_proto"],
  315. )