google-cloud-ai_platform-v1 0.39.0 → 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/ai_platform/v1/bindings_override.rb +399 -0
  3. data/lib/google/cloud/ai_platform/v1/dataset_service/client.rb +138 -18
  4. data/lib/google/cloud/ai_platform/v1/dataset_service/operations.rb +13 -5
  5. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb +2280 -0
  6. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/operations.rb +3971 -0
  7. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/service_stub.rb +1196 -0
  8. data/lib/google/cloud/ai_platform/v1/dataset_service/rest.rb +54 -0
  9. data/lib/google/cloud/ai_platform/v1/dataset_service.rb +6 -0
  10. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/client.rb +13 -5
  11. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/operations.rb +13 -5
  12. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/client.rb +851 -0
  13. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/operations.rb +3971 -0
  14. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/service_stub.rb +365 -0
  15. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest.rb +54 -0
  16. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service.rb +6 -0
  17. data/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +19 -8
  18. data/lib/google/cloud/ai_platform/v1/endpoint_service/operations.rb +13 -5
  19. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/client.rb +1215 -0
  20. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/operations.rb +3971 -0
  21. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/service_stub.rb +546 -0
  22. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest.rb +54 -0
  23. data/lib/google/cloud/ai_platform/v1/endpoint_service.rb +6 -0
  24. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/client.rb +29 -13
  25. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/operations.rb +13 -5
  26. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/client.rb +1732 -0
  27. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/operations.rb +3971 -0
  28. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/service_stub.rb +841 -0
  29. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest.rb +55 -0
  30. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service.rb +6 -0
  31. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb +7 -2
  32. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/client.rb +534 -0
  33. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/service_stub.rb +189 -0
  34. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest.rb +53 -0
  35. data/lib/google/cloud/ai_platform/v1/feature_online_store_service.rb +6 -0
  36. data/lib/google/cloud/ai_platform/v1/feature_registry_service/client.rb +24 -11
  37. data/lib/google/cloud/ai_platform/v1/feature_registry_service/operations.rb +13 -5
  38. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/client.rb +1450 -0
  39. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/operations.rb +3971 -0
  40. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/service_stub.rb +663 -0
  41. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest.rb +55 -0
  42. data/lib/google/cloud/ai_platform/v1/feature_registry_service.rb +6 -0
  43. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/client.rb +9 -3
  44. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/client.rb +645 -0
  45. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/service_stub.rb +244 -0
  46. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest.rb +53 -0
  47. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service.rb +6 -0
  48. data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +45 -21
  49. data/lib/google/cloud/ai_platform/v1/featurestore_service/operations.rb +13 -5
  50. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb +2765 -0
  51. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/operations.rb +3971 -0
  52. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/service_stub.rb +1319 -0
  53. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest.rb +54 -0
  54. data/lib/google/cloud/ai_platform/v1/featurestore_service.rb +6 -0
  55. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/client.rb +11 -4
  56. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/client.rb +720 -0
  57. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/service_stub.rb +307 -0
  58. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest.rb +53 -0
  59. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service.rb +6 -0
  60. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +19 -8
  61. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/operations.rb +13 -5
  62. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/client.rb +1151 -0
  63. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/operations.rb +3971 -0
  64. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/service_stub.rb +546 -0
  65. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest.rb +54 -0
  66. data/lib/google/cloud/ai_platform/v1/index_endpoint_service.rb +6 -0
  67. data/lib/google/cloud/ai_platform/v1/index_service/client.rb +17 -7
  68. data/lib/google/cloud/ai_platform/v1/index_service/operations.rb +13 -5
  69. data/lib/google/cloud/ai_platform/v1/index_service/rest/client.rb +1034 -0
  70. data/lib/google/cloud/ai_platform/v1/index_service/rest/operations.rb +3971 -0
  71. data/lib/google/cloud/ai_platform/v1/index_service/rest/service_stub.rb +486 -0
  72. data/lib/google/cloud/ai_platform/v1/index_service/rest.rb +54 -0
  73. data/lib/google/cloud/ai_platform/v1/index_service.rb +6 -0
  74. data/lib/google/cloud/ai_platform/v1/job_service/client.rb +73 -35
  75. data/lib/google/cloud/ai_platform/v1/job_service/operations.rb +13 -5
  76. data/lib/google/cloud/ai_platform/v1/job_service/rest/client.rb +3841 -0
  77. data/lib/google/cloud/ai_platform/v1/job_service/rest/operations.rb +3971 -0
  78. data/lib/google/cloud/ai_platform/v1/job_service/rest/service_stub.rb +2149 -0
  79. data/lib/google/cloud/ai_platform/v1/job_service/rest.rb +54 -0
  80. data/lib/google/cloud/ai_platform/v1/job_service.rb +6 -0
  81. data/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb +7 -2
  82. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/client.rb +533 -0
  83. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/service_stub.rb +205 -0
  84. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest.rb +53 -0
  85. data/lib/google/cloud/ai_platform/v1/llm_utility_service.rb +6 -0
  86. data/lib/google/cloud/ai_platform/v1/match_service/client.rb +7 -2
  87. data/lib/google/cloud/ai_platform/v1/match_service/rest/client.rb +541 -0
  88. data/lib/google/cloud/ai_platform/v1/match_service/rest/service_stub.rb +189 -0
  89. data/lib/google/cloud/ai_platform/v1/match_service/rest.rb +54 -0
  90. data/lib/google/cloud/ai_platform/v1/match_service.rb +6 -0
  91. data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +67 -32
  92. data/lib/google/cloud/ai_platform/v1/metadata_service/operations.rb +13 -5
  93. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/client.rb +3634 -0
  94. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/operations.rb +3971 -0
  95. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/service_stub.rb +1972 -0
  96. data/lib/google/cloud/ai_platform/v1/metadata_service/rest.rb +54 -0
  97. data/lib/google/cloud/ai_platform/v1/metadata_service.rb +6 -0
  98. data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +7 -2
  99. data/lib/google/cloud/ai_platform/v1/migration_service/operations.rb +13 -5
  100. data/lib/google/cloud/ai_platform/v1/migration_service/rest/client.rb +574 -0
  101. data/lib/google/cloud/ai_platform/v1/migration_service/rest/operations.rb +3971 -0
  102. data/lib/google/cloud/ai_platform/v1/migration_service/rest/service_stub.rb +189 -0
  103. data/lib/google/cloud/ai_platform/v1/migration_service/rest.rb +55 -0
  104. data/lib/google/cloud/ai_platform/v1/migration_service.rb +6 -0
  105. data/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +5 -1
  106. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb +438 -0
  107. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/service_stub.rb +128 -0
  108. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest.rb +53 -0
  109. data/lib/google/cloud/ai_platform/v1/model_garden_service.rb +6 -0
  110. data/lib/google/cloud/ai_platform/v1/model_service/client.rb +39 -18
  111. data/lib/google/cloud/ai_platform/v1/model_service/operations.rb +13 -5
  112. data/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb +2213 -0
  113. data/lib/google/cloud/ai_platform/v1/model_service/rest/operations.rb +3971 -0
  114. data/lib/google/cloud/ai_platform/v1/model_service/rest/service_stub.rb +1140 -0
  115. data/lib/google/cloud/ai_platform/v1/model_service/rest.rb +54 -0
  116. data/lib/google/cloud/ai_platform/v1/model_service.rb +6 -0
  117. data/lib/google/cloud/ai_platform/v1/notebook_service/client.rb +123 -10
  118. data/lib/google/cloud/ai_platform/v1/notebook_service/operations.rb +13 -5
  119. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb +1503 -0
  120. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/operations.rb +3971 -0
  121. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/service_stub.rb +723 -0
  122. data/lib/google/cloud/ai_platform/v1/notebook_service/rest.rb +54 -0
  123. data/lib/google/cloud/ai_platform/v1/notebook_service.rb +6 -0
  124. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/client.rb +15 -6
  125. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/operations.rb +13 -5
  126. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/client.rb +942 -0
  127. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/operations.rb +3971 -0
  128. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/service_stub.rb +426 -0
  129. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest.rb +54 -0
  130. data/lib/google/cloud/ai_platform/v1/persistent_resource_service.rb +6 -0
  131. data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +27 -12
  132. data/lib/google/cloud/ai_platform/v1/pipeline_service/operations.rb +13 -5
  133. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/client.rb +1600 -0
  134. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/operations.rb +3971 -0
  135. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/service_stub.rb +783 -0
  136. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest.rb +56 -0
  137. data/lib/google/cloud/ai_platform/v1/pipeline_service.rb +6 -0
  138. data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +37 -15
  139. data/lib/google/cloud/ai_platform/v1/prediction_service/credentials.rb +2 -1
  140. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +1303 -0
  141. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/service_stub.rb +658 -0
  142. data/lib/google/cloud/ai_platform/v1/prediction_service/rest.rb +53 -0
  143. data/lib/google/cloud/ai_platform/v1/prediction_service.rb +6 -0
  144. data/lib/google/cloud/ai_platform/v1/rest.rb +63 -0
  145. data/lib/google/cloud/ai_platform/v1/schedule_service/client.rb +17 -7
  146. data/lib/google/cloud/ai_platform/v1/schedule_service/operations.rb +13 -5
  147. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/client.rb +1076 -0
  148. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/operations.rb +3971 -0
  149. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/service_stub.rb +486 -0
  150. data/lib/google/cloud/ai_platform/v1/schedule_service/rest.rb +55 -0
  151. data/lib/google/cloud/ai_platform/v1/schedule_service.rb +6 -0
  152. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +13 -5
  153. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/operations.rb +13 -5
  154. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/client.rb +847 -0
  155. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/operations.rb +3971 -0
  156. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/service_stub.rb +366 -0
  157. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest.rb +59 -0
  158. data/lib/google/cloud/ai_platform/v1/specialist_pool_service.rb +6 -0
  159. data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +63 -30
  160. data/lib/google/cloud/ai_platform/v1/tensorboard_service/operations.rb +13 -5
  161. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/client.rb +3274 -0
  162. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/operations.rb +3971 -0
  163. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/service_stub.rb +1847 -0
  164. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest.rb +54 -0
  165. data/lib/google/cloud/ai_platform/v1/tensorboard_service.rb +6 -0
  166. data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
  167. data/lib/google/cloud/ai_platform/v1/vizier_service/client.rb +33 -15
  168. data/lib/google/cloud/ai_platform/v1/vizier_service/operations.rb +13 -5
  169. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/client.rb +1788 -0
  170. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/operations.rb +3971 -0
  171. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/service_stub.rb +963 -0
  172. data/lib/google/cloud/ai_platform/v1/vizier_service/rest.rb +58 -0
  173. data/lib/google/cloud/ai_platform/v1/vizier_service.rb +6 -0
  174. data/lib/google/cloud/ai_platform/v1.rb +6 -1
  175. data/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb +1 -1
  176. data/lib/google/cloud/aiplatform/v1/content_pb.rb +4 -4
  177. data/lib/google/cloud/aiplatform/v1/dataset_pb.rb +1 -1
  178. data/lib/google/cloud/aiplatform/v1/dataset_service_pb.rb +3 -2
  179. data/lib/google/cloud/aiplatform/v1/dataset_service_services_pb.rb +2 -0
  180. data/lib/google/cloud/aiplatform/v1/dataset_version_pb.rb +1 -1
  181. data/lib/google/cloud/aiplatform/v1/deployment_resource_pool_pb.rb +3 -1
  182. data/lib/google/cloud/aiplatform/v1/endpoint_pb.rb +3 -1
  183. data/lib/google/cloud/aiplatform/v1/feature_online_store_pb.rb +3 -1
  184. data/lib/google/cloud/aiplatform/v1/feature_pb.rb +1 -1
  185. data/lib/google/cloud/aiplatform/v1/featurestore_online_service_pb.rb +3 -1
  186. data/lib/google/cloud/aiplatform/v1/index_pb.rb +2 -1
  187. data/lib/google/cloud/aiplatform/v1/index_service_pb.rb +1 -1
  188. data/lib/google/cloud/aiplatform/v1/match_service_pb.rb +2 -1
  189. data/lib/google/cloud/aiplatform/v1/metadata_store_pb.rb +2 -1
  190. data/lib/google/cloud/aiplatform/v1/notebook_runtime_pb.rb +3 -1
  191. data/lib/google/cloud/aiplatform/v1/notebook_service_pb.rb +2 -1
  192. data/lib/google/cloud/aiplatform/v1/notebook_service_services_pb.rb +2 -0
  193. data/lib/google/cloud/aiplatform/v1/persistent_resource_pb.rb +2 -1
  194. data/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +1 -1
  195. data/lib/google/cloud/aiplatform/v1/publisher_model_pb.rb +1 -1
  196. data/lib/google/cloud/aiplatform/v1/tool_pb.rb +4 -1
  197. data/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb +3 -0
  198. data/proto_docs/google/cloud/aiplatform/v1/content.rb +26 -48
  199. data/proto_docs/google/cloud/aiplatform/v1/dataset.rb +4 -0
  200. data/proto_docs/google/cloud/aiplatform/v1/dataset_service.rb +17 -0
  201. data/proto_docs/google/cloud/aiplatform/v1/dataset_version.rb +4 -0
  202. data/proto_docs/google/cloud/aiplatform/v1/deployment_resource_pool.rb +23 -0
  203. data/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +7 -0
  204. data/proto_docs/google/cloud/aiplatform/v1/feature.rb +3 -0
  205. data/proto_docs/google/cloud/aiplatform/v1/feature_group.rb +3 -3
  206. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store.rb +4 -0
  207. data/proto_docs/google/cloud/aiplatform/v1/feature_registry_service.rb +1 -1
  208. data/proto_docs/google/cloud/aiplatform/v1/featurestore_online_service.rb +24 -0
  209. data/proto_docs/google/cloud/aiplatform/v1/index.rb +23 -3
  210. data/proto_docs/google/cloud/aiplatform/v1/index_service.rb +20 -2
  211. data/proto_docs/google/cloud/aiplatform/v1/match_service.rb +18 -1
  212. data/proto_docs/google/cloud/aiplatform/v1/metadata_store.rb +13 -0
  213. data/proto_docs/google/cloud/aiplatform/v1/model.rb +1 -1
  214. data/proto_docs/google/cloud/aiplatform/v1/notebook_runtime.rb +17 -2
  215. data/proto_docs/google/cloud/aiplatform/v1/notebook_service.rb +18 -0
  216. data/proto_docs/google/cloud/aiplatform/v1/persistent_resource.rb +63 -0
  217. data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +4 -0
  218. data/proto_docs/google/cloud/aiplatform/v1/publisher_model.rb +4 -0
  219. data/proto_docs/google/cloud/aiplatform/v1/tool.rb +43 -5
  220. data/proto_docs/google/cloud/aiplatform/v1/tuning_job.rb +8 -7
  221. metadata +101 -2
