google-cloud-parallelstore-v1beta 0.a → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/parallelstore/v1beta/bindings_override.rb +102 -0
  6. data/lib/google/cloud/parallelstore/v1beta/parallelstore/client.rb +1182 -0
  7. data/lib/google/cloud/parallelstore/v1beta/parallelstore/credentials.rb +47 -0
  8. data/lib/google/cloud/parallelstore/v1beta/parallelstore/operations.rb +809 -0
  9. data/lib/google/cloud/parallelstore/v1beta/parallelstore/paths.rb +105 -0
  10. data/lib/google/cloud/parallelstore/v1beta/parallelstore/rest/client.rb +1114 -0
  11. data/lib/google/cloud/parallelstore/v1beta/parallelstore/rest/operations.rb +902 -0
  12. data/lib/google/cloud/parallelstore/v1beta/parallelstore/rest/service_stub.rb +486 -0
  13. data/lib/google/cloud/parallelstore/v1beta/parallelstore/rest.rb +68 -0
  14. data/lib/google/cloud/parallelstore/v1beta/parallelstore.rb +70 -0
  15. data/lib/google/cloud/parallelstore/v1beta/parallelstore_pb.rb +75 -0
  16. data/lib/google/cloud/parallelstore/v1beta/parallelstore_services_pb.rb +71 -0
  17. data/lib/google/cloud/parallelstore/v1beta/rest.rb +38 -0
  18. data/lib/google/cloud/parallelstore/v1beta/version.rb +7 -2
  19. data/lib/google/cloud/parallelstore/v1beta.rb +45 -0
  20. data/lib/google-cloud-parallelstore-v1beta.rb +21 -0
  21. data/proto_docs/README.md +4 -0
  22. data/proto_docs/google/api/client.rb +399 -0
  23. data/proto_docs/google/api/field_behavior.rb +85 -0
  24. data/proto_docs/google/api/field_info.rb +65 -0
  25. data/proto_docs/google/api/launch_stage.rb +71 -0
  26. data/proto_docs/google/api/resource.rb +222 -0
  27. data/proto_docs/google/cloud/parallelstore/v1beta/parallelstore.rb +552 -0
  28. data/proto_docs/google/longrunning/operations.rb +164 -0
  29. data/proto_docs/google/protobuf/any.rb +145 -0
  30. data/proto_docs/google/protobuf/duration.rb +98 -0
  31. data/proto_docs/google/protobuf/empty.rb +34 -0
  32. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  33. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  34. data/proto_docs/google/rpc/status.rb +48 -0
  35. metadata +95 -11
