google-cloud-lustre-v1 0.a → 0.1.1

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