google-cloud-ai_platform-v1 0.39.0 → 0.40.0

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