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/target_vpn_gateways/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
|
@target_vpn_gateways_stub = ::Google::Cloud::Compute::V1::TargetVpnGateways::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
|
##
|
@@ -247,10 +260,10 @@ module Google
|
|
247
260
|
# @param target_vpn_gateway [::String]
|
248
261
|
# Name of the target VPN gateway to delete.
|
249
262
|
# @yield [result, response] Access the result along with the Faraday response object
|
250
|
-
# @yieldparam result [::Gapic::
|
263
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
251
264
|
# @yieldparam response [::Faraday::Response]
|
252
265
|
#
|
253
|
-
# @return [::Gapic::
|
266
|
+
# @return [::Gapic::GenericLRO::Operation]
|
254
267
|
#
|
255
268
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
256
269
|
def delete request, options = nil
|
@@ -277,7 +290,15 @@ module Google
|
|
277
290
|
metadata: @config.metadata
|
278
291
|
|
279
292
|
@target_vpn_gateways_stub.delete request, options do |result, response|
|
280
|
-
result = ::
|
293
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
294
|
+
operation: result,
|
295
|
+
client: region_operations,
|
296
|
+
request_values: {
|
297
|
+
"project" => request.project,
|
298
|
+
"region" => request.region
|
299
|
+
},
|
300
|
+
options: options
|
301
|
+
)
|
281
302
|
yield result, response if block_given?
|
282
303
|
return result
|
283
304
|
end
|
@@ -380,10 +401,10 @@ module Google
|
|
380
401
|
# @param target_vpn_gateway_resource [::Google::Cloud::Compute::V1::TargetVpnGateway, ::Hash]
|
381
402
|
# The body resource for this request
|
382
403
|
# @yield [result, response] Access the result along with the Faraday response object
|
383
|
-
# @yieldparam result [::Gapic::
|
404
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
384
405
|
# @yieldparam response [::Faraday::Response]
|
385
406
|
#
|
386
|
-
# @return [::Gapic::
|
407
|
+
# @return [::Gapic::GenericLRO::Operation]
|
387
408
|
#
|
388
409
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
389
410
|
def insert request, options = nil
|
@@ -410,7 +431,15 @@ module Google
|
|
410
431
|
metadata: @config.metadata
|
411
432
|
|
412
433
|
@target_vpn_gateways_stub.insert request, options do |result, response|
|
413
|
-
result = ::
|
434
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
435
|
+
operation: result,
|
436
|
+
client: region_operations,
|
437
|
+
request_values: {
|
438
|
+
"project" => request.project,
|
439
|
+
"region" => request.region
|
440
|
+
},
|
441
|
+
options: options
|
442
|
+
)
|
414
443
|
yield result, response if block_given?
|
415
444
|
return result
|
416
445
|
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/url_maps/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/global_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -147,9 +148,21 @@ module Google
|
|
147
148
|
credentials = Credentials.new credentials, scope: @config.scope
|
148
149
|
end
|
149
150
|
|
151
|
+
@global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
|
152
|
+
config.credentials = credentials
|
153
|
+
config.endpoint = @config.endpoint
|
154
|
+
end
|
155
|
+
|
150
156
|
@url_maps_stub = ::Google::Cloud::Compute::V1::UrlMaps::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
151
157
|
end
|
152
158
|
|
159
|
+
##
|
160
|
+
# Get the associated client for long-running operations via GlobalOperations.
|
161
|
+
#
|
162
|
+
# @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
|
163
|
+
#
|
164
|
+
attr_reader :global_operations
|
165
|
+
|
153
166
|
# Service calls
|
154
167
|
|
155
168
|
##
|
@@ -253,10 +266,10 @@ module Google
|
|
253
266
|
# @param url_map [::String]
|
254
267
|
# Name of the UrlMap resource to delete.
|
255
268
|
# @yield [result, response] Access the result along with the Faraday response object
|
256
|
-
# @yieldparam result [::Gapic::
|
269
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
257
270
|
# @yieldparam response [::Faraday::Response]
|
258
271
|
#
|
259
|
-
# @return [::Gapic::
|
272
|
+
# @return [::Gapic::GenericLRO::Operation]
|
260
273
|
#
|
261
274
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
262
275
|
def delete request, options = nil
|
@@ -283,7 +296,14 @@ module Google
|
|
283
296
|
metadata: @config.metadata
|
284
297
|
|
285
298
|
@url_maps_stub.delete request, options do |result, response|
|
286
|
-
result = ::
|
299
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
300
|
+
operation: result,
|
301
|
+
client: global_operations,
|
302
|
+
request_values: {
|
303
|
+
"project" => request.project
|
304
|
+
},
|
305
|
+
options: options
|
306
|
+
)
|
287
307
|
yield result, response if block_given?
|
288
308
|
return result
|
289
309
|
end
|
@@ -382,10 +402,10 @@ module Google
|
|
382
402
|
# @param url_map_resource [::Google::Cloud::Compute::V1::UrlMap, ::Hash]
|
383
403
|
# The body resource for this request
|
384
404
|
# @yield [result, response] Access the result along with the Faraday response object
|
385
|
-
# @yieldparam result [::Gapic::
|
405
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
386
406
|
# @yieldparam response [::Faraday::Response]
|
387
407
|
#
|
388
|
-
# @return [::Gapic::
|
408
|
+
# @return [::Gapic::GenericLRO::Operation]
|
389
409
|
#
|
390
410
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
391
411
|
def insert request, options = nil
|
@@ -412,7 +432,14 @@ module Google
|
|
412
432
|
metadata: @config.metadata
|
413
433
|
|
414
434
|
@url_maps_stub.insert request, options do |result, response|
|
415
|
-
result = ::
|
435
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
436
|
+
operation: result,
|
437
|
+
client: global_operations,
|
438
|
+
request_values: {
|
439
|
+
"project" => request.project
|
440
|
+
},
|
441
|
+
options: options
|
442
|
+
)
|
416
443
|
yield result, response if block_given?
|
417
444
|
return result
|
418
445
|
end
|
@@ -450,10 +477,10 @@ module Google
|
|
450
477
|
# @param url_map [::String]
|
451
478
|
# Name of the UrlMap scoping this request.
|
452
479
|
# @yield [result, response] Access the result along with the Faraday response object
|
453
|
-
# @yieldparam result [::Gapic::
|
480
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
454
481
|
# @yieldparam response [::Faraday::Response]
|
455
482
|
#
|
456
|
-
# @return [::Gapic::
|
483
|
+
# @return [::Gapic::GenericLRO::Operation]
|
457
484
|
#
|
458
485
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
459
486
|
def invalidate_cache request, options = nil
|
@@ -480,7 +507,14 @@ module Google
|
|
480
507
|
metadata: @config.metadata
|
481
508
|
|
482
509
|
@url_maps_stub.invalidate_cache request, options do |result, response|
|
483
|
-
result = ::
|
510
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
511
|
+
operation: result,
|
512
|
+
client: global_operations,
|
513
|
+
request_values: {
|
514
|
+
"project" => request.project
|
515
|
+
},
|
516
|
+
options: options
|
517
|
+
)
|
484
518
|
yield result, response if block_given?
|
485
519
|
return result
|
486
520
|
end
|
@@ -590,10 +624,10 @@ module Google
|
|
590
624
|
# @param url_map_resource [::Google::Cloud::Compute::V1::UrlMap, ::Hash]
|
591
625
|
# The body resource for this request
|
592
626
|
# @yield [result, response] Access the result along with the Faraday response object
|
593
|
-
# @yieldparam result [::Gapic::
|
627
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
594
628
|
# @yieldparam response [::Faraday::Response]
|
595
629
|
#
|
596
|
-
# @return [::Gapic::
|
630
|
+
# @return [::Gapic::GenericLRO::Operation]
|
597
631
|
#
|
598
632
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
599
633
|
def patch request, options = nil
|
@@ -620,7 +654,14 @@ module Google
|
|
620
654
|
metadata: @config.metadata
|
621
655
|
|
622
656
|
@url_maps_stub.patch request, options do |result, response|
|
623
|
-
result = ::
|
657
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
658
|
+
operation: result,
|
659
|
+
client: global_operations,
|
660
|
+
request_values: {
|
661
|
+
"project" => request.project
|
662
|
+
},
|
663
|
+
options: options
|
664
|
+
)
|
624
665
|
yield result, response if block_given?
|
625
666
|
return result
|
626
667
|
end
|
@@ -658,10 +699,10 @@ module Google
|
|
658
699
|
# @param url_map_resource [::Google::Cloud::Compute::V1::UrlMap, ::Hash]
|
659
700
|
# The body resource for this request
|
660
701
|
# @yield [result, response] Access the result along with the Faraday response object
|
661
|
-
# @yieldparam result [::Gapic::
|
702
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
662
703
|
# @yieldparam response [::Faraday::Response]
|
663
704
|
#
|
664
|
-
# @return [::Gapic::
|
705
|
+
# @return [::Gapic::GenericLRO::Operation]
|
665
706
|
#
|
666
707
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
667
708
|
def update request, options = nil
|
@@ -688,7 +729,14 @@ module Google
|
|
688
729
|
metadata: @config.metadata
|
689
730
|
|
690
731
|
@url_maps_stub.update request, options do |result, response|
|
691
|
-
result = ::
|
732
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
733
|
+
operation: result,
|
734
|
+
client: global_operations,
|
735
|
+
request_values: {
|
736
|
+
"project" => request.project
|
737
|
+
},
|
738
|
+
options: options
|
739
|
+
)
|
692
740
|
yield result, response if block_given?
|
693
741
|
return result
|
694
742
|
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/vpn_gateways/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/region_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -148,9 +149,21 @@ module Google
|
|
148
149
|
credentials = Credentials.new credentials, scope: @config.scope
|
149
150
|
end
|
150
151
|
|
152
|
+
@region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
|
153
|
+
config.credentials = credentials
|
154
|
+
config.endpoint = @config.endpoint
|
155
|
+
end
|
156
|
+
|
151
157
|
@vpn_gateways_stub = ::Google::Cloud::Compute::V1::VpnGateways::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
152
158
|
end
|
153
159
|
|
160
|
+
##
|
161
|
+
# Get the associated client for long-running operations via RegionOperations.
|
162
|
+
#
|
163
|
+
# @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
|
164
|
+
#
|
165
|
+
attr_reader :region_operations
|
166
|
+
|
154
167
|
# Service calls
|
155
168
|
|
156
169
|
##
|
@@ -256,10 +269,10 @@ module Google
|
|
256
269
|
# @param vpn_gateway [::String]
|
257
270
|
# Name of the VPN gateway to delete.
|
258
271
|
# @yield [result, response] Access the result along with the Faraday response object
|
259
|
-
# @yieldparam result [::Gapic::
|
272
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
260
273
|
# @yieldparam response [::Faraday::Response]
|
261
274
|
#
|
262
|
-
# @return [::Gapic::
|
275
|
+
# @return [::Gapic::GenericLRO::Operation]
|
263
276
|
#
|
264
277
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
265
278
|
def delete request, options = nil
|
@@ -286,7 +299,15 @@ module Google
|
|
286
299
|
metadata: @config.metadata
|
287
300
|
|
288
301
|
@vpn_gateways_stub.delete request, options do |result, response|
|
289
|
-
result = ::
|
302
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
303
|
+
operation: result,
|
304
|
+
client: region_operations,
|
305
|
+
request_values: {
|
306
|
+
"project" => request.project,
|
307
|
+
"region" => request.region
|
308
|
+
},
|
309
|
+
options: options
|
310
|
+
)
|
290
311
|
yield result, response if block_given?
|
291
312
|
return result
|
292
313
|
end
|
@@ -454,10 +475,10 @@ module Google
|
|
454
475
|
# @param vpn_gateway_resource [::Google::Cloud::Compute::V1::VpnGateway, ::Hash]
|
455
476
|
# The body resource for this request
|
456
477
|
# @yield [result, response] Access the result along with the Faraday response object
|
457
|
-
# @yieldparam result [::Gapic::
|
478
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
458
479
|
# @yieldparam response [::Faraday::Response]
|
459
480
|
#
|
460
|
-
# @return [::Gapic::
|
481
|
+
# @return [::Gapic::GenericLRO::Operation]
|
461
482
|
#
|
462
483
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
463
484
|
def insert request, options = nil
|
@@ -484,7 +505,15 @@ module Google
|
|
484
505
|
metadata: @config.metadata
|
485
506
|
|
486
507
|
@vpn_gateways_stub.insert request, options do |result, response|
|
487
|
-
result = ::
|
508
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
509
|
+
operation: result,
|
510
|
+
client: region_operations,
|
511
|
+
request_values: {
|
512
|
+
"project" => request.project,
|
513
|
+
"region" => request.region
|
514
|
+
},
|
515
|
+
options: options
|
516
|
+
)
|
488
517
|
yield result, response if block_given?
|
489
518
|
return result
|
490
519
|
end
|
@@ -598,10 +627,10 @@ module Google
|
|
598
627
|
# @param resource [::String]
|
599
628
|
# Name or id of the resource for this request.
|
600
629
|
# @yield [result, response] Access the result along with the Faraday response object
|
601
|
-
# @yieldparam result [::Gapic::
|
630
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
602
631
|
# @yieldparam response [::Faraday::Response]
|
603
632
|
#
|
604
|
-
# @return [::Gapic::
|
633
|
+
# @return [::Gapic::GenericLRO::Operation]
|
605
634
|
#
|
606
635
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
607
636
|
def set_labels request, options = nil
|
@@ -628,7 +657,15 @@ module Google
|
|
628
657
|
metadata: @config.metadata
|
629
658
|
|
630
659
|
@vpn_gateways_stub.set_labels request, options do |result, response|
|
631
|
-
result = ::
|
660
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
661
|
+
operation: result,
|
662
|
+
client: region_operations,
|
663
|
+
request_values: {
|
664
|
+
"project" => request.project,
|
665
|
+
"region" => request.region
|
666
|
+
},
|
667
|
+
options: options
|
668
|
+
)
|
632
669
|
yield result, response if block_given?
|
633
670
|
return result
|
634
671
|
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/vpn_tunnels/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
|
@vpn_tunnels_stub = ::Google::Cloud::Compute::V1::VpnTunnels::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
|
##
|
@@ -247,10 +260,10 @@ module Google
|
|
247
260
|
# @param vpn_tunnel [::String]
|
248
261
|
# Name of the VpnTunnel resource to delete.
|
249
262
|
# @yield [result, response] Access the result along with the Faraday response object
|
250
|
-
# @yieldparam result [::Gapic::
|
263
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
251
264
|
# @yieldparam response [::Faraday::Response]
|
252
265
|
#
|
253
|
-
# @return [::Gapic::
|
266
|
+
# @return [::Gapic::GenericLRO::Operation]
|
254
267
|
#
|
255
268
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
256
269
|
def delete request, options = nil
|
@@ -277,7 +290,15 @@ module Google
|
|
277
290
|
metadata: @config.metadata
|
278
291
|
|
279
292
|
@vpn_tunnels_stub.delete request, options do |result, response|
|
280
|
-
result = ::
|
293
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
294
|
+
operation: result,
|
295
|
+
client: region_operations,
|
296
|
+
request_values: {
|
297
|
+
"project" => request.project,
|
298
|
+
"region" => request.region
|
299
|
+
},
|
300
|
+
options: options
|
301
|
+
)
|
281
302
|
yield result, response if block_given?
|
282
303
|
return result
|
283
304
|
end
|
@@ -380,10 +401,10 @@ module Google
|
|
380
401
|
# @param vpn_tunnel_resource [::Google::Cloud::Compute::V1::VpnTunnel, ::Hash]
|
381
402
|
# The body resource for this request
|
382
403
|
# @yield [result, response] Access the result along with the Faraday response object
|
383
|
-
# @yieldparam result [::Gapic::
|
404
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
384
405
|
# @yieldparam response [::Faraday::Response]
|
385
406
|
#
|
386
|
-
# @return [::Gapic::
|
407
|
+
# @return [::Gapic::GenericLRO::Operation]
|
387
408
|
#
|
388
409
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
389
410
|
def insert request, options = nil
|
@@ -410,7 +431,15 @@ module Google
|
|
410
431
|
metadata: @config.metadata
|
411
432
|
|
412
433
|
@vpn_tunnels_stub.insert request, options do |result, response|
|
413
|
-
result = ::
|
434
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
435
|
+
operation: result,
|
436
|
+
client: region_operations,
|
437
|
+
request_values: {
|
438
|
+
"project" => request.project,
|
439
|
+
"region" => request.region
|
440
|
+
},
|
441
|
+
options: options
|
442
|
+
)
|
414
443
|
yield result, response if block_given?
|
415
444
|
return result
|
416
445
|
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 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 "gapic/operation/retry_policy"
|
20
|
+
require "gapic/generic_lro/operation"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Compute
|
25
|
+
module V1
|
26
|
+
module ZoneOperations
|
27
|
+
module Rest
|
28
|
+
# A module containing nonstandard lro helpers
|
29
|
+
module NonstandardLro
|
30
|
+
class << self
|
31
|
+
##
|
32
|
+
# Creates a Generic LRO operation object that wraps the nonstandard
|
33
|
+
# long-running operation specific to this service.
|
34
|
+
#
|
35
|
+
# @param operation [Object] The long-running operation object that is returned by the initial method call.
|
36
|
+
#
|
37
|
+
# @param client [::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client] The client that handles the polling for the longrunning operation.
|
38
|
+
#
|
39
|
+
# @param request_values [Map<String, String>] The values that are to be copied from the request that
|
40
|
+
# triggered the longrunning operation, into the request that polls for the longrunning operation.
|
41
|
+
# The format is `name of the request field -> value`
|
42
|
+
#
|
43
|
+
# @param options [Gapic::CallOptions] call options for this operation
|
44
|
+
#
|
45
|
+
# @return [Gapic::GenericLRO::Operation]
|
46
|
+
#
|
47
|
+
def create_operation operation:, client:, request_values:, options:
|
48
|
+
Gapic::GenericLRO::Operation.new(operation,
|
49
|
+
client: client,
|
50
|
+
polling_method_name: "get",
|
51
|
+
request_values: request_values,
|
52
|
+
operation_status_field: "status",
|
53
|
+
operation_name_field: "name",
|
54
|
+
operation_err_code_field: "http_error_status_code",
|
55
|
+
operation_err_msg_field: "http_error_message",
|
56
|
+
operation_copy_fields: {
|
57
|
+
"name" => "operation"
|
58
|
+
},
|
59
|
+
options: options)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -22,6 +22,7 @@ require "gapic/config/method"
|
|
22
22
|
require "google/cloud/compute/v1/version"
|
23
23
|
|
24
24
|
require "google/cloud/compute/v1/zone_operations/credentials"
|
25
|
+
require "google/cloud/compute/v1/zone_operations/rest/nonstandard_lro"
|
25
26
|
require "google/cloud/compute/v1/zone_operations/rest"
|
26
27
|
|
27
28
|
module Google
|
@@ -105,6 +105,8 @@ module Google
|
|
105
105
|
##
|
106
106
|
# To load this package, including all its services, and instantiate a REST client:
|
107
107
|
#
|
108
|
+
# @example
|
109
|
+
#
|
108
110
|
# require "google/cloud/compute/v1"
|
109
111
|
# client = ::Google::Cloud::Compute::V1::AcceleratorTypes::Rest::Client.new
|
110
112
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-compute-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -273,12 +273,14 @@ files:
|
|
273
273
|
- lib/google/cloud/compute/v1/global_operations/rest.rb
|
274
274
|
- lib/google/cloud/compute/v1/global_operations/rest/client.rb
|
275
275
|
- lib/google/cloud/compute/v1/global_operations/rest/grpc_transcoding.rb
|
276
|
+
- lib/google/cloud/compute/v1/global_operations/rest/nonstandard_lro.rb
|
276
277
|
- lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb
|
277
278
|
- lib/google/cloud/compute/v1/global_organization_operations.rb
|
278
279
|
- lib/google/cloud/compute/v1/global_organization_operations/credentials.rb
|
279
280
|
- lib/google/cloud/compute/v1/global_organization_operations/rest.rb
|
280
281
|
- lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb
|
281
282
|
- lib/google/cloud/compute/v1/global_organization_operations/rest/grpc_transcoding.rb
|
283
|
+
- lib/google/cloud/compute/v1/global_organization_operations/rest/nonstandard_lro.rb
|
282
284
|
- lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb
|
283
285
|
- lib/google/cloud/compute/v1/global_public_delegated_prefixes.rb
|
284
286
|
- lib/google/cloud/compute/v1/global_public_delegated_prefixes/credentials.rb
|
@@ -499,6 +501,7 @@ files:
|
|
499
501
|
- lib/google/cloud/compute/v1/region_operations/rest.rb
|
500
502
|
- lib/google/cloud/compute/v1/region_operations/rest/client.rb
|
501
503
|
- lib/google/cloud/compute/v1/region_operations/rest/grpc_transcoding.rb
|
504
|
+
- lib/google/cloud/compute/v1/region_operations/rest/nonstandard_lro.rb
|
502
505
|
- lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb
|
503
506
|
- lib/google/cloud/compute/v1/region_ssl_certificates.rb
|
504
507
|
- lib/google/cloud/compute/v1/region_ssl_certificates/credentials.rb
|
@@ -661,6 +664,7 @@ files:
|
|
661
664
|
- lib/google/cloud/compute/v1/zone_operations/rest.rb
|
662
665
|
- lib/google/cloud/compute/v1/zone_operations/rest/client.rb
|
663
666
|
- lib/google/cloud/compute/v1/zone_operations/rest/grpc_transcoding.rb
|
667
|
+
- lib/google/cloud/compute/v1/zone_operations/rest/nonstandard_lro.rb
|
664
668
|
- lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb
|
665
669
|
- lib/google/cloud/compute/v1/zones.rb
|
666
670
|
- lib/google/cloud/compute/v1/zones/credentials.rb
|