google-cloud-ai_platform-v1 0.39.0 → 0.41.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (221) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/ai_platform/v1/bindings_override.rb +399 -0
  3. data/lib/google/cloud/ai_platform/v1/dataset_service/client.rb +138 -18
  4. data/lib/google/cloud/ai_platform/v1/dataset_service/operations.rb +13 -5
  5. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb +2280 -0
  6. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/operations.rb +3971 -0
  7. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/service_stub.rb +1196 -0
  8. data/lib/google/cloud/ai_platform/v1/dataset_service/rest.rb +54 -0
  9. data/lib/google/cloud/ai_platform/v1/dataset_service.rb +6 -0
  10. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/client.rb +13 -5
  11. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/operations.rb +13 -5
  12. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/client.rb +851 -0
  13. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/operations.rb +3971 -0
  14. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/service_stub.rb +365 -0
  15. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest.rb +54 -0
  16. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service.rb +6 -0
  17. data/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +19 -8
  18. data/lib/google/cloud/ai_platform/v1/endpoint_service/operations.rb +13 -5
  19. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/client.rb +1215 -0
  20. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/operations.rb +3971 -0
  21. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/service_stub.rb +546 -0
  22. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest.rb +54 -0
  23. data/lib/google/cloud/ai_platform/v1/endpoint_service.rb +6 -0
  24. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/client.rb +29 -13
  25. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/operations.rb +13 -5
  26. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/client.rb +1732 -0
  27. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/operations.rb +3971 -0
  28. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/service_stub.rb +841 -0
  29. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest.rb +55 -0
  30. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service.rb +6 -0
  31. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb +7 -2
  32. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/client.rb +534 -0
  33. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/service_stub.rb +189 -0
  34. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest.rb +53 -0
  35. data/lib/google/cloud/ai_platform/v1/feature_online_store_service.rb +6 -0
  36. data/lib/google/cloud/ai_platform/v1/feature_registry_service/client.rb +24 -11
  37. data/lib/google/cloud/ai_platform/v1/feature_registry_service/operations.rb +13 -5
  38. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/client.rb +1450 -0
  39. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/operations.rb +3971 -0
  40. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/service_stub.rb +663 -0
  41. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest.rb +55 -0
  42. data/lib/google/cloud/ai_platform/v1/feature_registry_service.rb +6 -0
  43. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/client.rb +9 -3
  44. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/client.rb +645 -0
  45. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/service_stub.rb +244 -0
  46. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest.rb +53 -0
  47. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service.rb +6 -0
  48. data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +45 -21
  49. data/lib/google/cloud/ai_platform/v1/featurestore_service/operations.rb +13 -5
  50. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb +2765 -0
  51. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/operations.rb +3971 -0
  52. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/service_stub.rb +1319 -0
  53. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest.rb +54 -0
  54. data/lib/google/cloud/ai_platform/v1/featurestore_service.rb +6 -0
  55. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/client.rb +11 -4
  56. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/client.rb +720 -0
  57. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/service_stub.rb +307 -0
  58. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest.rb +53 -0
  59. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service.rb +6 -0
  60. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +19 -8
  61. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/operations.rb +13 -5
  62. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/client.rb +1151 -0
  63. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/operations.rb +3971 -0
  64. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/service_stub.rb +546 -0
  65. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest.rb +54 -0
  66. data/lib/google/cloud/ai_platform/v1/index_endpoint_service.rb +6 -0
  67. data/lib/google/cloud/ai_platform/v1/index_service/client.rb +17 -7
  68. data/lib/google/cloud/ai_platform/v1/index_service/operations.rb +13 -5
  69. data/lib/google/cloud/ai_platform/v1/index_service/rest/client.rb +1034 -0
  70. data/lib/google/cloud/ai_platform/v1/index_service/rest/operations.rb +3971 -0
  71. data/lib/google/cloud/ai_platform/v1/index_service/rest/service_stub.rb +486 -0
  72. data/lib/google/cloud/ai_platform/v1/index_service/rest.rb +54 -0
  73. data/lib/google/cloud/ai_platform/v1/index_service.rb +6 -0
  74. data/lib/google/cloud/ai_platform/v1/job_service/client.rb +73 -35
  75. data/lib/google/cloud/ai_platform/v1/job_service/operations.rb +13 -5
  76. data/lib/google/cloud/ai_platform/v1/job_service/rest/client.rb +3841 -0
  77. data/lib/google/cloud/ai_platform/v1/job_service/rest/operations.rb +3971 -0
  78. data/lib/google/cloud/ai_platform/v1/job_service/rest/service_stub.rb +2149 -0
  79. data/lib/google/cloud/ai_platform/v1/job_service/rest.rb +54 -0
  80. data/lib/google/cloud/ai_platform/v1/job_service.rb +6 -0
  81. data/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb +7 -2
  82. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/client.rb +533 -0
  83. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/service_stub.rb +205 -0
  84. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest.rb +53 -0
  85. data/lib/google/cloud/ai_platform/v1/llm_utility_service.rb +6 -0
  86. data/lib/google/cloud/ai_platform/v1/match_service/client.rb +7 -2
  87. data/lib/google/cloud/ai_platform/v1/match_service/rest/client.rb +541 -0
  88. data/lib/google/cloud/ai_platform/v1/match_service/rest/service_stub.rb +189 -0
  89. data/lib/google/cloud/ai_platform/v1/match_service/rest.rb +54 -0
  90. data/lib/google/cloud/ai_platform/v1/match_service.rb +6 -0
  91. data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +67 -32
  92. data/lib/google/cloud/ai_platform/v1/metadata_service/operations.rb +13 -5
  93. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/client.rb +3634 -0
  94. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/operations.rb +3971 -0
  95. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/service_stub.rb +1972 -0
  96. data/lib/google/cloud/ai_platform/v1/metadata_service/rest.rb +54 -0
  97. data/lib/google/cloud/ai_platform/v1/metadata_service.rb +6 -0
  98. data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +7 -2
  99. data/lib/google/cloud/ai_platform/v1/migration_service/operations.rb +13 -5
  100. data/lib/google/cloud/ai_platform/v1/migration_service/rest/client.rb +574 -0
  101. data/lib/google/cloud/ai_platform/v1/migration_service/rest/operations.rb +3971 -0
  102. data/lib/google/cloud/ai_platform/v1/migration_service/rest/service_stub.rb +189 -0
  103. data/lib/google/cloud/ai_platform/v1/migration_service/rest.rb +55 -0
  104. data/lib/google/cloud/ai_platform/v1/migration_service.rb +6 -0
  105. data/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +5 -1
  106. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb +438 -0
  107. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/service_stub.rb +128 -0
  108. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest.rb +53 -0
  109. data/lib/google/cloud/ai_platform/v1/model_garden_service.rb +6 -0
  110. data/lib/google/cloud/ai_platform/v1/model_service/client.rb +39 -18
  111. data/lib/google/cloud/ai_platform/v1/model_service/operations.rb +13 -5
  112. data/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb +2213 -0
  113. data/lib/google/cloud/ai_platform/v1/model_service/rest/operations.rb +3971 -0
  114. data/lib/google/cloud/ai_platform/v1/model_service/rest/service_stub.rb +1140 -0
  115. data/lib/google/cloud/ai_platform/v1/model_service/rest.rb +54 -0
  116. data/lib/google/cloud/ai_platform/v1/model_service.rb +6 -0
  117. data/lib/google/cloud/ai_platform/v1/notebook_service/client.rb +123 -10
  118. data/lib/google/cloud/ai_platform/v1/notebook_service/operations.rb +13 -5
  119. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb +1503 -0
  120. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/operations.rb +3971 -0
  121. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/service_stub.rb +723 -0
  122. data/lib/google/cloud/ai_platform/v1/notebook_service/rest.rb +54 -0
  123. data/lib/google/cloud/ai_platform/v1/notebook_service.rb +6 -0
  124. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/client.rb +15 -6
  125. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/operations.rb +13 -5
  126. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/client.rb +942 -0
  127. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/operations.rb +3971 -0
  128. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/service_stub.rb +426 -0
  129. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest.rb +54 -0
  130. data/lib/google/cloud/ai_platform/v1/persistent_resource_service.rb +6 -0
  131. data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +27 -12
  132. data/lib/google/cloud/ai_platform/v1/pipeline_service/operations.rb +13 -5
  133. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/client.rb +1600 -0
  134. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/operations.rb +3971 -0
  135. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/service_stub.rb +783 -0
  136. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest.rb +56 -0
  137. data/lib/google/cloud/ai_platform/v1/pipeline_service.rb +6 -0
  138. data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +37 -15
  139. data/lib/google/cloud/ai_platform/v1/prediction_service/credentials.rb +2 -1
  140. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +1303 -0
  141. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/service_stub.rb +658 -0
  142. data/lib/google/cloud/ai_platform/v1/prediction_service/rest.rb +53 -0
  143. data/lib/google/cloud/ai_platform/v1/prediction_service.rb +6 -0
  144. data/lib/google/cloud/ai_platform/v1/rest.rb +63 -0
  145. data/lib/google/cloud/ai_platform/v1/schedule_service/client.rb +17 -7
  146. data/lib/google/cloud/ai_platform/v1/schedule_service/operations.rb +13 -5
  147. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/client.rb +1076 -0
  148. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/operations.rb +3971 -0
  149. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/service_stub.rb +486 -0
  150. data/lib/google/cloud/ai_platform/v1/schedule_service/rest.rb +55 -0
  151. data/lib/google/cloud/ai_platform/v1/schedule_service.rb +6 -0
  152. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +13 -5
  153. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/operations.rb +13 -5
  154. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/client.rb +847 -0
  155. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/operations.rb +3971 -0
  156. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/service_stub.rb +366 -0
  157. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest.rb +59 -0
  158. data/lib/google/cloud/ai_platform/v1/specialist_pool_service.rb +6 -0
  159. data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +63 -30
  160. data/lib/google/cloud/ai_platform/v1/tensorboard_service/operations.rb +13 -5
  161. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/client.rb +3274 -0
  162. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/operations.rb +3971 -0
  163. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/service_stub.rb +1847 -0
  164. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest.rb +54 -0
  165. data/lib/google/cloud/ai_platform/v1/tensorboard_service.rb +6 -0
  166. data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
  167. data/lib/google/cloud/ai_platform/v1/vizier_service/client.rb +33 -15
  168. data/lib/google/cloud/ai_platform/v1/vizier_service/operations.rb +13 -5
  169. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/client.rb +1788 -0
  170. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/operations.rb +3971 -0
  171. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/service_stub.rb +963 -0
  172. data/lib/google/cloud/ai_platform/v1/vizier_service/rest.rb +58 -0
  173. data/lib/google/cloud/ai_platform/v1/vizier_service.rb +6 -0
  174. data/lib/google/cloud/ai_platform/v1.rb +6 -1
  175. data/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb +1 -1
  176. data/lib/google/cloud/aiplatform/v1/content_pb.rb +4 -4
  177. data/lib/google/cloud/aiplatform/v1/dataset_pb.rb +1 -1
  178. data/lib/google/cloud/aiplatform/v1/dataset_service_pb.rb +3 -2
  179. data/lib/google/cloud/aiplatform/v1/dataset_service_services_pb.rb +2 -0
  180. data/lib/google/cloud/aiplatform/v1/dataset_version_pb.rb +1 -1
  181. data/lib/google/cloud/aiplatform/v1/deployment_resource_pool_pb.rb +3 -1
  182. data/lib/google/cloud/aiplatform/v1/endpoint_pb.rb +3 -1
  183. data/lib/google/cloud/aiplatform/v1/feature_online_store_pb.rb +3 -1
  184. data/lib/google/cloud/aiplatform/v1/feature_pb.rb +1 -1
  185. data/lib/google/cloud/aiplatform/v1/featurestore_online_service_pb.rb +3 -1
  186. data/lib/google/cloud/aiplatform/v1/index_pb.rb +2 -1
  187. data/lib/google/cloud/aiplatform/v1/index_service_pb.rb +1 -1
  188. data/lib/google/cloud/aiplatform/v1/match_service_pb.rb +2 -1
  189. data/lib/google/cloud/aiplatform/v1/metadata_store_pb.rb +2 -1
  190. data/lib/google/cloud/aiplatform/v1/notebook_runtime_pb.rb +3 -1
  191. data/lib/google/cloud/aiplatform/v1/notebook_service_pb.rb +2 -1
  192. data/lib/google/cloud/aiplatform/v1/notebook_service_services_pb.rb +2 -0
  193. data/lib/google/cloud/aiplatform/v1/persistent_resource_pb.rb +2 -1
  194. data/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +1 -1
  195. data/lib/google/cloud/aiplatform/v1/publisher_model_pb.rb +1 -1
  196. data/lib/google/cloud/aiplatform/v1/tool_pb.rb +4 -1
  197. data/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb +3 -0
  198. data/proto_docs/google/cloud/aiplatform/v1/content.rb +26 -48
  199. data/proto_docs/google/cloud/aiplatform/v1/dataset.rb +4 -0
  200. data/proto_docs/google/cloud/aiplatform/v1/dataset_service.rb +17 -0
  201. data/proto_docs/google/cloud/aiplatform/v1/dataset_version.rb +4 -0
  202. data/proto_docs/google/cloud/aiplatform/v1/deployment_resource_pool.rb +23 -0
  203. data/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +7 -0
  204. data/proto_docs/google/cloud/aiplatform/v1/feature.rb +3 -0
  205. data/proto_docs/google/cloud/aiplatform/v1/feature_group.rb +3 -3
  206. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store.rb +4 -0
  207. data/proto_docs/google/cloud/aiplatform/v1/feature_registry_service.rb +1 -1
  208. data/proto_docs/google/cloud/aiplatform/v1/featurestore_online_service.rb +24 -0
  209. data/proto_docs/google/cloud/aiplatform/v1/index.rb +23 -3
  210. data/proto_docs/google/cloud/aiplatform/v1/index_service.rb +20 -2
  211. data/proto_docs/google/cloud/aiplatform/v1/match_service.rb +18 -1
  212. data/proto_docs/google/cloud/aiplatform/v1/metadata_store.rb +13 -0
  213. data/proto_docs/google/cloud/aiplatform/v1/model.rb +1 -1
  214. data/proto_docs/google/cloud/aiplatform/v1/notebook_runtime.rb +17 -2
  215. data/proto_docs/google/cloud/aiplatform/v1/notebook_service.rb +18 -0
  216. data/proto_docs/google/cloud/aiplatform/v1/persistent_resource.rb +63 -0
  217. data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +4 -0
  218. data/proto_docs/google/cloud/aiplatform/v1/publisher_model.rb +4 -0
  219. data/proto_docs/google/cloud/aiplatform/v1/tool.rb +43 -5
  220. data/proto_docs/google/cloud/aiplatform/v1/tuning_job.rb +8 -7
  221. metadata +101 -2