@@ -0,0 +1,1114 @@
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/parallelstore/v1beta/parallelstore_pb"
21
+ require "google/cloud/parallelstore/v1beta/parallelstore/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Parallelstore
27
+ module V1beta
28
+ module Parallelstore
29
+ module Rest
30
+ ##
31
+ # REST client for the Parallelstore service.
32
+ #
33
+ # Service describing handlers for resources
34
+ # Configures and manages parallelstore resources.
35
+ #
36
+ # Parallelstore service.
37
+ #
38
+ # The `parallelstore.googleapis.com` service implements the parallelstore API
39
+ # and defines the following resource model for managing instances:
40
+ # * The service works with a collection of cloud projects, named: `/projects/*`
41
+ # * Each project has a collection of available locations, named: `/locations/*`
42
+ # * Each location has a collection of instances named `/instances/*`.
43
+ # * Parallelstore instances are resources of the form:
44
+ # `/projects/{project_id}/locations/{location_id}/instances/{instance_id}`
45
+ #
46
+ # Note that location_id must be a Google Cloud `zone`; for example:
47
+ # * `projects/12345/locations/us-central1-c/instances/my-parallelstore-share`
48
+ #
49
+ class Client
50
+ # @private
51
+ API_VERSION = ""
52
+
53
+ # @private
54
+ DEFAULT_ENDPOINT_TEMPLATE = "parallelstore.$UNIVERSE_DOMAIN$"
55
+
56
+ include Paths
57
+
58
+ # @private
59
+ attr_reader :parallelstore_stub
60
+
61
+ ##
62
+ # Configure the Parallelstore Client class.
63
+ #
64
+ # See {::Google::Cloud::Parallelstore::V1beta::Parallelstore::Rest::Client::Configuration}
65
+ # for a description of the configuration fields.
66
+ #
67
+ # @example
68
+ #
69
+ # # Modify the configuration for all Parallelstore clients
70
+ # ::Google::Cloud::Parallelstore::V1beta::Parallelstore::Rest::Client.configure do |config|
71
+ # config.timeout = 10.0
72
+ # end
73
+ #
74
+ # @yield [config] Configure the Client client.
75
+ # @yieldparam config [Client::Configuration]
76
+ #
77
+ # @return [Client::Configuration]
78
+ #
79
+ def self.configure
80
+ @configure ||= begin
81
+ namespace = ["Google", "Cloud", "Parallelstore", "V1beta"]
82
+ parent_config = while namespace.any?
83
+ parent_name = namespace.join "::"
84
+ parent_const = const_get parent_name
85
+ break parent_const.configure if parent_const.respond_to? :configure
86
+ namespace.pop
87
+ end
88
+ default_config = Client::Configuration.new parent_config
89
+
90
+ default_config
91
+ end
92
+ yield @configure if block_given?
93
+ @configure
94
+ end
95
+
96
+ ##
97
+ # Configure the Parallelstore Client instance.
98
+ #
99
+ # The configuration is set to the derived mode, meaning that values can be changed,
100
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
101
+ # should be made on {Client.configure}.
102
+ #
103
+ # See {::Google::Cloud::Parallelstore::V1beta::Parallelstore::Rest::Client::Configuration}
104
+ # for a description of the configuration fields.
105
+ #
106
+ # @yield [config] Configure the Client client.
107
+ # @yieldparam config [Client::Configuration]
108
+ #
109
+ # @return [Client::Configuration]
110
+ #
111
+ def configure
112
+ yield @config if block_given?
113
+ @config
114
+ end
115
+
116
+ ##
117
+ # The effective universe domain
118
+ #
119
+ # @return [String]
120
+ #
121
+ def universe_domain
122
+ @parallelstore_stub.universe_domain
123
+ end
124
+
125
+ ##
126
+ # Create a new Parallelstore REST client object.
127
+ #
128
+ # @example
129
+ #
130
+ # # Create a client using the default configuration
131
+ # client = ::Google::Cloud::Parallelstore::V1beta::Parallelstore::Rest::Client.new
132
+ #
133
+ # # Create a client using a custom configuration
134
+ # client = ::Google::Cloud::Parallelstore::V1beta::Parallelstore::Rest::Client.new do |config|
135
+ # config.timeout = 10.0
136
+ # end
137
+ #
138
+ # @yield [config] Configure the Parallelstore client.
139
+ # @yieldparam config [Client::Configuration]
140
+ #
141
+ def initialize
142
+ # Create the configuration object
143
+ @config = Configuration.new Client.configure
144
+
145
+ # Yield the configuration if needed
146
+ yield @config if block_given?
147
+
148
+ # Create credentials
149
+ credentials = @config.credentials
150
+ # Use self-signed JWT if the endpoint is unchanged from default,
151
+ # but only if the default endpoint does not have a region prefix.
152
+ enable_self_signed_jwt = @config.endpoint.nil? ||
153
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
154
+ !@config.endpoint.split(".").first.include?("-"))
155
+ credentials ||= Credentials.default scope: @config.scope,
156
+ enable_self_signed_jwt: enable_self_signed_jwt
157
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
158
+ credentials = Credentials.new credentials, scope: @config.scope
159
+ end
160
+
161
+ @quota_project_id = @config.quota_project
162
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
163
+
164
+ @operations_client = ::Google::Cloud::Parallelstore::V1beta::Parallelstore::Rest::Operations.new do |config|
165
+ config.credentials = credentials
166
+ config.quota_project = @quota_project_id
167
+ config.endpoint = @config.endpoint
168
+ config.universe_domain = @config.universe_domain
169
+ end
170
+
171
+ @parallelstore_stub = ::Google::Cloud::Parallelstore::V1beta::Parallelstore::Rest::ServiceStub.new(
172
+ endpoint: @config.endpoint,
173
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
174
+ universe_domain: @config.universe_domain,
175
+ credentials: credentials
176
+ )
177
+
178
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
179
+ config.credentials = credentials
180
+ config.quota_project = @quota_project_id
181
+ config.endpoint = @parallelstore_stub.endpoint
182
+ config.universe_domain = @parallelstore_stub.universe_domain
183
+ config.bindings_override = @config.bindings_override
184
+ end
185
+ end
186
+
187
+ ##
188
+ # Get the associated client for long-running operations.
189
+ #
190
+ # @return [::Google::Cloud::Parallelstore::V1beta::Parallelstore::Rest::Operations]
191
+ #
192
+ attr_reader :operations_client
193
+
194
+ ##
195
+ # Get the associated client for mix-in of the Locations.
196
+ #
197
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
198
+ #
199
+ attr_reader :location_client
200
+
201
+ # Service calls
202
+
203
+ ##
204
+ # Lists Instances in a given project and location.
205
+ #
206
+ # @overload list_instances(request, options = nil)
207
+ # Pass arguments to `list_instances` via a request object, either of type
208
+ # {::Google::Cloud::Parallelstore::V1beta::ListInstancesRequest} or an equivalent Hash.
209
+ #
210
+ # @param request [::Google::Cloud::Parallelstore::V1beta::ListInstancesRequest, ::Hash]
211
+ # A request object representing the call parameters. Required. To specify no
212
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
213
+ # @param options [::Gapic::CallOptions, ::Hash]
214
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
215
+ #
216
+ # @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
217
+ # Pass arguments to `list_instances` via keyword arguments. Note that at
218
+ # least one keyword argument is required. To specify no parameters, or to keep all
219
+ # the default parameter values, pass an empty Hash as a request object (see above).
220
+ #
221
+ # @param parent [::String]
222
+ # Required. The project and location for which to retrieve instance
223
+ # information, in the format `projects/{project_id}/locations/{location}`.
224
+ # For Parallelstore locations map to Google Cloud zones, for example
225
+ # **us-central1-a**.
226
+ # To retrieve instance information for all locations, use "-" for the
227
+ # `{location}` value.
228
+ # @param page_size [::Integer]
229
+ # Optional. Requested page size. Server may return fewer items than
230
+ # requested. If unspecified, server will pick an appropriate default.
231
+ # @param page_token [::String]
232
+ # Optional. A token identifying a page of results the server should return.
233
+ # @param filter [::String]
234
+ # Optional. Filtering results
235
+ # @param order_by [::String]
236
+ # Optional. Hint for how to order the results
237
+ # @yield [result, operation] Access the result along with the TransportOperation object
238
+ # @yieldparam result [::Google::Cloud::Parallelstore::V1beta::ListInstancesResponse]
239
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
240
+ #
241
+ # @return [::Google::Cloud::Parallelstore::V1beta::ListInstancesResponse]
242
+ #
243
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
244
+ #
245
+ # @example Basic example
246
+ # require "google/cloud/parallelstore/v1beta"
247
+ #
248
+ # # Create a client object. The client can be reused for multiple calls.
249
+ # client = Google::Cloud::Parallelstore::V1beta::Parallelstore::Rest::Client.new
250
+ #
251
+ # # Create a request. To set request fields, pass in keyword arguments.
252
+ # request = Google::Cloud::Parallelstore::V1beta::ListInstancesRequest.new
253
+ #
254
+ # # Call the list_instances method.
255
+ # result = client.list_instances request
256
+ #
257
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
258
+ # # over elements, and API calls will be issued to fetch pages as needed.
259
+ # result.each do |item|
260
+ # # Each element is of type ::Google::Cloud::Parallelstore::V1beta::Instance.
261
+ # p item
262
+ # end
263
+ #
264
+ def list_instances request, options = nil
265
+ raise ::ArgumentError, "request must be provided" if request.nil?
266
+
267
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Parallelstore::V1beta::ListInstancesRequest
268
+
269
+ # Converts hash and nil to an options object
270
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
271
+
272
+ # Customize the options with defaults
273
+ call_metadata = @config.rpcs.list_instances.metadata.to_h
274
+
275
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
276
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
277
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
278
+ gapic_version: ::Google::Cloud::Parallelstore::V1beta::VERSION,
279
+ transports_version_send: [:rest]
280
+
281
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
282
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
283
+
284
+ options.apply_defaults timeout: @config.rpcs.list_instances.timeout,
285
+ metadata: call_metadata,
286
+ retry_policy: @config.rpcs.list_instances.retry_policy
287
+
288
+ options.apply_defaults timeout: @config.timeout,
289
+ metadata: @config.metadata,
290
+ retry_policy: @config.retry_policy
291
+
292
+ @parallelstore_stub.list_instances request, options do |result, operation|
293
+ yield result, operation if block_given?
294
+ return result
295
+ end
296
+ rescue ::Gapic::Rest::Error => e
297
+ raise ::Google::Cloud::Error.from_error(e)
298
+ end
299
+
300
+ ##
301
+ # Gets details of a single Instance.
302
+ #
303
+ # @overload get_instance(request, options = nil)
304
+ # Pass arguments to `get_instance` via a request object, either of type
305
+ # {::Google::Cloud::Parallelstore::V1beta::GetInstanceRequest} or an equivalent Hash.
306
+ #
307
+ # @param request [::Google::Cloud::Parallelstore::V1beta::GetInstanceRequest, ::Hash]
308
+ # A request object representing the call parameters. Required. To specify no
309
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
310
+ # @param options [::Gapic::CallOptions, ::Hash]
311
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
312
+ #
313
+ # @overload get_instance(name: nil)
314
+ # Pass arguments to `get_instance` via keyword arguments. Note that at
315
+ # least one keyword argument is required. To specify no parameters, or to keep all
316
+ # the default parameter values, pass an empty Hash as a request object (see above).
317
+ #
318
+ # @param name [::String]
319
+ # Required. The instance resource name, in the format
320
+ # `projects/{project_id}/locations/{location}/instances/{instance_id}`.
321
+ # @yield [result, operation] Access the result along with the TransportOperation object
322
+ # @yieldparam result [::Google::Cloud::Parallelstore::V1beta::Instance]
323
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
324
+ #
325
+ # @return [::Google::Cloud::Parallelstore::V1beta::Instance]
326
+ #
327
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
328
+ #
329
+ # @example Basic example
330
+ # require "google/cloud/parallelstore/v1beta"
331
+ #
332
+ # # Create a client object. The client can be reused for multiple calls.
333
+ # client = Google::Cloud::Parallelstore::V1beta::Parallelstore::Rest::Client.new
334
+ #
335
+ # # Create a request. To set request fields, pass in keyword arguments.
336
+ # request = Google::Cloud::Parallelstore::V1beta::GetInstanceRequest.new
337
+ #
338
+ # # Call the get_instance method.
339
+ # result = client.get_instance request
340
+ #
341
+ # # The returned object is of type Google::Cloud::Parallelstore::V1beta::Instance.
342
+ # p result
343
+ #
344
+ def get_instance request, options = nil
345
+ raise ::ArgumentError, "request must be provided" if request.nil?
346
+
347
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Parallelstore::V1beta::GetInstanceRequest
348
+
349
+ # Converts hash and nil to an options object
350
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
351
+
352
+ # Customize the options with defaults
353
+ call_metadata = @config.rpcs.get_instance.metadata.to_h
354
+
355
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
356
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
357
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
358
+ gapic_version: ::Google::Cloud::Parallelstore::V1beta::VERSION,
359
+ transports_version_send: [:rest]
360
+
361
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
362
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
363
+
364
+ options.apply_defaults timeout: @config.rpcs.get_instance.timeout,
365
+ metadata: call_metadata,
366
+ retry_policy: @config.rpcs.get_instance.retry_policy
367
+
368
+ options.apply_defaults timeout: @config.timeout,
369
+ metadata: @config.metadata,
370
+ retry_policy: @config.retry_policy
371
+
372
+ @parallelstore_stub.get_instance request, options do |result, operation|
373
+ yield result, operation if block_given?
374
+ return result
375
+ end
376
+ rescue ::Gapic::Rest::Error => e
377
+ raise ::Google::Cloud::Error.from_error(e)
378
+ end
379
+
380
+ ##
381
+ # Creates a Parallelstore instance in a given project and location.
382
+ #
383
+ # @overload create_instance(request, options = nil)
384
+ # Pass arguments to `create_instance` via a request object, either of type
385
+ # {::Google::Cloud::Parallelstore::V1beta::CreateInstanceRequest} or an equivalent Hash.
386
+ #
387
+ # @param request [::Google::Cloud::Parallelstore::V1beta::CreateInstanceRequest, ::Hash]
388
+ # A request object representing the call parameters. Required. To specify no
389
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
390
+ # @param options [::Gapic::CallOptions, ::Hash]
391
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
392
+ #
393
+ # @overload create_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil)
394
+ # Pass arguments to `create_instance` via keyword arguments. Note that at
395
+ # least one keyword argument is required. To specify no parameters, or to keep all
396
+ # the default parameter values, pass an empty Hash as a request object (see above).
397
+ #
398
+ # @param parent [::String]
399
+ # Required. The instance's project and location, in the format
400
+ # `projects/{project}/locations/{location}`.
401
+ # Locations map to Google Cloud zones, for example **us-west1-b**.
402
+ # @param instance_id [::String]
403
+ # Required. The logical name of the Parallelstore instance in the user
404
+ # project with the following restrictions:
405
+ #
406
+ # * Must contain only lowercase letters, numbers, and hyphens.
407
+ # * Must start with a letter.
408
+ # * Must be between 1-63 characters.
409
+ # * Must end with a number or a letter.
410
+ # * Must be unique within the customer project / location
411
+ # @param instance [::Google::Cloud::Parallelstore::V1beta::Instance, ::Hash]
412
+ # Required. The instance to create.
413
+ # @param request_id [::String]
414
+ # Optional. An optional request ID to identify requests. Specify a unique
415
+ # request ID so that if you must retry your request, the server will know to
416
+ # ignore the request if it has already been completed. The server will
417
+ # guarantee that for at least 60 minutes since the first request.
418
+ #
419
+ # For example, consider a situation where you make an initial request and t
420
+ # he request times out. If you make the request again with the same request
421
+ # ID, the server can check if original operation with the same request ID
422
+ # was received, and if so, will ignore the second request. This prevents
423
+ # clients from accidentally creating duplicate commitments.
424
+ #
425
+ # The request ID must be a valid UUID with the exception that zero UUID is
426
+ # not supported (00000000-0000-0000-0000-000000000000).
427
+ # @yield [result, operation] Access the result along with the TransportOperation object
428
+ # @yieldparam result [::Gapic::Operation]
429
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
430
+ #
431
+ # @return [::Gapic::Operation]
432
+ #
433
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
434
+ #
435
+ # @example Basic example
436
+ # require "google/cloud/parallelstore/v1beta"
437
+ #
438
+ # # Create a client object. The client can be reused for multiple calls.
439
+ # client = Google::Cloud::Parallelstore::V1beta::Parallelstore::Rest::Client.new
440
+ #
441
+ # # Create a request. To set request fields, pass in keyword arguments.
442
+ # request = Google::Cloud::Parallelstore::V1beta::CreateInstanceRequest.new
443
+ #
444
+ # # Call the create_instance method.
445
+ # result = client.create_instance request
446
+ #
447
+ # # The returned object is of type Gapic::Operation. You can use it to
448
+ # # check the status of an operation, cancel it, or wait for results.
449
+ # # Here is how to wait for a response.
450
+ # result.wait_until_done! timeout: 60
451
+ # if result.response?
452
+ # p result.response
453
+ # else
454
+ # puts "No response received."
455
+ # end
456
+ #
457
+ def create_instance request, options = nil
458
+ raise ::ArgumentError, "request must be provided" if request.nil?
459
+
460
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Parallelstore::V1beta::CreateInstanceRequest
461
+
462
+ # Converts hash and nil to an options object
463
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
464
+
465
+ # Customize the options with defaults
466
+ call_metadata = @config.rpcs.create_instance.metadata.to_h
467
+
468
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
469
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
470
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
471
+ gapic_version: ::Google::Cloud::Parallelstore::V1beta::VERSION,
472
+ transports_version_send: [:rest]
473
+
474
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
475
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
476
+
477
+ options.apply_defaults timeout: @config.rpcs.create_instance.timeout,
478
+ metadata: call_metadata,
479
+ retry_policy: @config.rpcs.create_instance.retry_policy
480
+
481
+ options.apply_defaults timeout: @config.timeout,
482
+ metadata: @config.metadata,
483
+ retry_policy: @config.retry_policy
484
+
485
+ @parallelstore_stub.create_instance request, options do |result, operation|
486
+ result = ::Gapic::Operation.new result, @operations_client, options: options
487
+ yield result, operation if block_given?
488
+ return result
489
+ end
490
+ rescue ::Gapic::Rest::Error => e
491
+ raise ::Google::Cloud::Error.from_error(e)
492
+ end
493
+
494
+ ##
495
+ # Updates the parameters of a single Instance.
496
+ #
497
+ # @overload update_instance(request, options = nil)
498
+ # Pass arguments to `update_instance` via a request object, either of type
499
+ # {::Google::Cloud::Parallelstore::V1beta::UpdateInstanceRequest} or an equivalent Hash.
500
+ #
501
+ # @param request [::Google::Cloud::Parallelstore::V1beta::UpdateInstanceRequest, ::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 update_instance(update_mask: nil, instance: nil, request_id: nil)
508
+ # Pass arguments to `update_instance` 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 update_mask [::Google::Protobuf::FieldMask, ::Hash]
513
+ # Required. Mask of fields to update .Field mask is used to specify the
514
+ # fields to be overwritten in the Instance resource by the update. At least
515
+ # one path must be supplied in this field. The fields specified in the
516
+ # update_mask are relative to the resource, not the full request.
517
+ # @param instance [::Google::Cloud::Parallelstore::V1beta::Instance, ::Hash]
518
+ # Required. The instance to update
519
+ # @param request_id [::String]
520
+ # Optional. An optional request ID to identify requests. Specify a unique
521
+ # request ID so that if you must retry your request, the server will know to
522
+ # ignore the request if it has already been completed. The server will
523
+ # guarantee that for at least 60 minutes since the first request.
524
+ #
525
+ # For example, consider a situation where you make an initial request and t
526
+ # he request times out. If you make the request again with the same request
527
+ # ID, the server can check if original operation with the same request ID
528
+ # was received, and if so, will ignore the second request. This prevents
529
+ # clients from accidentally creating duplicate commitments.
530
+ #
531
+ # The request ID must be a valid UUID with the exception that zero UUID is
532
+ # not supported (00000000-0000-0000-0000-000000000000).
533
+ # @yield [result, operation] Access the result along with the TransportOperation object
534
+ # @yieldparam result [::Gapic::Operation]
535
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
536
+ #
537
+ # @return [::Gapic::Operation]
538
+ #
539
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
540
+ #
541
+ # @example Basic example
542
+ # require "google/cloud/parallelstore/v1beta"
543
+ #
544
+ # # Create a client object. The client can be reused for multiple calls.
545
+ # client = Google::Cloud::Parallelstore::V1beta::Parallelstore::Rest::Client.new
546
+ #
547
+ # # Create a request. To set request fields, pass in keyword arguments.
548
+ # request = Google::Cloud::Parallelstore::V1beta::UpdateInstanceRequest.new
549
+ #
550
+ # # Call the update_instance method.
551
+ # result = client.update_instance request
552
+ #
553
+ # # The returned object is of type Gapic::Operation. You can use it to
554
+ # # check the status of an operation, cancel it, or wait for results.
555
+ # # Here is how to wait for a response.
556
+ # result.wait_until_done! timeout: 60
557
+ # if result.response?
558
+ # p result.response
559
+ # else
560
+ # puts "No response received."
561
+ # end
562
+ #
563
+ def update_instance request, options = nil
564
+ raise ::ArgumentError, "request must be provided" if request.nil?
565
+
566
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Parallelstore::V1beta::UpdateInstanceRequest
567
+
568
+ # Converts hash and nil to an options object
569
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
570
+
571
+ # Customize the options with defaults
572
+ call_metadata = @config.rpcs.update_instance.metadata.to_h
573
+
574
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
575
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
576
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
577
+ gapic_version: ::Google::Cloud::Parallelstore::V1beta::VERSION,
578
+ transports_version_send: [:rest]
579
+
580
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
581
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
582
+
583
+ options.apply_defaults timeout: @config.rpcs.update_instance.timeout,
584
+ metadata: call_metadata,
585
+ retry_policy: @config.rpcs.update_instance.retry_policy
586
+
587
+ options.apply_defaults timeout: @config.timeout,
588
+ metadata: @config.metadata,
589
+ retry_policy: @config.retry_policy
590
+
591
+ @parallelstore_stub.update_instance request, options do |result, operation|
592
+ result = ::Gapic::Operation.new result, @operations_client, options: options
593
+ yield result, operation if block_given?
594
+ return result
595
+ end
596
+ rescue ::Gapic::Rest::Error => e
597
+ raise ::Google::Cloud::Error.from_error(e)
598
+ end
599
+
600
+ ##
601
+ # Deletes a single Instance.
602
+ #
603
+ # @overload delete_instance(request, options = nil)
604
+ # Pass arguments to `delete_instance` via a request object, either of type
605
+ # {::Google::Cloud::Parallelstore::V1beta::DeleteInstanceRequest} or an equivalent Hash.
606
+ #
607
+ # @param request [::Google::Cloud::Parallelstore::V1beta::DeleteInstanceRequest, ::Hash]
608
+ # A request object representing the call parameters. Required. To specify no
609
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
610
+ # @param options [::Gapic::CallOptions, ::Hash]
611
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
612
+ #
613
+ # @overload delete_instance(name: nil, request_id: nil)
614
+ # Pass arguments to `delete_instance` via keyword arguments. Note that at
615
+ # least one keyword argument is required. To specify no parameters, or to keep all
616
+ # the default parameter values, pass an empty Hash as a request object (see above).
617
+ #
618
+ # @param name [::String]
619
+ # Required. Name of the resource
620
+ # @param request_id [::String]
621
+ # Optional. An optional request ID to identify requests. Specify a unique
622
+ # request ID so that if you must retry your request, the server will know to
623
+ # ignore the request if it has already been completed. The server will
624
+ # guarantee that for at least 60 minutes after the first request.
625
+ #
626
+ # For example, consider a situation where you make an initial request and t
627
+ # he request times out. If you make the request again with the same request
628
+ # ID, the server can check if original operation with the same request ID
629
+ # was received, and if so, will ignore the second request. This prevents
630
+ # clients from accidentally creating duplicate commitments.
631
+ #
632
+ # The request ID must be a valid UUID with the exception that zero UUID is
633
+ # not supported (00000000-0000-0000-0000-000000000000).
634
+ # @yield [result, operation] Access the result along with the TransportOperation object
635
+ # @yieldparam result [::Gapic::Operation]
636
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
637
+ #
638
+ # @return [::Gapic::Operation]
639
+ #
640
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
641
+ #
642
+ # @example Basic example
643
+ # require "google/cloud/parallelstore/v1beta"
644
+ #
645
+ # # Create a client object. The client can be reused for multiple calls.
646
+ # client = Google::Cloud::Parallelstore::V1beta::Parallelstore::Rest::Client.new
647
+ #
648
+ # # Create a request. To set request fields, pass in keyword arguments.
649
+ # request = Google::Cloud::Parallelstore::V1beta::DeleteInstanceRequest.new
650
+ #
651
+ # # Call the delete_instance method.
652
+ # result = client.delete_instance request
653
+ #
654
+ # # The returned object is of type Gapic::Operation. You can use it to
655
+ # # check the status of an operation, cancel it, or wait for results.
656
+ # # Here is how to wait for a response.
657
+ # result.wait_until_done! timeout: 60
658
+ # if result.response?
659
+ # p result.response
660
+ # else
661
+ # puts "No response received."
662
+ # end
663
+ #
664
+ def delete_instance request, options = nil
665
+ raise ::ArgumentError, "request must be provided" if request.nil?
666
+
667
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Parallelstore::V1beta::DeleteInstanceRequest
668
+
669
+ # Converts hash and nil to an options object
670
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
671
+
672
+ # Customize the options with defaults
673
+ call_metadata = @config.rpcs.delete_instance.metadata.to_h
674
+
675
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
676
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
677
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
678
+ gapic_version: ::Google::Cloud::Parallelstore::V1beta::VERSION,
679
+ transports_version_send: [:rest]
680
+
681
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
682
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
683
+
684
+ options.apply_defaults timeout: @config.rpcs.delete_instance.timeout,
685
+ metadata: call_metadata,
686
+ retry_policy: @config.rpcs.delete_instance.retry_policy
687
+
688
+ options.apply_defaults timeout: @config.timeout,
689
+ metadata: @config.metadata,
690
+ retry_policy: @config.retry_policy
691
+
692
+ @parallelstore_stub.delete_instance request, options do |result, operation|
693
+ result = ::Gapic::Operation.new result, @operations_client, options: options
694
+ yield result, operation if block_given?
695
+ return result
696
+ end
697
+ rescue ::Gapic::Rest::Error => e
698
+ raise ::Google::Cloud::Error.from_error(e)
699
+ end
700
+
701
+ ##
702
+ # ImportData copies data from Cloud Storage to Parallelstore.
703
+ #
704
+ # @overload import_data(request, options = nil)
705
+ # Pass arguments to `import_data` via a request object, either of type
706
+ # {::Google::Cloud::Parallelstore::V1beta::ImportDataRequest} or an equivalent Hash.
707
+ #
708
+ # @param request [::Google::Cloud::Parallelstore::V1beta::ImportDataRequest, ::Hash]
709
+ # A request object representing the call parameters. Required. To specify no
710
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
711
+ # @param options [::Gapic::CallOptions, ::Hash]
712
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
713
+ #
714
+ # @overload import_data(source_gcs_bucket: nil, destination_parallelstore: nil, name: nil, request_id: nil)
715
+ # Pass arguments to `import_data` via keyword arguments. Note that at
716
+ # least one keyword argument is required. To specify no parameters, or to keep all
717
+ # the default parameter values, pass an empty Hash as a request object (see above).
718
+ #
719
+ # @param source_gcs_bucket [::Google::Cloud::Parallelstore::V1beta::SourceGcsBucket, ::Hash]
720
+ # Cloud Storage source.
721
+ # @param destination_parallelstore [::Google::Cloud::Parallelstore::V1beta::DestinationParallelstore, ::Hash]
722
+ # Parallelstore destination.
723
+ # @param name [::String]
724
+ # Required. Name of the resource.
725
+ # @param request_id [::String]
726
+ # Optional. An optional request ID to identify requests. Specify a unique
727
+ # request ID so that if you must retry your request, the server will know to
728
+ # ignore the request if it has already been completed. The server will
729
+ # guarantee that for at least 60 minutes since the first request.
730
+ #
731
+ # For example, consider a situation where you make an initial request and t
732
+ # he request times out. If you make the request again with the same request
733
+ # ID, the server can check if original operation with the same request ID
734
+ # was received, and if so, will ignore the second request. This prevents
735
+ # clients from accidentally creating duplicate commitments.
736
+ #
737
+ # The request ID must be a valid UUID with the exception that zero UUID is
738
+ # not supported (00000000-0000-0000-0000-000000000000).
739
+ # @yield [result, operation] Access the result along with the TransportOperation object
740
+ # @yieldparam result [::Gapic::Operation]
741
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
742
+ #
743
+ # @return [::Gapic::Operation]
744
+ #
745
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
746
+ #
747
+ # @example Basic example
748
+ # require "google/cloud/parallelstore/v1beta"
749
+ #
750
+ # # Create a client object. The client can be reused for multiple calls.
751
+ # client = Google::Cloud::Parallelstore::V1beta::Parallelstore::Rest::Client.new
752
+ #
753
+ # # Create a request. To set request fields, pass in keyword arguments.
754
+ # request = Google::Cloud::Parallelstore::V1beta::ImportDataRequest.new
755
+ #
756
+ # # Call the import_data method.
757
+ # result = client.import_data request
758
+ #
759
+ # # The returned object is of type Gapic::Operation. You can use it to
760
+ # # check the status of an operation, cancel it, or wait for results.
761
+ # # Here is how to wait for a response.
762
+ # result.wait_until_done! timeout: 60
763
+ # if result.response?
764
+ # p result.response
765
+ # else
766
+ # puts "No response received."
767
+ # end
768
+ #
769
+ def import_data request, options = nil
770
+ raise ::ArgumentError, "request must be provided" if request.nil?
771
+
772
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Parallelstore::V1beta::ImportDataRequest
773
+
774
+ # Converts hash and nil to an options object
775
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
776
+
777
+ # Customize the options with defaults
778
+ call_metadata = @config.rpcs.import_data.metadata.to_h
779
+
780
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
781
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
782
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
783
+ gapic_version: ::Google::Cloud::Parallelstore::V1beta::VERSION,
784
+ transports_version_send: [:rest]
785
+
786
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
787
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
788
+
789
+ options.apply_defaults timeout: @config.rpcs.import_data.timeout,
790
+ metadata: call_metadata,
791
+ retry_policy: @config.rpcs.import_data.retry_policy
792
+
793
+ options.apply_defaults timeout: @config.timeout,
794
+ metadata: @config.metadata,
795
+ retry_policy: @config.retry_policy
796
+
797
+ @parallelstore_stub.import_data request, options do |result, operation|
798
+ result = ::Gapic::Operation.new result, @operations_client, options: options
799
+ yield result, operation if block_given?
800
+ return result
801
+ end
802
+ rescue ::Gapic::Rest::Error => e
803
+ raise ::Google::Cloud::Error.from_error(e)
804
+ end
805
+
806
+ ##
807
+ # ExportData copies data from Parallelstore to Cloud Storage
808
+ #
809
+ # @overload export_data(request, options = nil)
810
+ # Pass arguments to `export_data` via a request object, either of type
811
+ # {::Google::Cloud::Parallelstore::V1beta::ExportDataRequest} or an equivalent Hash.
812
+ #
813
+ # @param request [::Google::Cloud::Parallelstore::V1beta::ExportDataRequest, ::Hash]
814
+ # A request object representing the call parameters. Required. To specify no
815
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
816
+ # @param options [::Gapic::CallOptions, ::Hash]
817
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
818
+ #
819
+ # @overload export_data(source_parallelstore: nil, destination_gcs_bucket: nil, name: nil, request_id: nil)
820
+ # Pass arguments to `export_data` via keyword arguments. Note that at
821
+ # least one keyword argument is required. To specify no parameters, or to keep all
822
+ # the default parameter values, pass an empty Hash as a request object (see above).
823
+ #
824
+ # @param source_parallelstore [::Google::Cloud::Parallelstore::V1beta::SourceParallelstore, ::Hash]
825
+ # Parallelstore source.
826
+ # @param destination_gcs_bucket [::Google::Cloud::Parallelstore::V1beta::DestinationGcsBucket, ::Hash]
827
+ # Cloud Storage destination.
828
+ # @param name [::String]
829
+ # Required. Name of the resource.
830
+ # @param request_id [::String]
831
+ # Optional. An optional request ID to identify requests. Specify a unique
832
+ # request ID so that if you must retry your request, the server will know to
833
+ # ignore the request if it has already been completed. The server will
834
+ # guarantee that for at least 60 minutes since the first request.
835
+ #
836
+ # For example, consider a situation where you make an initial request and t
837
+ # he request times out. If you make the request again with the same request
838
+ # ID, the server can check if original operation with the same request ID
839
+ # was received, and if so, will ignore the second request. This prevents
840
+ # clients from accidentally creating duplicate commitments.
841
+ #
842
+ # The request ID must be a valid UUID with the exception that zero UUID is
843
+ # not supported (00000000-0000-0000-0000-000000000000).
844
+ # @yield [result, operation] Access the result along with the TransportOperation object
845
+ # @yieldparam result [::Gapic::Operation]
846
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
847
+ #
848
+ # @return [::Gapic::Operation]
849
+ #
850
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
851
+ #
852
+ # @example Basic example
853
+ # require "google/cloud/parallelstore/v1beta"
854
+ #
855
+ # # Create a client object. The client can be reused for multiple calls.
856
+ # client = Google::Cloud::Parallelstore::V1beta::Parallelstore::Rest::Client.new
857
+ #
858
+ # # Create a request. To set request fields, pass in keyword arguments.
859
+ # request = Google::Cloud::Parallelstore::V1beta::ExportDataRequest.new
860
+ #
861
+ # # Call the export_data method.
862
+ # result = client.export_data request
863
+ #
864
+ # # The returned object is of type Gapic::Operation. You can use it to
865
+ # # check the status of an operation, cancel it, or wait for results.
866
+ # # Here is how to wait for a response.
867
+ # result.wait_until_done! timeout: 60
868
+ # if result.response?
869
+ # p result.response
870
+ # else
871
+ # puts "No response received."
872
+ # end
873
+ #
874
+ def export_data request, options = nil
875
+ raise ::ArgumentError, "request must be provided" if request.nil?
876
+
877
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Parallelstore::V1beta::ExportDataRequest
878
+
879
+ # Converts hash and nil to an options object
880
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
881
+
882
+ # Customize the options with defaults
883
+ call_metadata = @config.rpcs.export_data.metadata.to_h
884
+
885
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
886
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
887
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
888
+ gapic_version: ::Google::Cloud::Parallelstore::V1beta::VERSION,
889
+ transports_version_send: [:rest]
890
+
891
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
892
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
893
+
894
+ options.apply_defaults timeout: @config.rpcs.export_data.timeout,
895
+ metadata: call_metadata,
896
+ retry_policy: @config.rpcs.export_data.retry_policy
897
+
898
+ options.apply_defaults timeout: @config.timeout,
899
+ metadata: @config.metadata,
900
+ retry_policy: @config.retry_policy
901
+
902
+ @parallelstore_stub.export_data request, options do |result, operation|
903
+ result = ::Gapic::Operation.new result, @operations_client, options: options
904
+ yield result, operation if block_given?
905
+ return result
906
+ end
907
+ rescue ::Gapic::Rest::Error => e
908
+ raise ::Google::Cloud::Error.from_error(e)
909
+ end
910
+
911
+ ##
912
+ # Configuration class for the Parallelstore REST API.
913
+ #
914
+ # This class represents the configuration for Parallelstore REST,
915
+ # providing control over timeouts, retry behavior, logging, transport
916
+ # parameters, and other low-level controls. Certain parameters can also be
917
+ # applied individually to specific RPCs. See
918
+ # {::Google::Cloud::Parallelstore::V1beta::Parallelstore::Rest::Client::Configuration::Rpcs}
919
+ # for a list of RPCs that can be configured independently.
920
+ #
921
+ # Configuration can be applied globally to all clients, or to a single client
922
+ # on construction.
923
+ #
924
+ # @example
925
+ #
926
+ # # Modify the global config, setting the timeout for
927
+ # # list_instances to 20 seconds,
928
+ # # and all remaining timeouts to 10 seconds.
929
+ # ::Google::Cloud::Parallelstore::V1beta::Parallelstore::Rest::Client.configure do |config|
930
+ # config.timeout = 10.0
931
+ # config.rpcs.list_instances.timeout = 20.0
932
+ # end
933
+ #
934
+ # # Apply the above configuration only to a new client.
935
+ # client = ::Google::Cloud::Parallelstore::V1beta::Parallelstore::Rest::Client.new do |config|
936
+ # config.timeout = 10.0
937
+ # config.rpcs.list_instances.timeout = 20.0
938
+ # end
939
+ #
940
+ # @!attribute [rw] endpoint
941
+ # A custom service endpoint, as a hostname or hostname:port. The default is
942
+ # nil, indicating to use the default endpoint in the current universe domain.
943
+ # @return [::String,nil]
944
+ # @!attribute [rw] credentials
945
+ # Credentials to send with calls. You may provide any of the following types:
946
+ # * (`String`) The path to a service account key file in JSON format
947
+ # * (`Hash`) A service account key as a Hash
948
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
949
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
950
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
951
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
952
+ # * (`nil`) indicating no credentials
953
+ # @return [::Object]
954
+ # @!attribute [rw] scope
955
+ # The OAuth scopes
956
+ # @return [::Array<::String>]
957
+ # @!attribute [rw] lib_name
958
+ # The library name as recorded in instrumentation and logging
959
+ # @return [::String]
960
+ # @!attribute [rw] lib_version
961
+ # The library version as recorded in instrumentation and logging
962
+ # @return [::String]
963
+ # @!attribute [rw] timeout
964
+ # The call timeout in seconds.
965
+ # @return [::Numeric]
966
+ # @!attribute [rw] metadata
967
+ # Additional headers to be sent with the call.
968
+ # @return [::Hash{::Symbol=>::String}]
969
+ # @!attribute [rw] retry_policy
970
+ # The retry policy. The value is a hash with the following keys:
971
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
972
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
973
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
974
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
975
+ # trigger a retry.
976
+ # @return [::Hash]
977
+ # @!attribute [rw] quota_project
978
+ # A separate project against which to charge quota.
979
+ # @return [::String]
980
+ # @!attribute [rw] universe_domain
981
+ # The universe domain within which to make requests. This determines the
982
+ # default endpoint URL. The default value of nil uses the environment
983
+ # universe (usually the default "googleapis.com" universe).
984
+ # @return [::String,nil]
985
+ #
986
+ class Configuration
987
+ extend ::Gapic::Config
988
+
989
+ # @private
990
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
991
+ DEFAULT_ENDPOINT = "parallelstore.googleapis.com"
992
+
993
+ config_attr :endpoint, nil, ::String, nil
994
+ config_attr :credentials, nil do |value|
995
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
996
+ allowed.any? { |klass| klass === value }
997
+ end
998
+ config_attr :scope, nil, ::String, ::Array, nil
999
+ config_attr :lib_name, nil, ::String, nil
1000
+ config_attr :lib_version, nil, ::String, nil
1001
+ config_attr :timeout, nil, ::Numeric, nil
1002
+ config_attr :metadata, nil, ::Hash, nil
1003
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1004
+ config_attr :quota_project, nil, ::String, nil
1005
+ config_attr :universe_domain, nil, ::String, nil
1006
+
1007
+ # @private
1008
+ # Overrides for http bindings for the RPCs of this service
1009
+ # are only used when this service is used as mixin, and only
1010
+ # by the host service.
1011
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1012
+ config_attr :bindings_override, {}, ::Hash, nil
1013
+
1014
+ # @private
1015
+ def initialize parent_config = nil
1016
+ @parent_config = parent_config unless parent_config.nil?
1017
+
1018
+ yield self if block_given?
1019
+ end
1020
+
1021
+ ##
1022
+ # Configurations for individual RPCs
1023
+ # @return [Rpcs]
1024
+ #
1025
+ def rpcs
1026
+ @rpcs ||= begin
1027
+ parent_rpcs = nil
1028
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1029
+ Rpcs.new parent_rpcs
1030
+ end
1031
+ end
1032
+
1033
+ ##
1034
+ # Configuration RPC class for the Parallelstore API.
1035
+ #
1036
+ # Includes fields providing the configuration for each RPC in this service.
1037
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1038
+ # the following configuration fields:
1039
+ #
1040
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1041
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1042
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1043
+ # include the following keys:
1044
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1045
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1046
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1047
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1048
+ # trigger a retry.
1049
+ #
1050
+ class Rpcs
1051
+ ##
1052
+ # RPC-specific configuration for `list_instances`
1053
+ # @return [::Gapic::Config::Method]
1054
+ #
1055
+ attr_reader :list_instances
1056
+ ##
1057
+ # RPC-specific configuration for `get_instance`
1058
+ # @return [::Gapic::Config::Method]
1059
+ #
1060
+ attr_reader :get_instance
1061
+ ##
1062
+ # RPC-specific configuration for `create_instance`
1063
+ # @return [::Gapic::Config::Method]
1064
+ #
1065
+ attr_reader :create_instance
1066
+ ##
1067
+ # RPC-specific configuration for `update_instance`
1068
+ # @return [::Gapic::Config::Method]
1069
+ #
1070
+ attr_reader :update_instance
1071
+ ##
1072
+ # RPC-specific configuration for `delete_instance`
1073
+ # @return [::Gapic::Config::Method]
1074
+ #
1075
+ attr_reader :delete_instance
1076
+ ##
1077
+ # RPC-specific configuration for `import_data`
1078
+ # @return [::Gapic::Config::Method]
1079
+ #
1080
+ attr_reader :import_data
1081
+ ##
1082
+ # RPC-specific configuration for `export_data`
1083
+ # @return [::Gapic::Config::Method]
1084
+ #
1085
+ attr_reader :export_data
1086
+
1087
+ # @private
1088
+ def initialize parent_rpcs = nil
1089
+ list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances
1090
+ @list_instances = ::Gapic::Config::Method.new list_instances_config
1091
+ get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance
1092
+ @get_instance = ::Gapic::Config::Method.new get_instance_config
1093
+ create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance
1094
+ @create_instance = ::Gapic::Config::Method.new create_instance_config
1095
+ update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance
1096
+ @update_instance = ::Gapic::Config::Method.new update_instance_config
1097
+ delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance
1098
+ @delete_instance = ::Gapic::Config::Method.new delete_instance_config
1099
+ import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data
1100
+ @import_data = ::Gapic::Config::Method.new import_data_config
1101
+ export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data
1102
+ @export_data = ::Gapic::Config::Method.new export_data_config
1103
+
1104
+ yield self if block_given?
1105
+ end
1106
+ end
1107
+ end
1108
+ end
1109
+ end
1110
+ end
1111
+ end
1112
+ end
1113
+ end
1114
+ end