google-cloud-lustre-v1 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 (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 +1185 -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 +1118 -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 +288 -0
  30. data/proto_docs/google/cloud/lustre/v1/transfer.rb +284 -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 +85 -9
@@ -0,0 +1,1118 @@
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
+ # @param lustre_path [::Google::Cloud::Lustre::V1::LustrePath, ::Hash]
731
+ # Lustre path destination.
732
+ # @param name [::String]
733
+ # Required. Name of the resource.
734
+ # @param request_id [::String]
735
+ # Optional. UUID to identify requests.
736
+ # @param service_account [::String]
737
+ # Optional. User-specified service account used to perform the transfer.
738
+ # If unspecified, the default Lustre P4 service account will be used.
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/lustre/v1"
749
+ #
750
+ # # Create a client object. The client can be reused for multiple calls.
751
+ # client = Google::Cloud::Lustre::V1::Lustre::Rest::Client.new
752
+ #
753
+ # # Create a request. To set request fields, pass in keyword arguments.
754
+ # request = Google::Cloud::Lustre::V1::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::Lustre::V1::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::Lustre::V1::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
+ @lustre_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
+ throw :response, result
801
+ end
802
+ rescue ::Gapic::Rest::Error => e
803
+ raise ::Google::Cloud::Error.from_error(e)
804
+ end
805
+
806
+ ##
807
+ # Exports data from a Managed Lustre instance 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::Lustre::V1::ExportDataRequest} or an equivalent Hash.
812
+ #
813
+ # @param request [::Google::Cloud::Lustre::V1::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(lustre_path: nil, gcs_path: nil, name: nil, request_id: nil, service_account: 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 lustre_path [::Google::Cloud::Lustre::V1::LustrePath, ::Hash]
825
+ # Lustre path source.
826
+ # @param gcs_path [::Google::Cloud::Lustre::V1::GcsPath, ::Hash]
827
+ # Cloud Storage destination.
828
+ # @param name [::String]
829
+ # Required. Name of the resource.
830
+ # @param request_id [::String]
831
+ # Optional. UUID to identify requests.
832
+ # @param service_account [::String]
833
+ # Optional. User-specified service account used to perform the transfer.
834
+ # If unspecified, the Managed Lustre service agent is used.
835
+ # @yield [result, operation] Access the result along with the TransportOperation object
836
+ # @yieldparam result [::Gapic::Operation]
837
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
838
+ #
839
+ # @return [::Gapic::Operation]
840
+ #
841
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
842
+ #
843
+ # @example Basic example
844
+ # require "google/cloud/lustre/v1"
845
+ #
846
+ # # Create a client object. The client can be reused for multiple calls.
847
+ # client = Google::Cloud::Lustre::V1::Lustre::Rest::Client.new
848
+ #
849
+ # # Create a request. To set request fields, pass in keyword arguments.
850
+ # request = Google::Cloud::Lustre::V1::ExportDataRequest.new
851
+ #
852
+ # # Call the export_data method.
853
+ # result = client.export_data request
854
+ #
855
+ # # The returned object is of type Gapic::Operation. You can use it to
856
+ # # check the status of an operation, cancel it, or wait for results.
857
+ # # Here is how to wait for a response.
858
+ # result.wait_until_done! timeout: 60
859
+ # if result.response?
860
+ # p result.response
861
+ # else
862
+ # puts "No response received."
863
+ # end
864
+ #
865
+ def export_data request, options = nil
866
+ raise ::ArgumentError, "request must be provided" if request.nil?
867
+
868
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Lustre::V1::ExportDataRequest
869
+
870
+ # Converts hash and nil to an options object
871
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
872
+
873
+ # Customize the options with defaults
874
+ call_metadata = @config.rpcs.export_data.metadata.to_h
875
+
876
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
877
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
878
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
879
+ gapic_version: ::Google::Cloud::Lustre::V1::VERSION,
880
+ transports_version_send: [:rest]
881
+
882
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
883
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
884
+
885
+ options.apply_defaults timeout: @config.rpcs.export_data.timeout,
886
+ metadata: call_metadata,
887
+ retry_policy: @config.rpcs.export_data.retry_policy
888
+
889
+ options.apply_defaults timeout: @config.timeout,
890
+ metadata: @config.metadata,
891
+ retry_policy: @config.retry_policy
892
+
893
+ @lustre_stub.export_data request, options do |result, operation|
894
+ result = ::Gapic::Operation.new result, @operations_client, options: options
895
+ yield result, operation if block_given?
896
+ throw :response, result
897
+ end
898
+ rescue ::Gapic::Rest::Error => e
899
+ raise ::Google::Cloud::Error.from_error(e)
900
+ end
901
+
902
+ ##
903
+ # Configuration class for the Lustre REST API.
904
+ #
905
+ # This class represents the configuration for Lustre REST,
906
+ # providing control over timeouts, retry behavior, logging, transport
907
+ # parameters, and other low-level controls. Certain parameters can also be
908
+ # applied individually to specific RPCs. See
909
+ # {::Google::Cloud::Lustre::V1::Lustre::Rest::Client::Configuration::Rpcs}
910
+ # for a list of RPCs that can be configured independently.
911
+ #
912
+ # Configuration can be applied globally to all clients, or to a single client
913
+ # on construction.
914
+ #
915
+ # @example
916
+ #
917
+ # # Modify the global config, setting the timeout for
918
+ # # list_instances to 20 seconds,
919
+ # # and all remaining timeouts to 10 seconds.
920
+ # ::Google::Cloud::Lustre::V1::Lustre::Rest::Client.configure do |config|
921
+ # config.timeout = 10.0
922
+ # config.rpcs.list_instances.timeout = 20.0
923
+ # end
924
+ #
925
+ # # Apply the above configuration only to a new client.
926
+ # client = ::Google::Cloud::Lustre::V1::Lustre::Rest::Client.new do |config|
927
+ # config.timeout = 10.0
928
+ # config.rpcs.list_instances.timeout = 20.0
929
+ # end
930
+ #
931
+ # @!attribute [rw] endpoint
932
+ # A custom service endpoint, as a hostname or hostname:port. The default is
933
+ # nil, indicating to use the default endpoint in the current universe domain.
934
+ # @return [::String,nil]
935
+ # @!attribute [rw] credentials
936
+ # Credentials to send with calls. You may provide any of the following types:
937
+ # * (`String`) The path to a service account key file in JSON format
938
+ # * (`Hash`) A service account key as a Hash
939
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
940
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
941
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
942
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
943
+ # * (`nil`) indicating no credentials
944
+ #
945
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
946
+ # external source for authentication to Google Cloud, you must validate it before
947
+ # providing it to a Google API client library. Providing an unvalidated credential
948
+ # configuration to Google APIs can compromise the security of your systems and data.
949
+ # For more information, refer to [Validate credential configurations from external
950
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
951
+ # @return [::Object]
952
+ # @!attribute [rw] scope
953
+ # The OAuth scopes
954
+ # @return [::Array<::String>]
955
+ # @!attribute [rw] lib_name
956
+ # The library name as recorded in instrumentation and logging
957
+ # @return [::String]
958
+ # @!attribute [rw] lib_version
959
+ # The library version as recorded in instrumentation and logging
960
+ # @return [::String]
961
+ # @!attribute [rw] timeout
962
+ # The call timeout in seconds.
963
+ # @return [::Numeric]
964
+ # @!attribute [rw] metadata
965
+ # Additional headers to be sent with the call.
966
+ # @return [::Hash{::Symbol=>::String}]
967
+ # @!attribute [rw] retry_policy
968
+ # The retry policy. The value is a hash with the following keys:
969
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
970
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
971
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
972
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
973
+ # trigger a retry.
974
+ # @return [::Hash]
975
+ # @!attribute [rw] quota_project
976
+ # A separate project against which to charge quota.
977
+ # @return [::String]
978
+ # @!attribute [rw] universe_domain
979
+ # The universe domain within which to make requests. This determines the
980
+ # default endpoint URL. The default value of nil uses the environment
981
+ # universe (usually the default "googleapis.com" universe).
982
+ # @return [::String,nil]
983
+ # @!attribute [rw] logger
984
+ # A custom logger to use for request/response debug logging, or the value
985
+ # `:default` (the default) to construct a default logger, or `nil` to
986
+ # explicitly disable logging.
987
+ # @return [::Logger,:default,nil]
988
+ #
989
+ class Configuration
990
+ extend ::Gapic::Config
991
+
992
+ # @private
993
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
994
+ DEFAULT_ENDPOINT = "lustre.googleapis.com"
995
+
996
+ config_attr :endpoint, nil, ::String, nil
997
+ config_attr :credentials, nil do |value|
998
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
999
+ allowed.any? { |klass| klass === value }
1000
+ end
1001
+ config_attr :scope, nil, ::String, ::Array, nil
1002
+ config_attr :lib_name, nil, ::String, nil
1003
+ config_attr :lib_version, nil, ::String, nil
1004
+ config_attr :timeout, nil, ::Numeric, nil
1005
+ config_attr :metadata, nil, ::Hash, nil
1006
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1007
+ config_attr :quota_project, nil, ::String, nil
1008
+ config_attr :universe_domain, nil, ::String, nil
1009
+
1010
+ # @private
1011
+ # Overrides for http bindings for the RPCs of this service
1012
+ # are only used when this service is used as mixin, and only
1013
+ # by the host service.
1014
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1015
+ config_attr :bindings_override, {}, ::Hash, nil
1016
+ config_attr :logger, :default, ::Logger, nil, :default
1017
+
1018
+ # @private
1019
+ def initialize parent_config = nil
1020
+ @parent_config = parent_config unless parent_config.nil?
1021
+
1022
+ yield self if block_given?
1023
+ end
1024
+
1025
+ ##
1026
+ # Configurations for individual RPCs
1027
+ # @return [Rpcs]
1028
+ #
1029
+ def rpcs
1030
+ @rpcs ||= begin
1031
+ parent_rpcs = nil
1032
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1033
+ Rpcs.new parent_rpcs
1034
+ end
1035
+ end
1036
+
1037
+ ##
1038
+ # Configuration RPC class for the Lustre API.
1039
+ #
1040
+ # Includes fields providing the configuration for each RPC in this service.
1041
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1042
+ # the following configuration fields:
1043
+ #
1044
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1045
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1046
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1047
+ # include the following keys:
1048
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1049
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1050
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1051
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1052
+ # trigger a retry.
1053
+ #
1054
+ class Rpcs
1055
+ ##
1056
+ # RPC-specific configuration for `list_instances`
1057
+ # @return [::Gapic::Config::Method]
1058
+ #
1059
+ attr_reader :list_instances
1060
+ ##
1061
+ # RPC-specific configuration for `get_instance`
1062
+ # @return [::Gapic::Config::Method]
1063
+ #
1064
+ attr_reader :get_instance
1065
+ ##
1066
+ # RPC-specific configuration for `create_instance`
1067
+ # @return [::Gapic::Config::Method]
1068
+ #
1069
+ attr_reader :create_instance
1070
+ ##
1071
+ # RPC-specific configuration for `update_instance`
1072
+ # @return [::Gapic::Config::Method]
1073
+ #
1074
+ attr_reader :update_instance
1075
+ ##
1076
+ # RPC-specific configuration for `delete_instance`
1077
+ # @return [::Gapic::Config::Method]
1078
+ #
1079
+ attr_reader :delete_instance
1080
+ ##
1081
+ # RPC-specific configuration for `import_data`
1082
+ # @return [::Gapic::Config::Method]
1083
+ #
1084
+ attr_reader :import_data
1085
+ ##
1086
+ # RPC-specific configuration for `export_data`
1087
+ # @return [::Gapic::Config::Method]
1088
+ #
1089
+ attr_reader :export_data
1090
+
1091
+ # @private
1092
+ def initialize parent_rpcs = nil
1093
+ list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances
1094
+ @list_instances = ::Gapic::Config::Method.new list_instances_config
1095
+ get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance
1096
+ @get_instance = ::Gapic::Config::Method.new get_instance_config
1097
+ create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance
1098
+ @create_instance = ::Gapic::Config::Method.new create_instance_config
1099
+ update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance
1100
+ @update_instance = ::Gapic::Config::Method.new update_instance_config
1101
+ delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance
1102
+ @delete_instance = ::Gapic::Config::Method.new delete_instance_config
1103
+ import_data_config = parent_rpcs.import_data if parent_rpcs.respond_to? :import_data
1104
+ @import_data = ::Gapic::Config::Method.new import_data_config
1105
+ export_data_config = parent_rpcs.export_data if parent_rpcs.respond_to? :export_data
1106
+ @export_data = ::Gapic::Config::Method.new export_data_config
1107
+
1108
+ yield self if block_given?
1109
+ end
1110
+ end
1111
+ end
1112
+ end
1113
+ end
1114
+ end
1115
+ end
1116
+ end
1117
+ end
1118
+ end