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_url_maps/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_url_maps_stub = ::Google::Cloud::Compute::V1::RegionUrlMaps::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 url_map [::String]
|
175
188
|
# Name of the UrlMap resource to delete.
|
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_url_maps_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
|
@@ -307,10 +328,10 @@ module Google
|
|
307
328
|
# @param url_map_resource [::Google::Cloud::Compute::V1::UrlMap, ::Hash]
|
308
329
|
# The body resource for this request
|
309
330
|
# @yield [result, response] Access the result along with the Faraday response object
|
310
|
-
# @yieldparam result [::Gapic::
|
331
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
311
332
|
# @yieldparam response [::Faraday::Response]
|
312
333
|
#
|
313
|
-
# @return [::Gapic::
|
334
|
+
# @return [::Gapic::GenericLRO::Operation]
|
314
335
|
#
|
315
336
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
316
337
|
def insert request, options = nil
|
@@ -337,7 +358,15 @@ module Google
|
|
337
358
|
metadata: @config.metadata
|
338
359
|
|
339
360
|
@region_url_maps_stub.insert request, options do |result, response|
|
340
|
-
result = ::
|
361
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
362
|
+
operation: result,
|
363
|
+
client: region_operations,
|
364
|
+
request_values: {
|
365
|
+
"project" => request.project,
|
366
|
+
"region" => request.region
|
367
|
+
},
|
368
|
+
options: options
|
369
|
+
)
|
341
370
|
yield result, response if block_given?
|
342
371
|
return result
|
343
372
|
end
|
@@ -451,10 +480,10 @@ module Google
|
|
451
480
|
# @param url_map_resource [::Google::Cloud::Compute::V1::UrlMap, ::Hash]
|
452
481
|
# The body resource for this request
|
453
482
|
# @yield [result, response] Access the result along with the Faraday response object
|
454
|
-
# @yieldparam result [::Gapic::
|
483
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
455
484
|
# @yieldparam response [::Faraday::Response]
|
456
485
|
#
|
457
|
-
# @return [::Gapic::
|
486
|
+
# @return [::Gapic::GenericLRO::Operation]
|
458
487
|
#
|
459
488
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
460
489
|
def patch request, options = nil
|
@@ -481,7 +510,15 @@ module Google
|
|
481
510
|
metadata: @config.metadata
|
482
511
|
|
483
512
|
@region_url_maps_stub.patch request, options do |result, response|
|
484
|
-
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
|
+
)
|
485
522
|
yield result, response if block_given?
|
486
523
|
return result
|
487
524
|
end
|
@@ -521,10 +558,10 @@ module Google
|
|
521
558
|
# @param url_map_resource [::Google::Cloud::Compute::V1::UrlMap, ::Hash]
|
522
559
|
# The body resource for this request
|
523
560
|
# @yield [result, response] Access the result along with the Faraday response object
|
524
|
-
# @yieldparam result [::Gapic::
|
561
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
525
562
|
# @yieldparam response [::Faraday::Response]
|
526
563
|
#
|
527
|
-
# @return [::Gapic::
|
564
|
+
# @return [::Gapic::GenericLRO::Operation]
|
528
565
|
#
|
529
566
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
530
567
|
def update request, options = nil
|
@@ -551,7 +588,15 @@ module Google
|
|
551
588
|
metadata: @config.metadata
|
552
589
|
|
553
590
|
@region_url_maps_stub.update request, options do |result, response|
|
554
|
-
result = ::
|
591
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
592
|
+
operation: result,
|
593
|
+
client: region_operations,
|
594
|
+
request_values: {
|
595
|
+
"project" => request.project,
|
596
|
+
"region" => request.region
|
597
|
+
},
|
598
|
+
options: options
|
599
|
+
)
|
555
600
|
yield result, response if block_given?
|
556
601
|
return result
|
557
602
|
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/reservations/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/zone_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -152,9 +153,21 @@ module Google
|
|
152
153
|
credentials = Credentials.new credentials, scope: @config.scope
|
153
154
|
end
|
154
155
|
|
156
|
+
@zone_operations = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client.new do |config|
|
157
|
+
config.credentials = credentials
|
158
|
+
config.endpoint = @config.endpoint
|
159
|
+
end
|
160
|
+
|
155
161
|
@reservations_stub = ::Google::Cloud::Compute::V1::Reservations::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
156
162
|
end
|
157
163
|
|
164
|
+
##
|
165
|
+
# Get the associated client for long-running operations via ZoneOperations.
|
166
|
+
#
|
167
|
+
# @return [::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client]
|
168
|
+
#
|
169
|
+
attr_reader :zone_operations
|
170
|
+
|
158
171
|
# Service calls
|
159
172
|
|
160
173
|
##
|
@@ -260,10 +273,10 @@ module Google
|
|
260
273
|
# @param zone [::String]
|
261
274
|
# Name of the zone for this request.
|
262
275
|
# @yield [result, response] Access the result along with the Faraday response object
|
263
|
-
# @yieldparam result [::Gapic::
|
276
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
264
277
|
# @yieldparam response [::Faraday::Response]
|
265
278
|
#
|
266
|
-
# @return [::Gapic::
|
279
|
+
# @return [::Gapic::GenericLRO::Operation]
|
267
280
|
#
|
268
281
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
269
282
|
def delete request, options = nil
|
@@ -290,7 +303,15 @@ module Google
|
|
290
303
|
metadata: @config.metadata
|
291
304
|
|
292
305
|
@reservations_stub.delete request, options do |result, response|
|
293
|
-
result = ::
|
306
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
307
|
+
operation: result,
|
308
|
+
client: zone_operations,
|
309
|
+
request_values: {
|
310
|
+
"project" => request.project,
|
311
|
+
"zone" => request.zone
|
312
|
+
},
|
313
|
+
options: options
|
314
|
+
)
|
294
315
|
yield result, response if block_given?
|
295
316
|
return result
|
296
317
|
end
|
@@ -460,10 +481,10 @@ module Google
|
|
460
481
|
# @param zone [::String]
|
461
482
|
# Name of the zone for this request.
|
462
483
|
# @yield [result, response] Access the result along with the Faraday response object
|
463
|
-
# @yieldparam result [::Gapic::
|
484
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
464
485
|
# @yieldparam response [::Faraday::Response]
|
465
486
|
#
|
466
|
-
# @return [::Gapic::
|
487
|
+
# @return [::Gapic::GenericLRO::Operation]
|
467
488
|
#
|
468
489
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
469
490
|
def insert request, options = nil
|
@@ -490,7 +511,15 @@ module Google
|
|
490
511
|
metadata: @config.metadata
|
491
512
|
|
492
513
|
@reservations_stub.insert request, options do |result, response|
|
493
|
-
result = ::
|
514
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
515
|
+
operation: result,
|
516
|
+
client: zone_operations,
|
517
|
+
request_values: {
|
518
|
+
"project" => request.project,
|
519
|
+
"zone" => request.zone
|
520
|
+
},
|
521
|
+
options: options
|
522
|
+
)
|
494
523
|
yield result, response if block_given?
|
495
524
|
return result
|
496
525
|
end
|
@@ -604,10 +633,10 @@ module Google
|
|
604
633
|
# @param zone [::String]
|
605
634
|
# Name of the zone for this request.
|
606
635
|
# @yield [result, response] Access the result along with the Faraday response object
|
607
|
-
# @yieldparam result [::Gapic::
|
636
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
608
637
|
# @yieldparam response [::Faraday::Response]
|
609
638
|
#
|
610
|
-
# @return [::Gapic::
|
639
|
+
# @return [::Gapic::GenericLRO::Operation]
|
611
640
|
#
|
612
641
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
613
642
|
def resize request, options = nil
|
@@ -634,7 +663,15 @@ module Google
|
|
634
663
|
metadata: @config.metadata
|
635
664
|
|
636
665
|
@reservations_stub.resize request, options do |result, response|
|
637
|
-
result = ::
|
666
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
667
|
+
operation: result,
|
668
|
+
client: zone_operations,
|
669
|
+
request_values: {
|
670
|
+
"project" => request.project,
|
671
|
+
"zone" => request.zone
|
672
|
+
},
|
673
|
+
options: options
|
674
|
+
)
|
638
675
|
yield result, response if block_given?
|
639
676
|
return result
|
640
677
|
end
|
@@ -811,10 +848,10 @@ module Google
|
|
811
848
|
# @param zone [::String]
|
812
849
|
# Name of the zone for this request.
|
813
850
|
# @yield [result, response] Access the result along with the Faraday response object
|
814
|
-
# @yieldparam result [::Gapic::
|
851
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
815
852
|
# @yieldparam response [::Faraday::Response]
|
816
853
|
#
|
817
|
-
# @return [::Gapic::
|
854
|
+
# @return [::Gapic::GenericLRO::Operation]
|
818
855
|
#
|
819
856
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
820
857
|
def update request, options = nil
|
@@ -841,7 +878,15 @@ module Google
|
|
841
878
|
metadata: @config.metadata
|
842
879
|
|
843
880
|
@reservations_stub.update request, options do |result, response|
|
844
|
-
result = ::
|
881
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
882
|
+
operation: result,
|
883
|
+
client: zone_operations,
|
884
|
+
request_values: {
|
885
|
+
"project" => request.project,
|
886
|
+
"zone" => request.zone
|
887
|
+
},
|
888
|
+
options: options
|
889
|
+
)
|
845
890
|
yield result, response if block_given?
|
846
891
|
return result
|
847
892
|
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/resource_policies/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
|
@resource_policies_stub = ::Google::Cloud::Compute::V1::ResourcePolicies::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 resource_policy [::String]
|
257
270
|
# Name of the resource policy 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
|
@resource_policies_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
|
@@ -456,10 +477,10 @@ module Google
|
|
456
477
|
# @param resource_policy_resource [::Google::Cloud::Compute::V1::ResourcePolicy, ::Hash]
|
457
478
|
# The body resource for this request
|
458
479
|
# @yield [result, response] Access the result along with the Faraday response object
|
459
|
-
# @yieldparam result [::Gapic::
|
480
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
460
481
|
# @yieldparam response [::Faraday::Response]
|
461
482
|
#
|
462
|
-
# @return [::Gapic::
|
483
|
+
# @return [::Gapic::GenericLRO::Operation]
|
463
484
|
#
|
464
485
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
465
486
|
def insert request, options = nil
|
@@ -486,7 +507,15 @@ module Google
|
|
486
507
|
metadata: @config.metadata
|
487
508
|
|
488
509
|
@resource_policies_stub.insert request, options do |result, response|
|
489
|
-
result = ::
|
510
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
511
|
+
operation: result,
|
512
|
+
client: region_operations,
|
513
|
+
request_values: {
|
514
|
+
"project" => request.project,
|
515
|
+
"region" => request.region
|
516
|
+
},
|
517
|
+
options: options
|
518
|
+
)
|
490
519
|
yield result, response if block_given?
|
491
520
|
return result
|
492
521
|
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/routers/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/region_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -155,9 +156,21 @@ module Google
|
|
155
156
|
credentials = Credentials.new credentials, scope: @config.scope
|
156
157
|
end
|
157
158
|
|
159
|
+
@region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
|
160
|
+
config.credentials = credentials
|
161
|
+
config.endpoint = @config.endpoint
|
162
|
+
end
|
163
|
+
|
158
164
|
@routers_stub = ::Google::Cloud::Compute::V1::Routers::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
159
165
|
end
|
160
166
|
|
167
|
+
##
|
168
|
+
# Get the associated client for long-running operations via RegionOperations.
|
169
|
+
#
|
170
|
+
# @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
|
171
|
+
#
|
172
|
+
attr_reader :region_operations
|
173
|
+
|
161
174
|
# Service calls
|
162
175
|
|
163
176
|
##
|
@@ -263,10 +276,10 @@ module Google
|
|
263
276
|
# @param router [::String]
|
264
277
|
# Name of the Router resource to delete.
|
265
278
|
# @yield [result, response] Access the result along with the Faraday response object
|
266
|
-
# @yieldparam result [::Gapic::
|
279
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
267
280
|
# @yieldparam response [::Faraday::Response]
|
268
281
|
#
|
269
|
-
# @return [::Gapic::
|
282
|
+
# @return [::Gapic::GenericLRO::Operation]
|
270
283
|
#
|
271
284
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
272
285
|
def delete request, options = nil
|
@@ -293,7 +306,15 @@ module Google
|
|
293
306
|
metadata: @config.metadata
|
294
307
|
|
295
308
|
@routers_stub.delete request, options do |result, response|
|
296
|
-
result = ::
|
309
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
310
|
+
operation: result,
|
311
|
+
client: region_operations,
|
312
|
+
request_values: {
|
313
|
+
"project" => request.project,
|
314
|
+
"region" => request.region
|
315
|
+
},
|
316
|
+
options: options
|
317
|
+
)
|
297
318
|
yield result, response if block_given?
|
298
319
|
return result
|
299
320
|
end
|
@@ -537,10 +558,10 @@ module Google
|
|
537
558
|
# @param router_resource [::Google::Cloud::Compute::V1::Router, ::Hash]
|
538
559
|
# The body resource for this request
|
539
560
|
# @yield [result, response] Access the result along with the Faraday response object
|
540
|
-
# @yieldparam result [::Gapic::
|
561
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
541
562
|
# @yieldparam response [::Faraday::Response]
|
542
563
|
#
|
543
|
-
# @return [::Gapic::
|
564
|
+
# @return [::Gapic::GenericLRO::Operation]
|
544
565
|
#
|
545
566
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
546
567
|
def insert request, options = nil
|
@@ -567,7 +588,15 @@ module Google
|
|
567
588
|
metadata: @config.metadata
|
568
589
|
|
569
590
|
@routers_stub.insert request, options do |result, response|
|
570
|
-
result = ::
|
591
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
592
|
+
operation: result,
|
593
|
+
client: region_operations,
|
594
|
+
request_values: {
|
595
|
+
"project" => request.project,
|
596
|
+
"region" => request.region
|
597
|
+
},
|
598
|
+
options: options
|
599
|
+
)
|
571
600
|
yield result, response if block_given?
|
572
601
|
return result
|
573
602
|
end
|
@@ -681,10 +710,10 @@ module Google
|
|
681
710
|
# @param router_resource [::Google::Cloud::Compute::V1::Router, ::Hash]
|
682
711
|
# The body resource for this request
|
683
712
|
# @yield [result, response] Access the result along with the Faraday response object
|
684
|
-
# @yieldparam result [::Gapic::
|
713
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
685
714
|
# @yieldparam response [::Faraday::Response]
|
686
715
|
#
|
687
|
-
# @return [::Gapic::
|
716
|
+
# @return [::Gapic::GenericLRO::Operation]
|
688
717
|
#
|
689
718
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
690
719
|
def patch request, options = nil
|
@@ -711,7 +740,15 @@ module Google
|
|
711
740
|
metadata: @config.metadata
|
712
741
|
|
713
742
|
@routers_stub.patch request, options do |result, response|
|
714
|
-
result = ::
|
743
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
744
|
+
operation: result,
|
745
|
+
client: region_operations,
|
746
|
+
request_values: {
|
747
|
+
"project" => request.project,
|
748
|
+
"region" => request.region
|
749
|
+
},
|
750
|
+
options: options
|
751
|
+
)
|
715
752
|
yield result, response if block_given?
|
716
753
|
return result
|
717
754
|
end
|
@@ -818,10 +855,10 @@ module Google
|
|
818
855
|
# @param router_resource [::Google::Cloud::Compute::V1::Router, ::Hash]
|
819
856
|
# The body resource for this request
|
820
857
|
# @yield [result, response] Access the result along with the Faraday response object
|
821
|
-
# @yieldparam result [::Gapic::
|
858
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
822
859
|
# @yieldparam response [::Faraday::Response]
|
823
860
|
#
|
824
|
-
# @return [::Gapic::
|
861
|
+
# @return [::Gapic::GenericLRO::Operation]
|
825
862
|
#
|
826
863
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
827
864
|
def update request, options = nil
|
@@ -848,7 +885,15 @@ module Google
|
|
848
885
|
metadata: @config.metadata
|
849
886
|
|
850
887
|
@routers_stub.update request, options do |result, response|
|
851
|
-
result = ::
|
888
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
889
|
+
operation: result,
|
890
|
+
client: region_operations,
|
891
|
+
request_values: {
|
892
|
+
"project" => request.project,
|
893
|
+
"region" => request.region
|
894
|
+
},
|
895
|
+
options: options
|
896
|
+
)
|
852
897
|
yield result, response if block_given?
|
853
898
|
return result
|
854
899
|
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/routes/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/global_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -134,9 +135,21 @@ module Google
|
|
134
135
|
credentials = Credentials.new credentials, scope: @config.scope
|
135
136
|
end
|
136
137
|
|
138
|
+
@global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
|
139
|
+
config.credentials = credentials
|
140
|
+
config.endpoint = @config.endpoint
|
141
|
+
end
|
142
|
+
|
137
143
|
@routes_stub = ::Google::Cloud::Compute::V1::Routes::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
138
144
|
end
|
139
145
|
|
146
|
+
##
|
147
|
+
# Get the associated client for long-running operations via GlobalOperations.
|
148
|
+
#
|
149
|
+
# @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
|
150
|
+
#
|
151
|
+
attr_reader :global_operations
|
152
|
+
|
140
153
|
# Service calls
|
141
154
|
|
142
155
|
##
|
@@ -166,10 +179,10 @@ module Google
|
|
166
179
|
# @param route [::String]
|
167
180
|
# Name of the Route resource to delete.
|
168
181
|
# @yield [result, response] Access the result along with the Faraday response object
|
169
|
-
# @yieldparam result [::Gapic::
|
182
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
170
183
|
# @yieldparam response [::Faraday::Response]
|
171
184
|
#
|
172
|
-
# @return [::Gapic::
|
185
|
+
# @return [::Gapic::GenericLRO::Operation]
|
173
186
|
#
|
174
187
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
175
188
|
def delete request, options = nil
|
@@ -196,7 +209,14 @@ module Google
|
|
196
209
|
metadata: @config.metadata
|
197
210
|
|
198
211
|
@routes_stub.delete request, options do |result, response|
|
199
|
-
result = ::
|
212
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
213
|
+
operation: result,
|
214
|
+
client: global_operations,
|
215
|
+
request_values: {
|
216
|
+
"project" => request.project
|
217
|
+
},
|
218
|
+
options: options
|
219
|
+
)
|
200
220
|
yield result, response if block_given?
|
201
221
|
return result
|
202
222
|
end
|
@@ -295,10 +315,10 @@ module Google
|
|
295
315
|
# @param route_resource [::Google::Cloud::Compute::V1::Route, ::Hash]
|
296
316
|
# The body resource for this request
|
297
317
|
# @yield [result, response] Access the result along with the Faraday response object
|
298
|
-
# @yieldparam result [::Gapic::
|
318
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
299
319
|
# @yieldparam response [::Faraday::Response]
|
300
320
|
#
|
301
|
-
# @return [::Gapic::
|
321
|
+
# @return [::Gapic::GenericLRO::Operation]
|
302
322
|
#
|
303
323
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
304
324
|
def insert request, options = nil
|
@@ -325,7 +345,14 @@ module Google
|
|
325
345
|
metadata: @config.metadata
|
326
346
|
|
327
347
|
@routes_stub.insert request, options do |result, response|
|
328
|
-
result = ::
|
348
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
349
|
+
operation: result,
|
350
|
+
client: global_operations,
|
351
|
+
request_values: {
|
352
|
+
"project" => request.project
|
353
|
+
},
|
354
|
+
options: options
|
355
|
+
)
|
329
356
|
yield result, response if block_given?
|
330
357
|
return result
|
331
358
|
end
|