google-cloud-ai_platform-v1 0.39.0 → 0.41.0

Sign up to get free protection for your applications and to get access to all the features.
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,2280 @@
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/dataset_service_pb"
21
+ require "google/cloud/ai_platform/v1/dataset_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 DatasetService
30
+ module Rest
31
+ ##
32
+ # REST client for the DatasetService service.
33
+ #
34
+ # The service that manages Vertex AI Dataset and its child resources.
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 :dataset_service_stub
47
+
48
+ ##
49
+ # Configure the DatasetService Client class.
50
+ #
51
+ # See {::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client::Configuration}
52
+ # for a description of the configuration fields.
53
+ #
54
+ # @example
55
+ #
56
+ # # Modify the configuration for all DatasetService clients
57
+ # ::Google::Cloud::AIPlatform::V1::DatasetService::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 DatasetService 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::DatasetService::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
+ @dataset_service_stub.universe_domain
110
+ end
111
+
112
+ ##
113
+ # Create a new DatasetService REST client object.
114
+ #
115
+ # @example
116
+ #
117
+ # # Create a client using the default configuration
118
+ # client = ::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
119
+ #
120
+ # # Create a client using a custom configuration
121
+ # client = ::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new do |config|
122
+ # config.timeout = 10.0
123
+ # end
124
+ #
125
+ # @yield [config] Configure the DatasetService 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::DatasetService::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
+ @dataset_service_stub = ::Google::Cloud::AIPlatform::V1::DatasetService::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 = @dataset_service_stub.endpoint
169
+ config.universe_domain = @dataset_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 = @dataset_service_stub.endpoint
177
+ config.universe_domain = @dataset_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::DatasetService::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
+ # Creates a Dataset.
207
+ #
208
+ # @overload create_dataset(request, options = nil)
209
+ # Pass arguments to `create_dataset` via a request object, either of type
210
+ # {::Google::Cloud::AIPlatform::V1::CreateDatasetRequest} or an equivalent Hash.
211
+ #
212
+ # @param request [::Google::Cloud::AIPlatform::V1::CreateDatasetRequest, ::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_dataset(parent: nil, dataset: nil)
219
+ # Pass arguments to `create_dataset` 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 to create the Dataset in.
225
+ # Format: `projects/{project}/locations/{location}`
226
+ # @param dataset [::Google::Cloud::AIPlatform::V1::Dataset, ::Hash]
227
+ # Required. The Dataset to create.
228
+ # @yield [result, operation] Access the result along with the TransportOperation object
229
+ # @yieldparam result [::Gapic::Operation]
230
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
231
+ #
232
+ # @return [::Gapic::Operation]
233
+ #
234
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
235
+ #
236
+ # @example Basic example
237
+ # require "google/cloud/ai_platform/v1"
238
+ #
239
+ # # Create a client object. The client can be reused for multiple calls.
240
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
241
+ #
242
+ # # Create a request. To set request fields, pass in keyword arguments.
243
+ # request = Google::Cloud::AIPlatform::V1::CreateDatasetRequest.new
244
+ #
245
+ # # Call the create_dataset method.
246
+ # result = client.create_dataset request
247
+ #
248
+ # # The returned object is of type Gapic::Operation. You can use it to
249
+ # # check the status of an operation, cancel it, or wait for results.
250
+ # # Here is how to wait for a response.
251
+ # result.wait_until_done! timeout: 60
252
+ # if result.response?
253
+ # p result.response
254
+ # else
255
+ # puts "No response received."
256
+ # end
257
+ #
258
+ def create_dataset request, options = nil
259
+ raise ::ArgumentError, "request must be provided" if request.nil?
260
+
261
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateDatasetRequest
262
+
263
+ # Converts hash and nil to an options object
264
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
265
+
266
+ # Customize the options with defaults
267
+ call_metadata = @config.rpcs.create_dataset.metadata.to_h
268
+
269
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
270
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
271
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
272
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
273
+ transports_version_send: [:rest]
274
+
275
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
276
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
277
+
278
+ options.apply_defaults timeout: @config.rpcs.create_dataset.timeout,
279
+ metadata: call_metadata,
280
+ retry_policy: @config.rpcs.create_dataset.retry_policy
281
+
282
+ options.apply_defaults timeout: @config.timeout,
283
+ metadata: @config.metadata,
284
+ retry_policy: @config.retry_policy
285
+
286
+ @dataset_service_stub.create_dataset request, options do |result, operation|
287
+ result = ::Gapic::Operation.new result, @operations_client, options: options
288
+ yield result, operation if block_given?
289
+ return result
290
+ end
291
+ rescue ::Gapic::Rest::Error => e
292
+ raise ::Google::Cloud::Error.from_error(e)
293
+ end
294
+
295
+ ##
296
+ # Gets a Dataset.
297
+ #
298
+ # @overload get_dataset(request, options = nil)
299
+ # Pass arguments to `get_dataset` via a request object, either of type
300
+ # {::Google::Cloud::AIPlatform::V1::GetDatasetRequest} or an equivalent Hash.
301
+ #
302
+ # @param request [::Google::Cloud::AIPlatform::V1::GetDatasetRequest, ::Hash]
303
+ # A request object representing the call parameters. Required. To specify no
304
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
305
+ # @param options [::Gapic::CallOptions, ::Hash]
306
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
307
+ #
308
+ # @overload get_dataset(name: nil, read_mask: nil)
309
+ # Pass arguments to `get_dataset` via keyword arguments. Note that at
310
+ # least one keyword argument is required. To specify no parameters, or to keep all
311
+ # the default parameter values, pass an empty Hash as a request object (see above).
312
+ #
313
+ # @param name [::String]
314
+ # Required. The name of the Dataset resource.
315
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
316
+ # Mask specifying which fields to read.
317
+ # @yield [result, operation] Access the result along with the TransportOperation object
318
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::Dataset]
319
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
320
+ #
321
+ # @return [::Google::Cloud::AIPlatform::V1::Dataset]
322
+ #
323
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
324
+ #
325
+ # @example Basic example
326
+ # require "google/cloud/ai_platform/v1"
327
+ #
328
+ # # Create a client object. The client can be reused for multiple calls.
329
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
330
+ #
331
+ # # Create a request. To set request fields, pass in keyword arguments.
332
+ # request = Google::Cloud::AIPlatform::V1::GetDatasetRequest.new
333
+ #
334
+ # # Call the get_dataset method.
335
+ # result = client.get_dataset request
336
+ #
337
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::Dataset.
338
+ # p result
339
+ #
340
+ def get_dataset request, options = nil
341
+ raise ::ArgumentError, "request must be provided" if request.nil?
342
+
343
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetDatasetRequest
344
+
345
+ # Converts hash and nil to an options object
346
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
347
+
348
+ # Customize the options with defaults
349
+ call_metadata = @config.rpcs.get_dataset.metadata.to_h
350
+
351
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
352
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
353
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
354
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
355
+ transports_version_send: [:rest]
356
+
357
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
358
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
359
+
360
+ options.apply_defaults timeout: @config.rpcs.get_dataset.timeout,
361
+ metadata: call_metadata,
362
+ retry_policy: @config.rpcs.get_dataset.retry_policy
363
+
364
+ options.apply_defaults timeout: @config.timeout,
365
+ metadata: @config.metadata,
366
+ retry_policy: @config.retry_policy
367
+
368
+ @dataset_service_stub.get_dataset request, options do |result, operation|
369
+ yield result, operation if block_given?
370
+ return result
371
+ end
372
+ rescue ::Gapic::Rest::Error => e
373
+ raise ::Google::Cloud::Error.from_error(e)
374
+ end
375
+
376
+ ##
377
+ # Updates a Dataset.
378
+ #
379
+ # @overload update_dataset(request, options = nil)
380
+ # Pass arguments to `update_dataset` via a request object, either of type
381
+ # {::Google::Cloud::AIPlatform::V1::UpdateDatasetRequest} or an equivalent Hash.
382
+ #
383
+ # @param request [::Google::Cloud::AIPlatform::V1::UpdateDatasetRequest, ::Hash]
384
+ # A request object representing the call parameters. Required. To specify no
385
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
386
+ # @param options [::Gapic::CallOptions, ::Hash]
387
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
388
+ #
389
+ # @overload update_dataset(dataset: nil, update_mask: nil)
390
+ # Pass arguments to `update_dataset` via keyword arguments. Note that at
391
+ # least one keyword argument is required. To specify no parameters, or to keep all
392
+ # the default parameter values, pass an empty Hash as a request object (see above).
393
+ #
394
+ # @param dataset [::Google::Cloud::AIPlatform::V1::Dataset, ::Hash]
395
+ # Required. The Dataset which replaces the resource on the server.
396
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
397
+ # Required. The update mask applies to the resource.
398
+ # For the `FieldMask` definition, see
399
+ # {::Google::Protobuf::FieldMask google.protobuf.FieldMask}. Updatable fields:
400
+ #
401
+ # * `display_name`
402
+ # * `description`
403
+ # * `labels`
404
+ # @yield [result, operation] Access the result along with the TransportOperation object
405
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::Dataset]
406
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
407
+ #
408
+ # @return [::Google::Cloud::AIPlatform::V1::Dataset]
409
+ #
410
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
411
+ #
412
+ # @example Basic example
413
+ # require "google/cloud/ai_platform/v1"
414
+ #
415
+ # # Create a client object. The client can be reused for multiple calls.
416
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
417
+ #
418
+ # # Create a request. To set request fields, pass in keyword arguments.
419
+ # request = Google::Cloud::AIPlatform::V1::UpdateDatasetRequest.new
420
+ #
421
+ # # Call the update_dataset method.
422
+ # result = client.update_dataset request
423
+ #
424
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::Dataset.
425
+ # p result
426
+ #
427
+ def update_dataset request, options = nil
428
+ raise ::ArgumentError, "request must be provided" if request.nil?
429
+
430
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateDatasetRequest
431
+
432
+ # Converts hash and nil to an options object
433
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
434
+
435
+ # Customize the options with defaults
436
+ call_metadata = @config.rpcs.update_dataset.metadata.to_h
437
+
438
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
439
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
440
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
441
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
442
+ transports_version_send: [:rest]
443
+
444
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
445
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
446
+
447
+ options.apply_defaults timeout: @config.rpcs.update_dataset.timeout,
448
+ metadata: call_metadata,
449
+ retry_policy: @config.rpcs.update_dataset.retry_policy
450
+
451
+ options.apply_defaults timeout: @config.timeout,
452
+ metadata: @config.metadata,
453
+ retry_policy: @config.retry_policy
454
+
455
+ @dataset_service_stub.update_dataset request, options do |result, operation|
456
+ yield result, operation if block_given?
457
+ return result
458
+ end
459
+ rescue ::Gapic::Rest::Error => e
460
+ raise ::Google::Cloud::Error.from_error(e)
461
+ end
462
+
463
+ ##
464
+ # Lists Datasets in a Location.
465
+ #
466
+ # @overload list_datasets(request, options = nil)
467
+ # Pass arguments to `list_datasets` via a request object, either of type
468
+ # {::Google::Cloud::AIPlatform::V1::ListDatasetsRequest} or an equivalent Hash.
469
+ #
470
+ # @param request [::Google::Cloud::AIPlatform::V1::ListDatasetsRequest, ::Hash]
471
+ # A request object representing the call parameters. Required. To specify no
472
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
473
+ # @param options [::Gapic::CallOptions, ::Hash]
474
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
475
+ #
476
+ # @overload list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil)
477
+ # Pass arguments to `list_datasets` via keyword arguments. Note that at
478
+ # least one keyword argument is required. To specify no parameters, or to keep all
479
+ # the default parameter values, pass an empty Hash as a request object (see above).
480
+ #
481
+ # @param parent [::String]
482
+ # Required. The name of the Dataset's parent resource.
483
+ # Format: `projects/{project}/locations/{location}`
484
+ # @param filter [::String]
485
+ # An expression for filtering the results of the request. For field names
486
+ # both snake_case and camelCase are supported.
487
+ #
488
+ # * `display_name`: supports = and !=
489
+ # * `metadata_schema_uri`: supports = and !=
490
+ # * `labels` supports general map functions that is:
491
+ # * `labels.key=value` - key:value equality
492
+ # * `labels.key:* or labels:key - key existence
493
+ # * A key including a space must be quoted. `labels."a key"`.
494
+ #
495
+ # Some examples:
496
+ #
497
+ # * `displayName="myDisplayName"`
498
+ # * `labels.myKey="myValue"`
499
+ # @param page_size [::Integer]
500
+ # The standard list page size.
501
+ # @param page_token [::String]
502
+ # The standard list page token.
503
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
504
+ # Mask specifying which fields to read.
505
+ # @param order_by [::String]
506
+ # A comma-separated list of fields to order by, sorted in ascending order.
507
+ # Use "desc" after a field name for descending.
508
+ # Supported fields:
509
+ #
510
+ # * `display_name`
511
+ # * `create_time`
512
+ # * `update_time`
513
+ # @yield [result, operation] Access the result along with the TransportOperation object
514
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Dataset>]
515
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
516
+ #
517
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Dataset>]
518
+ #
519
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
520
+ #
521
+ # @example Basic example
522
+ # require "google/cloud/ai_platform/v1"
523
+ #
524
+ # # Create a client object. The client can be reused for multiple calls.
525
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
526
+ #
527
+ # # Create a request. To set request fields, pass in keyword arguments.
528
+ # request = Google::Cloud::AIPlatform::V1::ListDatasetsRequest.new
529
+ #
530
+ # # Call the list_datasets method.
531
+ # result = client.list_datasets request
532
+ #
533
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
534
+ # # over elements, and API calls will be issued to fetch pages as needed.
535
+ # result.each do |item|
536
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::Dataset.
537
+ # p item
538
+ # end
539
+ #
540
+ def list_datasets request, options = nil
541
+ raise ::ArgumentError, "request must be provided" if request.nil?
542
+
543
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListDatasetsRequest
544
+
545
+ # Converts hash and nil to an options object
546
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
547
+
548
+ # Customize the options with defaults
549
+ call_metadata = @config.rpcs.list_datasets.metadata.to_h
550
+
551
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
552
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
553
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
554
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
555
+ transports_version_send: [:rest]
556
+
557
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
558
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
559
+
560
+ options.apply_defaults timeout: @config.rpcs.list_datasets.timeout,
561
+ metadata: call_metadata,
562
+ retry_policy: @config.rpcs.list_datasets.retry_policy
563
+
564
+ options.apply_defaults timeout: @config.timeout,
565
+ metadata: @config.metadata,
566
+ retry_policy: @config.retry_policy
567
+
568
+ @dataset_service_stub.list_datasets request, options do |result, operation|
569
+ result = ::Gapic::Rest::PagedEnumerable.new @dataset_service_stub, :list_datasets, "datasets", request, result, options
570
+ yield result, operation if block_given?
571
+ return result
572
+ end
573
+ rescue ::Gapic::Rest::Error => e
574
+ raise ::Google::Cloud::Error.from_error(e)
575
+ end
576
+
577
+ ##
578
+ # Deletes a Dataset.
579
+ #
580
+ # @overload delete_dataset(request, options = nil)
581
+ # Pass arguments to `delete_dataset` via a request object, either of type
582
+ # {::Google::Cloud::AIPlatform::V1::DeleteDatasetRequest} or an equivalent Hash.
583
+ #
584
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteDatasetRequest, ::Hash]
585
+ # A request object representing the call parameters. Required. To specify no
586
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
587
+ # @param options [::Gapic::CallOptions, ::Hash]
588
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
589
+ #
590
+ # @overload delete_dataset(name: nil)
591
+ # Pass arguments to `delete_dataset` via keyword arguments. Note that at
592
+ # least one keyword argument is required. To specify no parameters, or to keep all
593
+ # the default parameter values, pass an empty Hash as a request object (see above).
594
+ #
595
+ # @param name [::String]
596
+ # Required. The resource name of the Dataset to delete.
597
+ # Format:
598
+ # `projects/{project}/locations/{location}/datasets/{dataset}`
599
+ # @yield [result, operation] Access the result along with the TransportOperation object
600
+ # @yieldparam result [::Gapic::Operation]
601
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
602
+ #
603
+ # @return [::Gapic::Operation]
604
+ #
605
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
606
+ #
607
+ # @example Basic example
608
+ # require "google/cloud/ai_platform/v1"
609
+ #
610
+ # # Create a client object. The client can be reused for multiple calls.
611
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
612
+ #
613
+ # # Create a request. To set request fields, pass in keyword arguments.
614
+ # request = Google::Cloud::AIPlatform::V1::DeleteDatasetRequest.new
615
+ #
616
+ # # Call the delete_dataset method.
617
+ # result = client.delete_dataset request
618
+ #
619
+ # # The returned object is of type Gapic::Operation. You can use it to
620
+ # # check the status of an operation, cancel it, or wait for results.
621
+ # # Here is how to wait for a response.
622
+ # result.wait_until_done! timeout: 60
623
+ # if result.response?
624
+ # p result.response
625
+ # else
626
+ # puts "No response received."
627
+ # end
628
+ #
629
+ def delete_dataset request, options = nil
630
+ raise ::ArgumentError, "request must be provided" if request.nil?
631
+
632
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteDatasetRequest
633
+
634
+ # Converts hash and nil to an options object
635
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
636
+
637
+ # Customize the options with defaults
638
+ call_metadata = @config.rpcs.delete_dataset.metadata.to_h
639
+
640
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
641
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
642
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
643
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
644
+ transports_version_send: [:rest]
645
+
646
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
647
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
648
+
649
+ options.apply_defaults timeout: @config.rpcs.delete_dataset.timeout,
650
+ metadata: call_metadata,
651
+ retry_policy: @config.rpcs.delete_dataset.retry_policy
652
+
653
+ options.apply_defaults timeout: @config.timeout,
654
+ metadata: @config.metadata,
655
+ retry_policy: @config.retry_policy
656
+
657
+ @dataset_service_stub.delete_dataset request, options do |result, operation|
658
+ result = ::Gapic::Operation.new result, @operations_client, options: options
659
+ yield result, operation if block_given?
660
+ return result
661
+ end
662
+ rescue ::Gapic::Rest::Error => e
663
+ raise ::Google::Cloud::Error.from_error(e)
664
+ end
665
+
666
+ ##
667
+ # Imports data into a Dataset.
668
+ #
669
+ # @overload import_data(request, options = nil)
670
+ # Pass arguments to `import_data` via a request object, either of type
671
+ # {::Google::Cloud::AIPlatform::V1::ImportDataRequest} or an equivalent Hash.
672
+ #
673
+ # @param request [::Google::Cloud::AIPlatform::V1::ImportDataRequest, ::Hash]
674
+ # A request object representing the call parameters. Required. To specify no
675
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
676
+ # @param options [::Gapic::CallOptions, ::Hash]
677
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
678
+ #
679
+ # @overload import_data(name: nil, import_configs: nil)
680
+ # Pass arguments to `import_data` via keyword arguments. Note that at
681
+ # least one keyword argument is required. To specify no parameters, or to keep all
682
+ # the default parameter values, pass an empty Hash as a request object (see above).
683
+ #
684
+ # @param name [::String]
685
+ # Required. The name of the Dataset resource.
686
+ # Format:
687
+ # `projects/{project}/locations/{location}/datasets/{dataset}`
688
+ # @param import_configs [::Array<::Google::Cloud::AIPlatform::V1::ImportDataConfig, ::Hash>]
689
+ # Required. The desired input locations. The contents of all input locations
690
+ # will be imported in one batch.
691
+ # @yield [result, operation] Access the result along with the TransportOperation object
692
+ # @yieldparam result [::Gapic::Operation]
693
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
694
+ #
695
+ # @return [::Gapic::Operation]
696
+ #
697
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
698
+ #
699
+ # @example Basic example
700
+ # require "google/cloud/ai_platform/v1"
701
+ #
702
+ # # Create a client object. The client can be reused for multiple calls.
703
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
704
+ #
705
+ # # Create a request. To set request fields, pass in keyword arguments.
706
+ # request = Google::Cloud::AIPlatform::V1::ImportDataRequest.new
707
+ #
708
+ # # Call the import_data method.
709
+ # result = client.import_data request
710
+ #
711
+ # # The returned object is of type Gapic::Operation. You can use it to
712
+ # # check the status of an operation, cancel it, or wait for results.
713
+ # # Here is how to wait for a response.
714
+ # result.wait_until_done! timeout: 60
715
+ # if result.response?
716
+ # p result.response
717
+ # else
718
+ # puts "No response received."
719
+ # end
720
+ #
721
+ def import_data request, options = nil
722
+ raise ::ArgumentError, "request must be provided" if request.nil?
723
+
724
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ImportDataRequest
725
+
726
+ # Converts hash and nil to an options object
727
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
728
+
729
+ # Customize the options with defaults
730
+ call_metadata = @config.rpcs.import_data.metadata.to_h
731
+
732
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
733
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
734
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
735
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
736
+ transports_version_send: [:rest]
737
+
738
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
739
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
740
+
741
+ options.apply_defaults timeout: @config.rpcs.import_data.timeout,
742
+ metadata: call_metadata,
743
+ retry_policy: @config.rpcs.import_data.retry_policy
744
+
745
+ options.apply_defaults timeout: @config.timeout,
746
+ metadata: @config.metadata,
747
+ retry_policy: @config.retry_policy
748
+
749
+ @dataset_service_stub.import_data request, options do |result, operation|
750
+ result = ::Gapic::Operation.new result, @operations_client, options: options
751
+ yield result, operation if block_given?
752
+ return result
753
+ end
754
+ rescue ::Gapic::Rest::Error => e
755
+ raise ::Google::Cloud::Error.from_error(e)
756
+ end
757
+
758
+ ##
759
+ # Exports data from a Dataset.
760
+ #
761
+ # @overload export_data(request, options = nil)
762
+ # Pass arguments to `export_data` via a request object, either of type
763
+ # {::Google::Cloud::AIPlatform::V1::ExportDataRequest} or an equivalent Hash.
764
+ #
765
+ # @param request [::Google::Cloud::AIPlatform::V1::ExportDataRequest, ::Hash]
766
+ # A request object representing the call parameters. Required. To specify no
767
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
768
+ # @param options [::Gapic::CallOptions, ::Hash]
769
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
770
+ #
771
+ # @overload export_data(name: nil, export_config: nil)
772
+ # Pass arguments to `export_data` via keyword arguments. Note that at
773
+ # least one keyword argument is required. To specify no parameters, or to keep all
774
+ # the default parameter values, pass an empty Hash as a request object (see above).
775
+ #
776
+ # @param name [::String]
777
+ # Required. The name of the Dataset resource.
778
+ # Format:
779
+ # `projects/{project}/locations/{location}/datasets/{dataset}`
780
+ # @param export_config [::Google::Cloud::AIPlatform::V1::ExportDataConfig, ::Hash]
781
+ # Required. The desired output location.
782
+ # @yield [result, operation] Access the result along with the TransportOperation object
783
+ # @yieldparam result [::Gapic::Operation]
784
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
785
+ #
786
+ # @return [::Gapic::Operation]
787
+ #
788
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
789
+ #
790
+ # @example Basic example
791
+ # require "google/cloud/ai_platform/v1"
792
+ #
793
+ # # Create a client object. The client can be reused for multiple calls.
794
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
795
+ #
796
+ # # Create a request. To set request fields, pass in keyword arguments.
797
+ # request = Google::Cloud::AIPlatform::V1::ExportDataRequest.new
798
+ #
799
+ # # Call the export_data method.
800
+ # result = client.export_data request
801
+ #
802
+ # # The returned object is of type Gapic::Operation. You can use it to
803
+ # # check the status of an operation, cancel it, or wait for results.
804
+ # # Here is how to wait for a response.
805
+ # result.wait_until_done! timeout: 60
806
+ # if result.response?
807
+ # p result.response
808
+ # else
809
+ # puts "No response received."
810
+ # end
811
+ #
812
+ def export_data request, options = nil
813
+ raise ::ArgumentError, "request must be provided" if request.nil?
814
+
815
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ExportDataRequest
816
+
817
+ # Converts hash and nil to an options object
818
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
819
+
820
+ # Customize the options with defaults
821
+ call_metadata = @config.rpcs.export_data.metadata.to_h
822
+
823
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
824
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
825
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
826
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
827
+ transports_version_send: [:rest]
828
+
829
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
830
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
831
+
832
+ options.apply_defaults timeout: @config.rpcs.export_data.timeout,
833
+ metadata: call_metadata,
834
+ retry_policy: @config.rpcs.export_data.retry_policy
835
+
836
+ options.apply_defaults timeout: @config.timeout,
837
+ metadata: @config.metadata,
838
+ retry_policy: @config.retry_policy
839
+
840
+ @dataset_service_stub.export_data request, options do |result, operation|
841
+ result = ::Gapic::Operation.new result, @operations_client, options: options
842
+ yield result, operation if block_given?
843
+ return result
844
+ end
845
+ rescue ::Gapic::Rest::Error => e
846
+ raise ::Google::Cloud::Error.from_error(e)
847
+ end
848
+
849
+ ##
850
+ # Create a version from a Dataset.
851
+ #
852
+ # @overload create_dataset_version(request, options = nil)
853
+ # Pass arguments to `create_dataset_version` via a request object, either of type
854
+ # {::Google::Cloud::AIPlatform::V1::CreateDatasetVersionRequest} or an equivalent Hash.
855
+ #
856
+ # @param request [::Google::Cloud::AIPlatform::V1::CreateDatasetVersionRequest, ::Hash]
857
+ # A request object representing the call parameters. Required. To specify no
858
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
859
+ # @param options [::Gapic::CallOptions, ::Hash]
860
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
861
+ #
862
+ # @overload create_dataset_version(parent: nil, dataset_version: nil)
863
+ # Pass arguments to `create_dataset_version` via keyword arguments. Note that at
864
+ # least one keyword argument is required. To specify no parameters, or to keep all
865
+ # the default parameter values, pass an empty Hash as a request object (see above).
866
+ #
867
+ # @param parent [::String]
868
+ # Required. The name of the Dataset resource.
869
+ # Format:
870
+ # `projects/{project}/locations/{location}/datasets/{dataset}`
871
+ # @param dataset_version [::Google::Cloud::AIPlatform::V1::DatasetVersion, ::Hash]
872
+ # Required. The version to be created. The same CMEK policies with the
873
+ # original Dataset will be applied the dataset version. So here we don't need
874
+ # to specify the EncryptionSpecType here.
875
+ # @yield [result, operation] Access the result along with the TransportOperation object
876
+ # @yieldparam result [::Gapic::Operation]
877
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
878
+ #
879
+ # @return [::Gapic::Operation]
880
+ #
881
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
882
+ #
883
+ # @example Basic example
884
+ # require "google/cloud/ai_platform/v1"
885
+ #
886
+ # # Create a client object. The client can be reused for multiple calls.
887
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
888
+ #
889
+ # # Create a request. To set request fields, pass in keyword arguments.
890
+ # request = Google::Cloud::AIPlatform::V1::CreateDatasetVersionRequest.new
891
+ #
892
+ # # Call the create_dataset_version method.
893
+ # result = client.create_dataset_version request
894
+ #
895
+ # # The returned object is of type Gapic::Operation. You can use it to
896
+ # # check the status of an operation, cancel it, or wait for results.
897
+ # # Here is how to wait for a response.
898
+ # result.wait_until_done! timeout: 60
899
+ # if result.response?
900
+ # p result.response
901
+ # else
902
+ # puts "No response received."
903
+ # end
904
+ #
905
+ def create_dataset_version request, options = nil
906
+ raise ::ArgumentError, "request must be provided" if request.nil?
907
+
908
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateDatasetVersionRequest
909
+
910
+ # Converts hash and nil to an options object
911
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
912
+
913
+ # Customize the options with defaults
914
+ call_metadata = @config.rpcs.create_dataset_version.metadata.to_h
915
+
916
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
917
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
918
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
919
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
920
+ transports_version_send: [:rest]
921
+
922
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
923
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
924
+
925
+ options.apply_defaults timeout: @config.rpcs.create_dataset_version.timeout,
926
+ metadata: call_metadata,
927
+ retry_policy: @config.rpcs.create_dataset_version.retry_policy
928
+
929
+ options.apply_defaults timeout: @config.timeout,
930
+ metadata: @config.metadata,
931
+ retry_policy: @config.retry_policy
932
+
933
+ @dataset_service_stub.create_dataset_version request, options do |result, operation|
934
+ result = ::Gapic::Operation.new result, @operations_client, options: options
935
+ yield result, operation if block_given?
936
+ return result
937
+ end
938
+ rescue ::Gapic::Rest::Error => e
939
+ raise ::Google::Cloud::Error.from_error(e)
940
+ end
941
+
942
+ ##
943
+ # Updates a DatasetVersion.
944
+ #
945
+ # @overload update_dataset_version(request, options = nil)
946
+ # Pass arguments to `update_dataset_version` via a request object, either of type
947
+ # {::Google::Cloud::AIPlatform::V1::UpdateDatasetVersionRequest} or an equivalent Hash.
948
+ #
949
+ # @param request [::Google::Cloud::AIPlatform::V1::UpdateDatasetVersionRequest, ::Hash]
950
+ # A request object representing the call parameters. Required. To specify no
951
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
952
+ # @param options [::Gapic::CallOptions, ::Hash]
953
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
954
+ #
955
+ # @overload update_dataset_version(dataset_version: nil, update_mask: nil)
956
+ # Pass arguments to `update_dataset_version` via keyword arguments. Note that at
957
+ # least one keyword argument is required. To specify no parameters, or to keep all
958
+ # the default parameter values, pass an empty Hash as a request object (see above).
959
+ #
960
+ # @param dataset_version [::Google::Cloud::AIPlatform::V1::DatasetVersion, ::Hash]
961
+ # Required. The DatasetVersion which replaces the resource on the server.
962
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
963
+ # Required. The update mask applies to the resource.
964
+ # For the `FieldMask` definition, see
965
+ # {::Google::Protobuf::FieldMask google.protobuf.FieldMask}. Updatable fields:
966
+ #
967
+ # * `display_name`
968
+ # @yield [result, operation] Access the result along with the TransportOperation object
969
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::DatasetVersion]
970
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
971
+ #
972
+ # @return [::Google::Cloud::AIPlatform::V1::DatasetVersion]
973
+ #
974
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
975
+ #
976
+ # @example Basic example
977
+ # require "google/cloud/ai_platform/v1"
978
+ #
979
+ # # Create a client object. The client can be reused for multiple calls.
980
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
981
+ #
982
+ # # Create a request. To set request fields, pass in keyword arguments.
983
+ # request = Google::Cloud::AIPlatform::V1::UpdateDatasetVersionRequest.new
984
+ #
985
+ # # Call the update_dataset_version method.
986
+ # result = client.update_dataset_version request
987
+ #
988
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::DatasetVersion.
989
+ # p result
990
+ #
991
+ def update_dataset_version request, options = nil
992
+ raise ::ArgumentError, "request must be provided" if request.nil?
993
+
994
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateDatasetVersionRequest
995
+
996
+ # Converts hash and nil to an options object
997
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
998
+
999
+ # Customize the options with defaults
1000
+ call_metadata = @config.rpcs.update_dataset_version.metadata.to_h
1001
+
1002
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1003
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1004
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1005
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1006
+ transports_version_send: [:rest]
1007
+
1008
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1009
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1010
+
1011
+ options.apply_defaults timeout: @config.rpcs.update_dataset_version.timeout,
1012
+ metadata: call_metadata,
1013
+ retry_policy: @config.rpcs.update_dataset_version.retry_policy
1014
+
1015
+ options.apply_defaults timeout: @config.timeout,
1016
+ metadata: @config.metadata,
1017
+ retry_policy: @config.retry_policy
1018
+
1019
+ @dataset_service_stub.update_dataset_version request, options do |result, operation|
1020
+ yield result, operation if block_given?
1021
+ return result
1022
+ end
1023
+ rescue ::Gapic::Rest::Error => e
1024
+ raise ::Google::Cloud::Error.from_error(e)
1025
+ end
1026
+
1027
+ ##
1028
+ # Deletes a Dataset version.
1029
+ #
1030
+ # @overload delete_dataset_version(request, options = nil)
1031
+ # Pass arguments to `delete_dataset_version` via a request object, either of type
1032
+ # {::Google::Cloud::AIPlatform::V1::DeleteDatasetVersionRequest} or an equivalent Hash.
1033
+ #
1034
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteDatasetVersionRequest, ::Hash]
1035
+ # A request object representing the call parameters. Required. To specify no
1036
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1037
+ # @param options [::Gapic::CallOptions, ::Hash]
1038
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1039
+ #
1040
+ # @overload delete_dataset_version(name: nil)
1041
+ # Pass arguments to `delete_dataset_version` via keyword arguments. Note that at
1042
+ # least one keyword argument is required. To specify no parameters, or to keep all
1043
+ # the default parameter values, pass an empty Hash as a request object (see above).
1044
+ #
1045
+ # @param name [::String]
1046
+ # Required. The resource name of the Dataset version to delete.
1047
+ # Format:
1048
+ # `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
1049
+ # @yield [result, operation] Access the result along with the TransportOperation object
1050
+ # @yieldparam result [::Gapic::Operation]
1051
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1052
+ #
1053
+ # @return [::Gapic::Operation]
1054
+ #
1055
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1056
+ #
1057
+ # @example Basic example
1058
+ # require "google/cloud/ai_platform/v1"
1059
+ #
1060
+ # # Create a client object. The client can be reused for multiple calls.
1061
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
1062
+ #
1063
+ # # Create a request. To set request fields, pass in keyword arguments.
1064
+ # request = Google::Cloud::AIPlatform::V1::DeleteDatasetVersionRequest.new
1065
+ #
1066
+ # # Call the delete_dataset_version method.
1067
+ # result = client.delete_dataset_version request
1068
+ #
1069
+ # # The returned object is of type Gapic::Operation. You can use it to
1070
+ # # check the status of an operation, cancel it, or wait for results.
1071
+ # # Here is how to wait for a response.
1072
+ # result.wait_until_done! timeout: 60
1073
+ # if result.response?
1074
+ # p result.response
1075
+ # else
1076
+ # puts "No response received."
1077
+ # end
1078
+ #
1079
+ def delete_dataset_version request, options = nil
1080
+ raise ::ArgumentError, "request must be provided" if request.nil?
1081
+
1082
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteDatasetVersionRequest
1083
+
1084
+ # Converts hash and nil to an options object
1085
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1086
+
1087
+ # Customize the options with defaults
1088
+ call_metadata = @config.rpcs.delete_dataset_version.metadata.to_h
1089
+
1090
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1091
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1092
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1093
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1094
+ transports_version_send: [:rest]
1095
+
1096
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1097
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1098
+
1099
+ options.apply_defaults timeout: @config.rpcs.delete_dataset_version.timeout,
1100
+ metadata: call_metadata,
1101
+ retry_policy: @config.rpcs.delete_dataset_version.retry_policy
1102
+
1103
+ options.apply_defaults timeout: @config.timeout,
1104
+ metadata: @config.metadata,
1105
+ retry_policy: @config.retry_policy
1106
+
1107
+ @dataset_service_stub.delete_dataset_version request, options do |result, operation|
1108
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1109
+ yield result, operation if block_given?
1110
+ return result
1111
+ end
1112
+ rescue ::Gapic::Rest::Error => e
1113
+ raise ::Google::Cloud::Error.from_error(e)
1114
+ end
1115
+
1116
+ ##
1117
+ # Gets a Dataset version.
1118
+ #
1119
+ # @overload get_dataset_version(request, options = nil)
1120
+ # Pass arguments to `get_dataset_version` via a request object, either of type
1121
+ # {::Google::Cloud::AIPlatform::V1::GetDatasetVersionRequest} or an equivalent Hash.
1122
+ #
1123
+ # @param request [::Google::Cloud::AIPlatform::V1::GetDatasetVersionRequest, ::Hash]
1124
+ # A request object representing the call parameters. Required. To specify no
1125
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1126
+ # @param options [::Gapic::CallOptions, ::Hash]
1127
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1128
+ #
1129
+ # @overload get_dataset_version(name: nil, read_mask: nil)
1130
+ # Pass arguments to `get_dataset_version` via keyword arguments. Note that at
1131
+ # least one keyword argument is required. To specify no parameters, or to keep all
1132
+ # the default parameter values, pass an empty Hash as a request object (see above).
1133
+ #
1134
+ # @param name [::String]
1135
+ # Required. The resource name of the Dataset version to delete.
1136
+ # Format:
1137
+ # `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
1138
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
1139
+ # Mask specifying which fields to read.
1140
+ # @yield [result, operation] Access the result along with the TransportOperation object
1141
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::DatasetVersion]
1142
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1143
+ #
1144
+ # @return [::Google::Cloud::AIPlatform::V1::DatasetVersion]
1145
+ #
1146
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1147
+ #
1148
+ # @example Basic example
1149
+ # require "google/cloud/ai_platform/v1"
1150
+ #
1151
+ # # Create a client object. The client can be reused for multiple calls.
1152
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
1153
+ #
1154
+ # # Create a request. To set request fields, pass in keyword arguments.
1155
+ # request = Google::Cloud::AIPlatform::V1::GetDatasetVersionRequest.new
1156
+ #
1157
+ # # Call the get_dataset_version method.
1158
+ # result = client.get_dataset_version request
1159
+ #
1160
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::DatasetVersion.
1161
+ # p result
1162
+ #
1163
+ def get_dataset_version request, options = nil
1164
+ raise ::ArgumentError, "request must be provided" if request.nil?
1165
+
1166
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetDatasetVersionRequest
1167
+
1168
+ # Converts hash and nil to an options object
1169
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1170
+
1171
+ # Customize the options with defaults
1172
+ call_metadata = @config.rpcs.get_dataset_version.metadata.to_h
1173
+
1174
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1175
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1176
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1177
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1178
+ transports_version_send: [:rest]
1179
+
1180
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1181
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1182
+
1183
+ options.apply_defaults timeout: @config.rpcs.get_dataset_version.timeout,
1184
+ metadata: call_metadata,
1185
+ retry_policy: @config.rpcs.get_dataset_version.retry_policy
1186
+
1187
+ options.apply_defaults timeout: @config.timeout,
1188
+ metadata: @config.metadata,
1189
+ retry_policy: @config.retry_policy
1190
+
1191
+ @dataset_service_stub.get_dataset_version request, options do |result, operation|
1192
+ yield result, operation if block_given?
1193
+ return result
1194
+ end
1195
+ rescue ::Gapic::Rest::Error => e
1196
+ raise ::Google::Cloud::Error.from_error(e)
1197
+ end
1198
+
1199
+ ##
1200
+ # Lists DatasetVersions in a Dataset.
1201
+ #
1202
+ # @overload list_dataset_versions(request, options = nil)
1203
+ # Pass arguments to `list_dataset_versions` via a request object, either of type
1204
+ # {::Google::Cloud::AIPlatform::V1::ListDatasetVersionsRequest} or an equivalent Hash.
1205
+ #
1206
+ # @param request [::Google::Cloud::AIPlatform::V1::ListDatasetVersionsRequest, ::Hash]
1207
+ # A request object representing the call parameters. Required. To specify no
1208
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1209
+ # @param options [::Gapic::CallOptions, ::Hash]
1210
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1211
+ #
1212
+ # @overload list_dataset_versions(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil)
1213
+ # Pass arguments to `list_dataset_versions` via keyword arguments. Note that at
1214
+ # least one keyword argument is required. To specify no parameters, or to keep all
1215
+ # the default parameter values, pass an empty Hash as a request object (see above).
1216
+ #
1217
+ # @param parent [::String]
1218
+ # Required. The resource name of the Dataset to list DatasetVersions from.
1219
+ # Format:
1220
+ # `projects/{project}/locations/{location}/datasets/{dataset}`
1221
+ # @param filter [::String]
1222
+ # Optional. The standard list filter.
1223
+ # @param page_size [::Integer]
1224
+ # Optional. The standard list page size.
1225
+ # @param page_token [::String]
1226
+ # Optional. The standard list page token.
1227
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
1228
+ # Optional. Mask specifying which fields to read.
1229
+ # @param order_by [::String]
1230
+ # Optional. A comma-separated list of fields to order by, sorted in ascending
1231
+ # order. Use "desc" after a field name for descending.
1232
+ # @yield [result, operation] Access the result along with the TransportOperation object
1233
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DatasetVersion>]
1234
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1235
+ #
1236
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DatasetVersion>]
1237
+ #
1238
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1239
+ #
1240
+ # @example Basic example
1241
+ # require "google/cloud/ai_platform/v1"
1242
+ #
1243
+ # # Create a client object. The client can be reused for multiple calls.
1244
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
1245
+ #
1246
+ # # Create a request. To set request fields, pass in keyword arguments.
1247
+ # request = Google::Cloud::AIPlatform::V1::ListDatasetVersionsRequest.new
1248
+ #
1249
+ # # Call the list_dataset_versions method.
1250
+ # result = client.list_dataset_versions request
1251
+ #
1252
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1253
+ # # over elements, and API calls will be issued to fetch pages as needed.
1254
+ # result.each do |item|
1255
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::DatasetVersion.
1256
+ # p item
1257
+ # end
1258
+ #
1259
+ def list_dataset_versions request, options = nil
1260
+ raise ::ArgumentError, "request must be provided" if request.nil?
1261
+
1262
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListDatasetVersionsRequest
1263
+
1264
+ # Converts hash and nil to an options object
1265
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1266
+
1267
+ # Customize the options with defaults
1268
+ call_metadata = @config.rpcs.list_dataset_versions.metadata.to_h
1269
+
1270
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1271
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1272
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1273
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1274
+ transports_version_send: [:rest]
1275
+
1276
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1277
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1278
+
1279
+ options.apply_defaults timeout: @config.rpcs.list_dataset_versions.timeout,
1280
+ metadata: call_metadata,
1281
+ retry_policy: @config.rpcs.list_dataset_versions.retry_policy
1282
+
1283
+ options.apply_defaults timeout: @config.timeout,
1284
+ metadata: @config.metadata,
1285
+ retry_policy: @config.retry_policy
1286
+
1287
+ @dataset_service_stub.list_dataset_versions request, options do |result, operation|
1288
+ result = ::Gapic::Rest::PagedEnumerable.new @dataset_service_stub, :list_dataset_versions, "dataset_versions", request, result, options
1289
+ yield result, operation if block_given?
1290
+ return result
1291
+ end
1292
+ rescue ::Gapic::Rest::Error => e
1293
+ raise ::Google::Cloud::Error.from_error(e)
1294
+ end
1295
+
1296
+ ##
1297
+ # Restores a dataset version.
1298
+ #
1299
+ # @overload restore_dataset_version(request, options = nil)
1300
+ # Pass arguments to `restore_dataset_version` via a request object, either of type
1301
+ # {::Google::Cloud::AIPlatform::V1::RestoreDatasetVersionRequest} or an equivalent Hash.
1302
+ #
1303
+ # @param request [::Google::Cloud::AIPlatform::V1::RestoreDatasetVersionRequest, ::Hash]
1304
+ # A request object representing the call parameters. Required. To specify no
1305
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1306
+ # @param options [::Gapic::CallOptions, ::Hash]
1307
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1308
+ #
1309
+ # @overload restore_dataset_version(name: nil)
1310
+ # Pass arguments to `restore_dataset_version` via keyword arguments. Note that at
1311
+ # least one keyword argument is required. To specify no parameters, or to keep all
1312
+ # the default parameter values, pass an empty Hash as a request object (see above).
1313
+ #
1314
+ # @param name [::String]
1315
+ # Required. The name of the DatasetVersion resource.
1316
+ # Format:
1317
+ # `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
1318
+ # @yield [result, operation] Access the result along with the TransportOperation object
1319
+ # @yieldparam result [::Gapic::Operation]
1320
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1321
+ #
1322
+ # @return [::Gapic::Operation]
1323
+ #
1324
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1325
+ #
1326
+ # @example Basic example
1327
+ # require "google/cloud/ai_platform/v1"
1328
+ #
1329
+ # # Create a client object. The client can be reused for multiple calls.
1330
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
1331
+ #
1332
+ # # Create a request. To set request fields, pass in keyword arguments.
1333
+ # request = Google::Cloud::AIPlatform::V1::RestoreDatasetVersionRequest.new
1334
+ #
1335
+ # # Call the restore_dataset_version method.
1336
+ # result = client.restore_dataset_version request
1337
+ #
1338
+ # # The returned object is of type Gapic::Operation. You can use it to
1339
+ # # check the status of an operation, cancel it, or wait for results.
1340
+ # # Here is how to wait for a response.
1341
+ # result.wait_until_done! timeout: 60
1342
+ # if result.response?
1343
+ # p result.response
1344
+ # else
1345
+ # puts "No response received."
1346
+ # end
1347
+ #
1348
+ def restore_dataset_version request, options = nil
1349
+ raise ::ArgumentError, "request must be provided" if request.nil?
1350
+
1351
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::RestoreDatasetVersionRequest
1352
+
1353
+ # Converts hash and nil to an options object
1354
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1355
+
1356
+ # Customize the options with defaults
1357
+ call_metadata = @config.rpcs.restore_dataset_version.metadata.to_h
1358
+
1359
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1360
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1361
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1362
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1363
+ transports_version_send: [:rest]
1364
+
1365
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1366
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1367
+
1368
+ options.apply_defaults timeout: @config.rpcs.restore_dataset_version.timeout,
1369
+ metadata: call_metadata,
1370
+ retry_policy: @config.rpcs.restore_dataset_version.retry_policy
1371
+
1372
+ options.apply_defaults timeout: @config.timeout,
1373
+ metadata: @config.metadata,
1374
+ retry_policy: @config.retry_policy
1375
+
1376
+ @dataset_service_stub.restore_dataset_version request, options do |result, operation|
1377
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1378
+ yield result, operation if block_given?
1379
+ return result
1380
+ end
1381
+ rescue ::Gapic::Rest::Error => e
1382
+ raise ::Google::Cloud::Error.from_error(e)
1383
+ end
1384
+
1385
+ ##
1386
+ # Lists DataItems in a Dataset.
1387
+ #
1388
+ # @overload list_data_items(request, options = nil)
1389
+ # Pass arguments to `list_data_items` via a request object, either of type
1390
+ # {::Google::Cloud::AIPlatform::V1::ListDataItemsRequest} or an equivalent Hash.
1391
+ #
1392
+ # @param request [::Google::Cloud::AIPlatform::V1::ListDataItemsRequest, ::Hash]
1393
+ # A request object representing the call parameters. Required. To specify no
1394
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1395
+ # @param options [::Gapic::CallOptions, ::Hash]
1396
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1397
+ #
1398
+ # @overload list_data_items(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil)
1399
+ # Pass arguments to `list_data_items` via keyword arguments. Note that at
1400
+ # least one keyword argument is required. To specify no parameters, or to keep all
1401
+ # the default parameter values, pass an empty Hash as a request object (see above).
1402
+ #
1403
+ # @param parent [::String]
1404
+ # Required. The resource name of the Dataset to list DataItems from.
1405
+ # Format:
1406
+ # `projects/{project}/locations/{location}/datasets/{dataset}`
1407
+ # @param filter [::String]
1408
+ # The standard list filter.
1409
+ # @param page_size [::Integer]
1410
+ # The standard list page size.
1411
+ # @param page_token [::String]
1412
+ # The standard list page token.
1413
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
1414
+ # Mask specifying which fields to read.
1415
+ # @param order_by [::String]
1416
+ # A comma-separated list of fields to order by, sorted in ascending order.
1417
+ # Use "desc" after a field name for descending.
1418
+ # @yield [result, operation] Access the result along with the TransportOperation object
1419
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItem>]
1420
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1421
+ #
1422
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItem>]
1423
+ #
1424
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1425
+ #
1426
+ # @example Basic example
1427
+ # require "google/cloud/ai_platform/v1"
1428
+ #
1429
+ # # Create a client object. The client can be reused for multiple calls.
1430
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
1431
+ #
1432
+ # # Create a request. To set request fields, pass in keyword arguments.
1433
+ # request = Google::Cloud::AIPlatform::V1::ListDataItemsRequest.new
1434
+ #
1435
+ # # Call the list_data_items method.
1436
+ # result = client.list_data_items request
1437
+ #
1438
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1439
+ # # over elements, and API calls will be issued to fetch pages as needed.
1440
+ # result.each do |item|
1441
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::DataItem.
1442
+ # p item
1443
+ # end
1444
+ #
1445
+ def list_data_items request, options = nil
1446
+ raise ::ArgumentError, "request must be provided" if request.nil?
1447
+
1448
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListDataItemsRequest
1449
+
1450
+ # Converts hash and nil to an options object
1451
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1452
+
1453
+ # Customize the options with defaults
1454
+ call_metadata = @config.rpcs.list_data_items.metadata.to_h
1455
+
1456
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1457
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1458
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1459
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1460
+ transports_version_send: [:rest]
1461
+
1462
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1463
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1464
+
1465
+ options.apply_defaults timeout: @config.rpcs.list_data_items.timeout,
1466
+ metadata: call_metadata,
1467
+ retry_policy: @config.rpcs.list_data_items.retry_policy
1468
+
1469
+ options.apply_defaults timeout: @config.timeout,
1470
+ metadata: @config.metadata,
1471
+ retry_policy: @config.retry_policy
1472
+
1473
+ @dataset_service_stub.list_data_items request, options do |result, operation|
1474
+ result = ::Gapic::Rest::PagedEnumerable.new @dataset_service_stub, :list_data_items, "data_items", request, result, options
1475
+ yield result, operation if block_given?
1476
+ return result
1477
+ end
1478
+ rescue ::Gapic::Rest::Error => e
1479
+ raise ::Google::Cloud::Error.from_error(e)
1480
+ end
1481
+
1482
+ ##
1483
+ # Searches DataItems in a Dataset.
1484
+ #
1485
+ # @overload search_data_items(request, options = nil)
1486
+ # Pass arguments to `search_data_items` via a request object, either of type
1487
+ # {::Google::Cloud::AIPlatform::V1::SearchDataItemsRequest} or an equivalent Hash.
1488
+ #
1489
+ # @param request [::Google::Cloud::AIPlatform::V1::SearchDataItemsRequest, ::Hash]
1490
+ # A request object representing the call parameters. Required. To specify no
1491
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1492
+ # @param options [::Gapic::CallOptions, ::Hash]
1493
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1494
+ #
1495
+ # @overload search_data_items(order_by_data_item: nil, order_by_annotation: nil, dataset: nil, saved_query: nil, data_labeling_job: nil, data_item_filter: nil, annotations_filter: nil, annotation_filters: nil, field_mask: nil, annotations_limit: nil, page_size: nil, order_by: nil, page_token: nil)
1496
+ # Pass arguments to `search_data_items` via keyword arguments. Note that at
1497
+ # least one keyword argument is required. To specify no parameters, or to keep all
1498
+ # the default parameter values, pass an empty Hash as a request object (see above).
1499
+ #
1500
+ # @param order_by_data_item [::String]
1501
+ # A comma-separated list of data item fields to order by, sorted in
1502
+ # ascending order. Use "desc" after a field name for descending.
1503
+ # @param order_by_annotation [::Google::Cloud::AIPlatform::V1::SearchDataItemsRequest::OrderByAnnotation, ::Hash]
1504
+ # Expression that allows ranking results based on annotation's property.
1505
+ # @param dataset [::String]
1506
+ # Required. The resource name of the Dataset from which to search DataItems.
1507
+ # Format:
1508
+ # `projects/{project}/locations/{location}/datasets/{dataset}`
1509
+ # @param saved_query [::String]
1510
+ # The resource name of a SavedQuery(annotation set in UI).
1511
+ # Format:
1512
+ # `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}`
1513
+ # All of the search will be done in the context of this SavedQuery.
1514
+ # @param data_labeling_job [::String]
1515
+ # The resource name of a DataLabelingJob.
1516
+ # Format:
1517
+ # `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
1518
+ # If this field is set, all of the search will be done in the context of
1519
+ # this DataLabelingJob.
1520
+ # @param data_item_filter [::String]
1521
+ # An expression for filtering the DataItem that will be returned.
1522
+ #
1523
+ # * `data_item_id` - for = or !=.
1524
+ # * `labeled` - for = or !=.
1525
+ # * `has_annotation(ANNOTATION_SPEC_ID)` - true only for DataItem that
1526
+ # have at least one annotation with annotation_spec_id =
1527
+ # `ANNOTATION_SPEC_ID` in the context of SavedQuery or DataLabelingJob.
1528
+ #
1529
+ # For example:
1530
+ #
1531
+ # * `data_item=1`
1532
+ # * `has_annotation(5)`
1533
+ # @param annotations_filter [::String]
1534
+ # An expression for filtering the Annotations that will be returned per
1535
+ # DataItem.
1536
+ # * `annotation_spec_id` - for = or !=.
1537
+ # @param annotation_filters [::Array<::String>]
1538
+ # An expression that specifies what Annotations will be returned per
1539
+ # DataItem. Annotations satisfied either of the conditions will be returned.
1540
+ # * `annotation_spec_id` - for = or !=.
1541
+ # Must specify `saved_query_id=` - saved query id that annotations should
1542
+ # belong to.
1543
+ # @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
1544
+ # Mask specifying which fields of
1545
+ # {::Google::Cloud::AIPlatform::V1::DataItemView DataItemView} to read.
1546
+ # @param annotations_limit [::Integer]
1547
+ # If set, only up to this many of Annotations will be returned per
1548
+ # DataItemView. The maximum value is 1000. If not set, the maximum value will
1549
+ # be used.
1550
+ # @param page_size [::Integer]
1551
+ # Requested page size. Server may return fewer results than requested.
1552
+ # Default and maximum page size is 100.
1553
+ # @param order_by [::String]
1554
+ # A comma-separated list of fields to order by, sorted in ascending order.
1555
+ # Use "desc" after a field name for descending.
1556
+ # @param page_token [::String]
1557
+ # A token identifying a page of results for the server to return
1558
+ # Typically obtained via
1559
+ # {::Google::Cloud::AIPlatform::V1::SearchDataItemsResponse#next_page_token SearchDataItemsResponse.next_page_token}
1560
+ # of the previous
1561
+ # {::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client#search_data_items DatasetService.SearchDataItems}
1562
+ # call.
1563
+ # @yield [result, operation] Access the result along with the TransportOperation object
1564
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItemView>]
1565
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1566
+ #
1567
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItemView>]
1568
+ #
1569
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1570
+ #
1571
+ # @example Basic example
1572
+ # require "google/cloud/ai_platform/v1"
1573
+ #
1574
+ # # Create a client object. The client can be reused for multiple calls.
1575
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
1576
+ #
1577
+ # # Create a request. To set request fields, pass in keyword arguments.
1578
+ # request = Google::Cloud::AIPlatform::V1::SearchDataItemsRequest.new
1579
+ #
1580
+ # # Call the search_data_items method.
1581
+ # result = client.search_data_items request
1582
+ #
1583
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1584
+ # # over elements, and API calls will be issued to fetch pages as needed.
1585
+ # result.each do |item|
1586
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::DataItemView.
1587
+ # p item
1588
+ # end
1589
+ #
1590
+ def search_data_items request, options = nil
1591
+ raise ::ArgumentError, "request must be provided" if request.nil?
1592
+
1593
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::SearchDataItemsRequest
1594
+
1595
+ # Converts hash and nil to an options object
1596
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1597
+
1598
+ # Customize the options with defaults
1599
+ call_metadata = @config.rpcs.search_data_items.metadata.to_h
1600
+
1601
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1602
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1603
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1604
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1605
+ transports_version_send: [:rest]
1606
+
1607
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1608
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1609
+
1610
+ options.apply_defaults timeout: @config.rpcs.search_data_items.timeout,
1611
+ metadata: call_metadata,
1612
+ retry_policy: @config.rpcs.search_data_items.retry_policy
1613
+
1614
+ options.apply_defaults timeout: @config.timeout,
1615
+ metadata: @config.metadata,
1616
+ retry_policy: @config.retry_policy
1617
+
1618
+ @dataset_service_stub.search_data_items request, options do |result, operation|
1619
+ result = ::Gapic::Rest::PagedEnumerable.new @dataset_service_stub, :search_data_items, "data_item_views", request, result, options
1620
+ yield result, operation if block_given?
1621
+ return result
1622
+ end
1623
+ rescue ::Gapic::Rest::Error => e
1624
+ raise ::Google::Cloud::Error.from_error(e)
1625
+ end
1626
+
1627
+ ##
1628
+ # Lists SavedQueries in a Dataset.
1629
+ #
1630
+ # @overload list_saved_queries(request, options = nil)
1631
+ # Pass arguments to `list_saved_queries` via a request object, either of type
1632
+ # {::Google::Cloud::AIPlatform::V1::ListSavedQueriesRequest} or an equivalent Hash.
1633
+ #
1634
+ # @param request [::Google::Cloud::AIPlatform::V1::ListSavedQueriesRequest, ::Hash]
1635
+ # A request object representing the call parameters. Required. To specify no
1636
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1637
+ # @param options [::Gapic::CallOptions, ::Hash]
1638
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1639
+ #
1640
+ # @overload list_saved_queries(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil)
1641
+ # Pass arguments to `list_saved_queries` via keyword arguments. Note that at
1642
+ # least one keyword argument is required. To specify no parameters, or to keep all
1643
+ # the default parameter values, pass an empty Hash as a request object (see above).
1644
+ #
1645
+ # @param parent [::String]
1646
+ # Required. The resource name of the Dataset to list SavedQueries from.
1647
+ # Format:
1648
+ # `projects/{project}/locations/{location}/datasets/{dataset}`
1649
+ # @param filter [::String]
1650
+ # The standard list filter.
1651
+ # @param page_size [::Integer]
1652
+ # The standard list page size.
1653
+ # @param page_token [::String]
1654
+ # The standard list page token.
1655
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
1656
+ # Mask specifying which fields to read.
1657
+ # @param order_by [::String]
1658
+ # A comma-separated list of fields to order by, sorted in ascending order.
1659
+ # Use "desc" after a field name for descending.
1660
+ # @yield [result, operation] Access the result along with the TransportOperation object
1661
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::SavedQuery>]
1662
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1663
+ #
1664
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::SavedQuery>]
1665
+ #
1666
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1667
+ #
1668
+ # @example Basic example
1669
+ # require "google/cloud/ai_platform/v1"
1670
+ #
1671
+ # # Create a client object. The client can be reused for multiple calls.
1672
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
1673
+ #
1674
+ # # Create a request. To set request fields, pass in keyword arguments.
1675
+ # request = Google::Cloud::AIPlatform::V1::ListSavedQueriesRequest.new
1676
+ #
1677
+ # # Call the list_saved_queries method.
1678
+ # result = client.list_saved_queries request
1679
+ #
1680
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1681
+ # # over elements, and API calls will be issued to fetch pages as needed.
1682
+ # result.each do |item|
1683
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::SavedQuery.
1684
+ # p item
1685
+ # end
1686
+ #
1687
+ def list_saved_queries request, options = nil
1688
+ raise ::ArgumentError, "request must be provided" if request.nil?
1689
+
1690
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListSavedQueriesRequest
1691
+
1692
+ # Converts hash and nil to an options object
1693
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1694
+
1695
+ # Customize the options with defaults
1696
+ call_metadata = @config.rpcs.list_saved_queries.metadata.to_h
1697
+
1698
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1699
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1700
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1701
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1702
+ transports_version_send: [:rest]
1703
+
1704
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1705
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1706
+
1707
+ options.apply_defaults timeout: @config.rpcs.list_saved_queries.timeout,
1708
+ metadata: call_metadata,
1709
+ retry_policy: @config.rpcs.list_saved_queries.retry_policy
1710
+
1711
+ options.apply_defaults timeout: @config.timeout,
1712
+ metadata: @config.metadata,
1713
+ retry_policy: @config.retry_policy
1714
+
1715
+ @dataset_service_stub.list_saved_queries request, options do |result, operation|
1716
+ result = ::Gapic::Rest::PagedEnumerable.new @dataset_service_stub, :list_saved_queries, "saved_queries", request, result, options
1717
+ yield result, operation if block_given?
1718
+ return result
1719
+ end
1720
+ rescue ::Gapic::Rest::Error => e
1721
+ raise ::Google::Cloud::Error.from_error(e)
1722
+ end
1723
+
1724
+ ##
1725
+ # Deletes a SavedQuery.
1726
+ #
1727
+ # @overload delete_saved_query(request, options = nil)
1728
+ # Pass arguments to `delete_saved_query` via a request object, either of type
1729
+ # {::Google::Cloud::AIPlatform::V1::DeleteSavedQueryRequest} or an equivalent Hash.
1730
+ #
1731
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteSavedQueryRequest, ::Hash]
1732
+ # A request object representing the call parameters. Required. To specify no
1733
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1734
+ # @param options [::Gapic::CallOptions, ::Hash]
1735
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1736
+ #
1737
+ # @overload delete_saved_query(name: nil)
1738
+ # Pass arguments to `delete_saved_query` via keyword arguments. Note that at
1739
+ # least one keyword argument is required. To specify no parameters, or to keep all
1740
+ # the default parameter values, pass an empty Hash as a request object (see above).
1741
+ #
1742
+ # @param name [::String]
1743
+ # Required. The resource name of the SavedQuery to delete.
1744
+ # Format:
1745
+ # `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}`
1746
+ # @yield [result, operation] Access the result along with the TransportOperation object
1747
+ # @yieldparam result [::Gapic::Operation]
1748
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1749
+ #
1750
+ # @return [::Gapic::Operation]
1751
+ #
1752
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1753
+ #
1754
+ # @example Basic example
1755
+ # require "google/cloud/ai_platform/v1"
1756
+ #
1757
+ # # Create a client object. The client can be reused for multiple calls.
1758
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
1759
+ #
1760
+ # # Create a request. To set request fields, pass in keyword arguments.
1761
+ # request = Google::Cloud::AIPlatform::V1::DeleteSavedQueryRequest.new
1762
+ #
1763
+ # # Call the delete_saved_query method.
1764
+ # result = client.delete_saved_query request
1765
+ #
1766
+ # # The returned object is of type Gapic::Operation. You can use it to
1767
+ # # check the status of an operation, cancel it, or wait for results.
1768
+ # # Here is how to wait for a response.
1769
+ # result.wait_until_done! timeout: 60
1770
+ # if result.response?
1771
+ # p result.response
1772
+ # else
1773
+ # puts "No response received."
1774
+ # end
1775
+ #
1776
+ def delete_saved_query request, options = nil
1777
+ raise ::ArgumentError, "request must be provided" if request.nil?
1778
+
1779
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteSavedQueryRequest
1780
+
1781
+ # Converts hash and nil to an options object
1782
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1783
+
1784
+ # Customize the options with defaults
1785
+ call_metadata = @config.rpcs.delete_saved_query.metadata.to_h
1786
+
1787
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1788
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1789
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1790
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1791
+ transports_version_send: [:rest]
1792
+
1793
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1794
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1795
+
1796
+ options.apply_defaults timeout: @config.rpcs.delete_saved_query.timeout,
1797
+ metadata: call_metadata,
1798
+ retry_policy: @config.rpcs.delete_saved_query.retry_policy
1799
+
1800
+ options.apply_defaults timeout: @config.timeout,
1801
+ metadata: @config.metadata,
1802
+ retry_policy: @config.retry_policy
1803
+
1804
+ @dataset_service_stub.delete_saved_query request, options do |result, operation|
1805
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1806
+ yield result, operation if block_given?
1807
+ return result
1808
+ end
1809
+ rescue ::Gapic::Rest::Error => e
1810
+ raise ::Google::Cloud::Error.from_error(e)
1811
+ end
1812
+
1813
+ ##
1814
+ # Gets an AnnotationSpec.
1815
+ #
1816
+ # @overload get_annotation_spec(request, options = nil)
1817
+ # Pass arguments to `get_annotation_spec` via a request object, either of type
1818
+ # {::Google::Cloud::AIPlatform::V1::GetAnnotationSpecRequest} or an equivalent Hash.
1819
+ #
1820
+ # @param request [::Google::Cloud::AIPlatform::V1::GetAnnotationSpecRequest, ::Hash]
1821
+ # A request object representing the call parameters. Required. To specify no
1822
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1823
+ # @param options [::Gapic::CallOptions, ::Hash]
1824
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1825
+ #
1826
+ # @overload get_annotation_spec(name: nil, read_mask: nil)
1827
+ # Pass arguments to `get_annotation_spec` via keyword arguments. Note that at
1828
+ # least one keyword argument is required. To specify no parameters, or to keep all
1829
+ # the default parameter values, pass an empty Hash as a request object (see above).
1830
+ #
1831
+ # @param name [::String]
1832
+ # Required. The name of the AnnotationSpec resource.
1833
+ # Format:
1834
+ # `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}`
1835
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
1836
+ # Mask specifying which fields to read.
1837
+ # @yield [result, operation] Access the result along with the TransportOperation object
1838
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::AnnotationSpec]
1839
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1840
+ #
1841
+ # @return [::Google::Cloud::AIPlatform::V1::AnnotationSpec]
1842
+ #
1843
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1844
+ #
1845
+ # @example Basic example
1846
+ # require "google/cloud/ai_platform/v1"
1847
+ #
1848
+ # # Create a client object. The client can be reused for multiple calls.
1849
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
1850
+ #
1851
+ # # Create a request. To set request fields, pass in keyword arguments.
1852
+ # request = Google::Cloud::AIPlatform::V1::GetAnnotationSpecRequest.new
1853
+ #
1854
+ # # Call the get_annotation_spec method.
1855
+ # result = client.get_annotation_spec request
1856
+ #
1857
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::AnnotationSpec.
1858
+ # p result
1859
+ #
1860
+ def get_annotation_spec request, options = nil
1861
+ raise ::ArgumentError, "request must be provided" if request.nil?
1862
+
1863
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetAnnotationSpecRequest
1864
+
1865
+ # Converts hash and nil to an options object
1866
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1867
+
1868
+ # Customize the options with defaults
1869
+ call_metadata = @config.rpcs.get_annotation_spec.metadata.to_h
1870
+
1871
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1872
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1873
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1874
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1875
+ transports_version_send: [:rest]
1876
+
1877
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1878
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1879
+
1880
+ options.apply_defaults timeout: @config.rpcs.get_annotation_spec.timeout,
1881
+ metadata: call_metadata,
1882
+ retry_policy: @config.rpcs.get_annotation_spec.retry_policy
1883
+
1884
+ options.apply_defaults timeout: @config.timeout,
1885
+ metadata: @config.metadata,
1886
+ retry_policy: @config.retry_policy
1887
+
1888
+ @dataset_service_stub.get_annotation_spec request, options do |result, operation|
1889
+ yield result, operation if block_given?
1890
+ return result
1891
+ end
1892
+ rescue ::Gapic::Rest::Error => e
1893
+ raise ::Google::Cloud::Error.from_error(e)
1894
+ end
1895
+
1896
+ ##
1897
+ # Lists Annotations belongs to a dataitem
1898
+ #
1899
+ # @overload list_annotations(request, options = nil)
1900
+ # Pass arguments to `list_annotations` via a request object, either of type
1901
+ # {::Google::Cloud::AIPlatform::V1::ListAnnotationsRequest} or an equivalent Hash.
1902
+ #
1903
+ # @param request [::Google::Cloud::AIPlatform::V1::ListAnnotationsRequest, ::Hash]
1904
+ # A request object representing the call parameters. Required. To specify no
1905
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1906
+ # @param options [::Gapic::CallOptions, ::Hash]
1907
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1908
+ #
1909
+ # @overload list_annotations(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil)
1910
+ # Pass arguments to `list_annotations` via keyword arguments. Note that at
1911
+ # least one keyword argument is required. To specify no parameters, or to keep all
1912
+ # the default parameter values, pass an empty Hash as a request object (see above).
1913
+ #
1914
+ # @param parent [::String]
1915
+ # Required. The resource name of the DataItem to list Annotations from.
1916
+ # Format:
1917
+ # `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}`
1918
+ # @param filter [::String]
1919
+ # The standard list filter.
1920
+ # @param page_size [::Integer]
1921
+ # The standard list page size.
1922
+ # @param page_token [::String]
1923
+ # The standard list page token.
1924
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
1925
+ # Mask specifying which fields to read.
1926
+ # @param order_by [::String]
1927
+ # A comma-separated list of fields to order by, sorted in ascending order.
1928
+ # Use "desc" after a field name for descending.
1929
+ # @yield [result, operation] Access the result along with the TransportOperation object
1930
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Annotation>]
1931
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1932
+ #
1933
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Annotation>]
1934
+ #
1935
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1936
+ #
1937
+ # @example Basic example
1938
+ # require "google/cloud/ai_platform/v1"
1939
+ #
1940
+ # # Create a client object. The client can be reused for multiple calls.
1941
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
1942
+ #
1943
+ # # Create a request. To set request fields, pass in keyword arguments.
1944
+ # request = Google::Cloud::AIPlatform::V1::ListAnnotationsRequest.new
1945
+ #
1946
+ # # Call the list_annotations method.
1947
+ # result = client.list_annotations request
1948
+ #
1949
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1950
+ # # over elements, and API calls will be issued to fetch pages as needed.
1951
+ # result.each do |item|
1952
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::Annotation.
1953
+ # p item
1954
+ # end
1955
+ #
1956
+ def list_annotations request, options = nil
1957
+ raise ::ArgumentError, "request must be provided" if request.nil?
1958
+
1959
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListAnnotationsRequest
1960
+
1961
+ # Converts hash and nil to an options object
1962
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1963
+
1964
+ # Customize the options with defaults
1965
+ call_metadata = @config.rpcs.list_annotations.metadata.to_h
1966
+
1967
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1968
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1969
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1970
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1971
+ transports_version_send: [:rest]
1972
+
1973
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1974
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1975
+
1976
+ options.apply_defaults timeout: @config.rpcs.list_annotations.timeout,
1977
+ metadata: call_metadata,
1978
+ retry_policy: @config.rpcs.list_annotations.retry_policy
1979
+
1980
+ options.apply_defaults timeout: @config.timeout,
1981
+ metadata: @config.metadata,
1982
+ retry_policy: @config.retry_policy
1983
+
1984
+ @dataset_service_stub.list_annotations request, options do |result, operation|
1985
+ result = ::Gapic::Rest::PagedEnumerable.new @dataset_service_stub, :list_annotations, "annotations", request, result, options
1986
+ yield result, operation if block_given?
1987
+ return result
1988
+ end
1989
+ rescue ::Gapic::Rest::Error => e
1990
+ raise ::Google::Cloud::Error.from_error(e)
1991
+ end
1992
+
1993
+ ##
1994
+ # Configuration class for the DatasetService REST API.
1995
+ #
1996
+ # This class represents the configuration for DatasetService REST,
1997
+ # providing control over timeouts, retry behavior, logging, transport
1998
+ # parameters, and other low-level controls. Certain parameters can also be
1999
+ # applied individually to specific RPCs. See
2000
+ # {::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client::Configuration::Rpcs}
2001
+ # for a list of RPCs that can be configured independently.
2002
+ #
2003
+ # Configuration can be applied globally to all clients, or to a single client
2004
+ # on construction.
2005
+ #
2006
+ # @example
2007
+ #
2008
+ # # Modify the global config, setting the timeout for
2009
+ # # create_dataset to 20 seconds,
2010
+ # # and all remaining timeouts to 10 seconds.
2011
+ # ::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.configure do |config|
2012
+ # config.timeout = 10.0
2013
+ # config.rpcs.create_dataset.timeout = 20.0
2014
+ # end
2015
+ #
2016
+ # # Apply the above configuration only to a new client.
2017
+ # client = ::Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new do |config|
2018
+ # config.timeout = 10.0
2019
+ # config.rpcs.create_dataset.timeout = 20.0
2020
+ # end
2021
+ #
2022
+ # @!attribute [rw] endpoint
2023
+ # A custom service endpoint, as a hostname or hostname:port. The default is
2024
+ # nil, indicating to use the default endpoint in the current universe domain.
2025
+ # @return [::String,nil]
2026
+ # @!attribute [rw] credentials
2027
+ # Credentials to send with calls. You may provide any of the following types:
2028
+ # * (`String`) The path to a service account key file in JSON format
2029
+ # * (`Hash`) A service account key as a Hash
2030
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
2031
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
2032
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2033
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2034
+ # * (`nil`) indicating no credentials
2035
+ # @return [::Object]
2036
+ # @!attribute [rw] scope
2037
+ # The OAuth scopes
2038
+ # @return [::Array<::String>]
2039
+ # @!attribute [rw] lib_name
2040
+ # The library name as recorded in instrumentation and logging
2041
+ # @return [::String]
2042
+ # @!attribute [rw] lib_version
2043
+ # The library version as recorded in instrumentation and logging
2044
+ # @return [::String]
2045
+ # @!attribute [rw] timeout
2046
+ # The call timeout in seconds.
2047
+ # @return [::Numeric]
2048
+ # @!attribute [rw] metadata
2049
+ # Additional headers to be sent with the call.
2050
+ # @return [::Hash{::Symbol=>::String}]
2051
+ # @!attribute [rw] retry_policy
2052
+ # The retry policy. The value is a hash with the following keys:
2053
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2054
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2055
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2056
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2057
+ # trigger a retry.
2058
+ # @return [::Hash]
2059
+ # @!attribute [rw] quota_project
2060
+ # A separate project against which to charge quota.
2061
+ # @return [::String]
2062
+ # @!attribute [rw] universe_domain
2063
+ # The universe domain within which to make requests. This determines the
2064
+ # default endpoint URL. The default value of nil uses the environment
2065
+ # universe (usually the default "googleapis.com" universe).
2066
+ # @return [::String,nil]
2067
+ #
2068
+ class Configuration
2069
+ extend ::Gapic::Config
2070
+
2071
+ # @private
2072
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
2073
+ DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
2074
+
2075
+ config_attr :endpoint, nil, ::String, nil
2076
+ config_attr :credentials, nil do |value|
2077
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
2078
+ allowed.any? { |klass| klass === value }
2079
+ end
2080
+ config_attr :scope, nil, ::String, ::Array, nil
2081
+ config_attr :lib_name, nil, ::String, nil
2082
+ config_attr :lib_version, nil, ::String, nil
2083
+ config_attr :timeout, nil, ::Numeric, nil
2084
+ config_attr :metadata, nil, ::Hash, nil
2085
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2086
+ config_attr :quota_project, nil, ::String, nil
2087
+ config_attr :universe_domain, nil, ::String, nil
2088
+
2089
+ # @private
2090
+ # Overrides for http bindings for the RPCs of this service
2091
+ # are only used when this service is used as mixin, and only
2092
+ # by the host service.
2093
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
2094
+ config_attr :bindings_override, {}, ::Hash, nil
2095
+
2096
+ # @private
2097
+ def initialize parent_config = nil
2098
+ @parent_config = parent_config unless parent_config.nil?
2099
+
2100
+ yield self if block_given?
2101
+ end
2102
+
2103
+ ##
2104
+ # Configurations for individual RPCs
2105
+ # @return [Rpcs]
2106
+ #
2107
+ def rpcs
2108
+ @rpcs ||= begin
2109
+ parent_rpcs = nil
2110
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
2111
+ Rpcs.new parent_rpcs
2112
+ end
2113
+ end
2114
+
2115
+ ##
2116
+ # Configuration RPC class for the DatasetService API.
2117
+ #
2118
+ # Includes fields providing the configuration for each RPC in this service.
2119
+ # Each configuration object is of type `Gapic::Config::Method` and includes
2120
+ # the following configuration fields:
2121
+ #
2122
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
2123
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
2124
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
2125
+ # include the following keys:
2126
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
2127
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
2128
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
2129
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
2130
+ # trigger a retry.
2131
+ #
2132
+ class Rpcs
2133
+ ##
2134
+ # RPC-specific configuration for `create_dataset`
2135
+ # @return [::Gapic::Config::Method]
2136
+ #
2137
+ attr_reader :create_dataset
2138
+ ##
2139
+ # RPC-specific configuration for `get_dataset`
2140
+ # @return [::Gapic::Config::Method]
2141
+ #
2142
+ attr_reader :get_dataset
2143
+ ##
2144
+ # RPC-specific configuration for `update_dataset`
2145
+ # @return [::Gapic::Config::Method]
2146
+ #
2147
+ attr_reader :update_dataset
2148
+ ##
2149
+ # RPC-specific configuration for `list_datasets`
2150
+ # @return [::Gapic::Config::Method]
2151
+ #
2152
+ attr_reader :list_datasets
2153
+ ##
2154
+ # RPC-specific configuration for `delete_dataset`
2155
+ # @return [::Gapic::Config::Method]
2156
+ #
2157
+ attr_reader :delete_dataset
2158
+ ##
2159
+ # RPC-specific configuration for `import_data`
2160
+ # @return [::Gapic::Config::Method]
2161
+ #
2162
+ attr_reader :import_data
2163
+ ##
2164
+ # RPC-specific configuration for `export_data`
2165
+ # @return [::Gapic::Config::Method]
2166
+ #
2167
+ attr_reader :export_data
2168
+ ##
2169
+ # RPC-specific configuration for `create_dataset_version`
2170
+ # @return [::Gapic::Config::Method]
2171
+ #
2172
+ attr_reader :create_dataset_version
2173
+ ##
2174
+ # RPC-specific configuration for `update_dataset_version`
2175
+ # @return [::Gapic::Config::Method]
2176
+ #
2177
+ attr_reader :update_dataset_version
2178
+ ##
2179
+ # RPC-specific configuration for `delete_dataset_version`
2180
+ # @return [::Gapic::Config::Method]
2181
+ #
2182
+ attr_reader :delete_dataset_version
2183
+ ##
2184
+ # RPC-specific configuration for `get_dataset_version`
2185
+ # @return [::Gapic::Config::Method]
2186
+ #
2187
+ attr_reader :get_dataset_version
2188
+ ##
2189
+ # RPC-specific configuration for `list_dataset_versions`
2190
+ # @return [::Gapic::Config::Method]
2191
+ #
2192
+ attr_reader :list_dataset_versions
2193
+ ##
2194
+ # RPC-specific configuration for `restore_dataset_version`
2195
+ # @return [::Gapic::Config::Method]
2196
+ #
2197
+ attr_reader :restore_dataset_version
2198
+ ##
2199
+ # RPC-specific configuration for `list_data_items`
2200
+ # @return [::Gapic::Config::Method]
2201
+ #
2202
+ attr_reader :list_data_items
2203
+ ##
2204
+ # RPC-specific configuration for `search_data_items`
2205
+ # @return [::Gapic::Config::Method]
2206
+ #
2207
+ attr_reader :search_data_items
2208
+ ##
2209
+ # RPC-specific configuration for `list_saved_queries`
2210
+ # @return [::Gapic::Config::Method]
2211
+ #
2212
+ attr_reader :list_saved_queries
2213
+ ##
2214
+ # RPC-specific configuration for `delete_saved_query`
2215
+ # @return [::Gapic::Config::Method]
2216
+ #
2217
+ attr_reader :delete_saved_query
2218
+ ##
2219
+ # RPC-specific configuration for `get_annotation_spec`
2220
+ # @return [::Gapic::Config::Method]
2221
+ #
2222
+ attr_reader :get_annotation_spec
2223
+ ##
2224
+ # RPC-specific configuration for `list_annotations`
2225
+ # @return [::Gapic::Config::Method]
2226
+ #
2227
+ attr_reader :list_annotations
2228
+
2229
+ # @private
2230
+ def initialize parent_rpcs = nil
2231
+ create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset
2232
+ @create_dataset = ::Gapic::Config::Method.new create_dataset_config
2233
+ get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset
2234
+ @get_dataset = ::Gapic::Config::Method.new get_dataset_config
2235
+ update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset
2236
+ @update_dataset = ::Gapic::Config::Method.new update_dataset_config
2237
+ list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets
2238
+ @list_datasets = ::Gapic::Config::Method.new list_datasets_config
2239
+ delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset
2240
+ @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config
2241
+ import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data
2242
+ @import_data = ::Gapic::Config::Method.new import_data_config
2243
+ export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data
2244
+ @export_data = ::Gapic::Config::Method.new export_data_config
2245
+ create_dataset_version_config = parent_rpcs.create_dataset_version if parent_rpcs.respond_to? :create_dataset_version
2246
+ @create_dataset_version = ::Gapic::Config::Method.new create_dataset_version_config
2247
+ update_dataset_version_config = parent_rpcs.update_dataset_version if parent_rpcs.respond_to? :update_dataset_version
2248
+ @update_dataset_version = ::Gapic::Config::Method.new update_dataset_version_config
2249
+ delete_dataset_version_config = parent_rpcs.delete_dataset_version if parent_rpcs.respond_to? :delete_dataset_version
2250
+ @delete_dataset_version = ::Gapic::Config::Method.new delete_dataset_version_config
2251
+ get_dataset_version_config = parent_rpcs.get_dataset_version if parent_rpcs.respond_to? :get_dataset_version
2252
+ @get_dataset_version = ::Gapic::Config::Method.new get_dataset_version_config
2253
+ list_dataset_versions_config = parent_rpcs.list_dataset_versions if parent_rpcs.respond_to? :list_dataset_versions
2254
+ @list_dataset_versions = ::Gapic::Config::Method.new list_dataset_versions_config
2255
+ restore_dataset_version_config = parent_rpcs.restore_dataset_version if parent_rpcs.respond_to? :restore_dataset_version
2256
+ @restore_dataset_version = ::Gapic::Config::Method.new restore_dataset_version_config
2257
+ list_data_items_config = parent_rpcs.list_data_items if parent_rpcs.respond_to? :list_data_items
2258
+ @list_data_items = ::Gapic::Config::Method.new list_data_items_config
2259
+ search_data_items_config = parent_rpcs.search_data_items if parent_rpcs.respond_to? :search_data_items
2260
+ @search_data_items = ::Gapic::Config::Method.new search_data_items_config
2261
+ list_saved_queries_config = parent_rpcs.list_saved_queries if parent_rpcs.respond_to? :list_saved_queries
2262
+ @list_saved_queries = ::Gapic::Config::Method.new list_saved_queries_config
2263
+ delete_saved_query_config = parent_rpcs.delete_saved_query if parent_rpcs.respond_to? :delete_saved_query
2264
+ @delete_saved_query = ::Gapic::Config::Method.new delete_saved_query_config
2265
+ get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec
2266
+ @get_annotation_spec = ::Gapic::Config::Method.new get_annotation_spec_config
2267
+ list_annotations_config = parent_rpcs.list_annotations if parent_rpcs.respond_to? :list_annotations
2268
+ @list_annotations = ::Gapic::Config::Method.new list_annotations_config
2269
+
2270
+ yield self if block_given?
2271
+ end
2272
+ end
2273
+ end
2274
+ end
2275
+ end
2276
+ end
2277
+ end
2278
+ end
2279
+ end
2280
+ end