google-cloud-ai_platform 1.4.0 → 1.6.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.
- checksums.yaml +4 -4
- data/README.md +30 -26
- data/lib/google/cloud/ai_platform/version.rb +1 -1
- data/lib/google/cloud/ai_platform.rb +1466 -36
- metadata +6 -9
@@ -55,6 +55,13 @@ module Google
|
|
55
55
|
# `version` parameter. If the DatasetService service is
|
56
56
|
# supported by that API version, and the corresponding gem is available, the
|
57
57
|
# appropriate versioned client will be returned.
|
58
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
59
|
+
# the `transport` parameter.
|
60
|
+
#
|
61
|
+
# Raises an exception if the currently installed versioned client gem for the
|
62
|
+
# given API version does not support the given transport of the DatasetService service.
|
63
|
+
# You can determine whether the method will succeed by calling
|
64
|
+
# {Google::Cloud::AIPlatform.dataset_service_available?}.
|
58
65
|
#
|
59
66
|
# ## About DatasetService
|
60
67
|
#
|
@@ -62,9 +69,10 @@ module Google
|
|
62
69
|
#
|
63
70
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
64
71
|
# Defaults to `:v1`.
|
72
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
65
73
|
# @return [::Object] A client object for the specified version.
|
66
74
|
#
|
67
|
-
def self.dataset_service version: :v1, &block
|
75
|
+
def self.dataset_service version: :v1, transport: :grpc, &block
|
68
76
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
69
77
|
|
70
78
|
package_name = Google::Cloud::AIPlatform
|
@@ -72,9 +80,41 @@ module Google
|
|
72
80
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
73
81
|
.first
|
74
82
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:DatasetService)
|
83
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
75
84
|
service_module.const_get(:Client).new(&block)
|
76
85
|
end
|
77
86
|
|
87
|
+
##
|
88
|
+
# Determines whether the DatasetService service is supported by the current client.
|
89
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.dataset_service}.
|
90
|
+
# If false, that method will raise an exception. This could happen if the given
|
91
|
+
# API version does not exist or does not support the DatasetService service,
|
92
|
+
# or if the versioned client gem needs an update to support the DatasetService service.
|
93
|
+
#
|
94
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
95
|
+
# Defaults to `:v1`.
|
96
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
97
|
+
# @return [boolean] Whether the service is available.
|
98
|
+
#
|
99
|
+
def self.dataset_service_available? version: :v1, transport: :grpc
|
100
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
101
|
+
package_name = Google::Cloud::AIPlatform
|
102
|
+
.constants
|
103
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
104
|
+
.first
|
105
|
+
return false unless package_name
|
106
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
107
|
+
return false unless service_module.const_defined? :DatasetService
|
108
|
+
service_module = service_module.const_get :DatasetService
|
109
|
+
if transport == :rest
|
110
|
+
return false unless service_module.const_defined? :Rest
|
111
|
+
service_module = service_module.const_get :Rest
|
112
|
+
end
|
113
|
+
service_module.const_defined? :Client
|
114
|
+
rescue ::LoadError
|
115
|
+
false
|
116
|
+
end
|
117
|
+
|
78
118
|
##
|
79
119
|
# Create a new client object for DeploymentResourcePoolService.
|
80
120
|
#
|
@@ -85,6 +125,13 @@ module Google
|
|
85
125
|
# `version` parameter. If the DeploymentResourcePoolService service is
|
86
126
|
# supported by that API version, and the corresponding gem is available, the
|
87
127
|
# appropriate versioned client will be returned.
|
128
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
129
|
+
# the `transport` parameter.
|
130
|
+
#
|
131
|
+
# Raises an exception if the currently installed versioned client gem for the
|
132
|
+
# given API version does not support the given transport of the DeploymentResourcePoolService service.
|
133
|
+
# You can determine whether the method will succeed by calling
|
134
|
+
# {Google::Cloud::AIPlatform.deployment_resource_pool_service_available?}.
|
88
135
|
#
|
89
136
|
# ## About DeploymentResourcePoolService
|
90
137
|
#
|
@@ -92,9 +139,10 @@ module Google
|
|
92
139
|
#
|
93
140
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
94
141
|
# Defaults to `:v1`.
|
142
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
95
143
|
# @return [::Object] A client object for the specified version.
|
96
144
|
#
|
97
|
-
def self.deployment_resource_pool_service version: :v1, &block
|
145
|
+
def self.deployment_resource_pool_service version: :v1, transport: :grpc, &block
|
98
146
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
99
147
|
|
100
148
|
package_name = Google::Cloud::AIPlatform
|
@@ -102,9 +150,41 @@ module Google
|
|
102
150
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
103
151
|
.first
|
104
152
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:DeploymentResourcePoolService)
|
153
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
105
154
|
service_module.const_get(:Client).new(&block)
|
106
155
|
end
|
107
156
|
|
157
|
+
##
|
158
|
+
# Determines whether the DeploymentResourcePoolService service is supported by the current client.
|
159
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.deployment_resource_pool_service}.
|
160
|
+
# If false, that method will raise an exception. This could happen if the given
|
161
|
+
# API version does not exist or does not support the DeploymentResourcePoolService service,
|
162
|
+
# or if the versioned client gem needs an update to support the DeploymentResourcePoolService service.
|
163
|
+
#
|
164
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
165
|
+
# Defaults to `:v1`.
|
166
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
167
|
+
# @return [boolean] Whether the service is available.
|
168
|
+
#
|
169
|
+
def self.deployment_resource_pool_service_available? version: :v1, transport: :grpc
|
170
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
171
|
+
package_name = Google::Cloud::AIPlatform
|
172
|
+
.constants
|
173
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
174
|
+
.first
|
175
|
+
return false unless package_name
|
176
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
177
|
+
return false unless service_module.const_defined? :DeploymentResourcePoolService
|
178
|
+
service_module = service_module.const_get :DeploymentResourcePoolService
|
179
|
+
if transport == :rest
|
180
|
+
return false unless service_module.const_defined? :Rest
|
181
|
+
service_module = service_module.const_get :Rest
|
182
|
+
end
|
183
|
+
service_module.const_defined? :Client
|
184
|
+
rescue ::LoadError
|
185
|
+
false
|
186
|
+
end
|
187
|
+
|
108
188
|
##
|
109
189
|
# Create a new client object for EndpointService.
|
110
190
|
#
|
@@ -115,6 +195,13 @@ module Google
|
|
115
195
|
# `version` parameter. If the EndpointService service is
|
116
196
|
# supported by that API version, and the corresponding gem is available, the
|
117
197
|
# appropriate versioned client will be returned.
|
198
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
199
|
+
# the `transport` parameter.
|
200
|
+
#
|
201
|
+
# Raises an exception if the currently installed versioned client gem for the
|
202
|
+
# given API version does not support the given transport of the EndpointService service.
|
203
|
+
# You can determine whether the method will succeed by calling
|
204
|
+
# {Google::Cloud::AIPlatform.endpoint_service_available?}.
|
118
205
|
#
|
119
206
|
# ## About EndpointService
|
120
207
|
#
|
@@ -122,9 +209,10 @@ module Google
|
|
122
209
|
#
|
123
210
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
124
211
|
# Defaults to `:v1`.
|
212
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
125
213
|
# @return [::Object] A client object for the specified version.
|
126
214
|
#
|
127
|
-
def self.endpoint_service version: :v1, &block
|
215
|
+
def self.endpoint_service version: :v1, transport: :grpc, &block
|
128
216
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
129
217
|
|
130
218
|
package_name = Google::Cloud::AIPlatform
|
@@ -132,9 +220,41 @@ module Google
|
|
132
220
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
133
221
|
.first
|
134
222
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:EndpointService)
|
223
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
135
224
|
service_module.const_get(:Client).new(&block)
|
136
225
|
end
|
137
226
|
|
227
|
+
##
|
228
|
+
# Determines whether the EndpointService service is supported by the current client.
|
229
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.endpoint_service}.
|
230
|
+
# If false, that method will raise an exception. This could happen if the given
|
231
|
+
# API version does not exist or does not support the EndpointService service,
|
232
|
+
# or if the versioned client gem needs an update to support the EndpointService service.
|
233
|
+
#
|
234
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
235
|
+
# Defaults to `:v1`.
|
236
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
237
|
+
# @return [boolean] Whether the service is available.
|
238
|
+
#
|
239
|
+
def self.endpoint_service_available? version: :v1, transport: :grpc
|
240
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
241
|
+
package_name = Google::Cloud::AIPlatform
|
242
|
+
.constants
|
243
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
244
|
+
.first
|
245
|
+
return false unless package_name
|
246
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
247
|
+
return false unless service_module.const_defined? :EndpointService
|
248
|
+
service_module = service_module.const_get :EndpointService
|
249
|
+
if transport == :rest
|
250
|
+
return false unless service_module.const_defined? :Rest
|
251
|
+
service_module = service_module.const_get :Rest
|
252
|
+
end
|
253
|
+
service_module.const_defined? :Client
|
254
|
+
rescue ::LoadError
|
255
|
+
false
|
256
|
+
end
|
257
|
+
|
138
258
|
##
|
139
259
|
# Create a new client object for EvaluationService.
|
140
260
|
#
|
@@ -145,6 +265,13 @@ module Google
|
|
145
265
|
# `version` parameter. If the EvaluationService service is
|
146
266
|
# supported by that API version, and the corresponding gem is available, the
|
147
267
|
# appropriate versioned client will be returned.
|
268
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
269
|
+
# the `transport` parameter.
|
270
|
+
#
|
271
|
+
# Raises an exception if the currently installed versioned client gem for the
|
272
|
+
# given API version does not support the given transport of the EvaluationService service.
|
273
|
+
# You can determine whether the method will succeed by calling
|
274
|
+
# {Google::Cloud::AIPlatform.evaluation_service_available?}.
|
148
275
|
#
|
149
276
|
# ## About EvaluationService
|
150
277
|
#
|
@@ -152,9 +279,10 @@ module Google
|
|
152
279
|
#
|
153
280
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
154
281
|
# Defaults to `:v1`.
|
282
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
155
283
|
# @return [::Object] A client object for the specified version.
|
156
284
|
#
|
157
|
-
def self.evaluation_service version: :v1, &block
|
285
|
+
def self.evaluation_service version: :v1, transport: :grpc, &block
|
158
286
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
159
287
|
|
160
288
|
package_name = Google::Cloud::AIPlatform
|
@@ -162,9 +290,41 @@ module Google
|
|
162
290
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
163
291
|
.first
|
164
292
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:EvaluationService)
|
293
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
165
294
|
service_module.const_get(:Client).new(&block)
|
166
295
|
end
|
167
296
|
|
297
|
+
##
|
298
|
+
# Determines whether the EvaluationService service is supported by the current client.
|
299
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.evaluation_service}.
|
300
|
+
# If false, that method will raise an exception. This could happen if the given
|
301
|
+
# API version does not exist or does not support the EvaluationService service,
|
302
|
+
# or if the versioned client gem needs an update to support the EvaluationService service.
|
303
|
+
#
|
304
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
305
|
+
# Defaults to `:v1`.
|
306
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
307
|
+
# @return [boolean] Whether the service is available.
|
308
|
+
#
|
309
|
+
def self.evaluation_service_available? version: :v1, transport: :grpc
|
310
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
311
|
+
package_name = Google::Cloud::AIPlatform
|
312
|
+
.constants
|
313
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
314
|
+
.first
|
315
|
+
return false unless package_name
|
316
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
317
|
+
return false unless service_module.const_defined? :EvaluationService
|
318
|
+
service_module = service_module.const_get :EvaluationService
|
319
|
+
if transport == :rest
|
320
|
+
return false unless service_module.const_defined? :Rest
|
321
|
+
service_module = service_module.const_get :Rest
|
322
|
+
end
|
323
|
+
service_module.const_defined? :Client
|
324
|
+
rescue ::LoadError
|
325
|
+
false
|
326
|
+
end
|
327
|
+
|
168
328
|
##
|
169
329
|
# Create a new client object for FeatureOnlineStoreAdminService.
|
170
330
|
#
|
@@ -175,6 +335,13 @@ module Google
|
|
175
335
|
# `version` parameter. If the FeatureOnlineStoreAdminService service is
|
176
336
|
# supported by that API version, and the corresponding gem is available, the
|
177
337
|
# appropriate versioned client will be returned.
|
338
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
339
|
+
# the `transport` parameter.
|
340
|
+
#
|
341
|
+
# Raises an exception if the currently installed versioned client gem for the
|
342
|
+
# given API version does not support the given transport of the FeatureOnlineStoreAdminService service.
|
343
|
+
# You can determine whether the method will succeed by calling
|
344
|
+
# {Google::Cloud::AIPlatform.feature_online_store_admin_service_available?}.
|
178
345
|
#
|
179
346
|
# ## About FeatureOnlineStoreAdminService
|
180
347
|
#
|
@@ -183,9 +350,10 @@ module Google
|
|
183
350
|
#
|
184
351
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
185
352
|
# Defaults to `:v1`.
|
353
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
186
354
|
# @return [::Object] A client object for the specified version.
|
187
355
|
#
|
188
|
-
def self.feature_online_store_admin_service version: :v1, &block
|
356
|
+
def self.feature_online_store_admin_service version: :v1, transport: :grpc, &block
|
189
357
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
190
358
|
|
191
359
|
package_name = Google::Cloud::AIPlatform
|
@@ -193,9 +361,41 @@ module Google
|
|
193
361
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
194
362
|
.first
|
195
363
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:FeatureOnlineStoreAdminService)
|
364
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
196
365
|
service_module.const_get(:Client).new(&block)
|
197
366
|
end
|
198
367
|
|
368
|
+
##
|
369
|
+
# Determines whether the FeatureOnlineStoreAdminService service is supported by the current client.
|
370
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.feature_online_store_admin_service}.
|
371
|
+
# If false, that method will raise an exception. This could happen if the given
|
372
|
+
# API version does not exist or does not support the FeatureOnlineStoreAdminService service,
|
373
|
+
# or if the versioned client gem needs an update to support the FeatureOnlineStoreAdminService service.
|
374
|
+
#
|
375
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
376
|
+
# Defaults to `:v1`.
|
377
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
378
|
+
# @return [boolean] Whether the service is available.
|
379
|
+
#
|
380
|
+
def self.feature_online_store_admin_service_available? version: :v1, transport: :grpc
|
381
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
382
|
+
package_name = Google::Cloud::AIPlatform
|
383
|
+
.constants
|
384
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
385
|
+
.first
|
386
|
+
return false unless package_name
|
387
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
388
|
+
return false unless service_module.const_defined? :FeatureOnlineStoreAdminService
|
389
|
+
service_module = service_module.const_get :FeatureOnlineStoreAdminService
|
390
|
+
if transport == :rest
|
391
|
+
return false unless service_module.const_defined? :Rest
|
392
|
+
service_module = service_module.const_get :Rest
|
393
|
+
end
|
394
|
+
service_module.const_defined? :Client
|
395
|
+
rescue ::LoadError
|
396
|
+
false
|
397
|
+
end
|
398
|
+
|
199
399
|
##
|
200
400
|
# Create a new client object for FeaturestoreOnlineServingService.
|
201
401
|
#
|
@@ -206,6 +406,13 @@ module Google
|
|
206
406
|
# `version` parameter. If the FeaturestoreOnlineServingService service is
|
207
407
|
# supported by that API version, and the corresponding gem is available, the
|
208
408
|
# appropriate versioned client will be returned.
|
409
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
410
|
+
# the `transport` parameter.
|
411
|
+
#
|
412
|
+
# Raises an exception if the currently installed versioned client gem for the
|
413
|
+
# given API version does not support the given transport of the FeaturestoreOnlineServingService service.
|
414
|
+
# You can determine whether the method will succeed by calling
|
415
|
+
# {Google::Cloud::AIPlatform.featurestore_online_serving_service_available?}.
|
209
416
|
#
|
210
417
|
# ## About FeaturestoreOnlineServingService
|
211
418
|
#
|
@@ -213,9 +420,10 @@ module Google
|
|
213
420
|
#
|
214
421
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
215
422
|
# Defaults to `:v1`.
|
423
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
216
424
|
# @return [::Object] A client object for the specified version.
|
217
425
|
#
|
218
|
-
def self.featurestore_online_serving_service version: :v1, &block
|
426
|
+
def self.featurestore_online_serving_service version: :v1, transport: :grpc, &block
|
219
427
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
220
428
|
|
221
429
|
package_name = Google::Cloud::AIPlatform
|
@@ -223,9 +431,41 @@ module Google
|
|
223
431
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
224
432
|
.first
|
225
433
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:FeaturestoreOnlineServingService)
|
434
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
226
435
|
service_module.const_get(:Client).new(&block)
|
227
436
|
end
|
228
437
|
|
438
|
+
##
|
439
|
+
# Determines whether the FeaturestoreOnlineServingService service is supported by the current client.
|
440
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.featurestore_online_serving_service}.
|
441
|
+
# If false, that method will raise an exception. This could happen if the given
|
442
|
+
# API version does not exist or does not support the FeaturestoreOnlineServingService service,
|
443
|
+
# or if the versioned client gem needs an update to support the FeaturestoreOnlineServingService service.
|
444
|
+
#
|
445
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
446
|
+
# Defaults to `:v1`.
|
447
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
448
|
+
# @return [boolean] Whether the service is available.
|
449
|
+
#
|
450
|
+
def self.featurestore_online_serving_service_available? version: :v1, transport: :grpc
|
451
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
452
|
+
package_name = Google::Cloud::AIPlatform
|
453
|
+
.constants
|
454
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
455
|
+
.first
|
456
|
+
return false unless package_name
|
457
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
458
|
+
return false unless service_module.const_defined? :FeaturestoreOnlineServingService
|
459
|
+
service_module = service_module.const_get :FeaturestoreOnlineServingService
|
460
|
+
if transport == :rest
|
461
|
+
return false unless service_module.const_defined? :Rest
|
462
|
+
service_module = service_module.const_get :Rest
|
463
|
+
end
|
464
|
+
service_module.const_defined? :Client
|
465
|
+
rescue ::LoadError
|
466
|
+
false
|
467
|
+
end
|
468
|
+
|
229
469
|
##
|
230
470
|
# Create a new client object for FeatureOnlineStoreService.
|
231
471
|
#
|
@@ -236,6 +476,13 @@ module Google
|
|
236
476
|
# `version` parameter. If the FeatureOnlineStoreService service is
|
237
477
|
# supported by that API version, and the corresponding gem is available, the
|
238
478
|
# appropriate versioned client will be returned.
|
479
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
480
|
+
# the `transport` parameter.
|
481
|
+
#
|
482
|
+
# Raises an exception if the currently installed versioned client gem for the
|
483
|
+
# given API version does not support the given transport of the FeatureOnlineStoreService service.
|
484
|
+
# You can determine whether the method will succeed by calling
|
485
|
+
# {Google::Cloud::AIPlatform.feature_online_store_service_available?}.
|
239
486
|
#
|
240
487
|
# ## About FeatureOnlineStoreService
|
241
488
|
#
|
@@ -243,9 +490,10 @@ module Google
|
|
243
490
|
#
|
244
491
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
245
492
|
# Defaults to `:v1`.
|
493
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
246
494
|
# @return [::Object] A client object for the specified version.
|
247
495
|
#
|
248
|
-
def self.feature_online_store_service version: :v1, &block
|
496
|
+
def self.feature_online_store_service version: :v1, transport: :grpc, &block
|
249
497
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
250
498
|
|
251
499
|
package_name = Google::Cloud::AIPlatform
|
@@ -253,9 +501,41 @@ module Google
|
|
253
501
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
254
502
|
.first
|
255
503
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:FeatureOnlineStoreService)
|
504
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
256
505
|
service_module.const_get(:Client).new(&block)
|
257
506
|
end
|
258
507
|
|
508
|
+
##
|
509
|
+
# Determines whether the FeatureOnlineStoreService service is supported by the current client.
|
510
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.feature_online_store_service}.
|
511
|
+
# If false, that method will raise an exception. This could happen if the given
|
512
|
+
# API version does not exist or does not support the FeatureOnlineStoreService service,
|
513
|
+
# or if the versioned client gem needs an update to support the FeatureOnlineStoreService service.
|
514
|
+
#
|
515
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
516
|
+
# Defaults to `:v1`.
|
517
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
518
|
+
# @return [boolean] Whether the service is available.
|
519
|
+
#
|
520
|
+
def self.feature_online_store_service_available? version: :v1, transport: :grpc
|
521
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
522
|
+
package_name = Google::Cloud::AIPlatform
|
523
|
+
.constants
|
524
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
525
|
+
.first
|
526
|
+
return false unless package_name
|
527
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
528
|
+
return false unless service_module.const_defined? :FeatureOnlineStoreService
|
529
|
+
service_module = service_module.const_get :FeatureOnlineStoreService
|
530
|
+
if transport == :rest
|
531
|
+
return false unless service_module.const_defined? :Rest
|
532
|
+
service_module = service_module.const_get :Rest
|
533
|
+
end
|
534
|
+
service_module.const_defined? :Client
|
535
|
+
rescue ::LoadError
|
536
|
+
false
|
537
|
+
end
|
538
|
+
|
259
539
|
##
|
260
540
|
# Create a new client object for FeaturestoreService.
|
261
541
|
#
|
@@ -266,6 +546,13 @@ module Google
|
|
266
546
|
# `version` parameter. If the FeaturestoreService service is
|
267
547
|
# supported by that API version, and the corresponding gem is available, the
|
268
548
|
# appropriate versioned client will be returned.
|
549
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
550
|
+
# the `transport` parameter.
|
551
|
+
#
|
552
|
+
# Raises an exception if the currently installed versioned client gem for the
|
553
|
+
# given API version does not support the given transport of the FeaturestoreService service.
|
554
|
+
# You can determine whether the method will succeed by calling
|
555
|
+
# {Google::Cloud::AIPlatform.featurestore_service_available?}.
|
269
556
|
#
|
270
557
|
# ## About FeaturestoreService
|
271
558
|
#
|
@@ -273,9 +560,10 @@ module Google
|
|
273
560
|
#
|
274
561
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
275
562
|
# Defaults to `:v1`.
|
563
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
276
564
|
# @return [::Object] A client object for the specified version.
|
277
565
|
#
|
278
|
-
def self.featurestore_service version: :v1, &block
|
566
|
+
def self.featurestore_service version: :v1, transport: :grpc, &block
|
279
567
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
280
568
|
|
281
569
|
package_name = Google::Cloud::AIPlatform
|
@@ -283,9 +571,41 @@ module Google
|
|
283
571
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
284
572
|
.first
|
285
573
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:FeaturestoreService)
|
574
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
286
575
|
service_module.const_get(:Client).new(&block)
|
287
576
|
end
|
288
577
|
|
578
|
+
##
|
579
|
+
# Determines whether the FeaturestoreService service is supported by the current client.
|
580
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.featurestore_service}.
|
581
|
+
# If false, that method will raise an exception. This could happen if the given
|
582
|
+
# API version does not exist or does not support the FeaturestoreService service,
|
583
|
+
# or if the versioned client gem needs an update to support the FeaturestoreService service.
|
584
|
+
#
|
585
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
586
|
+
# Defaults to `:v1`.
|
587
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
588
|
+
# @return [boolean] Whether the service is available.
|
589
|
+
#
|
590
|
+
def self.featurestore_service_available? version: :v1, transport: :grpc
|
591
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
592
|
+
package_name = Google::Cloud::AIPlatform
|
593
|
+
.constants
|
594
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
595
|
+
.first
|
596
|
+
return false unless package_name
|
597
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
598
|
+
return false unless service_module.const_defined? :FeaturestoreService
|
599
|
+
service_module = service_module.const_get :FeaturestoreService
|
600
|
+
if transport == :rest
|
601
|
+
return false unless service_module.const_defined? :Rest
|
602
|
+
service_module = service_module.const_get :Rest
|
603
|
+
end
|
604
|
+
service_module.const_defined? :Client
|
605
|
+
rescue ::LoadError
|
606
|
+
false
|
607
|
+
end
|
608
|
+
|
289
609
|
##
|
290
610
|
# Create a new client object for FeatureRegistryService.
|
291
611
|
#
|
@@ -296,6 +616,13 @@ module Google
|
|
296
616
|
# `version` parameter. If the FeatureRegistryService service is
|
297
617
|
# supported by that API version, and the corresponding gem is available, the
|
298
618
|
# appropriate versioned client will be returned.
|
619
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
620
|
+
# the `transport` parameter.
|
621
|
+
#
|
622
|
+
# Raises an exception if the currently installed versioned client gem for the
|
623
|
+
# given API version does not support the given transport of the FeatureRegistryService service.
|
624
|
+
# You can determine whether the method will succeed by calling
|
625
|
+
# {Google::Cloud::AIPlatform.feature_registry_service_available?}.
|
299
626
|
#
|
300
627
|
# ## About FeatureRegistryService
|
301
628
|
#
|
@@ -304,9 +631,10 @@ module Google
|
|
304
631
|
#
|
305
632
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
306
633
|
# Defaults to `:v1`.
|
634
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
307
635
|
# @return [::Object] A client object for the specified version.
|
308
636
|
#
|
309
|
-
def self.feature_registry_service version: :v1, &block
|
637
|
+
def self.feature_registry_service version: :v1, transport: :grpc, &block
|
310
638
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
311
639
|
|
312
640
|
package_name = Google::Cloud::AIPlatform
|
@@ -314,9 +642,111 @@ module Google
|
|
314
642
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
315
643
|
.first
|
316
644
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:FeatureRegistryService)
|
645
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
646
|
+
service_module.const_get(:Client).new(&block)
|
647
|
+
end
|
648
|
+
|
649
|
+
##
|
650
|
+
# Determines whether the FeatureRegistryService service is supported by the current client.
|
651
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.feature_registry_service}.
|
652
|
+
# If false, that method will raise an exception. This could happen if the given
|
653
|
+
# API version does not exist or does not support the FeatureRegistryService service,
|
654
|
+
# or if the versioned client gem needs an update to support the FeatureRegistryService service.
|
655
|
+
#
|
656
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
657
|
+
# Defaults to `:v1`.
|
658
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
659
|
+
# @return [boolean] Whether the service is available.
|
660
|
+
#
|
661
|
+
def self.feature_registry_service_available? version: :v1, transport: :grpc
|
662
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
663
|
+
package_name = Google::Cloud::AIPlatform
|
664
|
+
.constants
|
665
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
666
|
+
.first
|
667
|
+
return false unless package_name
|
668
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
669
|
+
return false unless service_module.const_defined? :FeatureRegistryService
|
670
|
+
service_module = service_module.const_get :FeatureRegistryService
|
671
|
+
if transport == :rest
|
672
|
+
return false unless service_module.const_defined? :Rest
|
673
|
+
service_module = service_module.const_get :Rest
|
674
|
+
end
|
675
|
+
service_module.const_defined? :Client
|
676
|
+
rescue ::LoadError
|
677
|
+
false
|
678
|
+
end
|
679
|
+
|
680
|
+
##
|
681
|
+
# Create a new client object for GenAiCacheService.
|
682
|
+
#
|
683
|
+
# By default, this returns an instance of
|
684
|
+
# [Google::Cloud::AIPlatform::V1::GenAiCacheService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-GenAiCacheService-Client)
|
685
|
+
# for a gRPC client for version V1 of the API.
|
686
|
+
# However, you can specify a different API version by passing it in the
|
687
|
+
# `version` parameter. If the GenAiCacheService service is
|
688
|
+
# supported by that API version, and the corresponding gem is available, the
|
689
|
+
# appropriate versioned client will be returned.
|
690
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
691
|
+
# the `transport` parameter.
|
692
|
+
#
|
693
|
+
# Raises an exception if the currently installed versioned client gem for the
|
694
|
+
# given API version does not support the given transport of the GenAiCacheService service.
|
695
|
+
# You can determine whether the method will succeed by calling
|
696
|
+
# {Google::Cloud::AIPlatform.gen_ai_cache_service_available?}.
|
697
|
+
#
|
698
|
+
# ## About GenAiCacheService
|
699
|
+
#
|
700
|
+
# Service for managing Vertex AI's CachedContent resource.
|
701
|
+
#
|
702
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
703
|
+
# Defaults to `:v1`.
|
704
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
705
|
+
# @return [::Object] A client object for the specified version.
|
706
|
+
#
|
707
|
+
def self.gen_ai_cache_service version: :v1, transport: :grpc, &block
|
708
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
709
|
+
|
710
|
+
package_name = Google::Cloud::AIPlatform
|
711
|
+
.constants
|
712
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
713
|
+
.first
|
714
|
+
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:GenAiCacheService)
|
715
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
317
716
|
service_module.const_get(:Client).new(&block)
|
318
717
|
end
|
319
718
|
|
719
|
+
##
|
720
|
+
# Determines whether the GenAiCacheService service is supported by the current client.
|
721
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.gen_ai_cache_service}.
|
722
|
+
# If false, that method will raise an exception. This could happen if the given
|
723
|
+
# API version does not exist or does not support the GenAiCacheService service,
|
724
|
+
# or if the versioned client gem needs an update to support the GenAiCacheService service.
|
725
|
+
#
|
726
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
727
|
+
# Defaults to `:v1`.
|
728
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
729
|
+
# @return [boolean] Whether the service is available.
|
730
|
+
#
|
731
|
+
def self.gen_ai_cache_service_available? version: :v1, transport: :grpc
|
732
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
733
|
+
package_name = Google::Cloud::AIPlatform
|
734
|
+
.constants
|
735
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
736
|
+
.first
|
737
|
+
return false unless package_name
|
738
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
739
|
+
return false unless service_module.const_defined? :GenAiCacheService
|
740
|
+
service_module = service_module.const_get :GenAiCacheService
|
741
|
+
if transport == :rest
|
742
|
+
return false unless service_module.const_defined? :Rest
|
743
|
+
service_module = service_module.const_get :Rest
|
744
|
+
end
|
745
|
+
service_module.const_defined? :Client
|
746
|
+
rescue ::LoadError
|
747
|
+
false
|
748
|
+
end
|
749
|
+
|
320
750
|
##
|
321
751
|
# Create a new client object for GenAiTuningService.
|
322
752
|
#
|
@@ -327,6 +757,13 @@ module Google
|
|
327
757
|
# `version` parameter. If the GenAiTuningService service is
|
328
758
|
# supported by that API version, and the corresponding gem is available, the
|
329
759
|
# appropriate versioned client will be returned.
|
760
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
761
|
+
# the `transport` parameter.
|
762
|
+
#
|
763
|
+
# Raises an exception if the currently installed versioned client gem for the
|
764
|
+
# given API version does not support the given transport of the GenAiTuningService service.
|
765
|
+
# You can determine whether the method will succeed by calling
|
766
|
+
# {Google::Cloud::AIPlatform.gen_ai_tuning_service_available?}.
|
330
767
|
#
|
331
768
|
# ## About GenAiTuningService
|
332
769
|
#
|
@@ -334,9 +771,10 @@ module Google
|
|
334
771
|
#
|
335
772
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
336
773
|
# Defaults to `:v1`.
|
774
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
337
775
|
# @return [::Object] A client object for the specified version.
|
338
776
|
#
|
339
|
-
def self.gen_ai_tuning_service version: :v1, &block
|
777
|
+
def self.gen_ai_tuning_service version: :v1, transport: :grpc, &block
|
340
778
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
341
779
|
|
342
780
|
package_name = Google::Cloud::AIPlatform
|
@@ -344,9 +782,41 @@ module Google
|
|
344
782
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
345
783
|
.first
|
346
784
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:GenAiTuningService)
|
785
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
347
786
|
service_module.const_get(:Client).new(&block)
|
348
787
|
end
|
349
788
|
|
789
|
+
##
|
790
|
+
# Determines whether the GenAiTuningService service is supported by the current client.
|
791
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.gen_ai_tuning_service}.
|
792
|
+
# If false, that method will raise an exception. This could happen if the given
|
793
|
+
# API version does not exist or does not support the GenAiTuningService service,
|
794
|
+
# or if the versioned client gem needs an update to support the GenAiTuningService service.
|
795
|
+
#
|
796
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
797
|
+
# Defaults to `:v1`.
|
798
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
799
|
+
# @return [boolean] Whether the service is available.
|
800
|
+
#
|
801
|
+
def self.gen_ai_tuning_service_available? version: :v1, transport: :grpc
|
802
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
803
|
+
package_name = Google::Cloud::AIPlatform
|
804
|
+
.constants
|
805
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
806
|
+
.first
|
807
|
+
return false unless package_name
|
808
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
809
|
+
return false unless service_module.const_defined? :GenAiTuningService
|
810
|
+
service_module = service_module.const_get :GenAiTuningService
|
811
|
+
if transport == :rest
|
812
|
+
return false unless service_module.const_defined? :Rest
|
813
|
+
service_module = service_module.const_get :Rest
|
814
|
+
end
|
815
|
+
service_module.const_defined? :Client
|
816
|
+
rescue ::LoadError
|
817
|
+
false
|
818
|
+
end
|
819
|
+
|
350
820
|
##
|
351
821
|
# Create a new client object for IndexEndpointService.
|
352
822
|
#
|
@@ -357,6 +827,13 @@ module Google
|
|
357
827
|
# `version` parameter. If the IndexEndpointService service is
|
358
828
|
# supported by that API version, and the corresponding gem is available, the
|
359
829
|
# appropriate versioned client will be returned.
|
830
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
831
|
+
# the `transport` parameter.
|
832
|
+
#
|
833
|
+
# Raises an exception if the currently installed versioned client gem for the
|
834
|
+
# given API version does not support the given transport of the IndexEndpointService service.
|
835
|
+
# You can determine whether the method will succeed by calling
|
836
|
+
# {Google::Cloud::AIPlatform.index_endpoint_service_available?}.
|
360
837
|
#
|
361
838
|
# ## About IndexEndpointService
|
362
839
|
#
|
@@ -364,9 +841,10 @@ module Google
|
|
364
841
|
#
|
365
842
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
366
843
|
# Defaults to `:v1`.
|
844
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
367
845
|
# @return [::Object] A client object for the specified version.
|
368
846
|
#
|
369
|
-
def self.index_endpoint_service version: :v1, &block
|
847
|
+
def self.index_endpoint_service version: :v1, transport: :grpc, &block
|
370
848
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
371
849
|
|
372
850
|
package_name = Google::Cloud::AIPlatform
|
@@ -374,9 +852,41 @@ module Google
|
|
374
852
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
375
853
|
.first
|
376
854
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:IndexEndpointService)
|
855
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
377
856
|
service_module.const_get(:Client).new(&block)
|
378
857
|
end
|
379
858
|
|
859
|
+
##
|
860
|
+
# Determines whether the IndexEndpointService service is supported by the current client.
|
861
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.index_endpoint_service}.
|
862
|
+
# If false, that method will raise an exception. This could happen if the given
|
863
|
+
# API version does not exist or does not support the IndexEndpointService service,
|
864
|
+
# or if the versioned client gem needs an update to support the IndexEndpointService service.
|
865
|
+
#
|
866
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
867
|
+
# Defaults to `:v1`.
|
868
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
869
|
+
# @return [boolean] Whether the service is available.
|
870
|
+
#
|
871
|
+
def self.index_endpoint_service_available? version: :v1, transport: :grpc
|
872
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
873
|
+
package_name = Google::Cloud::AIPlatform
|
874
|
+
.constants
|
875
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
876
|
+
.first
|
877
|
+
return false unless package_name
|
878
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
879
|
+
return false unless service_module.const_defined? :IndexEndpointService
|
880
|
+
service_module = service_module.const_get :IndexEndpointService
|
881
|
+
if transport == :rest
|
882
|
+
return false unless service_module.const_defined? :Rest
|
883
|
+
service_module = service_module.const_get :Rest
|
884
|
+
end
|
885
|
+
service_module.const_defined? :Client
|
886
|
+
rescue ::LoadError
|
887
|
+
false
|
888
|
+
end
|
889
|
+
|
380
890
|
##
|
381
891
|
# Create a new client object for IndexService.
|
382
892
|
#
|
@@ -387,6 +897,13 @@ module Google
|
|
387
897
|
# `version` parameter. If the IndexService service is
|
388
898
|
# supported by that API version, and the corresponding gem is available, the
|
389
899
|
# appropriate versioned client will be returned.
|
900
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
901
|
+
# the `transport` parameter.
|
902
|
+
#
|
903
|
+
# Raises an exception if the currently installed versioned client gem for the
|
904
|
+
# given API version does not support the given transport of the IndexService service.
|
905
|
+
# You can determine whether the method will succeed by calling
|
906
|
+
# {Google::Cloud::AIPlatform.index_service_available?}.
|
390
907
|
#
|
391
908
|
# ## About IndexService
|
392
909
|
#
|
@@ -394,9 +911,10 @@ module Google
|
|
394
911
|
#
|
395
912
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
396
913
|
# Defaults to `:v1`.
|
914
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
397
915
|
# @return [::Object] A client object for the specified version.
|
398
916
|
#
|
399
|
-
def self.index_service version: :v1, &block
|
917
|
+
def self.index_service version: :v1, transport: :grpc, &block
|
400
918
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
401
919
|
|
402
920
|
package_name = Google::Cloud::AIPlatform
|
@@ -404,9 +922,41 @@ module Google
|
|
404
922
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
405
923
|
.first
|
406
924
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:IndexService)
|
925
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
407
926
|
service_module.const_get(:Client).new(&block)
|
408
927
|
end
|
409
928
|
|
929
|
+
##
|
930
|
+
# Determines whether the IndexService service is supported by the current client.
|
931
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.index_service}.
|
932
|
+
# If false, that method will raise an exception. This could happen if the given
|
933
|
+
# API version does not exist or does not support the IndexService service,
|
934
|
+
# or if the versioned client gem needs an update to support the IndexService service.
|
935
|
+
#
|
936
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
937
|
+
# Defaults to `:v1`.
|
938
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
939
|
+
# @return [boolean] Whether the service is available.
|
940
|
+
#
|
941
|
+
def self.index_service_available? version: :v1, transport: :grpc
|
942
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
943
|
+
package_name = Google::Cloud::AIPlatform
|
944
|
+
.constants
|
945
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
946
|
+
.first
|
947
|
+
return false unless package_name
|
948
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
949
|
+
return false unless service_module.const_defined? :IndexService
|
950
|
+
service_module = service_module.const_get :IndexService
|
951
|
+
if transport == :rest
|
952
|
+
return false unless service_module.const_defined? :Rest
|
953
|
+
service_module = service_module.const_get :Rest
|
954
|
+
end
|
955
|
+
service_module.const_defined? :Client
|
956
|
+
rescue ::LoadError
|
957
|
+
false
|
958
|
+
end
|
959
|
+
|
410
960
|
##
|
411
961
|
# Create a new client object for JobService.
|
412
962
|
#
|
@@ -417,6 +967,13 @@ module Google
|
|
417
967
|
# `version` parameter. If the JobService service is
|
418
968
|
# supported by that API version, and the corresponding gem is available, the
|
419
969
|
# appropriate versioned client will be returned.
|
970
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
971
|
+
# the `transport` parameter.
|
972
|
+
#
|
973
|
+
# Raises an exception if the currently installed versioned client gem for the
|
974
|
+
# given API version does not support the given transport of the JobService service.
|
975
|
+
# You can determine whether the method will succeed by calling
|
976
|
+
# {Google::Cloud::AIPlatform.job_service_available?}.
|
420
977
|
#
|
421
978
|
# ## About JobService
|
422
979
|
#
|
@@ -424,9 +981,10 @@ module Google
|
|
424
981
|
#
|
425
982
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
426
983
|
# Defaults to `:v1`.
|
984
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
427
985
|
# @return [::Object] A client object for the specified version.
|
428
986
|
#
|
429
|
-
def self.job_service version: :v1, &block
|
987
|
+
def self.job_service version: :v1, transport: :grpc, &block
|
430
988
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
431
989
|
|
432
990
|
package_name = Google::Cloud::AIPlatform
|
@@ -434,9 +992,41 @@ module Google
|
|
434
992
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
435
993
|
.first
|
436
994
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:JobService)
|
995
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
437
996
|
service_module.const_get(:Client).new(&block)
|
438
997
|
end
|
439
998
|
|
999
|
+
##
|
1000
|
+
# Determines whether the JobService service is supported by the current client.
|
1001
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.job_service}.
|
1002
|
+
# If false, that method will raise an exception. This could happen if the given
|
1003
|
+
# API version does not exist or does not support the JobService service,
|
1004
|
+
# or if the versioned client gem needs an update to support the JobService service.
|
1005
|
+
#
|
1006
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1007
|
+
# Defaults to `:v1`.
|
1008
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1009
|
+
# @return [boolean] Whether the service is available.
|
1010
|
+
#
|
1011
|
+
def self.job_service_available? version: :v1, transport: :grpc
|
1012
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
1013
|
+
package_name = Google::Cloud::AIPlatform
|
1014
|
+
.constants
|
1015
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1016
|
+
.first
|
1017
|
+
return false unless package_name
|
1018
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
1019
|
+
return false unless service_module.const_defined? :JobService
|
1020
|
+
service_module = service_module.const_get :JobService
|
1021
|
+
if transport == :rest
|
1022
|
+
return false unless service_module.const_defined? :Rest
|
1023
|
+
service_module = service_module.const_get :Rest
|
1024
|
+
end
|
1025
|
+
service_module.const_defined? :Client
|
1026
|
+
rescue ::LoadError
|
1027
|
+
false
|
1028
|
+
end
|
1029
|
+
|
440
1030
|
##
|
441
1031
|
# Create a new client object for PredictionService.
|
442
1032
|
#
|
@@ -447,6 +1037,13 @@ module Google
|
|
447
1037
|
# `version` parameter. If the PredictionService service is
|
448
1038
|
# supported by that API version, and the corresponding gem is available, the
|
449
1039
|
# appropriate versioned client will be returned.
|
1040
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
1041
|
+
# the `transport` parameter.
|
1042
|
+
#
|
1043
|
+
# Raises an exception if the currently installed versioned client gem for the
|
1044
|
+
# given API version does not support the given transport of the PredictionService service.
|
1045
|
+
# You can determine whether the method will succeed by calling
|
1046
|
+
# {Google::Cloud::AIPlatform.prediction_service_available?}.
|
450
1047
|
#
|
451
1048
|
# ## About PredictionService
|
452
1049
|
#
|
@@ -454,9 +1051,10 @@ module Google
|
|
454
1051
|
#
|
455
1052
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
456
1053
|
# Defaults to `:v1`.
|
1054
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
457
1055
|
# @return [::Object] A client object for the specified version.
|
458
1056
|
#
|
459
|
-
def self.prediction_service version: :v1, &block
|
1057
|
+
def self.prediction_service version: :v1, transport: :grpc, &block
|
460
1058
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
461
1059
|
|
462
1060
|
package_name = Google::Cloud::AIPlatform
|
@@ -464,9 +1062,41 @@ module Google
|
|
464
1062
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
465
1063
|
.first
|
466
1064
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:PredictionService)
|
1065
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
467
1066
|
service_module.const_get(:Client).new(&block)
|
468
1067
|
end
|
469
1068
|
|
1069
|
+
##
|
1070
|
+
# Determines whether the PredictionService service is supported by the current client.
|
1071
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.prediction_service}.
|
1072
|
+
# If false, that method will raise an exception. This could happen if the given
|
1073
|
+
# API version does not exist or does not support the PredictionService service,
|
1074
|
+
# or if the versioned client gem needs an update to support the PredictionService service.
|
1075
|
+
#
|
1076
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1077
|
+
# Defaults to `:v1`.
|
1078
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1079
|
+
# @return [boolean] Whether the service is available.
|
1080
|
+
#
|
1081
|
+
def self.prediction_service_available? version: :v1, transport: :grpc
|
1082
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
1083
|
+
package_name = Google::Cloud::AIPlatform
|
1084
|
+
.constants
|
1085
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1086
|
+
.first
|
1087
|
+
return false unless package_name
|
1088
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
1089
|
+
return false unless service_module.const_defined? :PredictionService
|
1090
|
+
service_module = service_module.const_get :PredictionService
|
1091
|
+
if transport == :rest
|
1092
|
+
return false unless service_module.const_defined? :Rest
|
1093
|
+
service_module = service_module.const_get :Rest
|
1094
|
+
end
|
1095
|
+
service_module.const_defined? :Client
|
1096
|
+
rescue ::LoadError
|
1097
|
+
false
|
1098
|
+
end
|
1099
|
+
|
470
1100
|
##
|
471
1101
|
# Create a new client object for LlmUtilityService.
|
472
1102
|
#
|
@@ -477,6 +1107,13 @@ module Google
|
|
477
1107
|
# `version` parameter. If the LlmUtilityService service is
|
478
1108
|
# supported by that API version, and the corresponding gem is available, the
|
479
1109
|
# appropriate versioned client will be returned.
|
1110
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
1111
|
+
# the `transport` parameter.
|
1112
|
+
#
|
1113
|
+
# Raises an exception if the currently installed versioned client gem for the
|
1114
|
+
# given API version does not support the given transport of the LlmUtilityService service.
|
1115
|
+
# You can determine whether the method will succeed by calling
|
1116
|
+
# {Google::Cloud::AIPlatform.llm_utility_service_available?}.
|
480
1117
|
#
|
481
1118
|
# ## About LlmUtilityService
|
482
1119
|
#
|
@@ -484,9 +1121,10 @@ module Google
|
|
484
1121
|
#
|
485
1122
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
486
1123
|
# Defaults to `:v1`.
|
1124
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
487
1125
|
# @return [::Object] A client object for the specified version.
|
488
1126
|
#
|
489
|
-
def self.llm_utility_service version: :v1, &block
|
1127
|
+
def self.llm_utility_service version: :v1, transport: :grpc, &block
|
490
1128
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
491
1129
|
|
492
1130
|
package_name = Google::Cloud::AIPlatform
|
@@ -494,9 +1132,41 @@ module Google
|
|
494
1132
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
495
1133
|
.first
|
496
1134
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:LlmUtilityService)
|
1135
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
497
1136
|
service_module.const_get(:Client).new(&block)
|
498
1137
|
end
|
499
1138
|
|
1139
|
+
##
|
1140
|
+
# Determines whether the LlmUtilityService service is supported by the current client.
|
1141
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.llm_utility_service}.
|
1142
|
+
# If false, that method will raise an exception. This could happen if the given
|
1143
|
+
# API version does not exist or does not support the LlmUtilityService service,
|
1144
|
+
# or if the versioned client gem needs an update to support the LlmUtilityService service.
|
1145
|
+
#
|
1146
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1147
|
+
# Defaults to `:v1`.
|
1148
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1149
|
+
# @return [boolean] Whether the service is available.
|
1150
|
+
#
|
1151
|
+
def self.llm_utility_service_available? version: :v1, transport: :grpc
|
1152
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
1153
|
+
package_name = Google::Cloud::AIPlatform
|
1154
|
+
.constants
|
1155
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1156
|
+
.first
|
1157
|
+
return false unless package_name
|
1158
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
1159
|
+
return false unless service_module.const_defined? :LlmUtilityService
|
1160
|
+
service_module = service_module.const_get :LlmUtilityService
|
1161
|
+
if transport == :rest
|
1162
|
+
return false unless service_module.const_defined? :Rest
|
1163
|
+
service_module = service_module.const_get :Rest
|
1164
|
+
end
|
1165
|
+
service_module.const_defined? :Client
|
1166
|
+
rescue ::LoadError
|
1167
|
+
false
|
1168
|
+
end
|
1169
|
+
|
500
1170
|
##
|
501
1171
|
# Create a new client object for MatchService.
|
502
1172
|
#
|
@@ -507,6 +1177,13 @@ module Google
|
|
507
1177
|
# `version` parameter. If the MatchService service is
|
508
1178
|
# supported by that API version, and the corresponding gem is available, the
|
509
1179
|
# appropriate versioned client will be returned.
|
1180
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
1181
|
+
# the `transport` parameter.
|
1182
|
+
#
|
1183
|
+
# Raises an exception if the currently installed versioned client gem for the
|
1184
|
+
# given API version does not support the given transport of the MatchService service.
|
1185
|
+
# You can determine whether the method will succeed by calling
|
1186
|
+
# {Google::Cloud::AIPlatform.match_service_available?}.
|
510
1187
|
#
|
511
1188
|
# ## About MatchService
|
512
1189
|
#
|
@@ -515,9 +1192,10 @@ module Google
|
|
515
1192
|
#
|
516
1193
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
517
1194
|
# Defaults to `:v1`.
|
1195
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
518
1196
|
# @return [::Object] A client object for the specified version.
|
519
1197
|
#
|
520
|
-
def self.match_service version: :v1, &block
|
1198
|
+
def self.match_service version: :v1, transport: :grpc, &block
|
521
1199
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
522
1200
|
|
523
1201
|
package_name = Google::Cloud::AIPlatform
|
@@ -525,9 +1203,41 @@ module Google
|
|
525
1203
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
526
1204
|
.first
|
527
1205
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:MatchService)
|
1206
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
528
1207
|
service_module.const_get(:Client).new(&block)
|
529
1208
|
end
|
530
1209
|
|
1210
|
+
##
|
1211
|
+
# Determines whether the MatchService service is supported by the current client.
|
1212
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.match_service}.
|
1213
|
+
# If false, that method will raise an exception. This could happen if the given
|
1214
|
+
# API version does not exist or does not support the MatchService service,
|
1215
|
+
# or if the versioned client gem needs an update to support the MatchService service.
|
1216
|
+
#
|
1217
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1218
|
+
# Defaults to `:v1`.
|
1219
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1220
|
+
# @return [boolean] Whether the service is available.
|
1221
|
+
#
|
1222
|
+
def self.match_service_available? version: :v1, transport: :grpc
|
1223
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
1224
|
+
package_name = Google::Cloud::AIPlatform
|
1225
|
+
.constants
|
1226
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1227
|
+
.first
|
1228
|
+
return false unless package_name
|
1229
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
1230
|
+
return false unless service_module.const_defined? :MatchService
|
1231
|
+
service_module = service_module.const_get :MatchService
|
1232
|
+
if transport == :rest
|
1233
|
+
return false unless service_module.const_defined? :Rest
|
1234
|
+
service_module = service_module.const_get :Rest
|
1235
|
+
end
|
1236
|
+
service_module.const_defined? :Client
|
1237
|
+
rescue ::LoadError
|
1238
|
+
false
|
1239
|
+
end
|
1240
|
+
|
531
1241
|
##
|
532
1242
|
# Create a new client object for MetadataService.
|
533
1243
|
#
|
@@ -538,6 +1248,13 @@ module Google
|
|
538
1248
|
# `version` parameter. If the MetadataService service is
|
539
1249
|
# supported by that API version, and the corresponding gem is available, the
|
540
1250
|
# appropriate versioned client will be returned.
|
1251
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
1252
|
+
# the `transport` parameter.
|
1253
|
+
#
|
1254
|
+
# Raises an exception if the currently installed versioned client gem for the
|
1255
|
+
# given API version does not support the given transport of the MetadataService service.
|
1256
|
+
# You can determine whether the method will succeed by calling
|
1257
|
+
# {Google::Cloud::AIPlatform.metadata_service_available?}.
|
541
1258
|
#
|
542
1259
|
# ## About MetadataService
|
543
1260
|
#
|
@@ -545,9 +1262,10 @@ module Google
|
|
545
1262
|
#
|
546
1263
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
547
1264
|
# Defaults to `:v1`.
|
1265
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
548
1266
|
# @return [::Object] A client object for the specified version.
|
549
1267
|
#
|
550
|
-
def self.metadata_service version: :v1, &block
|
1268
|
+
def self.metadata_service version: :v1, transport: :grpc, &block
|
551
1269
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
552
1270
|
|
553
1271
|
package_name = Google::Cloud::AIPlatform
|
@@ -555,30 +1273,70 @@ module Google
|
|
555
1273
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
556
1274
|
.first
|
557
1275
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:MetadataService)
|
1276
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
558
1277
|
service_module.const_get(:Client).new(&block)
|
559
1278
|
end
|
560
1279
|
|
561
1280
|
##
|
562
|
-
#
|
1281
|
+
# Determines whether the MetadataService service is supported by the current client.
|
1282
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.metadata_service}.
|
1283
|
+
# If false, that method will raise an exception. This could happen if the given
|
1284
|
+
# API version does not exist or does not support the MetadataService service,
|
1285
|
+
# or if the versioned client gem needs an update to support the MetadataService service.
|
563
1286
|
#
|
564
|
-
#
|
565
|
-
#
|
566
|
-
#
|
567
|
-
#
|
568
|
-
# `version` parameter. If the MigrationService service is
|
569
|
-
# supported by that API version, and the corresponding gem is available, the
|
570
|
-
# appropriate versioned client will be returned.
|
1287
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1288
|
+
# Defaults to `:v1`.
|
1289
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1290
|
+
# @return [boolean] Whether the service is available.
|
571
1291
|
#
|
572
|
-
|
1292
|
+
def self.metadata_service_available? version: :v1, transport: :grpc
|
1293
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
1294
|
+
package_name = Google::Cloud::AIPlatform
|
1295
|
+
.constants
|
1296
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1297
|
+
.first
|
1298
|
+
return false unless package_name
|
1299
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
1300
|
+
return false unless service_module.const_defined? :MetadataService
|
1301
|
+
service_module = service_module.const_get :MetadataService
|
1302
|
+
if transport == :rest
|
1303
|
+
return false unless service_module.const_defined? :Rest
|
1304
|
+
service_module = service_module.const_get :Rest
|
1305
|
+
end
|
1306
|
+
service_module.const_defined? :Client
|
1307
|
+
rescue ::LoadError
|
1308
|
+
false
|
1309
|
+
end
|
1310
|
+
|
1311
|
+
##
|
1312
|
+
# Create a new client object for MigrationService.
|
1313
|
+
#
|
1314
|
+
# By default, this returns an instance of
|
1315
|
+
# [Google::Cloud::AIPlatform::V1::MigrationService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-MigrationService-Client)
|
1316
|
+
# for a gRPC client for version V1 of the API.
|
1317
|
+
# However, you can specify a different API version by passing it in the
|
1318
|
+
# `version` parameter. If the MigrationService service is
|
1319
|
+
# supported by that API version, and the corresponding gem is available, the
|
1320
|
+
# appropriate versioned client will be returned.
|
1321
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
1322
|
+
# the `transport` parameter.
|
1323
|
+
#
|
1324
|
+
# Raises an exception if the currently installed versioned client gem for the
|
1325
|
+
# given API version does not support the given transport of the MigrationService service.
|
1326
|
+
# You can determine whether the method will succeed by calling
|
1327
|
+
# {Google::Cloud::AIPlatform.migration_service_available?}.
|
1328
|
+
#
|
1329
|
+
# ## About MigrationService
|
573
1330
|
#
|
574
1331
|
# A service that migrates resources from automl.googleapis.com,
|
575
1332
|
# datalabeling.googleapis.com and ml.googleapis.com to Vertex AI.
|
576
1333
|
#
|
577
1334
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
578
1335
|
# Defaults to `:v1`.
|
1336
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
579
1337
|
# @return [::Object] A client object for the specified version.
|
580
1338
|
#
|
581
|
-
def self.migration_service version: :v1, &block
|
1339
|
+
def self.migration_service version: :v1, transport: :grpc, &block
|
582
1340
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
583
1341
|
|
584
1342
|
package_name = Google::Cloud::AIPlatform
|
@@ -586,9 +1344,41 @@ module Google
|
|
586
1344
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
587
1345
|
.first
|
588
1346
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:MigrationService)
|
1347
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
589
1348
|
service_module.const_get(:Client).new(&block)
|
590
1349
|
end
|
591
1350
|
|
1351
|
+
##
|
1352
|
+
# Determines whether the MigrationService service is supported by the current client.
|
1353
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.migration_service}.
|
1354
|
+
# If false, that method will raise an exception. This could happen if the given
|
1355
|
+
# API version does not exist or does not support the MigrationService service,
|
1356
|
+
# or if the versioned client gem needs an update to support the MigrationService service.
|
1357
|
+
#
|
1358
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1359
|
+
# Defaults to `:v1`.
|
1360
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1361
|
+
# @return [boolean] Whether the service is available.
|
1362
|
+
#
|
1363
|
+
def self.migration_service_available? version: :v1, transport: :grpc
|
1364
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
1365
|
+
package_name = Google::Cloud::AIPlatform
|
1366
|
+
.constants
|
1367
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1368
|
+
.first
|
1369
|
+
return false unless package_name
|
1370
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
1371
|
+
return false unless service_module.const_defined? :MigrationService
|
1372
|
+
service_module = service_module.const_get :MigrationService
|
1373
|
+
if transport == :rest
|
1374
|
+
return false unless service_module.const_defined? :Rest
|
1375
|
+
service_module = service_module.const_get :Rest
|
1376
|
+
end
|
1377
|
+
service_module.const_defined? :Client
|
1378
|
+
rescue ::LoadError
|
1379
|
+
false
|
1380
|
+
end
|
1381
|
+
|
592
1382
|
##
|
593
1383
|
# Create a new client object for ModelGardenService.
|
594
1384
|
#
|
@@ -599,6 +1389,13 @@ module Google
|
|
599
1389
|
# `version` parameter. If the ModelGardenService service is
|
600
1390
|
# supported by that API version, and the corresponding gem is available, the
|
601
1391
|
# appropriate versioned client will be returned.
|
1392
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
1393
|
+
# the `transport` parameter.
|
1394
|
+
#
|
1395
|
+
# Raises an exception if the currently installed versioned client gem for the
|
1396
|
+
# given API version does not support the given transport of the ModelGardenService service.
|
1397
|
+
# You can determine whether the method will succeed by calling
|
1398
|
+
# {Google::Cloud::AIPlatform.model_garden_service_available?}.
|
602
1399
|
#
|
603
1400
|
# ## About ModelGardenService
|
604
1401
|
#
|
@@ -606,9 +1403,10 @@ module Google
|
|
606
1403
|
#
|
607
1404
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
608
1405
|
# Defaults to `:v1`.
|
1406
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
609
1407
|
# @return [::Object] A client object for the specified version.
|
610
1408
|
#
|
611
|
-
def self.model_garden_service version: :v1, &block
|
1409
|
+
def self.model_garden_service version: :v1, transport: :grpc, &block
|
612
1410
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
613
1411
|
|
614
1412
|
package_name = Google::Cloud::AIPlatform
|
@@ -616,9 +1414,41 @@ module Google
|
|
616
1414
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
617
1415
|
.first
|
618
1416
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:ModelGardenService)
|
1417
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
619
1418
|
service_module.const_get(:Client).new(&block)
|
620
1419
|
end
|
621
1420
|
|
1421
|
+
##
|
1422
|
+
# Determines whether the ModelGardenService service is supported by the current client.
|
1423
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.model_garden_service}.
|
1424
|
+
# If false, that method will raise an exception. This could happen if the given
|
1425
|
+
# API version does not exist or does not support the ModelGardenService service,
|
1426
|
+
# or if the versioned client gem needs an update to support the ModelGardenService service.
|
1427
|
+
#
|
1428
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1429
|
+
# Defaults to `:v1`.
|
1430
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1431
|
+
# @return [boolean] Whether the service is available.
|
1432
|
+
#
|
1433
|
+
def self.model_garden_service_available? version: :v1, transport: :grpc
|
1434
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
1435
|
+
package_name = Google::Cloud::AIPlatform
|
1436
|
+
.constants
|
1437
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1438
|
+
.first
|
1439
|
+
return false unless package_name
|
1440
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
1441
|
+
return false unless service_module.const_defined? :ModelGardenService
|
1442
|
+
service_module = service_module.const_get :ModelGardenService
|
1443
|
+
if transport == :rest
|
1444
|
+
return false unless service_module.const_defined? :Rest
|
1445
|
+
service_module = service_module.const_get :Rest
|
1446
|
+
end
|
1447
|
+
service_module.const_defined? :Client
|
1448
|
+
rescue ::LoadError
|
1449
|
+
false
|
1450
|
+
end
|
1451
|
+
|
622
1452
|
##
|
623
1453
|
# Create a new client object for ModelService.
|
624
1454
|
#
|
@@ -629,6 +1459,13 @@ module Google
|
|
629
1459
|
# `version` parameter. If the ModelService service is
|
630
1460
|
# supported by that API version, and the corresponding gem is available, the
|
631
1461
|
# appropriate versioned client will be returned.
|
1462
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
1463
|
+
# the `transport` parameter.
|
1464
|
+
#
|
1465
|
+
# Raises an exception if the currently installed versioned client gem for the
|
1466
|
+
# given API version does not support the given transport of the ModelService service.
|
1467
|
+
# You can determine whether the method will succeed by calling
|
1468
|
+
# {Google::Cloud::AIPlatform.model_service_available?}.
|
632
1469
|
#
|
633
1470
|
# ## About ModelService
|
634
1471
|
#
|
@@ -636,9 +1473,10 @@ module Google
|
|
636
1473
|
#
|
637
1474
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
638
1475
|
# Defaults to `:v1`.
|
1476
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
639
1477
|
# @return [::Object] A client object for the specified version.
|
640
1478
|
#
|
641
|
-
def self.model_service version: :v1, &block
|
1479
|
+
def self.model_service version: :v1, transport: :grpc, &block
|
642
1480
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
643
1481
|
|
644
1482
|
package_name = Google::Cloud::AIPlatform
|
@@ -646,9 +1484,41 @@ module Google
|
|
646
1484
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
647
1485
|
.first
|
648
1486
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:ModelService)
|
1487
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
649
1488
|
service_module.const_get(:Client).new(&block)
|
650
1489
|
end
|
651
1490
|
|
1491
|
+
##
|
1492
|
+
# Determines whether the ModelService service is supported by the current client.
|
1493
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.model_service}.
|
1494
|
+
# If false, that method will raise an exception. This could happen if the given
|
1495
|
+
# API version does not exist or does not support the ModelService service,
|
1496
|
+
# or if the versioned client gem needs an update to support the ModelService service.
|
1497
|
+
#
|
1498
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1499
|
+
# Defaults to `:v1`.
|
1500
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1501
|
+
# @return [boolean] Whether the service is available.
|
1502
|
+
#
|
1503
|
+
def self.model_service_available? version: :v1, transport: :grpc
|
1504
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
1505
|
+
package_name = Google::Cloud::AIPlatform
|
1506
|
+
.constants
|
1507
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1508
|
+
.first
|
1509
|
+
return false unless package_name
|
1510
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
1511
|
+
return false unless service_module.const_defined? :ModelService
|
1512
|
+
service_module = service_module.const_get :ModelService
|
1513
|
+
if transport == :rest
|
1514
|
+
return false unless service_module.const_defined? :Rest
|
1515
|
+
service_module = service_module.const_get :Rest
|
1516
|
+
end
|
1517
|
+
service_module.const_defined? :Client
|
1518
|
+
rescue ::LoadError
|
1519
|
+
false
|
1520
|
+
end
|
1521
|
+
|
652
1522
|
##
|
653
1523
|
# Create a new client object for NotebookService.
|
654
1524
|
#
|
@@ -659,6 +1529,13 @@ module Google
|
|
659
1529
|
# `version` parameter. If the NotebookService service is
|
660
1530
|
# supported by that API version, and the corresponding gem is available, the
|
661
1531
|
# appropriate versioned client will be returned.
|
1532
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
1533
|
+
# the `transport` parameter.
|
1534
|
+
#
|
1535
|
+
# Raises an exception if the currently installed versioned client gem for the
|
1536
|
+
# given API version does not support the given transport of the NotebookService service.
|
1537
|
+
# You can determine whether the method will succeed by calling
|
1538
|
+
# {Google::Cloud::AIPlatform.notebook_service_available?}.
|
662
1539
|
#
|
663
1540
|
# ## About NotebookService
|
664
1541
|
#
|
@@ -666,9 +1543,10 @@ module Google
|
|
666
1543
|
#
|
667
1544
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
668
1545
|
# Defaults to `:v1`.
|
1546
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
669
1547
|
# @return [::Object] A client object for the specified version.
|
670
1548
|
#
|
671
|
-
def self.notebook_service version: :v1, &block
|
1549
|
+
def self.notebook_service version: :v1, transport: :grpc, &block
|
672
1550
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
673
1551
|
|
674
1552
|
package_name = Google::Cloud::AIPlatform
|
@@ -676,9 +1554,41 @@ module Google
|
|
676
1554
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
677
1555
|
.first
|
678
1556
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:NotebookService)
|
1557
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
679
1558
|
service_module.const_get(:Client).new(&block)
|
680
1559
|
end
|
681
1560
|
|
1561
|
+
##
|
1562
|
+
# Determines whether the NotebookService service is supported by the current client.
|
1563
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.notebook_service}.
|
1564
|
+
# If false, that method will raise an exception. This could happen if the given
|
1565
|
+
# API version does not exist or does not support the NotebookService service,
|
1566
|
+
# or if the versioned client gem needs an update to support the NotebookService service.
|
1567
|
+
#
|
1568
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1569
|
+
# Defaults to `:v1`.
|
1570
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1571
|
+
# @return [boolean] Whether the service is available.
|
1572
|
+
#
|
1573
|
+
def self.notebook_service_available? version: :v1, transport: :grpc
|
1574
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
1575
|
+
package_name = Google::Cloud::AIPlatform
|
1576
|
+
.constants
|
1577
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1578
|
+
.first
|
1579
|
+
return false unless package_name
|
1580
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
1581
|
+
return false unless service_module.const_defined? :NotebookService
|
1582
|
+
service_module = service_module.const_get :NotebookService
|
1583
|
+
if transport == :rest
|
1584
|
+
return false unless service_module.const_defined? :Rest
|
1585
|
+
service_module = service_module.const_get :Rest
|
1586
|
+
end
|
1587
|
+
service_module.const_defined? :Client
|
1588
|
+
rescue ::LoadError
|
1589
|
+
false
|
1590
|
+
end
|
1591
|
+
|
682
1592
|
##
|
683
1593
|
# Create a new client object for PersistentResourceService.
|
684
1594
|
#
|
@@ -689,6 +1599,13 @@ module Google
|
|
689
1599
|
# `version` parameter. If the PersistentResourceService service is
|
690
1600
|
# supported by that API version, and the corresponding gem is available, the
|
691
1601
|
# appropriate versioned client will be returned.
|
1602
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
1603
|
+
# the `transport` parameter.
|
1604
|
+
#
|
1605
|
+
# Raises an exception if the currently installed versioned client gem for the
|
1606
|
+
# given API version does not support the given transport of the PersistentResourceService service.
|
1607
|
+
# You can determine whether the method will succeed by calling
|
1608
|
+
# {Google::Cloud::AIPlatform.persistent_resource_service_available?}.
|
692
1609
|
#
|
693
1610
|
# ## About PersistentResourceService
|
694
1611
|
#
|
@@ -696,9 +1613,10 @@ module Google
|
|
696
1613
|
#
|
697
1614
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
698
1615
|
# Defaults to `:v1`.
|
1616
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
699
1617
|
# @return [::Object] A client object for the specified version.
|
700
1618
|
#
|
701
|
-
def self.persistent_resource_service version: :v1, &block
|
1619
|
+
def self.persistent_resource_service version: :v1, transport: :grpc, &block
|
702
1620
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
703
1621
|
|
704
1622
|
package_name = Google::Cloud::AIPlatform
|
@@ -706,9 +1624,41 @@ module Google
|
|
706
1624
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
707
1625
|
.first
|
708
1626
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:PersistentResourceService)
|
1627
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
709
1628
|
service_module.const_get(:Client).new(&block)
|
710
1629
|
end
|
711
1630
|
|
1631
|
+
##
|
1632
|
+
# Determines whether the PersistentResourceService service is supported by the current client.
|
1633
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.persistent_resource_service}.
|
1634
|
+
# If false, that method will raise an exception. This could happen if the given
|
1635
|
+
# API version does not exist or does not support the PersistentResourceService service,
|
1636
|
+
# or if the versioned client gem needs an update to support the PersistentResourceService service.
|
1637
|
+
#
|
1638
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1639
|
+
# Defaults to `:v1`.
|
1640
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1641
|
+
# @return [boolean] Whether the service is available.
|
1642
|
+
#
|
1643
|
+
def self.persistent_resource_service_available? version: :v1, transport: :grpc
|
1644
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
1645
|
+
package_name = Google::Cloud::AIPlatform
|
1646
|
+
.constants
|
1647
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1648
|
+
.first
|
1649
|
+
return false unless package_name
|
1650
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
1651
|
+
return false unless service_module.const_defined? :PersistentResourceService
|
1652
|
+
service_module = service_module.const_get :PersistentResourceService
|
1653
|
+
if transport == :rest
|
1654
|
+
return false unless service_module.const_defined? :Rest
|
1655
|
+
service_module = service_module.const_get :Rest
|
1656
|
+
end
|
1657
|
+
service_module.const_defined? :Client
|
1658
|
+
rescue ::LoadError
|
1659
|
+
false
|
1660
|
+
end
|
1661
|
+
|
712
1662
|
##
|
713
1663
|
# Create a new client object for PipelineService.
|
714
1664
|
#
|
@@ -719,6 +1669,13 @@ module Google
|
|
719
1669
|
# `version` parameter. If the PipelineService service is
|
720
1670
|
# supported by that API version, and the corresponding gem is available, the
|
721
1671
|
# appropriate versioned client will be returned.
|
1672
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
1673
|
+
# the `transport` parameter.
|
1674
|
+
#
|
1675
|
+
# Raises an exception if the currently installed versioned client gem for the
|
1676
|
+
# given API version does not support the given transport of the PipelineService service.
|
1677
|
+
# You can determine whether the method will succeed by calling
|
1678
|
+
# {Google::Cloud::AIPlatform.pipeline_service_available?}.
|
722
1679
|
#
|
723
1680
|
# ## About PipelineService
|
724
1681
|
#
|
@@ -728,9 +1685,10 @@ module Google
|
|
728
1685
|
#
|
729
1686
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
730
1687
|
# Defaults to `:v1`.
|
1688
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
731
1689
|
# @return [::Object] A client object for the specified version.
|
732
1690
|
#
|
733
|
-
def self.pipeline_service version: :v1, &block
|
1691
|
+
def self.pipeline_service version: :v1, transport: :grpc, &block
|
734
1692
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
735
1693
|
|
736
1694
|
package_name = Google::Cloud::AIPlatform
|
@@ -738,9 +1696,181 @@ module Google
|
|
738
1696
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
739
1697
|
.first
|
740
1698
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:PipelineService)
|
1699
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
741
1700
|
service_module.const_get(:Client).new(&block)
|
742
1701
|
end
|
743
1702
|
|
1703
|
+
##
|
1704
|
+
# Determines whether the PipelineService service is supported by the current client.
|
1705
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.pipeline_service}.
|
1706
|
+
# If false, that method will raise an exception. This could happen if the given
|
1707
|
+
# API version does not exist or does not support the PipelineService service,
|
1708
|
+
# or if the versioned client gem needs an update to support the PipelineService service.
|
1709
|
+
#
|
1710
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1711
|
+
# Defaults to `:v1`.
|
1712
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1713
|
+
# @return [boolean] Whether the service is available.
|
1714
|
+
#
|
1715
|
+
def self.pipeline_service_available? version: :v1, transport: :grpc
|
1716
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
1717
|
+
package_name = Google::Cloud::AIPlatform
|
1718
|
+
.constants
|
1719
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1720
|
+
.first
|
1721
|
+
return false unless package_name
|
1722
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
1723
|
+
return false unless service_module.const_defined? :PipelineService
|
1724
|
+
service_module = service_module.const_get :PipelineService
|
1725
|
+
if transport == :rest
|
1726
|
+
return false unless service_module.const_defined? :Rest
|
1727
|
+
service_module = service_module.const_get :Rest
|
1728
|
+
end
|
1729
|
+
service_module.const_defined? :Client
|
1730
|
+
rescue ::LoadError
|
1731
|
+
false
|
1732
|
+
end
|
1733
|
+
|
1734
|
+
##
|
1735
|
+
# Create a new client object for ReasoningEngineExecutionService.
|
1736
|
+
#
|
1737
|
+
# By default, this returns an instance of
|
1738
|
+
# [Google::Cloud::AIPlatform::V1::ReasoningEngineExecutionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ReasoningEngineExecutionService-Client)
|
1739
|
+
# for a gRPC client for version V1 of the API.
|
1740
|
+
# However, you can specify a different API version by passing it in the
|
1741
|
+
# `version` parameter. If the ReasoningEngineExecutionService service is
|
1742
|
+
# supported by that API version, and the corresponding gem is available, the
|
1743
|
+
# appropriate versioned client will be returned.
|
1744
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
1745
|
+
# the `transport` parameter.
|
1746
|
+
#
|
1747
|
+
# Raises an exception if the currently installed versioned client gem for the
|
1748
|
+
# given API version does not support the given transport of the ReasoningEngineExecutionService service.
|
1749
|
+
# You can determine whether the method will succeed by calling
|
1750
|
+
# {Google::Cloud::AIPlatform.reasoning_engine_execution_service_available?}.
|
1751
|
+
#
|
1752
|
+
# ## About ReasoningEngineExecutionService
|
1753
|
+
#
|
1754
|
+
# A service for executing queries on Reasoning Engine.
|
1755
|
+
#
|
1756
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1757
|
+
# Defaults to `:v1`.
|
1758
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1759
|
+
# @return [::Object] A client object for the specified version.
|
1760
|
+
#
|
1761
|
+
def self.reasoning_engine_execution_service version: :v1, transport: :grpc, &block
|
1762
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
1763
|
+
|
1764
|
+
package_name = Google::Cloud::AIPlatform
|
1765
|
+
.constants
|
1766
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1767
|
+
.first
|
1768
|
+
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:ReasoningEngineExecutionService)
|
1769
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
1770
|
+
service_module.const_get(:Client).new(&block)
|
1771
|
+
end
|
1772
|
+
|
1773
|
+
##
|
1774
|
+
# Determines whether the ReasoningEngineExecutionService service is supported by the current client.
|
1775
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.reasoning_engine_execution_service}.
|
1776
|
+
# If false, that method will raise an exception. This could happen if the given
|
1777
|
+
# API version does not exist or does not support the ReasoningEngineExecutionService service,
|
1778
|
+
# or if the versioned client gem needs an update to support the ReasoningEngineExecutionService service.
|
1779
|
+
#
|
1780
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1781
|
+
# Defaults to `:v1`.
|
1782
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1783
|
+
# @return [boolean] Whether the service is available.
|
1784
|
+
#
|
1785
|
+
def self.reasoning_engine_execution_service_available? version: :v1, transport: :grpc
|
1786
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
1787
|
+
package_name = Google::Cloud::AIPlatform
|
1788
|
+
.constants
|
1789
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1790
|
+
.first
|
1791
|
+
return false unless package_name
|
1792
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
1793
|
+
return false unless service_module.const_defined? :ReasoningEngineExecutionService
|
1794
|
+
service_module = service_module.const_get :ReasoningEngineExecutionService
|
1795
|
+
if transport == :rest
|
1796
|
+
return false unless service_module.const_defined? :Rest
|
1797
|
+
service_module = service_module.const_get :Rest
|
1798
|
+
end
|
1799
|
+
service_module.const_defined? :Client
|
1800
|
+
rescue ::LoadError
|
1801
|
+
false
|
1802
|
+
end
|
1803
|
+
|
1804
|
+
##
|
1805
|
+
# Create a new client object for ReasoningEngineService.
|
1806
|
+
#
|
1807
|
+
# By default, this returns an instance of
|
1808
|
+
# [Google::Cloud::AIPlatform::V1::ReasoningEngineService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-ReasoningEngineService-Client)
|
1809
|
+
# for a gRPC client for version V1 of the API.
|
1810
|
+
# However, you can specify a different API version by passing it in the
|
1811
|
+
# `version` parameter. If the ReasoningEngineService service is
|
1812
|
+
# supported by that API version, and the corresponding gem is available, the
|
1813
|
+
# appropriate versioned client will be returned.
|
1814
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
1815
|
+
# the `transport` parameter.
|
1816
|
+
#
|
1817
|
+
# Raises an exception if the currently installed versioned client gem for the
|
1818
|
+
# given API version does not support the given transport of the ReasoningEngineService service.
|
1819
|
+
# You can determine whether the method will succeed by calling
|
1820
|
+
# {Google::Cloud::AIPlatform.reasoning_engine_service_available?}.
|
1821
|
+
#
|
1822
|
+
# ## About ReasoningEngineService
|
1823
|
+
#
|
1824
|
+
# A service for managing Vertex AI's Reasoning Engines.
|
1825
|
+
#
|
1826
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1827
|
+
# Defaults to `:v1`.
|
1828
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1829
|
+
# @return [::Object] A client object for the specified version.
|
1830
|
+
#
|
1831
|
+
def self.reasoning_engine_service version: :v1, transport: :grpc, &block
|
1832
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
1833
|
+
|
1834
|
+
package_name = Google::Cloud::AIPlatform
|
1835
|
+
.constants
|
1836
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1837
|
+
.first
|
1838
|
+
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:ReasoningEngineService)
|
1839
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
1840
|
+
service_module.const_get(:Client).new(&block)
|
1841
|
+
end
|
1842
|
+
|
1843
|
+
##
|
1844
|
+
# Determines whether the ReasoningEngineService service is supported by the current client.
|
1845
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.reasoning_engine_service}.
|
1846
|
+
# If false, that method will raise an exception. This could happen if the given
|
1847
|
+
# API version does not exist or does not support the ReasoningEngineService service,
|
1848
|
+
# or if the versioned client gem needs an update to support the ReasoningEngineService service.
|
1849
|
+
#
|
1850
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1851
|
+
# Defaults to `:v1`.
|
1852
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1853
|
+
# @return [boolean] Whether the service is available.
|
1854
|
+
#
|
1855
|
+
def self.reasoning_engine_service_available? version: :v1, transport: :grpc
|
1856
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
1857
|
+
package_name = Google::Cloud::AIPlatform
|
1858
|
+
.constants
|
1859
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1860
|
+
.first
|
1861
|
+
return false unless package_name
|
1862
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
1863
|
+
return false unless service_module.const_defined? :ReasoningEngineService
|
1864
|
+
service_module = service_module.const_get :ReasoningEngineService
|
1865
|
+
if transport == :rest
|
1866
|
+
return false unless service_module.const_defined? :Rest
|
1867
|
+
service_module = service_module.const_get :Rest
|
1868
|
+
end
|
1869
|
+
service_module.const_defined? :Client
|
1870
|
+
rescue ::LoadError
|
1871
|
+
false
|
1872
|
+
end
|
1873
|
+
|
744
1874
|
##
|
745
1875
|
# Create a new client object for ScheduleService.
|
746
1876
|
#
|
@@ -751,6 +1881,13 @@ module Google
|
|
751
1881
|
# `version` parameter. If the ScheduleService service is
|
752
1882
|
# supported by that API version, and the corresponding gem is available, the
|
753
1883
|
# appropriate versioned client will be returned.
|
1884
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
1885
|
+
# the `transport` parameter.
|
1886
|
+
#
|
1887
|
+
# Raises an exception if the currently installed versioned client gem for the
|
1888
|
+
# given API version does not support the given transport of the ScheduleService service.
|
1889
|
+
# You can determine whether the method will succeed by calling
|
1890
|
+
# {Google::Cloud::AIPlatform.schedule_service_available?}.
|
754
1891
|
#
|
755
1892
|
# ## About ScheduleService
|
756
1893
|
#
|
@@ -759,9 +1896,10 @@ module Google
|
|
759
1896
|
#
|
760
1897
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
761
1898
|
# Defaults to `:v1`.
|
1899
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
762
1900
|
# @return [::Object] A client object for the specified version.
|
763
1901
|
#
|
764
|
-
def self.schedule_service version: :v1, &block
|
1902
|
+
def self.schedule_service version: :v1, transport: :grpc, &block
|
765
1903
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
766
1904
|
|
767
1905
|
package_name = Google::Cloud::AIPlatform
|
@@ -769,9 +1907,41 @@ module Google
|
|
769
1907
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
770
1908
|
.first
|
771
1909
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:ScheduleService)
|
1910
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
772
1911
|
service_module.const_get(:Client).new(&block)
|
773
1912
|
end
|
774
1913
|
|
1914
|
+
##
|
1915
|
+
# Determines whether the ScheduleService service is supported by the current client.
|
1916
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.schedule_service}.
|
1917
|
+
# If false, that method will raise an exception. This could happen if the given
|
1918
|
+
# API version does not exist or does not support the ScheduleService service,
|
1919
|
+
# or if the versioned client gem needs an update to support the ScheduleService service.
|
1920
|
+
#
|
1921
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1922
|
+
# Defaults to `:v1`.
|
1923
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1924
|
+
# @return [boolean] Whether the service is available.
|
1925
|
+
#
|
1926
|
+
def self.schedule_service_available? version: :v1, transport: :grpc
|
1927
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
1928
|
+
package_name = Google::Cloud::AIPlatform
|
1929
|
+
.constants
|
1930
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1931
|
+
.first
|
1932
|
+
return false unless package_name
|
1933
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
1934
|
+
return false unless service_module.const_defined? :ScheduleService
|
1935
|
+
service_module = service_module.const_get :ScheduleService
|
1936
|
+
if transport == :rest
|
1937
|
+
return false unless service_module.const_defined? :Rest
|
1938
|
+
service_module = service_module.const_get :Rest
|
1939
|
+
end
|
1940
|
+
service_module.const_defined? :Client
|
1941
|
+
rescue ::LoadError
|
1942
|
+
false
|
1943
|
+
end
|
1944
|
+
|
775
1945
|
##
|
776
1946
|
# Create a new client object for SpecialistPoolService.
|
777
1947
|
#
|
@@ -782,6 +1952,13 @@ module Google
|
|
782
1952
|
# `version` parameter. If the SpecialistPoolService service is
|
783
1953
|
# supported by that API version, and the corresponding gem is available, the
|
784
1954
|
# appropriate versioned client will be returned.
|
1955
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
1956
|
+
# the `transport` parameter.
|
1957
|
+
#
|
1958
|
+
# Raises an exception if the currently installed versioned client gem for the
|
1959
|
+
# given API version does not support the given transport of the SpecialistPoolService service.
|
1960
|
+
# You can determine whether the method will succeed by calling
|
1961
|
+
# {Google::Cloud::AIPlatform.specialist_pool_service_available?}.
|
785
1962
|
#
|
786
1963
|
# ## About SpecialistPoolService
|
787
1964
|
#
|
@@ -794,9 +1971,10 @@ module Google
|
|
794
1971
|
#
|
795
1972
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
796
1973
|
# Defaults to `:v1`.
|
1974
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
797
1975
|
# @return [::Object] A client object for the specified version.
|
798
1976
|
#
|
799
|
-
def self.specialist_pool_service version: :v1, &block
|
1977
|
+
def self.specialist_pool_service version: :v1, transport: :grpc, &block
|
800
1978
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
801
1979
|
|
802
1980
|
package_name = Google::Cloud::AIPlatform
|
@@ -804,9 +1982,41 @@ module Google
|
|
804
1982
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
805
1983
|
.first
|
806
1984
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:SpecialistPoolService)
|
1985
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
807
1986
|
service_module.const_get(:Client).new(&block)
|
808
1987
|
end
|
809
1988
|
|
1989
|
+
##
|
1990
|
+
# Determines whether the SpecialistPoolService service is supported by the current client.
|
1991
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.specialist_pool_service}.
|
1992
|
+
# If false, that method will raise an exception. This could happen if the given
|
1993
|
+
# API version does not exist or does not support the SpecialistPoolService service,
|
1994
|
+
# or if the versioned client gem needs an update to support the SpecialistPoolService service.
|
1995
|
+
#
|
1996
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1997
|
+
# Defaults to `:v1`.
|
1998
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1999
|
+
# @return [boolean] Whether the service is available.
|
2000
|
+
#
|
2001
|
+
def self.specialist_pool_service_available? version: :v1, transport: :grpc
|
2002
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
2003
|
+
package_name = Google::Cloud::AIPlatform
|
2004
|
+
.constants
|
2005
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
2006
|
+
.first
|
2007
|
+
return false unless package_name
|
2008
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
2009
|
+
return false unless service_module.const_defined? :SpecialistPoolService
|
2010
|
+
service_module = service_module.const_get :SpecialistPoolService
|
2011
|
+
if transport == :rest
|
2012
|
+
return false unless service_module.const_defined? :Rest
|
2013
|
+
service_module = service_module.const_get :Rest
|
2014
|
+
end
|
2015
|
+
service_module.const_defined? :Client
|
2016
|
+
rescue ::LoadError
|
2017
|
+
false
|
2018
|
+
end
|
2019
|
+
|
810
2020
|
##
|
811
2021
|
# Create a new client object for TensorboardService.
|
812
2022
|
#
|
@@ -817,6 +2027,13 @@ module Google
|
|
817
2027
|
# `version` parameter. If the TensorboardService service is
|
818
2028
|
# supported by that API version, and the corresponding gem is available, the
|
819
2029
|
# appropriate versioned client will be returned.
|
2030
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
2031
|
+
# the `transport` parameter.
|
2032
|
+
#
|
2033
|
+
# Raises an exception if the currently installed versioned client gem for the
|
2034
|
+
# given API version does not support the given transport of the TensorboardService service.
|
2035
|
+
# You can determine whether the method will succeed by calling
|
2036
|
+
# {Google::Cloud::AIPlatform.tensorboard_service_available?}.
|
820
2037
|
#
|
821
2038
|
# ## About TensorboardService
|
822
2039
|
#
|
@@ -824,9 +2041,10 @@ module Google
|
|
824
2041
|
#
|
825
2042
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
826
2043
|
# Defaults to `:v1`.
|
2044
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
827
2045
|
# @return [::Object] A client object for the specified version.
|
828
2046
|
#
|
829
|
-
def self.tensorboard_service version: :v1, &block
|
2047
|
+
def self.tensorboard_service version: :v1, transport: :grpc, &block
|
830
2048
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
831
2049
|
|
832
2050
|
package_name = Google::Cloud::AIPlatform
|
@@ -834,9 +2052,181 @@ module Google
|
|
834
2052
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
835
2053
|
.first
|
836
2054
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:TensorboardService)
|
2055
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
2056
|
+
service_module.const_get(:Client).new(&block)
|
2057
|
+
end
|
2058
|
+
|
2059
|
+
##
|
2060
|
+
# Determines whether the TensorboardService service is supported by the current client.
|
2061
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.tensorboard_service}.
|
2062
|
+
# If false, that method will raise an exception. This could happen if the given
|
2063
|
+
# API version does not exist or does not support the TensorboardService service,
|
2064
|
+
# or if the versioned client gem needs an update to support the TensorboardService service.
|
2065
|
+
#
|
2066
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
2067
|
+
# Defaults to `:v1`.
|
2068
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
2069
|
+
# @return [boolean] Whether the service is available.
|
2070
|
+
#
|
2071
|
+
def self.tensorboard_service_available? version: :v1, transport: :grpc
|
2072
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
2073
|
+
package_name = Google::Cloud::AIPlatform
|
2074
|
+
.constants
|
2075
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
2076
|
+
.first
|
2077
|
+
return false unless package_name
|
2078
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
2079
|
+
return false unless service_module.const_defined? :TensorboardService
|
2080
|
+
service_module = service_module.const_get :TensorboardService
|
2081
|
+
if transport == :rest
|
2082
|
+
return false unless service_module.const_defined? :Rest
|
2083
|
+
service_module = service_module.const_get :Rest
|
2084
|
+
end
|
2085
|
+
service_module.const_defined? :Client
|
2086
|
+
rescue ::LoadError
|
2087
|
+
false
|
2088
|
+
end
|
2089
|
+
|
2090
|
+
##
|
2091
|
+
# Create a new client object for VertexRagDataService.
|
2092
|
+
#
|
2093
|
+
# By default, this returns an instance of
|
2094
|
+
# [Google::Cloud::AIPlatform::V1::VertexRagDataService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-VertexRagDataService-Client)
|
2095
|
+
# for a gRPC client for version V1 of the API.
|
2096
|
+
# However, you can specify a different API version by passing it in the
|
2097
|
+
# `version` parameter. If the VertexRagDataService service is
|
2098
|
+
# supported by that API version, and the corresponding gem is available, the
|
2099
|
+
# appropriate versioned client will be returned.
|
2100
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
2101
|
+
# the `transport` parameter.
|
2102
|
+
#
|
2103
|
+
# Raises an exception if the currently installed versioned client gem for the
|
2104
|
+
# given API version does not support the given transport of the VertexRagDataService service.
|
2105
|
+
# You can determine whether the method will succeed by calling
|
2106
|
+
# {Google::Cloud::AIPlatform.vertex_rag_data_service_available?}.
|
2107
|
+
#
|
2108
|
+
# ## About VertexRagDataService
|
2109
|
+
#
|
2110
|
+
# A service for managing user data for RAG.
|
2111
|
+
#
|
2112
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
2113
|
+
# Defaults to `:v1`.
|
2114
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
2115
|
+
# @return [::Object] A client object for the specified version.
|
2116
|
+
#
|
2117
|
+
def self.vertex_rag_data_service version: :v1, transport: :grpc, &block
|
2118
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
2119
|
+
|
2120
|
+
package_name = Google::Cloud::AIPlatform
|
2121
|
+
.constants
|
2122
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
2123
|
+
.first
|
2124
|
+
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:VertexRagDataService)
|
2125
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
837
2126
|
service_module.const_get(:Client).new(&block)
|
838
2127
|
end
|
839
2128
|
|
2129
|
+
##
|
2130
|
+
# Determines whether the VertexRagDataService service is supported by the current client.
|
2131
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.vertex_rag_data_service}.
|
2132
|
+
# If false, that method will raise an exception. This could happen if the given
|
2133
|
+
# API version does not exist or does not support the VertexRagDataService service,
|
2134
|
+
# or if the versioned client gem needs an update to support the VertexRagDataService service.
|
2135
|
+
#
|
2136
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
2137
|
+
# Defaults to `:v1`.
|
2138
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
2139
|
+
# @return [boolean] Whether the service is available.
|
2140
|
+
#
|
2141
|
+
def self.vertex_rag_data_service_available? version: :v1, transport: :grpc
|
2142
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
2143
|
+
package_name = Google::Cloud::AIPlatform
|
2144
|
+
.constants
|
2145
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
2146
|
+
.first
|
2147
|
+
return false unless package_name
|
2148
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
2149
|
+
return false unless service_module.const_defined? :VertexRagDataService
|
2150
|
+
service_module = service_module.const_get :VertexRagDataService
|
2151
|
+
if transport == :rest
|
2152
|
+
return false unless service_module.const_defined? :Rest
|
2153
|
+
service_module = service_module.const_get :Rest
|
2154
|
+
end
|
2155
|
+
service_module.const_defined? :Client
|
2156
|
+
rescue ::LoadError
|
2157
|
+
false
|
2158
|
+
end
|
2159
|
+
|
2160
|
+
##
|
2161
|
+
# Create a new client object for VertexRagService.
|
2162
|
+
#
|
2163
|
+
# By default, this returns an instance of
|
2164
|
+
# [Google::Cloud::AIPlatform::V1::VertexRagService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-ai_platform-v1/latest/Google-Cloud-AIPlatform-V1-VertexRagService-Client)
|
2165
|
+
# for a gRPC client for version V1 of the API.
|
2166
|
+
# However, you can specify a different API version by passing it in the
|
2167
|
+
# `version` parameter. If the VertexRagService service is
|
2168
|
+
# supported by that API version, and the corresponding gem is available, the
|
2169
|
+
# appropriate versioned client will be returned.
|
2170
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
2171
|
+
# the `transport` parameter.
|
2172
|
+
#
|
2173
|
+
# Raises an exception if the currently installed versioned client gem for the
|
2174
|
+
# given API version does not support the given transport of the VertexRagService service.
|
2175
|
+
# You can determine whether the method will succeed by calling
|
2176
|
+
# {Google::Cloud::AIPlatform.vertex_rag_service_available?}.
|
2177
|
+
#
|
2178
|
+
# ## About VertexRagService
|
2179
|
+
#
|
2180
|
+
# A service for retrieving relevant contexts.
|
2181
|
+
#
|
2182
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
2183
|
+
# Defaults to `:v1`.
|
2184
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
2185
|
+
# @return [::Object] A client object for the specified version.
|
2186
|
+
#
|
2187
|
+
def self.vertex_rag_service version: :v1, transport: :grpc, &block
|
2188
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
2189
|
+
|
2190
|
+
package_name = Google::Cloud::AIPlatform
|
2191
|
+
.constants
|
2192
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
2193
|
+
.first
|
2194
|
+
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:VertexRagService)
|
2195
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
2196
|
+
service_module.const_get(:Client).new(&block)
|
2197
|
+
end
|
2198
|
+
|
2199
|
+
##
|
2200
|
+
# Determines whether the VertexRagService service is supported by the current client.
|
2201
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.vertex_rag_service}.
|
2202
|
+
# If false, that method will raise an exception. This could happen if the given
|
2203
|
+
# API version does not exist or does not support the VertexRagService service,
|
2204
|
+
# or if the versioned client gem needs an update to support the VertexRagService service.
|
2205
|
+
#
|
2206
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
2207
|
+
# Defaults to `:v1`.
|
2208
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
2209
|
+
# @return [boolean] Whether the service is available.
|
2210
|
+
#
|
2211
|
+
def self.vertex_rag_service_available? version: :v1, transport: :grpc
|
2212
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
2213
|
+
package_name = Google::Cloud::AIPlatform
|
2214
|
+
.constants
|
2215
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
2216
|
+
.first
|
2217
|
+
return false unless package_name
|
2218
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
2219
|
+
return false unless service_module.const_defined? :VertexRagService
|
2220
|
+
service_module = service_module.const_get :VertexRagService
|
2221
|
+
if transport == :rest
|
2222
|
+
return false unless service_module.const_defined? :Rest
|
2223
|
+
service_module = service_module.const_get :Rest
|
2224
|
+
end
|
2225
|
+
service_module.const_defined? :Client
|
2226
|
+
rescue ::LoadError
|
2227
|
+
false
|
2228
|
+
end
|
2229
|
+
|
840
2230
|
##
|
841
2231
|
# Create a new client object for VizierService.
|
842
2232
|
#
|
@@ -847,6 +2237,13 @@ module Google
|
|
847
2237
|
# `version` parameter. If the VizierService service is
|
848
2238
|
# supported by that API version, and the corresponding gem is available, the
|
849
2239
|
# appropriate versioned client will be returned.
|
2240
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
2241
|
+
# the `transport` parameter.
|
2242
|
+
#
|
2243
|
+
# Raises an exception if the currently installed versioned client gem for the
|
2244
|
+
# given API version does not support the given transport of the VizierService service.
|
2245
|
+
# You can determine whether the method will succeed by calling
|
2246
|
+
# {Google::Cloud::AIPlatform.vizier_service_available?}.
|
850
2247
|
#
|
851
2248
|
# ## About VizierService
|
852
2249
|
#
|
@@ -858,9 +2255,10 @@ module Google
|
|
858
2255
|
#
|
859
2256
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
860
2257
|
# Defaults to `:v1`.
|
2258
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
861
2259
|
# @return [::Object] A client object for the specified version.
|
862
2260
|
#
|
863
|
-
def self.vizier_service version: :v1, &block
|
2261
|
+
def self.vizier_service version: :v1, transport: :grpc, &block
|
864
2262
|
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
865
2263
|
|
866
2264
|
package_name = Google::Cloud::AIPlatform
|
@@ -868,9 +2266,41 @@ module Google
|
|
868
2266
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
869
2267
|
.first
|
870
2268
|
service_module = Google::Cloud::AIPlatform.const_get(package_name).const_get(:VizierService)
|
2269
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
871
2270
|
service_module.const_get(:Client).new(&block)
|
872
2271
|
end
|
873
2272
|
|
2273
|
+
##
|
2274
|
+
# Determines whether the VizierService service is supported by the current client.
|
2275
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::AIPlatform.vizier_service}.
|
2276
|
+
# If false, that method will raise an exception. This could happen if the given
|
2277
|
+
# API version does not exist or does not support the VizierService service,
|
2278
|
+
# or if the versioned client gem needs an update to support the VizierService service.
|
2279
|
+
#
|
2280
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
2281
|
+
# Defaults to `:v1`.
|
2282
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
2283
|
+
# @return [boolean] Whether the service is available.
|
2284
|
+
#
|
2285
|
+
def self.vizier_service_available? version: :v1, transport: :grpc
|
2286
|
+
require "google/cloud/ai_platform/#{version.to_s.downcase}"
|
2287
|
+
package_name = Google::Cloud::AIPlatform
|
2288
|
+
.constants
|
2289
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
2290
|
+
.first
|
2291
|
+
return false unless package_name
|
2292
|
+
service_module = Google::Cloud::AIPlatform.const_get package_name
|
2293
|
+
return false unless service_module.const_defined? :VizierService
|
2294
|
+
service_module = service_module.const_get :VizierService
|
2295
|
+
if transport == :rest
|
2296
|
+
return false unless service_module.const_defined? :Rest
|
2297
|
+
service_module = service_module.const_get :Rest
|
2298
|
+
end
|
2299
|
+
service_module.const_defined? :Client
|
2300
|
+
rescue ::LoadError
|
2301
|
+
false
|
2302
|
+
end
|
2303
|
+
|
874
2304
|
##
|
875
2305
|
# Configure the google-cloud-ai_platform library.
|
876
2306
|
#
|