@@ -0,0 +1,851 @@
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/deployment_resource_pool_service_pb"
21
+ require "google/cloud/ai_platform/v1/deployment_resource_pool_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 DeploymentResourcePoolService
30
+ module Rest
31
+ ##
32
+ # REST client for the DeploymentResourcePoolService service.
33
+ #
34
+ # A service that manages the DeploymentResourcePool resource.
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 :deployment_resource_pool_service_stub
47
+
48
+ ##
49
+ # Configure the DeploymentResourcePoolService Client class.
50
+ #
51
+ # See {::Google::Cloud::AIPlatform::V1::DeploymentResourcePoolService::Rest::Client::Configuration}
52
+ # for a description of the configuration fields.
53
+ #
54
+ # @example
55
+ #
56
+ # # Modify the configuration for all DeploymentResourcePoolService clients
57
+ # ::Google::Cloud::AIPlatform::V1::DeploymentResourcePoolService::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 DeploymentResourcePoolService 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::DeploymentResourcePoolService::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
+ @deployment_resource_pool_service_stub.universe_domain
110
+ end
111
+
112
+ ##
113
+ # Create a new DeploymentResourcePoolService REST client object.
114
+ #
115
+ # @example
116
+ #
117
+ # # Create a client using the default configuration
118
+ # client = ::Google::Cloud::AIPlatform::V1::DeploymentResourcePoolService::Rest::Client.new
119
+ #
120
+ # # Create a client using a custom configuration
121
+ # client = ::Google::Cloud::AIPlatform::V1::DeploymentResourcePoolService::Rest::Client.new do |config|
122
+ # config.timeout = 10.0
123
+ # end
124
+ #
125
+ # @yield [config] Configure the DeploymentResourcePoolService 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::DeploymentResourcePoolService::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
+ @deployment_resource_pool_service_stub = ::Google::Cloud::AIPlatform::V1::DeploymentResourcePoolService::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 = @deployment_resource_pool_service_stub.endpoint
169
+ config.universe_domain = @deployment_resource_pool_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 = @deployment_resource_pool_service_stub.endpoint
177
+ config.universe_domain = @deployment_resource_pool_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::DeploymentResourcePoolService::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
+ # Create a DeploymentResourcePool.
207
+ #
208
+ # @overload create_deployment_resource_pool(request, options = nil)
209
+ # Pass arguments to `create_deployment_resource_pool` via a request object, either of type
210
+ # {::Google::Cloud::AIPlatform::V1::CreateDeploymentResourcePoolRequest} or an equivalent Hash.
211
+ #
212
+ # @param request [::Google::Cloud::AIPlatform::V1::CreateDeploymentResourcePoolRequest, ::Hash]
213
+ # A request object representing the call parameters. Required. To specify no
214
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
215
+ # @param options [::Gapic::CallOptions, ::Hash]
216
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
217
+ #
218
+ # @overload create_deployment_resource_pool(parent: nil, deployment_resource_pool: nil, deployment_resource_pool_id: nil)
219
+ # Pass arguments to `create_deployment_resource_pool` via keyword arguments. Note that at
220
+ # least one keyword argument is required. To specify no parameters, or to keep all
221
+ # the default parameter values, pass an empty Hash as a request object (see above).
222
+ #
223
+ # @param parent [::String]
224
+ # Required. The parent location resource where this DeploymentResourcePool
225
+ # will be created. Format: `projects/{project}/locations/{location}`
226
+ # @param deployment_resource_pool [::Google::Cloud::AIPlatform::V1::DeploymentResourcePool, ::Hash]
227
+ # Required. The DeploymentResourcePool to create.
228
+ # @param deployment_resource_pool_id [::String]
229
+ # Required. The ID to use for the DeploymentResourcePool, which
230
+ # will become the final component of the DeploymentResourcePool's resource
231
+ # name.
232
+ #
233
+ # The maximum length is 63 characters, and valid characters
234
+ # are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
235
+ # @yield [result, operation] Access the result along with the TransportOperation object
236
+ # @yieldparam result [::Gapic::Operation]
237
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
238
+ #
239
+ # @return [::Gapic::Operation]
240
+ #
241
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
242
+ #
243
+ # @example Basic example
244
+ # require "google/cloud/ai_platform/v1"
245
+ #
246
+ # # Create a client object. The client can be reused for multiple calls.
247
+ # client = Google::Cloud::AIPlatform::V1::DeploymentResourcePoolService::Rest::Client.new
248
+ #
249
+ # # Create a request. To set request fields, pass in keyword arguments.
250
+ # request = Google::Cloud::AIPlatform::V1::CreateDeploymentResourcePoolRequest.new
251
+ #
252
+ # # Call the create_deployment_resource_pool method.
253
+ # result = client.create_deployment_resource_pool request
254
+ #
255
+ # # The returned object is of type Gapic::Operation. You can use it to
256
+ # # check the status of an operation, cancel it, or wait for results.
257
+ # # Here is how to wait for a response.
258
+ # result.wait_until_done! timeout: 60
259
+ # if result.response?
260
+ # p result.response
261
+ # else
262
+ # puts "No response received."
263
+ # end
264
+ #
265
+ def create_deployment_resource_pool request, options = nil
266
+ raise ::ArgumentError, "request must be provided" if request.nil?
267
+
268
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateDeploymentResourcePoolRequest
269
+
270
+ # Converts hash and nil to an options object
271
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
272
+
273
+ # Customize the options with defaults
274
+ call_metadata = @config.rpcs.create_deployment_resource_pool.metadata.to_h
275
+
276
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
277
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
278
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
279
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
280
+ transports_version_send: [:rest]
281
+
282
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
283
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
284
+
285
+ options.apply_defaults timeout: @config.rpcs.create_deployment_resource_pool.timeout,
286
+ metadata: call_metadata,
287
+ retry_policy: @config.rpcs.create_deployment_resource_pool.retry_policy
288
+
289
+ options.apply_defaults timeout: @config.timeout,
290
+ metadata: @config.metadata,
291
+ retry_policy: @config.retry_policy
292
+
293
+ @deployment_resource_pool_service_stub.create_deployment_resource_pool request, options do |result, operation|
294
+ result = ::Gapic::Operation.new result, @operations_client, options: options
295
+ yield result, operation if block_given?
296
+ return result
297
+ end
298
+ rescue ::Gapic::Rest::Error => e
299
+ raise ::Google::Cloud::Error.from_error(e)
300
+ end
301
+
302
+ ##
303
+ # Get a DeploymentResourcePool.
304
+ #
305
+ # @overload get_deployment_resource_pool(request, options = nil)
306
+ # Pass arguments to `get_deployment_resource_pool` via a request object, either of type
307
+ # {::Google::Cloud::AIPlatform::V1::GetDeploymentResourcePoolRequest} or an equivalent Hash.
308
+ #
309
+ # @param request [::Google::Cloud::AIPlatform::V1::GetDeploymentResourcePoolRequest, ::Hash]
310
+ # A request object representing the call parameters. Required. To specify no
311
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
312
+ # @param options [::Gapic::CallOptions, ::Hash]
313
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
314
+ #
315
+ # @overload get_deployment_resource_pool(name: nil)
316
+ # Pass arguments to `get_deployment_resource_pool` via keyword arguments. Note that at
317
+ # least one keyword argument is required. To specify no parameters, or to keep all
318
+ # the default parameter values, pass an empty Hash as a request object (see above).
319
+ #
320
+ # @param name [::String]
321
+ # Required. The name of the DeploymentResourcePool to retrieve.
322
+ # Format:
323
+ # `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
324
+ # @yield [result, operation] Access the result along with the TransportOperation object
325
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::DeploymentResourcePool]
326
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
327
+ #
328
+ # @return [::Google::Cloud::AIPlatform::V1::DeploymentResourcePool]
329
+ #
330
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
331
+ #
332
+ # @example Basic example
333
+ # require "google/cloud/ai_platform/v1"
334
+ #
335
+ # # Create a client object. The client can be reused for multiple calls.
336
+ # client = Google::Cloud::AIPlatform::V1::DeploymentResourcePoolService::Rest::Client.new
337
+ #
338
+ # # Create a request. To set request fields, pass in keyword arguments.
339
+ # request = Google::Cloud::AIPlatform::V1::GetDeploymentResourcePoolRequest.new
340
+ #
341
+ # # Call the get_deployment_resource_pool method.
342
+ # result = client.get_deployment_resource_pool request
343
+ #
344
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::DeploymentResourcePool.
345
+ # p result
346
+ #
347
+ def get_deployment_resource_pool request, options = nil
348
+ raise ::ArgumentError, "request must be provided" if request.nil?
349
+
350
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetDeploymentResourcePoolRequest
351
+
352
+ # Converts hash and nil to an options object
353
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
354
+
355
+ # Customize the options with defaults
356
+ call_metadata = @config.rpcs.get_deployment_resource_pool.metadata.to_h
357
+
358
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
359
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
360
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
361
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
362
+ transports_version_send: [:rest]
363
+
364
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
365
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
366
+
367
+ options.apply_defaults timeout: @config.rpcs.get_deployment_resource_pool.timeout,
368
+ metadata: call_metadata,
369
+ retry_policy: @config.rpcs.get_deployment_resource_pool.retry_policy
370
+
371
+ options.apply_defaults timeout: @config.timeout,
372
+ metadata: @config.metadata,
373
+ retry_policy: @config.retry_policy
374
+
375
+ @deployment_resource_pool_service_stub.get_deployment_resource_pool request, options do |result, operation|
376
+ yield result, operation if block_given?
377
+ return result
378
+ end
379
+ rescue ::Gapic::Rest::Error => e
380
+ raise ::Google::Cloud::Error.from_error(e)
381
+ end
382
+
383
+ ##
384
+ # List DeploymentResourcePools in a location.
385
+ #
386
+ # @overload list_deployment_resource_pools(request, options = nil)
387
+ # Pass arguments to `list_deployment_resource_pools` via a request object, either of type
388
+ # {::Google::Cloud::AIPlatform::V1::ListDeploymentResourcePoolsRequest} or an equivalent Hash.
389
+ #
390
+ # @param request [::Google::Cloud::AIPlatform::V1::ListDeploymentResourcePoolsRequest, ::Hash]
391
+ # A request object representing the call parameters. Required. To specify no
392
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
393
+ # @param options [::Gapic::CallOptions, ::Hash]
394
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
395
+ #
396
+ # @overload list_deployment_resource_pools(parent: nil, page_size: nil, page_token: nil)
397
+ # Pass arguments to `list_deployment_resource_pools` via keyword arguments. Note that at
398
+ # least one keyword argument is required. To specify no parameters, or to keep all
399
+ # the default parameter values, pass an empty Hash as a request object (see above).
400
+ #
401
+ # @param parent [::String]
402
+ # Required. The parent Location which owns this collection of
403
+ # DeploymentResourcePools. Format: `projects/{project}/locations/{location}`
404
+ # @param page_size [::Integer]
405
+ # The maximum number of DeploymentResourcePools to return. The service may
406
+ # return fewer than this value.
407
+ # @param page_token [::String]
408
+ # A page token, received from a previous `ListDeploymentResourcePools` call.
409
+ # Provide this to retrieve the subsequent page.
410
+ #
411
+ # When paginating, all other parameters provided to
412
+ # `ListDeploymentResourcePools` must match the call that provided the page
413
+ # token.
414
+ # @yield [result, operation] Access the result along with the TransportOperation object
415
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DeploymentResourcePool>]
416
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
417
+ #
418
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DeploymentResourcePool>]
419
+ #
420
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
421
+ #
422
+ # @example Basic example
423
+ # require "google/cloud/ai_platform/v1"
424
+ #
425
+ # # Create a client object. The client can be reused for multiple calls.
426
+ # client = Google::Cloud::AIPlatform::V1::DeploymentResourcePoolService::Rest::Client.new
427
+ #
428
+ # # Create a request. To set request fields, pass in keyword arguments.
429
+ # request = Google::Cloud::AIPlatform::V1::ListDeploymentResourcePoolsRequest.new
430
+ #
431
+ # # Call the list_deployment_resource_pools method.
432
+ # result = client.list_deployment_resource_pools request
433
+ #
434
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
435
+ # # over elements, and API calls will be issued to fetch pages as needed.
436
+ # result.each do |item|
437
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::DeploymentResourcePool.
438
+ # p item
439
+ # end
440
+ #
441
+ def list_deployment_resource_pools request, options = nil
442
+ raise ::ArgumentError, "request must be provided" if request.nil?
443
+
444
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListDeploymentResourcePoolsRequest
445
+
446
+ # Converts hash and nil to an options object
447
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
448
+
449
+ # Customize the options with defaults
450
+ call_metadata = @config.rpcs.list_deployment_resource_pools.metadata.to_h
451
+
452
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
453
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
454
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
455
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
456
+ transports_version_send: [:rest]
457
+
458
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
459
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
460
+
461
+ options.apply_defaults timeout: @config.rpcs.list_deployment_resource_pools.timeout,
462
+ metadata: call_metadata,
463
+ retry_policy: @config.rpcs.list_deployment_resource_pools.retry_policy
464
+
465
+ options.apply_defaults timeout: @config.timeout,
466
+ metadata: @config.metadata,
467
+ retry_policy: @config.retry_policy
468
+
469
+ @deployment_resource_pool_service_stub.list_deployment_resource_pools request, options do |result, operation|
470
+ result = ::Gapic::Rest::PagedEnumerable.new @deployment_resource_pool_service_stub, :list_deployment_resource_pools, "deployment_resource_pools", request, result, options
471
+ yield result, operation if block_given?
472
+ return result
473
+ end
474
+ rescue ::Gapic::Rest::Error => e
475
+ raise ::Google::Cloud::Error.from_error(e)
476
+ end
477
+
478
+ ##
479
+ # Delete a DeploymentResourcePool.
480
+ #
481
+ # @overload delete_deployment_resource_pool(request, options = nil)
482
+ # Pass arguments to `delete_deployment_resource_pool` via a request object, either of type
483
+ # {::Google::Cloud::AIPlatform::V1::DeleteDeploymentResourcePoolRequest} or an equivalent Hash.
484
+ #
485
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteDeploymentResourcePoolRequest, ::Hash]
486
+ # A request object representing the call parameters. Required. To specify no
487
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
488
+ # @param options [::Gapic::CallOptions, ::Hash]
489
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
490
+ #
491
+ # @overload delete_deployment_resource_pool(name: nil)
492
+ # Pass arguments to `delete_deployment_resource_pool` via keyword arguments. Note that at
493
+ # least one keyword argument is required. To specify no parameters, or to keep all
494
+ # the default parameter values, pass an empty Hash as a request object (see above).
495
+ #
496
+ # @param name [::String]
497
+ # Required. The name of the DeploymentResourcePool to delete.
498
+ # Format:
499
+ # `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
500
+ # @yield [result, operation] Access the result along with the TransportOperation object
501
+ # @yieldparam result [::Gapic::Operation]
502
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
503
+ #
504
+ # @return [::Gapic::Operation]
505
+ #
506
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
507
+ #
508
+ # @example Basic example
509
+ # require "google/cloud/ai_platform/v1"
510
+ #
511
+ # # Create a client object. The client can be reused for multiple calls.
512
+ # client = Google::Cloud::AIPlatform::V1::DeploymentResourcePoolService::Rest::Client.new
513
+ #
514
+ # # Create a request. To set request fields, pass in keyword arguments.
515
+ # request = Google::Cloud::AIPlatform::V1::DeleteDeploymentResourcePoolRequest.new
516
+ #
517
+ # # Call the delete_deployment_resource_pool method.
518
+ # result = client.delete_deployment_resource_pool request
519
+ #
520
+ # # The returned object is of type Gapic::Operation. You can use it to
521
+ # # check the status of an operation, cancel it, or wait for results.
522
+ # # Here is how to wait for a response.
523
+ # result.wait_until_done! timeout: 60
524
+ # if result.response?
525
+ # p result.response
526
+ # else
527
+ # puts "No response received."
528
+ # end
529
+ #
530
+ def delete_deployment_resource_pool request, options = nil
531
+ raise ::ArgumentError, "request must be provided" if request.nil?
532
+
533
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteDeploymentResourcePoolRequest
534
+
535
+ # Converts hash and nil to an options object
536
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
537
+
538
+ # Customize the options with defaults
539
+ call_metadata = @config.rpcs.delete_deployment_resource_pool.metadata.to_h
540
+
541
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
542
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
543
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
544
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
545
+ transports_version_send: [:rest]
546
+
547
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
548
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
549
+
550
+ options.apply_defaults timeout: @config.rpcs.delete_deployment_resource_pool.timeout,
551
+ metadata: call_metadata,
552
+ retry_policy: @config.rpcs.delete_deployment_resource_pool.retry_policy
553
+
554
+ options.apply_defaults timeout: @config.timeout,
555
+ metadata: @config.metadata,
556
+ retry_policy: @config.retry_policy
557
+
558
+ @deployment_resource_pool_service_stub.delete_deployment_resource_pool request, options do |result, operation|
559
+ result = ::Gapic::Operation.new result, @operations_client, options: options
560
+ yield result, operation if block_given?
561
+ return result
562
+ end
563
+ rescue ::Gapic::Rest::Error => e
564
+ raise ::Google::Cloud::Error.from_error(e)
565
+ end
566
+
567
+ ##
568
+ # List DeployedModels that have been deployed on this DeploymentResourcePool.
569
+ #
570
+ # @overload query_deployed_models(request, options = nil)
571
+ # Pass arguments to `query_deployed_models` via a request object, either of type
572
+ # {::Google::Cloud::AIPlatform::V1::QueryDeployedModelsRequest} or an equivalent Hash.
573
+ #
574
+ # @param request [::Google::Cloud::AIPlatform::V1::QueryDeployedModelsRequest, ::Hash]
575
+ # A request object representing the call parameters. Required. To specify no
576
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
577
+ # @param options [::Gapic::CallOptions, ::Hash]
578
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
579
+ #
580
+ # @overload query_deployed_models(deployment_resource_pool: nil, page_size: nil, page_token: nil)
581
+ # Pass arguments to `query_deployed_models` via keyword arguments. Note that at
582
+ # least one keyword argument is required. To specify no parameters, or to keep all
583
+ # the default parameter values, pass an empty Hash as a request object (see above).
584
+ #
585
+ # @param deployment_resource_pool [::String]
586
+ # Required. The name of the target DeploymentResourcePool to query.
587
+ # Format:
588
+ # `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
589
+ # @param page_size [::Integer]
590
+ # The maximum number of DeployedModels to return. The service may return
591
+ # fewer than this value.
592
+ # @param page_token [::String]
593
+ # A page token, received from a previous `QueryDeployedModels` call.
594
+ # Provide this to retrieve the subsequent page.
595
+ #
596
+ # When paginating, all other parameters provided to
597
+ # `QueryDeployedModels` must match the call that provided the page
598
+ # token.
599
+ # @yield [result, operation] Access the result along with the TransportOperation object
600
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::QueryDeployedModelsResponse]
601
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
602
+ #
603
+ # @return [::Google::Cloud::AIPlatform::V1::QueryDeployedModelsResponse]
604
+ #
605
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
606
+ #
607
+ # @example Basic example
608
+ # require "google/cloud/ai_platform/v1"
609
+ #
610
+ # # Create a client object. The client can be reused for multiple calls.
611
+ # client = Google::Cloud::AIPlatform::V1::DeploymentResourcePoolService::Rest::Client.new
612
+ #
613
+ # # Create a request. To set request fields, pass in keyword arguments.
614
+ # request = Google::Cloud::AIPlatform::V1::QueryDeployedModelsRequest.new
615
+ #
616
+ # # Call the query_deployed_models method.
617
+ # result = client.query_deployed_models request
618
+ #
619
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
620
+ # # over elements, and API calls will be issued to fetch pages as needed.
621
+ # result.each do |item|
622
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::DeployedModel.
623
+ # p item
624
+ # end
625
+ #
626
+ def query_deployed_models request, options = nil
627
+ raise ::ArgumentError, "request must be provided" if request.nil?
628
+
629
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::QueryDeployedModelsRequest
630
+
631
+ # Converts hash and nil to an options object
632
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
633
+
634
+ # Customize the options with defaults
635
+ call_metadata = @config.rpcs.query_deployed_models.metadata.to_h
636
+
637
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
638
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
639
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
640
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
641
+ transports_version_send: [:rest]
642
+
643
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
644
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
645
+
646
+ options.apply_defaults timeout: @config.rpcs.query_deployed_models.timeout,
647
+ metadata: call_metadata,
648
+ retry_policy: @config.rpcs.query_deployed_models.retry_policy
649
+
650
+ options.apply_defaults timeout: @config.timeout,
651
+ metadata: @config.metadata,
652
+ retry_policy: @config.retry_policy
653
+
654
+ @deployment_resource_pool_service_stub.query_deployed_models request, options do |result, operation|
655
+ yield result, operation if block_given?
656
+ return result
657
+ end
658
+ rescue ::Gapic::Rest::Error => e
659
+ raise ::Google::Cloud::Error.from_error(e)
660
+ end
661
+
662
+ ##
663
+ # Configuration class for the DeploymentResourcePoolService REST API.
664
+ #
665
+ # This class represents the configuration for DeploymentResourcePoolService REST,
666
+ # providing control over timeouts, retry behavior, logging, transport
667
+ # parameters, and other low-level controls. Certain parameters can also be
668
+ # applied individually to specific RPCs. See
669
+ # {::Google::Cloud::AIPlatform::V1::DeploymentResourcePoolService::Rest::Client::Configuration::Rpcs}
670
+ # for a list of RPCs that can be configured independently.
671
+ #
672
+ # Configuration can be applied globally to all clients, or to a single client
673
+ # on construction.
674
+ #
675
+ # @example
676
+ #
677
+ # # Modify the global config, setting the timeout for
678
+ # # create_deployment_resource_pool to 20 seconds,
679
+ # # and all remaining timeouts to 10 seconds.
680
+ # ::Google::Cloud::AIPlatform::V1::DeploymentResourcePoolService::Rest::Client.configure do |config|
681
+ # config.timeout = 10.0
682
+ # config.rpcs.create_deployment_resource_pool.timeout = 20.0
683
+ # end
684
+ #
685
+ # # Apply the above configuration only to a new client.
686
+ # client = ::Google::Cloud::AIPlatform::V1::DeploymentResourcePoolService::Rest::Client.new do |config|
687
+ # config.timeout = 10.0
688
+ # config.rpcs.create_deployment_resource_pool.timeout = 20.0
689
+ # end
690
+ #
691
+ # @!attribute [rw] endpoint
692
+ # A custom service endpoint, as a hostname or hostname:port. The default is
693
+ # nil, indicating to use the default endpoint in the current universe domain.
694
+ # @return [::String,nil]
695
+ # @!attribute [rw] credentials
696
+ # Credentials to send with calls. You may provide any of the following types:
697
+ # * (`String`) The path to a service account key file in JSON format
698
+ # * (`Hash`) A service account key as a Hash
699
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
700
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
701
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
702
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
703
+ # * (`nil`) indicating no credentials
704
+ # @return [::Object]
705
+ # @!attribute [rw] scope
706
+ # The OAuth scopes
707
+ # @return [::Array<::String>]
708
+ # @!attribute [rw] lib_name
709
+ # The library name as recorded in instrumentation and logging
710
+ # @return [::String]
711
+ # @!attribute [rw] lib_version
712
+ # The library version as recorded in instrumentation and logging
713
+ # @return [::String]
714
+ # @!attribute [rw] timeout
715
+ # The call timeout in seconds.
716
+ # @return [::Numeric]
717
+ # @!attribute [rw] metadata
718
+ # Additional headers to be sent with the call.
719
+ # @return [::Hash{::Symbol=>::String}]
720
+ # @!attribute [rw] retry_policy
721
+ # The retry policy. The value is a hash with the following keys:
722
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
723
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
724
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
725
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
726
+ # trigger a retry.
727
+ # @return [::Hash]
728
+ # @!attribute [rw] quota_project
729
+ # A separate project against which to charge quota.
730
+ # @return [::String]
731
+ # @!attribute [rw] universe_domain
732
+ # The universe domain within which to make requests. This determines the
733
+ # default endpoint URL. The default value of nil uses the environment
734
+ # universe (usually the default "googleapis.com" universe).
735
+ # @return [::String,nil]
736
+ #
737
+ class Configuration
738
+ extend ::Gapic::Config
739
+
740
+ # @private
741
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
742
+ DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
743
+
744
+ config_attr :endpoint, nil, ::String, nil
745
+ config_attr :credentials, nil do |value|
746
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
747
+ allowed.any? { |klass| klass === value }
748
+ end
749
+ config_attr :scope, nil, ::String, ::Array, nil
750
+ config_attr :lib_name, nil, ::String, nil
751
+ config_attr :lib_version, nil, ::String, nil
752
+ config_attr :timeout, nil, ::Numeric, nil
753
+ config_attr :metadata, nil, ::Hash, nil
754
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
755
+ config_attr :quota_project, nil, ::String, nil
756
+ config_attr :universe_domain, nil, ::String, nil
757
+
758
+ # @private
759
+ # Overrides for http bindings for the RPCs of this service
760
+ # are only used when this service is used as mixin, and only
761
+ # by the host service.
762
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
763
+ config_attr :bindings_override, {}, ::Hash, nil
764
+
765
+ # @private
766
+ def initialize parent_config = nil
767
+ @parent_config = parent_config unless parent_config.nil?
768
+
769
+ yield self if block_given?
770
+ end
771
+
772
+ ##
773
+ # Configurations for individual RPCs
774
+ # @return [Rpcs]
775
+ #
776
+ def rpcs
777
+ @rpcs ||= begin
778
+ parent_rpcs = nil
779
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
780
+ Rpcs.new parent_rpcs
781
+ end
782
+ end
783
+
784
+ ##
785
+ # Configuration RPC class for the DeploymentResourcePoolService API.
786
+ #
787
+ # Includes fields providing the configuration for each RPC in this service.
788
+ # Each configuration object is of type `Gapic::Config::Method` and includes
789
+ # the following configuration fields:
790
+ #
791
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
792
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
793
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
794
+ # include the following keys:
795
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
796
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
797
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
798
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
799
+ # trigger a retry.
800
+ #
801
+ class Rpcs
802
+ ##
803
+ # RPC-specific configuration for `create_deployment_resource_pool`
804
+ # @return [::Gapic::Config::Method]
805
+ #
806
+ attr_reader :create_deployment_resource_pool
807
+ ##
808
+ # RPC-specific configuration for `get_deployment_resource_pool`
809
+ # @return [::Gapic::Config::Method]
810
+ #
811
+ attr_reader :get_deployment_resource_pool
812
+ ##
813
+ # RPC-specific configuration for `list_deployment_resource_pools`
814
+ # @return [::Gapic::Config::Method]
815
+ #
816
+ attr_reader :list_deployment_resource_pools
817
+ ##
818
+ # RPC-specific configuration for `delete_deployment_resource_pool`
819
+ # @return [::Gapic::Config::Method]
820
+ #
821
+ attr_reader :delete_deployment_resource_pool
822
+ ##
823
+ # RPC-specific configuration for `query_deployed_models`
824
+ # @return [::Gapic::Config::Method]
825
+ #
826
+ attr_reader :query_deployed_models
827
+
828
+ # @private
829
+ def initialize parent_rpcs = nil
830
+ create_deployment_resource_pool_config = parent_rpcs.create_deployment_resource_pool if parent_rpcs.respond_to? :create_deployment_resource_pool
831
+ @create_deployment_resource_pool = ::Gapic::Config::Method.new create_deployment_resource_pool_config
832
+ get_deployment_resource_pool_config = parent_rpcs.get_deployment_resource_pool if parent_rpcs.respond_to? :get_deployment_resource_pool
833
+ @get_deployment_resource_pool = ::Gapic::Config::Method.new get_deployment_resource_pool_config
834
+ list_deployment_resource_pools_config = parent_rpcs.list_deployment_resource_pools if parent_rpcs.respond_to? :list_deployment_resource_pools
835
+ @list_deployment_resource_pools = ::Gapic::Config::Method.new list_deployment_resource_pools_config
836
+ delete_deployment_resource_pool_config = parent_rpcs.delete_deployment_resource_pool if parent_rpcs.respond_to? :delete_deployment_resource_pool
837
+ @delete_deployment_resource_pool = ::Gapic::Config::Method.new delete_deployment_resource_pool_config
838
+ query_deployed_models_config = parent_rpcs.query_deployed_models if parent_rpcs.respond_to? :query_deployed_models
839
+ @query_deployed_models = ::Gapic::Config::Method.new query_deployed_models_config
840
+
841
+ yield self if block_given?
842
+ end
843
+ end
844
+ end
845
+ end
846
+ end
847
+ end
848
+ end
849
+ end
850
+ end
851
+ end