google-cloud-compute-v1 1.7.1 → 1.9.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 +260 -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 +96 -73
- 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 +159 -150
- 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 +761 -86
- data/proto_docs/google/protobuf/duration.rb +98 -0
- metadata +14 -5
@@ -143,13 +143,22 @@ module Google
|
|
143
143
|
|
144
144
|
# Create credentials
|
145
145
|
credentials = @config.credentials
|
146
|
-
|
146
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
147
|
+
# but only if the default endpoint does not have a region prefix.
|
148
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
149
|
+
!@config.endpoint.split(".").first.include?("-")
|
150
|
+
credentials ||= Credentials.default scope: @config.scope,
|
151
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
147
152
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
148
153
|
credentials = Credentials.new credentials, scope: @config.scope
|
149
154
|
end
|
150
155
|
|
156
|
+
@quota_project_id = @config.quota_project
|
157
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
158
|
+
|
151
159
|
@global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
|
152
160
|
config.credentials = credentials
|
161
|
+
config.quota_project = @quota_project_id
|
153
162
|
config.endpoint = @config.endpoint
|
154
163
|
end
|
155
164
|
|
@@ -177,8 +186,6 @@ module Google
|
|
177
186
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
178
187
|
# @param options [::Gapic::CallOptions, ::Hash]
|
179
188
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
180
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
181
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
182
189
|
#
|
183
190
|
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
184
191
|
# Pass arguments to `aggregated_list` via keyword arguments. Note that at
|
@@ -217,29 +224,29 @@ module Google
|
|
217
224
|
# Customize the options with defaults
|
218
225
|
call_metadata = @config.rpcs.aggregated_list.metadata.to_h
|
219
226
|
|
220
|
-
# Set x-goog-api-client
|
227
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
221
228
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
222
229
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
223
230
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
224
231
|
transports_version_send: [:rest]
|
225
232
|
|
233
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
234
|
+
|
226
235
|
options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
|
227
|
-
metadata: call_metadata
|
236
|
+
metadata: call_metadata,
|
237
|
+
retry_policy: @config.rpcs.aggregated_list.retry_policy
|
228
238
|
|
229
239
|
options.apply_defaults timeout: @config.timeout,
|
230
|
-
metadata: @config.metadata
|
240
|
+
metadata: @config.metadata,
|
241
|
+
retry_policy: @config.retry_policy
|
231
242
|
|
232
243
|
@url_maps_stub.aggregated_list request, options do |result, response|
|
233
244
|
result = ::Gapic::Rest::PagedEnumerable.new @url_maps_stub, :aggregated_list, "items", request, result, options
|
234
245
|
yield result, response if block_given?
|
235
246
|
return result
|
236
247
|
end
|
237
|
-
rescue ::
|
238
|
-
|
239
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
240
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
241
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
242
|
-
end
|
248
|
+
rescue ::Gapic::Rest::Error => e
|
249
|
+
raise ::Google::Cloud::Error.from_error(e)
|
243
250
|
end
|
244
251
|
|
245
252
|
##
|
@@ -254,8 +261,6 @@ module Google
|
|
254
261
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
255
262
|
# @param options [::Gapic::CallOptions, ::Hash]
|
256
263
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
257
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
258
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
259
264
|
#
|
260
265
|
# @overload delete(project: nil, request_id: nil, url_map: nil)
|
261
266
|
# Pass arguments to `delete` via keyword arguments. Note that at
|
@@ -286,17 +291,21 @@ module Google
|
|
286
291
|
# Customize the options with defaults
|
287
292
|
call_metadata = @config.rpcs.delete.metadata.to_h
|
288
293
|
|
289
|
-
# Set x-goog-api-client
|
294
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
290
295
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
291
296
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
292
297
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
293
298
|
transports_version_send: [:rest]
|
294
299
|
|
300
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
301
|
+
|
295
302
|
options.apply_defaults timeout: @config.rpcs.delete.timeout,
|
296
|
-
metadata: call_metadata
|
303
|
+
metadata: call_metadata,
|
304
|
+
retry_policy: @config.rpcs.delete.retry_policy
|
297
305
|
|
298
306
|
options.apply_defaults timeout: @config.timeout,
|
299
|
-
metadata: @config.metadata
|
307
|
+
metadata: @config.metadata,
|
308
|
+
retry_policy: @config.retry_policy
|
300
309
|
|
301
310
|
@url_maps_stub.delete request, options do |result, response|
|
302
311
|
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
@@ -310,12 +319,8 @@ module Google
|
|
310
319
|
yield result, response if block_given?
|
311
320
|
return result
|
312
321
|
end
|
313
|
-
rescue ::
|
314
|
-
|
315
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
316
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
317
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
318
|
-
end
|
322
|
+
rescue ::Gapic::Rest::Error => e
|
323
|
+
raise ::Google::Cloud::Error.from_error(e)
|
319
324
|
end
|
320
325
|
|
321
326
|
##
|
@@ -330,8 +335,6 @@ module Google
|
|
330
335
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
331
336
|
# @param options [::Gapic::CallOptions, ::Hash]
|
332
337
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
333
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
334
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
335
338
|
#
|
336
339
|
# @overload get(project: nil, url_map: nil)
|
337
340
|
# Pass arguments to `get` via keyword arguments. Note that at
|
@@ -360,28 +363,28 @@ module Google
|
|
360
363
|
# Customize the options with defaults
|
361
364
|
call_metadata = @config.rpcs.get.metadata.to_h
|
362
365
|
|
363
|
-
# Set x-goog-api-client
|
366
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
364
367
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
365
368
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
366
369
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
367
370
|
transports_version_send: [:rest]
|
368
371
|
|
372
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
373
|
+
|
369
374
|
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
370
|
-
metadata: call_metadata
|
375
|
+
metadata: call_metadata,
|
376
|
+
retry_policy: @config.rpcs.get.retry_policy
|
371
377
|
|
372
378
|
options.apply_defaults timeout: @config.timeout,
|
373
|
-
metadata: @config.metadata
|
379
|
+
metadata: @config.metadata,
|
380
|
+
retry_policy: @config.retry_policy
|
374
381
|
|
375
382
|
@url_maps_stub.get request, options do |result, response|
|
376
383
|
yield result, response if block_given?
|
377
384
|
return result
|
378
385
|
end
|
379
|
-
rescue ::
|
380
|
-
|
381
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
382
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
383
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
384
|
-
end
|
386
|
+
rescue ::Gapic::Rest::Error => e
|
387
|
+
raise ::Google::Cloud::Error.from_error(e)
|
385
388
|
end
|
386
389
|
|
387
390
|
##
|
@@ -396,8 +399,6 @@ module Google
|
|
396
399
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
397
400
|
# @param options [::Gapic::CallOptions, ::Hash]
|
398
401
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
399
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
400
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
401
402
|
#
|
402
403
|
# @overload insert(project: nil, request_id: nil, url_map_resource: nil)
|
403
404
|
# Pass arguments to `insert` via keyword arguments. Note that at
|
@@ -428,17 +429,21 @@ module Google
|
|
428
429
|
# Customize the options with defaults
|
429
430
|
call_metadata = @config.rpcs.insert.metadata.to_h
|
430
431
|
|
431
|
-
# Set x-goog-api-client
|
432
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
432
433
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
433
434
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
434
435
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
435
436
|
transports_version_send: [:rest]
|
436
437
|
|
438
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
439
|
+
|
437
440
|
options.apply_defaults timeout: @config.rpcs.insert.timeout,
|
438
|
-
metadata: call_metadata
|
441
|
+
metadata: call_metadata,
|
442
|
+
retry_policy: @config.rpcs.insert.retry_policy
|
439
443
|
|
440
444
|
options.apply_defaults timeout: @config.timeout,
|
441
|
-
metadata: @config.metadata
|
445
|
+
metadata: @config.metadata,
|
446
|
+
retry_policy: @config.retry_policy
|
442
447
|
|
443
448
|
@url_maps_stub.insert request, options do |result, response|
|
444
449
|
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
@@ -452,12 +457,8 @@ module Google
|
|
452
457
|
yield result, response if block_given?
|
453
458
|
return result
|
454
459
|
end
|
455
|
-
rescue ::
|
456
|
-
|
457
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
458
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
459
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
460
|
-
end
|
460
|
+
rescue ::Gapic::Rest::Error => e
|
461
|
+
raise ::Google::Cloud::Error.from_error(e)
|
461
462
|
end
|
462
463
|
|
463
464
|
##
|
@@ -472,8 +473,6 @@ module Google
|
|
472
473
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
473
474
|
# @param options [::Gapic::CallOptions, ::Hash]
|
474
475
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
475
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
476
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
477
476
|
#
|
478
477
|
# @overload invalidate_cache(cache_invalidation_rule_resource: nil, project: nil, request_id: nil, url_map: nil)
|
479
478
|
# Pass arguments to `invalidate_cache` via keyword arguments. Note that at
|
@@ -506,17 +505,21 @@ module Google
|
|
506
505
|
# Customize the options with defaults
|
507
506
|
call_metadata = @config.rpcs.invalidate_cache.metadata.to_h
|
508
507
|
|
509
|
-
# Set x-goog-api-client
|
508
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
510
509
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
511
510
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
512
511
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
513
512
|
transports_version_send: [:rest]
|
514
513
|
|
514
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
515
|
+
|
515
516
|
options.apply_defaults timeout: @config.rpcs.invalidate_cache.timeout,
|
516
|
-
metadata: call_metadata
|
517
|
+
metadata: call_metadata,
|
518
|
+
retry_policy: @config.rpcs.invalidate_cache.retry_policy
|
517
519
|
|
518
520
|
options.apply_defaults timeout: @config.timeout,
|
519
|
-
metadata: @config.metadata
|
521
|
+
metadata: @config.metadata,
|
522
|
+
retry_policy: @config.retry_policy
|
520
523
|
|
521
524
|
@url_maps_stub.invalidate_cache request, options do |result, response|
|
522
525
|
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
@@ -530,12 +533,8 @@ module Google
|
|
530
533
|
yield result, response if block_given?
|
531
534
|
return result
|
532
535
|
end
|
533
|
-
rescue ::
|
534
|
-
|
535
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
536
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
537
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
538
|
-
end
|
536
|
+
rescue ::Gapic::Rest::Error => e
|
537
|
+
raise ::Google::Cloud::Error.from_error(e)
|
539
538
|
end
|
540
539
|
|
541
540
|
##
|
@@ -550,8 +549,6 @@ module Google
|
|
550
549
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
551
550
|
# @param options [::Gapic::CallOptions, ::Hash]
|
552
551
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
553
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
554
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
555
552
|
#
|
556
553
|
# @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
557
554
|
# Pass arguments to `list` via keyword arguments. Note that at
|
@@ -588,29 +585,29 @@ module Google
|
|
588
585
|
# Customize the options with defaults
|
589
586
|
call_metadata = @config.rpcs.list.metadata.to_h
|
590
587
|
|
591
|
-
# Set x-goog-api-client
|
588
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
592
589
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
593
590
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
594
591
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
595
592
|
transports_version_send: [:rest]
|
596
593
|
|
594
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
595
|
+
|
597
596
|
options.apply_defaults timeout: @config.rpcs.list.timeout,
|
598
|
-
metadata: call_metadata
|
597
|
+
metadata: call_metadata,
|
598
|
+
retry_policy: @config.rpcs.list.retry_policy
|
599
599
|
|
600
600
|
options.apply_defaults timeout: @config.timeout,
|
601
|
-
metadata: @config.metadata
|
601
|
+
metadata: @config.metadata,
|
602
|
+
retry_policy: @config.retry_policy
|
602
603
|
|
603
604
|
@url_maps_stub.list request, options do |result, response|
|
604
605
|
result = ::Gapic::Rest::PagedEnumerable.new @url_maps_stub, :list, "items", request, result, options
|
605
606
|
yield result, response if block_given?
|
606
607
|
return result
|
607
608
|
end
|
608
|
-
rescue ::
|
609
|
-
|
610
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
611
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
612
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
613
|
-
end
|
609
|
+
rescue ::Gapic::Rest::Error => e
|
610
|
+
raise ::Google::Cloud::Error.from_error(e)
|
614
611
|
end
|
615
612
|
|
616
613
|
##
|
@@ -625,8 +622,6 @@ module Google
|
|
625
622
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
626
623
|
# @param options [::Gapic::CallOptions, ::Hash]
|
627
624
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
628
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
629
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
630
625
|
#
|
631
626
|
# @overload patch(project: nil, request_id: nil, url_map: nil, url_map_resource: nil)
|
632
627
|
# Pass arguments to `patch` via keyword arguments. Note that at
|
@@ -659,17 +654,21 @@ module Google
|
|
659
654
|
# Customize the options with defaults
|
660
655
|
call_metadata = @config.rpcs.patch.metadata.to_h
|
661
656
|
|
662
|
-
# Set x-goog-api-client
|
657
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
663
658
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
664
659
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
665
660
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
666
661
|
transports_version_send: [:rest]
|
667
662
|
|
663
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
664
|
+
|
668
665
|
options.apply_defaults timeout: @config.rpcs.patch.timeout,
|
669
|
-
metadata: call_metadata
|
666
|
+
metadata: call_metadata,
|
667
|
+
retry_policy: @config.rpcs.patch.retry_policy
|
670
668
|
|
671
669
|
options.apply_defaults timeout: @config.timeout,
|
672
|
-
metadata: @config.metadata
|
670
|
+
metadata: @config.metadata,
|
671
|
+
retry_policy: @config.retry_policy
|
673
672
|
|
674
673
|
@url_maps_stub.patch request, options do |result, response|
|
675
674
|
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
@@ -683,12 +682,8 @@ module Google
|
|
683
682
|
yield result, response if block_given?
|
684
683
|
return result
|
685
684
|
end
|
686
|
-
rescue ::
|
687
|
-
|
688
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
689
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
690
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
691
|
-
end
|
685
|
+
rescue ::Gapic::Rest::Error => e
|
686
|
+
raise ::Google::Cloud::Error.from_error(e)
|
692
687
|
end
|
693
688
|
|
694
689
|
##
|
@@ -703,8 +698,6 @@ module Google
|
|
703
698
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
704
699
|
# @param options [::Gapic::CallOptions, ::Hash]
|
705
700
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
706
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
707
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
708
701
|
#
|
709
702
|
# @overload update(project: nil, request_id: nil, url_map: nil, url_map_resource: nil)
|
710
703
|
# Pass arguments to `update` via keyword arguments. Note that at
|
@@ -737,17 +730,21 @@ module Google
|
|
737
730
|
# Customize the options with defaults
|
738
731
|
call_metadata = @config.rpcs.update.metadata.to_h
|
739
732
|
|
740
|
-
# Set x-goog-api-client
|
733
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
741
734
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
742
735
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
743
736
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
744
737
|
transports_version_send: [:rest]
|
745
738
|
|
739
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
740
|
+
|
746
741
|
options.apply_defaults timeout: @config.rpcs.update.timeout,
|
747
|
-
metadata: call_metadata
|
742
|
+
metadata: call_metadata,
|
743
|
+
retry_policy: @config.rpcs.update.retry_policy
|
748
744
|
|
749
745
|
options.apply_defaults timeout: @config.timeout,
|
750
|
-
metadata: @config.metadata
|
746
|
+
metadata: @config.metadata,
|
747
|
+
retry_policy: @config.retry_policy
|
751
748
|
|
752
749
|
@url_maps_stub.update request, options do |result, response|
|
753
750
|
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
@@ -761,12 +758,8 @@ module Google
|
|
761
758
|
yield result, response if block_given?
|
762
759
|
return result
|
763
760
|
end
|
764
|
-
rescue ::
|
765
|
-
|
766
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
767
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
768
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
769
|
-
end
|
761
|
+
rescue ::Gapic::Rest::Error => e
|
762
|
+
raise ::Google::Cloud::Error.from_error(e)
|
770
763
|
end
|
771
764
|
|
772
765
|
##
|
@@ -781,8 +774,6 @@ module Google
|
|
781
774
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
782
775
|
# @param options [::Gapic::CallOptions, ::Hash]
|
783
776
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
784
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
785
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
786
777
|
#
|
787
778
|
# @overload validate(project: nil, url_map: nil, url_maps_validate_request_resource: nil)
|
788
779
|
# Pass arguments to `validate` via keyword arguments. Note that at
|
@@ -813,52 +804,58 @@ module Google
|
|
813
804
|
# Customize the options with defaults
|
814
805
|
call_metadata = @config.rpcs.validate.metadata.to_h
|
815
806
|
|
816
|
-
# Set x-goog-api-client
|
807
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
817
808
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
818
809
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
819
810
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
820
811
|
transports_version_send: [:rest]
|
821
812
|
|
813
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
814
|
+
|
822
815
|
options.apply_defaults timeout: @config.rpcs.validate.timeout,
|
823
|
-
metadata: call_metadata
|
816
|
+
metadata: call_metadata,
|
817
|
+
retry_policy: @config.rpcs.validate.retry_policy
|
824
818
|
|
825
819
|
options.apply_defaults timeout: @config.timeout,
|
826
|
-
metadata: @config.metadata
|
820
|
+
metadata: @config.metadata,
|
821
|
+
retry_policy: @config.retry_policy
|
827
822
|
|
828
823
|
@url_maps_stub.validate request, options do |result, response|
|
829
824
|
yield result, response if block_given?
|
830
825
|
return result
|
831
826
|
end
|
832
|
-
rescue ::
|
833
|
-
|
834
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
835
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
836
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
837
|
-
end
|
827
|
+
rescue ::Gapic::Rest::Error => e
|
828
|
+
raise ::Google::Cloud::Error.from_error(e)
|
838
829
|
end
|
839
830
|
|
840
831
|
##
|
841
832
|
# Configuration class for the UrlMaps REST API.
|
842
833
|
#
|
843
834
|
# This class represents the configuration for UrlMaps REST,
|
844
|
-
# providing control over
|
835
|
+
# providing control over timeouts, retry behavior, logging, transport
|
836
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
837
|
+
# applied individually to specific RPCs. See
|
838
|
+
# {::Google::Cloud::Compute::V1::UrlMaps::Rest::Client::Configuration::Rpcs}
|
839
|
+
# for a list of RPCs that can be configured independently.
|
845
840
|
#
|
846
841
|
# Configuration can be applied globally to all clients, or to a single client
|
847
842
|
# on construction.
|
848
843
|
#
|
849
|
-
#
|
850
|
-
#
|
851
|
-
# To modify the global config, setting the timeout for all calls to 10 seconds:
|
852
|
-
#
|
853
|
-
# ::Google::Cloud::Compute::V1::UrlMaps::Client.configure do |config|
|
854
|
-
# config.timeout = 10.0
|
855
|
-
# end
|
844
|
+
# @example
|
856
845
|
#
|
857
|
-
#
|
846
|
+
# # Modify the global config, setting the timeout for
|
847
|
+
# # aggregated_list to 20 seconds,
|
848
|
+
# # and all remaining timeouts to 10 seconds.
|
849
|
+
# ::Google::Cloud::Compute::V1::UrlMaps::Rest::Client.configure do |config|
|
850
|
+
# config.timeout = 10.0
|
851
|
+
# config.rpcs.aggregated_list.timeout = 20.0
|
852
|
+
# end
|
858
853
|
#
|
859
|
-
#
|
860
|
-
#
|
861
|
-
#
|
854
|
+
# # Apply the above configuration only to a new client.
|
855
|
+
# client = ::Google::Cloud::Compute::V1::UrlMaps::Rest::Client.new do |config|
|
856
|
+
# config.timeout = 10.0
|
857
|
+
# config.rpcs.aggregated_list.timeout = 20.0
|
858
|
+
# end
|
862
859
|
#
|
863
860
|
# @!attribute [rw] endpoint
|
864
861
|
# The hostname or hostname:port of the service endpoint.
|
@@ -887,8 +884,19 @@ module Google
|
|
887
884
|
# The call timeout in seconds.
|
888
885
|
# @return [::Numeric]
|
889
886
|
# @!attribute [rw] metadata
|
890
|
-
# Additional
|
887
|
+
# Additional headers to be sent with the call.
|
891
888
|
# @return [::Hash{::Symbol=>::String}]
|
889
|
+
# @!attribute [rw] retry_policy
|
890
|
+
# The retry policy. The value is a hash with the following keys:
|
891
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
892
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
893
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
894
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
895
|
+
# trigger a retry.
|
896
|
+
# @return [::Hash]
|
897
|
+
# @!attribute [rw] quota_project
|
898
|
+
# A separate project against which to charge quota.
|
899
|
+
# @return [::String]
|
892
900
|
#
|
893
901
|
class Configuration
|
894
902
|
extend ::Gapic::Config
|
@@ -903,6 +911,8 @@ module Google
|
|
903
911
|
config_attr :lib_version, nil, ::String, nil
|
904
912
|
config_attr :timeout, nil, ::Numeric, nil
|
905
913
|
config_attr :metadata, nil, ::Hash, nil
|
914
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
915
|
+
config_attr :quota_project, nil, ::String, nil
|
906
916
|
|
907
917
|
# @private
|
908
918
|
def initialize parent_config = nil
|
@@ -931,9 +941,14 @@ module Google
|
|
931
941
|
# the following configuration fields:
|
932
942
|
#
|
933
943
|
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
934
|
-
#
|
935
|
-
#
|
936
|
-
#
|
944
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
945
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
946
|
+
# include the following keys:
|
947
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
948
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
949
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
950
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
951
|
+
# trigger a retry.
|
937
952
|
#
|
938
953
|
class Rpcs
|
939
954
|
##
|