google-cloud-compute-v1 2.10.0 → 2.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/compute_pb.rb +51 -1
  3. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/credentials.rb +52 -0
  4. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/rest/client.rb +829 -0
  5. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/rest/service_stub.rb +378 -0
  6. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/rest.rb +51 -0
  7. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests.rb +47 -0
  8. data/lib/google/cloud/compute/v1/instance_settings_service/credentials.rb +52 -0
  9. data/lib/google/cloud/compute/v1/instance_settings_service/rest/client.rb +512 -0
  10. data/lib/google/cloud/compute/v1/instance_settings_service/rest/service_stub.rb +190 -0
  11. data/lib/google/cloud/compute/v1/instance_settings_service/rest.rb +51 -0
  12. data/lib/google/cloud/compute/v1/instance_settings_service.rb +47 -0
  13. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +104 -0
  14. data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +62 -0
  15. data/lib/google/cloud/compute/v1/rest.rb +4 -0
  16. data/lib/google/cloud/compute/v1/storage_pool_types/credentials.rb +53 -0
  17. data/lib/google/cloud/compute/v1/storage_pool_types/rest/client.rb +603 -0
  18. data/lib/google/cloud/compute/v1/storage_pool_types/rest/service_stub.rb +249 -0
  19. data/lib/google/cloud/compute/v1/storage_pool_types/rest.rb +51 -0
  20. data/lib/google/cloud/compute/v1/storage_pool_types.rb +47 -0
  21. data/lib/google/cloud/compute/v1/storage_pools/credentials.rb +52 -0
  22. data/lib/google/cloud/compute/v1/storage_pools/rest/client.rb +1313 -0
  23. data/lib/google/cloud/compute/v1/storage_pools/rest/service_stub.rb +679 -0
  24. data/lib/google/cloud/compute/v1/storage_pools/rest.rb +51 -0
  25. data/lib/google/cloud/compute/v1/storage_pools.rb +47 -0
  26. data/lib/google/cloud/compute/v1/version.rb +1 -1
  27. data/lib/google/cloud/compute/v1.rb +4 -0
  28. data/proto_docs/google/api/client.rb +4 -0
  29. data/proto_docs/google/cloud/compute/v1/compute.rb +1410 -118
  30. metadata +22 -2
