BUILD.bazel 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  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 = "monitoring_proto",
  19. srcs = [
  20. "alert.proto",
  21. "alert_service.proto",
  22. "common.proto",
  23. "dropped_labels.proto",
  24. "group.proto",
  25. "group_service.proto",
  26. "metric.proto",
  27. "metric_service.proto",
  28. "mutation_record.proto",
  29. "notification.proto",
  30. "notification_service.proto",
  31. "query_service.proto",
  32. "service.proto",
  33. "service_service.proto",
  34. "span_context.proto",
  35. "uptime.proto",
  36. "uptime_service.proto",
  37. ],
  38. deps = [
  39. "//google/api:annotations_proto",
  40. "//google/api:client_proto",
  41. "//google/api:distribution_proto",
  42. "//google/api:field_behavior_proto",
  43. "//google/api:label_proto",
  44. "//google/api:launch_stage_proto",
  45. "//google/api:metric_proto",
  46. "//google/api:monitored_resource_proto",
  47. "//google/api:resource_proto",
  48. "//google/rpc:status_proto",
  49. "//google/type:calendar_period_proto",
  50. "@com_google_protobuf//:duration_proto",
  51. "@com_google_protobuf//:empty_proto",
  52. "@com_google_protobuf//:field_mask_proto",
  53. "@com_google_protobuf//:struct_proto",
  54. "@com_google_protobuf//:timestamp_proto",
  55. "@com_google_protobuf//:wrappers_proto",
  56. ],
  57. )
  58. proto_library_with_info(
  59. name = "monitoring_proto_with_info",
  60. deps = [
  61. ":monitoring_proto",
  62. "//google/cloud:common_resources_proto",
  63. ],
  64. )
  65. ##############################################################################
  66. # Java
  67. ##############################################################################
  68. load(
  69. "@com_google_googleapis_imports//:imports.bzl",
  70. "java_gapic_assembly_gradle_pkg",
  71. "java_gapic_library",
  72. "java_gapic_test",
  73. "java_grpc_library",
  74. "java_proto_library",
  75. )
  76. java_proto_library(
  77. name = "monitoring_java_proto",
  78. deps = [":monitoring_proto"],
  79. )
  80. java_grpc_library(
  81. name = "monitoring_java_grpc",
  82. srcs = [":monitoring_proto"],
  83. deps = [":monitoring_java_proto"],
  84. )
  85. java_gapic_library(
  86. name = "monitoring_java_gapic",
  87. srcs = [":monitoring_proto_with_info"],
  88. gapic_yaml = "monitoring_gapic.yaml",
  89. grpc_service_config = "monitoring_grpc_service_config.json",
  90. test_deps = [
  91. ":monitoring_java_grpc",
  92. ],
  93. deps = [
  94. ":monitoring_java_proto",
  95. "//google/api:api_java_proto",
  96. ],
  97. )
  98. java_gapic_test(
  99. name = "monitoring_java_gapic_test_suite",
  100. test_classes = [
  101. "com.google.cloud.monitoring.v3.AlertPolicyServiceClientTest",
  102. "com.google.cloud.monitoring.v3.GroupServiceClientTest",
  103. "com.google.cloud.monitoring.v3.MetricServiceClientTest",
  104. "com.google.cloud.monitoring.v3.NotificationChannelServiceClientTest",
  105. "com.google.cloud.monitoring.v3.QueryServiceClientTest",
  106. "com.google.cloud.monitoring.v3.ServiceMonitoringServiceClientTest",
  107. "com.google.cloud.monitoring.v3.UptimeCheckServiceClientTest",
  108. ],
  109. runtime_deps = [":monitoring_java_gapic_test"],
  110. )
  111. # Open Source Packages
  112. java_gapic_assembly_gradle_pkg(
  113. name = "google-cloud-monitoring-v3-java",
  114. deps = [
  115. ":monitoring_java_gapic",
  116. ":monitoring_java_grpc",
  117. ":monitoring_java_proto",
  118. ":monitoring_proto",
  119. ],
  120. )
  121. ##############################################################################
  122. # Go
  123. ##############################################################################
  124. load(
  125. "@com_google_googleapis_imports//:imports.bzl",
  126. "go_gapic_assembly_pkg",
  127. "go_gapic_library",
  128. "go_proto_library",
  129. "go_test",
  130. )
  131. go_proto_library(
  132. name = "monitoring_go_proto",
  133. compilers = ["@io_bazel_rules_go//proto:go_grpc"],
  134. importpath = "google.golang.org/genproto/googleapis/monitoring/v3",
  135. protos = [":monitoring_proto"],
  136. deps = [
  137. "//google/api:annotations_go_proto",
  138. "//google/api:api_go_proto",
  139. "//google/api:distribution_go_proto",
  140. "//google/api:label_go_proto",
  141. "//google/api:metric_go_proto",
  142. "//google/api:monitoredres_go_proto",
  143. "//google/rpc:status_go_proto",
  144. "//google/type:calendar_period_go_proto",
  145. ],
  146. )
  147. go_gapic_library(
  148. name = "monitoring_go_gapic",
  149. srcs = [":monitoring_proto_with_info"],
  150. grpc_service_config = "monitoring_grpc_service_config.json",
  151. importpath = "cloud.google.com/go/monitoring/apiv3;monitoring",
  152. metadata = True,
  153. service_yaml = "monitoring.yaml",
  154. deps = [
  155. ":monitoring_go_proto",
  156. "//google/api:metric_go_proto",
  157. "//google/api:monitoredres_go_proto",
  158. "@io_bazel_rules_go//proto/wkt:duration_go_proto",
  159. ],
  160. )
  161. go_test(
  162. name = "monitoring_go_gapic_test",
  163. srcs = [":monitoring_go_gapic_srcjar_test"],
  164. embed = [":monitoring_go_gapic"],
  165. importpath = "cloud.google.com/go/monitoring/apiv3",
  166. )
  167. # Open Source Packages
  168. go_gapic_assembly_pkg(
  169. name = "gapi-cloud-monitoring-v3-go",
  170. deps = [
  171. ":monitoring_go_gapic",
  172. ":monitoring_go_gapic_srcjar-metadata.srcjar",
  173. ":monitoring_go_gapic_srcjar-test.srcjar",
  174. ":monitoring_go_proto",
  175. ],
  176. )
  177. ##############################################################################
  178. # Python
  179. ##############################################################################
  180. load(
  181. "@com_google_googleapis_imports//:imports.bzl",
  182. "py_gapic_assembly_pkg",
  183. "py_gapic_library",
  184. )
  185. py_gapic_library(
  186. name = "monitoring_py_gapic",
  187. srcs = [":monitoring_proto"],
  188. grpc_service_config = "monitoring_grpc_service_config.json",
  189. opt_args = ["python-gapic-namespace=google.cloud"],
  190. )
  191. # Open Source Packages
  192. py_gapic_assembly_pkg(
  193. name = "monitoring-v3-py",
  194. deps = [
  195. ":monitoring_py_gapic",
  196. ],
  197. )
  198. ##############################################################################
  199. # PHP
  200. ##############################################################################
  201. load(
  202. "@com_google_googleapis_imports//:imports.bzl",
  203. "php_gapic_assembly_pkg",
  204. "php_gapic_library",
  205. "php_grpc_library",
  206. "php_proto_library",
  207. )
  208. php_proto_library(
  209. name = "monitoring_php_proto",
  210. deps = [":monitoring_proto"],
  211. )
  212. php_grpc_library(
  213. name = "monitoring_php_grpc",
  214. srcs = [":monitoring_proto"],
  215. deps = [":monitoring_php_proto"],
  216. )
  217. php_gapic_library(
  218. name = "monitoring_php_gapic",
  219. srcs = [":monitoring_proto_with_info"],
  220. grpc_service_config = "monitoring_grpc_service_config.json",
  221. deps = [
  222. ":monitoring_php_grpc",
  223. ":monitoring_php_proto",
  224. ],
  225. )
  226. # Open Source Packages
  227. php_gapic_assembly_pkg(
  228. name = "google-cloud-monitoring-v3-php",
  229. deps = [
  230. ":monitoring_php_gapic",
  231. ":monitoring_php_grpc",
  232. ":monitoring_php_proto",
  233. ],
  234. )
  235. ##############################################################################
  236. # Node.js
  237. ##############################################################################
  238. load(
  239. "@com_google_googleapis_imports//:imports.bzl",
  240. "nodejs_gapic_assembly_pkg",
  241. "nodejs_gapic_library",
  242. )
  243. nodejs_gapic_library(
  244. name = "monitoring_nodejs_gapic",
  245. package_name = "@google-cloud/monitoring",
  246. src = ":monitoring_proto_with_info",
  247. extra_protoc_parameters = ["metadata"],
  248. grpc_service_config = "monitoring_grpc_service_config.json",
  249. main_service = "monitoring",
  250. package = "google.monitoring.v3",
  251. service_yaml = "monitoring.yaml",
  252. deps = [],
  253. )
  254. nodejs_gapic_assembly_pkg(
  255. name = "monitoring-v3-nodejs",
  256. deps = [
  257. ":monitoring_nodejs_gapic",
  258. ":monitoring_proto",
  259. ],
  260. )
  261. ##############################################################################
  262. # Ruby
  263. ##############################################################################
  264. load(
  265. "@com_google_googleapis_imports//:imports.bzl",
  266. "ruby_cloud_gapic_library",
  267. "ruby_gapic_assembly_pkg",
  268. "ruby_grpc_library",
  269. "ruby_proto_library",
  270. )
  271. ruby_proto_library(
  272. name = "monitoring_ruby_proto",
  273. deps = [":monitoring_proto"],
  274. )
  275. ruby_grpc_library(
  276. name = "monitoring_ruby_grpc",
  277. srcs = [":monitoring_proto"],
  278. deps = [":monitoring_ruby_proto"],
  279. )
  280. ruby_cloud_gapic_library(
  281. name = "monitoring_ruby_gapic",
  282. srcs = [":monitoring_proto_with_info"],
  283. extra_protoc_parameters = [
  284. "ruby-cloud-api-id=monitoring.googleapis.com",
  285. "ruby-cloud-api-shortname=monitoring",
  286. "ruby-cloud-env-prefix=MONITORING",
  287. "ruby-cloud-gem-name=google-cloud-monitoring-v3",
  288. "ruby-cloud-product-url=https://cloud.google.com/monitoring",
  289. ],
  290. grpc_service_config = "monitoring_grpc_service_config.json",
  291. ruby_cloud_description = "Cloud Monitoring collects metrics, events, and metadata from Google Cloud, Amazon Web Services (AWS), hosted uptime probes, and application instrumentation.",
  292. ruby_cloud_title = "Cloud Monitoring V3",
  293. deps = [
  294. ":monitoring_ruby_grpc",
  295. ":monitoring_ruby_proto",
  296. ],
  297. )
  298. # Open Source Packages
  299. ruby_gapic_assembly_pkg(
  300. name = "google-cloud-monitoring-v3-ruby",
  301. deps = [
  302. ":monitoring_ruby_gapic",
  303. ":monitoring_ruby_grpc",
  304. ":monitoring_ruby_proto",
  305. ],
  306. )
  307. ##############################################################################
  308. # C#
  309. ##############################################################################
  310. load(
  311. "@com_google_googleapis_imports//:imports.bzl",
  312. "csharp_gapic_assembly_pkg",
  313. "csharp_gapic_library",
  314. "csharp_grpc_library",
  315. "csharp_proto_library",
  316. )
  317. csharp_proto_library(
  318. name = "monitoring_csharp_proto",
  319. deps = [":monitoring_proto"],
  320. )
  321. csharp_grpc_library(
  322. name = "monitoring_csharp_grpc",
  323. srcs = [":monitoring_proto"],
  324. deps = [":monitoring_csharp_proto"],
  325. )
  326. csharp_gapic_library(
  327. name = "monitoring_csharp_gapic",
  328. srcs = [":monitoring_proto_with_info"],
  329. common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
  330. grpc_service_config = "monitoring_grpc_service_config.json",
  331. deps = [
  332. ":monitoring_csharp_grpc",
  333. ":monitoring_csharp_proto",
  334. ],
  335. )
  336. # Open Source Packages
  337. csharp_gapic_assembly_pkg(
  338. name = "google-cloud-monitoring-v3-csharp",
  339. deps = [
  340. ":monitoring_csharp_gapic",
  341. ":monitoring_csharp_grpc",
  342. ":monitoring_csharp_proto",
  343. ],
  344. )
  345. ##############################################################################
  346. # C++
  347. ##############################################################################
  348. load(
  349. "@com_google_googleapis_imports//:imports.bzl",
  350. "cc_grpc_library",
  351. "cc_proto_library",
  352. )
  353. cc_proto_library(
  354. name = "monitoring_cc_proto",
  355. deps = [":monitoring_proto"],
  356. )
  357. cc_grpc_library(
  358. name = "monitoring_cc_grpc",
  359. srcs = [":monitoring_proto"],
  360. generate_mocks = True,
  361. grpc_only = True,
  362. deps = [":monitoring_cc_proto"],
  363. )