google-cloud-compute-v1 1.8.0 → 1.10.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/accelerator_types/rest/client.rb +76 -50
- data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +9 -10
- data/lib/google/cloud/compute/v1/accelerator_types/rest.rb +20 -0
- data/lib/google/cloud/compute/v1/accelerator_types.rb +2 -2
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +104 -83
- data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +15 -16
- data/lib/google/cloud/compute/v1/addresses/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/addresses.rb +2 -2
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +113 -94
- data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +17 -18
- data/lib/google/cloud/compute/v1/autoscalers/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/autoscalers.rb +2 -2
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +131 -116
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +21 -22
- data/lib/google/cloud/compute/v1/backend_buckets/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/backend_buckets.rb +2 -2
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +176 -171
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +31 -32
- data/lib/google/cloud/compute/v1/backend_services/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/backend_services.rb +2 -2
- data/lib/google/cloud/compute/v1/compute_pb.rb +206 -0
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +76 -50
- data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +9 -10
- data/lib/google/cloud/compute/v1/disk_types/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/disk_types.rb +2 -2
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +167 -160
- data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +29 -30
- data/lib/google/cloud/compute/v1/disks/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/disks.rb +2 -2
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +104 -83
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +15 -16
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/external_vpn_gateways.rb +2 -2
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +212 -215
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +39 -40
- data/lib/google/cloud/compute/v1/firewall_policies/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/firewall_policies.rb +2 -2
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +104 -83
- data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +15 -16
- data/lib/google/cloud/compute/v1/firewalls/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/firewalls.rb +2 -2
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +122 -105
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +19 -20
- data/lib/google/cloud/compute/v1/forwarding_rules/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/forwarding_rules.rb +2 -2
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +95 -72
- data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +13 -14
- data/lib/google/cloud/compute/v1/global_addresses/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/global_addresses.rb +2 -2
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +113 -94
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +17 -18
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/global_forwarding_rules.rb +2 -2
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +113 -94
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +17 -18
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups.rb +2 -2
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +94 -72
- data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +13 -14
- data/lib/google/cloud/compute/v1/global_operations/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/global_operations.rb +2 -2
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +76 -50
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +9 -10
- data/lib/google/cloud/compute/v1/global_organization_operations/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/global_organization_operations.rb +2 -2
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +95 -72
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +13 -14
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes.rb +2 -2
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +113 -94
- data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +17 -18
- data/lib/google/cloud/compute/v1/health_checks/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/health_checks.rb +2 -2
- data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +58 -28
- data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +5 -6
- data/lib/google/cloud/compute/v1/image_family_views/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/image_family_views.rb +2 -2
- data/lib/google/cloud/compute/v1/images/rest/client.rb +149 -138
- data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +25 -26
- data/lib/google/cloud/compute/v1/images/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/images.rb +2 -2
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +230 -237
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +43 -44
- data/lib/google/cloud/compute/v1/instance_group_managers/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/instance_group_managers.rb +2 -2
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +131 -116
- data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +21 -22
- data/lib/google/cloud/compute/v1/instance_groups/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/instance_groups.rb +2 -2
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +113 -94
- data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +17 -18
- data/lib/google/cloud/compute/v1/instance_templates/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/instance_templates.rb +2 -2
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +461 -514
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +93 -94
- data/lib/google/cloud/compute/v1/instances/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/instances.rb +2 -2
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +113 -94
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +17 -18
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/interconnect_attachments.rb +2 -2
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +67 -39
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +7 -8
- data/lib/google/cloud/compute/v1/interconnect_locations/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/interconnect_locations.rb +2 -2
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +119 -100
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +17 -18
- data/lib/google/cloud/compute/v1/interconnects/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/interconnects.rb +2 -2
- data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +67 -39
- data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +7 -8
- data/lib/google/cloud/compute/v1/license_codes/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/license_codes.rb +2 -2
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +113 -94
- data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +17 -18
- data/lib/google/cloud/compute/v1/licenses/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/licenses.rb +2 -2
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +113 -94
- data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +17 -18
- data/lib/google/cloud/compute/v1/machine_images/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/machine_images.rb +2 -2
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +76 -50
- data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +9 -10
- data/lib/google/cloud/compute/v1/machine_types/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/machine_types.rb +2 -2
- data/lib/google/cloud/compute/v1/network_attachments/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +945 -0
- data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +527 -0
- data/lib/google/cloud/compute/v1/network_attachments/rest.rb +51 -0
- data/lib/google/cloud/compute/v1/network_attachments.rb +47 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +95 -72
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +13 -14
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/network_edge_security_services.rb +2 -2
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +131 -116
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +21 -22
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/network_endpoint_groups.rb +2 -2
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +194 -193
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +35 -36
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/network_firewall_policies.rb +2 -2
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +149 -138
- data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +25 -26
- data/lib/google/cloud/compute/v1/networks/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/networks.rb +2 -2
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +167 -160
- data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +29 -30
- data/lib/google/cloud/compute/v1/node_groups/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/node_groups.rb +2 -2
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +122 -105
- data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +19 -20
- data/lib/google/cloud/compute/v1/node_templates/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/node_templates.rb +2 -2
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +76 -50
- data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +9 -10
- data/lib/google/cloud/compute/v1/node_types/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/node_types.rb +2 -2
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +113 -94
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +17 -18
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/packet_mirrorings.rb +2 -2
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +167 -160
- data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +29 -30
- data/lib/google/cloud/compute/v1/projects/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/projects.rb +2 -2
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +95 -72
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +13 -14
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/public_advertised_prefixes.rb +2 -2
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +104 -83
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +15 -16
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes.rb +2 -2
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +104 -83
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +15 -16
- data/lib/google/cloud/compute/v1/region_autoscalers/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_autoscalers.rb +2 -2
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +131 -116
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +21 -22
- data/lib/google/cloud/compute/v1/region_backend_services/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_backend_services.rb +2 -2
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +95 -72
- data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +13 -14
- data/lib/google/cloud/compute/v1/region_commitments/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_commitments.rb +2 -2
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +67 -39
- data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +7 -8
- data/lib/google/cloud/compute/v1/region_disk_types/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_disk_types.rb +2 -2
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +158 -149
- data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +27 -28
- data/lib/google/cloud/compute/v1/region_disks/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_disks.rb +2 -2
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +95 -72
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +13 -14
- data/lib/google/cloud/compute/v1/region_health_check_services/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_health_check_services.rb +2 -2
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +104 -83
- data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +15 -16
- data/lib/google/cloud/compute/v1/region_health_checks/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_health_checks.rb +2 -2
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +221 -226
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +41 -42
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_instance_group_managers.rb +2 -2
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +86 -61
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +11 -12
- data/lib/google/cloud/compute/v1/region_instance_groups/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_instance_groups.rb +2 -2
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +59 -28
- data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +5 -6
- data/lib/google/cloud/compute/v1/region_instances/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_instances.rb +2 -2
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +86 -61
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +11 -12
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups.rb +2 -2
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +203 -204
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +37 -38
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_network_firewall_policies.rb +2 -2
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +86 -61
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +11 -12
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_notification_endpoints.rb +2 -2
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +85 -61
- data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +11 -12
- data/lib/google/cloud/compute/v1/region_operations/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_operations.rb +2 -2
- data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +95 -72
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +13 -14
- data/lib/google/cloud/compute/v1/region_security_policies/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_security_policies.rb +2 -2
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +86 -61
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +11 -12
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_ssl_certificates.rb +2 -2
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +104 -83
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/service_stub.rb +15 -16
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_ssl_policies.rb +2 -2
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +95 -72
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +13 -14
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_target_http_proxies.rb +2 -2
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +113 -94
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +17 -18
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_target_https_proxies.rb +2 -2
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +86 -61
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/service_stub.rb +11 -12
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies.rb +2 -2
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +113 -94
- data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +17 -18
- data/lib/google/cloud/compute/v1/region_url_maps/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/region_url_maps.rb +2 -2
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +67 -39
- data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +7 -8
- data/lib/google/cloud/compute/v1/regions/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/regions.rb +2 -2
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +140 -127
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +23 -24
- data/lib/google/cloud/compute/v1/reservations/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/reservations.rb +2 -2
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +122 -105
- data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +19 -20
- data/lib/google/cloud/compute/v1/resource_policies/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/resource_policies.rb +2 -2
- data/lib/google/cloud/compute/v1/rest.rb +124 -0
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +140 -127
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +23 -24
- data/lib/google/cloud/compute/v1/routers/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/routers.rb +2 -2
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +86 -61
- data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +11 -12
- data/lib/google/cloud/compute/v1/routes/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/routes.rb +2 -2
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +158 -149
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +27 -28
- data/lib/google/cloud/compute/v1/security_policies/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/security_policies.rb +2 -2
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +131 -116
- data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +21 -22
- data/lib/google/cloud/compute/v1/service_attachments/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/service_attachments.rb +2 -2
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +122 -105
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +19 -20
- data/lib/google/cloud/compute/v1/snapshots/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/snapshots.rb +2 -2
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +95 -72
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +13 -14
- data/lib/google/cloud/compute/v1/ssl_certificates/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/ssl_certificates.rb +2 -2
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +113 -94
- data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +17 -18
- data/lib/google/cloud/compute/v1/ssl_policies/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/ssl_policies.rb +2 -2
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +158 -149
- data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +27 -28
- data/lib/google/cloud/compute/v1/subnetworks/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/subnetworks.rb +2 -2
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +95 -72
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +13 -14
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/target_grpc_proxies.rb +2 -2
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +113 -94
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +17 -18
- data/lib/google/cloud/compute/v1/target_http_proxies/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/target_http_proxies.rb +2 -2
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +149 -138
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +25 -26
- data/lib/google/cloud/compute/v1/target_https_proxies/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/target_https_proxies.rb +2 -2
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +95 -72
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +13 -14
- data/lib/google/cloud/compute/v1/target_instances/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/target_instances.rb +2 -2
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +149 -138
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +25 -26
- data/lib/google/cloud/compute/v1/target_pools/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/target_pools.rb +2 -2
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +131 -116
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +21 -22
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/target_ssl_proxies.rb +2 -2
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +191 -83
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +72 -15
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/target_tcp_proxies.rb +2 -2
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +104 -83
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +15 -16
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/target_vpn_gateways.rb +2 -2
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +131 -116
- data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +21 -22
- data/lib/google/cloud/compute/v1/url_maps/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/url_maps.rb +2 -2
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +122 -105
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +19 -20
- data/lib/google/cloud/compute/v1/vpn_gateways/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/vpn_gateways.rb +2 -2
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +104 -83
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +15 -16
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/vpn_tunnels.rb +2 -2
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +85 -61
- data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +11 -12
- data/lib/google/cloud/compute/v1/zone_operations/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/zone_operations.rb +2 -2
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +67 -39
- data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +7 -8
- data/lib/google/cloud/compute/v1/zones/rest.rb +18 -0
- data/lib/google/cloud/compute/v1/zones.rb +2 -2
- data/lib/google/cloud/compute/v1.rb +3 -2
- data/proto_docs/google/api/client.rb +318 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +564 -32
- data/proto_docs/google/protobuf/duration.rb +98 -0
- metadata +14 -5
@@ -151,13 +151,22 @@ module Google
|
|
151
151
|
|
152
152
|
# Create credentials
|
153
153
|
credentials = @config.credentials
|
154
|
-
|
154
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
155
|
+
# but only if the default endpoint does not have a region prefix.
|
156
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
157
|
+
!@config.endpoint.split(".").first.include?("-")
|
158
|
+
credentials ||= Credentials.default scope: @config.scope,
|
159
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
155
160
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
156
161
|
credentials = Credentials.new credentials, scope: @config.scope
|
157
162
|
end
|
158
163
|
|
164
|
+
@quota_project_id = @config.quota_project
|
165
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
166
|
+
|
159
167
|
@region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
|
160
168
|
config.credentials = credentials
|
169
|
+
config.quota_project = @quota_project_id
|
161
170
|
config.endpoint = @config.endpoint
|
162
171
|
end
|
163
172
|
|
@@ -185,8 +194,6 @@ module Google
|
|
185
194
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
186
195
|
# @param options [::Gapic::CallOptions, ::Hash]
|
187
196
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
188
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
189
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
190
197
|
#
|
191
198
|
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
192
199
|
# Pass arguments to `aggregated_list` via keyword arguments. Note that at
|
@@ -225,29 +232,29 @@ module Google
|
|
225
232
|
# Customize the options with defaults
|
226
233
|
call_metadata = @config.rpcs.aggregated_list.metadata.to_h
|
227
234
|
|
228
|
-
# Set x-goog-api-client
|
235
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
229
236
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
230
237
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
231
238
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
232
239
|
transports_version_send: [:rest]
|
233
240
|
|
241
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
242
|
+
|
234
243
|
options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
|
235
|
-
metadata: call_metadata
|
244
|
+
metadata: call_metadata,
|
245
|
+
retry_policy: @config.rpcs.aggregated_list.retry_policy
|
236
246
|
|
237
247
|
options.apply_defaults timeout: @config.timeout,
|
238
|
-
metadata: @config.metadata
|
248
|
+
metadata: @config.metadata,
|
249
|
+
retry_policy: @config.retry_policy
|
239
250
|
|
240
251
|
@routers_stub.aggregated_list request, options do |result, response|
|
241
252
|
result = ::Gapic::Rest::PagedEnumerable.new @routers_stub, :aggregated_list, "items", request, result, options
|
242
253
|
yield result, response if block_given?
|
243
254
|
return result
|
244
255
|
end
|
245
|
-
rescue ::
|
246
|
-
|
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
|
256
|
+
rescue ::Gapic::Rest::Error => e
|
257
|
+
raise ::Google::Cloud::Error.from_error(e)
|
251
258
|
end
|
252
259
|
|
253
260
|
##
|
@@ -262,8 +269,6 @@ module Google
|
|
262
269
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
263
270
|
# @param options [::Gapic::CallOptions, ::Hash]
|
264
271
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
265
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
266
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
267
272
|
#
|
268
273
|
# @overload delete(project: nil, region: nil, request_id: nil, router: nil)
|
269
274
|
# Pass arguments to `delete` via keyword arguments. Note that at
|
@@ -296,17 +301,21 @@ module Google
|
|
296
301
|
# Customize the options with defaults
|
297
302
|
call_metadata = @config.rpcs.delete.metadata.to_h
|
298
303
|
|
299
|
-
# Set x-goog-api-client
|
304
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
300
305
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
301
306
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
302
307
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
303
308
|
transports_version_send: [:rest]
|
304
309
|
|
310
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
311
|
+
|
305
312
|
options.apply_defaults timeout: @config.rpcs.delete.timeout,
|
306
|
-
metadata: call_metadata
|
313
|
+
metadata: call_metadata,
|
314
|
+
retry_policy: @config.rpcs.delete.retry_policy
|
307
315
|
|
308
316
|
options.apply_defaults timeout: @config.timeout,
|
309
|
-
metadata: @config.metadata
|
317
|
+
metadata: @config.metadata,
|
318
|
+
retry_policy: @config.retry_policy
|
310
319
|
|
311
320
|
@routers_stub.delete request, options do |result, response|
|
312
321
|
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
@@ -321,12 +330,8 @@ module Google
|
|
321
330
|
yield result, response if block_given?
|
322
331
|
return result
|
323
332
|
end
|
324
|
-
rescue ::
|
325
|
-
|
326
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
327
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
328
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
329
|
-
end
|
333
|
+
rescue ::Gapic::Rest::Error => e
|
334
|
+
raise ::Google::Cloud::Error.from_error(e)
|
330
335
|
end
|
331
336
|
|
332
337
|
##
|
@@ -341,8 +346,6 @@ module Google
|
|
341
346
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
342
347
|
# @param options [::Gapic::CallOptions, ::Hash]
|
343
348
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
344
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
345
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
346
349
|
#
|
347
350
|
# @overload get(project: nil, region: nil, router: nil)
|
348
351
|
# Pass arguments to `get` via keyword arguments. Note that at
|
@@ -373,28 +376,28 @@ module Google
|
|
373
376
|
# Customize the options with defaults
|
374
377
|
call_metadata = @config.rpcs.get.metadata.to_h
|
375
378
|
|
376
|
-
# Set x-goog-api-client
|
379
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
377
380
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
378
381
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
379
382
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
380
383
|
transports_version_send: [:rest]
|
381
384
|
|
385
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
386
|
+
|
382
387
|
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
383
|
-
metadata: call_metadata
|
388
|
+
metadata: call_metadata,
|
389
|
+
retry_policy: @config.rpcs.get.retry_policy
|
384
390
|
|
385
391
|
options.apply_defaults timeout: @config.timeout,
|
386
|
-
metadata: @config.metadata
|
392
|
+
metadata: @config.metadata,
|
393
|
+
retry_policy: @config.retry_policy
|
387
394
|
|
388
395
|
@routers_stub.get request, options do |result, response|
|
389
396
|
yield result, response if block_given?
|
390
397
|
return result
|
391
398
|
end
|
392
|
-
rescue ::
|
393
|
-
|
394
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
395
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
396
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
397
|
-
end
|
399
|
+
rescue ::Gapic::Rest::Error => e
|
400
|
+
raise ::Google::Cloud::Error.from_error(e)
|
398
401
|
end
|
399
402
|
|
400
403
|
##
|
@@ -409,8 +412,6 @@ module Google
|
|
409
412
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
410
413
|
# @param options [::Gapic::CallOptions, ::Hash]
|
411
414
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
412
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
413
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
414
415
|
#
|
415
416
|
# @overload get_nat_mapping_info(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil, router: nil)
|
416
417
|
# Pass arguments to `get_nat_mapping_info` via keyword arguments. Note that at
|
@@ -451,29 +452,29 @@ module Google
|
|
451
452
|
# Customize the options with defaults
|
452
453
|
call_metadata = @config.rpcs.get_nat_mapping_info.metadata.to_h
|
453
454
|
|
454
|
-
# Set x-goog-api-client
|
455
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
455
456
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
456
457
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
457
458
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
458
459
|
transports_version_send: [:rest]
|
459
460
|
|
461
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
462
|
+
|
460
463
|
options.apply_defaults timeout: @config.rpcs.get_nat_mapping_info.timeout,
|
461
|
-
metadata: call_metadata
|
464
|
+
metadata: call_metadata,
|
465
|
+
retry_policy: @config.rpcs.get_nat_mapping_info.retry_policy
|
462
466
|
|
463
467
|
options.apply_defaults timeout: @config.timeout,
|
464
|
-
metadata: @config.metadata
|
468
|
+
metadata: @config.metadata,
|
469
|
+
retry_policy: @config.retry_policy
|
465
470
|
|
466
471
|
@routers_stub.get_nat_mapping_info request, options do |result, response|
|
467
472
|
result = ::Gapic::Rest::PagedEnumerable.new @routers_stub, :get_nat_mapping_info, "result", request, result, options
|
468
473
|
yield result, response if block_given?
|
469
474
|
return result
|
470
475
|
end
|
471
|
-
rescue ::
|
472
|
-
|
473
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
474
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
475
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
476
|
-
end
|
476
|
+
rescue ::Gapic::Rest::Error => e
|
477
|
+
raise ::Google::Cloud::Error.from_error(e)
|
477
478
|
end
|
478
479
|
|
479
480
|
##
|
@@ -488,8 +489,6 @@ module Google
|
|
488
489
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
489
490
|
# @param options [::Gapic::CallOptions, ::Hash]
|
490
491
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
491
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
492
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
493
492
|
#
|
494
493
|
# @overload get_router_status(project: nil, region: nil, router: nil)
|
495
494
|
# Pass arguments to `get_router_status` via keyword arguments. Note that at
|
@@ -520,28 +519,28 @@ module Google
|
|
520
519
|
# Customize the options with defaults
|
521
520
|
call_metadata = @config.rpcs.get_router_status.metadata.to_h
|
522
521
|
|
523
|
-
# Set x-goog-api-client
|
522
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
524
523
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
525
524
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
526
525
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
527
526
|
transports_version_send: [:rest]
|
528
527
|
|
528
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
529
|
+
|
529
530
|
options.apply_defaults timeout: @config.rpcs.get_router_status.timeout,
|
530
|
-
metadata: call_metadata
|
531
|
+
metadata: call_metadata,
|
532
|
+
retry_policy: @config.rpcs.get_router_status.retry_policy
|
531
533
|
|
532
534
|
options.apply_defaults timeout: @config.timeout,
|
533
|
-
metadata: @config.metadata
|
535
|
+
metadata: @config.metadata,
|
536
|
+
retry_policy: @config.retry_policy
|
534
537
|
|
535
538
|
@routers_stub.get_router_status request, options do |result, response|
|
536
539
|
yield result, response if block_given?
|
537
540
|
return result
|
538
541
|
end
|
539
|
-
rescue ::
|
540
|
-
|
541
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
542
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
543
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
544
|
-
end
|
542
|
+
rescue ::Gapic::Rest::Error => e
|
543
|
+
raise ::Google::Cloud::Error.from_error(e)
|
545
544
|
end
|
546
545
|
|
547
546
|
##
|
@@ -556,8 +555,6 @@ module Google
|
|
556
555
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
557
556
|
# @param options [::Gapic::CallOptions, ::Hash]
|
558
557
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
559
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
560
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
561
558
|
#
|
562
559
|
# @overload insert(project: nil, region: nil, request_id: nil, router_resource: nil)
|
563
560
|
# Pass arguments to `insert` via keyword arguments. Note that at
|
@@ -590,17 +587,21 @@ module Google
|
|
590
587
|
# Customize the options with defaults
|
591
588
|
call_metadata = @config.rpcs.insert.metadata.to_h
|
592
589
|
|
593
|
-
# Set x-goog-api-client
|
590
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
594
591
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
595
592
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
596
593
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
597
594
|
transports_version_send: [:rest]
|
598
595
|
|
596
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
597
|
+
|
599
598
|
options.apply_defaults timeout: @config.rpcs.insert.timeout,
|
600
|
-
metadata: call_metadata
|
599
|
+
metadata: call_metadata,
|
600
|
+
retry_policy: @config.rpcs.insert.retry_policy
|
601
601
|
|
602
602
|
options.apply_defaults timeout: @config.timeout,
|
603
|
-
metadata: @config.metadata
|
603
|
+
metadata: @config.metadata,
|
604
|
+
retry_policy: @config.retry_policy
|
604
605
|
|
605
606
|
@routers_stub.insert request, options do |result, response|
|
606
607
|
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
@@ -615,12 +616,8 @@ module Google
|
|
615
616
|
yield result, response if block_given?
|
616
617
|
return result
|
617
618
|
end
|
618
|
-
rescue ::
|
619
|
-
|
620
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
621
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
622
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
623
|
-
end
|
619
|
+
rescue ::Gapic::Rest::Error => e
|
620
|
+
raise ::Google::Cloud::Error.from_error(e)
|
624
621
|
end
|
625
622
|
|
626
623
|
##
|
@@ -635,8 +632,6 @@ module Google
|
|
635
632
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
636
633
|
# @param options [::Gapic::CallOptions, ::Hash]
|
637
634
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
638
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
639
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
640
635
|
#
|
641
636
|
# @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil)
|
642
637
|
# Pass arguments to `list` via keyword arguments. Note that at
|
@@ -675,29 +670,29 @@ module Google
|
|
675
670
|
# Customize the options with defaults
|
676
671
|
call_metadata = @config.rpcs.list.metadata.to_h
|
677
672
|
|
678
|
-
# Set x-goog-api-client
|
673
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
679
674
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
680
675
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
681
676
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
682
677
|
transports_version_send: [:rest]
|
683
678
|
|
679
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
680
|
+
|
684
681
|
options.apply_defaults timeout: @config.rpcs.list.timeout,
|
685
|
-
metadata: call_metadata
|
682
|
+
metadata: call_metadata,
|
683
|
+
retry_policy: @config.rpcs.list.retry_policy
|
686
684
|
|
687
685
|
options.apply_defaults timeout: @config.timeout,
|
688
|
-
metadata: @config.metadata
|
686
|
+
metadata: @config.metadata,
|
687
|
+
retry_policy: @config.retry_policy
|
689
688
|
|
690
689
|
@routers_stub.list request, options do |result, response|
|
691
690
|
result = ::Gapic::Rest::PagedEnumerable.new @routers_stub, :list, "items", request, result, options
|
692
691
|
yield result, response if block_given?
|
693
692
|
return result
|
694
693
|
end
|
695
|
-
rescue ::
|
696
|
-
|
697
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
698
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
699
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
700
|
-
end
|
694
|
+
rescue ::Gapic::Rest::Error => e
|
695
|
+
raise ::Google::Cloud::Error.from_error(e)
|
701
696
|
end
|
702
697
|
|
703
698
|
##
|
@@ -712,8 +707,6 @@ module Google
|
|
712
707
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
713
708
|
# @param options [::Gapic::CallOptions, ::Hash]
|
714
709
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
715
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
716
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
717
710
|
#
|
718
711
|
# @overload patch(project: nil, region: nil, request_id: nil, router: nil, router_resource: nil)
|
719
712
|
# Pass arguments to `patch` via keyword arguments. Note that at
|
@@ -748,17 +741,21 @@ module Google
|
|
748
741
|
# Customize the options with defaults
|
749
742
|
call_metadata = @config.rpcs.patch.metadata.to_h
|
750
743
|
|
751
|
-
# Set x-goog-api-client
|
744
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
752
745
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
753
746
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
754
747
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
755
748
|
transports_version_send: [:rest]
|
756
749
|
|
750
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
751
|
+
|
757
752
|
options.apply_defaults timeout: @config.rpcs.patch.timeout,
|
758
|
-
metadata: call_metadata
|
753
|
+
metadata: call_metadata,
|
754
|
+
retry_policy: @config.rpcs.patch.retry_policy
|
759
755
|
|
760
756
|
options.apply_defaults timeout: @config.timeout,
|
761
|
-
metadata: @config.metadata
|
757
|
+
metadata: @config.metadata,
|
758
|
+
retry_policy: @config.retry_policy
|
762
759
|
|
763
760
|
@routers_stub.patch request, options do |result, response|
|
764
761
|
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
@@ -773,12 +770,8 @@ module Google
|
|
773
770
|
yield result, response if block_given?
|
774
771
|
return result
|
775
772
|
end
|
776
|
-
rescue ::
|
777
|
-
|
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
|
773
|
+
rescue ::Gapic::Rest::Error => e
|
774
|
+
raise ::Google::Cloud::Error.from_error(e)
|
782
775
|
end
|
783
776
|
|
784
777
|
##
|
@@ -793,8 +786,6 @@ module Google
|
|
793
786
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
794
787
|
# @param options [::Gapic::CallOptions, ::Hash]
|
795
788
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
796
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
797
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
798
789
|
#
|
799
790
|
# @overload preview(project: nil, region: nil, router: nil, router_resource: nil)
|
800
791
|
# Pass arguments to `preview` via keyword arguments. Note that at
|
@@ -827,28 +818,28 @@ module Google
|
|
827
818
|
# Customize the options with defaults
|
828
819
|
call_metadata = @config.rpcs.preview.metadata.to_h
|
829
820
|
|
830
|
-
# Set x-goog-api-client
|
821
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
831
822
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
832
823
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
833
824
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
834
825
|
transports_version_send: [:rest]
|
835
826
|
|
827
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
828
|
+
|
836
829
|
options.apply_defaults timeout: @config.rpcs.preview.timeout,
|
837
|
-
metadata: call_metadata
|
830
|
+
metadata: call_metadata,
|
831
|
+
retry_policy: @config.rpcs.preview.retry_policy
|
838
832
|
|
839
833
|
options.apply_defaults timeout: @config.timeout,
|
840
|
-
metadata: @config.metadata
|
834
|
+
metadata: @config.metadata,
|
835
|
+
retry_policy: @config.retry_policy
|
841
836
|
|
842
837
|
@routers_stub.preview request, options do |result, response|
|
843
838
|
yield result, response if block_given?
|
844
839
|
return result
|
845
840
|
end
|
846
|
-
rescue ::
|
847
|
-
|
848
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
849
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
850
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
851
|
-
end
|
841
|
+
rescue ::Gapic::Rest::Error => e
|
842
|
+
raise ::Google::Cloud::Error.from_error(e)
|
852
843
|
end
|
853
844
|
|
854
845
|
##
|
@@ -863,8 +854,6 @@ module Google
|
|
863
854
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
864
855
|
# @param options [::Gapic::CallOptions, ::Hash]
|
865
856
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
866
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
867
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
868
857
|
#
|
869
858
|
# @overload update(project: nil, region: nil, request_id: nil, router: nil, router_resource: nil)
|
870
859
|
# Pass arguments to `update` via keyword arguments. Note that at
|
@@ -899,17 +888,21 @@ module Google
|
|
899
888
|
# Customize the options with defaults
|
900
889
|
call_metadata = @config.rpcs.update.metadata.to_h
|
901
890
|
|
902
|
-
# Set x-goog-api-client
|
891
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
903
892
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
904
893
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
905
894
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
906
895
|
transports_version_send: [:rest]
|
907
896
|
|
897
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
898
|
+
|
908
899
|
options.apply_defaults timeout: @config.rpcs.update.timeout,
|
909
|
-
metadata: call_metadata
|
900
|
+
metadata: call_metadata,
|
901
|
+
retry_policy: @config.rpcs.update.retry_policy
|
910
902
|
|
911
903
|
options.apply_defaults timeout: @config.timeout,
|
912
|
-
metadata: @config.metadata
|
904
|
+
metadata: @config.metadata,
|
905
|
+
retry_policy: @config.retry_policy
|
913
906
|
|
914
907
|
@routers_stub.update request, options do |result, response|
|
915
908
|
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
@@ -924,36 +917,38 @@ module Google
|
|
924
917
|
yield result, response if block_given?
|
925
918
|
return result
|
926
919
|
end
|
927
|
-
rescue ::
|
928
|
-
|
929
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
930
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
931
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
932
|
-
end
|
920
|
+
rescue ::Gapic::Rest::Error => e
|
921
|
+
raise ::Google::Cloud::Error.from_error(e)
|
933
922
|
end
|
934
923
|
|
935
924
|
##
|
936
925
|
# Configuration class for the Routers REST API.
|
937
926
|
#
|
938
927
|
# This class represents the configuration for Routers REST,
|
939
|
-
# providing control over
|
928
|
+
# providing control over timeouts, retry behavior, logging, transport
|
929
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
930
|
+
# applied individually to specific RPCs. See
|
931
|
+
# {::Google::Cloud::Compute::V1::Routers::Rest::Client::Configuration::Rpcs}
|
932
|
+
# for a list of RPCs that can be configured independently.
|
940
933
|
#
|
941
934
|
# Configuration can be applied globally to all clients, or to a single client
|
942
935
|
# on construction.
|
943
936
|
#
|
944
|
-
#
|
945
|
-
#
|
946
|
-
# To modify the global config, setting the timeout for all calls to 10 seconds:
|
947
|
-
#
|
948
|
-
# ::Google::Cloud::Compute::V1::Routers::Client.configure do |config|
|
949
|
-
# config.timeout = 10.0
|
950
|
-
# end
|
937
|
+
# @example
|
951
938
|
#
|
952
|
-
#
|
939
|
+
# # Modify the global config, setting the timeout for
|
940
|
+
# # aggregated_list to 20 seconds,
|
941
|
+
# # and all remaining timeouts to 10 seconds.
|
942
|
+
# ::Google::Cloud::Compute::V1::Routers::Rest::Client.configure do |config|
|
943
|
+
# config.timeout = 10.0
|
944
|
+
# config.rpcs.aggregated_list.timeout = 20.0
|
945
|
+
# end
|
953
946
|
#
|
954
|
-
#
|
955
|
-
#
|
956
|
-
#
|
947
|
+
# # Apply the above configuration only to a new client.
|
948
|
+
# client = ::Google::Cloud::Compute::V1::Routers::Rest::Client.new do |config|
|
949
|
+
# config.timeout = 10.0
|
950
|
+
# config.rpcs.aggregated_list.timeout = 20.0
|
951
|
+
# end
|
957
952
|
#
|
958
953
|
# @!attribute [rw] endpoint
|
959
954
|
# The hostname or hostname:port of the service endpoint.
|
@@ -982,8 +977,19 @@ module Google
|
|
982
977
|
# The call timeout in seconds.
|
983
978
|
# @return [::Numeric]
|
984
979
|
# @!attribute [rw] metadata
|
985
|
-
# Additional
|
980
|
+
# Additional headers to be sent with the call.
|
986
981
|
# @return [::Hash{::Symbol=>::String}]
|
982
|
+
# @!attribute [rw] retry_policy
|
983
|
+
# The retry policy. The value is a hash with the following keys:
|
984
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
985
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
986
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
987
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
988
|
+
# trigger a retry.
|
989
|
+
# @return [::Hash]
|
990
|
+
# @!attribute [rw] quota_project
|
991
|
+
# A separate project against which to charge quota.
|
992
|
+
# @return [::String]
|
987
993
|
#
|
988
994
|
class Configuration
|
989
995
|
extend ::Gapic::Config
|
@@ -998,6 +1004,8 @@ module Google
|
|
998
1004
|
config_attr :lib_version, nil, ::String, nil
|
999
1005
|
config_attr :timeout, nil, ::Numeric, nil
|
1000
1006
|
config_attr :metadata, nil, ::Hash, nil
|
1007
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1008
|
+
config_attr :quota_project, nil, ::String, nil
|
1001
1009
|
|
1002
1010
|
# @private
|
1003
1011
|
def initialize parent_config = nil
|
@@ -1026,9 +1034,14 @@ module Google
|
|
1026
1034
|
# the following configuration fields:
|
1027
1035
|
#
|
1028
1036
|
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1029
|
-
#
|
1030
|
-
#
|
1031
|
-
#
|
1037
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
1038
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1039
|
+
# include the following keys:
|
1040
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1041
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1042
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1043
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1044
|
+
# trigger a retry.
|
1032
1045
|
#
|
1033
1046
|
class Rpcs
|
1034
1047
|
##
|