google-cloud-compute-v1 1.8.0 → 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 +194 -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 +536 -28
- data/proto_docs/google/protobuf/duration.rb +98 -0
- metadata +14 -5
@@ -35,7 +35,9 @@ module Google
|
|
35
35
|
# the REST modules only when it's required.
|
36
36
|
require "gapic/rest"
|
37
37
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
|
39
|
+
numeric_enums: false,
|
40
|
+
raise_faraday_errors: false
|
39
41
|
end
|
40
42
|
|
41
43
|
##
|
@@ -55,7 +57,7 @@ module Google
|
|
55
57
|
def aggregated_list request_pb, options = nil
|
56
58
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
57
59
|
|
58
|
-
verb, uri, query_string_params, body = transcode_aggregated_list_request request_pb
|
60
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_aggregated_list_request request_pb
|
59
61
|
query_string_params = if query_string_params.any?
|
60
62
|
query_string_params.to_h { |p| p.split("=", 2) }
|
61
63
|
else
|
@@ -92,7 +94,7 @@ module Google
|
|
92
94
|
def delete request_pb, options = nil
|
93
95
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
94
96
|
|
95
|
-
verb, uri, query_string_params, body = transcode_delete_request request_pb
|
97
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_request request_pb
|
96
98
|
query_string_params = if query_string_params.any?
|
97
99
|
query_string_params.to_h { |p| p.split("=", 2) }
|
98
100
|
else
|
@@ -129,7 +131,7 @@ module Google
|
|
129
131
|
def get request_pb, options = nil
|
130
132
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
131
133
|
|
132
|
-
verb, uri, query_string_params, body = transcode_get_request request_pb
|
134
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_request request_pb
|
133
135
|
query_string_params = if query_string_params.any?
|
134
136
|
query_string_params.to_h { |p| p.split("=", 2) }
|
135
137
|
else
|
@@ -166,7 +168,7 @@ module Google
|
|
166
168
|
def get_nat_mapping_info request_pb, options = nil
|
167
169
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
168
170
|
|
169
|
-
verb, uri, query_string_params, body = transcode_get_nat_mapping_info_request request_pb
|
171
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_nat_mapping_info_request request_pb
|
170
172
|
query_string_params = if query_string_params.any?
|
171
173
|
query_string_params.to_h { |p| p.split("=", 2) }
|
172
174
|
else
|
@@ -203,7 +205,7 @@ module Google
|
|
203
205
|
def get_router_status request_pb, options = nil
|
204
206
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
205
207
|
|
206
|
-
verb, uri, query_string_params, body = transcode_get_router_status_request request_pb
|
208
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_router_status_request request_pb
|
207
209
|
query_string_params = if query_string_params.any?
|
208
210
|
query_string_params.to_h { |p| p.split("=", 2) }
|
209
211
|
else
|
@@ -240,7 +242,7 @@ module Google
|
|
240
242
|
def insert request_pb, options = nil
|
241
243
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
242
244
|
|
243
|
-
verb, uri, query_string_params, body = transcode_insert_request request_pb
|
245
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_insert_request request_pb
|
244
246
|
query_string_params = if query_string_params.any?
|
245
247
|
query_string_params.to_h { |p| p.split("=", 2) }
|
246
248
|
else
|
@@ -277,7 +279,7 @@ module Google
|
|
277
279
|
def list request_pb, options = nil
|
278
280
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
279
281
|
|
280
|
-
verb, uri, query_string_params, body = transcode_list_request request_pb
|
282
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_request request_pb
|
281
283
|
query_string_params = if query_string_params.any?
|
282
284
|
query_string_params.to_h { |p| p.split("=", 2) }
|
283
285
|
else
|
@@ -314,7 +316,7 @@ module Google
|
|
314
316
|
def patch request_pb, options = nil
|
315
317
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
316
318
|
|
317
|
-
verb, uri, query_string_params, body = transcode_patch_request request_pb
|
319
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_patch_request request_pb
|
318
320
|
query_string_params = if query_string_params.any?
|
319
321
|
query_string_params.to_h { |p| p.split("=", 2) }
|
320
322
|
else
|
@@ -351,7 +353,7 @@ module Google
|
|
351
353
|
def preview request_pb, options = nil
|
352
354
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
353
355
|
|
354
|
-
verb, uri, query_string_params, body = transcode_preview_request request_pb
|
356
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_preview_request request_pb
|
355
357
|
query_string_params = if query_string_params.any?
|
356
358
|
query_string_params.to_h { |p| p.split("=", 2) }
|
357
359
|
else
|
@@ -388,7 +390,7 @@ module Google
|
|
388
390
|
def update request_pb, options = nil
|
389
391
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
390
392
|
|
391
|
-
verb, uri, query_string_params, body = transcode_update_request request_pb
|
393
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_request request_pb
|
392
394
|
query_string_params = if query_string_params.any?
|
393
395
|
query_string_params.to_h { |p| p.split("=", 2) }
|
394
396
|
else
|
@@ -408,9 +410,6 @@ module Google
|
|
408
410
|
result
|
409
411
|
end
|
410
412
|
|
411
|
-
|
412
|
-
private
|
413
|
-
|
414
413
|
##
|
415
414
|
# @private
|
416
415
|
#
|
@@ -420,7 +419,7 @@ module Google
|
|
420
419
|
# A request object representing the call parameters. Required.
|
421
420
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
422
421
|
# Uri, Body, Query string parameters
|
423
|
-
def transcode_aggregated_list_request request_pb
|
422
|
+
def self.transcode_aggregated_list_request request_pb
|
424
423
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
425
424
|
.with_bindings(
|
426
425
|
uri_method: :get,
|
@@ -441,7 +440,7 @@ module Google
|
|
441
440
|
# A request object representing the call parameters. Required.
|
442
441
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
443
442
|
# Uri, Body, Query string parameters
|
444
|
-
def transcode_delete_request request_pb
|
443
|
+
def self.transcode_delete_request request_pb
|
445
444
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
446
445
|
.with_bindings(
|
447
446
|
uri_method: :delete,
|
@@ -464,7 +463,7 @@ module Google
|
|
464
463
|
# A request object representing the call parameters. Required.
|
465
464
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
466
465
|
# Uri, Body, Query string parameters
|
467
|
-
def transcode_get_request request_pb
|
466
|
+
def self.transcode_get_request request_pb
|
468
467
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
469
468
|
.with_bindings(
|
470
469
|
uri_method: :get,
|
@@ -487,7 +486,7 @@ module Google
|
|
487
486
|
# A request object representing the call parameters. Required.
|
488
487
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
489
488
|
# Uri, Body, Query string parameters
|
490
|
-
def transcode_get_nat_mapping_info_request request_pb
|
489
|
+
def self.transcode_get_nat_mapping_info_request request_pb
|
491
490
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
492
491
|
.with_bindings(
|
493
492
|
uri_method: :get,
|
@@ -510,7 +509,7 @@ module Google
|
|
510
509
|
# A request object representing the call parameters. Required.
|
511
510
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
512
511
|
# Uri, Body, Query string parameters
|
513
|
-
def transcode_get_router_status_request request_pb
|
512
|
+
def self.transcode_get_router_status_request request_pb
|
514
513
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
515
514
|
.with_bindings(
|
516
515
|
uri_method: :get,
|
@@ -533,7 +532,7 @@ module Google
|
|
533
532
|
# A request object representing the call parameters. Required.
|
534
533
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
535
534
|
# Uri, Body, Query string parameters
|
536
|
-
def transcode_insert_request request_pb
|
535
|
+
def self.transcode_insert_request request_pb
|
537
536
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
538
537
|
.with_bindings(
|
539
538
|
uri_method: :post,
|
@@ -556,7 +555,7 @@ module Google
|
|
556
555
|
# A request object representing the call parameters. Required.
|
557
556
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
558
557
|
# Uri, Body, Query string parameters
|
559
|
-
def transcode_list_request request_pb
|
558
|
+
def self.transcode_list_request request_pb
|
560
559
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
561
560
|
.with_bindings(
|
562
561
|
uri_method: :get,
|
@@ -578,7 +577,7 @@ module Google
|
|
578
577
|
# A request object representing the call parameters. Required.
|
579
578
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
580
579
|
# Uri, Body, Query string parameters
|
581
|
-
def transcode_patch_request request_pb
|
580
|
+
def self.transcode_patch_request request_pb
|
582
581
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
583
582
|
.with_bindings(
|
584
583
|
uri_method: :patch,
|
@@ -602,7 +601,7 @@ module Google
|
|
602
601
|
# A request object representing the call parameters. Required.
|
603
602
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
604
603
|
# Uri, Body, Query string parameters
|
605
|
-
def transcode_preview_request request_pb
|
604
|
+
def self.transcode_preview_request request_pb
|
606
605
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
607
606
|
.with_bindings(
|
608
607
|
uri_method: :post,
|
@@ -626,7 +625,7 @@ module Google
|
|
626
625
|
# A request object representing the call parameters. Required.
|
627
626
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
628
627
|
# Uri, Body, Query string parameters
|
629
|
-
def transcode_update_request request_pb
|
628
|
+
def self.transcode_update_request request_pb
|
630
629
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
631
630
|
.with_bindings(
|
632
631
|
uri_method: :put,
|
@@ -16,12 +16,27 @@
|
|
16
16
|
|
17
17
|
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
18
|
|
19
|
+
require "gapic/rest"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/compute/v1/version"
|
24
|
+
|
25
|
+
require "google/cloud/compute/v1/routers/credentials"
|
19
26
|
require "google/cloud/compute/v1/routers/rest/client"
|
20
27
|
|
21
28
|
module Google
|
22
29
|
module Cloud
|
23
30
|
module Compute
|
24
31
|
module V1
|
32
|
+
##
|
33
|
+
# The Routers API.
|
34
|
+
#
|
35
|
+
# To load this service and instantiate a REST client:
|
36
|
+
#
|
37
|
+
# require "google/cloud/compute/v1/routers/rest"
|
38
|
+
# client = ::Google::Cloud::Compute::V1::Routers::Rest::Client.new
|
39
|
+
#
|
25
40
|
module Routers
|
26
41
|
# Client for the REST transport
|
27
42
|
module Rest
|
@@ -31,3 +46,6 @@ module Google
|
|
31
46
|
end
|
32
47
|
end
|
33
48
|
end
|
49
|
+
|
50
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
51
|
+
require "google/cloud/compute/v1/routers/rest/helpers" if ::File.file? helper_path
|
@@ -31,9 +31,9 @@ module Google
|
|
31
31
|
##
|
32
32
|
# The Routers API.
|
33
33
|
#
|
34
|
-
#
|
34
|
+
# @example Load this service and instantiate a REST client
|
35
35
|
#
|
36
|
-
# require "google/cloud/compute/v1/routers"
|
36
|
+
# require "google/cloud/compute/v1/routers/rest"
|
37
37
|
# client = ::Google::Cloud::Compute::V1::Routers::Rest::Client.new
|
38
38
|
#
|
39
39
|
module Routers
|
@@ -130,13 +130,22 @@ module Google
|
|
130
130
|
|
131
131
|
# Create credentials
|
132
132
|
credentials = @config.credentials
|
133
|
-
|
133
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
134
|
+
# but only if the default endpoint does not have a region prefix.
|
135
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
136
|
+
!@config.endpoint.split(".").first.include?("-")
|
137
|
+
credentials ||= Credentials.default scope: @config.scope,
|
138
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
134
139
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
135
140
|
credentials = Credentials.new credentials, scope: @config.scope
|
136
141
|
end
|
137
142
|
|
143
|
+
@quota_project_id = @config.quota_project
|
144
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
145
|
+
|
138
146
|
@global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
|
139
147
|
config.credentials = credentials
|
148
|
+
config.quota_project = @quota_project_id
|
140
149
|
config.endpoint = @config.endpoint
|
141
150
|
end
|
142
151
|
|
@@ -164,8 +173,6 @@ module Google
|
|
164
173
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
165
174
|
# @param options [::Gapic::CallOptions, ::Hash]
|
166
175
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
167
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
168
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
169
176
|
#
|
170
177
|
# @overload delete(project: nil, request_id: nil, route: nil)
|
171
178
|
# Pass arguments to `delete` via keyword arguments. Note that at
|
@@ -196,17 +203,21 @@ module Google
|
|
196
203
|
# Customize the options with defaults
|
197
204
|
call_metadata = @config.rpcs.delete.metadata.to_h
|
198
205
|
|
199
|
-
# Set x-goog-api-client
|
206
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
200
207
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
201
208
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
202
209
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
203
210
|
transports_version_send: [:rest]
|
204
211
|
|
212
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
213
|
+
|
205
214
|
options.apply_defaults timeout: @config.rpcs.delete.timeout,
|
206
|
-
metadata: call_metadata
|
215
|
+
metadata: call_metadata,
|
216
|
+
retry_policy: @config.rpcs.delete.retry_policy
|
207
217
|
|
208
218
|
options.apply_defaults timeout: @config.timeout,
|
209
|
-
metadata: @config.metadata
|
219
|
+
metadata: @config.metadata,
|
220
|
+
retry_policy: @config.retry_policy
|
210
221
|
|
211
222
|
@routes_stub.delete request, options do |result, response|
|
212
223
|
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
@@ -220,12 +231,8 @@ module Google
|
|
220
231
|
yield result, response if block_given?
|
221
232
|
return result
|
222
233
|
end
|
223
|
-
rescue ::
|
224
|
-
|
225
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
226
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
227
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
228
|
-
end
|
234
|
+
rescue ::Gapic::Rest::Error => e
|
235
|
+
raise ::Google::Cloud::Error.from_error(e)
|
229
236
|
end
|
230
237
|
|
231
238
|
##
|
@@ -240,8 +247,6 @@ module Google
|
|
240
247
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
241
248
|
# @param options [::Gapic::CallOptions, ::Hash]
|
242
249
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
243
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
244
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
245
250
|
#
|
246
251
|
# @overload get(project: nil, route: nil)
|
247
252
|
# Pass arguments to `get` via keyword arguments. Note that at
|
@@ -270,28 +275,28 @@ module Google
|
|
270
275
|
# Customize the options with defaults
|
271
276
|
call_metadata = @config.rpcs.get.metadata.to_h
|
272
277
|
|
273
|
-
# Set x-goog-api-client
|
278
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
274
279
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
275
280
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
276
281
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
277
282
|
transports_version_send: [:rest]
|
278
283
|
|
284
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
285
|
+
|
279
286
|
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
280
|
-
metadata: call_metadata
|
287
|
+
metadata: call_metadata,
|
288
|
+
retry_policy: @config.rpcs.get.retry_policy
|
281
289
|
|
282
290
|
options.apply_defaults timeout: @config.timeout,
|
283
|
-
metadata: @config.metadata
|
291
|
+
metadata: @config.metadata,
|
292
|
+
retry_policy: @config.retry_policy
|
284
293
|
|
285
294
|
@routes_stub.get request, options do |result, response|
|
286
295
|
yield result, response if block_given?
|
287
296
|
return result
|
288
297
|
end
|
289
|
-
rescue ::
|
290
|
-
|
291
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
292
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
293
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
294
|
-
end
|
298
|
+
rescue ::Gapic::Rest::Error => e
|
299
|
+
raise ::Google::Cloud::Error.from_error(e)
|
295
300
|
end
|
296
301
|
|
297
302
|
##
|
@@ -306,8 +311,6 @@ module Google
|
|
306
311
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
307
312
|
# @param options [::Gapic::CallOptions, ::Hash]
|
308
313
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
309
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
310
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
311
314
|
#
|
312
315
|
# @overload insert(project: nil, request_id: nil, route_resource: nil)
|
313
316
|
# Pass arguments to `insert` via keyword arguments. Note that at
|
@@ -338,17 +341,21 @@ module Google
|
|
338
341
|
# Customize the options with defaults
|
339
342
|
call_metadata = @config.rpcs.insert.metadata.to_h
|
340
343
|
|
341
|
-
# Set x-goog-api-client
|
344
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
342
345
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
343
346
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
344
347
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
345
348
|
transports_version_send: [:rest]
|
346
349
|
|
350
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
351
|
+
|
347
352
|
options.apply_defaults timeout: @config.rpcs.insert.timeout,
|
348
|
-
metadata: call_metadata
|
353
|
+
metadata: call_metadata,
|
354
|
+
retry_policy: @config.rpcs.insert.retry_policy
|
349
355
|
|
350
356
|
options.apply_defaults timeout: @config.timeout,
|
351
|
-
metadata: @config.metadata
|
357
|
+
metadata: @config.metadata,
|
358
|
+
retry_policy: @config.retry_policy
|
352
359
|
|
353
360
|
@routes_stub.insert request, options do |result, response|
|
354
361
|
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
@@ -362,12 +369,8 @@ module Google
|
|
362
369
|
yield result, response if block_given?
|
363
370
|
return result
|
364
371
|
end
|
365
|
-
rescue ::
|
366
|
-
|
367
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
368
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
369
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
370
|
-
end
|
372
|
+
rescue ::Gapic::Rest::Error => e
|
373
|
+
raise ::Google::Cloud::Error.from_error(e)
|
371
374
|
end
|
372
375
|
|
373
376
|
##
|
@@ -382,8 +385,6 @@ module Google
|
|
382
385
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
383
386
|
# @param options [::Gapic::CallOptions, ::Hash]
|
384
387
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
385
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
386
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
387
388
|
#
|
388
389
|
# @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
389
390
|
# Pass arguments to `list` via keyword arguments. Note that at
|
@@ -420,53 +421,59 @@ module Google
|
|
420
421
|
# Customize the options with defaults
|
421
422
|
call_metadata = @config.rpcs.list.metadata.to_h
|
422
423
|
|
423
|
-
# Set x-goog-api-client
|
424
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
424
425
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
425
426
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
426
427
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
427
428
|
transports_version_send: [:rest]
|
428
429
|
|
430
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
431
|
+
|
429
432
|
options.apply_defaults timeout: @config.rpcs.list.timeout,
|
430
|
-
metadata: call_metadata
|
433
|
+
metadata: call_metadata,
|
434
|
+
retry_policy: @config.rpcs.list.retry_policy
|
431
435
|
|
432
436
|
options.apply_defaults timeout: @config.timeout,
|
433
|
-
metadata: @config.metadata
|
437
|
+
metadata: @config.metadata,
|
438
|
+
retry_policy: @config.retry_policy
|
434
439
|
|
435
440
|
@routes_stub.list request, options do |result, response|
|
436
441
|
result = ::Gapic::Rest::PagedEnumerable.new @routes_stub, :list, "items", request, result, options
|
437
442
|
yield result, response if block_given?
|
438
443
|
return result
|
439
444
|
end
|
440
|
-
rescue ::
|
441
|
-
|
442
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
443
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
444
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
445
|
-
end
|
445
|
+
rescue ::Gapic::Rest::Error => e
|
446
|
+
raise ::Google::Cloud::Error.from_error(e)
|
446
447
|
end
|
447
448
|
|
448
449
|
##
|
449
450
|
# Configuration class for the Routes REST API.
|
450
451
|
#
|
451
452
|
# This class represents the configuration for Routes REST,
|
452
|
-
# providing control over
|
453
|
+
# providing control over timeouts, retry behavior, logging, transport
|
454
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
455
|
+
# applied individually to specific RPCs. See
|
456
|
+
# {::Google::Cloud::Compute::V1::Routes::Rest::Client::Configuration::Rpcs}
|
457
|
+
# for a list of RPCs that can be configured independently.
|
453
458
|
#
|
454
459
|
# Configuration can be applied globally to all clients, or to a single client
|
455
460
|
# on construction.
|
456
461
|
#
|
457
|
-
#
|
458
|
-
#
|
459
|
-
# To modify the global config, setting the timeout for all calls to 10 seconds:
|
460
|
-
#
|
461
|
-
# ::Google::Cloud::Compute::V1::Routes::Client.configure do |config|
|
462
|
-
# config.timeout = 10.0
|
463
|
-
# end
|
462
|
+
# @example
|
464
463
|
#
|
465
|
-
#
|
464
|
+
# # Modify the global config, setting the timeout for
|
465
|
+
# # delete to 20 seconds,
|
466
|
+
# # and all remaining timeouts to 10 seconds.
|
467
|
+
# ::Google::Cloud::Compute::V1::Routes::Rest::Client.configure do |config|
|
468
|
+
# config.timeout = 10.0
|
469
|
+
# config.rpcs.delete.timeout = 20.0
|
470
|
+
# end
|
466
471
|
#
|
467
|
-
#
|
468
|
-
#
|
469
|
-
#
|
472
|
+
# # Apply the above configuration only to a new client.
|
473
|
+
# client = ::Google::Cloud::Compute::V1::Routes::Rest::Client.new do |config|
|
474
|
+
# config.timeout = 10.0
|
475
|
+
# config.rpcs.delete.timeout = 20.0
|
476
|
+
# end
|
470
477
|
#
|
471
478
|
# @!attribute [rw] endpoint
|
472
479
|
# The hostname or hostname:port of the service endpoint.
|
@@ -495,8 +502,19 @@ module Google
|
|
495
502
|
# The call timeout in seconds.
|
496
503
|
# @return [::Numeric]
|
497
504
|
# @!attribute [rw] metadata
|
498
|
-
# Additional
|
505
|
+
# Additional headers to be sent with the call.
|
499
506
|
# @return [::Hash{::Symbol=>::String}]
|
507
|
+
# @!attribute [rw] retry_policy
|
508
|
+
# The retry policy. The value is a hash with the following keys:
|
509
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
510
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
511
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
512
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
513
|
+
# trigger a retry.
|
514
|
+
# @return [::Hash]
|
515
|
+
# @!attribute [rw] quota_project
|
516
|
+
# A separate project against which to charge quota.
|
517
|
+
# @return [::String]
|
500
518
|
#
|
501
519
|
class Configuration
|
502
520
|
extend ::Gapic::Config
|
@@ -511,6 +529,8 @@ module Google
|
|
511
529
|
config_attr :lib_version, nil, ::String, nil
|
512
530
|
config_attr :timeout, nil, ::Numeric, nil
|
513
531
|
config_attr :metadata, nil, ::Hash, nil
|
532
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
533
|
+
config_attr :quota_project, nil, ::String, nil
|
514
534
|
|
515
535
|
# @private
|
516
536
|
def initialize parent_config = nil
|
@@ -539,9 +559,14 @@ module Google
|
|
539
559
|
# the following configuration fields:
|
540
560
|
#
|
541
561
|
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
542
|
-
#
|
543
|
-
#
|
544
|
-
#
|
562
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
563
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
564
|
+
# include the following keys:
|
565
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
566
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
567
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
568
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
569
|
+
# trigger a retry.
|
545
570
|
#
|
546
571
|
class Rpcs
|
547
572
|
##
|
@@ -35,7 +35,9 @@ module Google
|
|
35
35
|
# the REST modules only when it's required.
|
36
36
|
require "gapic/rest"
|
37
37
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
|
39
|
+
numeric_enums: false,
|
40
|
+
raise_faraday_errors: false
|
39
41
|
end
|
40
42
|
|
41
43
|
##
|
@@ -55,7 +57,7 @@ module Google
|
|
55
57
|
def delete request_pb, options = nil
|
56
58
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
57
59
|
|
58
|
-
verb, uri, query_string_params, body = transcode_delete_request request_pb
|
60
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_request request_pb
|
59
61
|
query_string_params = if query_string_params.any?
|
60
62
|
query_string_params.to_h { |p| p.split("=", 2) }
|
61
63
|
else
|
@@ -92,7 +94,7 @@ module Google
|
|
92
94
|
def get request_pb, options = nil
|
93
95
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
94
96
|
|
95
|
-
verb, uri, query_string_params, body = transcode_get_request request_pb
|
97
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_request request_pb
|
96
98
|
query_string_params = if query_string_params.any?
|
97
99
|
query_string_params.to_h { |p| p.split("=", 2) }
|
98
100
|
else
|
@@ -129,7 +131,7 @@ module Google
|
|
129
131
|
def insert request_pb, options = nil
|
130
132
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
131
133
|
|
132
|
-
verb, uri, query_string_params, body = transcode_insert_request request_pb
|
134
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_insert_request request_pb
|
133
135
|
query_string_params = if query_string_params.any?
|
134
136
|
query_string_params.to_h { |p| p.split("=", 2) }
|
135
137
|
else
|
@@ -166,7 +168,7 @@ module Google
|
|
166
168
|
def list request_pb, options = nil
|
167
169
|
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
168
170
|
|
169
|
-
verb, uri, query_string_params, body = transcode_list_request request_pb
|
171
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_request request_pb
|
170
172
|
query_string_params = if query_string_params.any?
|
171
173
|
query_string_params.to_h { |p| p.split("=", 2) }
|
172
174
|
else
|
@@ -186,9 +188,6 @@ module Google
|
|
186
188
|
result
|
187
189
|
end
|
188
190
|
|
189
|
-
|
190
|
-
private
|
191
|
-
|
192
191
|
##
|
193
192
|
# @private
|
194
193
|
#
|
@@ -198,7 +197,7 @@ module Google
|
|
198
197
|
# A request object representing the call parameters. Required.
|
199
198
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
200
199
|
# Uri, Body, Query string parameters
|
201
|
-
def transcode_delete_request request_pb
|
200
|
+
def self.transcode_delete_request request_pb
|
202
201
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
203
202
|
.with_bindings(
|
204
203
|
uri_method: :delete,
|
@@ -220,7 +219,7 @@ module Google
|
|
220
219
|
# A request object representing the call parameters. Required.
|
221
220
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
222
221
|
# Uri, Body, Query string parameters
|
223
|
-
def transcode_get_request request_pb
|
222
|
+
def self.transcode_get_request request_pb
|
224
223
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
225
224
|
.with_bindings(
|
226
225
|
uri_method: :get,
|
@@ -242,7 +241,7 @@ module Google
|
|
242
241
|
# A request object representing the call parameters. Required.
|
243
242
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
244
243
|
# Uri, Body, Query string parameters
|
245
|
-
def transcode_insert_request request_pb
|
244
|
+
def self.transcode_insert_request request_pb
|
246
245
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
247
246
|
.with_bindings(
|
248
247
|
uri_method: :post,
|
@@ -264,7 +263,7 @@ module Google
|
|
264
263
|
# A request object representing the call parameters. Required.
|
265
264
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
266
265
|
# Uri, Body, Query string parameters
|
267
|
-
def transcode_list_request request_pb
|
266
|
+
def self.transcode_list_request request_pb
|
268
267
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
269
268
|
.with_bindings(
|
270
269
|
uri_method: :get,
|