google-cloud-ai_platform-v1 0.39.0 → 0.41.0

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