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,1215 @@
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/endpoint_service_pb"
21
+ require "google/cloud/ai_platform/v1/endpoint_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 EndpointService
30
+ module Rest
31
+ ##
32
+ # REST client for the EndpointService service.
33
+ #
34
+ # A service for managing Vertex AI's Endpoints.
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 :endpoint_service_stub
47
+
48
+ ##
49
+ # Configure the EndpointService Client class.
50
+ #
51
+ # See {::Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client::Configuration}
52
+ # for a description of the configuration fields.
53
+ #
54
+ # @example
55
+ #
56
+ # # Modify the configuration for all EndpointService clients
57
+ # ::Google::Cloud::AIPlatform::V1::EndpointService::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 EndpointService 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::EndpointService::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
+ @endpoint_service_stub.universe_domain
110
+ end
111
+
112
+ ##
113
+ # Create a new EndpointService REST client object.
114
+ #
115
+ # @example
116
+ #
117
+ # # Create a client using the default configuration
118
+ # client = ::Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new
119
+ #
120
+ # # Create a client using a custom configuration
121
+ # client = ::Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new do |config|
122
+ # config.timeout = 10.0
123
+ # end
124
+ #
125
+ # @yield [config] Configure the EndpointService 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::EndpointService::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
+ @endpoint_service_stub = ::Google::Cloud::AIPlatform::V1::EndpointService::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 = @endpoint_service_stub.endpoint
169
+ config.universe_domain = @endpoint_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 = @endpoint_service_stub.endpoint
177
+ config.universe_domain = @endpoint_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::EndpointService::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 an Endpoint.
207
+ #
208
+ # @overload create_endpoint(request, options = nil)
209
+ # Pass arguments to `create_endpoint` via a request object, either of type
210
+ # {::Google::Cloud::AIPlatform::V1::CreateEndpointRequest} or an equivalent Hash.
211
+ #
212
+ # @param request [::Google::Cloud::AIPlatform::V1::CreateEndpointRequest, ::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_endpoint(parent: nil, endpoint: nil, endpoint_id: nil)
219
+ # Pass arguments to `create_endpoint` via keyword arguments. Note that at
220
+ # least one keyword argument is required. To specify no parameters, or to keep all
221
+ # the default parameter values, pass an empty Hash as a request object (see above).
222
+ #
223
+ # @param parent [::String]
224
+ # Required. The resource name of the Location to create the Endpoint in.
225
+ # Format: `projects/{project}/locations/{location}`
226
+ # @param endpoint [::Google::Cloud::AIPlatform::V1::Endpoint, ::Hash]
227
+ # Required. The Endpoint to create.
228
+ # @param endpoint_id [::String]
229
+ # Immutable. The ID to use for endpoint, which will become the final
230
+ # component of the endpoint resource name.
231
+ # If not provided, Vertex AI will generate a value for this ID.
232
+ #
233
+ # If the first character is a letter, this value may be up to 63 characters,
234
+ # and valid characters are `[a-z0-9-]`. The last character must be a letter
235
+ # or number.
236
+ #
237
+ # If the first character is a number, this value may be up to 9 characters,
238
+ # and valid characters are `[0-9]` with no leading zeros.
239
+ #
240
+ # When using HTTP/JSON, this field is populated
241
+ # based on a query string argument, such as `?endpoint_id=12345`. This is the
242
+ # fallback for fields that are not included in either the URI or the body.
243
+ # @yield [result, operation] Access the result along with the TransportOperation object
244
+ # @yieldparam result [::Gapic::Operation]
245
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
246
+ #
247
+ # @return [::Gapic::Operation]
248
+ #
249
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
250
+ #
251
+ # @example Basic example
252
+ # require "google/cloud/ai_platform/v1"
253
+ #
254
+ # # Create a client object. The client can be reused for multiple calls.
255
+ # client = Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new
256
+ #
257
+ # # Create a request. To set request fields, pass in keyword arguments.
258
+ # request = Google::Cloud::AIPlatform::V1::CreateEndpointRequest.new
259
+ #
260
+ # # Call the create_endpoint method.
261
+ # result = client.create_endpoint request
262
+ #
263
+ # # The returned object is of type Gapic::Operation. You can use it to
264
+ # # check the status of an operation, cancel it, or wait for results.
265
+ # # Here is how to wait for a response.
266
+ # result.wait_until_done! timeout: 60
267
+ # if result.response?
268
+ # p result.response
269
+ # else
270
+ # puts "No response received."
271
+ # end
272
+ #
273
+ def create_endpoint request, options = nil
274
+ raise ::ArgumentError, "request must be provided" if request.nil?
275
+
276
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateEndpointRequest
277
+
278
+ # Converts hash and nil to an options object
279
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
280
+
281
+ # Customize the options with defaults
282
+ call_metadata = @config.rpcs.create_endpoint.metadata.to_h
283
+
284
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
285
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
286
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
287
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
288
+ transports_version_send: [:rest]
289
+
290
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
291
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
292
+
293
+ options.apply_defaults timeout: @config.rpcs.create_endpoint.timeout,
294
+ metadata: call_metadata,
295
+ retry_policy: @config.rpcs.create_endpoint.retry_policy
296
+
297
+ options.apply_defaults timeout: @config.timeout,
298
+ metadata: @config.metadata,
299
+ retry_policy: @config.retry_policy
300
+
301
+ @endpoint_service_stub.create_endpoint request, options do |result, operation|
302
+ result = ::Gapic::Operation.new result, @operations_client, options: options
303
+ yield result, operation if block_given?
304
+ return result
305
+ end
306
+ rescue ::Gapic::Rest::Error => e
307
+ raise ::Google::Cloud::Error.from_error(e)
308
+ end
309
+
310
+ ##
311
+ # Gets an Endpoint.
312
+ #
313
+ # @overload get_endpoint(request, options = nil)
314
+ # Pass arguments to `get_endpoint` via a request object, either of type
315
+ # {::Google::Cloud::AIPlatform::V1::GetEndpointRequest} or an equivalent Hash.
316
+ #
317
+ # @param request [::Google::Cloud::AIPlatform::V1::GetEndpointRequest, ::Hash]
318
+ # A request object representing the call parameters. Required. To specify no
319
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
320
+ # @param options [::Gapic::CallOptions, ::Hash]
321
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
322
+ #
323
+ # @overload get_endpoint(name: nil)
324
+ # Pass arguments to `get_endpoint` via keyword arguments. Note that at
325
+ # least one keyword argument is required. To specify no parameters, or to keep all
326
+ # the default parameter values, pass an empty Hash as a request object (see above).
327
+ #
328
+ # @param name [::String]
329
+ # Required. The name of the Endpoint resource.
330
+ # Format:
331
+ # `projects/{project}/locations/{location}/endpoints/{endpoint}`
332
+ # @yield [result, operation] Access the result along with the TransportOperation object
333
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::Endpoint]
334
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
335
+ #
336
+ # @return [::Google::Cloud::AIPlatform::V1::Endpoint]
337
+ #
338
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
339
+ #
340
+ # @example Basic example
341
+ # require "google/cloud/ai_platform/v1"
342
+ #
343
+ # # Create a client object. The client can be reused for multiple calls.
344
+ # client = Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new
345
+ #
346
+ # # Create a request. To set request fields, pass in keyword arguments.
347
+ # request = Google::Cloud::AIPlatform::V1::GetEndpointRequest.new
348
+ #
349
+ # # Call the get_endpoint method.
350
+ # result = client.get_endpoint request
351
+ #
352
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::Endpoint.
353
+ # p result
354
+ #
355
+ def get_endpoint request, options = nil
356
+ raise ::ArgumentError, "request must be provided" if request.nil?
357
+
358
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetEndpointRequest
359
+
360
+ # Converts hash and nil to an options object
361
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
362
+
363
+ # Customize the options with defaults
364
+ call_metadata = @config.rpcs.get_endpoint.metadata.to_h
365
+
366
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
367
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
368
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
369
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
370
+ transports_version_send: [:rest]
371
+
372
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
373
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
374
+
375
+ options.apply_defaults timeout: @config.rpcs.get_endpoint.timeout,
376
+ metadata: call_metadata,
377
+ retry_policy: @config.rpcs.get_endpoint.retry_policy
378
+
379
+ options.apply_defaults timeout: @config.timeout,
380
+ metadata: @config.metadata,
381
+ retry_policy: @config.retry_policy
382
+
383
+ @endpoint_service_stub.get_endpoint request, options do |result, operation|
384
+ yield result, operation if block_given?
385
+ return result
386
+ end
387
+ rescue ::Gapic::Rest::Error => e
388
+ raise ::Google::Cloud::Error.from_error(e)
389
+ end
390
+
391
+ ##
392
+ # Lists Endpoints in a Location.
393
+ #
394
+ # @overload list_endpoints(request, options = nil)
395
+ # Pass arguments to `list_endpoints` via a request object, either of type
396
+ # {::Google::Cloud::AIPlatform::V1::ListEndpointsRequest} or an equivalent Hash.
397
+ #
398
+ # @param request [::Google::Cloud::AIPlatform::V1::ListEndpointsRequest, ::Hash]
399
+ # A request object representing the call parameters. Required. To specify no
400
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
401
+ # @param options [::Gapic::CallOptions, ::Hash]
402
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
403
+ #
404
+ # @overload list_endpoints(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil)
405
+ # Pass arguments to `list_endpoints` via keyword arguments. Note that at
406
+ # least one keyword argument is required. To specify no parameters, or to keep all
407
+ # the default parameter values, pass an empty Hash as a request object (see above).
408
+ #
409
+ # @param parent [::String]
410
+ # Required. The resource name of the Location from which to list the
411
+ # Endpoints. Format: `projects/{project}/locations/{location}`
412
+ # @param filter [::String]
413
+ # Optional. An expression for filtering the results of the request. For field
414
+ # names both snake_case and camelCase are supported.
415
+ #
416
+ # * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint
417
+ # ID, i.e. the last segment of the Endpoint's
418
+ # {::Google::Cloud::AIPlatform::V1::Endpoint#name resource name}.
419
+ # * `display_name` supports `=` and `!=`.
420
+ # * `labels` supports general map functions that is:
421
+ # * `labels.key=value` - key:value equality
422
+ # * `labels.key:*` or `labels:key` - key existence
423
+ # * A key including a space must be quoted. `labels."a key"`.
424
+ # * `base_model_name` only supports `=`.
425
+ #
426
+ # Some examples:
427
+ #
428
+ # * `endpoint=1`
429
+ # * `displayName="myDisplayName"`
430
+ # * `labels.myKey="myValue"`
431
+ # * `baseModelName="text-bison"`
432
+ # @param page_size [::Integer]
433
+ # Optional. The standard list page size.
434
+ # @param page_token [::String]
435
+ # Optional. The standard list page token.
436
+ # Typically obtained via
437
+ # {::Google::Cloud::AIPlatform::V1::ListEndpointsResponse#next_page_token ListEndpointsResponse.next_page_token}
438
+ # of the previous
439
+ # {::Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client#list_endpoints EndpointService.ListEndpoints}
440
+ # call.
441
+ # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
442
+ # Optional. Mask specifying which fields to read.
443
+ # @param order_by [::String]
444
+ # A comma-separated list of fields to order by, sorted in ascending order.
445
+ # Use "desc" after a field name for descending.
446
+ # Supported fields:
447
+ #
448
+ # * `display_name`
449
+ # * `create_time`
450
+ # * `update_time`
451
+ #
452
+ # Example: `display_name, create_time desc`.
453
+ # @yield [result, operation] Access the result along with the TransportOperation object
454
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Endpoint>]
455
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
456
+ #
457
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Endpoint>]
458
+ #
459
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
460
+ #
461
+ # @example Basic example
462
+ # require "google/cloud/ai_platform/v1"
463
+ #
464
+ # # Create a client object. The client can be reused for multiple calls.
465
+ # client = Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new
466
+ #
467
+ # # Create a request. To set request fields, pass in keyword arguments.
468
+ # request = Google::Cloud::AIPlatform::V1::ListEndpointsRequest.new
469
+ #
470
+ # # Call the list_endpoints method.
471
+ # result = client.list_endpoints request
472
+ #
473
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
474
+ # # over elements, and API calls will be issued to fetch pages as needed.
475
+ # result.each do |item|
476
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::Endpoint.
477
+ # p item
478
+ # end
479
+ #
480
+ def list_endpoints request, options = nil
481
+ raise ::ArgumentError, "request must be provided" if request.nil?
482
+
483
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListEndpointsRequest
484
+
485
+ # Converts hash and nil to an options object
486
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
487
+
488
+ # Customize the options with defaults
489
+ call_metadata = @config.rpcs.list_endpoints.metadata.to_h
490
+
491
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
492
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
493
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
494
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
495
+ transports_version_send: [:rest]
496
+
497
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
498
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
499
+
500
+ options.apply_defaults timeout: @config.rpcs.list_endpoints.timeout,
501
+ metadata: call_metadata,
502
+ retry_policy: @config.rpcs.list_endpoints.retry_policy
503
+
504
+ options.apply_defaults timeout: @config.timeout,
505
+ metadata: @config.metadata,
506
+ retry_policy: @config.retry_policy
507
+
508
+ @endpoint_service_stub.list_endpoints request, options do |result, operation|
509
+ result = ::Gapic::Rest::PagedEnumerable.new @endpoint_service_stub, :list_endpoints, "endpoints", request, result, options
510
+ yield result, operation if block_given?
511
+ return result
512
+ end
513
+ rescue ::Gapic::Rest::Error => e
514
+ raise ::Google::Cloud::Error.from_error(e)
515
+ end
516
+
517
+ ##
518
+ # Updates an Endpoint.
519
+ #
520
+ # @overload update_endpoint(request, options = nil)
521
+ # Pass arguments to `update_endpoint` via a request object, either of type
522
+ # {::Google::Cloud::AIPlatform::V1::UpdateEndpointRequest} or an equivalent Hash.
523
+ #
524
+ # @param request [::Google::Cloud::AIPlatform::V1::UpdateEndpointRequest, ::Hash]
525
+ # A request object representing the call parameters. Required. To specify no
526
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
527
+ # @param options [::Gapic::CallOptions, ::Hash]
528
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
529
+ #
530
+ # @overload update_endpoint(endpoint: nil, update_mask: nil)
531
+ # Pass arguments to `update_endpoint` via keyword arguments. Note that at
532
+ # least one keyword argument is required. To specify no parameters, or to keep all
533
+ # the default parameter values, pass an empty Hash as a request object (see above).
534
+ #
535
+ # @param endpoint [::Google::Cloud::AIPlatform::V1::Endpoint, ::Hash]
536
+ # Required. The Endpoint which replaces the resource on the server.
537
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
538
+ # Required. The update mask applies to the resource. See
539
+ # {::Google::Protobuf::FieldMask google.protobuf.FieldMask}.
540
+ # @yield [result, operation] Access the result along with the TransportOperation object
541
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::Endpoint]
542
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
543
+ #
544
+ # @return [::Google::Cloud::AIPlatform::V1::Endpoint]
545
+ #
546
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
547
+ #
548
+ # @example Basic example
549
+ # require "google/cloud/ai_platform/v1"
550
+ #
551
+ # # Create a client object. The client can be reused for multiple calls.
552
+ # client = Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new
553
+ #
554
+ # # Create a request. To set request fields, pass in keyword arguments.
555
+ # request = Google::Cloud::AIPlatform::V1::UpdateEndpointRequest.new
556
+ #
557
+ # # Call the update_endpoint method.
558
+ # result = client.update_endpoint request
559
+ #
560
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::Endpoint.
561
+ # p result
562
+ #
563
+ def update_endpoint request, options = nil
564
+ raise ::ArgumentError, "request must be provided" if request.nil?
565
+
566
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateEndpointRequest
567
+
568
+ # Converts hash and nil to an options object
569
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
570
+
571
+ # Customize the options with defaults
572
+ call_metadata = @config.rpcs.update_endpoint.metadata.to_h
573
+
574
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
575
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
576
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
577
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
578
+ transports_version_send: [:rest]
579
+
580
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
581
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
582
+
583
+ options.apply_defaults timeout: @config.rpcs.update_endpoint.timeout,
584
+ metadata: call_metadata,
585
+ retry_policy: @config.rpcs.update_endpoint.retry_policy
586
+
587
+ options.apply_defaults timeout: @config.timeout,
588
+ metadata: @config.metadata,
589
+ retry_policy: @config.retry_policy
590
+
591
+ @endpoint_service_stub.update_endpoint request, options do |result, operation|
592
+ yield result, operation if block_given?
593
+ return result
594
+ end
595
+ rescue ::Gapic::Rest::Error => e
596
+ raise ::Google::Cloud::Error.from_error(e)
597
+ end
598
+
599
+ ##
600
+ # Deletes an Endpoint.
601
+ #
602
+ # @overload delete_endpoint(request, options = nil)
603
+ # Pass arguments to `delete_endpoint` via a request object, either of type
604
+ # {::Google::Cloud::AIPlatform::V1::DeleteEndpointRequest} or an equivalent Hash.
605
+ #
606
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteEndpointRequest, ::Hash]
607
+ # A request object representing the call parameters. Required. To specify no
608
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
609
+ # @param options [::Gapic::CallOptions, ::Hash]
610
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
611
+ #
612
+ # @overload delete_endpoint(name: nil)
613
+ # Pass arguments to `delete_endpoint` via keyword arguments. Note that at
614
+ # least one keyword argument is required. To specify no parameters, or to keep all
615
+ # the default parameter values, pass an empty Hash as a request object (see above).
616
+ #
617
+ # @param name [::String]
618
+ # Required. The name of the Endpoint resource to be deleted.
619
+ # Format:
620
+ # `projects/{project}/locations/{location}/endpoints/{endpoint}`
621
+ # @yield [result, operation] Access the result along with the TransportOperation object
622
+ # @yieldparam result [::Gapic::Operation]
623
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
624
+ #
625
+ # @return [::Gapic::Operation]
626
+ #
627
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
628
+ #
629
+ # @example Basic example
630
+ # require "google/cloud/ai_platform/v1"
631
+ #
632
+ # # Create a client object. The client can be reused for multiple calls.
633
+ # client = Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new
634
+ #
635
+ # # Create a request. To set request fields, pass in keyword arguments.
636
+ # request = Google::Cloud::AIPlatform::V1::DeleteEndpointRequest.new
637
+ #
638
+ # # Call the delete_endpoint method.
639
+ # result = client.delete_endpoint request
640
+ #
641
+ # # The returned object is of type Gapic::Operation. You can use it to
642
+ # # check the status of an operation, cancel it, or wait for results.
643
+ # # Here is how to wait for a response.
644
+ # result.wait_until_done! timeout: 60
645
+ # if result.response?
646
+ # p result.response
647
+ # else
648
+ # puts "No response received."
649
+ # end
650
+ #
651
+ def delete_endpoint request, options = nil
652
+ raise ::ArgumentError, "request must be provided" if request.nil?
653
+
654
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteEndpointRequest
655
+
656
+ # Converts hash and nil to an options object
657
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
658
+
659
+ # Customize the options with defaults
660
+ call_metadata = @config.rpcs.delete_endpoint.metadata.to_h
661
+
662
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
663
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
664
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
665
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
666
+ transports_version_send: [:rest]
667
+
668
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
669
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
670
+
671
+ options.apply_defaults timeout: @config.rpcs.delete_endpoint.timeout,
672
+ metadata: call_metadata,
673
+ retry_policy: @config.rpcs.delete_endpoint.retry_policy
674
+
675
+ options.apply_defaults timeout: @config.timeout,
676
+ metadata: @config.metadata,
677
+ retry_policy: @config.retry_policy
678
+
679
+ @endpoint_service_stub.delete_endpoint request, options do |result, operation|
680
+ result = ::Gapic::Operation.new result, @operations_client, options: options
681
+ yield result, operation if block_given?
682
+ return result
683
+ end
684
+ rescue ::Gapic::Rest::Error => e
685
+ raise ::Google::Cloud::Error.from_error(e)
686
+ end
687
+
688
+ ##
689
+ # Deploys a Model into this Endpoint, creating a DeployedModel within it.
690
+ #
691
+ # @overload deploy_model(request, options = nil)
692
+ # Pass arguments to `deploy_model` via a request object, either of type
693
+ # {::Google::Cloud::AIPlatform::V1::DeployModelRequest} or an equivalent Hash.
694
+ #
695
+ # @param request [::Google::Cloud::AIPlatform::V1::DeployModelRequest, ::Hash]
696
+ # A request object representing the call parameters. Required. To specify no
697
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
698
+ # @param options [::Gapic::CallOptions, ::Hash]
699
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
700
+ #
701
+ # @overload deploy_model(endpoint: nil, deployed_model: nil, traffic_split: nil)
702
+ # Pass arguments to `deploy_model` via keyword arguments. Note that at
703
+ # least one keyword argument is required. To specify no parameters, or to keep all
704
+ # the default parameter values, pass an empty Hash as a request object (see above).
705
+ #
706
+ # @param endpoint [::String]
707
+ # Required. The name of the Endpoint resource into which to deploy a Model.
708
+ # Format:
709
+ # `projects/{project}/locations/{location}/endpoints/{endpoint}`
710
+ # @param deployed_model [::Google::Cloud::AIPlatform::V1::DeployedModel, ::Hash]
711
+ # Required. The DeployedModel to be created within the Endpoint. Note that
712
+ # {::Google::Cloud::AIPlatform::V1::Endpoint#traffic_split Endpoint.traffic_split}
713
+ # must be updated for the DeployedModel to start receiving traffic, either as
714
+ # part of this call, or via
715
+ # {::Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client#update_endpoint EndpointService.UpdateEndpoint}.
716
+ # @param traffic_split [::Hash{::String => ::Integer}]
717
+ # A map from a DeployedModel's ID to the percentage of this Endpoint's
718
+ # traffic that should be forwarded to that DeployedModel.
719
+ #
720
+ # If this field is non-empty, then the Endpoint's
721
+ # {::Google::Cloud::AIPlatform::V1::Endpoint#traffic_split traffic_split} will be
722
+ # overwritten with it. To refer to the ID of the just being deployed Model, a
723
+ # "0" should be used, and the actual ID of the new DeployedModel will be
724
+ # filled in its place by this method. The traffic percentage values must add
725
+ # up to 100.
726
+ #
727
+ # If this field is empty, then the Endpoint's
728
+ # {::Google::Cloud::AIPlatform::V1::Endpoint#traffic_split traffic_split} is not
729
+ # updated.
730
+ # @yield [result, operation] Access the result along with the TransportOperation object
731
+ # @yieldparam result [::Gapic::Operation]
732
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
733
+ #
734
+ # @return [::Gapic::Operation]
735
+ #
736
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
737
+ #
738
+ # @example Basic example
739
+ # require "google/cloud/ai_platform/v1"
740
+ #
741
+ # # Create a client object. The client can be reused for multiple calls.
742
+ # client = Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new
743
+ #
744
+ # # Create a request. To set request fields, pass in keyword arguments.
745
+ # request = Google::Cloud::AIPlatform::V1::DeployModelRequest.new
746
+ #
747
+ # # Call the deploy_model method.
748
+ # result = client.deploy_model request
749
+ #
750
+ # # The returned object is of type Gapic::Operation. You can use it to
751
+ # # check the status of an operation, cancel it, or wait for results.
752
+ # # Here is how to wait for a response.
753
+ # result.wait_until_done! timeout: 60
754
+ # if result.response?
755
+ # p result.response
756
+ # else
757
+ # puts "No response received."
758
+ # end
759
+ #
760
+ def deploy_model request, options = nil
761
+ raise ::ArgumentError, "request must be provided" if request.nil?
762
+
763
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeployModelRequest
764
+
765
+ # Converts hash and nil to an options object
766
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
767
+
768
+ # Customize the options with defaults
769
+ call_metadata = @config.rpcs.deploy_model.metadata.to_h
770
+
771
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
772
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
773
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
774
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
775
+ transports_version_send: [:rest]
776
+
777
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
778
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
779
+
780
+ options.apply_defaults timeout: @config.rpcs.deploy_model.timeout,
781
+ metadata: call_metadata,
782
+ retry_policy: @config.rpcs.deploy_model.retry_policy
783
+
784
+ options.apply_defaults timeout: @config.timeout,
785
+ metadata: @config.metadata,
786
+ retry_policy: @config.retry_policy
787
+
788
+ @endpoint_service_stub.deploy_model request, options do |result, operation|
789
+ result = ::Gapic::Operation.new result, @operations_client, options: options
790
+ yield result, operation if block_given?
791
+ return result
792
+ end
793
+ rescue ::Gapic::Rest::Error => e
794
+ raise ::Google::Cloud::Error.from_error(e)
795
+ end
796
+
797
+ ##
798
+ # Undeploys a Model from an Endpoint, removing a DeployedModel from it, and
799
+ # freeing all resources it's using.
800
+ #
801
+ # @overload undeploy_model(request, options = nil)
802
+ # Pass arguments to `undeploy_model` via a request object, either of type
803
+ # {::Google::Cloud::AIPlatform::V1::UndeployModelRequest} or an equivalent Hash.
804
+ #
805
+ # @param request [::Google::Cloud::AIPlatform::V1::UndeployModelRequest, ::Hash]
806
+ # A request object representing the call parameters. Required. To specify no
807
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
808
+ # @param options [::Gapic::CallOptions, ::Hash]
809
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
810
+ #
811
+ # @overload undeploy_model(endpoint: nil, deployed_model_id: nil, traffic_split: nil)
812
+ # Pass arguments to `undeploy_model` via keyword arguments. Note that at
813
+ # least one keyword argument is required. To specify no parameters, or to keep all
814
+ # the default parameter values, pass an empty Hash as a request object (see above).
815
+ #
816
+ # @param endpoint [::String]
817
+ # Required. The name of the Endpoint resource from which to undeploy a Model.
818
+ # Format:
819
+ # `projects/{project}/locations/{location}/endpoints/{endpoint}`
820
+ # @param deployed_model_id [::String]
821
+ # Required. The ID of the DeployedModel to be undeployed from the Endpoint.
822
+ # @param traffic_split [::Hash{::String => ::Integer}]
823
+ # If this field is provided, then the Endpoint's
824
+ # {::Google::Cloud::AIPlatform::V1::Endpoint#traffic_split traffic_split} will be
825
+ # overwritten with it. If last DeployedModel is being undeployed from the
826
+ # Endpoint, the [Endpoint.traffic_split] will always end up empty when this
827
+ # call returns. A DeployedModel will be successfully undeployed only if it
828
+ # doesn't have any traffic assigned to it when this method executes, or if
829
+ # this field unassigns any traffic to it.
830
+ # @yield [result, operation] Access the result along with the TransportOperation object
831
+ # @yieldparam result [::Gapic::Operation]
832
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
833
+ #
834
+ # @return [::Gapic::Operation]
835
+ #
836
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
837
+ #
838
+ # @example Basic example
839
+ # require "google/cloud/ai_platform/v1"
840
+ #
841
+ # # Create a client object. The client can be reused for multiple calls.
842
+ # client = Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new
843
+ #
844
+ # # Create a request. To set request fields, pass in keyword arguments.
845
+ # request = Google::Cloud::AIPlatform::V1::UndeployModelRequest.new
846
+ #
847
+ # # Call the undeploy_model method.
848
+ # result = client.undeploy_model request
849
+ #
850
+ # # The returned object is of type Gapic::Operation. You can use it to
851
+ # # check the status of an operation, cancel it, or wait for results.
852
+ # # Here is how to wait for a response.
853
+ # result.wait_until_done! timeout: 60
854
+ # if result.response?
855
+ # p result.response
856
+ # else
857
+ # puts "No response received."
858
+ # end
859
+ #
860
+ def undeploy_model request, options = nil
861
+ raise ::ArgumentError, "request must be provided" if request.nil?
862
+
863
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UndeployModelRequest
864
+
865
+ # Converts hash and nil to an options object
866
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
867
+
868
+ # Customize the options with defaults
869
+ call_metadata = @config.rpcs.undeploy_model.metadata.to_h
870
+
871
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
872
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
873
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
874
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
875
+ transports_version_send: [:rest]
876
+
877
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
878
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
879
+
880
+ options.apply_defaults timeout: @config.rpcs.undeploy_model.timeout,
881
+ metadata: call_metadata,
882
+ retry_policy: @config.rpcs.undeploy_model.retry_policy
883
+
884
+ options.apply_defaults timeout: @config.timeout,
885
+ metadata: @config.metadata,
886
+ retry_policy: @config.retry_policy
887
+
888
+ @endpoint_service_stub.undeploy_model request, options do |result, operation|
889
+ result = ::Gapic::Operation.new result, @operations_client, options: options
890
+ yield result, operation if block_given?
891
+ return result
892
+ end
893
+ rescue ::Gapic::Rest::Error => e
894
+ raise ::Google::Cloud::Error.from_error(e)
895
+ end
896
+
897
+ ##
898
+ # Updates an existing deployed model. Updatable fields include
899
+ # `min_replica_count`, `max_replica_count`, `autoscaling_metric_specs`,
900
+ # `disable_container_logging` (v1 only), and `enable_container_logging`
901
+ # (v1beta1 only).
902
+ #
903
+ # @overload mutate_deployed_model(request, options = nil)
904
+ # Pass arguments to `mutate_deployed_model` via a request object, either of type
905
+ # {::Google::Cloud::AIPlatform::V1::MutateDeployedModelRequest} or an equivalent Hash.
906
+ #
907
+ # @param request [::Google::Cloud::AIPlatform::V1::MutateDeployedModelRequest, ::Hash]
908
+ # A request object representing the call parameters. Required. To specify no
909
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
910
+ # @param options [::Gapic::CallOptions, ::Hash]
911
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
912
+ #
913
+ # @overload mutate_deployed_model(endpoint: nil, deployed_model: nil, update_mask: nil)
914
+ # Pass arguments to `mutate_deployed_model` via keyword arguments. Note that at
915
+ # least one keyword argument is required. To specify no parameters, or to keep all
916
+ # the default parameter values, pass an empty Hash as a request object (see above).
917
+ #
918
+ # @param endpoint [::String]
919
+ # Required. The name of the Endpoint resource into which to mutate a
920
+ # DeployedModel. Format:
921
+ # `projects/{project}/locations/{location}/endpoints/{endpoint}`
922
+ # @param deployed_model [::Google::Cloud::AIPlatform::V1::DeployedModel, ::Hash]
923
+ # Required. The DeployedModel to be mutated within the Endpoint. Only the
924
+ # following fields can be mutated:
925
+ #
926
+ # * `min_replica_count` in either
927
+ # {::Google::Cloud::AIPlatform::V1::DedicatedResources DedicatedResources} or
928
+ # {::Google::Cloud::AIPlatform::V1::AutomaticResources AutomaticResources}
929
+ # * `max_replica_count` in either
930
+ # {::Google::Cloud::AIPlatform::V1::DedicatedResources DedicatedResources} or
931
+ # {::Google::Cloud::AIPlatform::V1::AutomaticResources AutomaticResources}
932
+ # * {::Google::Cloud::AIPlatform::V1::DedicatedResources#autoscaling_metric_specs autoscaling_metric_specs}
933
+ # * `disable_container_logging` (v1 only)
934
+ # * `enable_container_logging` (v1beta1 only)
935
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
936
+ # Required. The update mask applies to the resource. See
937
+ # {::Google::Protobuf::FieldMask google.protobuf.FieldMask}.
938
+ # @yield [result, operation] Access the result along with the TransportOperation object
939
+ # @yieldparam result [::Gapic::Operation]
940
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
941
+ #
942
+ # @return [::Gapic::Operation]
943
+ #
944
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
945
+ #
946
+ # @example Basic example
947
+ # require "google/cloud/ai_platform/v1"
948
+ #
949
+ # # Create a client object. The client can be reused for multiple calls.
950
+ # client = Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new
951
+ #
952
+ # # Create a request. To set request fields, pass in keyword arguments.
953
+ # request = Google::Cloud::AIPlatform::V1::MutateDeployedModelRequest.new
954
+ #
955
+ # # Call the mutate_deployed_model method.
956
+ # result = client.mutate_deployed_model request
957
+ #
958
+ # # The returned object is of type Gapic::Operation. You can use it to
959
+ # # check the status of an operation, cancel it, or wait for results.
960
+ # # Here is how to wait for a response.
961
+ # result.wait_until_done! timeout: 60
962
+ # if result.response?
963
+ # p result.response
964
+ # else
965
+ # puts "No response received."
966
+ # end
967
+ #
968
+ def mutate_deployed_model request, options = nil
969
+ raise ::ArgumentError, "request must be provided" if request.nil?
970
+
971
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::MutateDeployedModelRequest
972
+
973
+ # Converts hash and nil to an options object
974
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
975
+
976
+ # Customize the options with defaults
977
+ call_metadata = @config.rpcs.mutate_deployed_model.metadata.to_h
978
+
979
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
980
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
981
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
982
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
983
+ transports_version_send: [:rest]
984
+
985
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
986
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
987
+
988
+ options.apply_defaults timeout: @config.rpcs.mutate_deployed_model.timeout,
989
+ metadata: call_metadata,
990
+ retry_policy: @config.rpcs.mutate_deployed_model.retry_policy
991
+
992
+ options.apply_defaults timeout: @config.timeout,
993
+ metadata: @config.metadata,
994
+ retry_policy: @config.retry_policy
995
+
996
+ @endpoint_service_stub.mutate_deployed_model request, options do |result, operation|
997
+ result = ::Gapic::Operation.new result, @operations_client, options: options
998
+ yield result, operation if block_given?
999
+ return result
1000
+ end
1001
+ rescue ::Gapic::Rest::Error => e
1002
+ raise ::Google::Cloud::Error.from_error(e)
1003
+ end
1004
+
1005
+ ##
1006
+ # Configuration class for the EndpointService REST API.
1007
+ #
1008
+ # This class represents the configuration for EndpointService REST,
1009
+ # providing control over timeouts, retry behavior, logging, transport
1010
+ # parameters, and other low-level controls. Certain parameters can also be
1011
+ # applied individually to specific RPCs. See
1012
+ # {::Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client::Configuration::Rpcs}
1013
+ # for a list of RPCs that can be configured independently.
1014
+ #
1015
+ # Configuration can be applied globally to all clients, or to a single client
1016
+ # on construction.
1017
+ #
1018
+ # @example
1019
+ #
1020
+ # # Modify the global config, setting the timeout for
1021
+ # # create_endpoint to 20 seconds,
1022
+ # # and all remaining timeouts to 10 seconds.
1023
+ # ::Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.configure do |config|
1024
+ # config.timeout = 10.0
1025
+ # config.rpcs.create_endpoint.timeout = 20.0
1026
+ # end
1027
+ #
1028
+ # # Apply the above configuration only to a new client.
1029
+ # client = ::Google::Cloud::AIPlatform::V1::EndpointService::Rest::Client.new do |config|
1030
+ # config.timeout = 10.0
1031
+ # config.rpcs.create_endpoint.timeout = 20.0
1032
+ # end
1033
+ #
1034
+ # @!attribute [rw] endpoint
1035
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1036
+ # nil, indicating to use the default endpoint in the current universe domain.
1037
+ # @return [::String,nil]
1038
+ # @!attribute [rw] credentials
1039
+ # Credentials to send with calls. You may provide any of the following types:
1040
+ # * (`String`) The path to a service account key file in JSON format
1041
+ # * (`Hash`) A service account key as a Hash
1042
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1043
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1044
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1045
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1046
+ # * (`nil`) indicating no credentials
1047
+ # @return [::Object]
1048
+ # @!attribute [rw] scope
1049
+ # The OAuth scopes
1050
+ # @return [::Array<::String>]
1051
+ # @!attribute [rw] lib_name
1052
+ # The library name as recorded in instrumentation and logging
1053
+ # @return [::String]
1054
+ # @!attribute [rw] lib_version
1055
+ # The library version as recorded in instrumentation and logging
1056
+ # @return [::String]
1057
+ # @!attribute [rw] timeout
1058
+ # The call timeout in seconds.
1059
+ # @return [::Numeric]
1060
+ # @!attribute [rw] metadata
1061
+ # Additional headers to be sent with the call.
1062
+ # @return [::Hash{::Symbol=>::String}]
1063
+ # @!attribute [rw] retry_policy
1064
+ # The retry policy. The value is a hash with the following keys:
1065
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1066
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1067
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1068
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1069
+ # trigger a retry.
1070
+ # @return [::Hash]
1071
+ # @!attribute [rw] quota_project
1072
+ # A separate project against which to charge quota.
1073
+ # @return [::String]
1074
+ # @!attribute [rw] universe_domain
1075
+ # The universe domain within which to make requests. This determines the
1076
+ # default endpoint URL. The default value of nil uses the environment
1077
+ # universe (usually the default "googleapis.com" universe).
1078
+ # @return [::String,nil]
1079
+ #
1080
+ class Configuration
1081
+ extend ::Gapic::Config
1082
+
1083
+ # @private
1084
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1085
+ DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
1086
+
1087
+ config_attr :endpoint, nil, ::String, nil
1088
+ config_attr :credentials, nil do |value|
1089
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1090
+ allowed.any? { |klass| klass === value }
1091
+ end
1092
+ config_attr :scope, nil, ::String, ::Array, nil
1093
+ config_attr :lib_name, nil, ::String, nil
1094
+ config_attr :lib_version, nil, ::String, nil
1095
+ config_attr :timeout, nil, ::Numeric, nil
1096
+ config_attr :metadata, nil, ::Hash, nil
1097
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1098
+ config_attr :quota_project, nil, ::String, nil
1099
+ config_attr :universe_domain, nil, ::String, nil
1100
+
1101
+ # @private
1102
+ # Overrides for http bindings for the RPCs of this service
1103
+ # are only used when this service is used as mixin, and only
1104
+ # by the host service.
1105
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1106
+ config_attr :bindings_override, {}, ::Hash, nil
1107
+
1108
+ # @private
1109
+ def initialize parent_config = nil
1110
+ @parent_config = parent_config unless parent_config.nil?
1111
+
1112
+ yield self if block_given?
1113
+ end
1114
+
1115
+ ##
1116
+ # Configurations for individual RPCs
1117
+ # @return [Rpcs]
1118
+ #
1119
+ def rpcs
1120
+ @rpcs ||= begin
1121
+ parent_rpcs = nil
1122
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1123
+ Rpcs.new parent_rpcs
1124
+ end
1125
+ end
1126
+
1127
+ ##
1128
+ # Configuration RPC class for the EndpointService API.
1129
+ #
1130
+ # Includes fields providing the configuration for each RPC in this service.
1131
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1132
+ # the following configuration fields:
1133
+ #
1134
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1135
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1136
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1137
+ # include the following keys:
1138
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1139
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1140
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1141
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1142
+ # trigger a retry.
1143
+ #
1144
+ class Rpcs
1145
+ ##
1146
+ # RPC-specific configuration for `create_endpoint`
1147
+ # @return [::Gapic::Config::Method]
1148
+ #
1149
+ attr_reader :create_endpoint
1150
+ ##
1151
+ # RPC-specific configuration for `get_endpoint`
1152
+ # @return [::Gapic::Config::Method]
1153
+ #
1154
+ attr_reader :get_endpoint
1155
+ ##
1156
+ # RPC-specific configuration for `list_endpoints`
1157
+ # @return [::Gapic::Config::Method]
1158
+ #
1159
+ attr_reader :list_endpoints
1160
+ ##
1161
+ # RPC-specific configuration for `update_endpoint`
1162
+ # @return [::Gapic::Config::Method]
1163
+ #
1164
+ attr_reader :update_endpoint
1165
+ ##
1166
+ # RPC-specific configuration for `delete_endpoint`
1167
+ # @return [::Gapic::Config::Method]
1168
+ #
1169
+ attr_reader :delete_endpoint
1170
+ ##
1171
+ # RPC-specific configuration for `deploy_model`
1172
+ # @return [::Gapic::Config::Method]
1173
+ #
1174
+ attr_reader :deploy_model
1175
+ ##
1176
+ # RPC-specific configuration for `undeploy_model`
1177
+ # @return [::Gapic::Config::Method]
1178
+ #
1179
+ attr_reader :undeploy_model
1180
+ ##
1181
+ # RPC-specific configuration for `mutate_deployed_model`
1182
+ # @return [::Gapic::Config::Method]
1183
+ #
1184
+ attr_reader :mutate_deployed_model
1185
+
1186
+ # @private
1187
+ def initialize parent_rpcs = nil
1188
+ create_endpoint_config = parent_rpcs.create_endpoint if parent_rpcs.respond_to? :create_endpoint
1189
+ @create_endpoint = ::Gapic::Config::Method.new create_endpoint_config
1190
+ get_endpoint_config = parent_rpcs.get_endpoint if parent_rpcs.respond_to? :get_endpoint
1191
+ @get_endpoint = ::Gapic::Config::Method.new get_endpoint_config
1192
+ list_endpoints_config = parent_rpcs.list_endpoints if parent_rpcs.respond_to? :list_endpoints
1193
+ @list_endpoints = ::Gapic::Config::Method.new list_endpoints_config
1194
+ update_endpoint_config = parent_rpcs.update_endpoint if parent_rpcs.respond_to? :update_endpoint
1195
+ @update_endpoint = ::Gapic::Config::Method.new update_endpoint_config
1196
+ delete_endpoint_config = parent_rpcs.delete_endpoint if parent_rpcs.respond_to? :delete_endpoint
1197
+ @delete_endpoint = ::Gapic::Config::Method.new delete_endpoint_config
1198
+ deploy_model_config = parent_rpcs.deploy_model if parent_rpcs.respond_to? :deploy_model
1199
+ @deploy_model = ::Gapic::Config::Method.new deploy_model_config
1200
+ undeploy_model_config = parent_rpcs.undeploy_model if parent_rpcs.respond_to? :undeploy_model
1201
+ @undeploy_model = ::Gapic::Config::Method.new undeploy_model_config
1202
+ mutate_deployed_model_config = parent_rpcs.mutate_deployed_model if parent_rpcs.respond_to? :mutate_deployed_model
1203
+ @mutate_deployed_model = ::Gapic::Config::Method.new mutate_deployed_model_config
1204
+
1205
+ yield self if block_given?
1206
+ end
1207
+ end
1208
+ end
1209
+ end
1210
+ end
1211
+ end
1212
+ end
1213
+ end
1214
+ end
1215
+ end