google-cloud-ai_platform-v1 0.38.0 → 0.39.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +2 -3
  3. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/client.rb +758 -0
  4. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/credentials.rb +47 -0
  5. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/paths.rb +154 -0
  6. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service.rb +49 -0
  7. data/lib/google/cloud/ai_platform/v1/job_service/paths.rb +19 -0
  8. data/lib/google/cloud/ai_platform/v1/notebook_service/client.rb +1484 -0
  9. data/lib/google/cloud/ai_platform/v1/notebook_service/credentials.rb +47 -0
  10. data/lib/google/cloud/ai_platform/v1/notebook_service/operations.rb +809 -0
  11. data/lib/google/cloud/ai_platform/v1/notebook_service/paths.rb +124 -0
  12. data/lib/google/cloud/ai_platform/v1/notebook_service.rb +50 -0
  13. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/client.rb +992 -0
  14. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/credentials.rb +47 -0
  15. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/operations.rb +809 -0
  16. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/paths.rb +86 -0
  17. data/lib/google/cloud/ai_platform/v1/persistent_resource_service.rb +50 -0
  18. data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +10 -2
  19. data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
  20. data/lib/google/cloud/ai_platform/v1.rb +3 -0
  21. data/lib/google/cloud/aiplatform/v1/content_pb.rb +2 -1
  22. data/lib/google/cloud/aiplatform/v1/custom_job_pb.rb +1 -1
  23. data/lib/google/cloud/aiplatform/v1/endpoint_pb.rb +1 -1
  24. data/lib/google/cloud/aiplatform/v1/feature_online_store_pb.rb +3 -1
  25. data/lib/google/cloud/aiplatform/v1/feature_online_store_service_pb.rb +1 -1
  26. data/lib/google/cloud/aiplatform/v1/feature_view_pb.rb +5 -1
  27. data/lib/google/cloud/aiplatform/v1/genai_tuning_service_pb.rb +54 -0
  28. data/lib/google/cloud/aiplatform/v1/genai_tuning_service_services_pb.rb +63 -0
  29. data/lib/google/cloud/aiplatform/v1/machine_resources_pb.rb +2 -1
  30. data/lib/google/cloud/aiplatform/v1/network_spec_pb.rb +44 -0
  31. data/lib/google/cloud/aiplatform/v1/notebook_euc_config_pb.rb +44 -0
  32. data/lib/google/cloud/aiplatform/v1/notebook_idle_shutdown_config_pb.rb +46 -0
  33. data/lib/google/cloud/aiplatform/v1/notebook_runtime_pb.rb +61 -0
  34. data/lib/google/cloud/aiplatform/v1/notebook_runtime_template_ref_pb.rb +45 -0
  35. data/lib/google/cloud/aiplatform/v1/notebook_service_pb.rb +72 -0
  36. data/lib/google/cloud/aiplatform/v1/notebook_service_services_pb.rb +64 -0
  37. data/lib/google/cloud/aiplatform/v1/openapi_pb.rb +1 -1
  38. data/lib/google/cloud/aiplatform/v1/persistent_resource_pb.rb +60 -0
  39. data/lib/google/cloud/aiplatform/v1/persistent_resource_service_pb.rb +64 -0
  40. data/lib/google/cloud/aiplatform/v1/persistent_resource_service_services_pb.rb +55 -0
  41. data/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +1 -1
  42. data/lib/google/cloud/aiplatform/v1/tuning_job_pb.rb +60 -0
  43. data/proto_docs/google/cloud/aiplatform/v1/content.rb +35 -3
  44. data/proto_docs/google/cloud/aiplatform/v1/custom_job.rb +9 -0
  45. data/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +7 -0
  46. data/proto_docs/google/cloud/aiplatform/v1/endpoint_service.rb +2 -3
  47. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store.rb +29 -0
  48. data/proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb +5 -0
  49. data/proto_docs/google/cloud/aiplatform/v1/feature_view.rb +86 -0
  50. data/proto_docs/google/cloud/aiplatform/v1/genai_tuning_service.rb +100 -0
  51. data/proto_docs/google/cloud/aiplatform/v1/machine_resources.rb +17 -0
  52. data/proto_docs/google/cloud/aiplatform/v1/network_spec.rb +44 -0
  53. data/proto_docs/google/cloud/aiplatform/v1/notebook_euc_config.rb +46 -0
  54. data/proto_docs/google/cloud/aiplatform/v1/notebook_idle_shutdown_config.rb +41 -0
  55. data/proto_docs/google/cloud/aiplatform/v1/notebook_runtime.rb +263 -0
  56. data/proto_docs/google/cloud/aiplatform/v1/notebook_runtime_template_ref.rb +35 -0
  57. data/proto_docs/google/cloud/aiplatform/v1/notebook_service.rb +371 -0
  58. data/proto_docs/google/cloud/aiplatform/v1/openapi.rb +43 -4
  59. data/proto_docs/google/cloud/aiplatform/v1/persistent_resource.rb +248 -0
  60. data/proto_docs/google/cloud/aiplatform/v1/persistent_resource_service.rb +170 -0
  61. data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +12 -0
  62. data/proto_docs/google/cloud/aiplatform/v1/tool.rb +7 -5
  63. data/proto_docs/google/cloud/aiplatform/v1/tuning_job.rb +261 -0
  64. metadata +39 -2
