google-cloud-compute-v1 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +83 -21
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +93 -24
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +90 -21
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +97 -30
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +53 -12
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +68 -15
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +33 -6
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +63 -15
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +53 -12
- data/lib/google/cloud/compute/v1/global_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/global_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/global_organization_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +53 -12
- data/lib/google/cloud/compute/v1/images/rest/client.rb +63 -15
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +167 -42
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +68 -15
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +33 -6
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +365 -96
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +33 -6
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +33 -6
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +83 -21
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +79 -18
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +103 -27
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +90 -21
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +167 -42
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +24 -3
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +24 -3
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/region_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/region_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +33 -6
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +73 -18
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +33 -6
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +68 -15
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +53 -12
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +83 -21
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +90 -21
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +73 -18
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +53 -12
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +63 -15
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/zone_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/zone_operations.rb +1 -0
- data/lib/google/cloud/compute/v1.rb +2 -0
- metadata +6 -2
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
21
|
require "google/cloud/compute/v1/region_autoscalers/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/region_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -138,9 +139,21 @@ module Google
|
|
138
139
|
credentials = Credentials.new credentials, scope: @config.scope
|
139
140
|
end
|
140
141
|
|
142
|
+
@region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
|
143
|
+
config.credentials = credentials
|
144
|
+
config.endpoint = @config.endpoint
|
145
|
+
end
|
146
|
+
|
141
147
|
@region_autoscalers_stub = ::Google::Cloud::Compute::V1::RegionAutoscalers::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
142
148
|
end
|
143
149
|
|
150
|
+
##
|
151
|
+
# Get the associated client for long-running operations via RegionOperations.
|
152
|
+
#
|
153
|
+
# @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
|
154
|
+
#
|
155
|
+
attr_reader :region_operations
|
156
|
+
|
144
157
|
# Service calls
|
145
158
|
|
146
159
|
##
|
@@ -172,10 +185,10 @@ module Google
|
|
172
185
|
# @param request_id [::String]
|
173
186
|
# 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).
|
174
187
|
# @yield [result, response] Access the result along with the Faraday response object
|
175
|
-
# @yieldparam result [::Gapic::
|
188
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
176
189
|
# @yieldparam response [::Faraday::Response]
|
177
190
|
#
|
178
|
-
# @return [::Gapic::
|
191
|
+
# @return [::Gapic::GenericLRO::Operation]
|
179
192
|
#
|
180
193
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
181
194
|
def delete request, options = nil
|
@@ -202,7 +215,15 @@ module Google
|
|
202
215
|
metadata: @config.metadata
|
203
216
|
|
204
217
|
@region_autoscalers_stub.delete request, options do |result, response|
|
205
|
-
result = ::
|
218
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
219
|
+
operation: result,
|
220
|
+
client: region_operations,
|
221
|
+
request_values: {
|
222
|
+
"project" => request.project,
|
223
|
+
"region" => request.region
|
224
|
+
},
|
225
|
+
options: options
|
226
|
+
)
|
206
227
|
yield result, response if block_given?
|
207
228
|
return result
|
208
229
|
end
|
@@ -305,10 +326,10 @@ module Google
|
|
305
326
|
# @param request_id [::String]
|
306
327
|
# 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).
|
307
328
|
# @yield [result, response] Access the result along with the Faraday response object
|
308
|
-
# @yieldparam result [::Gapic::
|
329
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
309
330
|
# @yieldparam response [::Faraday::Response]
|
310
331
|
#
|
311
|
-
# @return [::Gapic::
|
332
|
+
# @return [::Gapic::GenericLRO::Operation]
|
312
333
|
#
|
313
334
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
314
335
|
def insert request, options = nil
|
@@ -335,7 +356,15 @@ module Google
|
|
335
356
|
metadata: @config.metadata
|
336
357
|
|
337
358
|
@region_autoscalers_stub.insert request, options do |result, response|
|
338
|
-
result = ::
|
359
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
360
|
+
operation: result,
|
361
|
+
client: region_operations,
|
362
|
+
request_values: {
|
363
|
+
"project" => request.project,
|
364
|
+
"region" => request.region
|
365
|
+
},
|
366
|
+
options: options
|
367
|
+
)
|
339
368
|
yield result, response if block_given?
|
340
369
|
return result
|
341
370
|
end
|
@@ -449,10 +478,10 @@ module Google
|
|
449
478
|
# @param request_id [::String]
|
450
479
|
# 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).
|
451
480
|
# @yield [result, response] Access the result along with the Faraday response object
|
452
|
-
# @yieldparam result [::Gapic::
|
481
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
453
482
|
# @yieldparam response [::Faraday::Response]
|
454
483
|
#
|
455
|
-
# @return [::Gapic::
|
484
|
+
# @return [::Gapic::GenericLRO::Operation]
|
456
485
|
#
|
457
486
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
458
487
|
def patch request, options = nil
|
@@ -479,7 +508,15 @@ module Google
|
|
479
508
|
metadata: @config.metadata
|
480
509
|
|
481
510
|
@region_autoscalers_stub.patch request, options do |result, response|
|
482
|
-
result = ::
|
511
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
512
|
+
operation: result,
|
513
|
+
client: region_operations,
|
514
|
+
request_values: {
|
515
|
+
"project" => request.project,
|
516
|
+
"region" => request.region
|
517
|
+
},
|
518
|
+
options: options
|
519
|
+
)
|
483
520
|
yield result, response if block_given?
|
484
521
|
return result
|
485
522
|
end
|
@@ -519,10 +556,10 @@ module Google
|
|
519
556
|
# @param request_id [::String]
|
520
557
|
# 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).
|
521
558
|
# @yield [result, response] Access the result along with the Faraday response object
|
522
|
-
# @yieldparam result [::Gapic::
|
559
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
523
560
|
# @yieldparam response [::Faraday::Response]
|
524
561
|
#
|
525
|
-
# @return [::Gapic::
|
562
|
+
# @return [::Gapic::GenericLRO::Operation]
|
526
563
|
#
|
527
564
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
528
565
|
def update request, options = nil
|
@@ -549,7 +586,15 @@ module Google
|
|
549
586
|
metadata: @config.metadata
|
550
587
|
|
551
588
|
@region_autoscalers_stub.update request, options do |result, response|
|
552
|
-
result = ::
|
589
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
590
|
+
operation: result,
|
591
|
+
client: region_operations,
|
592
|
+
request_values: {
|
593
|
+
"project" => request.project,
|
594
|
+
"region" => request.region
|
595
|
+
},
|
596
|
+
options: options
|
597
|
+
)
|
553
598
|
yield result, response if block_given?
|
554
599
|
return result
|
555
600
|
end
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
21
|
require "google/cloud/compute/v1/region_backend_services/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/region_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -140,9 +141,21 @@ module Google
|
|
140
141
|
credentials = Credentials.new credentials, scope: @config.scope
|
141
142
|
end
|
142
143
|
|
144
|
+
@region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
|
145
|
+
config.credentials = credentials
|
146
|
+
config.endpoint = @config.endpoint
|
147
|
+
end
|
148
|
+
|
143
149
|
@region_backend_services_stub = ::Google::Cloud::Compute::V1::RegionBackendServices::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
144
150
|
end
|
145
151
|
|
152
|
+
##
|
153
|
+
# Get the associated client for long-running operations via RegionOperations.
|
154
|
+
#
|
155
|
+
# @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
|
156
|
+
#
|
157
|
+
attr_reader :region_operations
|
158
|
+
|
146
159
|
# Service calls
|
147
160
|
|
148
161
|
##
|
@@ -174,10 +187,10 @@ module Google
|
|
174
187
|
# @param request_id [::String]
|
175
188
|
# 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).
|
176
189
|
# @yield [result, response] Access the result along with the Faraday response object
|
177
|
-
# @yieldparam result [::Gapic::
|
190
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
178
191
|
# @yieldparam response [::Faraday::Response]
|
179
192
|
#
|
180
|
-
# @return [::Gapic::
|
193
|
+
# @return [::Gapic::GenericLRO::Operation]
|
181
194
|
#
|
182
195
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
183
196
|
def delete request, options = nil
|
@@ -204,7 +217,15 @@ module Google
|
|
204
217
|
metadata: @config.metadata
|
205
218
|
|
206
219
|
@region_backend_services_stub.delete request, options do |result, response|
|
207
|
-
result = ::
|
220
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
221
|
+
operation: result,
|
222
|
+
client: region_operations,
|
223
|
+
request_values: {
|
224
|
+
"project" => request.project,
|
225
|
+
"region" => request.region
|
226
|
+
},
|
227
|
+
options: options
|
228
|
+
)
|
208
229
|
yield result, response if block_given?
|
209
230
|
return result
|
210
231
|
end
|
@@ -373,10 +394,10 @@ module Google
|
|
373
394
|
# @param request_id [::String]
|
374
395
|
# 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).
|
375
396
|
# @yield [result, response] Access the result along with the Faraday response object
|
376
|
-
# @yieldparam result [::Gapic::
|
397
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
377
398
|
# @yieldparam response [::Faraday::Response]
|
378
399
|
#
|
379
|
-
# @return [::Gapic::
|
400
|
+
# @return [::Gapic::GenericLRO::Operation]
|
380
401
|
#
|
381
402
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
382
403
|
def insert request, options = nil
|
@@ -403,7 +424,15 @@ module Google
|
|
403
424
|
metadata: @config.metadata
|
404
425
|
|
405
426
|
@region_backend_services_stub.insert request, options do |result, response|
|
406
|
-
result = ::
|
427
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
428
|
+
operation: result,
|
429
|
+
client: region_operations,
|
430
|
+
request_values: {
|
431
|
+
"project" => request.project,
|
432
|
+
"region" => request.region
|
433
|
+
},
|
434
|
+
options: options
|
435
|
+
)
|
407
436
|
yield result, response if block_given?
|
408
437
|
return result
|
409
438
|
end
|
@@ -517,10 +546,10 @@ module Google
|
|
517
546
|
# @param request_id [::String]
|
518
547
|
# 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).
|
519
548
|
# @yield [result, response] Access the result along with the Faraday response object
|
520
|
-
# @yieldparam result [::Gapic::
|
549
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
521
550
|
# @yieldparam response [::Faraday::Response]
|
522
551
|
#
|
523
|
-
# @return [::Gapic::
|
552
|
+
# @return [::Gapic::GenericLRO::Operation]
|
524
553
|
#
|
525
554
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
526
555
|
def patch request, options = nil
|
@@ -547,7 +576,15 @@ module Google
|
|
547
576
|
metadata: @config.metadata
|
548
577
|
|
549
578
|
@region_backend_services_stub.patch request, options do |result, response|
|
550
|
-
result = ::
|
579
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
580
|
+
operation: result,
|
581
|
+
client: region_operations,
|
582
|
+
request_values: {
|
583
|
+
"project" => request.project,
|
584
|
+
"region" => request.region
|
585
|
+
},
|
586
|
+
options: options
|
587
|
+
)
|
551
588
|
yield result, response if block_given?
|
552
589
|
return result
|
553
590
|
end
|
@@ -587,10 +624,10 @@ module Google
|
|
587
624
|
# @param request_id [::String]
|
588
625
|
# 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).
|
589
626
|
# @yield [result, response] Access the result along with the Faraday response object
|
590
|
-
# @yieldparam result [::Gapic::
|
627
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
591
628
|
# @yieldparam response [::Faraday::Response]
|
592
629
|
#
|
593
|
-
# @return [::Gapic::
|
630
|
+
# @return [::Gapic::GenericLRO::Operation]
|
594
631
|
#
|
595
632
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
596
633
|
def update request, options = nil
|
@@ -617,7 +654,15 @@ module Google
|
|
617
654
|
metadata: @config.metadata
|
618
655
|
|
619
656
|
@region_backend_services_stub.update request, options do |result, response|
|
620
|
-
result = ::
|
657
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
658
|
+
operation: result,
|
659
|
+
client: region_operations,
|
660
|
+
request_values: {
|
661
|
+
"project" => request.project,
|
662
|
+
"region" => request.region
|
663
|
+
},
|
664
|
+
options: options
|
665
|
+
)
|
621
666
|
yield result, response if block_given?
|
622
667
|
return result
|
623
668
|
end
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
21
|
require "google/cloud/compute/v1/region_commitments/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/region_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -139,9 +140,21 @@ module Google
|
|
139
140
|
credentials = Credentials.new credentials, scope: @config.scope
|
140
141
|
end
|
141
142
|
|
143
|
+
@region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
|
144
|
+
config.credentials = credentials
|
145
|
+
config.endpoint = @config.endpoint
|
146
|
+
end
|
147
|
+
|
142
148
|
@region_commitments_stub = ::Google::Cloud::Compute::V1::RegionCommitments::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
143
149
|
end
|
144
150
|
|
151
|
+
##
|
152
|
+
# Get the associated client for long-running operations via RegionOperations.
|
153
|
+
#
|
154
|
+
# @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
|
155
|
+
#
|
156
|
+
attr_reader :region_operations
|
157
|
+
|
145
158
|
# Service calls
|
146
159
|
|
147
160
|
##
|
@@ -312,10 +325,10 @@ module Google
|
|
312
325
|
# @param request_id [::String]
|
313
326
|
# 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).
|
314
327
|
# @yield [result, response] Access the result along with the Faraday response object
|
315
|
-
# @yieldparam result [::Gapic::
|
328
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
316
329
|
# @yieldparam response [::Faraday::Response]
|
317
330
|
#
|
318
|
-
# @return [::Gapic::
|
331
|
+
# @return [::Gapic::GenericLRO::Operation]
|
319
332
|
#
|
320
333
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
321
334
|
def insert request, options = nil
|
@@ -342,7 +355,15 @@ module Google
|
|
342
355
|
metadata: @config.metadata
|
343
356
|
|
344
357
|
@region_commitments_stub.insert request, options do |result, response|
|
345
|
-
result = ::
|
358
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
359
|
+
operation: result,
|
360
|
+
client: region_operations,
|
361
|
+
request_values: {
|
362
|
+
"project" => request.project,
|
363
|
+
"region" => request.region
|
364
|
+
},
|
365
|
+
options: options
|
366
|
+
)
|
346
367
|
yield result, response if block_given?
|
347
368
|
return result
|
348
369
|
end
|
@@ -459,10 +480,10 @@ module Google
|
|
459
480
|
# @param update_mask [::String]
|
460
481
|
# update_mask indicates fields to be updated as part of this request.
|
461
482
|
# @yield [result, response] Access the result along with the Faraday response object
|
462
|
-
# @yieldparam result [::Gapic::
|
483
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
463
484
|
# @yieldparam response [::Faraday::Response]
|
464
485
|
#
|
465
|
-
# @return [::Gapic::
|
486
|
+
# @return [::Gapic::GenericLRO::Operation]
|
466
487
|
#
|
467
488
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
468
489
|
def update request, options = nil
|
@@ -489,7 +510,15 @@ module Google
|
|
489
510
|
metadata: @config.metadata
|
490
511
|
|
491
512
|
@region_commitments_stub.update request, options do |result, response|
|
492
|
-
result = ::
|
513
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
514
|
+
operation: result,
|
515
|
+
client: region_operations,
|
516
|
+
request_values: {
|
517
|
+
"project" => request.project,
|
518
|
+
"region" => request.region
|
519
|
+
},
|
520
|
+
options: options
|
521
|
+
)
|
493
522
|
yield result, response if block_given?
|
494
523
|
return result
|
495
524
|
end
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
21
|
require "google/cloud/compute/v1/region_disks/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/region_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -153,9 +154,21 @@ module Google
|
|
153
154
|
credentials = Credentials.new credentials, scope: @config.scope
|
154
155
|
end
|
155
156
|
|
157
|
+
@region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
|
158
|
+
config.credentials = credentials
|
159
|
+
config.endpoint = @config.endpoint
|
160
|
+
end
|
161
|
+
|
156
162
|
@region_disks_stub = ::Google::Cloud::Compute::V1::RegionDisks::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
157
163
|
end
|
158
164
|
|
165
|
+
##
|
166
|
+
# Get the associated client for long-running operations via RegionOperations.
|
167
|
+
#
|
168
|
+
# @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
|
169
|
+
#
|
170
|
+
attr_reader :region_operations
|
171
|
+
|
159
172
|
# Service calls
|
160
173
|
|
161
174
|
##
|
@@ -189,10 +202,10 @@ module Google
|
|
189
202
|
# @param request_id [::String]
|
190
203
|
# 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).
|
191
204
|
# @yield [result, response] Access the result along with the Faraday response object
|
192
|
-
# @yieldparam result [::Gapic::
|
205
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
193
206
|
# @yieldparam response [::Faraday::Response]
|
194
207
|
#
|
195
|
-
# @return [::Gapic::
|
208
|
+
# @return [::Gapic::GenericLRO::Operation]
|
196
209
|
#
|
197
210
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
198
211
|
def add_resource_policies request, options = nil
|
@@ -219,7 +232,15 @@ module Google
|
|
219
232
|
metadata: @config.metadata
|
220
233
|
|
221
234
|
@region_disks_stub.add_resource_policies request, options do |result, response|
|
222
|
-
result = ::
|
235
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
236
|
+
operation: result,
|
237
|
+
client: region_operations,
|
238
|
+
request_values: {
|
239
|
+
"project" => request.project,
|
240
|
+
"region" => request.region
|
241
|
+
},
|
242
|
+
options: options
|
243
|
+
)
|
223
244
|
yield result, response if block_given?
|
224
245
|
return result
|
225
246
|
end
|
@@ -259,10 +280,10 @@ module Google
|
|
259
280
|
# @param snapshot_resource [::Google::Cloud::Compute::V1::Snapshot, ::Hash]
|
260
281
|
# The body resource for this request
|
261
282
|
# @yield [result, response] Access the result along with the Faraday response object
|
262
|
-
# @yieldparam result [::Gapic::
|
283
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
263
284
|
# @yieldparam response [::Faraday::Response]
|
264
285
|
#
|
265
|
-
# @return [::Gapic::
|
286
|
+
# @return [::Gapic::GenericLRO::Operation]
|
266
287
|
#
|
267
288
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
268
289
|
def create_snapshot request, options = nil
|
@@ -289,7 +310,15 @@ module Google
|
|
289
310
|
metadata: @config.metadata
|
290
311
|
|
291
312
|
@region_disks_stub.create_snapshot request, options do |result, response|
|
292
|
-
result = ::
|
313
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
314
|
+
operation: result,
|
315
|
+
client: region_operations,
|
316
|
+
request_values: {
|
317
|
+
"project" => request.project,
|
318
|
+
"region" => request.region
|
319
|
+
},
|
320
|
+
options: options
|
321
|
+
)
|
293
322
|
yield result, response if block_given?
|
294
323
|
return result
|
295
324
|
end
|
@@ -327,10 +356,10 @@ module Google
|
|
327
356
|
# @param request_id [::String]
|
328
357
|
# 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).
|
329
358
|
# @yield [result, response] Access the result along with the Faraday response object
|
330
|
-
# @yieldparam result [::Gapic::
|
359
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
331
360
|
# @yieldparam response [::Faraday::Response]
|
332
361
|
#
|
333
|
-
# @return [::Gapic::
|
362
|
+
# @return [::Gapic::GenericLRO::Operation]
|
334
363
|
#
|
335
364
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
336
365
|
def delete request, options = nil
|
@@ -357,7 +386,15 @@ module Google
|
|
357
386
|
metadata: @config.metadata
|
358
387
|
|
359
388
|
@region_disks_stub.delete request, options do |result, response|
|
360
|
-
result = ::
|
389
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
390
|
+
operation: result,
|
391
|
+
client: region_operations,
|
392
|
+
request_values: {
|
393
|
+
"project" => request.project,
|
394
|
+
"region" => request.region
|
395
|
+
},
|
396
|
+
options: options
|
397
|
+
)
|
361
398
|
yield result, response if block_given?
|
362
399
|
return result
|
363
400
|
end
|
@@ -529,10 +566,10 @@ module Google
|
|
529
566
|
# @param source_image [::String]
|
530
567
|
# Source image to restore onto a disk. This field is optional.
|
531
568
|
# @yield [result, response] Access the result along with the Faraday response object
|
532
|
-
# @yieldparam result [::Gapic::
|
569
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
533
570
|
# @yieldparam response [::Faraday::Response]
|
534
571
|
#
|
535
|
-
# @return [::Gapic::
|
572
|
+
# @return [::Gapic::GenericLRO::Operation]
|
536
573
|
#
|
537
574
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
538
575
|
def insert request, options = nil
|
@@ -559,7 +596,15 @@ module Google
|
|
559
596
|
metadata: @config.metadata
|
560
597
|
|
561
598
|
@region_disks_stub.insert request, options do |result, response|
|
562
|
-
result = ::
|
599
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
600
|
+
operation: result,
|
601
|
+
client: region_operations,
|
602
|
+
request_values: {
|
603
|
+
"project" => request.project,
|
604
|
+
"region" => request.region
|
605
|
+
},
|
606
|
+
options: options
|
607
|
+
)
|
563
608
|
yield result, response if block_given?
|
564
609
|
return result
|
565
610
|
end
|
@@ -673,10 +718,10 @@ module Google
|
|
673
718
|
# @param request_id [::String]
|
674
719
|
# 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).
|
675
720
|
# @yield [result, response] Access the result along with the Faraday response object
|
676
|
-
# @yieldparam result [::Gapic::
|
721
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
677
722
|
# @yieldparam response [::Faraday::Response]
|
678
723
|
#
|
679
|
-
# @return [::Gapic::
|
724
|
+
# @return [::Gapic::GenericLRO::Operation]
|
680
725
|
#
|
681
726
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
682
727
|
def remove_resource_policies request, options = nil
|
@@ -703,7 +748,15 @@ module Google
|
|
703
748
|
metadata: @config.metadata
|
704
749
|
|
705
750
|
@region_disks_stub.remove_resource_policies request, options do |result, response|
|
706
|
-
result = ::
|
751
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
752
|
+
operation: result,
|
753
|
+
client: region_operations,
|
754
|
+
request_values: {
|
755
|
+
"project" => request.project,
|
756
|
+
"region" => request.region
|
757
|
+
},
|
758
|
+
options: options
|
759
|
+
)
|
707
760
|
yield result, response if block_given?
|
708
761
|
return result
|
709
762
|
end
|
@@ -743,10 +796,10 @@ module Google
|
|
743
796
|
# @param request_id [::String]
|
744
797
|
# 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).
|
745
798
|
# @yield [result, response] Access the result along with the Faraday response object
|
746
|
-
# @yieldparam result [::Gapic::
|
799
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
747
800
|
# @yieldparam response [::Faraday::Response]
|
748
801
|
#
|
749
|
-
# @return [::Gapic::
|
802
|
+
# @return [::Gapic::GenericLRO::Operation]
|
750
803
|
#
|
751
804
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
752
805
|
def resize request, options = nil
|
@@ -773,7 +826,15 @@ module Google
|
|
773
826
|
metadata: @config.metadata
|
774
827
|
|
775
828
|
@region_disks_stub.resize request, options do |result, response|
|
776
|
-
result = ::
|
829
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
830
|
+
operation: result,
|
831
|
+
client: region_operations,
|
832
|
+
request_values: {
|
833
|
+
"project" => request.project,
|
834
|
+
"region" => request.region
|
835
|
+
},
|
836
|
+
options: options
|
837
|
+
)
|
777
838
|
yield result, response if block_given?
|
778
839
|
return result
|
779
840
|
end
|
@@ -880,10 +941,10 @@ module Google
|
|
880
941
|
# @param resource [::String]
|
881
942
|
# Name or id of the resource for this request.
|
882
943
|
# @yield [result, response] Access the result along with the Faraday response object
|
883
|
-
# @yieldparam result [::Gapic::
|
944
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
884
945
|
# @yieldparam response [::Faraday::Response]
|
885
946
|
#
|
886
|
-
# @return [::Gapic::
|
947
|
+
# @return [::Gapic::GenericLRO::Operation]
|
887
948
|
#
|
888
949
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
889
950
|
def set_labels request, options = nil
|
@@ -910,7 +971,15 @@ module Google
|
|
910
971
|
metadata: @config.metadata
|
911
972
|
|
912
973
|
@region_disks_stub.set_labels request, options do |result, response|
|
913
|
-
result = ::
|
974
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
975
|
+
operation: result,
|
976
|
+
client: region_operations,
|
977
|
+
request_values: {
|
978
|
+
"project" => request.project,
|
979
|
+
"region" => request.region
|
980
|
+
},
|
981
|
+
options: options
|
982
|
+
)
|
914
983
|
yield result, response if block_given?
|
915
984
|
return result
|
916
985
|
end
|