@@ -0,0 +1,1313 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/compute/v1/compute_pb"
21
+ require "google/cloud/compute/v1/storage_pools/rest/service_stub"
22
+ require "google/cloud/compute/v1/zone_operations/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Compute
27
+ module V1
28
+ module StoragePools
29
+ module Rest
30
+ ##
31
+ # REST client for the StoragePools service.
32
+ #
33
+ # The StoragePools API.
34
+ #
35
+ class Client
36
+ # @private
37
+ DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
38
+
39
+ # @private
40
+ attr_reader :storage_pools_stub
41
+
42
+ ##
43
+ # Configure the StoragePools Client class.
44
+ #
45
+ # See {::Google::Cloud::Compute::V1::StoragePools::Rest::Client::Configuration}
46
+ # for a description of the configuration fields.
47
+ #
48
+ # @example
49
+ #
50
+ # # Modify the configuration for all StoragePools clients
51
+ # ::Google::Cloud::Compute::V1::StoragePools::Rest::Client.configure do |config|
52
+ # config.timeout = 10.0
53
+ # end
54
+ #
55
+ # @yield [config] Configure the Client client.
56
+ # @yieldparam config [Client::Configuration]
57
+ #
58
+ # @return [Client::Configuration]
59
+ #
60
+ def self.configure
61
+ @configure ||= begin
62
+ namespace = ["Google", "Cloud", "Compute", "V1"]
63
+ parent_config = while namespace.any?
64
+ parent_name = namespace.join "::"
65
+ parent_const = const_get parent_name
66
+ break parent_const.configure if parent_const.respond_to? :configure
67
+ namespace.pop
68
+ end
69
+ default_config = Client::Configuration.new parent_config
70
+
71
+ default_config.rpcs.aggregated_list.timeout = 600.0
72
+ default_config.rpcs.aggregated_list.retry_policy = {
73
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
74
+ }
75
+
76
+ default_config.rpcs.delete.timeout = 600.0
77
+
78
+ default_config.rpcs.get.timeout = 600.0
79
+ default_config.rpcs.get.retry_policy = {
80
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
81
+ }
82
+
83
+ default_config.rpcs.get_iam_policy.timeout = 600.0
84
+ default_config.rpcs.get_iam_policy.retry_policy = {
85
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
86
+ }
87
+
88
+ default_config.rpcs.insert.timeout = 600.0
89
+
90
+ default_config.rpcs.list.timeout = 600.0
91
+ default_config.rpcs.list.retry_policy = {
92
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
93
+ }
94
+
95
+ default_config.rpcs.list_disks.timeout = 600.0
96
+ default_config.rpcs.list_disks.retry_policy = {
97
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
98
+ }
99
+
100
+ default_config.rpcs.set_iam_policy.timeout = 600.0
101
+
102
+ default_config.rpcs.test_iam_permissions.timeout = 600.0
103
+
104
+ default_config.rpcs.update.timeout = 600.0
105
+
106
+ default_config
107
+ end
108
+ yield @configure if block_given?
109
+ @configure
110
+ end
111
+
112
+ ##
113
+ # Configure the StoragePools Client instance.
114
+ #
115
+ # The configuration is set to the derived mode, meaning that values can be changed,
116
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
117
+ # should be made on {Client.configure}.
118
+ #
119
+ # See {::Google::Cloud::Compute::V1::StoragePools::Rest::Client::Configuration}
120
+ # for a description of the configuration fields.
121
+ #
122
+ # @yield [config] Configure the Client client.
123
+ # @yieldparam config [Client::Configuration]
124
+ #
125
+ # @return [Client::Configuration]
126
+ #
127
+ def configure
128
+ yield @config if block_given?
129
+ @config
130
+ end
131
+
132
+ ##
133
+ # The effective universe domain
134
+ #
135
+ # @return [String]
136
+ #
137
+ def universe_domain
138
+ @storage_pools_stub.universe_domain
139
+ end
140
+
141
+ ##
142
+ # Create a new StoragePools REST client object.
143
+ #
144
+ # @example
145
+ #
146
+ # # Create a client using the default configuration
147
+ # client = ::Google::Cloud::Compute::V1::StoragePools::Rest::Client.new
148
+ #
149
+ # # Create a client using a custom configuration
150
+ # client = ::Google::Cloud::Compute::V1::StoragePools::Rest::Client.new do |config|
151
+ # config.timeout = 10.0
152
+ # end
153
+ #
154
+ # @yield [config] Configure the StoragePools client.
155
+ # @yieldparam config [Client::Configuration]
156
+ #
157
+ def initialize
158
+ # Create the configuration object
159
+ @config = Configuration.new Client.configure
160
+
161
+ # Yield the configuration if needed
162
+ yield @config if block_given?
163
+
164
+ # Create credentials
165
+ credentials = @config.credentials
166
+ # Use self-signed JWT if the endpoint is unchanged from default,
167
+ # but only if the default endpoint does not have a region prefix.
168
+ enable_self_signed_jwt = @config.endpoint.nil? ||
169
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
170
+ !@config.endpoint.split(".").first.include?("-"))
171
+ credentials ||= Credentials.default scope: @config.scope,
172
+ enable_self_signed_jwt: enable_self_signed_jwt
173
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
174
+ credentials = Credentials.new credentials, scope: @config.scope
175
+ end
176
+
177
+ @quota_project_id = @config.quota_project
178
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
179
+
180
+ @zone_operations = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client.new do |config|
181
+ config.credentials = credentials
182
+ config.quota_project = @quota_project_id
183
+ config.endpoint = @config.endpoint
184
+ config.universe_domain = @config.universe_domain
185
+ end
186
+
187
+ @storage_pools_stub = ::Google::Cloud::Compute::V1::StoragePools::Rest::ServiceStub.new(
188
+ endpoint: @config.endpoint,
189
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
190
+ universe_domain: @config.universe_domain,
191
+ credentials: credentials
192
+ )
193
+ end
194
+
195
+ ##
196
+ # Get the associated client for long-running operations via ZoneOperations.
197
+ #
198
+ # @return [::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client]
199
+ #
200
+ attr_reader :zone_operations
201
+
202
+ # Service calls
203
+
204
+ ##
205
+ # Retrieves an aggregated list of storage pools. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
206
+ #
207
+ # @overload aggregated_list(request, options = nil)
208
+ # Pass arguments to `aggregated_list` via a request object, either of type
209
+ # {::Google::Cloud::Compute::V1::AggregatedListStoragePoolsRequest} or an equivalent Hash.
210
+ #
211
+ # @param request [::Google::Cloud::Compute::V1::AggregatedListStoragePoolsRequest, ::Hash]
212
+ # A request object representing the call parameters. Required. To specify no
213
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
214
+ # @param options [::Gapic::CallOptions, ::Hash]
215
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
216
+ #
217
+ # @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, service_project_number: nil)
218
+ # Pass arguments to `aggregated_list` via keyword arguments. Note that at
219
+ # least one keyword argument is required. To specify no parameters, or to keep all
220
+ # the default parameter values, pass an empty Hash as a request object (see above).
221
+ #
222
+ # @param filter [::String]
223
+ # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.
224
+ # @param include_all_scopes [::Boolean]
225
+ # Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
226
+ # @param max_results [::Integer]
227
+ # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
228
+ # @param order_by [::String]
229
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
230
+ # @param page_token [::String]
231
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
232
+ # @param project [::String]
233
+ # Project ID for this request.
234
+ # @param return_partial_success [::Boolean]
235
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.
236
+ # @param service_project_number [::Integer]
237
+ # The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api.
238
+ # @yield [result, operation] Access the result along with the TransportOperation object
239
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::StoragePoolsScopedList>]
240
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
241
+ #
242
+ # @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::StoragePoolsScopedList>]
243
+ #
244
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
245
+ #
246
+ # @example Basic example
247
+ # require "google/cloud/compute/v1"
248
+ #
249
+ # # Create a client object. The client can be reused for multiple calls.
250
+ # client = Google::Cloud::Compute::V1::StoragePools::Rest::Client.new
251
+ #
252
+ # # Create a request. To set request fields, pass in keyword arguments.
253
+ # request = Google::Cloud::Compute::V1::AggregatedListStoragePoolsRequest.new
254
+ #
255
+ # # Call the aggregated_list method.
256
+ # result = client.aggregated_list request
257
+ #
258
+ # # The returned object is of type Google::Cloud::Compute::V1::StoragePoolAggregatedList.
259
+ # p result
260
+ #
261
+ def aggregated_list request, options = nil
262
+ raise ::ArgumentError, "request must be provided" if request.nil?
263
+
264
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AggregatedListStoragePoolsRequest
265
+
266
+ # Converts hash and nil to an options object
267
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
268
+
269
+ # Customize the options with defaults
270
+ call_metadata = @config.rpcs.aggregated_list.metadata.to_h
271
+
272
+ # Set x-goog-api-client and x-goog-user-project headers
273
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
274
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
275
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
276
+ transports_version_send: [:rest]
277
+
278
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
279
+
280
+ options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
281
+ metadata: call_metadata,
282
+ retry_policy: @config.rpcs.aggregated_list.retry_policy
283
+
284
+ options.apply_defaults timeout: @config.timeout,
285
+ metadata: @config.metadata,
286
+ retry_policy: @config.retry_policy
287
+
288
+ @storage_pools_stub.aggregated_list request, options do |result, operation|
289
+ result = ::Gapic::Rest::PagedEnumerable.new @storage_pools_stub, :aggregated_list, "items", request, result, options
290
+ yield result, operation if block_given?
291
+ return result
292
+ end
293
+ rescue ::Gapic::Rest::Error => e
294
+ raise ::Google::Cloud::Error.from_error(e)
295
+ end
296
+
297
+ ##
298
+ # Deletes the specified storage pool. Deleting a storagePool removes its data permanently and is irreversible. However, deleting a storagePool does not delete any snapshots previously made from the storagePool. You must separately delete snapshots.
299
+ #
300
+ # @overload delete(request, options = nil)
301
+ # Pass arguments to `delete` via a request object, either of type
302
+ # {::Google::Cloud::Compute::V1::DeleteStoragePoolRequest} or an equivalent Hash.
303
+ #
304
+ # @param request [::Google::Cloud::Compute::V1::DeleteStoragePoolRequest, ::Hash]
305
+ # A request object representing the call parameters. Required. To specify no
306
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
307
+ # @param options [::Gapic::CallOptions, ::Hash]
308
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
309
+ #
310
+ # @overload delete(project: nil, request_id: nil, storage_pool: nil, zone: nil)
311
+ # Pass arguments to `delete` via keyword arguments. Note that at
312
+ # least one keyword argument is required. To specify no parameters, or to keep all
313
+ # the default parameter values, pass an empty Hash as a request object (see above).
314
+ #
315
+ # @param project [::String]
316
+ # Project ID for this request.
317
+ # @param request_id [::String]
318
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
319
+ # @param storage_pool [::String]
320
+ # Name of the storage pool to delete.
321
+ # @param zone [::String]
322
+ # The name of the zone for this request.
323
+ # @yield [result, operation] Access the result along with the TransportOperation object
324
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
325
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
326
+ #
327
+ # @return [::Gapic::GenericLRO::Operation]
328
+ #
329
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
330
+ #
331
+ # @example Basic example
332
+ # require "google/cloud/compute/v1"
333
+ #
334
+ # # Create a client object. The client can be reused for multiple calls.
335
+ # client = Google::Cloud::Compute::V1::StoragePools::Rest::Client.new
336
+ #
337
+ # # Create a request. To set request fields, pass in keyword arguments.
338
+ # request = Google::Cloud::Compute::V1::DeleteStoragePoolRequest.new
339
+ #
340
+ # # Call the delete method.
341
+ # result = client.delete request
342
+ #
343
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
344
+ # p result
345
+ #
346
+ def delete request, options = nil
347
+ raise ::ArgumentError, "request must be provided" if request.nil?
348
+
349
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteStoragePoolRequest
350
+
351
+ # Converts hash and nil to an options object
352
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
353
+
354
+ # Customize the options with defaults
355
+ call_metadata = @config.rpcs.delete.metadata.to_h
356
+
357
+ # Set x-goog-api-client and x-goog-user-project headers
358
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
359
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
360
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
361
+ transports_version_send: [:rest]
362
+
363
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
364
+
365
+ options.apply_defaults timeout: @config.rpcs.delete.timeout,
366
+ metadata: call_metadata,
367
+ retry_policy: @config.rpcs.delete.retry_policy
368
+
369
+ options.apply_defaults timeout: @config.timeout,
370
+ metadata: @config.metadata,
371
+ retry_policy: @config.retry_policy
372
+
373
+ @storage_pools_stub.delete request, options do |result, response|
374
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
375
+ operation: result,
376
+ client: zone_operations,
377
+ request_values: {
378
+ "project" => request.project,
379
+ "zone" => request.zone
380
+ },
381
+ options: options
382
+ )
383
+ yield result, response if block_given?
384
+ return result
385
+ end
386
+ rescue ::Gapic::Rest::Error => e
387
+ raise ::Google::Cloud::Error.from_error(e)
388
+ end
389
+
390
+ ##
391
+ # Returns a specified storage pool. Gets a list of available storage pools by making a list() request.
392
+ #
393
+ # @overload get(request, options = nil)
394
+ # Pass arguments to `get` via a request object, either of type
395
+ # {::Google::Cloud::Compute::V1::GetStoragePoolRequest} or an equivalent Hash.
396
+ #
397
+ # @param request [::Google::Cloud::Compute::V1::GetStoragePoolRequest, ::Hash]
398
+ # A request object representing the call parameters. Required. To specify no
399
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
400
+ # @param options [::Gapic::CallOptions, ::Hash]
401
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
402
+ #
403
+ # @overload get(project: nil, storage_pool: nil, zone: nil)
404
+ # Pass arguments to `get` via keyword arguments. Note that at
405
+ # least one keyword argument is required. To specify no parameters, or to keep all
406
+ # the default parameter values, pass an empty Hash as a request object (see above).
407
+ #
408
+ # @param project [::String]
409
+ # Project ID for this request.
410
+ # @param storage_pool [::String]
411
+ # Name of the storage pool to return.
412
+ # @param zone [::String]
413
+ # The name of the zone for this request.
414
+ # @yield [result, operation] Access the result along with the TransportOperation object
415
+ # @yieldparam result [::Google::Cloud::Compute::V1::StoragePool]
416
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
417
+ #
418
+ # @return [::Google::Cloud::Compute::V1::StoragePool]
419
+ #
420
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
421
+ #
422
+ # @example Basic example
423
+ # require "google/cloud/compute/v1"
424
+ #
425
+ # # Create a client object. The client can be reused for multiple calls.
426
+ # client = Google::Cloud::Compute::V1::StoragePools::Rest::Client.new
427
+ #
428
+ # # Create a request. To set request fields, pass in keyword arguments.
429
+ # request = Google::Cloud::Compute::V1::GetStoragePoolRequest.new
430
+ #
431
+ # # Call the get method.
432
+ # result = client.get request
433
+ #
434
+ # # The returned object is of type Google::Cloud::Compute::V1::StoragePool.
435
+ # p result
436
+ #
437
+ def get request, options = nil
438
+ raise ::ArgumentError, "request must be provided" if request.nil?
439
+
440
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetStoragePoolRequest
441
+
442
+ # Converts hash and nil to an options object
443
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
444
+
445
+ # Customize the options with defaults
446
+ call_metadata = @config.rpcs.get.metadata.to_h
447
+
448
+ # Set x-goog-api-client and x-goog-user-project headers
449
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
450
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
451
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
452
+ transports_version_send: [:rest]
453
+
454
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
455
+
456
+ options.apply_defaults timeout: @config.rpcs.get.timeout,
457
+ metadata: call_metadata,
458
+ retry_policy: @config.rpcs.get.retry_policy
459
+
460
+ options.apply_defaults timeout: @config.timeout,
461
+ metadata: @config.metadata,
462
+ retry_policy: @config.retry_policy
463
+
464
+ @storage_pools_stub.get request, options do |result, operation|
465
+ yield result, operation if block_given?
466
+ return result
467
+ end
468
+ rescue ::Gapic::Rest::Error => e
469
+ raise ::Google::Cloud::Error.from_error(e)
470
+ end
471
+
472
+ ##
473
+ # Gets the access control policy for a resource. May be empty if no such policy or resource exists.
474
+ #
475
+ # @overload get_iam_policy(request, options = nil)
476
+ # Pass arguments to `get_iam_policy` via a request object, either of type
477
+ # {::Google::Cloud::Compute::V1::GetIamPolicyStoragePoolRequest} or an equivalent Hash.
478
+ #
479
+ # @param request [::Google::Cloud::Compute::V1::GetIamPolicyStoragePoolRequest, ::Hash]
480
+ # A request object representing the call parameters. Required. To specify no
481
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
482
+ # @param options [::Gapic::CallOptions, ::Hash]
483
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
484
+ #
485
+ # @overload get_iam_policy(options_requested_policy_version: nil, project: nil, resource: nil, zone: nil)
486
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
487
+ # least one keyword argument is required. To specify no parameters, or to keep all
488
+ # the default parameter values, pass an empty Hash as a request object (see above).
489
+ #
490
+ # @param options_requested_policy_version [::Integer]
491
+ # Requested IAM Policy version.
492
+ # @param project [::String]
493
+ # Project ID for this request.
494
+ # @param resource [::String]
495
+ # Name or id of the resource for this request.
496
+ # @param zone [::String]
497
+ # The name of the zone for this request.
498
+ # @yield [result, operation] Access the result along with the TransportOperation object
499
+ # @yieldparam result [::Google::Cloud::Compute::V1::Policy]
500
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
501
+ #
502
+ # @return [::Google::Cloud::Compute::V1::Policy]
503
+ #
504
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
505
+ #
506
+ # @example Basic example
507
+ # require "google/cloud/compute/v1"
508
+ #
509
+ # # Create a client object. The client can be reused for multiple calls.
510
+ # client = Google::Cloud::Compute::V1::StoragePools::Rest::Client.new
511
+ #
512
+ # # Create a request. To set request fields, pass in keyword arguments.
513
+ # request = Google::Cloud::Compute::V1::GetIamPolicyStoragePoolRequest.new
514
+ #
515
+ # # Call the get_iam_policy method.
516
+ # result = client.get_iam_policy request
517
+ #
518
+ # # The returned object is of type Google::Cloud::Compute::V1::Policy.
519
+ # p result
520
+ #
521
+ def get_iam_policy request, options = nil
522
+ raise ::ArgumentError, "request must be provided" if request.nil?
523
+
524
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetIamPolicyStoragePoolRequest
525
+
526
+ # Converts hash and nil to an options object
527
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
528
+
529
+ # Customize the options with defaults
530
+ call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
531
+
532
+ # Set x-goog-api-client and x-goog-user-project headers
533
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
534
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
535
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
536
+ transports_version_send: [:rest]
537
+
538
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
539
+
540
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
541
+ metadata: call_metadata,
542
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
543
+
544
+ options.apply_defaults timeout: @config.timeout,
545
+ metadata: @config.metadata,
546
+ retry_policy: @config.retry_policy
547
+
548
+ @storage_pools_stub.get_iam_policy request, options do |result, operation|
549
+ yield result, operation if block_given?
550
+ return result
551
+ end
552
+ rescue ::Gapic::Rest::Error => e
553
+ raise ::Google::Cloud::Error.from_error(e)
554
+ end
555
+
556
+ ##
557
+ # Creates a storage pool in the specified project using the data in the request.
558
+ #
559
+ # @overload insert(request, options = nil)
560
+ # Pass arguments to `insert` via a request object, either of type
561
+ # {::Google::Cloud::Compute::V1::InsertStoragePoolRequest} or an equivalent Hash.
562
+ #
563
+ # @param request [::Google::Cloud::Compute::V1::InsertStoragePoolRequest, ::Hash]
564
+ # A request object representing the call parameters. Required. To specify no
565
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
566
+ # @param options [::Gapic::CallOptions, ::Hash]
567
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
568
+ #
569
+ # @overload insert(project: nil, request_id: nil, storage_pool_resource: nil, zone: nil)
570
+ # Pass arguments to `insert` via keyword arguments. Note that at
571
+ # least one keyword argument is required. To specify no parameters, or to keep all
572
+ # the default parameter values, pass an empty Hash as a request object (see above).
573
+ #
574
+ # @param project [::String]
575
+ # Project ID for this request.
576
+ # @param request_id [::String]
577
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
578
+ # @param storage_pool_resource [::Google::Cloud::Compute::V1::StoragePool, ::Hash]
579
+ # The body resource for this request
580
+ # @param zone [::String]
581
+ # The name of the zone for this request.
582
+ # @yield [result, operation] Access the result along with the TransportOperation object
583
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
584
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
585
+ #
586
+ # @return [::Gapic::GenericLRO::Operation]
587
+ #
588
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
589
+ #
590
+ # @example Basic example
591
+ # require "google/cloud/compute/v1"
592
+ #
593
+ # # Create a client object. The client can be reused for multiple calls.
594
+ # client = Google::Cloud::Compute::V1::StoragePools::Rest::Client.new
595
+ #
596
+ # # Create a request. To set request fields, pass in keyword arguments.
597
+ # request = Google::Cloud::Compute::V1::InsertStoragePoolRequest.new
598
+ #
599
+ # # Call the insert method.
600
+ # result = client.insert request
601
+ #
602
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
603
+ # p result
604
+ #
605
+ def insert request, options = nil
606
+ raise ::ArgumentError, "request must be provided" if request.nil?
607
+
608
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertStoragePoolRequest
609
+
610
+ # Converts hash and nil to an options object
611
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
612
+
613
+ # Customize the options with defaults
614
+ call_metadata = @config.rpcs.insert.metadata.to_h
615
+
616
+ # Set x-goog-api-client and x-goog-user-project headers
617
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
618
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
619
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
620
+ transports_version_send: [:rest]
621
+
622
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
623
+
624
+ options.apply_defaults timeout: @config.rpcs.insert.timeout,
625
+ metadata: call_metadata,
626
+ retry_policy: @config.rpcs.insert.retry_policy
627
+
628
+ options.apply_defaults timeout: @config.timeout,
629
+ metadata: @config.metadata,
630
+ retry_policy: @config.retry_policy
631
+
632
+ @storage_pools_stub.insert request, options do |result, response|
633
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
634
+ operation: result,
635
+ client: zone_operations,
636
+ request_values: {
637
+ "project" => request.project,
638
+ "zone" => request.zone
639
+ },
640
+ options: options
641
+ )
642
+ yield result, response if block_given?
643
+ return result
644
+ end
645
+ rescue ::Gapic::Rest::Error => e
646
+ raise ::Google::Cloud::Error.from_error(e)
647
+ end
648
+
649
+ ##
650
+ # Retrieves a list of storage pools contained within the specified zone.
651
+ #
652
+ # @overload list(request, options = nil)
653
+ # Pass arguments to `list` via a request object, either of type
654
+ # {::Google::Cloud::Compute::V1::ListStoragePoolsRequest} or an equivalent Hash.
655
+ #
656
+ # @param request [::Google::Cloud::Compute::V1::ListStoragePoolsRequest, ::Hash]
657
+ # A request object representing the call parameters. Required. To specify no
658
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
659
+ # @param options [::Gapic::CallOptions, ::Hash]
660
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
661
+ #
662
+ # @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, zone: nil)
663
+ # Pass arguments to `list` via keyword arguments. Note that at
664
+ # least one keyword argument is required. To specify no parameters, or to keep all
665
+ # the default parameter values, pass an empty Hash as a request object (see above).
666
+ #
667
+ # @param filter [::String]
668
+ # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.
669
+ # @param max_results [::Integer]
670
+ # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
671
+ # @param order_by [::String]
672
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
673
+ # @param page_token [::String]
674
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
675
+ # @param project [::String]
676
+ # Project ID for this request.
677
+ # @param return_partial_success [::Boolean]
678
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.
679
+ # @param zone [::String]
680
+ # The name of the zone for this request.
681
+ # @yield [result, operation] Access the result along with the TransportOperation object
682
+ # @yieldparam result [::Google::Cloud::Compute::V1::StoragePoolList]
683
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
684
+ #
685
+ # @return [::Google::Cloud::Compute::V1::StoragePoolList]
686
+ #
687
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
688
+ #
689
+ # @example Basic example
690
+ # require "google/cloud/compute/v1"
691
+ #
692
+ # # Create a client object. The client can be reused for multiple calls.
693
+ # client = Google::Cloud::Compute::V1::StoragePools::Rest::Client.new
694
+ #
695
+ # # Create a request. To set request fields, pass in keyword arguments.
696
+ # request = Google::Cloud::Compute::V1::ListStoragePoolsRequest.new
697
+ #
698
+ # # Call the list method.
699
+ # result = client.list request
700
+ #
701
+ # # The returned object is of type Google::Cloud::Compute::V1::StoragePoolList.
702
+ # p result
703
+ #
704
+ def list request, options = nil
705
+ raise ::ArgumentError, "request must be provided" if request.nil?
706
+
707
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListStoragePoolsRequest
708
+
709
+ # Converts hash and nil to an options object
710
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
711
+
712
+ # Customize the options with defaults
713
+ call_metadata = @config.rpcs.list.metadata.to_h
714
+
715
+ # Set x-goog-api-client and x-goog-user-project headers
716
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
717
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
718
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
719
+ transports_version_send: [:rest]
720
+
721
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
722
+
723
+ options.apply_defaults timeout: @config.rpcs.list.timeout,
724
+ metadata: call_metadata,
725
+ retry_policy: @config.rpcs.list.retry_policy
726
+
727
+ options.apply_defaults timeout: @config.timeout,
728
+ metadata: @config.metadata,
729
+ retry_policy: @config.retry_policy
730
+
731
+ @storage_pools_stub.list request, options do |result, operation|
732
+ yield result, operation if block_given?
733
+ return result
734
+ end
735
+ rescue ::Gapic::Rest::Error => e
736
+ raise ::Google::Cloud::Error.from_error(e)
737
+ end
738
+
739
+ ##
740
+ # Lists the disks in a specified storage pool.
741
+ #
742
+ # @overload list_disks(request, options = nil)
743
+ # Pass arguments to `list_disks` via a request object, either of type
744
+ # {::Google::Cloud::Compute::V1::ListDisksStoragePoolsRequest} or an equivalent Hash.
745
+ #
746
+ # @param request [::Google::Cloud::Compute::V1::ListDisksStoragePoolsRequest, ::Hash]
747
+ # A request object representing the call parameters. Required. To specify no
748
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
749
+ # @param options [::Gapic::CallOptions, ::Hash]
750
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
751
+ #
752
+ # @overload list_disks(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, storage_pool: nil, zone: nil)
753
+ # Pass arguments to `list_disks` via keyword arguments. Note that at
754
+ # least one keyword argument is required. To specify no parameters, or to keep all
755
+ # the default parameter values, pass an empty Hash as a request object (see above).
756
+ #
757
+ # @param filter [::String]
758
+ # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.
759
+ # @param max_results [::Integer]
760
+ # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
761
+ # @param order_by [::String]
762
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
763
+ # @param page_token [::String]
764
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
765
+ # @param project [::String]
766
+ # Project ID for this request.
767
+ # @param return_partial_success [::Boolean]
768
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.
769
+ # @param storage_pool [::String]
770
+ # Name of the storage pool to list disks of.
771
+ # @param zone [::String]
772
+ # The name of the zone for this request.
773
+ # @yield [result, operation] Access the result along with the TransportOperation object
774
+ # @yieldparam result [::Google::Cloud::Compute::V1::StoragePoolListDisks]
775
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
776
+ #
777
+ # @return [::Google::Cloud::Compute::V1::StoragePoolListDisks]
778
+ #
779
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
780
+ #
781
+ # @example Basic example
782
+ # require "google/cloud/compute/v1"
783
+ #
784
+ # # Create a client object. The client can be reused for multiple calls.
785
+ # client = Google::Cloud::Compute::V1::StoragePools::Rest::Client.new
786
+ #
787
+ # # Create a request. To set request fields, pass in keyword arguments.
788
+ # request = Google::Cloud::Compute::V1::ListDisksStoragePoolsRequest.new
789
+ #
790
+ # # Call the list_disks method.
791
+ # result = client.list_disks request
792
+ #
793
+ # # The returned object is of type Google::Cloud::Compute::V1::StoragePoolListDisks.
794
+ # p result
795
+ #
796
+ def list_disks request, options = nil
797
+ raise ::ArgumentError, "request must be provided" if request.nil?
798
+
799
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListDisksStoragePoolsRequest
800
+
801
+ # Converts hash and nil to an options object
802
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
803
+
804
+ # Customize the options with defaults
805
+ call_metadata = @config.rpcs.list_disks.metadata.to_h
806
+
807
+ # Set x-goog-api-client and x-goog-user-project headers
808
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
809
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
810
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
811
+ transports_version_send: [:rest]
812
+
813
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
814
+
815
+ options.apply_defaults timeout: @config.rpcs.list_disks.timeout,
816
+ metadata: call_metadata,
817
+ retry_policy: @config.rpcs.list_disks.retry_policy
818
+
819
+ options.apply_defaults timeout: @config.timeout,
820
+ metadata: @config.metadata,
821
+ retry_policy: @config.retry_policy
822
+
823
+ @storage_pools_stub.list_disks request, options do |result, operation|
824
+ yield result, operation if block_given?
825
+ return result
826
+ end
827
+ rescue ::Gapic::Rest::Error => e
828
+ raise ::Google::Cloud::Error.from_error(e)
829
+ end
830
+
831
+ ##
832
+ # Sets the access control policy on the specified resource. Replaces any existing policy.
833
+ #
834
+ # @overload set_iam_policy(request, options = nil)
835
+ # Pass arguments to `set_iam_policy` via a request object, either of type
836
+ # {::Google::Cloud::Compute::V1::SetIamPolicyStoragePoolRequest} or an equivalent Hash.
837
+ #
838
+ # @param request [::Google::Cloud::Compute::V1::SetIamPolicyStoragePoolRequest, ::Hash]
839
+ # A request object representing the call parameters. Required. To specify no
840
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
841
+ # @param options [::Gapic::CallOptions, ::Hash]
842
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
843
+ #
844
+ # @overload set_iam_policy(project: nil, resource: nil, zone: nil, zone_set_policy_request_resource: nil)
845
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
846
+ # least one keyword argument is required. To specify no parameters, or to keep all
847
+ # the default parameter values, pass an empty Hash as a request object (see above).
848
+ #
849
+ # @param project [::String]
850
+ # Project ID for this request.
851
+ # @param resource [::String]
852
+ # Name or id of the resource for this request.
853
+ # @param zone [::String]
854
+ # The name of the zone for this request.
855
+ # @param zone_set_policy_request_resource [::Google::Cloud::Compute::V1::ZoneSetPolicyRequest, ::Hash]
856
+ # The body resource for this request
857
+ # @yield [result, operation] Access the result along with the TransportOperation object
858
+ # @yieldparam result [::Google::Cloud::Compute::V1::Policy]
859
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
860
+ #
861
+ # @return [::Google::Cloud::Compute::V1::Policy]
862
+ #
863
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
864
+ #
865
+ # @example Basic example
866
+ # require "google/cloud/compute/v1"
867
+ #
868
+ # # Create a client object. The client can be reused for multiple calls.
869
+ # client = Google::Cloud::Compute::V1::StoragePools::Rest::Client.new
870
+ #
871
+ # # Create a request. To set request fields, pass in keyword arguments.
872
+ # request = Google::Cloud::Compute::V1::SetIamPolicyStoragePoolRequest.new
873
+ #
874
+ # # Call the set_iam_policy method.
875
+ # result = client.set_iam_policy request
876
+ #
877
+ # # The returned object is of type Google::Cloud::Compute::V1::Policy.
878
+ # p result
879
+ #
880
+ def set_iam_policy request, options = nil
881
+ raise ::ArgumentError, "request must be provided" if request.nil?
882
+
883
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetIamPolicyStoragePoolRequest
884
+
885
+ # Converts hash and nil to an options object
886
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
887
+
888
+ # Customize the options with defaults
889
+ call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
890
+
891
+ # Set x-goog-api-client and x-goog-user-project headers
892
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
893
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
894
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
895
+ transports_version_send: [:rest]
896
+
897
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
898
+
899
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
900
+ metadata: call_metadata,
901
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
902
+
903
+ options.apply_defaults timeout: @config.timeout,
904
+ metadata: @config.metadata,
905
+ retry_policy: @config.retry_policy
906
+
907
+ @storage_pools_stub.set_iam_policy request, options do |result, operation|
908
+ yield result, operation if block_given?
909
+ return result
910
+ end
911
+ rescue ::Gapic::Rest::Error => e
912
+ raise ::Google::Cloud::Error.from_error(e)
913
+ end
914
+
915
+ ##
916
+ # Returns permissions that a caller has on the specified resource.
917
+ #
918
+ # @overload test_iam_permissions(request, options = nil)
919
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
920
+ # {::Google::Cloud::Compute::V1::TestIamPermissionsStoragePoolRequest} or an equivalent Hash.
921
+ #
922
+ # @param request [::Google::Cloud::Compute::V1::TestIamPermissionsStoragePoolRequest, ::Hash]
923
+ # A request object representing the call parameters. Required. To specify no
924
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
925
+ # @param options [::Gapic::CallOptions, ::Hash]
926
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
927
+ #
928
+ # @overload test_iam_permissions(project: nil, resource: nil, test_permissions_request_resource: nil, zone: nil)
929
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
930
+ # least one keyword argument is required. To specify no parameters, or to keep all
931
+ # the default parameter values, pass an empty Hash as a request object (see above).
932
+ #
933
+ # @param project [::String]
934
+ # Project ID for this request.
935
+ # @param resource [::String]
936
+ # Name or id of the resource for this request.
937
+ # @param test_permissions_request_resource [::Google::Cloud::Compute::V1::TestPermissionsRequest, ::Hash]
938
+ # The body resource for this request
939
+ # @param zone [::String]
940
+ # The name of the zone for this request.
941
+ # @yield [result, operation] Access the result along with the TransportOperation object
942
+ # @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
943
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
944
+ #
945
+ # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
946
+ #
947
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
948
+ #
949
+ # @example Basic example
950
+ # require "google/cloud/compute/v1"
951
+ #
952
+ # # Create a client object. The client can be reused for multiple calls.
953
+ # client = Google::Cloud::Compute::V1::StoragePools::Rest::Client.new
954
+ #
955
+ # # Create a request. To set request fields, pass in keyword arguments.
956
+ # request = Google::Cloud::Compute::V1::TestIamPermissionsStoragePoolRequest.new
957
+ #
958
+ # # Call the test_iam_permissions method.
959
+ # result = client.test_iam_permissions request
960
+ #
961
+ # # The returned object is of type Google::Cloud::Compute::V1::TestPermissionsResponse.
962
+ # p result
963
+ #
964
+ def test_iam_permissions request, options = nil
965
+ raise ::ArgumentError, "request must be provided" if request.nil?
966
+
967
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::TestIamPermissionsStoragePoolRequest
968
+
969
+ # Converts hash and nil to an options object
970
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
971
+
972
+ # Customize the options with defaults
973
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
974
+
975
+ # Set x-goog-api-client and x-goog-user-project headers
976
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
977
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
978
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
979
+ transports_version_send: [:rest]
980
+
981
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
982
+
983
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
984
+ metadata: call_metadata,
985
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
986
+
987
+ options.apply_defaults timeout: @config.timeout,
988
+ metadata: @config.metadata,
989
+ retry_policy: @config.retry_policy
990
+
991
+ @storage_pools_stub.test_iam_permissions request, options do |result, operation|
992
+ yield result, operation if block_given?
993
+ return result
994
+ end
995
+ rescue ::Gapic::Rest::Error => e
996
+ raise ::Google::Cloud::Error.from_error(e)
997
+ end
998
+
999
+ ##
1000
+ # Updates the specified storagePool with the data included in the request. The update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: size_tb and provisioned_iops.
1001
+ #
1002
+ # @overload update(request, options = nil)
1003
+ # Pass arguments to `update` via a request object, either of type
1004
+ # {::Google::Cloud::Compute::V1::UpdateStoragePoolRequest} or an equivalent Hash.
1005
+ #
1006
+ # @param request [::Google::Cloud::Compute::V1::UpdateStoragePoolRequest, ::Hash]
1007
+ # A request object representing the call parameters. Required. To specify no
1008
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1009
+ # @param options [::Gapic::CallOptions, ::Hash]
1010
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1011
+ #
1012
+ # @overload update(project: nil, request_id: nil, storage_pool: nil, storage_pool_resource: nil, update_mask: nil, zone: nil)
1013
+ # Pass arguments to `update` via keyword arguments. Note that at
1014
+ # least one keyword argument is required. To specify no parameters, or to keep all
1015
+ # the default parameter values, pass an empty Hash as a request object (see above).
1016
+ #
1017
+ # @param project [::String]
1018
+ # Project ID for this request.
1019
+ # @param request_id [::String]
1020
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1021
+ # @param storage_pool [::String]
1022
+ # The storagePool name for this request.
1023
+ # @param storage_pool_resource [::Google::Cloud::Compute::V1::StoragePool, ::Hash]
1024
+ # The body resource for this request
1025
+ # @param update_mask [::String]
1026
+ # update_mask indicates fields to be updated as part of this request.
1027
+ # @param zone [::String]
1028
+ # The name of the zone for this request.
1029
+ # @yield [result, operation] Access the result along with the TransportOperation object
1030
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1031
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1032
+ #
1033
+ # @return [::Gapic::GenericLRO::Operation]
1034
+ #
1035
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1036
+ #
1037
+ # @example Basic example
1038
+ # require "google/cloud/compute/v1"
1039
+ #
1040
+ # # Create a client object. The client can be reused for multiple calls.
1041
+ # client = Google::Cloud::Compute::V1::StoragePools::Rest::Client.new
1042
+ #
1043
+ # # Create a request. To set request fields, pass in keyword arguments.
1044
+ # request = Google::Cloud::Compute::V1::UpdateStoragePoolRequest.new
1045
+ #
1046
+ # # Call the update method.
1047
+ # result = client.update request
1048
+ #
1049
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
1050
+ # p result
1051
+ #
1052
+ def update request, options = nil
1053
+ raise ::ArgumentError, "request must be provided" if request.nil?
1054
+
1055
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::UpdateStoragePoolRequest
1056
+
1057
+ # Converts hash and nil to an options object
1058
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1059
+
1060
+ # Customize the options with defaults
1061
+ call_metadata = @config.rpcs.update.metadata.to_h
1062
+
1063
+ # Set x-goog-api-client and x-goog-user-project headers
1064
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1065
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1066
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1067
+ transports_version_send: [:rest]
1068
+
1069
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1070
+
1071
+ options.apply_defaults timeout: @config.rpcs.update.timeout,
1072
+ metadata: call_metadata,
1073
+ retry_policy: @config.rpcs.update.retry_policy
1074
+
1075
+ options.apply_defaults timeout: @config.timeout,
1076
+ metadata: @config.metadata,
1077
+ retry_policy: @config.retry_policy
1078
+
1079
+ @storage_pools_stub.update request, options do |result, response|
1080
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
1081
+ operation: result,
1082
+ client: zone_operations,
1083
+ request_values: {
1084
+ "project" => request.project,
1085
+ "zone" => request.zone
1086
+ },
1087
+ options: options
1088
+ )
1089
+ yield result, response if block_given?
1090
+ return result
1091
+ end
1092
+ rescue ::Gapic::Rest::Error => e
1093
+ raise ::Google::Cloud::Error.from_error(e)
1094
+ end
1095
+
1096
+ ##
1097
+ # Configuration class for the StoragePools REST API.
1098
+ #
1099
+ # This class represents the configuration for StoragePools REST,
1100
+ # providing control over timeouts, retry behavior, logging, transport
1101
+ # parameters, and other low-level controls. Certain parameters can also be
1102
+ # applied individually to specific RPCs. See
1103
+ # {::Google::Cloud::Compute::V1::StoragePools::Rest::Client::Configuration::Rpcs}
1104
+ # for a list of RPCs that can be configured independently.
1105
+ #
1106
+ # Configuration can be applied globally to all clients, or to a single client
1107
+ # on construction.
1108
+ #
1109
+ # @example
1110
+ #
1111
+ # # Modify the global config, setting the timeout for
1112
+ # # aggregated_list to 20 seconds,
1113
+ # # and all remaining timeouts to 10 seconds.
1114
+ # ::Google::Cloud::Compute::V1::StoragePools::Rest::Client.configure do |config|
1115
+ # config.timeout = 10.0
1116
+ # config.rpcs.aggregated_list.timeout = 20.0
1117
+ # end
1118
+ #
1119
+ # # Apply the above configuration only to a new client.
1120
+ # client = ::Google::Cloud::Compute::V1::StoragePools::Rest::Client.new do |config|
1121
+ # config.timeout = 10.0
1122
+ # config.rpcs.aggregated_list.timeout = 20.0
1123
+ # end
1124
+ #
1125
+ # @!attribute [rw] endpoint
1126
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1127
+ # nil, indicating to use the default endpoint in the current universe domain.
1128
+ # @return [::String,nil]
1129
+ # @!attribute [rw] credentials
1130
+ # Credentials to send with calls. You may provide any of the following types:
1131
+ # * (`String`) The path to a service account key file in JSON format
1132
+ # * (`Hash`) A service account key as a Hash
1133
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1134
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1135
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1136
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1137
+ # * (`nil`) indicating no credentials
1138
+ # @return [::Object]
1139
+ # @!attribute [rw] scope
1140
+ # The OAuth scopes
1141
+ # @return [::Array<::String>]
1142
+ # @!attribute [rw] lib_name
1143
+ # The library name as recorded in instrumentation and logging
1144
+ # @return [::String]
1145
+ # @!attribute [rw] lib_version
1146
+ # The library version as recorded in instrumentation and logging
1147
+ # @return [::String]
1148
+ # @!attribute [rw] timeout
1149
+ # The call timeout in seconds.
1150
+ # @return [::Numeric]
1151
+ # @!attribute [rw] metadata
1152
+ # Additional headers to be sent with the call.
1153
+ # @return [::Hash{::Symbol=>::String}]
1154
+ # @!attribute [rw] retry_policy
1155
+ # The retry policy. The value is a hash with the following keys:
1156
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1157
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1158
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1159
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1160
+ # trigger a retry.
1161
+ # @return [::Hash]
1162
+ # @!attribute [rw] quota_project
1163
+ # A separate project against which to charge quota.
1164
+ # @return [::String]
1165
+ # @!attribute [rw] universe_domain
1166
+ # The universe domain within which to make requests. This determines the
1167
+ # default endpoint URL. The default value of nil uses the environment
1168
+ # universe (usually the default "googleapis.com" universe).
1169
+ # @return [::String,nil]
1170
+ #
1171
+ class Configuration
1172
+ extend ::Gapic::Config
1173
+
1174
+ # @private
1175
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1176
+ DEFAULT_ENDPOINT = "compute.googleapis.com"
1177
+
1178
+ config_attr :endpoint, nil, ::String, nil
1179
+ config_attr :credentials, nil do |value|
1180
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1181
+ allowed.any? { |klass| klass === value }
1182
+ end
1183
+ config_attr :scope, nil, ::String, ::Array, nil
1184
+ config_attr :lib_name, nil, ::String, nil
1185
+ config_attr :lib_version, nil, ::String, nil
1186
+ config_attr :timeout, nil, ::Numeric, nil
1187
+ config_attr :metadata, nil, ::Hash, nil
1188
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1189
+ config_attr :quota_project, nil, ::String, nil
1190
+ config_attr :universe_domain, nil, ::String, nil
1191
+
1192
+ # @private
1193
+ def initialize parent_config = nil
1194
+ @parent_config = parent_config unless parent_config.nil?
1195
+
1196
+ yield self if block_given?
1197
+ end
1198
+
1199
+ ##
1200
+ # Configurations for individual RPCs
1201
+ # @return [Rpcs]
1202
+ #
1203
+ def rpcs
1204
+ @rpcs ||= begin
1205
+ parent_rpcs = nil
1206
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1207
+ Rpcs.new parent_rpcs
1208
+ end
1209
+ end
1210
+
1211
+ ##
1212
+ # Configuration RPC class for the StoragePools API.
1213
+ #
1214
+ # Includes fields providing the configuration for each RPC in this service.
1215
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1216
+ # the following configuration fields:
1217
+ #
1218
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1219
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1220
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1221
+ # include the following keys:
1222
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1223
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1224
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1225
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1226
+ # trigger a retry.
1227
+ #
1228
+ class Rpcs
1229
+ ##
1230
+ # RPC-specific configuration for `aggregated_list`
1231
+ # @return [::Gapic::Config::Method]
1232
+ #
1233
+ attr_reader :aggregated_list
1234
+ ##
1235
+ # RPC-specific configuration for `delete`
1236
+ # @return [::Gapic::Config::Method]
1237
+ #
1238
+ attr_reader :delete
1239
+ ##
1240
+ # RPC-specific configuration for `get`
1241
+ # @return [::Gapic::Config::Method]
1242
+ #
1243
+ attr_reader :get
1244
+ ##
1245
+ # RPC-specific configuration for `get_iam_policy`
1246
+ # @return [::Gapic::Config::Method]
1247
+ #
1248
+ attr_reader :get_iam_policy
1249
+ ##
1250
+ # RPC-specific configuration for `insert`
1251
+ # @return [::Gapic::Config::Method]
1252
+ #
1253
+ attr_reader :insert
1254
+ ##
1255
+ # RPC-specific configuration for `list`
1256
+ # @return [::Gapic::Config::Method]
1257
+ #
1258
+ attr_reader :list
1259
+ ##
1260
+ # RPC-specific configuration for `list_disks`
1261
+ # @return [::Gapic::Config::Method]
1262
+ #
1263
+ attr_reader :list_disks
1264
+ ##
1265
+ # RPC-specific configuration for `set_iam_policy`
1266
+ # @return [::Gapic::Config::Method]
1267
+ #
1268
+ attr_reader :set_iam_policy
1269
+ ##
1270
+ # RPC-specific configuration for `test_iam_permissions`
1271
+ # @return [::Gapic::Config::Method]
1272
+ #
1273
+ attr_reader :test_iam_permissions
1274
+ ##
1275
+ # RPC-specific configuration for `update`
1276
+ # @return [::Gapic::Config::Method]
1277
+ #
1278
+ attr_reader :update
1279
+
1280
+ # @private
1281
+ def initialize parent_rpcs = nil
1282
+ aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
1283
+ @aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
1284
+ delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
1285
+ @delete = ::Gapic::Config::Method.new delete_config
1286
+ get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
1287
+ @get = ::Gapic::Config::Method.new get_config
1288
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
1289
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
1290
+ insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
1291
+ @insert = ::Gapic::Config::Method.new insert_config
1292
+ list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
1293
+ @list = ::Gapic::Config::Method.new list_config
1294
+ list_disks_config = parent_rpcs.list_disks if parent_rpcs.respond_to? :list_disks
1295
+ @list_disks = ::Gapic::Config::Method.new list_disks_config
1296
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
1297
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
1298
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1299
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1300
+ update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
1301
+ @update = ::Gapic::Config::Method.new update_config
1302
+
1303
+ yield self if block_given?
1304
+ end
1305
+ end
1306
+ end
1307
+ end
1308
+ end
1309
+ end
1310
+ end
1311
+ end
1312
+ end
1313
+ end