@@ -0,0 +1,992 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/aiplatform/v1/persistent_resource_service_pb"
21
+ require "google/cloud/location"
22
+ require "google/iam/v1"
23
+
24
+ module Google
25
+ module Cloud
26
+ module AIPlatform
27
+ module V1
28
+ module PersistentResourceService
29
+ ##
30
+ # Client for the PersistentResourceService service.
31
+ #
32
+ # A service for managing Vertex AI's machine learning PersistentResource.
33
+ #
34
+ class Client
35
+ # @private
36
+ DEFAULT_ENDPOINT_TEMPLATE = "aiplatform.$UNIVERSE_DOMAIN$"
37
+
38
+ include Paths
39
+
40
+ # @private
41
+ attr_reader :persistent_resource_service_stub
42
+
43
+ ##
44
+ # Configure the PersistentResourceService Client class.
45
+ #
46
+ # See {::Google::Cloud::AIPlatform::V1::PersistentResourceService::Client::Configuration}
47
+ # for a description of the configuration fields.
48
+ #
49
+ # @example
50
+ #
51
+ # # Modify the configuration for all PersistentResourceService clients
52
+ # ::Google::Cloud::AIPlatform::V1::PersistentResourceService::Client.configure do |config|
53
+ # config.timeout = 10.0
54
+ # end
55
+ #
56
+ # @yield [config] Configure the Client client.
57
+ # @yieldparam config [Client::Configuration]
58
+ #
59
+ # @return [Client::Configuration]
60
+ #
61
+ def self.configure
62
+ @configure ||= begin
63
+ namespace = ["Google", "Cloud", "AIPlatform", "V1"]
64
+ parent_config = while namespace.any?
65
+ parent_name = namespace.join "::"
66
+ parent_const = const_get parent_name
67
+ break parent_const.configure if parent_const.respond_to? :configure
68
+ namespace.pop
69
+ end
70
+ default_config = Client::Configuration.new parent_config
71
+
72
+ default_config
73
+ end
74
+ yield @configure if block_given?
75
+ @configure
76
+ end
77
+
78
+ ##
79
+ # Configure the PersistentResourceService Client instance.
80
+ #
81
+ # The configuration is set to the derived mode, meaning that values can be changed,
82
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
83
+ # should be made on {Client.configure}.
84
+ #
85
+ # See {::Google::Cloud::AIPlatform::V1::PersistentResourceService::Client::Configuration}
86
+ # for a description of the configuration fields.
87
+ #
88
+ # @yield [config] Configure the Client client.
89
+ # @yieldparam config [Client::Configuration]
90
+ #
91
+ # @return [Client::Configuration]
92
+ #
93
+ def configure
94
+ yield @config if block_given?
95
+ @config
96
+ end
97
+
98
+ ##
99
+ # The effective universe domain
100
+ #
101
+ # @return [String]
102
+ #
103
+ def universe_domain
104
+ @persistent_resource_service_stub.universe_domain
105
+ end
106
+
107
+ ##
108
+ # Create a new PersistentResourceService client object.
109
+ #
110
+ # @example
111
+ #
112
+ # # Create a client using the default configuration
113
+ # client = ::Google::Cloud::AIPlatform::V1::PersistentResourceService::Client.new
114
+ #
115
+ # # Create a client using a custom configuration
116
+ # client = ::Google::Cloud::AIPlatform::V1::PersistentResourceService::Client.new do |config|
117
+ # config.timeout = 10.0
118
+ # end
119
+ #
120
+ # @yield [config] Configure the PersistentResourceService client.
121
+ # @yieldparam config [Client::Configuration]
122
+ #
123
+ def initialize
124
+ # These require statements are intentionally placed here to initialize
125
+ # the gRPC module only when it's required.
126
+ # See https://github.com/googleapis/toolkit/issues/446
127
+ require "gapic/grpc"
128
+ require "google/cloud/aiplatform/v1/persistent_resource_service_services_pb"
129
+
130
+ # Create the configuration object
131
+ @config = Configuration.new Client.configure
132
+
133
+ # Yield the configuration if needed
134
+ yield @config if block_given?
135
+
136
+ # Create credentials
137
+ credentials = @config.credentials
138
+ # Use self-signed JWT if the endpoint is unchanged from default,
139
+ # but only if the default endpoint does not have a region prefix.
140
+ enable_self_signed_jwt = @config.endpoint.nil? ||
141
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
142
+ !@config.endpoint.split(".").first.include?("-"))
143
+ credentials ||= Credentials.default scope: @config.scope,
144
+ enable_self_signed_jwt: enable_self_signed_jwt
145
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
146
+ credentials = Credentials.new credentials, scope: @config.scope
147
+ end
148
+ @quota_project_id = @config.quota_project
149
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
150
+
151
+ @operations_client = Operations.new do |config|
152
+ config.credentials = credentials
153
+ config.quota_project = @quota_project_id
154
+ config.endpoint = @config.endpoint
155
+ config.universe_domain = @config.universe_domain
156
+ end
157
+
158
+ @persistent_resource_service_stub = ::Gapic::ServiceStub.new(
159
+ ::Google::Cloud::AIPlatform::V1::PersistentResourceService::Stub,
160
+ credentials: credentials,
161
+ endpoint: @config.endpoint,
162
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
163
+ universe_domain: @config.universe_domain,
164
+ channel_args: @config.channel_args,
165
+ interceptors: @config.interceptors,
166
+ channel_pool_config: @config.channel_pool
167
+ )
168
+
169
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
170
+ config.credentials = credentials
171
+ config.quota_project = @quota_project_id
172
+ config.endpoint = @persistent_resource_service_stub.endpoint
173
+ config.universe_domain = @persistent_resource_service_stub.universe_domain
174
+ end
175
+
176
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
177
+ config.credentials = credentials
178
+ config.quota_project = @quota_project_id
179
+ config.endpoint = @persistent_resource_service_stub.endpoint
180
+ config.universe_domain = @persistent_resource_service_stub.universe_domain
181
+ end
182
+ end
183
+
184
+ ##
185
+ # Get the associated client for long-running operations.
186
+ #
187
+ # @return [::Google::Cloud::AIPlatform::V1::PersistentResourceService::Operations]
188
+ #
189
+ attr_reader :operations_client
190
+
191
+ ##
192
+ # Get the associated client for mix-in of the Locations.
193
+ #
194
+ # @return [Google::Cloud::Location::Locations::Client]
195
+ #
196
+ attr_reader :location_client
197
+
198
+ ##
199
+ # Get the associated client for mix-in of the IAMPolicy.
200
+ #
201
+ # @return [Google::Iam::V1::IAMPolicy::Client]
202
+ #
203
+ attr_reader :iam_policy_client
204
+
205
+ # Service calls
206
+
207
+ ##
208
+ # Creates a PersistentResource.
209
+ #
210
+ # @overload create_persistent_resource(request, options = nil)
211
+ # Pass arguments to `create_persistent_resource` via a request object, either of type
212
+ # {::Google::Cloud::AIPlatform::V1::CreatePersistentResourceRequest} or an equivalent Hash.
213
+ #
214
+ # @param request [::Google::Cloud::AIPlatform::V1::CreatePersistentResourceRequest, ::Hash]
215
+ # A request object representing the call parameters. Required. To specify no
216
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
217
+ # @param options [::Gapic::CallOptions, ::Hash]
218
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
219
+ #
220
+ # @overload create_persistent_resource(parent: nil, persistent_resource: nil, persistent_resource_id: nil)
221
+ # Pass arguments to `create_persistent_resource` via keyword arguments. Note that at
222
+ # least one keyword argument is required. To specify no parameters, or to keep all
223
+ # the default parameter values, pass an empty Hash as a request object (see above).
224
+ #
225
+ # @param parent [::String]
226
+ # Required. The resource name of the Location to create the
227
+ # PersistentResource in. Format: `projects/{project}/locations/{location}`
228
+ # @param persistent_resource [::Google::Cloud::AIPlatform::V1::PersistentResource, ::Hash]
229
+ # Required. The PersistentResource to create.
230
+ # @param persistent_resource_id [::String]
231
+ # Required. The ID to use for the PersistentResource, which become the final
232
+ # component of the PersistentResource's resource name.
233
+ #
234
+ # The maximum length is 63 characters, and valid characters
235
+ # are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
236
+ #
237
+ # @yield [response, operation] Access the result along with the RPC operation
238
+ # @yieldparam response [::Gapic::Operation]
239
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
240
+ #
241
+ # @return [::Gapic::Operation]
242
+ #
243
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
244
+ #
245
+ # @example Basic example
246
+ # require "google/cloud/ai_platform/v1"
247
+ #
248
+ # # Create a client object. The client can be reused for multiple calls.
249
+ # client = Google::Cloud::AIPlatform::V1::PersistentResourceService::Client.new
250
+ #
251
+ # # Create a request. To set request fields, pass in keyword arguments.
252
+ # request = Google::Cloud::AIPlatform::V1::CreatePersistentResourceRequest.new
253
+ #
254
+ # # Call the create_persistent_resource method.
255
+ # result = client.create_persistent_resource request
256
+ #
257
+ # # The returned object is of type Gapic::Operation. You can use it to
258
+ # # check the status of an operation, cancel it, or wait for results.
259
+ # # Here is how to wait for a response.
260
+ # result.wait_until_done! timeout: 60
261
+ # if result.response?
262
+ # p result.response
263
+ # else
264
+ # puts "No response received."
265
+ # end
266
+ #
267
+ def create_persistent_resource request, options = nil
268
+ raise ::ArgumentError, "request must be provided" if request.nil?
269
+
270
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreatePersistentResourceRequest
271
+
272
+ # Converts hash and nil to an options object
273
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
274
+
275
+ # Customize the options with defaults
276
+ metadata = @config.rpcs.create_persistent_resource.metadata.to_h
277
+
278
+ # Set x-goog-api-client and x-goog-user-project headers
279
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
280
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
281
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
282
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
283
+
284
+ header_params = {}
285
+ if request.parent
286
+ header_params["parent"] = request.parent
287
+ end
288
+
289
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
290
+ metadata[:"x-goog-request-params"] ||= request_params_header
291
+
292
+ options.apply_defaults timeout: @config.rpcs.create_persistent_resource.timeout,
293
+ metadata: metadata,
294
+ retry_policy: @config.rpcs.create_persistent_resource.retry_policy
295
+
296
+ options.apply_defaults timeout: @config.timeout,
297
+ metadata: @config.metadata,
298
+ retry_policy: @config.retry_policy
299
+
300
+ @persistent_resource_service_stub.call_rpc :create_persistent_resource, request, options: options do |response, operation|
301
+ response = ::Gapic::Operation.new response, @operations_client, options: options
302
+ yield response, operation if block_given?
303
+ return response
304
+ end
305
+ rescue ::GRPC::BadStatus => e
306
+ raise ::Google::Cloud::Error.from_error(e)
307
+ end
308
+
309
+ ##
310
+ # Gets a PersistentResource.
311
+ #
312
+ # @overload get_persistent_resource(request, options = nil)
313
+ # Pass arguments to `get_persistent_resource` via a request object, either of type
314
+ # {::Google::Cloud::AIPlatform::V1::GetPersistentResourceRequest} or an equivalent Hash.
315
+ #
316
+ # @param request [::Google::Cloud::AIPlatform::V1::GetPersistentResourceRequest, ::Hash]
317
+ # A request object representing the call parameters. Required. To specify no
318
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
319
+ # @param options [::Gapic::CallOptions, ::Hash]
320
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
321
+ #
322
+ # @overload get_persistent_resource(name: nil)
323
+ # Pass arguments to `get_persistent_resource` via keyword arguments. Note that at
324
+ # least one keyword argument is required. To specify no parameters, or to keep all
325
+ # the default parameter values, pass an empty Hash as a request object (see above).
326
+ #
327
+ # @param name [::String]
328
+ # Required. The name of the PersistentResource resource.
329
+ # Format:
330
+ # `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
331
+ #
332
+ # @yield [response, operation] Access the result along with the RPC operation
333
+ # @yieldparam response [::Google::Cloud::AIPlatform::V1::PersistentResource]
334
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
335
+ #
336
+ # @return [::Google::Cloud::AIPlatform::V1::PersistentResource]
337
+ #
338
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
339
+ #
340
+ # @example Basic example
341
+ # require "google/cloud/ai_platform/v1"
342
+ #
343
+ # # Create a client object. The client can be reused for multiple calls.
344
+ # client = Google::Cloud::AIPlatform::V1::PersistentResourceService::Client.new
345
+ #
346
+ # # Create a request. To set request fields, pass in keyword arguments.
347
+ # request = Google::Cloud::AIPlatform::V1::GetPersistentResourceRequest.new
348
+ #
349
+ # # Call the get_persistent_resource method.
350
+ # result = client.get_persistent_resource request
351
+ #
352
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::PersistentResource.
353
+ # p result
354
+ #
355
+ def get_persistent_resource request, options = nil
356
+ raise ::ArgumentError, "request must be provided" if request.nil?
357
+
358
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetPersistentResourceRequest
359
+
360
+ # Converts hash and nil to an options object
361
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
362
+
363
+ # Customize the options with defaults
364
+ metadata = @config.rpcs.get_persistent_resource.metadata.to_h
365
+
366
+ # Set x-goog-api-client and x-goog-user-project headers
367
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
368
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
369
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
370
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
371
+
372
+ header_params = {}
373
+ if request.name
374
+ header_params["name"] = request.name
375
+ end
376
+
377
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
378
+ metadata[:"x-goog-request-params"] ||= request_params_header
379
+
380
+ options.apply_defaults timeout: @config.rpcs.get_persistent_resource.timeout,
381
+ metadata: metadata,
382
+ retry_policy: @config.rpcs.get_persistent_resource.retry_policy
383
+
384
+ options.apply_defaults timeout: @config.timeout,
385
+ metadata: @config.metadata,
386
+ retry_policy: @config.retry_policy
387
+
388
+ @persistent_resource_service_stub.call_rpc :get_persistent_resource, request, options: options do |response, operation|
389
+ yield response, operation if block_given?
390
+ return response
391
+ end
392
+ rescue ::GRPC::BadStatus => e
393
+ raise ::Google::Cloud::Error.from_error(e)
394
+ end
395
+
396
+ ##
397
+ # Lists PersistentResources in a Location.
398
+ #
399
+ # @overload list_persistent_resources(request, options = nil)
400
+ # Pass arguments to `list_persistent_resources` via a request object, either of type
401
+ # {::Google::Cloud::AIPlatform::V1::ListPersistentResourcesRequest} or an equivalent Hash.
402
+ #
403
+ # @param request [::Google::Cloud::AIPlatform::V1::ListPersistentResourcesRequest, ::Hash]
404
+ # A request object representing the call parameters. Required. To specify no
405
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
406
+ # @param options [::Gapic::CallOptions, ::Hash]
407
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
408
+ #
409
+ # @overload list_persistent_resources(parent: nil, page_size: nil, page_token: nil)
410
+ # Pass arguments to `list_persistent_resources` via keyword arguments. Note that at
411
+ # least one keyword argument is required. To specify no parameters, or to keep all
412
+ # the default parameter values, pass an empty Hash as a request object (see above).
413
+ #
414
+ # @param parent [::String]
415
+ # Required. The resource name of the Location to list the PersistentResources
416
+ # from. Format: `projects/{project}/locations/{location}`
417
+ # @param page_size [::Integer]
418
+ # Optional. The standard list page size.
419
+ # @param page_token [::String]
420
+ # Optional. The standard list page token.
421
+ # Typically obtained via
422
+ # [ListPersistentResourceResponse.next_page_token][] of the previous
423
+ # [PersistentResourceService.ListPersistentResource][] call.
424
+ #
425
+ # @yield [response, operation] Access the result along with the RPC operation
426
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::PersistentResource>]
427
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
428
+ #
429
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::PersistentResource>]
430
+ #
431
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
432
+ #
433
+ # @example Basic example
434
+ # require "google/cloud/ai_platform/v1"
435
+ #
436
+ # # Create a client object. The client can be reused for multiple calls.
437
+ # client = Google::Cloud::AIPlatform::V1::PersistentResourceService::Client.new
438
+ #
439
+ # # Create a request. To set request fields, pass in keyword arguments.
440
+ # request = Google::Cloud::AIPlatform::V1::ListPersistentResourcesRequest.new
441
+ #
442
+ # # Call the list_persistent_resources method.
443
+ # result = client.list_persistent_resources request
444
+ #
445
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
446
+ # # over elements, and API calls will be issued to fetch pages as needed.
447
+ # result.each do |item|
448
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::PersistentResource.
449
+ # p item
450
+ # end
451
+ #
452
+ def list_persistent_resources request, options = nil
453
+ raise ::ArgumentError, "request must be provided" if request.nil?
454
+
455
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListPersistentResourcesRequest
456
+
457
+ # Converts hash and nil to an options object
458
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
459
+
460
+ # Customize the options with defaults
461
+ metadata = @config.rpcs.list_persistent_resources.metadata.to_h
462
+
463
+ # Set x-goog-api-client and x-goog-user-project headers
464
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
465
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
466
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
467
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
468
+
469
+ header_params = {}
470
+ if request.parent
471
+ header_params["parent"] = request.parent
472
+ end
473
+
474
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
475
+ metadata[:"x-goog-request-params"] ||= request_params_header
476
+
477
+ options.apply_defaults timeout: @config.rpcs.list_persistent_resources.timeout,
478
+ metadata: metadata,
479
+ retry_policy: @config.rpcs.list_persistent_resources.retry_policy
480
+
481
+ options.apply_defaults timeout: @config.timeout,
482
+ metadata: @config.metadata,
483
+ retry_policy: @config.retry_policy
484
+
485
+ @persistent_resource_service_stub.call_rpc :list_persistent_resources, request, options: options do |response, operation|
486
+ response = ::Gapic::PagedEnumerable.new @persistent_resource_service_stub, :list_persistent_resources, request, response, operation, options
487
+ yield response, operation if block_given?
488
+ return response
489
+ end
490
+ rescue ::GRPC::BadStatus => e
491
+ raise ::Google::Cloud::Error.from_error(e)
492
+ end
493
+
494
+ ##
495
+ # Deletes a PersistentResource.
496
+ #
497
+ # @overload delete_persistent_resource(request, options = nil)
498
+ # Pass arguments to `delete_persistent_resource` via a request object, either of type
499
+ # {::Google::Cloud::AIPlatform::V1::DeletePersistentResourceRequest} or an equivalent Hash.
500
+ #
501
+ # @param request [::Google::Cloud::AIPlatform::V1::DeletePersistentResourceRequest, ::Hash]
502
+ # A request object representing the call parameters. Required. To specify no
503
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
504
+ # @param options [::Gapic::CallOptions, ::Hash]
505
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
506
+ #
507
+ # @overload delete_persistent_resource(name: nil)
508
+ # Pass arguments to `delete_persistent_resource` via keyword arguments. Note that at
509
+ # least one keyword argument is required. To specify no parameters, or to keep all
510
+ # the default parameter values, pass an empty Hash as a request object (see above).
511
+ #
512
+ # @param name [::String]
513
+ # Required. The name of the PersistentResource to be deleted.
514
+ # Format:
515
+ # `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
516
+ #
517
+ # @yield [response, operation] Access the result along with the RPC operation
518
+ # @yieldparam response [::Gapic::Operation]
519
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
520
+ #
521
+ # @return [::Gapic::Operation]
522
+ #
523
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
524
+ #
525
+ # @example Basic example
526
+ # require "google/cloud/ai_platform/v1"
527
+ #
528
+ # # Create a client object. The client can be reused for multiple calls.
529
+ # client = Google::Cloud::AIPlatform::V1::PersistentResourceService::Client.new
530
+ #
531
+ # # Create a request. To set request fields, pass in keyword arguments.
532
+ # request = Google::Cloud::AIPlatform::V1::DeletePersistentResourceRequest.new
533
+ #
534
+ # # Call the delete_persistent_resource method.
535
+ # result = client.delete_persistent_resource request
536
+ #
537
+ # # The returned object is of type Gapic::Operation. You can use it to
538
+ # # check the status of an operation, cancel it, or wait for results.
539
+ # # Here is how to wait for a response.
540
+ # result.wait_until_done! timeout: 60
541
+ # if result.response?
542
+ # p result.response
543
+ # else
544
+ # puts "No response received."
545
+ # end
546
+ #
547
+ def delete_persistent_resource request, options = nil
548
+ raise ::ArgumentError, "request must be provided" if request.nil?
549
+
550
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeletePersistentResourceRequest
551
+
552
+ # Converts hash and nil to an options object
553
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
554
+
555
+ # Customize the options with defaults
556
+ metadata = @config.rpcs.delete_persistent_resource.metadata.to_h
557
+
558
+ # Set x-goog-api-client and x-goog-user-project headers
559
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
560
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
561
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
562
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
563
+
564
+ header_params = {}
565
+ if request.name
566
+ header_params["name"] = request.name
567
+ end
568
+
569
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
570
+ metadata[:"x-goog-request-params"] ||= request_params_header
571
+
572
+ options.apply_defaults timeout: @config.rpcs.delete_persistent_resource.timeout,
573
+ metadata: metadata,
574
+ retry_policy: @config.rpcs.delete_persistent_resource.retry_policy
575
+
576
+ options.apply_defaults timeout: @config.timeout,
577
+ metadata: @config.metadata,
578
+ retry_policy: @config.retry_policy
579
+
580
+ @persistent_resource_service_stub.call_rpc :delete_persistent_resource, request, options: options do |response, operation|
581
+ response = ::Gapic::Operation.new response, @operations_client, options: options
582
+ yield response, operation if block_given?
583
+ return response
584
+ end
585
+ rescue ::GRPC::BadStatus => e
586
+ raise ::Google::Cloud::Error.from_error(e)
587
+ end
588
+
589
+ ##
590
+ # Updates a PersistentResource.
591
+ #
592
+ # @overload update_persistent_resource(request, options = nil)
593
+ # Pass arguments to `update_persistent_resource` via a request object, either of type
594
+ # {::Google::Cloud::AIPlatform::V1::UpdatePersistentResourceRequest} or an equivalent Hash.
595
+ #
596
+ # @param request [::Google::Cloud::AIPlatform::V1::UpdatePersistentResourceRequest, ::Hash]
597
+ # A request object representing the call parameters. Required. To specify no
598
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
599
+ # @param options [::Gapic::CallOptions, ::Hash]
600
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
601
+ #
602
+ # @overload update_persistent_resource(persistent_resource: nil, update_mask: nil)
603
+ # Pass arguments to `update_persistent_resource` via keyword arguments. Note that at
604
+ # least one keyword argument is required. To specify no parameters, or to keep all
605
+ # the default parameter values, pass an empty Hash as a request object (see above).
606
+ #
607
+ # @param persistent_resource [::Google::Cloud::AIPlatform::V1::PersistentResource, ::Hash]
608
+ # Required. The PersistentResource to update.
609
+ #
610
+ # The PersistentResource's `name` field is used to identify the
611
+ # PersistentResource to update. Format:
612
+ # `projects/{project}/locations/{location}/persistentResources/{persistent_resource}`
613
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
614
+ # Required. Specify the fields to be overwritten in the PersistentResource by
615
+ # the update method.
616
+ #
617
+ # @yield [response, operation] Access the result along with the RPC operation
618
+ # @yieldparam response [::Gapic::Operation]
619
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
620
+ #
621
+ # @return [::Gapic::Operation]
622
+ #
623
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
624
+ #
625
+ # @example Basic example
626
+ # require "google/cloud/ai_platform/v1"
627
+ #
628
+ # # Create a client object. The client can be reused for multiple calls.
629
+ # client = Google::Cloud::AIPlatform::V1::PersistentResourceService::Client.new
630
+ #
631
+ # # Create a request. To set request fields, pass in keyword arguments.
632
+ # request = Google::Cloud::AIPlatform::V1::UpdatePersistentResourceRequest.new
633
+ #
634
+ # # Call the update_persistent_resource method.
635
+ # result = client.update_persistent_resource request
636
+ #
637
+ # # The returned object is of type Gapic::Operation. You can use it to
638
+ # # check the status of an operation, cancel it, or wait for results.
639
+ # # Here is how to wait for a response.
640
+ # result.wait_until_done! timeout: 60
641
+ # if result.response?
642
+ # p result.response
643
+ # else
644
+ # puts "No response received."
645
+ # end
646
+ #
647
+ def update_persistent_resource request, options = nil
648
+ raise ::ArgumentError, "request must be provided" if request.nil?
649
+
650
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdatePersistentResourceRequest
651
+
652
+ # Converts hash and nil to an options object
653
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
654
+
655
+ # Customize the options with defaults
656
+ metadata = @config.rpcs.update_persistent_resource.metadata.to_h
657
+
658
+ # Set x-goog-api-client and x-goog-user-project headers
659
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
660
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
661
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
662
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
663
+
664
+ header_params = {}
665
+ if request.persistent_resource&.name
666
+ header_params["persistent_resource.name"] = request.persistent_resource.name
667
+ end
668
+
669
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
670
+ metadata[:"x-goog-request-params"] ||= request_params_header
671
+
672
+ options.apply_defaults timeout: @config.rpcs.update_persistent_resource.timeout,
673
+ metadata: metadata,
674
+ retry_policy: @config.rpcs.update_persistent_resource.retry_policy
675
+
676
+ options.apply_defaults timeout: @config.timeout,
677
+ metadata: @config.metadata,
678
+ retry_policy: @config.retry_policy
679
+
680
+ @persistent_resource_service_stub.call_rpc :update_persistent_resource, request, options: options do |response, operation|
681
+ response = ::Gapic::Operation.new response, @operations_client, options: options
682
+ yield response, operation if block_given?
683
+ return response
684
+ end
685
+ rescue ::GRPC::BadStatus => e
686
+ raise ::Google::Cloud::Error.from_error(e)
687
+ end
688
+
689
+ ##
690
+ # Reboots a PersistentResource.
691
+ #
692
+ # @overload reboot_persistent_resource(request, options = nil)
693
+ # Pass arguments to `reboot_persistent_resource` via a request object, either of type
694
+ # {::Google::Cloud::AIPlatform::V1::RebootPersistentResourceRequest} or an equivalent Hash.
695
+ #
696
+ # @param request [::Google::Cloud::AIPlatform::V1::RebootPersistentResourceRequest, ::Hash]
697
+ # A request object representing the call parameters. Required. To specify no
698
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
699
+ # @param options [::Gapic::CallOptions, ::Hash]
700
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
701
+ #
702
+ # @overload reboot_persistent_resource(name: nil)
703
+ # Pass arguments to `reboot_persistent_resource` via keyword arguments. Note that at
704
+ # least one keyword argument is required. To specify no parameters, or to keep all
705
+ # the default parameter values, pass an empty Hash as a request object (see above).
706
+ #
707
+ # @param name [::String]
708
+ # Required. The name of the PersistentResource resource.
709
+ # Format:
710
+ # `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`
711
+ #
712
+ # @yield [response, operation] Access the result along with the RPC operation
713
+ # @yieldparam response [::Gapic::Operation]
714
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
715
+ #
716
+ # @return [::Gapic::Operation]
717
+ #
718
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
719
+ #
720
+ # @example Basic example
721
+ # require "google/cloud/ai_platform/v1"
722
+ #
723
+ # # Create a client object. The client can be reused for multiple calls.
724
+ # client = Google::Cloud::AIPlatform::V1::PersistentResourceService::Client.new
725
+ #
726
+ # # Create a request. To set request fields, pass in keyword arguments.
727
+ # request = Google::Cloud::AIPlatform::V1::RebootPersistentResourceRequest.new
728
+ #
729
+ # # Call the reboot_persistent_resource method.
730
+ # result = client.reboot_persistent_resource request
731
+ #
732
+ # # The returned object is of type Gapic::Operation. You can use it to
733
+ # # check the status of an operation, cancel it, or wait for results.
734
+ # # Here is how to wait for a response.
735
+ # result.wait_until_done! timeout: 60
736
+ # if result.response?
737
+ # p result.response
738
+ # else
739
+ # puts "No response received."
740
+ # end
741
+ #
742
+ def reboot_persistent_resource request, options = nil
743
+ raise ::ArgumentError, "request must be provided" if request.nil?
744
+
745
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::RebootPersistentResourceRequest
746
+
747
+ # Converts hash and nil to an options object
748
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
749
+
750
+ # Customize the options with defaults
751
+ metadata = @config.rpcs.reboot_persistent_resource.metadata.to_h
752
+
753
+ # Set x-goog-api-client and x-goog-user-project headers
754
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
755
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
756
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
757
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
758
+
759
+ header_params = {}
760
+ if request.name
761
+ header_params["name"] = request.name
762
+ end
763
+
764
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
765
+ metadata[:"x-goog-request-params"] ||= request_params_header
766
+
767
+ options.apply_defaults timeout: @config.rpcs.reboot_persistent_resource.timeout,
768
+ metadata: metadata,
769
+ retry_policy: @config.rpcs.reboot_persistent_resource.retry_policy
770
+
771
+ options.apply_defaults timeout: @config.timeout,
772
+ metadata: @config.metadata,
773
+ retry_policy: @config.retry_policy
774
+
775
+ @persistent_resource_service_stub.call_rpc :reboot_persistent_resource, request, options: options do |response, operation|
776
+ response = ::Gapic::Operation.new response, @operations_client, options: options
777
+ yield response, operation if block_given?
778
+ return response
779
+ end
780
+ rescue ::GRPC::BadStatus => e
781
+ raise ::Google::Cloud::Error.from_error(e)
782
+ end
783
+
784
+ ##
785
+ # Configuration class for the PersistentResourceService API.
786
+ #
787
+ # This class represents the configuration for PersistentResourceService,
788
+ # providing control over timeouts, retry behavior, logging, transport
789
+ # parameters, and other low-level controls. Certain parameters can also be
790
+ # applied individually to specific RPCs. See
791
+ # {::Google::Cloud::AIPlatform::V1::PersistentResourceService::Client::Configuration::Rpcs}
792
+ # for a list of RPCs that can be configured independently.
793
+ #
794
+ # Configuration can be applied globally to all clients, or to a single client
795
+ # on construction.
796
+ #
797
+ # @example
798
+ #
799
+ # # Modify the global config, setting the timeout for
800
+ # # create_persistent_resource to 20 seconds,
801
+ # # and all remaining timeouts to 10 seconds.
802
+ # ::Google::Cloud::AIPlatform::V1::PersistentResourceService::Client.configure do |config|
803
+ # config.timeout = 10.0
804
+ # config.rpcs.create_persistent_resource.timeout = 20.0
805
+ # end
806
+ #
807
+ # # Apply the above configuration only to a new client.
808
+ # client = ::Google::Cloud::AIPlatform::V1::PersistentResourceService::Client.new do |config|
809
+ # config.timeout = 10.0
810
+ # config.rpcs.create_persistent_resource.timeout = 20.0
811
+ # end
812
+ #
813
+ # @!attribute [rw] endpoint
814
+ # A custom service endpoint, as a hostname or hostname:port. The default is
815
+ # nil, indicating to use the default endpoint in the current universe domain.
816
+ # @return [::String,nil]
817
+ # @!attribute [rw] credentials
818
+ # Credentials to send with calls. You may provide any of the following types:
819
+ # * (`String`) The path to a service account key file in JSON format
820
+ # * (`Hash`) A service account key as a Hash
821
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
822
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
823
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
824
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
825
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
826
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
827
+ # * (`nil`) indicating no credentials
828
+ # @return [::Object]
829
+ # @!attribute [rw] scope
830
+ # The OAuth scopes
831
+ # @return [::Array<::String>]
832
+ # @!attribute [rw] lib_name
833
+ # The library name as recorded in instrumentation and logging
834
+ # @return [::String]
835
+ # @!attribute [rw] lib_version
836
+ # The library version as recorded in instrumentation and logging
837
+ # @return [::String]
838
+ # @!attribute [rw] channel_args
839
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
840
+ # `GRPC::Core::Channel` object is provided as the credential.
841
+ # @return [::Hash]
842
+ # @!attribute [rw] interceptors
843
+ # An array of interceptors that are run before calls are executed.
844
+ # @return [::Array<::GRPC::ClientInterceptor>]
845
+ # @!attribute [rw] timeout
846
+ # The call timeout in seconds.
847
+ # @return [::Numeric]
848
+ # @!attribute [rw] metadata
849
+ # Additional gRPC headers to be sent with the call.
850
+ # @return [::Hash{::Symbol=>::String}]
851
+ # @!attribute [rw] retry_policy
852
+ # The retry policy. The value is a hash with the following keys:
853
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
854
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
855
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
856
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
857
+ # trigger a retry.
858
+ # @return [::Hash]
859
+ # @!attribute [rw] quota_project
860
+ # A separate project against which to charge quota.
861
+ # @return [::String]
862
+ # @!attribute [rw] universe_domain
863
+ # The universe domain within which to make requests. This determines the
864
+ # default endpoint URL. The default value of nil uses the environment
865
+ # universe (usually the default "googleapis.com" universe).
866
+ # @return [::String,nil]
867
+ #
868
+ class Configuration
869
+ extend ::Gapic::Config
870
+
871
+ # @private
872
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
873
+ DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
874
+
875
+ config_attr :endpoint, nil, ::String, nil
876
+ config_attr :credentials, nil do |value|
877
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
878
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
879
+ allowed.any? { |klass| klass === value }
880
+ end
881
+ config_attr :scope, nil, ::String, ::Array, nil
882
+ config_attr :lib_name, nil, ::String, nil
883
+ config_attr :lib_version, nil, ::String, nil
884
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
885
+ config_attr :interceptors, nil, ::Array, nil
886
+ config_attr :timeout, nil, ::Numeric, nil
887
+ config_attr :metadata, nil, ::Hash, nil
888
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
889
+ config_attr :quota_project, nil, ::String, nil
890
+ config_attr :universe_domain, nil, ::String, nil
891
+
892
+ # @private
893
+ def initialize parent_config = nil
894
+ @parent_config = parent_config unless parent_config.nil?
895
+
896
+ yield self if block_given?
897
+ end
898
+
899
+ ##
900
+ # Configurations for individual RPCs
901
+ # @return [Rpcs]
902
+ #
903
+ def rpcs
904
+ @rpcs ||= begin
905
+ parent_rpcs = nil
906
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
907
+ Rpcs.new parent_rpcs
908
+ end
909
+ end
910
+
911
+ ##
912
+ # Configuration for the channel pool
913
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
914
+ #
915
+ def channel_pool
916
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
917
+ end
918
+
919
+ ##
920
+ # Configuration RPC class for the PersistentResourceService API.
921
+ #
922
+ # Includes fields providing the configuration for each RPC in this service.
923
+ # Each configuration object is of type `Gapic::Config::Method` and includes
924
+ # the following configuration fields:
925
+ #
926
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
927
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
928
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
929
+ # include the following keys:
930
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
931
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
932
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
933
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
934
+ # trigger a retry.
935
+ #
936
+ class Rpcs
937
+ ##
938
+ # RPC-specific configuration for `create_persistent_resource`
939
+ # @return [::Gapic::Config::Method]
940
+ #
941
+ attr_reader :create_persistent_resource
942
+ ##
943
+ # RPC-specific configuration for `get_persistent_resource`
944
+ # @return [::Gapic::Config::Method]
945
+ #
946
+ attr_reader :get_persistent_resource
947
+ ##
948
+ # RPC-specific configuration for `list_persistent_resources`
949
+ # @return [::Gapic::Config::Method]
950
+ #
951
+ attr_reader :list_persistent_resources
952
+ ##
953
+ # RPC-specific configuration for `delete_persistent_resource`
954
+ # @return [::Gapic::Config::Method]
955
+ #
956
+ attr_reader :delete_persistent_resource
957
+ ##
958
+ # RPC-specific configuration for `update_persistent_resource`
959
+ # @return [::Gapic::Config::Method]
960
+ #
961
+ attr_reader :update_persistent_resource
962
+ ##
963
+ # RPC-specific configuration for `reboot_persistent_resource`
964
+ # @return [::Gapic::Config::Method]
965
+ #
966
+ attr_reader :reboot_persistent_resource
967
+
968
+ # @private
969
+ def initialize parent_rpcs = nil
970
+ create_persistent_resource_config = parent_rpcs.create_persistent_resource if parent_rpcs.respond_to? :create_persistent_resource
971
+ @create_persistent_resource = ::Gapic::Config::Method.new create_persistent_resource_config
972
+ get_persistent_resource_config = parent_rpcs.get_persistent_resource if parent_rpcs.respond_to? :get_persistent_resource
973
+ @get_persistent_resource = ::Gapic::Config::Method.new get_persistent_resource_config
974
+ list_persistent_resources_config = parent_rpcs.list_persistent_resources if parent_rpcs.respond_to? :list_persistent_resources
975
+ @list_persistent_resources = ::Gapic::Config::Method.new list_persistent_resources_config
976
+ delete_persistent_resource_config = parent_rpcs.delete_persistent_resource if parent_rpcs.respond_to? :delete_persistent_resource
977
+ @delete_persistent_resource = ::Gapic::Config::Method.new delete_persistent_resource_config
978
+ update_persistent_resource_config = parent_rpcs.update_persistent_resource if parent_rpcs.respond_to? :update_persistent_resource
979
+ @update_persistent_resource = ::Gapic::Config::Method.new update_persistent_resource_config
980
+ reboot_persistent_resource_config = parent_rpcs.reboot_persistent_resource if parent_rpcs.respond_to? :reboot_persistent_resource
981
+ @reboot_persistent_resource = ::Gapic::Config::Method.new reboot_persistent_resource_config
982
+
983
+ yield self if block_given?
984
+ end
985
+ end
986
+ end
987
+ end
988
+ end
989
+ end
990
+ end
991
+ end
992
+ end