BUILD.bazel 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559
  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_SUBPACKAGE_DEPS = [
  18. "//google/cloud/aiplatform/v1/schema/predict/instance:instance_proto",
  19. "//google/cloud/aiplatform/v1/schema/predict/params:params_proto",
  20. "//google/cloud/aiplatform/v1/schema/predict/prediction:prediction_proto",
  21. "//google/cloud/aiplatform/v1/schema/trainingjob/definition:definition_proto",
  22. ]
  23. proto_library(
  24. name = "aiplatform_proto",
  25. srcs = [
  26. "accelerator_type.proto",
  27. "annotation.proto",
  28. "annotation_spec.proto",
  29. "artifact.proto",
  30. "batch_prediction_job.proto",
  31. "completion_stats.proto",
  32. "context.proto",
  33. "custom_job.proto",
  34. "data_item.proto",
  35. "data_labeling_job.proto",
  36. "dataset.proto",
  37. "dataset_service.proto",
  38. "deployed_index_ref.proto",
  39. "deployed_model_ref.proto",
  40. "encryption_spec.proto",
  41. "endpoint.proto",
  42. "endpoint_service.proto",
  43. "entity_type.proto",
  44. "env_var.proto",
  45. "event.proto",
  46. "execution.proto",
  47. "explanation.proto",
  48. "explanation_metadata.proto",
  49. "feature.proto",
  50. "feature_monitoring_stats.proto",
  51. "feature_selector.proto",
  52. "featurestore.proto",
  53. "featurestore_monitoring.proto",
  54. "featurestore_online_service.proto",
  55. "featurestore_service.proto",
  56. "hyperparameter_tuning_job.proto",
  57. "index.proto",
  58. "index_endpoint.proto",
  59. "index_endpoint_service.proto",
  60. "index_service.proto",
  61. "io.proto",
  62. "job_service.proto",
  63. "job_state.proto",
  64. "lineage_subgraph.proto",
  65. "machine_resources.proto",
  66. "manual_batch_tuning_parameters.proto",
  67. "metadata_schema.proto",
  68. "metadata_service.proto",
  69. "metadata_store.proto",
  70. "migratable_resource.proto",
  71. "migration_service.proto",
  72. "model.proto",
  73. "model_deployment_monitoring_job.proto",
  74. "model_evaluation.proto",
  75. "model_evaluation_slice.proto",
  76. "model_monitoring.proto",
  77. "model_service.proto",
  78. "operation.proto",
  79. "pipeline_failure_policy.proto",
  80. "pipeline_job.proto",
  81. "pipeline_service.proto",
  82. "pipeline_state.proto",
  83. "prediction_service.proto",
  84. "saved_query.proto",
  85. "specialist_pool.proto",
  86. "specialist_pool_service.proto",
  87. "study.proto",
  88. "tensorboard.proto",
  89. "tensorboard_data.proto",
  90. "tensorboard_experiment.proto",
  91. "tensorboard_run.proto",
  92. "tensorboard_service.proto",
  93. "tensorboard_time_series.proto",
  94. "training_pipeline.proto",
  95. "types.proto",
  96. "unmanaged_container_model.proto",
  97. "user_action_reference.proto",
  98. "value.proto",
  99. "vizier_service.proto",
  100. ],
  101. deps = [
  102. "//google/api:annotations_proto",
  103. "//google/api:client_proto",
  104. "//google/api:field_behavior_proto",
  105. "//google/api:httpbody_proto",
  106. "//google/api:resource_proto",
  107. "//google/longrunning:operations_proto",
  108. "//google/rpc:status_proto",
  109. "//google/type:money_proto",
  110. "@com_google_protobuf//:duration_proto",
  111. "@com_google_protobuf//:empty_proto",
  112. "@com_google_protobuf//:field_mask_proto",
  113. "@com_google_protobuf//:struct_proto",
  114. "@com_google_protobuf//:timestamp_proto",
  115. "@com_google_protobuf//:wrappers_proto",
  116. ] + _PROTO_SUBPACKAGE_DEPS,
  117. )
  118. proto_library_with_info(
  119. name = "aiplatform_proto_with_info",
  120. deps = [
  121. ":aiplatform_proto",
  122. "//google/cloud:common_resources_proto",
  123. "//google/cloud/location:location_proto",
  124. "//google/iam/v1:iam_policy_proto",
  125. ] + _PROTO_SUBPACKAGE_DEPS,
  126. )
  127. ##############################################################################
  128. # Java
  129. ##############################################################################
  130. load(
  131. "@com_google_googleapis_imports//:imports.bzl",
  132. "java_gapic_assembly_gradle_pkg",
  133. "java_gapic_library",
  134. "java_gapic_test",
  135. "java_grpc_library",
  136. "java_proto_library",
  137. )
  138. _JAVA_PROTO_SUBPACKAGE_DEPS = [
  139. "//google/cloud/aiplatform/v1/schema/predict/instance:instance_java_proto",
  140. "//google/cloud/aiplatform/v1/schema/predict/params:params_java_proto",
  141. "//google/cloud/aiplatform/v1/schema/predict/prediction:prediction_java_proto",
  142. "//google/cloud/aiplatform/v1/schema/trainingjob/definition:definition_java_proto",
  143. ]
  144. _JAVA_GRPC_SUBPACKAGE_DEPS = [
  145. "//google/cloud/aiplatform/v1/schema/predict/instance:instance_java_grpc",
  146. "//google/cloud/aiplatform/v1/schema/predict/params:params_java_grpc",
  147. "//google/cloud/aiplatform/v1/schema/predict/prediction:prediction_java_grpc",
  148. "//google/cloud/aiplatform/v1/schema/trainingjob/definition:definition_java_grpc",
  149. ]
  150. java_proto_library(
  151. name = "aiplatform_java_proto",
  152. deps = [":aiplatform_proto"],
  153. )
  154. java_grpc_library(
  155. name = "aiplatform_java_grpc",
  156. srcs = [":aiplatform_proto"],
  157. deps = [":aiplatform_java_proto"] + _JAVA_PROTO_SUBPACKAGE_DEPS,
  158. )
  159. java_gapic_library(
  160. name = "aiplatform_java_gapic",
  161. srcs = [":aiplatform_proto_with_info"],
  162. gapic_yaml = "aiplatform_gapic.yaml",
  163. grpc_service_config = "aiplatform_grpc_service_config.json",
  164. rest_numeric_enums = False,
  165. service_yaml = "aiplatform_v1.yaml",
  166. test_deps = [
  167. ":aiplatform_java_grpc",
  168. "//google/cloud/location:location_java_grpc",
  169. "//google/iam/v1:iam_java_grpc",
  170. ] + _JAVA_PROTO_SUBPACKAGE_DEPS,
  171. transport = "grpc",
  172. deps = [
  173. ":aiplatform_java_proto",
  174. "//google/api:api_java_proto",
  175. "//google/cloud/location:location_java_proto",
  176. "//google/iam/v1:iam_java_proto",
  177. ] + _JAVA_PROTO_SUBPACKAGE_DEPS,
  178. )
  179. java_gapic_test(
  180. name = "aiplatform_java_gapic_test_suite",
  181. test_classes = [
  182. "com.google.cloud.aiplatform.v1.DatasetServiceClientTest",
  183. "com.google.cloud.aiplatform.v1.EndpointServiceClientTest",
  184. "com.google.cloud.aiplatform.v1.FeaturestoreOnlineServingServiceClientTest",
  185. "com.google.cloud.aiplatform.v1.FeaturestoreServiceClientTest",
  186. "com.google.cloud.aiplatform.v1.IndexEndpointServiceClientTest",
  187. "com.google.cloud.aiplatform.v1.IndexServiceClientTest",
  188. "com.google.cloud.aiplatform.v1.JobServiceClientTest",
  189. "com.google.cloud.aiplatform.v1.MetadataServiceClientTest",
  190. "com.google.cloud.aiplatform.v1.MigrationServiceClientTest",
  191. "com.google.cloud.aiplatform.v1.ModelServiceClientTest",
  192. "com.google.cloud.aiplatform.v1.PipelineServiceClientTest",
  193. "com.google.cloud.aiplatform.v1.PredictionServiceClientTest",
  194. "com.google.cloud.aiplatform.v1.SpecialistPoolServiceClientTest",
  195. "com.google.cloud.aiplatform.v1.TensorboardServiceClientTest",
  196. "com.google.cloud.aiplatform.v1.VizierServiceClientTest",
  197. ],
  198. runtime_deps = [":aiplatform_java_gapic_test"],
  199. )
  200. # Open Source Packages
  201. java_gapic_assembly_gradle_pkg(
  202. name = "google-cloud-aiplatform-v1-java",
  203. transport = "grpc",
  204. deps = [
  205. ":aiplatform_java_gapic",
  206. ":aiplatform_java_grpc",
  207. ":aiplatform_java_proto",
  208. ":aiplatform_proto",
  209. ] + _JAVA_PROTO_SUBPACKAGE_DEPS + _PROTO_SUBPACKAGE_DEPS + _JAVA_GRPC_SUBPACKAGE_DEPS,
  210. )
  211. ##############################################################################
  212. # Go
  213. ##############################################################################
  214. load(
  215. "@com_google_googleapis_imports//:imports.bzl",
  216. "go_gapic_assembly_pkg",
  217. "go_gapic_library",
  218. "go_proto_library",
  219. "go_test",
  220. )
  221. go_proto_library(
  222. name = "aiplatform_go_proto",
  223. compilers = ["@io_bazel_rules_go//proto:go_grpc"],
  224. importpath = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1",
  225. protos = [":aiplatform_proto"],
  226. deps = [
  227. "//google/api:annotations_go_proto",
  228. "//google/api:httpbody_go_proto",
  229. "//google/longrunning:longrunning_go_proto",
  230. "//google/rpc:status_go_proto",
  231. "//google/type:money_go_proto",
  232. ],
  233. )
  234. go_gapic_library(
  235. name = "aiplatform_go_gapic",
  236. srcs = [":aiplatform_proto_with_info"],
  237. grpc_service_config = "aiplatform_grpc_service_config.json",
  238. importpath = "cloud.google.com/go/aiplatform/apiv1;aiplatform",
  239. metadata = True,
  240. rest_numeric_enums = False,
  241. service_yaml = "aiplatform_v1.yaml",
  242. deps = [
  243. ":aiplatform_go_proto",
  244. "//google/api:httpbody_go_proto",
  245. "//google/cloud/location:location_go_proto",
  246. "//google/iam/v1:iam_go_proto",
  247. "//google/longrunning:longrunning_go_proto",
  248. "@com_google_cloud_go//longrunning:go_default_library",
  249. "@com_google_cloud_go//longrunning/autogen:go_default_library",
  250. "@io_bazel_rules_go//proto/wkt:duration_go_proto",
  251. "@io_bazel_rules_go//proto/wkt:struct_go_proto",
  252. ],
  253. )
  254. go_test(
  255. name = "aiplatform_go_gapic_test",
  256. srcs = [":aiplatform_go_gapic_srcjar_test"],
  257. embed = [":aiplatform_go_gapic"],
  258. importpath = "cloud.google.com/go/aiplatform/apiv1",
  259. )
  260. # Open Source Packages
  261. go_gapic_assembly_pkg(
  262. name = "gapi-cloud-aiplatform-v1-go",
  263. deps = [
  264. ":aiplatform_go_gapic",
  265. ":aiplatform_go_gapic_srcjar-metadata.srcjar",
  266. ":aiplatform_go_gapic_srcjar-test.srcjar",
  267. ":aiplatform_go_proto",
  268. ],
  269. )
  270. ##############################################################################
  271. # Python
  272. ##############################################################################
  273. load(
  274. "@com_google_googleapis_imports//:imports.bzl",
  275. "py_gapic_assembly_pkg",
  276. "py_gapic_library",
  277. "py_test",
  278. )
  279. _PY_GAPIC_SUBPACKAGE_DEPS = [
  280. "//google/cloud/aiplatform/v1/schema/predict/instance:instance_py_gapic",
  281. "//google/cloud/aiplatform/v1/schema/predict/params:params_py_gapic",
  282. "//google/cloud/aiplatform/v1/schema/predict/prediction:prediction_py_gapic",
  283. "//google/cloud/aiplatform/v1/schema/trainingjob/definition:definition_py_gapic",
  284. ]
  285. py_gapic_library(
  286. name = "aiplatform_py_gapic",
  287. srcs = [":aiplatform_proto"],
  288. grpc_service_config = "aiplatform_grpc_service_config.json",
  289. rest_numeric_enums = False,
  290. service_yaml = "aiplatform_v1.yaml",
  291. transport = "grpc",
  292. deps = [
  293. "//google/iam/v1:iam_policy_py_proto",
  294. ],
  295. )
  296. py_test(
  297. name = "aiplatform_py_gapic_test",
  298. srcs = [
  299. "aiplatform_py_gapic_pytest.py",
  300. "aiplatform_py_gapic_test.py",
  301. ],
  302. legacy_create_init = False,
  303. deps = [":aiplatform_py_gapic"],
  304. )
  305. # Open Source Packages
  306. py_gapic_assembly_pkg(
  307. name = "aiplatform-v1-py",
  308. deps = [
  309. ":aiplatform_py_gapic",
  310. ] + _PROTO_SUBPACKAGE_DEPS + _PY_GAPIC_SUBPACKAGE_DEPS,
  311. )
  312. ##############################################################################
  313. # PHP
  314. ##############################################################################
  315. load(
  316. "@com_google_googleapis_imports//:imports.bzl",
  317. "php_gapic_assembly_pkg",
  318. "php_gapic_library",
  319. "php_grpc_library",
  320. "php_proto_library",
  321. )
  322. php_proto_library(
  323. name = "aiplatform_php_proto",
  324. deps = [":aiplatform_proto"],
  325. )
  326. php_grpc_library(
  327. name = "aiplatform_php_grpc",
  328. srcs = [":aiplatform_proto"],
  329. deps = [":aiplatform_php_proto"],
  330. )
  331. php_gapic_library(
  332. name = "aiplatform_php_gapic",
  333. srcs = [":aiplatform_proto_with_info"],
  334. grpc_service_config = "aiplatform_grpc_service_config.json",
  335. rest_numeric_enums = False,
  336. service_yaml = "aiplatform_v1.yaml",
  337. transport = "grpc+rest",
  338. deps = [
  339. ":aiplatform_php_grpc",
  340. ":aiplatform_php_proto",
  341. ],
  342. )
  343. # Open Source Packages
  344. php_gapic_assembly_pkg(
  345. name = "google-cloud-aiplatform-v1-php",
  346. deps = [
  347. ":aiplatform_php_gapic",
  348. ":aiplatform_php_grpc",
  349. ":aiplatform_php_proto",
  350. ],
  351. )
  352. ##############################################################################
  353. # Node.js
  354. ##############################################################################
  355. load(
  356. "@com_google_googleapis_imports//:imports.bzl",
  357. "nodejs_gapic_assembly_pkg",
  358. "nodejs_gapic_library",
  359. )
  360. nodejs_gapic_library(
  361. name = "aiplatform_nodejs_gapic",
  362. package_name = "@google-cloud/aiplatform",
  363. src = ":aiplatform_proto_with_info",
  364. extra_protoc_parameters = ["metadata"],
  365. grpc_service_config = "aiplatform_grpc_service_config.json",
  366. package = "google.cloud.aiplatform.v1",
  367. rest_numeric_enums = False,
  368. service_yaml = "aiplatform_v1.yaml",
  369. transport = "grpc+rest",
  370. deps = [],
  371. )
  372. nodejs_gapic_assembly_pkg(
  373. name = "aiplatform-v1-nodejs",
  374. deps = [
  375. ":aiplatform_nodejs_gapic",
  376. ":aiplatform_proto",
  377. ] + _PROTO_SUBPACKAGE_DEPS,
  378. )
  379. ##############################################################################
  380. # Ruby
  381. ##############################################################################
  382. load(
  383. "@com_google_googleapis_imports//:imports.bzl",
  384. "ruby_cloud_gapic_library",
  385. "ruby_gapic_assembly_pkg",
  386. "ruby_grpc_library",
  387. "ruby_proto_library",
  388. )
  389. ruby_proto_library(
  390. name = "aiplatform_ruby_proto",
  391. deps = [":aiplatform_proto"],
  392. )
  393. ruby_grpc_library(
  394. name = "aiplatform_ruby_grpc",
  395. srcs = [":aiplatform_proto"],
  396. deps = [":aiplatform_ruby_proto"],
  397. )
  398. ruby_cloud_gapic_library(
  399. name = "aiplatform_ruby_gapic",
  400. srcs = [":aiplatform_proto_with_info"],
  401. extra_protoc_parameters = [
  402. "ruby-cloud-api-id=aiplatform.googleapis.com",
  403. "ruby-cloud-api-shortname=aiplatform",
  404. "ruby-cloud-gem-name=google-cloud-ai_platform-v1",
  405. "ruby-cloud-gem-namespace=Google::Cloud::AIPlatform::V1",
  406. "ruby-cloud-product-url=https://cloud.google.com/vertex-ai/docs/",
  407. "ruby-cloud-service-override=AiPlatform=AIPlatform",
  408. ],
  409. grpc_service_config = "aiplatform_grpc_service_config.json",
  410. rest_numeric_enums = False,
  411. ruby_cloud_description = "Vertex AI enables data scientists, developers, and AI newcomers to create custom machine learning models specific to their business needs by leveraging Google's state-of-the-art transfer learning and innovative AI research.",
  412. ruby_cloud_title = "Vertex AI V1",
  413. service_yaml = "aiplatform_v1.yaml",
  414. deps = [
  415. ":aiplatform_ruby_grpc",
  416. ":aiplatform_ruby_proto",
  417. ],
  418. )
  419. # Open Source Packages
  420. ruby_gapic_assembly_pkg(
  421. name = "google-cloud-aiplatform-v1-ruby",
  422. deps = [
  423. ":aiplatform_ruby_gapic",
  424. ":aiplatform_ruby_grpc",
  425. ":aiplatform_ruby_proto",
  426. ],
  427. )
  428. ##############################################################################
  429. # C#
  430. ##############################################################################
  431. load(
  432. "@com_google_googleapis_imports//:imports.bzl",
  433. "csharp_gapic_assembly_pkg",
  434. "csharp_gapic_library",
  435. "csharp_grpc_library",
  436. "csharp_proto_library",
  437. )
  438. csharp_proto_library(
  439. name = "aiplatform_csharp_proto",
  440. deps = [":aiplatform_proto"],
  441. )
  442. csharp_grpc_library(
  443. name = "aiplatform_csharp_grpc",
  444. srcs = [":aiplatform_proto"],
  445. deps = [":aiplatform_csharp_proto"],
  446. )
  447. # Generate a package for googleapis-gen even without the GAPIC client.
  448. # This will allow OwlBot to trigger changes to be pushed to google-cloud-dotnet,
  449. # which will perform full generation after fixing up the protos first.
  450. csharp_gapic_assembly_pkg(
  451. name = "google-cloud-aiplatform-v1-csharp",
  452. package_name = "Google.Cloud.AIPlatform.V1",
  453. generate_nongapic_package = True,
  454. deps = [
  455. ":aiplatform_csharp_grpc",
  456. ":aiplatform_csharp_proto",
  457. ],
  458. )
  459. # csharp_gapic_library(
  460. # name = "aiplatform_csharp_gapic",
  461. # srcs = [":aiplatform_proto_with_info"],
  462. # common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
  463. # grpc_service_config = "aiplatform_grpc_service_config.json",
  464. # service_yaml = "aiplatform_v1.yaml",
  465. # deps = [
  466. # ":aiplatform_csharp_grpc",
  467. # ":aiplatform_csharp_proto",
  468. # ],
  469. # )
  470. ################################
  471. # Keep C# target commented out through the regeneration, as C# gen has an issue
  472. # with the aiplatform v1 protos
  473. #
  474. # csharp_gapic_library(
  475. # name = "aiplatform_csharp_gapic",
  476. # srcs = [":aiplatform_proto_with_info"],
  477. # common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
  478. # grpc_service_config = "aiplatform_grpc_service_config.json",
  479. # deps = [
  480. # ":aiplatform_csharp_grpc",
  481. # ":aiplatform_csharp_proto",
  482. # ],
  483. # )
  484. # Open Source Packages
  485. # csharp_gapic_assembly_pkg(
  486. # name = "google-cloud-aiplatform-v1-csharp",
  487. # deps = [
  488. # ":aiplatform_csharp_gapic",
  489. # ":aiplatform_csharp_grpc",
  490. # ":aiplatform_csharp_proto",
  491. # ],
  492. # )
  493. ################################
  494. ##############################################################################
  495. # C++
  496. ##############################################################################
  497. load(
  498. "@com_google_googleapis_imports//:imports.bzl",
  499. "cc_grpc_library",
  500. "cc_proto_library",
  501. )
  502. cc_proto_library(
  503. name = "aiplatform_cc_proto",
  504. deps = [":aiplatform_proto"],
  505. )
  506. cc_grpc_library(
  507. name = "aiplatform_cc_grpc",
  508. srcs = [":aiplatform_proto"],
  509. grpc_only = True,
  510. deps = [":aiplatform_cc_proto"],
  511. )