@@ -0,0 +1,3634 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/aiplatform/v1/metadata_service_pb"
21
+ require "google/cloud/ai_platform/v1/metadata_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+ require "google/iam/v1/rest"
24
+
25
+ module Google
26
+ module Cloud
27
+ module AIPlatform
28
+ module V1
29
+ module MetadataService
30
+ module Rest
31
+ ##
32
+ # REST client for the MetadataService service.
33
+ #
34
+ # Service for reading and writing metadata entries.
35
+ #
36
+ class Client
37
+ # @private
38
+ API_VERSION = ""
39
+
40
+ # @private
41
+ DEFAULT_ENDPOINT_TEMPLATE = "aiplatform.$UNIVERSE_DOMAIN$"
42
+
43
+ include Paths
44
+
45
+ # @private
46
+ attr_reader :metadata_service_stub
47
+
48
+ ##
49
+ # Configure the MetadataService Client class.
50
+ #
51
+ # See {::Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client::Configuration}
52
+ # for a description of the configuration fields.
53
+ #
54
+ # @example
55
+ #
56
+ # # Modify the configuration for all MetadataService clients
57
+ # ::Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.configure do |config|
58
+ # config.timeout = 10.0
59
+ # end
60
+ #
61
+ # @yield [config] Configure the Client client.
62
+ # @yieldparam config [Client::Configuration]
63
+ #
64
+ # @return [Client::Configuration]
65
+ #
66
+ def self.configure
67
+ @configure ||= begin
68
+ namespace = ["Google", "Cloud", "AIPlatform", "V1"]
69
+ parent_config = while namespace.any?
70
+ parent_name = namespace.join "::"
71
+ parent_const = const_get parent_name
72
+ break parent_const.configure if parent_const.respond_to? :configure
73
+ namespace.pop
74
+ end
75
+ default_config = Client::Configuration.new parent_config
76
+
77
+ default_config
78
+ end
79
+ yield @configure if block_given?
80
+ @configure
81
+ end
82
+
83
+ ##
84
+ # Configure the MetadataService Client instance.
85
+ #
86
+ # The configuration is set to the derived mode, meaning that values can be changed,
87
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
88
+ # should be made on {Client.configure}.
89
+ #
90
+ # See {::Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client::Configuration}
91
+ # for a description of the configuration fields.
92
+ #
93
+ # @yield [config] Configure the Client client.
94
+ # @yieldparam config [Client::Configuration]
95
+ #
96
+ # @return [Client::Configuration]
97
+ #
98
+ def configure
99
+ yield @config if block_given?
100
+ @config
101
+ end
102
+
103
+ ##
104
+ # The effective universe domain
105
+ #
106
+ # @return [String]
107
+ #
108
+ def universe_domain
109
+ @metadata_service_stub.universe_domain
110
+ end
111
+
112
+ ##
113
+ # Create a new MetadataService REST client object.
114
+ #
115
+ # @example
116
+ #
117
+ # # Create a client using the default configuration
118
+ # client = ::Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
119
+ #
120
+ # # Create a client using a custom configuration
121
+ # client = ::Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new do |config|
122
+ # config.timeout = 10.0
123
+ # end
124
+ #
125
+ # @yield [config] Configure the MetadataService client.
126
+ # @yieldparam config [Client::Configuration]
127
+ #
128
+ def initialize
129
+ # Create the configuration object
130
+ @config = Configuration.new Client.configure
131
+
132
+ # Yield the configuration if needed
133
+ yield @config if block_given?
134
+
135
+ # Create credentials
136
+ credentials = @config.credentials
137
+ # Use self-signed JWT if the endpoint is unchanged from default,
138
+ # but only if the default endpoint does not have a region prefix.
139
+ enable_self_signed_jwt = @config.endpoint.nil? ||
140
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
141
+ !@config.endpoint.split(".").first.include?("-"))
142
+ credentials ||= Credentials.default scope: @config.scope,
143
+ enable_self_signed_jwt: enable_self_signed_jwt
144
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
145
+ credentials = Credentials.new credentials, scope: @config.scope
146
+ end
147
+
148
+ @quota_project_id = @config.quota_project
149
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
150
+
151
+ @operations_client = ::Google::Cloud::AIPlatform::V1::MetadataService::Rest::Operations.new do |config|
152
+ config.credentials = credentials
153
+ config.quota_project = @quota_project_id
154
+ config.endpoint = @config.endpoint
155
+ config.universe_domain = @config.universe_domain
156
+ end
157
+
158
+ @metadata_service_stub = ::Google::Cloud::AIPlatform::V1::MetadataService::Rest::ServiceStub.new(
159
+ endpoint: @config.endpoint,
160
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
161
+ universe_domain: @config.universe_domain,
162
+ credentials: credentials
163
+ )
164
+
165
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
166
+ config.credentials = credentials
167
+ config.quota_project = @quota_project_id
168
+ config.endpoint = @metadata_service_stub.endpoint
169
+ config.universe_domain = @metadata_service_stub.universe_domain
170
+ config.bindings_override = @config.bindings_override
171
+ end
172
+
173
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
174
+ config.credentials = credentials
175
+ config.quota_project = @quota_project_id
176
+ config.endpoint = @metadata_service_stub.endpoint
177
+ config.universe_domain = @metadata_service_stub.universe_domain
178
+ config.bindings_override = @config.bindings_override
179
+ end
180
+ end
181
+
182
+ ##
183
+ # Get the associated client for long-running operations.
184
+ #
185
+ # @return [::Google::Cloud::AIPlatform::V1::MetadataService::Rest::Operations]
186
+ #
187
+ attr_reader :operations_client
188
+
189
+ ##
190
+ # Get the associated client for mix-in of the Locations.
191
+ #
192
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
193
+ #
194
+ attr_reader :location_client
195
+
196
+ ##
197
+ # Get the associated client for mix-in of the IAMPolicy.
198
+ #
199
+ # @return [Google::Iam::V1::IAMPolicy::Rest::Client]
200
+ #
201
+ attr_reader :iam_policy_client
202
+
203
+ # Service calls
204
+
205
+ ##
206
+ # Initializes a MetadataStore, including allocation of resources.
207
+ #
208
+ # @overload create_metadata_store(request, options = nil)
209
+ # Pass arguments to `create_metadata_store` via a request object, either of type
210
+ # {::Google::Cloud::AIPlatform::V1::CreateMetadataStoreRequest} or an equivalent Hash.
211
+ #
212
+ # @param request [::Google::Cloud::AIPlatform::V1::CreateMetadataStoreRequest, ::Hash]
213
+ # A request object representing the call parameters. Required. To specify no
214
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
215
+ # @param options [::Gapic::CallOptions, ::Hash]
216
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
217
+ #
218
+ # @overload create_metadata_store(parent: nil, metadata_store: nil, metadata_store_id: nil)
219
+ # Pass arguments to `create_metadata_store` via keyword arguments. Note that at
220
+ # least one keyword argument is required. To specify no parameters, or to keep all
221
+ # the default parameter values, pass an empty Hash as a request object (see above).
222
+ #
223
+ # @param parent [::String]
224
+ # Required. The resource name of the Location where the MetadataStore should
225
+ # be created.
226
+ # Format: `projects/{project}/locations/{location}/`
227
+ # @param metadata_store [::Google::Cloud::AIPlatform::V1::MetadataStore, ::Hash]
228
+ # Required. The MetadataStore to create.
229
+ # @param metadata_store_id [::String]
230
+ # The \\{metadatastore} portion of the resource name with the format:
231
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
232
+ # If not provided, the MetadataStore's ID will be a UUID generated by the
233
+ # service.
234
+ # Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
235
+ # Must be unique across all MetadataStores in the parent Location.
236
+ # (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED
237
+ # if the caller can't view the preexisting MetadataStore.)
238
+ # @yield [result, operation] Access the result along with the TransportOperation object
239
+ # @yieldparam result [::Gapic::Operation]
240
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
241
+ #
242
+ # @return [::Gapic::Operation]
243
+ #
244
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
245
+ #
246
+ # @example Basic example
247
+ # require "google/cloud/ai_platform/v1"
248
+ #
249
+ # # Create a client object. The client can be reused for multiple calls.
250
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
251
+ #
252
+ # # Create a request. To set request fields, pass in keyword arguments.
253
+ # request = Google::Cloud::AIPlatform::V1::CreateMetadataStoreRequest.new
254
+ #
255
+ # # Call the create_metadata_store method.
256
+ # result = client.create_metadata_store request
257
+ #
258
+ # # The returned object is of type Gapic::Operation. You can use it to
259
+ # # check the status of an operation, cancel it, or wait for results.
260
+ # # Here is how to wait for a response.
261
+ # result.wait_until_done! timeout: 60
262
+ # if result.response?
263
+ # p result.response
264
+ # else
265
+ # puts "No response received."
266
+ # end
267
+ #
268
+ def create_metadata_store request, options = nil
269
+ raise ::ArgumentError, "request must be provided" if request.nil?
270
+
271
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateMetadataStoreRequest
272
+
273
+ # Converts hash and nil to an options object
274
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
275
+
276
+ # Customize the options with defaults
277
+ call_metadata = @config.rpcs.create_metadata_store.metadata.to_h
278
+
279
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
280
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
281
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
282
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
283
+ transports_version_send: [:rest]
284
+
285
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
286
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
287
+
288
+ options.apply_defaults timeout: @config.rpcs.create_metadata_store.timeout,
289
+ metadata: call_metadata,
290
+ retry_policy: @config.rpcs.create_metadata_store.retry_policy
291
+
292
+ options.apply_defaults timeout: @config.timeout,
293
+ metadata: @config.metadata,
294
+ retry_policy: @config.retry_policy
295
+
296
+ @metadata_service_stub.create_metadata_store request, options do |result, operation|
297
+ result = ::Gapic::Operation.new result, @operations_client, options: options
298
+ yield result, operation if block_given?
299
+ return result
300
+ end
301
+ rescue ::Gapic::Rest::Error => e
302
+ raise ::Google::Cloud::Error.from_error(e)
303
+ end
304
+
305
+ ##
306
+ # Retrieves a specific MetadataStore.
307
+ #
308
+ # @overload get_metadata_store(request, options = nil)
309
+ # Pass arguments to `get_metadata_store` via a request object, either of type
310
+ # {::Google::Cloud::AIPlatform::V1::GetMetadataStoreRequest} or an equivalent Hash.
311
+ #
312
+ # @param request [::Google::Cloud::AIPlatform::V1::GetMetadataStoreRequest, ::Hash]
313
+ # A request object representing the call parameters. Required. To specify no
314
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
315
+ # @param options [::Gapic::CallOptions, ::Hash]
316
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
317
+ #
318
+ # @overload get_metadata_store(name: nil)
319
+ # Pass arguments to `get_metadata_store` via keyword arguments. Note that at
320
+ # least one keyword argument is required. To specify no parameters, or to keep all
321
+ # the default parameter values, pass an empty Hash as a request object (see above).
322
+ #
323
+ # @param name [::String]
324
+ # Required. The resource name of the MetadataStore to retrieve.
325
+ # Format:
326
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
327
+ # @yield [result, operation] Access the result along with the TransportOperation object
328
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::MetadataStore]
329
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
330
+ #
331
+ # @return [::Google::Cloud::AIPlatform::V1::MetadataStore]
332
+ #
333
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
334
+ #
335
+ # @example Basic example
336
+ # require "google/cloud/ai_platform/v1"
337
+ #
338
+ # # Create a client object. The client can be reused for multiple calls.
339
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
340
+ #
341
+ # # Create a request. To set request fields, pass in keyword arguments.
342
+ # request = Google::Cloud::AIPlatform::V1::GetMetadataStoreRequest.new
343
+ #
344
+ # # Call the get_metadata_store method.
345
+ # result = client.get_metadata_store request
346
+ #
347
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::MetadataStore.
348
+ # p result
349
+ #
350
+ def get_metadata_store request, options = nil
351
+ raise ::ArgumentError, "request must be provided" if request.nil?
352
+
353
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetMetadataStoreRequest
354
+
355
+ # Converts hash and nil to an options object
356
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
357
+
358
+ # Customize the options with defaults
359
+ call_metadata = @config.rpcs.get_metadata_store.metadata.to_h
360
+
361
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
362
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
363
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
364
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
365
+ transports_version_send: [:rest]
366
+
367
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
368
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
369
+
370
+ options.apply_defaults timeout: @config.rpcs.get_metadata_store.timeout,
371
+ metadata: call_metadata,
372
+ retry_policy: @config.rpcs.get_metadata_store.retry_policy
373
+
374
+ options.apply_defaults timeout: @config.timeout,
375
+ metadata: @config.metadata,
376
+ retry_policy: @config.retry_policy
377
+
378
+ @metadata_service_stub.get_metadata_store request, options do |result, operation|
379
+ yield result, operation if block_given?
380
+ return result
381
+ end
382
+ rescue ::Gapic::Rest::Error => e
383
+ raise ::Google::Cloud::Error.from_error(e)
384
+ end
385
+
386
+ ##
387
+ # Lists MetadataStores for a Location.
388
+ #
389
+ # @overload list_metadata_stores(request, options = nil)
390
+ # Pass arguments to `list_metadata_stores` via a request object, either of type
391
+ # {::Google::Cloud::AIPlatform::V1::ListMetadataStoresRequest} or an equivalent Hash.
392
+ #
393
+ # @param request [::Google::Cloud::AIPlatform::V1::ListMetadataStoresRequest, ::Hash]
394
+ # A request object representing the call parameters. Required. To specify no
395
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
396
+ # @param options [::Gapic::CallOptions, ::Hash]
397
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
398
+ #
399
+ # @overload list_metadata_stores(parent: nil, page_size: nil, page_token: nil)
400
+ # Pass arguments to `list_metadata_stores` via keyword arguments. Note that at
401
+ # least one keyword argument is required. To specify no parameters, or to keep all
402
+ # the default parameter values, pass an empty Hash as a request object (see above).
403
+ #
404
+ # @param parent [::String]
405
+ # Required. The Location whose MetadataStores should be listed.
406
+ # Format:
407
+ # `projects/{project}/locations/{location}`
408
+ # @param page_size [::Integer]
409
+ # The maximum number of Metadata Stores to return. The service may return
410
+ # fewer.
411
+ # Must be in range 1-1000, inclusive. Defaults to 100.
412
+ # @param page_token [::String]
413
+ # A page token, received from a previous
414
+ # {::Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client#list_metadata_stores MetadataService.ListMetadataStores}
415
+ # call. Provide this to retrieve the subsequent page.
416
+ #
417
+ # When paginating, all other provided parameters must match the call that
418
+ # provided the page token. (Otherwise the request will fail with
419
+ # INVALID_ARGUMENT error.)
420
+ # @yield [result, operation] Access the result along with the TransportOperation object
421
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::MetadataStore>]
422
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
423
+ #
424
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::MetadataStore>]
425
+ #
426
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
427
+ #
428
+ # @example Basic example
429
+ # require "google/cloud/ai_platform/v1"
430
+ #
431
+ # # Create a client object. The client can be reused for multiple calls.
432
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
433
+ #
434
+ # # Create a request. To set request fields, pass in keyword arguments.
435
+ # request = Google::Cloud::AIPlatform::V1::ListMetadataStoresRequest.new
436
+ #
437
+ # # Call the list_metadata_stores method.
438
+ # result = client.list_metadata_stores request
439
+ #
440
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
441
+ # # over elements, and API calls will be issued to fetch pages as needed.
442
+ # result.each do |item|
443
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::MetadataStore.
444
+ # p item
445
+ # end
446
+ #
447
+ def list_metadata_stores request, options = nil
448
+ raise ::ArgumentError, "request must be provided" if request.nil?
449
+
450
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListMetadataStoresRequest
451
+
452
+ # Converts hash and nil to an options object
453
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
454
+
455
+ # Customize the options with defaults
456
+ call_metadata = @config.rpcs.list_metadata_stores.metadata.to_h
457
+
458
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
459
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
460
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
461
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
462
+ transports_version_send: [:rest]
463
+
464
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
465
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
466
+
467
+ options.apply_defaults timeout: @config.rpcs.list_metadata_stores.timeout,
468
+ metadata: call_metadata,
469
+ retry_policy: @config.rpcs.list_metadata_stores.retry_policy
470
+
471
+ options.apply_defaults timeout: @config.timeout,
472
+ metadata: @config.metadata,
473
+ retry_policy: @config.retry_policy
474
+
475
+ @metadata_service_stub.list_metadata_stores request, options do |result, operation|
476
+ result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_metadata_stores, "metadata_stores", request, result, options
477
+ yield result, operation if block_given?
478
+ return result
479
+ end
480
+ rescue ::Gapic::Rest::Error => e
481
+ raise ::Google::Cloud::Error.from_error(e)
482
+ end
483
+
484
+ ##
485
+ # Deletes a single MetadataStore and all its child resources (Artifacts,
486
+ # Executions, and Contexts).
487
+ #
488
+ # @overload delete_metadata_store(request, options = nil)
489
+ # Pass arguments to `delete_metadata_store` via a request object, either of type
490
+ # {::Google::Cloud::AIPlatform::V1::DeleteMetadataStoreRequest} or an equivalent Hash.
491
+ #
492
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteMetadataStoreRequest, ::Hash]
493
+ # A request object representing the call parameters. Required. To specify no
494
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
495
+ # @param options [::Gapic::CallOptions, ::Hash]
496
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
497
+ #
498
+ # @overload delete_metadata_store(name: nil, force: nil)
499
+ # Pass arguments to `delete_metadata_store` via keyword arguments. Note that at
500
+ # least one keyword argument is required. To specify no parameters, or to keep all
501
+ # the default parameter values, pass an empty Hash as a request object (see above).
502
+ #
503
+ # @param name [::String]
504
+ # Required. The resource name of the MetadataStore to delete.
505
+ # Format:
506
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
507
+ # @param force [::Boolean]
508
+ # Deprecated: Field is no longer supported.
509
+ # @yield [result, operation] Access the result along with the TransportOperation object
510
+ # @yieldparam result [::Gapic::Operation]
511
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
512
+ #
513
+ # @return [::Gapic::Operation]
514
+ #
515
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
516
+ #
517
+ # @example Basic example
518
+ # require "google/cloud/ai_platform/v1"
519
+ #
520
+ # # Create a client object. The client can be reused for multiple calls.
521
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
522
+ #
523
+ # # Create a request. To set request fields, pass in keyword arguments.
524
+ # request = Google::Cloud::AIPlatform::V1::DeleteMetadataStoreRequest.new
525
+ #
526
+ # # Call the delete_metadata_store method.
527
+ # result = client.delete_metadata_store request
528
+ #
529
+ # # The returned object is of type Gapic::Operation. You can use it to
530
+ # # check the status of an operation, cancel it, or wait for results.
531
+ # # Here is how to wait for a response.
532
+ # result.wait_until_done! timeout: 60
533
+ # if result.response?
534
+ # p result.response
535
+ # else
536
+ # puts "No response received."
537
+ # end
538
+ #
539
+ def delete_metadata_store request, options = nil
540
+ raise ::ArgumentError, "request must be provided" if request.nil?
541
+
542
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteMetadataStoreRequest
543
+
544
+ # Converts hash and nil to an options object
545
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
546
+
547
+ # Customize the options with defaults
548
+ call_metadata = @config.rpcs.delete_metadata_store.metadata.to_h
549
+
550
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
551
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
552
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
553
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
554
+ transports_version_send: [:rest]
555
+
556
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
557
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
558
+
559
+ options.apply_defaults timeout: @config.rpcs.delete_metadata_store.timeout,
560
+ metadata: call_metadata,
561
+ retry_policy: @config.rpcs.delete_metadata_store.retry_policy
562
+
563
+ options.apply_defaults timeout: @config.timeout,
564
+ metadata: @config.metadata,
565
+ retry_policy: @config.retry_policy
566
+
567
+ @metadata_service_stub.delete_metadata_store request, options do |result, operation|
568
+ result = ::Gapic::Operation.new result, @operations_client, options: options
569
+ yield result, operation if block_given?
570
+ return result
571
+ end
572
+ rescue ::Gapic::Rest::Error => e
573
+ raise ::Google::Cloud::Error.from_error(e)
574
+ end
575
+
576
+ ##
577
+ # Creates an Artifact associated with a MetadataStore.
578
+ #
579
+ # @overload create_artifact(request, options = nil)
580
+ # Pass arguments to `create_artifact` via a request object, either of type
581
+ # {::Google::Cloud::AIPlatform::V1::CreateArtifactRequest} or an equivalent Hash.
582
+ #
583
+ # @param request [::Google::Cloud::AIPlatform::V1::CreateArtifactRequest, ::Hash]
584
+ # A request object representing the call parameters. Required. To specify no
585
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
586
+ # @param options [::Gapic::CallOptions, ::Hash]
587
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
588
+ #
589
+ # @overload create_artifact(parent: nil, artifact: nil, artifact_id: nil)
590
+ # Pass arguments to `create_artifact` via keyword arguments. Note that at
591
+ # least one keyword argument is required. To specify no parameters, or to keep all
592
+ # the default parameter values, pass an empty Hash as a request object (see above).
593
+ #
594
+ # @param parent [::String]
595
+ # Required. The resource name of the MetadataStore where the Artifact should
596
+ # be created.
597
+ # Format:
598
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
599
+ # @param artifact [::Google::Cloud::AIPlatform::V1::Artifact, ::Hash]
600
+ # Required. The Artifact to create.
601
+ # @param artifact_id [::String]
602
+ # The \\{artifact} portion of the resource name with the format:
603
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
604
+ # If not provided, the Artifact's ID will be a UUID generated by the service.
605
+ # Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
606
+ # Must be unique across all Artifacts in the parent MetadataStore. (Otherwise
607
+ # the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the
608
+ # caller can't view the preexisting Artifact.)
609
+ # @yield [result, operation] Access the result along with the TransportOperation object
610
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::Artifact]
611
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
612
+ #
613
+ # @return [::Google::Cloud::AIPlatform::V1::Artifact]
614
+ #
615
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
616
+ #
617
+ # @example Basic example
618
+ # require "google/cloud/ai_platform/v1"
619
+ #
620
+ # # Create a client object. The client can be reused for multiple calls.
621
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
622
+ #
623
+ # # Create a request. To set request fields, pass in keyword arguments.
624
+ # request = Google::Cloud::AIPlatform::V1::CreateArtifactRequest.new
625
+ #
626
+ # # Call the create_artifact method.
627
+ # result = client.create_artifact request
628
+ #
629
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::Artifact.
630
+ # p result
631
+ #
632
+ def create_artifact request, options = nil
633
+ raise ::ArgumentError, "request must be provided" if request.nil?
634
+
635
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateArtifactRequest
636
+
637
+ # Converts hash and nil to an options object
638
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
639
+
640
+ # Customize the options with defaults
641
+ call_metadata = @config.rpcs.create_artifact.metadata.to_h
642
+
643
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
644
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
645
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
646
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
647
+ transports_version_send: [:rest]
648
+
649
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
650
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
651
+
652
+ options.apply_defaults timeout: @config.rpcs.create_artifact.timeout,
653
+ metadata: call_metadata,
654
+ retry_policy: @config.rpcs.create_artifact.retry_policy
655
+
656
+ options.apply_defaults timeout: @config.timeout,
657
+ metadata: @config.metadata,
658
+ retry_policy: @config.retry_policy
659
+
660
+ @metadata_service_stub.create_artifact request, options do |result, operation|
661
+ yield result, operation if block_given?
662
+ return result
663
+ end
664
+ rescue ::Gapic::Rest::Error => e
665
+ raise ::Google::Cloud::Error.from_error(e)
666
+ end
667
+
668
+ ##
669
+ # Retrieves a specific Artifact.
670
+ #
671
+ # @overload get_artifact(request, options = nil)
672
+ # Pass arguments to `get_artifact` via a request object, either of type
673
+ # {::Google::Cloud::AIPlatform::V1::GetArtifactRequest} or an equivalent Hash.
674
+ #
675
+ # @param request [::Google::Cloud::AIPlatform::V1::GetArtifactRequest, ::Hash]
676
+ # A request object representing the call parameters. Required. To specify no
677
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
678
+ # @param options [::Gapic::CallOptions, ::Hash]
679
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
680
+ #
681
+ # @overload get_artifact(name: nil)
682
+ # Pass arguments to `get_artifact` via keyword arguments. Note that at
683
+ # least one keyword argument is required. To specify no parameters, or to keep all
684
+ # the default parameter values, pass an empty Hash as a request object (see above).
685
+ #
686
+ # @param name [::String]
687
+ # Required. The resource name of the Artifact to retrieve.
688
+ # Format:
689
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
690
+ # @yield [result, operation] Access the result along with the TransportOperation object
691
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::Artifact]
692
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
693
+ #
694
+ # @return [::Google::Cloud::AIPlatform::V1::Artifact]
695
+ #
696
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
697
+ #
698
+ # @example Basic example
699
+ # require "google/cloud/ai_platform/v1"
700
+ #
701
+ # # Create a client object. The client can be reused for multiple calls.
702
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
703
+ #
704
+ # # Create a request. To set request fields, pass in keyword arguments.
705
+ # request = Google::Cloud::AIPlatform::V1::GetArtifactRequest.new
706
+ #
707
+ # # Call the get_artifact method.
708
+ # result = client.get_artifact request
709
+ #
710
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::Artifact.
711
+ # p result
712
+ #
713
+ def get_artifact request, options = nil
714
+ raise ::ArgumentError, "request must be provided" if request.nil?
715
+
716
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetArtifactRequest
717
+
718
+ # Converts hash and nil to an options object
719
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
720
+
721
+ # Customize the options with defaults
722
+ call_metadata = @config.rpcs.get_artifact.metadata.to_h
723
+
724
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
725
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
726
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
727
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
728
+ transports_version_send: [:rest]
729
+
730
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
731
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
732
+
733
+ options.apply_defaults timeout: @config.rpcs.get_artifact.timeout,
734
+ metadata: call_metadata,
735
+ retry_policy: @config.rpcs.get_artifact.retry_policy
736
+
737
+ options.apply_defaults timeout: @config.timeout,
738
+ metadata: @config.metadata,
739
+ retry_policy: @config.retry_policy
740
+
741
+ @metadata_service_stub.get_artifact request, options do |result, operation|
742
+ yield result, operation if block_given?
743
+ return result
744
+ end
745
+ rescue ::Gapic::Rest::Error => e
746
+ raise ::Google::Cloud::Error.from_error(e)
747
+ end
748
+
749
+ ##
750
+ # Lists Artifacts in the MetadataStore.
751
+ #
752
+ # @overload list_artifacts(request, options = nil)
753
+ # Pass arguments to `list_artifacts` via a request object, either of type
754
+ # {::Google::Cloud::AIPlatform::V1::ListArtifactsRequest} or an equivalent Hash.
755
+ #
756
+ # @param request [::Google::Cloud::AIPlatform::V1::ListArtifactsRequest, ::Hash]
757
+ # A request object representing the call parameters. Required. To specify no
758
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
759
+ # @param options [::Gapic::CallOptions, ::Hash]
760
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
761
+ #
762
+ # @overload list_artifacts(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
763
+ # Pass arguments to `list_artifacts` via keyword arguments. Note that at
764
+ # least one keyword argument is required. To specify no parameters, or to keep all
765
+ # the default parameter values, pass an empty Hash as a request object (see above).
766
+ #
767
+ # @param parent [::String]
768
+ # Required. The MetadataStore whose Artifacts should be listed.
769
+ # Format:
770
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
771
+ # @param page_size [::Integer]
772
+ # The maximum number of Artifacts to return. The service may return fewer.
773
+ # Must be in range 1-1000, inclusive. Defaults to 100.
774
+ # @param page_token [::String]
775
+ # A page token, received from a previous
776
+ # {::Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client#list_artifacts MetadataService.ListArtifacts}
777
+ # call. Provide this to retrieve the subsequent page.
778
+ #
779
+ # When paginating, all other provided parameters must match the call that
780
+ # provided the page token. (Otherwise the request will fail with
781
+ # INVALID_ARGUMENT error.)
782
+ # @param filter [::String]
783
+ # Filter specifying the boolean condition for the Artifacts to satisfy in
784
+ # order to be part of the result set.
785
+ # The syntax to define filter query is based on https://google.aip.dev/160.
786
+ # The supported set of filters include the following:
787
+ #
788
+ # * **Attribute filtering**:
789
+ # For example: `display_name = "test"`.
790
+ # Supported fields include: `name`, `display_name`, `uri`, `state`,
791
+ # `schema_title`, `create_time`, and `update_time`.
792
+ # Time fields, such as `create_time` and `update_time`, require values
793
+ # specified in RFC-3339 format.
794
+ # For example: `create_time = "2020-11-19T11:30:00-04:00"`
795
+ # * **Metadata field**:
796
+ # To filter on metadata fields use traversal operation as follows:
797
+ # `metadata.<field_name>.<type_value>`.
798
+ # For example: `metadata.field_1.number_value = 10.0`
799
+ # In case the field name contains special characters (such as colon), one
800
+ # can embed it inside double quote.
801
+ # For example: `metadata."field:1".number_value = 10.0`
802
+ # * **Context based filtering**:
803
+ # To filter Artifacts based on the contexts to which they belong, use the
804
+ # function operator with the full resource name
805
+ # `in_context(<context-name>)`.
806
+ # For example:
807
+ # `in_context("projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context-id>")`
808
+ #
809
+ # Each of the above supported filter types can be combined together using
810
+ # logical operators (`AND` & `OR`). Maximum nested expression depth allowed
811
+ # is 5.
812
+ #
813
+ # For example: `display_name = "test" AND metadata.field1.bool_value = true`.
814
+ # @param order_by [::String]
815
+ # How the list of messages is ordered. Specify the values to order by and an
816
+ # ordering operation. The default sorting order is ascending. To specify
817
+ # descending order for a field, users append a " desc" suffix; for example:
818
+ # "foo desc, bar".
819
+ # Subfields are specified with a `.` character, such as foo.bar.
820
+ # see https://google.aip.dev/132#ordering for more details.
821
+ # @yield [result, operation] Access the result along with the TransportOperation object
822
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Artifact>]
823
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
824
+ #
825
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Artifact>]
826
+ #
827
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
828
+ #
829
+ # @example Basic example
830
+ # require "google/cloud/ai_platform/v1"
831
+ #
832
+ # # Create a client object. The client can be reused for multiple calls.
833
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
834
+ #
835
+ # # Create a request. To set request fields, pass in keyword arguments.
836
+ # request = Google::Cloud::AIPlatform::V1::ListArtifactsRequest.new
837
+ #
838
+ # # Call the list_artifacts method.
839
+ # result = client.list_artifacts request
840
+ #
841
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
842
+ # # over elements, and API calls will be issued to fetch pages as needed.
843
+ # result.each do |item|
844
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::Artifact.
845
+ # p item
846
+ # end
847
+ #
848
+ def list_artifacts request, options = nil
849
+ raise ::ArgumentError, "request must be provided" if request.nil?
850
+
851
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListArtifactsRequest
852
+
853
+ # Converts hash and nil to an options object
854
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
855
+
856
+ # Customize the options with defaults
857
+ call_metadata = @config.rpcs.list_artifacts.metadata.to_h
858
+
859
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
860
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
861
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
862
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
863
+ transports_version_send: [:rest]
864
+
865
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
866
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
867
+
868
+ options.apply_defaults timeout: @config.rpcs.list_artifacts.timeout,
869
+ metadata: call_metadata,
870
+ retry_policy: @config.rpcs.list_artifacts.retry_policy
871
+
872
+ options.apply_defaults timeout: @config.timeout,
873
+ metadata: @config.metadata,
874
+ retry_policy: @config.retry_policy
875
+
876
+ @metadata_service_stub.list_artifacts request, options do |result, operation|
877
+ result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_artifacts, "artifacts", request, result, options
878
+ yield result, operation if block_given?
879
+ return result
880
+ end
881
+ rescue ::Gapic::Rest::Error => e
882
+ raise ::Google::Cloud::Error.from_error(e)
883
+ end
884
+
885
+ ##
886
+ # Updates a stored Artifact.
887
+ #
888
+ # @overload update_artifact(request, options = nil)
889
+ # Pass arguments to `update_artifact` via a request object, either of type
890
+ # {::Google::Cloud::AIPlatform::V1::UpdateArtifactRequest} or an equivalent Hash.
891
+ #
892
+ # @param request [::Google::Cloud::AIPlatform::V1::UpdateArtifactRequest, ::Hash]
893
+ # A request object representing the call parameters. Required. To specify no
894
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
895
+ # @param options [::Gapic::CallOptions, ::Hash]
896
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
897
+ #
898
+ # @overload update_artifact(artifact: nil, update_mask: nil, allow_missing: nil)
899
+ # Pass arguments to `update_artifact` via keyword arguments. Note that at
900
+ # least one keyword argument is required. To specify no parameters, or to keep all
901
+ # the default parameter values, pass an empty Hash as a request object (see above).
902
+ #
903
+ # @param artifact [::Google::Cloud::AIPlatform::V1::Artifact, ::Hash]
904
+ # Required. The Artifact containing updates.
905
+ # The Artifact's {::Google::Cloud::AIPlatform::V1::Artifact#name Artifact.name}
906
+ # field is used to identify the Artifact to be updated. Format:
907
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
908
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
909
+ # Optional. A FieldMask indicating which fields should be updated.
910
+ # @param allow_missing [::Boolean]
911
+ # If set to true, and the {::Google::Cloud::AIPlatform::V1::Artifact Artifact} is
912
+ # not found, a new {::Google::Cloud::AIPlatform::V1::Artifact Artifact} is
913
+ # created.
914
+ # @yield [result, operation] Access the result along with the TransportOperation object
915
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::Artifact]
916
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
917
+ #
918
+ # @return [::Google::Cloud::AIPlatform::V1::Artifact]
919
+ #
920
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
921
+ #
922
+ # @example Basic example
923
+ # require "google/cloud/ai_platform/v1"
924
+ #
925
+ # # Create a client object. The client can be reused for multiple calls.
926
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
927
+ #
928
+ # # Create a request. To set request fields, pass in keyword arguments.
929
+ # request = Google::Cloud::AIPlatform::V1::UpdateArtifactRequest.new
930
+ #
931
+ # # Call the update_artifact method.
932
+ # result = client.update_artifact request
933
+ #
934
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::Artifact.
935
+ # p result
936
+ #
937
+ def update_artifact request, options = nil
938
+ raise ::ArgumentError, "request must be provided" if request.nil?
939
+
940
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateArtifactRequest
941
+
942
+ # Converts hash and nil to an options object
943
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
944
+
945
+ # Customize the options with defaults
946
+ call_metadata = @config.rpcs.update_artifact.metadata.to_h
947
+
948
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
949
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
950
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
951
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
952
+ transports_version_send: [:rest]
953
+
954
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
955
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
956
+
957
+ options.apply_defaults timeout: @config.rpcs.update_artifact.timeout,
958
+ metadata: call_metadata,
959
+ retry_policy: @config.rpcs.update_artifact.retry_policy
960
+
961
+ options.apply_defaults timeout: @config.timeout,
962
+ metadata: @config.metadata,
963
+ retry_policy: @config.retry_policy
964
+
965
+ @metadata_service_stub.update_artifact request, options do |result, operation|
966
+ yield result, operation if block_given?
967
+ return result
968
+ end
969
+ rescue ::Gapic::Rest::Error => e
970
+ raise ::Google::Cloud::Error.from_error(e)
971
+ end
972
+
973
+ ##
974
+ # Deletes an Artifact.
975
+ #
976
+ # @overload delete_artifact(request, options = nil)
977
+ # Pass arguments to `delete_artifact` via a request object, either of type
978
+ # {::Google::Cloud::AIPlatform::V1::DeleteArtifactRequest} or an equivalent Hash.
979
+ #
980
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteArtifactRequest, ::Hash]
981
+ # A request object representing the call parameters. Required. To specify no
982
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
983
+ # @param options [::Gapic::CallOptions, ::Hash]
984
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
985
+ #
986
+ # @overload delete_artifact(name: nil, etag: nil)
987
+ # Pass arguments to `delete_artifact` via keyword arguments. Note that at
988
+ # least one keyword argument is required. To specify no parameters, or to keep all
989
+ # the default parameter values, pass an empty Hash as a request object (see above).
990
+ #
991
+ # @param name [::String]
992
+ # Required. The resource name of the Artifact to delete.
993
+ # Format:
994
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
995
+ # @param etag [::String]
996
+ # Optional. The etag of the Artifact to delete.
997
+ # If this is provided, it must match the server's etag. Otherwise, the
998
+ # request will fail with a FAILED_PRECONDITION.
999
+ # @yield [result, operation] Access the result along with the TransportOperation object
1000
+ # @yieldparam result [::Gapic::Operation]
1001
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1002
+ #
1003
+ # @return [::Gapic::Operation]
1004
+ #
1005
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1006
+ #
1007
+ # @example Basic example
1008
+ # require "google/cloud/ai_platform/v1"
1009
+ #
1010
+ # # Create a client object. The client can be reused for multiple calls.
1011
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
1012
+ #
1013
+ # # Create a request. To set request fields, pass in keyword arguments.
1014
+ # request = Google::Cloud::AIPlatform::V1::DeleteArtifactRequest.new
1015
+ #
1016
+ # # Call the delete_artifact method.
1017
+ # result = client.delete_artifact request
1018
+ #
1019
+ # # The returned object is of type Gapic::Operation. You can use it to
1020
+ # # check the status of an operation, cancel it, or wait for results.
1021
+ # # Here is how to wait for a response.
1022
+ # result.wait_until_done! timeout: 60
1023
+ # if result.response?
1024
+ # p result.response
1025
+ # else
1026
+ # puts "No response received."
1027
+ # end
1028
+ #
1029
+ def delete_artifact request, options = nil
1030
+ raise ::ArgumentError, "request must be provided" if request.nil?
1031
+
1032
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteArtifactRequest
1033
+
1034
+ # Converts hash and nil to an options object
1035
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1036
+
1037
+ # Customize the options with defaults
1038
+ call_metadata = @config.rpcs.delete_artifact.metadata.to_h
1039
+
1040
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1041
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1042
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1043
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1044
+ transports_version_send: [:rest]
1045
+
1046
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1047
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1048
+
1049
+ options.apply_defaults timeout: @config.rpcs.delete_artifact.timeout,
1050
+ metadata: call_metadata,
1051
+ retry_policy: @config.rpcs.delete_artifact.retry_policy
1052
+
1053
+ options.apply_defaults timeout: @config.timeout,
1054
+ metadata: @config.metadata,
1055
+ retry_policy: @config.retry_policy
1056
+
1057
+ @metadata_service_stub.delete_artifact request, options do |result, operation|
1058
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1059
+ yield result, operation if block_given?
1060
+ return result
1061
+ end
1062
+ rescue ::Gapic::Rest::Error => e
1063
+ raise ::Google::Cloud::Error.from_error(e)
1064
+ end
1065
+
1066
+ ##
1067
+ # Purges Artifacts.
1068
+ #
1069
+ # @overload purge_artifacts(request, options = nil)
1070
+ # Pass arguments to `purge_artifacts` via a request object, either of type
1071
+ # {::Google::Cloud::AIPlatform::V1::PurgeArtifactsRequest} or an equivalent Hash.
1072
+ #
1073
+ # @param request [::Google::Cloud::AIPlatform::V1::PurgeArtifactsRequest, ::Hash]
1074
+ # A request object representing the call parameters. Required. To specify no
1075
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1076
+ # @param options [::Gapic::CallOptions, ::Hash]
1077
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1078
+ #
1079
+ # @overload purge_artifacts(parent: nil, filter: nil, force: nil)
1080
+ # Pass arguments to `purge_artifacts` via keyword arguments. Note that at
1081
+ # least one keyword argument is required. To specify no parameters, or to keep all
1082
+ # the default parameter values, pass an empty Hash as a request object (see above).
1083
+ #
1084
+ # @param parent [::String]
1085
+ # Required. The metadata store to purge Artifacts from.
1086
+ # Format:
1087
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
1088
+ # @param filter [::String]
1089
+ # Required. A required filter matching the Artifacts to be purged.
1090
+ # E.g., `update_time <= 2020-11-19T11:30:00-04:00`.
1091
+ # @param force [::Boolean]
1092
+ # Optional. Flag to indicate to actually perform the purge.
1093
+ # If `force` is set to false, the method will return a sample of
1094
+ # Artifact names that would be deleted.
1095
+ # @yield [result, operation] Access the result along with the TransportOperation object
1096
+ # @yieldparam result [::Gapic::Operation]
1097
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1098
+ #
1099
+ # @return [::Gapic::Operation]
1100
+ #
1101
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1102
+ #
1103
+ # @example Basic example
1104
+ # require "google/cloud/ai_platform/v1"
1105
+ #
1106
+ # # Create a client object. The client can be reused for multiple calls.
1107
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
1108
+ #
1109
+ # # Create a request. To set request fields, pass in keyword arguments.
1110
+ # request = Google::Cloud::AIPlatform::V1::PurgeArtifactsRequest.new
1111
+ #
1112
+ # # Call the purge_artifacts method.
1113
+ # result = client.purge_artifacts request
1114
+ #
1115
+ # # The returned object is of type Gapic::Operation. You can use it to
1116
+ # # check the status of an operation, cancel it, or wait for results.
1117
+ # # Here is how to wait for a response.
1118
+ # result.wait_until_done! timeout: 60
1119
+ # if result.response?
1120
+ # p result.response
1121
+ # else
1122
+ # puts "No response received."
1123
+ # end
1124
+ #
1125
+ def purge_artifacts request, options = nil
1126
+ raise ::ArgumentError, "request must be provided" if request.nil?
1127
+
1128
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::PurgeArtifactsRequest
1129
+
1130
+ # Converts hash and nil to an options object
1131
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1132
+
1133
+ # Customize the options with defaults
1134
+ call_metadata = @config.rpcs.purge_artifacts.metadata.to_h
1135
+
1136
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1137
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1138
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1139
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1140
+ transports_version_send: [:rest]
1141
+
1142
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1143
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1144
+
1145
+ options.apply_defaults timeout: @config.rpcs.purge_artifacts.timeout,
1146
+ metadata: call_metadata,
1147
+ retry_policy: @config.rpcs.purge_artifacts.retry_policy
1148
+
1149
+ options.apply_defaults timeout: @config.timeout,
1150
+ metadata: @config.metadata,
1151
+ retry_policy: @config.retry_policy
1152
+
1153
+ @metadata_service_stub.purge_artifacts request, options do |result, operation|
1154
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1155
+ yield result, operation if block_given?
1156
+ return result
1157
+ end
1158
+ rescue ::Gapic::Rest::Error => e
1159
+ raise ::Google::Cloud::Error.from_error(e)
1160
+ end
1161
+
1162
+ ##
1163
+ # Creates a Context associated with a MetadataStore.
1164
+ #
1165
+ # @overload create_context(request, options = nil)
1166
+ # Pass arguments to `create_context` via a request object, either of type
1167
+ # {::Google::Cloud::AIPlatform::V1::CreateContextRequest} or an equivalent Hash.
1168
+ #
1169
+ # @param request [::Google::Cloud::AIPlatform::V1::CreateContextRequest, ::Hash]
1170
+ # A request object representing the call parameters. Required. To specify no
1171
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1172
+ # @param options [::Gapic::CallOptions, ::Hash]
1173
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1174
+ #
1175
+ # @overload create_context(parent: nil, context: nil, context_id: nil)
1176
+ # Pass arguments to `create_context` via keyword arguments. Note that at
1177
+ # least one keyword argument is required. To specify no parameters, or to keep all
1178
+ # the default parameter values, pass an empty Hash as a request object (see above).
1179
+ #
1180
+ # @param parent [::String]
1181
+ # Required. The resource name of the MetadataStore where the Context should
1182
+ # be created. Format:
1183
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
1184
+ # @param context [::Google::Cloud::AIPlatform::V1::Context, ::Hash]
1185
+ # Required. The Context to create.
1186
+ # @param context_id [::String]
1187
+ # The \\{context} portion of the resource name with the format:
1188
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`.
1189
+ # If not provided, the Context's ID will be a UUID generated by the service.
1190
+ # Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
1191
+ # Must be unique across all Contexts in the parent MetadataStore. (Otherwise
1192
+ # the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the
1193
+ # caller can't view the preexisting Context.)
1194
+ # @yield [result, operation] Access the result along with the TransportOperation object
1195
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::Context]
1196
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1197
+ #
1198
+ # @return [::Google::Cloud::AIPlatform::V1::Context]
1199
+ #
1200
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1201
+ #
1202
+ # @example Basic example
1203
+ # require "google/cloud/ai_platform/v1"
1204
+ #
1205
+ # # Create a client object. The client can be reused for multiple calls.
1206
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
1207
+ #
1208
+ # # Create a request. To set request fields, pass in keyword arguments.
1209
+ # request = Google::Cloud::AIPlatform::V1::CreateContextRequest.new
1210
+ #
1211
+ # # Call the create_context method.
1212
+ # result = client.create_context request
1213
+ #
1214
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::Context.
1215
+ # p result
1216
+ #
1217
+ def create_context request, options = nil
1218
+ raise ::ArgumentError, "request must be provided" if request.nil?
1219
+
1220
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateContextRequest
1221
+
1222
+ # Converts hash and nil to an options object
1223
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1224
+
1225
+ # Customize the options with defaults
1226
+ call_metadata = @config.rpcs.create_context.metadata.to_h
1227
+
1228
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1229
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1230
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1231
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1232
+ transports_version_send: [:rest]
1233
+
1234
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1235
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1236
+
1237
+ options.apply_defaults timeout: @config.rpcs.create_context.timeout,
1238
+ metadata: call_metadata,
1239
+ retry_policy: @config.rpcs.create_context.retry_policy
1240
+
1241
+ options.apply_defaults timeout: @config.timeout,
1242
+ metadata: @config.metadata,
1243
+ retry_policy: @config.retry_policy
1244
+
1245
+ @metadata_service_stub.create_context request, options do |result, operation|
1246
+ yield result, operation if block_given?
1247
+ return result
1248
+ end
1249
+ rescue ::Gapic::Rest::Error => e
1250
+ raise ::Google::Cloud::Error.from_error(e)
1251
+ end
1252
+
1253
+ ##
1254
+ # Retrieves a specific Context.
1255
+ #
1256
+ # @overload get_context(request, options = nil)
1257
+ # Pass arguments to `get_context` via a request object, either of type
1258
+ # {::Google::Cloud::AIPlatform::V1::GetContextRequest} or an equivalent Hash.
1259
+ #
1260
+ # @param request [::Google::Cloud::AIPlatform::V1::GetContextRequest, ::Hash]
1261
+ # A request object representing the call parameters. Required. To specify no
1262
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1263
+ # @param options [::Gapic::CallOptions, ::Hash]
1264
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1265
+ #
1266
+ # @overload get_context(name: nil)
1267
+ # Pass arguments to `get_context` via keyword arguments. Note that at
1268
+ # least one keyword argument is required. To specify no parameters, or to keep all
1269
+ # the default parameter values, pass an empty Hash as a request object (see above).
1270
+ #
1271
+ # @param name [::String]
1272
+ # Required. The resource name of the Context to retrieve.
1273
+ # Format:
1274
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
1275
+ # @yield [result, operation] Access the result along with the TransportOperation object
1276
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::Context]
1277
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1278
+ #
1279
+ # @return [::Google::Cloud::AIPlatform::V1::Context]
1280
+ #
1281
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1282
+ #
1283
+ # @example Basic example
1284
+ # require "google/cloud/ai_platform/v1"
1285
+ #
1286
+ # # Create a client object. The client can be reused for multiple calls.
1287
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
1288
+ #
1289
+ # # Create a request. To set request fields, pass in keyword arguments.
1290
+ # request = Google::Cloud::AIPlatform::V1::GetContextRequest.new
1291
+ #
1292
+ # # Call the get_context method.
1293
+ # result = client.get_context request
1294
+ #
1295
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::Context.
1296
+ # p result
1297
+ #
1298
+ def get_context request, options = nil
1299
+ raise ::ArgumentError, "request must be provided" if request.nil?
1300
+
1301
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetContextRequest
1302
+
1303
+ # Converts hash and nil to an options object
1304
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1305
+
1306
+ # Customize the options with defaults
1307
+ call_metadata = @config.rpcs.get_context.metadata.to_h
1308
+
1309
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1310
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1311
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1312
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1313
+ transports_version_send: [:rest]
1314
+
1315
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1316
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1317
+
1318
+ options.apply_defaults timeout: @config.rpcs.get_context.timeout,
1319
+ metadata: call_metadata,
1320
+ retry_policy: @config.rpcs.get_context.retry_policy
1321
+
1322
+ options.apply_defaults timeout: @config.timeout,
1323
+ metadata: @config.metadata,
1324
+ retry_policy: @config.retry_policy
1325
+
1326
+ @metadata_service_stub.get_context request, options do |result, operation|
1327
+ yield result, operation if block_given?
1328
+ return result
1329
+ end
1330
+ rescue ::Gapic::Rest::Error => e
1331
+ raise ::Google::Cloud::Error.from_error(e)
1332
+ end
1333
+
1334
+ ##
1335
+ # Lists Contexts on the MetadataStore.
1336
+ #
1337
+ # @overload list_contexts(request, options = nil)
1338
+ # Pass arguments to `list_contexts` via a request object, either of type
1339
+ # {::Google::Cloud::AIPlatform::V1::ListContextsRequest} or an equivalent Hash.
1340
+ #
1341
+ # @param request [::Google::Cloud::AIPlatform::V1::ListContextsRequest, ::Hash]
1342
+ # A request object representing the call parameters. Required. To specify no
1343
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1344
+ # @param options [::Gapic::CallOptions, ::Hash]
1345
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1346
+ #
1347
+ # @overload list_contexts(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1348
+ # Pass arguments to `list_contexts` via keyword arguments. Note that at
1349
+ # least one keyword argument is required. To specify no parameters, or to keep all
1350
+ # the default parameter values, pass an empty Hash as a request object (see above).
1351
+ #
1352
+ # @param parent [::String]
1353
+ # Required. The MetadataStore whose Contexts should be listed.
1354
+ # Format:
1355
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
1356
+ # @param page_size [::Integer]
1357
+ # The maximum number of Contexts to return. The service may return fewer.
1358
+ # Must be in range 1-1000, inclusive. Defaults to 100.
1359
+ # @param page_token [::String]
1360
+ # A page token, received from a previous
1361
+ # {::Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client#list_contexts MetadataService.ListContexts}
1362
+ # call. Provide this to retrieve the subsequent page.
1363
+ #
1364
+ # When paginating, all other provided parameters must match the call that
1365
+ # provided the page token. (Otherwise the request will fail with
1366
+ # INVALID_ARGUMENT error.)
1367
+ # @param filter [::String]
1368
+ # Filter specifying the boolean condition for the Contexts to satisfy in
1369
+ # order to be part of the result set.
1370
+ # The syntax to define filter query is based on https://google.aip.dev/160.
1371
+ # Following are the supported set of filters:
1372
+ #
1373
+ # * **Attribute filtering**:
1374
+ # For example: `display_name = "test"`.
1375
+ # Supported fields include: `name`, `display_name`, `schema_title`,
1376
+ # `create_time`, and `update_time`.
1377
+ # Time fields, such as `create_time` and `update_time`, require values
1378
+ # specified in RFC-3339 format.
1379
+ # For example: `create_time = "2020-11-19T11:30:00-04:00"`.
1380
+ # * **Metadata field**:
1381
+ # To filter on metadata fields use traversal operation as follows:
1382
+ # `metadata.<field_name>.<type_value>`.
1383
+ # For example: `metadata.field_1.number_value = 10.0`.
1384
+ # In case the field name contains special characters (such as colon), one
1385
+ # can embed it inside double quote.
1386
+ # For example: `metadata."field:1".number_value = 10.0`
1387
+ # * **Parent Child filtering**:
1388
+ # To filter Contexts based on parent-child relationship use the HAS
1389
+ # operator as follows:
1390
+ #
1391
+ # ```
1392
+ # parent_contexts:
1393
+ # "projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context_id>"
1394
+ # child_contexts:
1395
+ # "projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context_id>"
1396
+ # ```
1397
+ #
1398
+ # Each of the above supported filters can be combined together using
1399
+ # logical operators (`AND` & `OR`). Maximum nested expression depth allowed
1400
+ # is 5.
1401
+ #
1402
+ # For example: `display_name = "test" AND metadata.field1.bool_value = true`.
1403
+ # @param order_by [::String]
1404
+ # How the list of messages is ordered. Specify the values to order by and an
1405
+ # ordering operation. The default sorting order is ascending. To specify
1406
+ # descending order for a field, users append a " desc" suffix; for example:
1407
+ # "foo desc, bar".
1408
+ # Subfields are specified with a `.` character, such as foo.bar.
1409
+ # see https://google.aip.dev/132#ordering for more details.
1410
+ # @yield [result, operation] Access the result along with the TransportOperation object
1411
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Context>]
1412
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1413
+ #
1414
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Context>]
1415
+ #
1416
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1417
+ #
1418
+ # @example Basic example
1419
+ # require "google/cloud/ai_platform/v1"
1420
+ #
1421
+ # # Create a client object. The client can be reused for multiple calls.
1422
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
1423
+ #
1424
+ # # Create a request. To set request fields, pass in keyword arguments.
1425
+ # request = Google::Cloud::AIPlatform::V1::ListContextsRequest.new
1426
+ #
1427
+ # # Call the list_contexts method.
1428
+ # result = client.list_contexts request
1429
+ #
1430
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1431
+ # # over elements, and API calls will be issued to fetch pages as needed.
1432
+ # result.each do |item|
1433
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::Context.
1434
+ # p item
1435
+ # end
1436
+ #
1437
+ def list_contexts request, options = nil
1438
+ raise ::ArgumentError, "request must be provided" if request.nil?
1439
+
1440
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListContextsRequest
1441
+
1442
+ # Converts hash and nil to an options object
1443
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1444
+
1445
+ # Customize the options with defaults
1446
+ call_metadata = @config.rpcs.list_contexts.metadata.to_h
1447
+
1448
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1449
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1450
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1451
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1452
+ transports_version_send: [:rest]
1453
+
1454
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1455
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1456
+
1457
+ options.apply_defaults timeout: @config.rpcs.list_contexts.timeout,
1458
+ metadata: call_metadata,
1459
+ retry_policy: @config.rpcs.list_contexts.retry_policy
1460
+
1461
+ options.apply_defaults timeout: @config.timeout,
1462
+ metadata: @config.metadata,
1463
+ retry_policy: @config.retry_policy
1464
+
1465
+ @metadata_service_stub.list_contexts request, options do |result, operation|
1466
+ result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_contexts, "contexts", request, result, options
1467
+ yield result, operation if block_given?
1468
+ return result
1469
+ end
1470
+ rescue ::Gapic::Rest::Error => e
1471
+ raise ::Google::Cloud::Error.from_error(e)
1472
+ end
1473
+
1474
+ ##
1475
+ # Updates a stored Context.
1476
+ #
1477
+ # @overload update_context(request, options = nil)
1478
+ # Pass arguments to `update_context` via a request object, either of type
1479
+ # {::Google::Cloud::AIPlatform::V1::UpdateContextRequest} or an equivalent Hash.
1480
+ #
1481
+ # @param request [::Google::Cloud::AIPlatform::V1::UpdateContextRequest, ::Hash]
1482
+ # A request object representing the call parameters. Required. To specify no
1483
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1484
+ # @param options [::Gapic::CallOptions, ::Hash]
1485
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1486
+ #
1487
+ # @overload update_context(context: nil, update_mask: nil, allow_missing: nil)
1488
+ # Pass arguments to `update_context` via keyword arguments. Note that at
1489
+ # least one keyword argument is required. To specify no parameters, or to keep all
1490
+ # the default parameter values, pass an empty Hash as a request object (see above).
1491
+ #
1492
+ # @param context [::Google::Cloud::AIPlatform::V1::Context, ::Hash]
1493
+ # Required. The Context containing updates.
1494
+ # The Context's {::Google::Cloud::AIPlatform::V1::Context#name Context.name} field
1495
+ # is used to identify the Context to be updated. Format:
1496
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
1497
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1498
+ # Optional. A FieldMask indicating which fields should be updated.
1499
+ # @param allow_missing [::Boolean]
1500
+ # If set to true, and the {::Google::Cloud::AIPlatform::V1::Context Context} is
1501
+ # not found, a new {::Google::Cloud::AIPlatform::V1::Context Context} is created.
1502
+ # @yield [result, operation] Access the result along with the TransportOperation object
1503
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::Context]
1504
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1505
+ #
1506
+ # @return [::Google::Cloud::AIPlatform::V1::Context]
1507
+ #
1508
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1509
+ #
1510
+ # @example Basic example
1511
+ # require "google/cloud/ai_platform/v1"
1512
+ #
1513
+ # # Create a client object. The client can be reused for multiple calls.
1514
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
1515
+ #
1516
+ # # Create a request. To set request fields, pass in keyword arguments.
1517
+ # request = Google::Cloud::AIPlatform::V1::UpdateContextRequest.new
1518
+ #
1519
+ # # Call the update_context method.
1520
+ # result = client.update_context request
1521
+ #
1522
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::Context.
1523
+ # p result
1524
+ #
1525
+ def update_context request, options = nil
1526
+ raise ::ArgumentError, "request must be provided" if request.nil?
1527
+
1528
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateContextRequest
1529
+
1530
+ # Converts hash and nil to an options object
1531
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1532
+
1533
+ # Customize the options with defaults
1534
+ call_metadata = @config.rpcs.update_context.metadata.to_h
1535
+
1536
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1537
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1538
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1539
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1540
+ transports_version_send: [:rest]
1541
+
1542
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1543
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1544
+
1545
+ options.apply_defaults timeout: @config.rpcs.update_context.timeout,
1546
+ metadata: call_metadata,
1547
+ retry_policy: @config.rpcs.update_context.retry_policy
1548
+
1549
+ options.apply_defaults timeout: @config.timeout,
1550
+ metadata: @config.metadata,
1551
+ retry_policy: @config.retry_policy
1552
+
1553
+ @metadata_service_stub.update_context request, options do |result, operation|
1554
+ yield result, operation if block_given?
1555
+ return result
1556
+ end
1557
+ rescue ::Gapic::Rest::Error => e
1558
+ raise ::Google::Cloud::Error.from_error(e)
1559
+ end
1560
+
1561
+ ##
1562
+ # Deletes a stored Context.
1563
+ #
1564
+ # @overload delete_context(request, options = nil)
1565
+ # Pass arguments to `delete_context` via a request object, either of type
1566
+ # {::Google::Cloud::AIPlatform::V1::DeleteContextRequest} or an equivalent Hash.
1567
+ #
1568
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteContextRequest, ::Hash]
1569
+ # A request object representing the call parameters. Required. To specify no
1570
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1571
+ # @param options [::Gapic::CallOptions, ::Hash]
1572
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1573
+ #
1574
+ # @overload delete_context(name: nil, force: nil, etag: nil)
1575
+ # Pass arguments to `delete_context` via keyword arguments. Note that at
1576
+ # least one keyword argument is required. To specify no parameters, or to keep all
1577
+ # the default parameter values, pass an empty Hash as a request object (see above).
1578
+ #
1579
+ # @param name [::String]
1580
+ # Required. The resource name of the Context to delete.
1581
+ # Format:
1582
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
1583
+ # @param force [::Boolean]
1584
+ # The force deletion semantics is still undefined.
1585
+ # Users should not use this field.
1586
+ # @param etag [::String]
1587
+ # Optional. The etag of the Context to delete.
1588
+ # If this is provided, it must match the server's etag. Otherwise, the
1589
+ # request will fail with a FAILED_PRECONDITION.
1590
+ # @yield [result, operation] Access the result along with the TransportOperation object
1591
+ # @yieldparam result [::Gapic::Operation]
1592
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1593
+ #
1594
+ # @return [::Gapic::Operation]
1595
+ #
1596
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1597
+ #
1598
+ # @example Basic example
1599
+ # require "google/cloud/ai_platform/v1"
1600
+ #
1601
+ # # Create a client object. The client can be reused for multiple calls.
1602
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
1603
+ #
1604
+ # # Create a request. To set request fields, pass in keyword arguments.
1605
+ # request = Google::Cloud::AIPlatform::V1::DeleteContextRequest.new
1606
+ #
1607
+ # # Call the delete_context method.
1608
+ # result = client.delete_context request
1609
+ #
1610
+ # # The returned object is of type Gapic::Operation. You can use it to
1611
+ # # check the status of an operation, cancel it, or wait for results.
1612
+ # # Here is how to wait for a response.
1613
+ # result.wait_until_done! timeout: 60
1614
+ # if result.response?
1615
+ # p result.response
1616
+ # else
1617
+ # puts "No response received."
1618
+ # end
1619
+ #
1620
+ def delete_context request, options = nil
1621
+ raise ::ArgumentError, "request must be provided" if request.nil?
1622
+
1623
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteContextRequest
1624
+
1625
+ # Converts hash and nil to an options object
1626
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1627
+
1628
+ # Customize the options with defaults
1629
+ call_metadata = @config.rpcs.delete_context.metadata.to_h
1630
+
1631
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1632
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1633
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1634
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1635
+ transports_version_send: [:rest]
1636
+
1637
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1638
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1639
+
1640
+ options.apply_defaults timeout: @config.rpcs.delete_context.timeout,
1641
+ metadata: call_metadata,
1642
+ retry_policy: @config.rpcs.delete_context.retry_policy
1643
+
1644
+ options.apply_defaults timeout: @config.timeout,
1645
+ metadata: @config.metadata,
1646
+ retry_policy: @config.retry_policy
1647
+
1648
+ @metadata_service_stub.delete_context request, options do |result, operation|
1649
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1650
+ yield result, operation if block_given?
1651
+ return result
1652
+ end
1653
+ rescue ::Gapic::Rest::Error => e
1654
+ raise ::Google::Cloud::Error.from_error(e)
1655
+ end
1656
+
1657
+ ##
1658
+ # Purges Contexts.
1659
+ #
1660
+ # @overload purge_contexts(request, options = nil)
1661
+ # Pass arguments to `purge_contexts` via a request object, either of type
1662
+ # {::Google::Cloud::AIPlatform::V1::PurgeContextsRequest} or an equivalent Hash.
1663
+ #
1664
+ # @param request [::Google::Cloud::AIPlatform::V1::PurgeContextsRequest, ::Hash]
1665
+ # A request object representing the call parameters. Required. To specify no
1666
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1667
+ # @param options [::Gapic::CallOptions, ::Hash]
1668
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1669
+ #
1670
+ # @overload purge_contexts(parent: nil, filter: nil, force: nil)
1671
+ # Pass arguments to `purge_contexts` via keyword arguments. Note that at
1672
+ # least one keyword argument is required. To specify no parameters, or to keep all
1673
+ # the default parameter values, pass an empty Hash as a request object (see above).
1674
+ #
1675
+ # @param parent [::String]
1676
+ # Required. The metadata store to purge Contexts from.
1677
+ # Format:
1678
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
1679
+ # @param filter [::String]
1680
+ # Required. A required filter matching the Contexts to be purged.
1681
+ # E.g., `update_time <= 2020-11-19T11:30:00-04:00`.
1682
+ # @param force [::Boolean]
1683
+ # Optional. Flag to indicate to actually perform the purge.
1684
+ # If `force` is set to false, the method will return a sample of
1685
+ # Context names that would be deleted.
1686
+ # @yield [result, operation] Access the result along with the TransportOperation object
1687
+ # @yieldparam result [::Gapic::Operation]
1688
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1689
+ #
1690
+ # @return [::Gapic::Operation]
1691
+ #
1692
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1693
+ #
1694
+ # @example Basic example
1695
+ # require "google/cloud/ai_platform/v1"
1696
+ #
1697
+ # # Create a client object. The client can be reused for multiple calls.
1698
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
1699
+ #
1700
+ # # Create a request. To set request fields, pass in keyword arguments.
1701
+ # request = Google::Cloud::AIPlatform::V1::PurgeContextsRequest.new
1702
+ #
1703
+ # # Call the purge_contexts method.
1704
+ # result = client.purge_contexts request
1705
+ #
1706
+ # # The returned object is of type Gapic::Operation. You can use it to
1707
+ # # check the status of an operation, cancel it, or wait for results.
1708
+ # # Here is how to wait for a response.
1709
+ # result.wait_until_done! timeout: 60
1710
+ # if result.response?
1711
+ # p result.response
1712
+ # else
1713
+ # puts "No response received."
1714
+ # end
1715
+ #
1716
+ def purge_contexts request, options = nil
1717
+ raise ::ArgumentError, "request must be provided" if request.nil?
1718
+
1719
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::PurgeContextsRequest
1720
+
1721
+ # Converts hash and nil to an options object
1722
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1723
+
1724
+ # Customize the options with defaults
1725
+ call_metadata = @config.rpcs.purge_contexts.metadata.to_h
1726
+
1727
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1728
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1729
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1730
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1731
+ transports_version_send: [:rest]
1732
+
1733
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1734
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1735
+
1736
+ options.apply_defaults timeout: @config.rpcs.purge_contexts.timeout,
1737
+ metadata: call_metadata,
1738
+ retry_policy: @config.rpcs.purge_contexts.retry_policy
1739
+
1740
+ options.apply_defaults timeout: @config.timeout,
1741
+ metadata: @config.metadata,
1742
+ retry_policy: @config.retry_policy
1743
+
1744
+ @metadata_service_stub.purge_contexts request, options do |result, operation|
1745
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1746
+ yield result, operation if block_given?
1747
+ return result
1748
+ end
1749
+ rescue ::Gapic::Rest::Error => e
1750
+ raise ::Google::Cloud::Error.from_error(e)
1751
+ end
1752
+
1753
+ ##
1754
+ # Adds a set of Artifacts and Executions to a Context. If any of the
1755
+ # Artifacts or Executions have already been added to a Context, they are
1756
+ # simply skipped.
1757
+ #
1758
+ # @overload add_context_artifacts_and_executions(request, options = nil)
1759
+ # Pass arguments to `add_context_artifacts_and_executions` via a request object, either of type
1760
+ # {::Google::Cloud::AIPlatform::V1::AddContextArtifactsAndExecutionsRequest} or an equivalent Hash.
1761
+ #
1762
+ # @param request [::Google::Cloud::AIPlatform::V1::AddContextArtifactsAndExecutionsRequest, ::Hash]
1763
+ # A request object representing the call parameters. Required. To specify no
1764
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1765
+ # @param options [::Gapic::CallOptions, ::Hash]
1766
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1767
+ #
1768
+ # @overload add_context_artifacts_and_executions(context: nil, artifacts: nil, executions: nil)
1769
+ # Pass arguments to `add_context_artifacts_and_executions` via keyword arguments. Note that at
1770
+ # least one keyword argument is required. To specify no parameters, or to keep all
1771
+ # the default parameter values, pass an empty Hash as a request object (see above).
1772
+ #
1773
+ # @param context [::String]
1774
+ # Required. The resource name of the Context that the Artifacts and
1775
+ # Executions belong to. Format:
1776
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
1777
+ # @param artifacts [::Array<::String>]
1778
+ # The resource names of the Artifacts to attribute to the Context.
1779
+ #
1780
+ # Format:
1781
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
1782
+ # @param executions [::Array<::String>]
1783
+ # The resource names of the Executions to associate with the
1784
+ # Context.
1785
+ #
1786
+ # Format:
1787
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
1788
+ # @yield [result, operation] Access the result along with the TransportOperation object
1789
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::AddContextArtifactsAndExecutionsResponse]
1790
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1791
+ #
1792
+ # @return [::Google::Cloud::AIPlatform::V1::AddContextArtifactsAndExecutionsResponse]
1793
+ #
1794
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1795
+ #
1796
+ # @example Basic example
1797
+ # require "google/cloud/ai_platform/v1"
1798
+ #
1799
+ # # Create a client object. The client can be reused for multiple calls.
1800
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
1801
+ #
1802
+ # # Create a request. To set request fields, pass in keyword arguments.
1803
+ # request = Google::Cloud::AIPlatform::V1::AddContextArtifactsAndExecutionsRequest.new
1804
+ #
1805
+ # # Call the add_context_artifacts_and_executions method.
1806
+ # result = client.add_context_artifacts_and_executions request
1807
+ #
1808
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::AddContextArtifactsAndExecutionsResponse.
1809
+ # p result
1810
+ #
1811
+ def add_context_artifacts_and_executions request, options = nil
1812
+ raise ::ArgumentError, "request must be provided" if request.nil?
1813
+
1814
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::AddContextArtifactsAndExecutionsRequest
1815
+
1816
+ # Converts hash and nil to an options object
1817
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1818
+
1819
+ # Customize the options with defaults
1820
+ call_metadata = @config.rpcs.add_context_artifacts_and_executions.metadata.to_h
1821
+
1822
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1823
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1824
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1825
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1826
+ transports_version_send: [:rest]
1827
+
1828
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1829
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1830
+
1831
+ options.apply_defaults timeout: @config.rpcs.add_context_artifacts_and_executions.timeout,
1832
+ metadata: call_metadata,
1833
+ retry_policy: @config.rpcs.add_context_artifacts_and_executions.retry_policy
1834
+
1835
+ options.apply_defaults timeout: @config.timeout,
1836
+ metadata: @config.metadata,
1837
+ retry_policy: @config.retry_policy
1838
+
1839
+ @metadata_service_stub.add_context_artifacts_and_executions request, options do |result, operation|
1840
+ yield result, operation if block_given?
1841
+ return result
1842
+ end
1843
+ rescue ::Gapic::Rest::Error => e
1844
+ raise ::Google::Cloud::Error.from_error(e)
1845
+ end
1846
+
1847
+ ##
1848
+ # Adds a set of Contexts as children to a parent Context. If any of the
1849
+ # child Contexts have already been added to the parent Context, they are
1850
+ # simply skipped. If this call would create a cycle or cause any Context to
1851
+ # have more than 10 parents, the request will fail with an INVALID_ARGUMENT
1852
+ # error.
1853
+ #
1854
+ # @overload add_context_children(request, options = nil)
1855
+ # Pass arguments to `add_context_children` via a request object, either of type
1856
+ # {::Google::Cloud::AIPlatform::V1::AddContextChildrenRequest} or an equivalent Hash.
1857
+ #
1858
+ # @param request [::Google::Cloud::AIPlatform::V1::AddContextChildrenRequest, ::Hash]
1859
+ # A request object representing the call parameters. Required. To specify no
1860
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1861
+ # @param options [::Gapic::CallOptions, ::Hash]
1862
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1863
+ #
1864
+ # @overload add_context_children(context: nil, child_contexts: nil)
1865
+ # Pass arguments to `add_context_children` via keyword arguments. Note that at
1866
+ # least one keyword argument is required. To specify no parameters, or to keep all
1867
+ # the default parameter values, pass an empty Hash as a request object (see above).
1868
+ #
1869
+ # @param context [::String]
1870
+ # Required. The resource name of the parent Context.
1871
+ #
1872
+ # Format:
1873
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
1874
+ # @param child_contexts [::Array<::String>]
1875
+ # The resource names of the child Contexts.
1876
+ # @yield [result, operation] Access the result along with the TransportOperation object
1877
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::AddContextChildrenResponse]
1878
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1879
+ #
1880
+ # @return [::Google::Cloud::AIPlatform::V1::AddContextChildrenResponse]
1881
+ #
1882
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1883
+ #
1884
+ # @example Basic example
1885
+ # require "google/cloud/ai_platform/v1"
1886
+ #
1887
+ # # Create a client object. The client can be reused for multiple calls.
1888
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
1889
+ #
1890
+ # # Create a request. To set request fields, pass in keyword arguments.
1891
+ # request = Google::Cloud::AIPlatform::V1::AddContextChildrenRequest.new
1892
+ #
1893
+ # # Call the add_context_children method.
1894
+ # result = client.add_context_children request
1895
+ #
1896
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::AddContextChildrenResponse.
1897
+ # p result
1898
+ #
1899
+ def add_context_children request, options = nil
1900
+ raise ::ArgumentError, "request must be provided" if request.nil?
1901
+
1902
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::AddContextChildrenRequest
1903
+
1904
+ # Converts hash and nil to an options object
1905
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1906
+
1907
+ # Customize the options with defaults
1908
+ call_metadata = @config.rpcs.add_context_children.metadata.to_h
1909
+
1910
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1911
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1912
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1913
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1914
+ transports_version_send: [:rest]
1915
+
1916
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1917
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1918
+
1919
+ options.apply_defaults timeout: @config.rpcs.add_context_children.timeout,
1920
+ metadata: call_metadata,
1921
+ retry_policy: @config.rpcs.add_context_children.retry_policy
1922
+
1923
+ options.apply_defaults timeout: @config.timeout,
1924
+ metadata: @config.metadata,
1925
+ retry_policy: @config.retry_policy
1926
+
1927
+ @metadata_service_stub.add_context_children request, options do |result, operation|
1928
+ yield result, operation if block_given?
1929
+ return result
1930
+ end
1931
+ rescue ::Gapic::Rest::Error => e
1932
+ raise ::Google::Cloud::Error.from_error(e)
1933
+ end
1934
+
1935
+ ##
1936
+ # Remove a set of children contexts from a parent Context. If any of the
1937
+ # child Contexts were NOT added to the parent Context, they are
1938
+ # simply skipped.
1939
+ #
1940
+ # @overload remove_context_children(request, options = nil)
1941
+ # Pass arguments to `remove_context_children` via a request object, either of type
1942
+ # {::Google::Cloud::AIPlatform::V1::RemoveContextChildrenRequest} or an equivalent Hash.
1943
+ #
1944
+ # @param request [::Google::Cloud::AIPlatform::V1::RemoveContextChildrenRequest, ::Hash]
1945
+ # A request object representing the call parameters. Required. To specify no
1946
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1947
+ # @param options [::Gapic::CallOptions, ::Hash]
1948
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1949
+ #
1950
+ # @overload remove_context_children(context: nil, child_contexts: nil)
1951
+ # Pass arguments to `remove_context_children` via keyword arguments. Note that at
1952
+ # least one keyword argument is required. To specify no parameters, or to keep all
1953
+ # the default parameter values, pass an empty Hash as a request object (see above).
1954
+ #
1955
+ # @param context [::String]
1956
+ # Required. The resource name of the parent Context.
1957
+ #
1958
+ # Format:
1959
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
1960
+ # @param child_contexts [::Array<::String>]
1961
+ # The resource names of the child Contexts.
1962
+ # @yield [result, operation] Access the result along with the TransportOperation object
1963
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::RemoveContextChildrenResponse]
1964
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1965
+ #
1966
+ # @return [::Google::Cloud::AIPlatform::V1::RemoveContextChildrenResponse]
1967
+ #
1968
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1969
+ #
1970
+ # @example Basic example
1971
+ # require "google/cloud/ai_platform/v1"
1972
+ #
1973
+ # # Create a client object. The client can be reused for multiple calls.
1974
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
1975
+ #
1976
+ # # Create a request. To set request fields, pass in keyword arguments.
1977
+ # request = Google::Cloud::AIPlatform::V1::RemoveContextChildrenRequest.new
1978
+ #
1979
+ # # Call the remove_context_children method.
1980
+ # result = client.remove_context_children request
1981
+ #
1982
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::RemoveContextChildrenResponse.
1983
+ # p result
1984
+ #
1985
+ def remove_context_children request, options = nil
1986
+ raise ::ArgumentError, "request must be provided" if request.nil?
1987
+
1988
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::RemoveContextChildrenRequest
1989
+
1990
+ # Converts hash and nil to an options object
1991
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1992
+
1993
+ # Customize the options with defaults
1994
+ call_metadata = @config.rpcs.remove_context_children.metadata.to_h
1995
+
1996
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1997
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1998
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1999
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
2000
+ transports_version_send: [:rest]
2001
+
2002
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2003
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2004
+
2005
+ options.apply_defaults timeout: @config.rpcs.remove_context_children.timeout,
2006
+ metadata: call_metadata,
2007
+ retry_policy: @config.rpcs.remove_context_children.retry_policy
2008
+
2009
+ options.apply_defaults timeout: @config.timeout,
2010
+ metadata: @config.metadata,
2011
+ retry_policy: @config.retry_policy
2012
+
2013
+ @metadata_service_stub.remove_context_children request, options do |result, operation|
2014
+ yield result, operation if block_given?
2015
+ return result
2016
+ end
2017
+ rescue ::Gapic::Rest::Error => e
2018
+ raise ::Google::Cloud::Error.from_error(e)
2019
+ end
2020
+
2021
+ ##
2022
+ # Retrieves Artifacts and Executions within the specified Context, connected
2023
+ # by Event edges and returned as a LineageSubgraph.
2024
+ #
2025
+ # @overload query_context_lineage_subgraph(request, options = nil)
2026
+ # Pass arguments to `query_context_lineage_subgraph` via a request object, either of type
2027
+ # {::Google::Cloud::AIPlatform::V1::QueryContextLineageSubgraphRequest} or an equivalent Hash.
2028
+ #
2029
+ # @param request [::Google::Cloud::AIPlatform::V1::QueryContextLineageSubgraphRequest, ::Hash]
2030
+ # A request object representing the call parameters. Required. To specify no
2031
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2032
+ # @param options [::Gapic::CallOptions, ::Hash]
2033
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2034
+ #
2035
+ # @overload query_context_lineage_subgraph(context: nil)
2036
+ # Pass arguments to `query_context_lineage_subgraph` via keyword arguments. Note that at
2037
+ # least one keyword argument is required. To specify no parameters, or to keep all
2038
+ # the default parameter values, pass an empty Hash as a request object (see above).
2039
+ #
2040
+ # @param context [::String]
2041
+ # Required. The resource name of the Context whose Artifacts and Executions
2042
+ # should be retrieved as a LineageSubgraph.
2043
+ # Format:
2044
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
2045
+ #
2046
+ # The request may error with FAILED_PRECONDITION if the number of Artifacts,
2047
+ # the number of Executions, or the number of Events that would be returned
2048
+ # for the Context exceeds 1000.
2049
+ # @yield [result, operation] Access the result along with the TransportOperation object
2050
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::LineageSubgraph]
2051
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2052
+ #
2053
+ # @return [::Google::Cloud::AIPlatform::V1::LineageSubgraph]
2054
+ #
2055
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2056
+ #
2057
+ # @example Basic example
2058
+ # require "google/cloud/ai_platform/v1"
2059
+ #
2060
+ # # Create a client object. The client can be reused for multiple calls.
2061
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
2062
+ #
2063
+ # # Create a request. To set request fields, pass in keyword arguments.
2064
+ # request = Google::Cloud::AIPlatform::V1::QueryContextLineageSubgraphRequest.new
2065
+ #
2066
+ # # Call the query_context_lineage_subgraph method.
2067
+ # result = client.query_context_lineage_subgraph request
2068
+ #
2069
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::LineageSubgraph.
2070
+ # p result
2071
+ #
2072
+ def query_context_lineage_subgraph request, options = nil
2073
+ raise ::ArgumentError, "request must be provided" if request.nil?
2074
+
2075
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::QueryContextLineageSubgraphRequest
2076
+
2077
+ # Converts hash and nil to an options object
2078
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2079
+
2080
+ # Customize the options with defaults
2081
+ call_metadata = @config.rpcs.query_context_lineage_subgraph.metadata.to_h
2082
+
2083
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2084
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2085
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2086
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
2087
+ transports_version_send: [:rest]
2088
+
2089
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2090
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2091
+
2092
+ options.apply_defaults timeout: @config.rpcs.query_context_lineage_subgraph.timeout,
2093
+ metadata: call_metadata,
2094
+ retry_policy: @config.rpcs.query_context_lineage_subgraph.retry_policy
2095
+
2096
+ options.apply_defaults timeout: @config.timeout,
2097
+ metadata: @config.metadata,
2098
+ retry_policy: @config.retry_policy
2099
+
2100
+ @metadata_service_stub.query_context_lineage_subgraph request, options do |result, operation|
2101
+ yield result, operation if block_given?
2102
+ return result
2103
+ end
2104
+ rescue ::Gapic::Rest::Error => e
2105
+ raise ::Google::Cloud::Error.from_error(e)
2106
+ end
2107
+
2108
+ ##
2109
+ # Creates an Execution associated with a MetadataStore.
2110
+ #
2111
+ # @overload create_execution(request, options = nil)
2112
+ # Pass arguments to `create_execution` via a request object, either of type
2113
+ # {::Google::Cloud::AIPlatform::V1::CreateExecutionRequest} or an equivalent Hash.
2114
+ #
2115
+ # @param request [::Google::Cloud::AIPlatform::V1::CreateExecutionRequest, ::Hash]
2116
+ # A request object representing the call parameters. Required. To specify no
2117
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2118
+ # @param options [::Gapic::CallOptions, ::Hash]
2119
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2120
+ #
2121
+ # @overload create_execution(parent: nil, execution: nil, execution_id: nil)
2122
+ # Pass arguments to `create_execution` via keyword arguments. Note that at
2123
+ # least one keyword argument is required. To specify no parameters, or to keep all
2124
+ # the default parameter values, pass an empty Hash as a request object (see above).
2125
+ #
2126
+ # @param parent [::String]
2127
+ # Required. The resource name of the MetadataStore where the Execution should
2128
+ # be created.
2129
+ # Format:
2130
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
2131
+ # @param execution [::Google::Cloud::AIPlatform::V1::Execution, ::Hash]
2132
+ # Required. The Execution to create.
2133
+ # @param execution_id [::String]
2134
+ # The \\{execution} portion of the resource name with the format:
2135
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
2136
+ # If not provided, the Execution's ID will be a UUID generated by the
2137
+ # service.
2138
+ # Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
2139
+ # Must be unique across all Executions in the parent MetadataStore.
2140
+ # (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED
2141
+ # if the caller can't view the preexisting Execution.)
2142
+ # @yield [result, operation] Access the result along with the TransportOperation object
2143
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::Execution]
2144
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2145
+ #
2146
+ # @return [::Google::Cloud::AIPlatform::V1::Execution]
2147
+ #
2148
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2149
+ #
2150
+ # @example Basic example
2151
+ # require "google/cloud/ai_platform/v1"
2152
+ #
2153
+ # # Create a client object. The client can be reused for multiple calls.
2154
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
2155
+ #
2156
+ # # Create a request. To set request fields, pass in keyword arguments.
2157
+ # request = Google::Cloud::AIPlatform::V1::CreateExecutionRequest.new
2158
+ #
2159
+ # # Call the create_execution method.
2160
+ # result = client.create_execution request
2161
+ #
2162
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::Execution.
2163
+ # p result
2164
+ #
2165
+ def create_execution request, options = nil
2166
+ raise ::ArgumentError, "request must be provided" if request.nil?
2167
+
2168
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateExecutionRequest
2169
+
2170
+ # Converts hash and nil to an options object
2171
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2172
+
2173
+ # Customize the options with defaults
2174
+ call_metadata = @config.rpcs.create_execution.metadata.to_h
2175
+
2176
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2177
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2178
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2179
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
2180
+ transports_version_send: [:rest]
2181
+
2182
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2183
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2184
+
2185
+ options.apply_defaults timeout: @config.rpcs.create_execution.timeout,
2186
+ metadata: call_metadata,
2187
+ retry_policy: @config.rpcs.create_execution.retry_policy
2188
+
2189
+ options.apply_defaults timeout: @config.timeout,
2190
+ metadata: @config.metadata,
2191
+ retry_policy: @config.retry_policy
2192
+
2193
+ @metadata_service_stub.create_execution request, options do |result, operation|
2194
+ yield result, operation if block_given?
2195
+ return result
2196
+ end
2197
+ rescue ::Gapic::Rest::Error => e
2198
+ raise ::Google::Cloud::Error.from_error(e)
2199
+ end
2200
+
2201
+ ##
2202
+ # Retrieves a specific Execution.
2203
+ #
2204
+ # @overload get_execution(request, options = nil)
2205
+ # Pass arguments to `get_execution` via a request object, either of type
2206
+ # {::Google::Cloud::AIPlatform::V1::GetExecutionRequest} or an equivalent Hash.
2207
+ #
2208
+ # @param request [::Google::Cloud::AIPlatform::V1::GetExecutionRequest, ::Hash]
2209
+ # A request object representing the call parameters. Required. To specify no
2210
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2211
+ # @param options [::Gapic::CallOptions, ::Hash]
2212
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2213
+ #
2214
+ # @overload get_execution(name: nil)
2215
+ # Pass arguments to `get_execution` via keyword arguments. Note that at
2216
+ # least one keyword argument is required. To specify no parameters, or to keep all
2217
+ # the default parameter values, pass an empty Hash as a request object (see above).
2218
+ #
2219
+ # @param name [::String]
2220
+ # Required. The resource name of the Execution to retrieve.
2221
+ # Format:
2222
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
2223
+ # @yield [result, operation] Access the result along with the TransportOperation object
2224
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::Execution]
2225
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2226
+ #
2227
+ # @return [::Google::Cloud::AIPlatform::V1::Execution]
2228
+ #
2229
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2230
+ #
2231
+ # @example Basic example
2232
+ # require "google/cloud/ai_platform/v1"
2233
+ #
2234
+ # # Create a client object. The client can be reused for multiple calls.
2235
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
2236
+ #
2237
+ # # Create a request. To set request fields, pass in keyword arguments.
2238
+ # request = Google::Cloud::AIPlatform::V1::GetExecutionRequest.new
2239
+ #
2240
+ # # Call the get_execution method.
2241
+ # result = client.get_execution request
2242
+ #
2243
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::Execution.
2244
+ # p result
2245
+ #
2246
+ def get_execution request, options = nil
2247
+ raise ::ArgumentError, "request must be provided" if request.nil?
2248
+
2249
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetExecutionRequest
2250
+
2251
+ # Converts hash and nil to an options object
2252
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2253
+
2254
+ # Customize the options with defaults
2255
+ call_metadata = @config.rpcs.get_execution.metadata.to_h
2256
+
2257
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2258
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2259
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2260
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
2261
+ transports_version_send: [:rest]
2262
+
2263
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2264
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2265
+
2266
+ options.apply_defaults timeout: @config.rpcs.get_execution.timeout,
2267
+ metadata: call_metadata,
2268
+ retry_policy: @config.rpcs.get_execution.retry_policy
2269
+
2270
+ options.apply_defaults timeout: @config.timeout,
2271
+ metadata: @config.metadata,
2272
+ retry_policy: @config.retry_policy
2273
+
2274
+ @metadata_service_stub.get_execution request, options do |result, operation|
2275
+ yield result, operation if block_given?
2276
+ return result
2277
+ end
2278
+ rescue ::Gapic::Rest::Error => e
2279
+ raise ::Google::Cloud::Error.from_error(e)
2280
+ end
2281
+
2282
+ ##
2283
+ # Lists Executions in the MetadataStore.
2284
+ #
2285
+ # @overload list_executions(request, options = nil)
2286
+ # Pass arguments to `list_executions` via a request object, either of type
2287
+ # {::Google::Cloud::AIPlatform::V1::ListExecutionsRequest} or an equivalent Hash.
2288
+ #
2289
+ # @param request [::Google::Cloud::AIPlatform::V1::ListExecutionsRequest, ::Hash]
2290
+ # A request object representing the call parameters. Required. To specify no
2291
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2292
+ # @param options [::Gapic::CallOptions, ::Hash]
2293
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2294
+ #
2295
+ # @overload list_executions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2296
+ # Pass arguments to `list_executions` via keyword arguments. Note that at
2297
+ # least one keyword argument is required. To specify no parameters, or to keep all
2298
+ # the default parameter values, pass an empty Hash as a request object (see above).
2299
+ #
2300
+ # @param parent [::String]
2301
+ # Required. The MetadataStore whose Executions should be listed.
2302
+ # Format:
2303
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
2304
+ # @param page_size [::Integer]
2305
+ # The maximum number of Executions to return. The service may return fewer.
2306
+ # Must be in range 1-1000, inclusive. Defaults to 100.
2307
+ # @param page_token [::String]
2308
+ # A page token, received from a previous
2309
+ # {::Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client#list_executions MetadataService.ListExecutions}
2310
+ # call. Provide this to retrieve the subsequent page.
2311
+ #
2312
+ # When paginating, all other provided parameters must match the call that
2313
+ # provided the page token. (Otherwise the request will fail with an
2314
+ # INVALID_ARGUMENT error.)
2315
+ # @param filter [::String]
2316
+ # Filter specifying the boolean condition for the Executions to satisfy in
2317
+ # order to be part of the result set.
2318
+ # The syntax to define filter query is based on https://google.aip.dev/160.
2319
+ # Following are the supported set of filters:
2320
+ #
2321
+ # * **Attribute filtering**:
2322
+ # For example: `display_name = "test"`.
2323
+ # Supported fields include: `name`, `display_name`, `state`,
2324
+ # `schema_title`, `create_time`, and `update_time`.
2325
+ # Time fields, such as `create_time` and `update_time`, require values
2326
+ # specified in RFC-3339 format.
2327
+ # For example: `create_time = "2020-11-19T11:30:00-04:00"`.
2328
+ # * **Metadata field**:
2329
+ # To filter on metadata fields use traversal operation as follows:
2330
+ # `metadata.<field_name>.<type_value>`
2331
+ # For example: `metadata.field_1.number_value = 10.0`
2332
+ # In case the field name contains special characters (such as colon), one
2333
+ # can embed it inside double quote.
2334
+ # For example: `metadata."field:1".number_value = 10.0`
2335
+ # * **Context based filtering**:
2336
+ # To filter Executions based on the contexts to which they belong use
2337
+ # the function operator with the full resource name:
2338
+ # `in_context(<context-name>)`.
2339
+ # For example:
2340
+ # `in_context("projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context-id>")`
2341
+ #
2342
+ # Each of the above supported filters can be combined together using
2343
+ # logical operators (`AND` & `OR`). Maximum nested expression depth allowed
2344
+ # is 5.
2345
+ #
2346
+ # For example: `display_name = "test" AND metadata.field1.bool_value = true`.
2347
+ # @param order_by [::String]
2348
+ # How the list of messages is ordered. Specify the values to order by and an
2349
+ # ordering operation. The default sorting order is ascending. To specify
2350
+ # descending order for a field, users append a " desc" suffix; for example:
2351
+ # "foo desc, bar".
2352
+ # Subfields are specified with a `.` character, such as foo.bar.
2353
+ # see https://google.aip.dev/132#ordering for more details.
2354
+ # @yield [result, operation] Access the result along with the TransportOperation object
2355
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Execution>]
2356
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2357
+ #
2358
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Execution>]
2359
+ #
2360
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2361
+ #
2362
+ # @example Basic example
2363
+ # require "google/cloud/ai_platform/v1"
2364
+ #
2365
+ # # Create a client object. The client can be reused for multiple calls.
2366
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
2367
+ #
2368
+ # # Create a request. To set request fields, pass in keyword arguments.
2369
+ # request = Google::Cloud::AIPlatform::V1::ListExecutionsRequest.new
2370
+ #
2371
+ # # Call the list_executions method.
2372
+ # result = client.list_executions request
2373
+ #
2374
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2375
+ # # over elements, and API calls will be issued to fetch pages as needed.
2376
+ # result.each do |item|
2377
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::Execution.
2378
+ # p item
2379
+ # end
2380
+ #
2381
+ def list_executions request, options = nil
2382
+ raise ::ArgumentError, "request must be provided" if request.nil?
2383
+
2384
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListExecutionsRequest
2385
+
2386
+ # Converts hash and nil to an options object
2387
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2388
+
2389
+ # Customize the options with defaults
2390
+ call_metadata = @config.rpcs.list_executions.metadata.to_h
2391
+
2392
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2393
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2394
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2395
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
2396
+ transports_version_send: [:rest]
2397
+
2398
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2399
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2400
+
2401
+ options.apply_defaults timeout: @config.rpcs.list_executions.timeout,
2402
+ metadata: call_metadata,
2403
+ retry_policy: @config.rpcs.list_executions.retry_policy
2404
+
2405
+ options.apply_defaults timeout: @config.timeout,
2406
+ metadata: @config.metadata,
2407
+ retry_policy: @config.retry_policy
2408
+
2409
+ @metadata_service_stub.list_executions request, options do |result, operation|
2410
+ result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_executions, "executions", request, result, options
2411
+ yield result, operation if block_given?
2412
+ return result
2413
+ end
2414
+ rescue ::Gapic::Rest::Error => e
2415
+ raise ::Google::Cloud::Error.from_error(e)
2416
+ end
2417
+
2418
+ ##
2419
+ # Updates a stored Execution.
2420
+ #
2421
+ # @overload update_execution(request, options = nil)
2422
+ # Pass arguments to `update_execution` via a request object, either of type
2423
+ # {::Google::Cloud::AIPlatform::V1::UpdateExecutionRequest} or an equivalent Hash.
2424
+ #
2425
+ # @param request [::Google::Cloud::AIPlatform::V1::UpdateExecutionRequest, ::Hash]
2426
+ # A request object representing the call parameters. Required. To specify no
2427
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2428
+ # @param options [::Gapic::CallOptions, ::Hash]
2429
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2430
+ #
2431
+ # @overload update_execution(execution: nil, update_mask: nil, allow_missing: nil)
2432
+ # Pass arguments to `update_execution` via keyword arguments. Note that at
2433
+ # least one keyword argument is required. To specify no parameters, or to keep all
2434
+ # the default parameter values, pass an empty Hash as a request object (see above).
2435
+ #
2436
+ # @param execution [::Google::Cloud::AIPlatform::V1::Execution, ::Hash]
2437
+ # Required. The Execution containing updates.
2438
+ # The Execution's {::Google::Cloud::AIPlatform::V1::Execution#name Execution.name}
2439
+ # field is used to identify the Execution to be updated. Format:
2440
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
2441
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2442
+ # Optional. A FieldMask indicating which fields should be updated.
2443
+ # @param allow_missing [::Boolean]
2444
+ # If set to true, and the {::Google::Cloud::AIPlatform::V1::Execution Execution}
2445
+ # is not found, a new {::Google::Cloud::AIPlatform::V1::Execution Execution} is
2446
+ # created.
2447
+ # @yield [result, operation] Access the result along with the TransportOperation object
2448
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::Execution]
2449
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2450
+ #
2451
+ # @return [::Google::Cloud::AIPlatform::V1::Execution]
2452
+ #
2453
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2454
+ #
2455
+ # @example Basic example
2456
+ # require "google/cloud/ai_platform/v1"
2457
+ #
2458
+ # # Create a client object. The client can be reused for multiple calls.
2459
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
2460
+ #
2461
+ # # Create a request. To set request fields, pass in keyword arguments.
2462
+ # request = Google::Cloud::AIPlatform::V1::UpdateExecutionRequest.new
2463
+ #
2464
+ # # Call the update_execution method.
2465
+ # result = client.update_execution request
2466
+ #
2467
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::Execution.
2468
+ # p result
2469
+ #
2470
+ def update_execution request, options = nil
2471
+ raise ::ArgumentError, "request must be provided" if request.nil?
2472
+
2473
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateExecutionRequest
2474
+
2475
+ # Converts hash and nil to an options object
2476
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2477
+
2478
+ # Customize the options with defaults
2479
+ call_metadata = @config.rpcs.update_execution.metadata.to_h
2480
+
2481
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2482
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2483
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2484
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
2485
+ transports_version_send: [:rest]
2486
+
2487
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2488
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2489
+
2490
+ options.apply_defaults timeout: @config.rpcs.update_execution.timeout,
2491
+ metadata: call_metadata,
2492
+ retry_policy: @config.rpcs.update_execution.retry_policy
2493
+
2494
+ options.apply_defaults timeout: @config.timeout,
2495
+ metadata: @config.metadata,
2496
+ retry_policy: @config.retry_policy
2497
+
2498
+ @metadata_service_stub.update_execution request, options do |result, operation|
2499
+ yield result, operation if block_given?
2500
+ return result
2501
+ end
2502
+ rescue ::Gapic::Rest::Error => e
2503
+ raise ::Google::Cloud::Error.from_error(e)
2504
+ end
2505
+
2506
+ ##
2507
+ # Deletes an Execution.
2508
+ #
2509
+ # @overload delete_execution(request, options = nil)
2510
+ # Pass arguments to `delete_execution` via a request object, either of type
2511
+ # {::Google::Cloud::AIPlatform::V1::DeleteExecutionRequest} or an equivalent Hash.
2512
+ #
2513
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteExecutionRequest, ::Hash]
2514
+ # A request object representing the call parameters. Required. To specify no
2515
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2516
+ # @param options [::Gapic::CallOptions, ::Hash]
2517
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2518
+ #
2519
+ # @overload delete_execution(name: nil, etag: nil)
2520
+ # Pass arguments to `delete_execution` via keyword arguments. Note that at
2521
+ # least one keyword argument is required. To specify no parameters, or to keep all
2522
+ # the default parameter values, pass an empty Hash as a request object (see above).
2523
+ #
2524
+ # @param name [::String]
2525
+ # Required. The resource name of the Execution to delete.
2526
+ # Format:
2527
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
2528
+ # @param etag [::String]
2529
+ # Optional. The etag of the Execution to delete.
2530
+ # If this is provided, it must match the server's etag. Otherwise, the
2531
+ # request will fail with a FAILED_PRECONDITION.
2532
+ # @yield [result, operation] Access the result along with the TransportOperation object
2533
+ # @yieldparam result [::Gapic::Operation]
2534
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2535
+ #
2536
+ # @return [::Gapic::Operation]
2537
+ #
2538
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2539
+ #
2540
+ # @example Basic example
2541
+ # require "google/cloud/ai_platform/v1"
2542
+ #
2543
+ # # Create a client object. The client can be reused for multiple calls.
2544
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
2545
+ #
2546
+ # # Create a request. To set request fields, pass in keyword arguments.
2547
+ # request = Google::Cloud::AIPlatform::V1::DeleteExecutionRequest.new
2548
+ #
2549
+ # # Call the delete_execution method.
2550
+ # result = client.delete_execution request
2551
+ #
2552
+ # # The returned object is of type Gapic::Operation. You can use it to
2553
+ # # check the status of an operation, cancel it, or wait for results.
2554
+ # # Here is how to wait for a response.
2555
+ # result.wait_until_done! timeout: 60
2556
+ # if result.response?
2557
+ # p result.response
2558
+ # else
2559
+ # puts "No response received."
2560
+ # end
2561
+ #
2562
+ def delete_execution request, options = nil
2563
+ raise ::ArgumentError, "request must be provided" if request.nil?
2564
+
2565
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteExecutionRequest
2566
+
2567
+ # Converts hash and nil to an options object
2568
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2569
+
2570
+ # Customize the options with defaults
2571
+ call_metadata = @config.rpcs.delete_execution.metadata.to_h
2572
+
2573
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2574
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2575
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2576
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
2577
+ transports_version_send: [:rest]
2578
+
2579
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2580
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2581
+
2582
+ options.apply_defaults timeout: @config.rpcs.delete_execution.timeout,
2583
+ metadata: call_metadata,
2584
+ retry_policy: @config.rpcs.delete_execution.retry_policy
2585
+
2586
+ options.apply_defaults timeout: @config.timeout,
2587
+ metadata: @config.metadata,
2588
+ retry_policy: @config.retry_policy
2589
+
2590
+ @metadata_service_stub.delete_execution request, options do |result, operation|
2591
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2592
+ yield result, operation if block_given?
2593
+ return result
2594
+ end
2595
+ rescue ::Gapic::Rest::Error => e
2596
+ raise ::Google::Cloud::Error.from_error(e)
2597
+ end
2598
+
2599
+ ##
2600
+ # Purges Executions.
2601
+ #
2602
+ # @overload purge_executions(request, options = nil)
2603
+ # Pass arguments to `purge_executions` via a request object, either of type
2604
+ # {::Google::Cloud::AIPlatform::V1::PurgeExecutionsRequest} or an equivalent Hash.
2605
+ #
2606
+ # @param request [::Google::Cloud::AIPlatform::V1::PurgeExecutionsRequest, ::Hash]
2607
+ # A request object representing the call parameters. Required. To specify no
2608
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2609
+ # @param options [::Gapic::CallOptions, ::Hash]
2610
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2611
+ #
2612
+ # @overload purge_executions(parent: nil, filter: nil, force: nil)
2613
+ # Pass arguments to `purge_executions` via keyword arguments. Note that at
2614
+ # least one keyword argument is required. To specify no parameters, or to keep all
2615
+ # the default parameter values, pass an empty Hash as a request object (see above).
2616
+ #
2617
+ # @param parent [::String]
2618
+ # Required. The metadata store to purge Executions from.
2619
+ # Format:
2620
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
2621
+ # @param filter [::String]
2622
+ # Required. A required filter matching the Executions to be purged.
2623
+ # E.g., `update_time <= 2020-11-19T11:30:00-04:00`.
2624
+ # @param force [::Boolean]
2625
+ # Optional. Flag to indicate to actually perform the purge.
2626
+ # If `force` is set to false, the method will return a sample of
2627
+ # Execution names that would be deleted.
2628
+ # @yield [result, operation] Access the result along with the TransportOperation object
2629
+ # @yieldparam result [::Gapic::Operation]
2630
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2631
+ #
2632
+ # @return [::Gapic::Operation]
2633
+ #
2634
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2635
+ #
2636
+ # @example Basic example
2637
+ # require "google/cloud/ai_platform/v1"
2638
+ #
2639
+ # # Create a client object. The client can be reused for multiple calls.
2640
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
2641
+ #
2642
+ # # Create a request. To set request fields, pass in keyword arguments.
2643
+ # request = Google::Cloud::AIPlatform::V1::PurgeExecutionsRequest.new
2644
+ #
2645
+ # # Call the purge_executions method.
2646
+ # result = client.purge_executions request
2647
+ #
2648
+ # # The returned object is of type Gapic::Operation. You can use it to
2649
+ # # check the status of an operation, cancel it, or wait for results.
2650
+ # # Here is how to wait for a response.
2651
+ # result.wait_until_done! timeout: 60
2652
+ # if result.response?
2653
+ # p result.response
2654
+ # else
2655
+ # puts "No response received."
2656
+ # end
2657
+ #
2658
+ def purge_executions request, options = nil
2659
+ raise ::ArgumentError, "request must be provided" if request.nil?
2660
+
2661
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::PurgeExecutionsRequest
2662
+
2663
+ # Converts hash and nil to an options object
2664
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2665
+
2666
+ # Customize the options with defaults
2667
+ call_metadata = @config.rpcs.purge_executions.metadata.to_h
2668
+
2669
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2670
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2671
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2672
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
2673
+ transports_version_send: [:rest]
2674
+
2675
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2676
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2677
+
2678
+ options.apply_defaults timeout: @config.rpcs.purge_executions.timeout,
2679
+ metadata: call_metadata,
2680
+ retry_policy: @config.rpcs.purge_executions.retry_policy
2681
+
2682
+ options.apply_defaults timeout: @config.timeout,
2683
+ metadata: @config.metadata,
2684
+ retry_policy: @config.retry_policy
2685
+
2686
+ @metadata_service_stub.purge_executions request, options do |result, operation|
2687
+ result = ::Gapic::Operation.new result, @operations_client, options: options
2688
+ yield result, operation if block_given?
2689
+ return result
2690
+ end
2691
+ rescue ::Gapic::Rest::Error => e
2692
+ raise ::Google::Cloud::Error.from_error(e)
2693
+ end
2694
+
2695
+ ##
2696
+ # Adds Events to the specified Execution. An Event indicates whether an
2697
+ # Artifact was used as an input or output for an Execution. If an Event
2698
+ # already exists between the Execution and the Artifact, the Event is
2699
+ # skipped.
2700
+ #
2701
+ # @overload add_execution_events(request, options = nil)
2702
+ # Pass arguments to `add_execution_events` via a request object, either of type
2703
+ # {::Google::Cloud::AIPlatform::V1::AddExecutionEventsRequest} or an equivalent Hash.
2704
+ #
2705
+ # @param request [::Google::Cloud::AIPlatform::V1::AddExecutionEventsRequest, ::Hash]
2706
+ # A request object representing the call parameters. Required. To specify no
2707
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2708
+ # @param options [::Gapic::CallOptions, ::Hash]
2709
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2710
+ #
2711
+ # @overload add_execution_events(execution: nil, events: nil)
2712
+ # Pass arguments to `add_execution_events` via keyword arguments. Note that at
2713
+ # least one keyword argument is required. To specify no parameters, or to keep all
2714
+ # the default parameter values, pass an empty Hash as a request object (see above).
2715
+ #
2716
+ # @param execution [::String]
2717
+ # Required. The resource name of the Execution that the Events connect
2718
+ # Artifacts with.
2719
+ # Format:
2720
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
2721
+ # @param events [::Array<::Google::Cloud::AIPlatform::V1::Event, ::Hash>]
2722
+ # The Events to create and add.
2723
+ # @yield [result, operation] Access the result along with the TransportOperation object
2724
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::AddExecutionEventsResponse]
2725
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2726
+ #
2727
+ # @return [::Google::Cloud::AIPlatform::V1::AddExecutionEventsResponse]
2728
+ #
2729
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2730
+ #
2731
+ # @example Basic example
2732
+ # require "google/cloud/ai_platform/v1"
2733
+ #
2734
+ # # Create a client object. The client can be reused for multiple calls.
2735
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
2736
+ #
2737
+ # # Create a request. To set request fields, pass in keyword arguments.
2738
+ # request = Google::Cloud::AIPlatform::V1::AddExecutionEventsRequest.new
2739
+ #
2740
+ # # Call the add_execution_events method.
2741
+ # result = client.add_execution_events request
2742
+ #
2743
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::AddExecutionEventsResponse.
2744
+ # p result
2745
+ #
2746
+ def add_execution_events request, options = nil
2747
+ raise ::ArgumentError, "request must be provided" if request.nil?
2748
+
2749
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::AddExecutionEventsRequest
2750
+
2751
+ # Converts hash and nil to an options object
2752
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2753
+
2754
+ # Customize the options with defaults
2755
+ call_metadata = @config.rpcs.add_execution_events.metadata.to_h
2756
+
2757
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2758
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2759
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2760
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
2761
+ transports_version_send: [:rest]
2762
+
2763
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2764
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2765
+
2766
+ options.apply_defaults timeout: @config.rpcs.add_execution_events.timeout,
2767
+ metadata: call_metadata,
2768
+ retry_policy: @config.rpcs.add_execution_events.retry_policy
2769
+
2770
+ options.apply_defaults timeout: @config.timeout,
2771
+ metadata: @config.metadata,
2772
+ retry_policy: @config.retry_policy
2773
+
2774
+ @metadata_service_stub.add_execution_events request, options do |result, operation|
2775
+ yield result, operation if block_given?
2776
+ return result
2777
+ end
2778
+ rescue ::Gapic::Rest::Error => e
2779
+ raise ::Google::Cloud::Error.from_error(e)
2780
+ end
2781
+
2782
+ ##
2783
+ # Obtains the set of input and output Artifacts for this Execution, in the
2784
+ # form of LineageSubgraph that also contains the Execution and connecting
2785
+ # Events.
2786
+ #
2787
+ # @overload query_execution_inputs_and_outputs(request, options = nil)
2788
+ # Pass arguments to `query_execution_inputs_and_outputs` via a request object, either of type
2789
+ # {::Google::Cloud::AIPlatform::V1::QueryExecutionInputsAndOutputsRequest} or an equivalent Hash.
2790
+ #
2791
+ # @param request [::Google::Cloud::AIPlatform::V1::QueryExecutionInputsAndOutputsRequest, ::Hash]
2792
+ # A request object representing the call parameters. Required. To specify no
2793
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2794
+ # @param options [::Gapic::CallOptions, ::Hash]
2795
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2796
+ #
2797
+ # @overload query_execution_inputs_and_outputs(execution: nil)
2798
+ # Pass arguments to `query_execution_inputs_and_outputs` via keyword arguments. Note that at
2799
+ # least one keyword argument is required. To specify no parameters, or to keep all
2800
+ # the default parameter values, pass an empty Hash as a request object (see above).
2801
+ #
2802
+ # @param execution [::String]
2803
+ # Required. The resource name of the Execution whose input and output
2804
+ # Artifacts should be retrieved as a LineageSubgraph. Format:
2805
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`
2806
+ # @yield [result, operation] Access the result along with the TransportOperation object
2807
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::LineageSubgraph]
2808
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2809
+ #
2810
+ # @return [::Google::Cloud::AIPlatform::V1::LineageSubgraph]
2811
+ #
2812
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2813
+ #
2814
+ # @example Basic example
2815
+ # require "google/cloud/ai_platform/v1"
2816
+ #
2817
+ # # Create a client object. The client can be reused for multiple calls.
2818
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
2819
+ #
2820
+ # # Create a request. To set request fields, pass in keyword arguments.
2821
+ # request = Google::Cloud::AIPlatform::V1::QueryExecutionInputsAndOutputsRequest.new
2822
+ #
2823
+ # # Call the query_execution_inputs_and_outputs method.
2824
+ # result = client.query_execution_inputs_and_outputs request
2825
+ #
2826
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::LineageSubgraph.
2827
+ # p result
2828
+ #
2829
+ def query_execution_inputs_and_outputs request, options = nil
2830
+ raise ::ArgumentError, "request must be provided" if request.nil?
2831
+
2832
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::QueryExecutionInputsAndOutputsRequest
2833
+
2834
+ # Converts hash and nil to an options object
2835
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2836
+
2837
+ # Customize the options with defaults
2838
+ call_metadata = @config.rpcs.query_execution_inputs_and_outputs.metadata.to_h
2839
+
2840
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2841
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2842
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2843
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
2844
+ transports_version_send: [:rest]
2845
+
2846
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2847
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2848
+
2849
+ options.apply_defaults timeout: @config.rpcs.query_execution_inputs_and_outputs.timeout,
2850
+ metadata: call_metadata,
2851
+ retry_policy: @config.rpcs.query_execution_inputs_and_outputs.retry_policy
2852
+
2853
+ options.apply_defaults timeout: @config.timeout,
2854
+ metadata: @config.metadata,
2855
+ retry_policy: @config.retry_policy
2856
+
2857
+ @metadata_service_stub.query_execution_inputs_and_outputs request, options do |result, operation|
2858
+ yield result, operation if block_given?
2859
+ return result
2860
+ end
2861
+ rescue ::Gapic::Rest::Error => e
2862
+ raise ::Google::Cloud::Error.from_error(e)
2863
+ end
2864
+
2865
+ ##
2866
+ # Creates a MetadataSchema.
2867
+ #
2868
+ # @overload create_metadata_schema(request, options = nil)
2869
+ # Pass arguments to `create_metadata_schema` via a request object, either of type
2870
+ # {::Google::Cloud::AIPlatform::V1::CreateMetadataSchemaRequest} or an equivalent Hash.
2871
+ #
2872
+ # @param request [::Google::Cloud::AIPlatform::V1::CreateMetadataSchemaRequest, ::Hash]
2873
+ # A request object representing the call parameters. Required. To specify no
2874
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2875
+ # @param options [::Gapic::CallOptions, ::Hash]
2876
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2877
+ #
2878
+ # @overload create_metadata_schema(parent: nil, metadata_schema: nil, metadata_schema_id: nil)
2879
+ # Pass arguments to `create_metadata_schema` via keyword arguments. Note that at
2880
+ # least one keyword argument is required. To specify no parameters, or to keep all
2881
+ # the default parameter values, pass an empty Hash as a request object (see above).
2882
+ #
2883
+ # @param parent [::String]
2884
+ # Required. The resource name of the MetadataStore where the MetadataSchema
2885
+ # should be created. Format:
2886
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
2887
+ # @param metadata_schema [::Google::Cloud::AIPlatform::V1::MetadataSchema, ::Hash]
2888
+ # Required. The MetadataSchema to create.
2889
+ # @param metadata_schema_id [::String]
2890
+ # The \\{metadata_schema} portion of the resource name with the format:
2891
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}`
2892
+ # If not provided, the MetadataStore's ID will be a UUID generated by the
2893
+ # service.
2894
+ # Must be 4-128 characters in length. Valid characters are `/[a-z][0-9]-/`.
2895
+ # Must be unique across all MetadataSchemas in the parent Location.
2896
+ # (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED
2897
+ # if the caller can't view the preexisting MetadataSchema.)
2898
+ # @yield [result, operation] Access the result along with the TransportOperation object
2899
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::MetadataSchema]
2900
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2901
+ #
2902
+ # @return [::Google::Cloud::AIPlatform::V1::MetadataSchema]
2903
+ #
2904
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2905
+ #
2906
+ # @example Basic example
2907
+ # require "google/cloud/ai_platform/v1"
2908
+ #
2909
+ # # Create a client object. The client can be reused for multiple calls.
2910
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
2911
+ #
2912
+ # # Create a request. To set request fields, pass in keyword arguments.
2913
+ # request = Google::Cloud::AIPlatform::V1::CreateMetadataSchemaRequest.new
2914
+ #
2915
+ # # Call the create_metadata_schema method.
2916
+ # result = client.create_metadata_schema request
2917
+ #
2918
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::MetadataSchema.
2919
+ # p result
2920
+ #
2921
+ def create_metadata_schema request, options = nil
2922
+ raise ::ArgumentError, "request must be provided" if request.nil?
2923
+
2924
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateMetadataSchemaRequest
2925
+
2926
+ # Converts hash and nil to an options object
2927
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2928
+
2929
+ # Customize the options with defaults
2930
+ call_metadata = @config.rpcs.create_metadata_schema.metadata.to_h
2931
+
2932
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2933
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2934
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2935
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
2936
+ transports_version_send: [:rest]
2937
+
2938
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2939
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2940
+
2941
+ options.apply_defaults timeout: @config.rpcs.create_metadata_schema.timeout,
2942
+ metadata: call_metadata,
2943
+ retry_policy: @config.rpcs.create_metadata_schema.retry_policy
2944
+
2945
+ options.apply_defaults timeout: @config.timeout,
2946
+ metadata: @config.metadata,
2947
+ retry_policy: @config.retry_policy
2948
+
2949
+ @metadata_service_stub.create_metadata_schema request, options do |result, operation|
2950
+ yield result, operation if block_given?
2951
+ return result
2952
+ end
2953
+ rescue ::Gapic::Rest::Error => e
2954
+ raise ::Google::Cloud::Error.from_error(e)
2955
+ end
2956
+
2957
+ ##
2958
+ # Retrieves a specific MetadataSchema.
2959
+ #
2960
+ # @overload get_metadata_schema(request, options = nil)
2961
+ # Pass arguments to `get_metadata_schema` via a request object, either of type
2962
+ # {::Google::Cloud::AIPlatform::V1::GetMetadataSchemaRequest} or an equivalent Hash.
2963
+ #
2964
+ # @param request [::Google::Cloud::AIPlatform::V1::GetMetadataSchemaRequest, ::Hash]
2965
+ # A request object representing the call parameters. Required. To specify no
2966
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2967
+ # @param options [::Gapic::CallOptions, ::Hash]
2968
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2969
+ #
2970
+ # @overload get_metadata_schema(name: nil)
2971
+ # Pass arguments to `get_metadata_schema` via keyword arguments. Note that at
2972
+ # least one keyword argument is required. To specify no parameters, or to keep all
2973
+ # the default parameter values, pass an empty Hash as a request object (see above).
2974
+ #
2975
+ # @param name [::String]
2976
+ # Required. The resource name of the MetadataSchema to retrieve.
2977
+ # Format:
2978
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}`
2979
+ # @yield [result, operation] Access the result along with the TransportOperation object
2980
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::MetadataSchema]
2981
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2982
+ #
2983
+ # @return [::Google::Cloud::AIPlatform::V1::MetadataSchema]
2984
+ #
2985
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2986
+ #
2987
+ # @example Basic example
2988
+ # require "google/cloud/ai_platform/v1"
2989
+ #
2990
+ # # Create a client object. The client can be reused for multiple calls.
2991
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
2992
+ #
2993
+ # # Create a request. To set request fields, pass in keyword arguments.
2994
+ # request = Google::Cloud::AIPlatform::V1::GetMetadataSchemaRequest.new
2995
+ #
2996
+ # # Call the get_metadata_schema method.
2997
+ # result = client.get_metadata_schema request
2998
+ #
2999
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::MetadataSchema.
3000
+ # p result
3001
+ #
3002
+ def get_metadata_schema request, options = nil
3003
+ raise ::ArgumentError, "request must be provided" if request.nil?
3004
+
3005
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetMetadataSchemaRequest
3006
+
3007
+ # Converts hash and nil to an options object
3008
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3009
+
3010
+ # Customize the options with defaults
3011
+ call_metadata = @config.rpcs.get_metadata_schema.metadata.to_h
3012
+
3013
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3014
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3015
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3016
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
3017
+ transports_version_send: [:rest]
3018
+
3019
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3020
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3021
+
3022
+ options.apply_defaults timeout: @config.rpcs.get_metadata_schema.timeout,
3023
+ metadata: call_metadata,
3024
+ retry_policy: @config.rpcs.get_metadata_schema.retry_policy
3025
+
3026
+ options.apply_defaults timeout: @config.timeout,
3027
+ metadata: @config.metadata,
3028
+ retry_policy: @config.retry_policy
3029
+
3030
+ @metadata_service_stub.get_metadata_schema request, options do |result, operation|
3031
+ yield result, operation if block_given?
3032
+ return result
3033
+ end
3034
+ rescue ::Gapic::Rest::Error => e
3035
+ raise ::Google::Cloud::Error.from_error(e)
3036
+ end
3037
+
3038
+ ##
3039
+ # Lists MetadataSchemas.
3040
+ #
3041
+ # @overload list_metadata_schemas(request, options = nil)
3042
+ # Pass arguments to `list_metadata_schemas` via a request object, either of type
3043
+ # {::Google::Cloud::AIPlatform::V1::ListMetadataSchemasRequest} or an equivalent Hash.
3044
+ #
3045
+ # @param request [::Google::Cloud::AIPlatform::V1::ListMetadataSchemasRequest, ::Hash]
3046
+ # A request object representing the call parameters. Required. To specify no
3047
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3048
+ # @param options [::Gapic::CallOptions, ::Hash]
3049
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3050
+ #
3051
+ # @overload list_metadata_schemas(parent: nil, page_size: nil, page_token: nil, filter: nil)
3052
+ # Pass arguments to `list_metadata_schemas` via keyword arguments. Note that at
3053
+ # least one keyword argument is required. To specify no parameters, or to keep all
3054
+ # the default parameter values, pass an empty Hash as a request object (see above).
3055
+ #
3056
+ # @param parent [::String]
3057
+ # Required. The MetadataStore whose MetadataSchemas should be listed.
3058
+ # Format:
3059
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}`
3060
+ # @param page_size [::Integer]
3061
+ # The maximum number of MetadataSchemas to return. The service may return
3062
+ # fewer.
3063
+ # Must be in range 1-1000, inclusive. Defaults to 100.
3064
+ # @param page_token [::String]
3065
+ # A page token, received from a previous
3066
+ # {::Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client#list_metadata_schemas MetadataService.ListMetadataSchemas}
3067
+ # call. Provide this to retrieve the next page.
3068
+ #
3069
+ # When paginating, all other provided parameters must match the call that
3070
+ # provided the page token. (Otherwise the request will fail with
3071
+ # INVALID_ARGUMENT error.)
3072
+ # @param filter [::String]
3073
+ # A query to filter available MetadataSchemas for matching results.
3074
+ # @yield [result, operation] Access the result along with the TransportOperation object
3075
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::MetadataSchema>]
3076
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3077
+ #
3078
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::MetadataSchema>]
3079
+ #
3080
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3081
+ #
3082
+ # @example Basic example
3083
+ # require "google/cloud/ai_platform/v1"
3084
+ #
3085
+ # # Create a client object. The client can be reused for multiple calls.
3086
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
3087
+ #
3088
+ # # Create a request. To set request fields, pass in keyword arguments.
3089
+ # request = Google::Cloud::AIPlatform::V1::ListMetadataSchemasRequest.new
3090
+ #
3091
+ # # Call the list_metadata_schemas method.
3092
+ # result = client.list_metadata_schemas request
3093
+ #
3094
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3095
+ # # over elements, and API calls will be issued to fetch pages as needed.
3096
+ # result.each do |item|
3097
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::MetadataSchema.
3098
+ # p item
3099
+ # end
3100
+ #
3101
+ def list_metadata_schemas request, options = nil
3102
+ raise ::ArgumentError, "request must be provided" if request.nil?
3103
+
3104
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListMetadataSchemasRequest
3105
+
3106
+ # Converts hash and nil to an options object
3107
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3108
+
3109
+ # Customize the options with defaults
3110
+ call_metadata = @config.rpcs.list_metadata_schemas.metadata.to_h
3111
+
3112
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3113
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3114
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3115
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
3116
+ transports_version_send: [:rest]
3117
+
3118
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3119
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3120
+
3121
+ options.apply_defaults timeout: @config.rpcs.list_metadata_schemas.timeout,
3122
+ metadata: call_metadata,
3123
+ retry_policy: @config.rpcs.list_metadata_schemas.retry_policy
3124
+
3125
+ options.apply_defaults timeout: @config.timeout,
3126
+ metadata: @config.metadata,
3127
+ retry_policy: @config.retry_policy
3128
+
3129
+ @metadata_service_stub.list_metadata_schemas request, options do |result, operation|
3130
+ result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_metadata_schemas, "metadata_schemas", request, result, options
3131
+ yield result, operation if block_given?
3132
+ return result
3133
+ end
3134
+ rescue ::Gapic::Rest::Error => e
3135
+ raise ::Google::Cloud::Error.from_error(e)
3136
+ end
3137
+
3138
+ ##
3139
+ # Retrieves lineage of an Artifact represented through Artifacts and
3140
+ # Executions connected by Event edges and returned as a LineageSubgraph.
3141
+ #
3142
+ # @overload query_artifact_lineage_subgraph(request, options = nil)
3143
+ # Pass arguments to `query_artifact_lineage_subgraph` via a request object, either of type
3144
+ # {::Google::Cloud::AIPlatform::V1::QueryArtifactLineageSubgraphRequest} or an equivalent Hash.
3145
+ #
3146
+ # @param request [::Google::Cloud::AIPlatform::V1::QueryArtifactLineageSubgraphRequest, ::Hash]
3147
+ # A request object representing the call parameters. Required. To specify no
3148
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3149
+ # @param options [::Gapic::CallOptions, ::Hash]
3150
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3151
+ #
3152
+ # @overload query_artifact_lineage_subgraph(artifact: nil, max_hops: nil, filter: nil)
3153
+ # Pass arguments to `query_artifact_lineage_subgraph` via keyword arguments. Note that at
3154
+ # least one keyword argument is required. To specify no parameters, or to keep all
3155
+ # the default parameter values, pass an empty Hash as a request object (see above).
3156
+ #
3157
+ # @param artifact [::String]
3158
+ # Required. The resource name of the Artifact whose Lineage needs to be
3159
+ # retrieved as a LineageSubgraph. Format:
3160
+ # `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`
3161
+ #
3162
+ # The request may error with FAILED_PRECONDITION if the number of Artifacts,
3163
+ # the number of Executions, or the number of Events that would be returned
3164
+ # for the Context exceeds 1000.
3165
+ # @param max_hops [::Integer]
3166
+ # Specifies the size of the lineage graph in terms of number of hops from the
3167
+ # specified artifact.
3168
+ # Negative Value: INVALID_ARGUMENT error is returned
3169
+ # 0: Only input artifact is returned.
3170
+ # No value: Transitive closure is performed to return the complete graph.
3171
+ # @param filter [::String]
3172
+ # Filter specifying the boolean condition for the Artifacts to satisfy in
3173
+ # order to be part of the Lineage Subgraph.
3174
+ # The syntax to define filter query is based on https://google.aip.dev/160.
3175
+ # The supported set of filters include the following:
3176
+ #
3177
+ # * **Attribute filtering**:
3178
+ # For example: `display_name = "test"`
3179
+ # Supported fields include: `name`, `display_name`, `uri`, `state`,
3180
+ # `schema_title`, `create_time`, and `update_time`.
3181
+ # Time fields, such as `create_time` and `update_time`, require values
3182
+ # specified in RFC-3339 format.
3183
+ # For example: `create_time = "2020-11-19T11:30:00-04:00"`
3184
+ # * **Metadata field**:
3185
+ # To filter on metadata fields use traversal operation as follows:
3186
+ # `metadata.<field_name>.<type_value>`.
3187
+ # For example: `metadata.field_1.number_value = 10.0`
3188
+ # In case the field name contains special characters (such as colon), one
3189
+ # can embed it inside double quote.
3190
+ # For example: `metadata."field:1".number_value = 10.0`
3191
+ #
3192
+ # Each of the above supported filter types can be combined together using
3193
+ # logical operators (`AND` & `OR`). Maximum nested expression depth allowed
3194
+ # is 5.
3195
+ #
3196
+ # For example: `display_name = "test" AND metadata.field1.bool_value = true`.
3197
+ # @yield [result, operation] Access the result along with the TransportOperation object
3198
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::LineageSubgraph]
3199
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3200
+ #
3201
+ # @return [::Google::Cloud::AIPlatform::V1::LineageSubgraph]
3202
+ #
3203
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3204
+ #
3205
+ # @example Basic example
3206
+ # require "google/cloud/ai_platform/v1"
3207
+ #
3208
+ # # Create a client object. The client can be reused for multiple calls.
3209
+ # client = Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new
3210
+ #
3211
+ # # Create a request. To set request fields, pass in keyword arguments.
3212
+ # request = Google::Cloud::AIPlatform::V1::QueryArtifactLineageSubgraphRequest.new
3213
+ #
3214
+ # # Call the query_artifact_lineage_subgraph method.
3215
+ # result = client.query_artifact_lineage_subgraph request
3216
+ #
3217
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::LineageSubgraph.
3218
+ # p result
3219
+ #
3220
+ def query_artifact_lineage_subgraph request, options = nil
3221
+ raise ::ArgumentError, "request must be provided" if request.nil?
3222
+
3223
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::QueryArtifactLineageSubgraphRequest
3224
+
3225
+ # Converts hash and nil to an options object
3226
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3227
+
3228
+ # Customize the options with defaults
3229
+ call_metadata = @config.rpcs.query_artifact_lineage_subgraph.metadata.to_h
3230
+
3231
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3232
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3233
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3234
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
3235
+ transports_version_send: [:rest]
3236
+
3237
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3238
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3239
+
3240
+ options.apply_defaults timeout: @config.rpcs.query_artifact_lineage_subgraph.timeout,
3241
+ metadata: call_metadata,
3242
+ retry_policy: @config.rpcs.query_artifact_lineage_subgraph.retry_policy
3243
+
3244
+ options.apply_defaults timeout: @config.timeout,
3245
+ metadata: @config.metadata,
3246
+ retry_policy: @config.retry_policy
3247
+
3248
+ @metadata_service_stub.query_artifact_lineage_subgraph request, options do |result, operation|
3249
+ yield result, operation if block_given?
3250
+ return result
3251
+ end
3252
+ rescue ::Gapic::Rest::Error => e
3253
+ raise ::Google::Cloud::Error.from_error(e)
3254
+ end
3255
+
3256
+ ##
3257
+ # Configuration class for the MetadataService REST API.
3258
+ #
3259
+ # This class represents the configuration for MetadataService REST,
3260
+ # providing control over timeouts, retry behavior, logging, transport
3261
+ # parameters, and other low-level controls. Certain parameters can also be
3262
+ # applied individually to specific RPCs. See
3263
+ # {::Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client::Configuration::Rpcs}
3264
+ # for a list of RPCs that can be configured independently.
3265
+ #
3266
+ # Configuration can be applied globally to all clients, or to a single client
3267
+ # on construction.
3268
+ #
3269
+ # @example
3270
+ #
3271
+ # # Modify the global config, setting the timeout for
3272
+ # # create_metadata_store to 20 seconds,
3273
+ # # and all remaining timeouts to 10 seconds.
3274
+ # ::Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.configure do |config|
3275
+ # config.timeout = 10.0
3276
+ # config.rpcs.create_metadata_store.timeout = 20.0
3277
+ # end
3278
+ #
3279
+ # # Apply the above configuration only to a new client.
3280
+ # client = ::Google::Cloud::AIPlatform::V1::MetadataService::Rest::Client.new do |config|
3281
+ # config.timeout = 10.0
3282
+ # config.rpcs.create_metadata_store.timeout = 20.0
3283
+ # end
3284
+ #
3285
+ # @!attribute [rw] endpoint
3286
+ # A custom service endpoint, as a hostname or hostname:port. The default is
3287
+ # nil, indicating to use the default endpoint in the current universe domain.
3288
+ # @return [::String,nil]
3289
+ # @!attribute [rw] credentials
3290
+ # Credentials to send with calls. You may provide any of the following types:
3291
+ # * (`String`) The path to a service account key file in JSON format
3292
+ # * (`Hash`) A service account key as a Hash
3293
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
3294
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
3295
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
3296
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
3297
+ # * (`nil`) indicating no credentials
3298
+ # @return [::Object]
3299
+ # @!attribute [rw] scope
3300
+ # The OAuth scopes
3301
+ # @return [::Array<::String>]
3302
+ # @!attribute [rw] lib_name
3303
+ # The library name as recorded in instrumentation and logging
3304
+ # @return [::String]
3305
+ # @!attribute [rw] lib_version
3306
+ # The library version as recorded in instrumentation and logging
3307
+ # @return [::String]
3308
+ # @!attribute [rw] timeout
3309
+ # The call timeout in seconds.
3310
+ # @return [::Numeric]
3311
+ # @!attribute [rw] metadata
3312
+ # Additional headers to be sent with the call.
3313
+ # @return [::Hash{::Symbol=>::String}]
3314
+ # @!attribute [rw] retry_policy
3315
+ # The retry policy. The value is a hash with the following keys:
3316
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3317
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3318
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3319
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3320
+ # trigger a retry.
3321
+ # @return [::Hash]
3322
+ # @!attribute [rw] quota_project
3323
+ # A separate project against which to charge quota.
3324
+ # @return [::String]
3325
+ # @!attribute [rw] universe_domain
3326
+ # The universe domain within which to make requests. This determines the
3327
+ # default endpoint URL. The default value of nil uses the environment
3328
+ # universe (usually the default "googleapis.com" universe).
3329
+ # @return [::String,nil]
3330
+ #
3331
+ class Configuration
3332
+ extend ::Gapic::Config
3333
+
3334
+ # @private
3335
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
3336
+ DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
3337
+
3338
+ config_attr :endpoint, nil, ::String, nil
3339
+ config_attr :credentials, nil do |value|
3340
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
3341
+ allowed.any? { |klass| klass === value }
3342
+ end
3343
+ config_attr :scope, nil, ::String, ::Array, nil
3344
+ config_attr :lib_name, nil, ::String, nil
3345
+ config_attr :lib_version, nil, ::String, nil
3346
+ config_attr :timeout, nil, ::Numeric, nil
3347
+ config_attr :metadata, nil, ::Hash, nil
3348
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3349
+ config_attr :quota_project, nil, ::String, nil
3350
+ config_attr :universe_domain, nil, ::String, nil
3351
+
3352
+ # @private
3353
+ # Overrides for http bindings for the RPCs of this service
3354
+ # are only used when this service is used as mixin, and only
3355
+ # by the host service.
3356
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
3357
+ config_attr :bindings_override, {}, ::Hash, nil
3358
+
3359
+ # @private
3360
+ def initialize parent_config = nil
3361
+ @parent_config = parent_config unless parent_config.nil?
3362
+
3363
+ yield self if block_given?
3364
+ end
3365
+
3366
+ ##
3367
+ # Configurations for individual RPCs
3368
+ # @return [Rpcs]
3369
+ #
3370
+ def rpcs
3371
+ @rpcs ||= begin
3372
+ parent_rpcs = nil
3373
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
3374
+ Rpcs.new parent_rpcs
3375
+ end
3376
+ end
3377
+
3378
+ ##
3379
+ # Configuration RPC class for the MetadataService API.
3380
+ #
3381
+ # Includes fields providing the configuration for each RPC in this service.
3382
+ # Each configuration object is of type `Gapic::Config::Method` and includes
3383
+ # the following configuration fields:
3384
+ #
3385
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
3386
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
3387
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
3388
+ # include the following keys:
3389
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3390
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3391
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3392
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3393
+ # trigger a retry.
3394
+ #
3395
+ class Rpcs
3396
+ ##
3397
+ # RPC-specific configuration for `create_metadata_store`
3398
+ # @return [::Gapic::Config::Method]
3399
+ #
3400
+ attr_reader :create_metadata_store
3401
+ ##
3402
+ # RPC-specific configuration for `get_metadata_store`
3403
+ # @return [::Gapic::Config::Method]
3404
+ #
3405
+ attr_reader :get_metadata_store
3406
+ ##
3407
+ # RPC-specific configuration for `list_metadata_stores`
3408
+ # @return [::Gapic::Config::Method]
3409
+ #
3410
+ attr_reader :list_metadata_stores
3411
+ ##
3412
+ # RPC-specific configuration for `delete_metadata_store`
3413
+ # @return [::Gapic::Config::Method]
3414
+ #
3415
+ attr_reader :delete_metadata_store
3416
+ ##
3417
+ # RPC-specific configuration for `create_artifact`
3418
+ # @return [::Gapic::Config::Method]
3419
+ #
3420
+ attr_reader :create_artifact
3421
+ ##
3422
+ # RPC-specific configuration for `get_artifact`
3423
+ # @return [::Gapic::Config::Method]
3424
+ #
3425
+ attr_reader :get_artifact
3426
+ ##
3427
+ # RPC-specific configuration for `list_artifacts`
3428
+ # @return [::Gapic::Config::Method]
3429
+ #
3430
+ attr_reader :list_artifacts
3431
+ ##
3432
+ # RPC-specific configuration for `update_artifact`
3433
+ # @return [::Gapic::Config::Method]
3434
+ #
3435
+ attr_reader :update_artifact
3436
+ ##
3437
+ # RPC-specific configuration for `delete_artifact`
3438
+ # @return [::Gapic::Config::Method]
3439
+ #
3440
+ attr_reader :delete_artifact
3441
+ ##
3442
+ # RPC-specific configuration for `purge_artifacts`
3443
+ # @return [::Gapic::Config::Method]
3444
+ #
3445
+ attr_reader :purge_artifacts
3446
+ ##
3447
+ # RPC-specific configuration for `create_context`
3448
+ # @return [::Gapic::Config::Method]
3449
+ #
3450
+ attr_reader :create_context
3451
+ ##
3452
+ # RPC-specific configuration for `get_context`
3453
+ # @return [::Gapic::Config::Method]
3454
+ #
3455
+ attr_reader :get_context
3456
+ ##
3457
+ # RPC-specific configuration for `list_contexts`
3458
+ # @return [::Gapic::Config::Method]
3459
+ #
3460
+ attr_reader :list_contexts
3461
+ ##
3462
+ # RPC-specific configuration for `update_context`
3463
+ # @return [::Gapic::Config::Method]
3464
+ #
3465
+ attr_reader :update_context
3466
+ ##
3467
+ # RPC-specific configuration for `delete_context`
3468
+ # @return [::Gapic::Config::Method]
3469
+ #
3470
+ attr_reader :delete_context
3471
+ ##
3472
+ # RPC-specific configuration for `purge_contexts`
3473
+ # @return [::Gapic::Config::Method]
3474
+ #
3475
+ attr_reader :purge_contexts
3476
+ ##
3477
+ # RPC-specific configuration for `add_context_artifacts_and_executions`
3478
+ # @return [::Gapic::Config::Method]
3479
+ #
3480
+ attr_reader :add_context_artifacts_and_executions
3481
+ ##
3482
+ # RPC-specific configuration for `add_context_children`
3483
+ # @return [::Gapic::Config::Method]
3484
+ #
3485
+ attr_reader :add_context_children
3486
+ ##
3487
+ # RPC-specific configuration for `remove_context_children`
3488
+ # @return [::Gapic::Config::Method]
3489
+ #
3490
+ attr_reader :remove_context_children
3491
+ ##
3492
+ # RPC-specific configuration for `query_context_lineage_subgraph`
3493
+ # @return [::Gapic::Config::Method]
3494
+ #
3495
+ attr_reader :query_context_lineage_subgraph
3496
+ ##
3497
+ # RPC-specific configuration for `create_execution`
3498
+ # @return [::Gapic::Config::Method]
3499
+ #
3500
+ attr_reader :create_execution
3501
+ ##
3502
+ # RPC-specific configuration for `get_execution`
3503
+ # @return [::Gapic::Config::Method]
3504
+ #
3505
+ attr_reader :get_execution
3506
+ ##
3507
+ # RPC-specific configuration for `list_executions`
3508
+ # @return [::Gapic::Config::Method]
3509
+ #
3510
+ attr_reader :list_executions
3511
+ ##
3512
+ # RPC-specific configuration for `update_execution`
3513
+ # @return [::Gapic::Config::Method]
3514
+ #
3515
+ attr_reader :update_execution
3516
+ ##
3517
+ # RPC-specific configuration for `delete_execution`
3518
+ # @return [::Gapic::Config::Method]
3519
+ #
3520
+ attr_reader :delete_execution
3521
+ ##
3522
+ # RPC-specific configuration for `purge_executions`
3523
+ # @return [::Gapic::Config::Method]
3524
+ #
3525
+ attr_reader :purge_executions
3526
+ ##
3527
+ # RPC-specific configuration for `add_execution_events`
3528
+ # @return [::Gapic::Config::Method]
3529
+ #
3530
+ attr_reader :add_execution_events
3531
+ ##
3532
+ # RPC-specific configuration for `query_execution_inputs_and_outputs`
3533
+ # @return [::Gapic::Config::Method]
3534
+ #
3535
+ attr_reader :query_execution_inputs_and_outputs
3536
+ ##
3537
+ # RPC-specific configuration for `create_metadata_schema`
3538
+ # @return [::Gapic::Config::Method]
3539
+ #
3540
+ attr_reader :create_metadata_schema
3541
+ ##
3542
+ # RPC-specific configuration for `get_metadata_schema`
3543
+ # @return [::Gapic::Config::Method]
3544
+ #
3545
+ attr_reader :get_metadata_schema
3546
+ ##
3547
+ # RPC-specific configuration for `list_metadata_schemas`
3548
+ # @return [::Gapic::Config::Method]
3549
+ #
3550
+ attr_reader :list_metadata_schemas
3551
+ ##
3552
+ # RPC-specific configuration for `query_artifact_lineage_subgraph`
3553
+ # @return [::Gapic::Config::Method]
3554
+ #
3555
+ attr_reader :query_artifact_lineage_subgraph
3556
+
3557
+ # @private
3558
+ def initialize parent_rpcs = nil
3559
+ create_metadata_store_config = parent_rpcs.create_metadata_store if parent_rpcs.respond_to? :create_metadata_store
3560
+ @create_metadata_store = ::Gapic::Config::Method.new create_metadata_store_config
3561
+ get_metadata_store_config = parent_rpcs.get_metadata_store if parent_rpcs.respond_to? :get_metadata_store
3562
+ @get_metadata_store = ::Gapic::Config::Method.new get_metadata_store_config
3563
+ list_metadata_stores_config = parent_rpcs.list_metadata_stores if parent_rpcs.respond_to? :list_metadata_stores
3564
+ @list_metadata_stores = ::Gapic::Config::Method.new list_metadata_stores_config
3565
+ delete_metadata_store_config = parent_rpcs.delete_metadata_store if parent_rpcs.respond_to? :delete_metadata_store
3566
+ @delete_metadata_store = ::Gapic::Config::Method.new delete_metadata_store_config
3567
+ create_artifact_config = parent_rpcs.create_artifact if parent_rpcs.respond_to? :create_artifact
3568
+ @create_artifact = ::Gapic::Config::Method.new create_artifact_config
3569
+ get_artifact_config = parent_rpcs.get_artifact if parent_rpcs.respond_to? :get_artifact
3570
+ @get_artifact = ::Gapic::Config::Method.new get_artifact_config
3571
+ list_artifacts_config = parent_rpcs.list_artifacts if parent_rpcs.respond_to? :list_artifacts
3572
+ @list_artifacts = ::Gapic::Config::Method.new list_artifacts_config
3573
+ update_artifact_config = parent_rpcs.update_artifact if parent_rpcs.respond_to? :update_artifact
3574
+ @update_artifact = ::Gapic::Config::Method.new update_artifact_config
3575
+ delete_artifact_config = parent_rpcs.delete_artifact if parent_rpcs.respond_to? :delete_artifact
3576
+ @delete_artifact = ::Gapic::Config::Method.new delete_artifact_config
3577
+ purge_artifacts_config = parent_rpcs.purge_artifacts if parent_rpcs.respond_to? :purge_artifacts
3578
+ @purge_artifacts = ::Gapic::Config::Method.new purge_artifacts_config
3579
+ create_context_config = parent_rpcs.create_context if parent_rpcs.respond_to? :create_context
3580
+ @create_context = ::Gapic::Config::Method.new create_context_config
3581
+ get_context_config = parent_rpcs.get_context if parent_rpcs.respond_to? :get_context
3582
+ @get_context = ::Gapic::Config::Method.new get_context_config
3583
+ list_contexts_config = parent_rpcs.list_contexts if parent_rpcs.respond_to? :list_contexts
3584
+ @list_contexts = ::Gapic::Config::Method.new list_contexts_config
3585
+ update_context_config = parent_rpcs.update_context if parent_rpcs.respond_to? :update_context
3586
+ @update_context = ::Gapic::Config::Method.new update_context_config
3587
+ delete_context_config = parent_rpcs.delete_context if parent_rpcs.respond_to? :delete_context
3588
+ @delete_context = ::Gapic::Config::Method.new delete_context_config
3589
+ purge_contexts_config = parent_rpcs.purge_contexts if parent_rpcs.respond_to? :purge_contexts
3590
+ @purge_contexts = ::Gapic::Config::Method.new purge_contexts_config
3591
+ add_context_artifacts_and_executions_config = parent_rpcs.add_context_artifacts_and_executions if parent_rpcs.respond_to? :add_context_artifacts_and_executions
3592
+ @add_context_artifacts_and_executions = ::Gapic::Config::Method.new add_context_artifacts_and_executions_config
3593
+ add_context_children_config = parent_rpcs.add_context_children if parent_rpcs.respond_to? :add_context_children
3594
+ @add_context_children = ::Gapic::Config::Method.new add_context_children_config
3595
+ remove_context_children_config = parent_rpcs.remove_context_children if parent_rpcs.respond_to? :remove_context_children
3596
+ @remove_context_children = ::Gapic::Config::Method.new remove_context_children_config
3597
+ query_context_lineage_subgraph_config = parent_rpcs.query_context_lineage_subgraph if parent_rpcs.respond_to? :query_context_lineage_subgraph
3598
+ @query_context_lineage_subgraph = ::Gapic::Config::Method.new query_context_lineage_subgraph_config
3599
+ create_execution_config = parent_rpcs.create_execution if parent_rpcs.respond_to? :create_execution
3600
+ @create_execution = ::Gapic::Config::Method.new create_execution_config
3601
+ get_execution_config = parent_rpcs.get_execution if parent_rpcs.respond_to? :get_execution
3602
+ @get_execution = ::Gapic::Config::Method.new get_execution_config
3603
+ list_executions_config = parent_rpcs.list_executions if parent_rpcs.respond_to? :list_executions
3604
+ @list_executions = ::Gapic::Config::Method.new list_executions_config
3605
+ update_execution_config = parent_rpcs.update_execution if parent_rpcs.respond_to? :update_execution
3606
+ @update_execution = ::Gapic::Config::Method.new update_execution_config
3607
+ delete_execution_config = parent_rpcs.delete_execution if parent_rpcs.respond_to? :delete_execution
3608
+ @delete_execution = ::Gapic::Config::Method.new delete_execution_config
3609
+ purge_executions_config = parent_rpcs.purge_executions if parent_rpcs.respond_to? :purge_executions
3610
+ @purge_executions = ::Gapic::Config::Method.new purge_executions_config
3611
+ add_execution_events_config = parent_rpcs.add_execution_events if parent_rpcs.respond_to? :add_execution_events
3612
+ @add_execution_events = ::Gapic::Config::Method.new add_execution_events_config
3613
+ query_execution_inputs_and_outputs_config = parent_rpcs.query_execution_inputs_and_outputs if parent_rpcs.respond_to? :query_execution_inputs_and_outputs
3614
+ @query_execution_inputs_and_outputs = ::Gapic::Config::Method.new query_execution_inputs_and_outputs_config
3615
+ create_metadata_schema_config = parent_rpcs.create_metadata_schema if parent_rpcs.respond_to? :create_metadata_schema
3616
+ @create_metadata_schema = ::Gapic::Config::Method.new create_metadata_schema_config
3617
+ get_metadata_schema_config = parent_rpcs.get_metadata_schema if parent_rpcs.respond_to? :get_metadata_schema
3618
+ @get_metadata_schema = ::Gapic::Config::Method.new get_metadata_schema_config
3619
+ list_metadata_schemas_config = parent_rpcs.list_metadata_schemas if parent_rpcs.respond_to? :list_metadata_schemas
3620
+ @list_metadata_schemas = ::Gapic::Config::Method.new list_metadata_schemas_config
3621
+ query_artifact_lineage_subgraph_config = parent_rpcs.query_artifact_lineage_subgraph if parent_rpcs.respond_to? :query_artifact_lineage_subgraph
3622
+ @query_artifact_lineage_subgraph = ::Gapic::Config::Method.new query_artifact_lineage_subgraph_config
3623
+
3624
+ yield self if block_given?
3625
+ end
3626
+ end
3627
+ end
3628
+ end
3629
+ end
3630
+ end
3631
+ end
3632
+ end
3633
+ end
3634
+ end