google-cloud-compute-v1 1.6.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +15 -6
- data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +115 -10
- data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +62 -1
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +35 -14
- data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +45 -18
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +217 -24
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +120 -1
- data/lib/google/cloud/compute/v1/compute_pb.rb +228 -0
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +15 -6
- data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +65 -26
- data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +30 -12
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +90 -36
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +30 -12
- data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +40 -16
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +105 -8
- data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +61 -1
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +35 -14
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +35 -14
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +25 -10
- data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +15 -6
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +25 -10
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +35 -14
- data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +5 -2
- data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/images/rest/client.rb +55 -22
- data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +100 -40
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +45 -18
- data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +35 -14
- data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +225 -90
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +120 -12
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +62 -1
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +10 -4
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +115 -12
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +61 -1
- data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +10 -4
- data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +35 -14
- data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +35 -14
- data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +15 -6
- data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +25 -10
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +45 -18
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +80 -32
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +55 -22
- data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +65 -26
- data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +40 -16
- data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +15 -6
- data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +35 -14
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +65 -26
- data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +25 -10
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +30 -12
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +30 -12
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +196 -14
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +122 -1
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +25 -10
- data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +10 -4
- data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +60 -24
- data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +25 -10
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +30 -12
- data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +95 -38
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +20 -8
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +5 -2
- data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +20 -8
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +85 -34
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +20 -8
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +20 -8
- data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +25 -10
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +20 -8
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_ssl_policies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +777 -0
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/service_stub.rb +408 -0
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/region_ssl_policies.rb +47 -0
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +25 -10
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +35 -14
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +599 -0
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/service_stub.rb +288 -0
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies.rb +47 -0
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +35 -14
- data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +10 -4
- data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +50 -20
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +40 -16
- data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +50 -20
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +20 -8
- data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +140 -22
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +61 -1
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +45 -18
- data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +40 -16
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +25 -10
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +119 -12
- data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +59 -1
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +60 -24
- data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +25 -10
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +35 -14
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +55 -22
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +25 -10
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +55 -22
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +45 -18
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +30 -12
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +115 -10
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +62 -1
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +45 -18
- data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +40 -16
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +115 -10
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +62 -1
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +20 -8
- data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +10 -4
- data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +1 -1
- data/lib/google/cloud/compute/v1.rb +2 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +637 -26
- metadata +14 -4
@@ -243,8 +243,11 @@ module Google
|
|
243
243
|
return result
|
244
244
|
end
|
245
245
|
rescue ::Faraday::Error => e
|
246
|
-
|
247
|
-
|
246
|
+
begin
|
247
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
248
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
249
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
250
|
+
end
|
248
251
|
end
|
249
252
|
|
250
253
|
##
|
@@ -321,8 +324,11 @@ module Google
|
|
321
324
|
return result
|
322
325
|
end
|
323
326
|
rescue ::Faraday::Error => e
|
324
|
-
|
325
|
-
|
327
|
+
begin
|
328
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
329
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
330
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
331
|
+
end
|
326
332
|
end
|
327
333
|
|
328
334
|
##
|
@@ -395,8 +401,11 @@ module Google
|
|
395
401
|
return result
|
396
402
|
end
|
397
403
|
rescue ::Faraday::Error => e
|
398
|
-
|
399
|
-
|
404
|
+
begin
|
405
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
406
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
407
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
408
|
+
end
|
400
409
|
end
|
401
410
|
|
402
411
|
##
|
@@ -471,8 +480,11 @@ module Google
|
|
471
480
|
return result
|
472
481
|
end
|
473
482
|
rescue ::Faraday::Error => e
|
474
|
-
|
475
|
-
|
483
|
+
begin
|
484
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
485
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
486
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
487
|
+
end
|
476
488
|
end
|
477
489
|
|
478
490
|
##
|
@@ -536,8 +548,11 @@ module Google
|
|
536
548
|
return result
|
537
549
|
end
|
538
550
|
rescue ::Faraday::Error => e
|
539
|
-
|
540
|
-
|
551
|
+
begin
|
552
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
553
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
554
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
555
|
+
end
|
541
556
|
end
|
542
557
|
|
543
558
|
##
|
@@ -603,8 +618,11 @@ module Google
|
|
603
618
|
return result
|
604
619
|
end
|
605
620
|
rescue ::Faraday::Error => e
|
606
|
-
|
607
|
-
|
621
|
+
begin
|
622
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
623
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
624
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
625
|
+
end
|
608
626
|
end
|
609
627
|
|
610
628
|
##
|
@@ -679,8 +697,11 @@ module Google
|
|
679
697
|
return result
|
680
698
|
end
|
681
699
|
rescue ::Faraday::Error => e
|
682
|
-
|
683
|
-
|
700
|
+
begin
|
701
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
702
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
703
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
704
|
+
end
|
684
705
|
end
|
685
706
|
|
686
707
|
##
|
@@ -753,8 +774,11 @@ module Google
|
|
753
774
|
return result
|
754
775
|
end
|
755
776
|
rescue ::Faraday::Error => e
|
756
|
-
|
757
|
-
|
777
|
+
begin
|
778
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
779
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
780
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
781
|
+
end
|
758
782
|
end
|
759
783
|
|
760
784
|
##
|
@@ -831,8 +855,11 @@ module Google
|
|
831
855
|
return result
|
832
856
|
end
|
833
857
|
rescue ::Faraday::Error => e
|
834
|
-
|
835
|
-
|
858
|
+
begin
|
859
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
860
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
861
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
862
|
+
end
|
836
863
|
end
|
837
864
|
|
838
865
|
##
|
@@ -909,8 +936,11 @@ module Google
|
|
909
936
|
return result
|
910
937
|
end
|
911
938
|
rescue ::Faraday::Error => e
|
912
|
-
|
913
|
-
|
939
|
+
begin
|
940
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
941
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
942
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
943
|
+
end
|
914
944
|
end
|
915
945
|
|
916
946
|
##
|
@@ -989,8 +1019,11 @@ module Google
|
|
989
1019
|
return result
|
990
1020
|
end
|
991
1021
|
rescue ::Faraday::Error => e
|
992
|
-
|
993
|
-
|
1022
|
+
begin
|
1023
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
1024
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
1025
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
1026
|
+
end
|
994
1027
|
end
|
995
1028
|
|
996
1029
|
##
|
@@ -35,7 +35,7 @@ module Google
|
|
35
35
|
# the REST modules only when it's required.
|
36
36
|
require "gapic/rest"
|
37
37
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials, numeric_enums: false
|
39
39
|
end
|
40
40
|
|
41
41
|
##
|
@@ -231,8 +231,11 @@ module Google
|
|
231
231
|
return result
|
232
232
|
end
|
233
233
|
rescue ::Faraday::Error => e
|
234
|
-
|
235
|
-
|
234
|
+
begin
|
235
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
236
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
237
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
238
|
+
end
|
236
239
|
end
|
237
240
|
|
238
241
|
##
|
@@ -294,8 +297,11 @@ module Google
|
|
294
297
|
return result
|
295
298
|
end
|
296
299
|
rescue ::Faraday::Error => e
|
297
|
-
|
298
|
-
|
300
|
+
begin
|
301
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
302
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
303
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
304
|
+
end
|
299
305
|
end
|
300
306
|
|
301
307
|
##
|
@@ -367,8 +373,11 @@ module Google
|
|
367
373
|
return result
|
368
374
|
end
|
369
375
|
rescue ::Faraday::Error => e
|
370
|
-
|
371
|
-
|
376
|
+
begin
|
377
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
378
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
379
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
380
|
+
end
|
372
381
|
end
|
373
382
|
|
374
383
|
##
|
@@ -439,8 +448,11 @@ module Google
|
|
439
448
|
return result
|
440
449
|
end
|
441
450
|
rescue ::Faraday::Error => e
|
442
|
-
|
443
|
-
|
451
|
+
begin
|
452
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
453
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
454
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
455
|
+
end
|
444
456
|
end
|
445
457
|
|
446
458
|
##
|
@@ -514,8 +526,11 @@ module Google
|
|
514
526
|
return result
|
515
527
|
end
|
516
528
|
rescue ::Faraday::Error => e
|
517
|
-
|
518
|
-
|
529
|
+
begin
|
530
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
531
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
532
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
533
|
+
end
|
519
534
|
end
|
520
535
|
|
521
536
|
##
|
@@ -589,8 +604,11 @@ module Google
|
|
589
604
|
return result
|
590
605
|
end
|
591
606
|
rescue ::Faraday::Error => e
|
592
|
-
|
593
|
-
|
607
|
+
begin
|
608
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
609
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
610
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
611
|
+
end
|
594
612
|
end
|
595
613
|
|
596
614
|
##
|
@@ -664,8 +682,11 @@ module Google
|
|
664
682
|
return result
|
665
683
|
end
|
666
684
|
rescue ::Faraday::Error => e
|
667
|
-
|
668
|
-
|
685
|
+
begin
|
686
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
687
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
688
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
689
|
+
end
|
669
690
|
end
|
670
691
|
|
671
692
|
##
|
@@ -739,8 +760,11 @@ module Google
|
|
739
760
|
return result
|
740
761
|
end
|
741
762
|
rescue ::Faraday::Error => e
|
742
|
-
|
743
|
-
|
763
|
+
begin
|
764
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
765
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
766
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
767
|
+
end
|
744
768
|
end
|
745
769
|
|
746
770
|
##
|
@@ -814,8 +838,11 @@ module Google
|
|
814
838
|
return result
|
815
839
|
end
|
816
840
|
rescue ::Faraday::Error => e
|
817
|
-
|
818
|
-
|
841
|
+
begin
|
842
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
843
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
844
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
845
|
+
end
|
819
846
|
end
|
820
847
|
|
821
848
|
##
|
@@ -35,7 +35,7 @@ module Google
|
|
35
35
|
# the REST modules only when it's required.
|
36
36
|
require "gapic/rest"
|
37
37
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials, numeric_enums: false
|
39
39
|
end
|
40
40
|
|
41
41
|
##
|
@@ -225,8 +225,11 @@ module Google
|
|
225
225
|
return result
|
226
226
|
end
|
227
227
|
rescue ::Faraday::Error => e
|
228
|
-
|
229
|
-
|
228
|
+
begin
|
229
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
230
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
231
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
232
|
+
end
|
230
233
|
end
|
231
234
|
|
232
235
|
##
|
@@ -288,8 +291,11 @@ module Google
|
|
288
291
|
return result
|
289
292
|
end
|
290
293
|
rescue ::Faraday::Error => e
|
291
|
-
|
292
|
-
|
294
|
+
begin
|
295
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
296
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
297
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
298
|
+
end
|
293
299
|
end
|
294
300
|
|
295
301
|
##
|
@@ -361,8 +367,11 @@ module Google
|
|
361
367
|
return result
|
362
368
|
end
|
363
369
|
rescue ::Faraday::Error => e
|
364
|
-
|
365
|
-
|
370
|
+
begin
|
371
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
372
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
373
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
374
|
+
end
|
366
375
|
end
|
367
376
|
|
368
377
|
##
|
@@ -433,8 +442,11 @@ module Google
|
|
433
442
|
return result
|
434
443
|
end
|
435
444
|
rescue ::Faraday::Error => e
|
436
|
-
|
437
|
-
|
445
|
+
begin
|
446
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
447
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
448
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
449
|
+
end
|
438
450
|
end
|
439
451
|
|
440
452
|
##
|
@@ -508,8 +520,11 @@ module Google
|
|
508
520
|
return result
|
509
521
|
end
|
510
522
|
rescue ::Faraday::Error => e
|
511
|
-
|
512
|
-
|
523
|
+
begin
|
524
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
525
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
526
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
527
|
+
end
|
513
528
|
end
|
514
529
|
|
515
530
|
##
|
@@ -583,8 +598,11 @@ module Google
|
|
583
598
|
return result
|
584
599
|
end
|
585
600
|
rescue ::Faraday::Error => e
|
586
|
-
|
587
|
-
|
601
|
+
begin
|
602
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
603
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
604
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
605
|
+
end
|
588
606
|
end
|
589
607
|
|
590
608
|
##
|
@@ -35,7 +35,7 @@ module Google
|
|
35
35
|
# the REST modules only when it's required.
|
36
36
|
require "gapic/rest"
|
37
37
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials, numeric_enums: false
|
39
39
|
end
|
40
40
|
|
41
41
|
##
|
@@ -84,6 +84,8 @@ module Google
|
|
84
84
|
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
85
85
|
}
|
86
86
|
|
87
|
+
default_config.rpcs.set_labels.timeout = 600.0
|
88
|
+
|
87
89
|
default_config
|
88
90
|
end
|
89
91
|
yield @configure if block_given?
|
@@ -227,8 +229,11 @@ module Google
|
|
227
229
|
return result
|
228
230
|
end
|
229
231
|
rescue ::Faraday::Error => e
|
230
|
-
|
231
|
-
|
232
|
+
begin
|
233
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
234
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
235
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
236
|
+
end
|
232
237
|
end
|
233
238
|
|
234
239
|
##
|
@@ -303,8 +308,11 @@ module Google
|
|
303
308
|
return result
|
304
309
|
end
|
305
310
|
rescue ::Faraday::Error => e
|
306
|
-
|
307
|
-
|
311
|
+
begin
|
312
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
313
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
314
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
315
|
+
end
|
308
316
|
end
|
309
317
|
|
310
318
|
##
|
@@ -368,8 +376,11 @@ module Google
|
|
368
376
|
return result
|
369
377
|
end
|
370
378
|
rescue ::Faraday::Error => e
|
371
|
-
|
372
|
-
|
379
|
+
begin
|
380
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
381
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
382
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
383
|
+
end
|
373
384
|
end
|
374
385
|
|
375
386
|
##
|
@@ -444,8 +455,11 @@ module Google
|
|
444
455
|
return result
|
445
456
|
end
|
446
457
|
rescue ::Faraday::Error => e
|
447
|
-
|
448
|
-
|
458
|
+
begin
|
459
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
460
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
461
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
462
|
+
end
|
449
463
|
end
|
450
464
|
|
451
465
|
##
|
@@ -518,8 +532,92 @@ module Google
|
|
518
532
|
return result
|
519
533
|
end
|
520
534
|
rescue ::Faraday::Error => e
|
521
|
-
|
522
|
-
|
535
|
+
begin
|
536
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
537
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
538
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
539
|
+
end
|
540
|
+
end
|
541
|
+
|
542
|
+
##
|
543
|
+
# Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation.
|
544
|
+
#
|
545
|
+
# @overload set_labels(request, options = nil)
|
546
|
+
# Pass arguments to `set_labels` via a request object, either of type
|
547
|
+
# {::Google::Cloud::Compute::V1::SetLabelsTargetVpnGatewayRequest} or an equivalent Hash.
|
548
|
+
#
|
549
|
+
# @param request [::Google::Cloud::Compute::V1::SetLabelsTargetVpnGatewayRequest, ::Hash]
|
550
|
+
# A request object representing the call parameters. Required. To specify no
|
551
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
552
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
553
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
554
|
+
# Note: currently retry functionality is not implemented. While it is possible
|
555
|
+
# to set it using ::Gapic::CallOptions, it will not be applied
|
556
|
+
#
|
557
|
+
# @overload set_labels(project: nil, region: nil, region_set_labels_request_resource: nil, request_id: nil, resource: nil)
|
558
|
+
# Pass arguments to `set_labels` via keyword arguments. Note that at
|
559
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
560
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
561
|
+
#
|
562
|
+
# @param project [::String]
|
563
|
+
# Project ID for this request.
|
564
|
+
# @param region [::String]
|
565
|
+
# The region for this request.
|
566
|
+
# @param region_set_labels_request_resource [::Google::Cloud::Compute::V1::RegionSetLabelsRequest, ::Hash]
|
567
|
+
# The body resource for this request
|
568
|
+
# @param request_id [::String]
|
569
|
+
# 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).
|
570
|
+
# @param resource [::String]
|
571
|
+
# Name or id of the resource for this request.
|
572
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
573
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
574
|
+
# @yieldparam response [::Faraday::Response]
|
575
|
+
#
|
576
|
+
# @return [::Gapic::GenericLRO::Operation]
|
577
|
+
#
|
578
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
579
|
+
def set_labels request, options = nil
|
580
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
581
|
+
|
582
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetLabelsTargetVpnGatewayRequest
|
583
|
+
|
584
|
+
# Converts hash and nil to an options object
|
585
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
586
|
+
|
587
|
+
# Customize the options with defaults
|
588
|
+
call_metadata = @config.rpcs.set_labels.metadata.to_h
|
589
|
+
|
590
|
+
# Set x-goog-api-client header
|
591
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
592
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
593
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
594
|
+
transports_version_send: [:rest]
|
595
|
+
|
596
|
+
options.apply_defaults timeout: @config.rpcs.set_labels.timeout,
|
597
|
+
metadata: call_metadata
|
598
|
+
|
599
|
+
options.apply_defaults timeout: @config.timeout,
|
600
|
+
metadata: @config.metadata
|
601
|
+
|
602
|
+
@target_vpn_gateways_stub.set_labels request, options do |result, response|
|
603
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
604
|
+
operation: result,
|
605
|
+
client: region_operations,
|
606
|
+
request_values: {
|
607
|
+
"project" => request.project,
|
608
|
+
"region" => request.region
|
609
|
+
},
|
610
|
+
options: options
|
611
|
+
)
|
612
|
+
yield result, response if block_given?
|
613
|
+
return result
|
614
|
+
end
|
615
|
+
rescue ::Faraday::Error => e
|
616
|
+
begin
|
617
|
+
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
618
|
+
rescue ::Gapic::Rest::Error => gapic_error
|
619
|
+
raise ::Google::Cloud::Error.from_error gapic_error
|
620
|
+
end
|
523
621
|
end
|
524
622
|
|
525
623
|
##
|
@@ -646,6 +744,11 @@ module Google
|
|
646
744
|
# @return [::Gapic::Config::Method]
|
647
745
|
#
|
648
746
|
attr_reader :list
|
747
|
+
##
|
748
|
+
# RPC-specific configuration for `set_labels`
|
749
|
+
# @return [::Gapic::Config::Method]
|
750
|
+
#
|
751
|
+
attr_reader :set_labels
|
649
752
|
|
650
753
|
# @private
|
651
754
|
def initialize parent_rpcs = nil
|
@@ -659,6 +762,8 @@ module Google
|
|
659
762
|
@insert = ::Gapic::Config::Method.new insert_config
|
660
763
|
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
661
764
|
@list = ::Gapic::Config::Method.new list_config
|
765
|
+
set_labels_config = parent_rpcs.set_labels if parent_rpcs.respond_to? :set_labels
|
766
|
+
@set_labels = ::Gapic::Config::Method.new set_labels_config
|
662
767
|
|
663
768
|
yield self if block_given?
|
664
769
|
end
|
@@ -35,7 +35,7 @@ module Google
|
|
35
35
|
# the REST modules only when it's required.
|
36
36
|
require "gapic/rest"
|
37
37
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials, numeric_enums: false
|
39
39
|
end
|
40
40
|
|
41
41
|
##
|
@@ -223,6 +223,43 @@ module Google
|
|
223
223
|
result
|
224
224
|
end
|
225
225
|
|
226
|
+
##
|
227
|
+
# Baseline implementation for the set_labels REST call
|
228
|
+
#
|
229
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetLabelsTargetVpnGatewayRequest]
|
230
|
+
# A request object representing the call parameters. Required.
|
231
|
+
# @param options [::Gapic::CallOptions]
|
232
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
233
|
+
#
|
234
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
235
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
236
|
+
# @yieldparam response [::Faraday::Response]
|
237
|
+
#
|
238
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
239
|
+
# A result object deserialized from the server's reply
|
240
|
+
def set_labels request_pb, options = nil
|
241
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
242
|
+
|
243
|
+
verb, uri, query_string_params, body = transcode_set_labels_request request_pb
|
244
|
+
query_string_params = if query_string_params.any?
|
245
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
246
|
+
else
|
247
|
+
{}
|
248
|
+
end
|
249
|
+
|
250
|
+
response = @client_stub.make_http_request(
|
251
|
+
verb,
|
252
|
+
uri: uri,
|
253
|
+
body: body || "",
|
254
|
+
params: query_string_params,
|
255
|
+
options: options
|
256
|
+
)
|
257
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
258
|
+
|
259
|
+
yield result, response if block_given?
|
260
|
+
result
|
261
|
+
end
|
262
|
+
|
226
263
|
|
227
264
|
private
|
228
265
|
|
@@ -337,6 +374,30 @@ module Google
|
|
337
374
|
)
|
338
375
|
transcoder.transcode request_pb
|
339
376
|
end
|
377
|
+
|
378
|
+
##
|
379
|
+
# @private
|
380
|
+
#
|
381
|
+
# GRPC transcoding helper method for the set_labels REST call
|
382
|
+
#
|
383
|
+
# @param request_pb [::Google::Cloud::Compute::V1::SetLabelsTargetVpnGatewayRequest]
|
384
|
+
# A request object representing the call parameters. Required.
|
385
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
386
|
+
# Uri, Body, Query string parameters
|
387
|
+
def transcode_set_labels_request request_pb
|
388
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
389
|
+
.with_bindings(
|
390
|
+
uri_method: :post,
|
391
|
+
uri_template: "/compute/v1/projects/{project}/regions/{region}/targetVpnGateways/{resource}/setLabels",
|
392
|
+
body: "region_set_labels_request_resource",
|
393
|
+
matches: [
|
394
|
+
["project", %r{^[^/]+/?$}, false],
|
395
|
+
["region", %r{^[^/]+/?$}, false],
|
396
|
+
["resource", %r{^[^/]+/?$}, false]
|
397
|
+
]
|
398
|
+
)
|
399
|
+
transcoder.transcode request_pb
|
400
|
+
end
|
340
401
|
end
|
341
402
|
end
|
342
403
|
end
|