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
@@ -141,13 +141,22 @@ module Google
|
|
141
141
|
|
142
142
|
# Create credentials
|
143
143
|
credentials = @config.credentials
|
144
|
-
|
144
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
145
|
+
# but only if the default endpoint does not have a region prefix.
|
146
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
147
|
+
!@config.endpoint.split(".").first.include?("-")
|
148
|
+
credentials ||= Credentials.default scope: @config.scope,
|
149
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
145
150
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
146
151
|
credentials = Credentials.new credentials, scope: @config.scope
|
147
152
|
end
|
148
153
|
|
154
|
+
@quota_project_id = @config.quota_project
|
155
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
156
|
+
|
149
157
|
@region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
|
150
158
|
config.credentials = credentials
|
159
|
+
config.quota_project = @quota_project_id
|
151
160
|
config.endpoint = @config.endpoint
|
152
161
|
end
|
153
162
|
|
@@ -175,8 +184,6 @@ module Google
|
|
175
184
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
176
185
|
# @param options [::Gapic::CallOptions, ::Hash]
|
177
186
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
178
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
179
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
180
187
|
#
|
181
188
|
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
182
189
|
# Pass arguments to `aggregated_list` via keyword arguments. Note that at
|
@@ -215,29 +222,29 @@ module Google
|
|
215
222
|
# Customize the options with defaults
|
216
223
|
call_metadata = @config.rpcs.aggregated_list.metadata.to_h
|
217
224
|
|
218
|
-
# Set x-goog-api-client
|
225
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
219
226
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
220
227
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
221
228
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
222
229
|
transports_version_send: [:rest]
|
223
230
|
|
231
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
232
|
+
|
224
233
|
options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
|
225
|
-
metadata: call_metadata
|
234
|
+
metadata: call_metadata,
|
235
|
+
retry_policy: @config.rpcs.aggregated_list.retry_policy
|
226
236
|
|
227
237
|
options.apply_defaults timeout: @config.timeout,
|
228
|
-
metadata: @config.metadata
|
238
|
+
metadata: @config.metadata,
|
239
|
+
retry_policy: @config.retry_policy
|
229
240
|
|
230
241
|
@forwarding_rules_stub.aggregated_list request, options do |result, response|
|
231
242
|
result = ::Gapic::Rest::PagedEnumerable.new @forwarding_rules_stub, :aggregated_list, "items", request, result, options
|
232
243
|
yield result, response if block_given?
|
233
244
|
return result
|
234
245
|
end
|
235
|
-
rescue ::
|
236
|
-
|
237
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
238
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
239
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
240
|
-
end
|
246
|
+
rescue ::Gapic::Rest::Error => e
|
247
|
+
raise ::Google::Cloud::Error.from_error(e)
|
241
248
|
end
|
242
249
|
|
243
250
|
##
|
@@ -252,8 +259,6 @@ module Google
|
|
252
259
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
253
260
|
# @param options [::Gapic::CallOptions, ::Hash]
|
254
261
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
255
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
256
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
257
262
|
#
|
258
263
|
# @overload delete(forwarding_rule: nil, project: nil, region: nil, request_id: nil)
|
259
264
|
# 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
|
@forwarding_rules_stub.delete request, options do |result, response|
|
302
311
|
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
@@ -311,12 +320,8 @@ module Google
|
|
311
320
|
yield result, response if block_given?
|
312
321
|
return result
|
313
322
|
end
|
314
|
-
rescue ::
|
315
|
-
|
316
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
317
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
318
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
319
|
-
end
|
323
|
+
rescue ::Gapic::Rest::Error => e
|
324
|
+
raise ::Google::Cloud::Error.from_error(e)
|
320
325
|
end
|
321
326
|
|
322
327
|
##
|
@@ -331,8 +336,6 @@ module Google
|
|
331
336
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
332
337
|
# @param options [::Gapic::CallOptions, ::Hash]
|
333
338
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
334
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
335
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
336
339
|
#
|
337
340
|
# @overload get(forwarding_rule: nil, project: nil, region: nil)
|
338
341
|
# Pass arguments to `get` via keyword arguments. Note that at
|
@@ -363,28 +366,28 @@ module Google
|
|
363
366
|
# Customize the options with defaults
|
364
367
|
call_metadata = @config.rpcs.get.metadata.to_h
|
365
368
|
|
366
|
-
# Set x-goog-api-client
|
369
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
367
370
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
368
371
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
369
372
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
370
373
|
transports_version_send: [:rest]
|
371
374
|
|
375
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
376
|
+
|
372
377
|
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
373
|
-
metadata: call_metadata
|
378
|
+
metadata: call_metadata,
|
379
|
+
retry_policy: @config.rpcs.get.retry_policy
|
374
380
|
|
375
381
|
options.apply_defaults timeout: @config.timeout,
|
376
|
-
metadata: @config.metadata
|
382
|
+
metadata: @config.metadata,
|
383
|
+
retry_policy: @config.retry_policy
|
377
384
|
|
378
385
|
@forwarding_rules_stub.get request, options do |result, response|
|
379
386
|
yield result, response if block_given?
|
380
387
|
return result
|
381
388
|
end
|
382
|
-
rescue ::
|
383
|
-
|
384
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
385
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
386
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
387
|
-
end
|
389
|
+
rescue ::Gapic::Rest::Error => e
|
390
|
+
raise ::Google::Cloud::Error.from_error(e)
|
388
391
|
end
|
389
392
|
|
390
393
|
##
|
@@ -399,8 +402,6 @@ module Google
|
|
399
402
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
400
403
|
# @param options [::Gapic::CallOptions, ::Hash]
|
401
404
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
402
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
403
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
404
405
|
#
|
405
406
|
# @overload insert(forwarding_rule_resource: nil, project: nil, region: nil, request_id: nil)
|
406
407
|
# Pass arguments to `insert` via keyword arguments. Note that at
|
@@ -433,17 +434,21 @@ module Google
|
|
433
434
|
# Customize the options with defaults
|
434
435
|
call_metadata = @config.rpcs.insert.metadata.to_h
|
435
436
|
|
436
|
-
# Set x-goog-api-client
|
437
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
437
438
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
438
439
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
439
440
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
440
441
|
transports_version_send: [:rest]
|
441
442
|
|
443
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
444
|
+
|
442
445
|
options.apply_defaults timeout: @config.rpcs.insert.timeout,
|
443
|
-
metadata: call_metadata
|
446
|
+
metadata: call_metadata,
|
447
|
+
retry_policy: @config.rpcs.insert.retry_policy
|
444
448
|
|
445
449
|
options.apply_defaults timeout: @config.timeout,
|
446
|
-
metadata: @config.metadata
|
450
|
+
metadata: @config.metadata,
|
451
|
+
retry_policy: @config.retry_policy
|
447
452
|
|
448
453
|
@forwarding_rules_stub.insert request, options do |result, response|
|
449
454
|
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
@@ -458,12 +463,8 @@ module Google
|
|
458
463
|
yield result, response if block_given?
|
459
464
|
return result
|
460
465
|
end
|
461
|
-
rescue ::
|
462
|
-
|
463
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
464
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
465
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
466
|
-
end
|
466
|
+
rescue ::Gapic::Rest::Error => e
|
467
|
+
raise ::Google::Cloud::Error.from_error(e)
|
467
468
|
end
|
468
469
|
|
469
470
|
##
|
@@ -478,8 +479,6 @@ module Google
|
|
478
479
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
479
480
|
# @param options [::Gapic::CallOptions, ::Hash]
|
480
481
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
481
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
482
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
483
482
|
#
|
484
483
|
# @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil)
|
485
484
|
# Pass arguments to `list` via keyword arguments. Note that at
|
@@ -518,29 +517,29 @@ module Google
|
|
518
517
|
# Customize the options with defaults
|
519
518
|
call_metadata = @config.rpcs.list.metadata.to_h
|
520
519
|
|
521
|
-
# Set x-goog-api-client
|
520
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
522
521
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
523
522
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
524
523
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
525
524
|
transports_version_send: [:rest]
|
526
525
|
|
526
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
527
|
+
|
527
528
|
options.apply_defaults timeout: @config.rpcs.list.timeout,
|
528
|
-
metadata: call_metadata
|
529
|
+
metadata: call_metadata,
|
530
|
+
retry_policy: @config.rpcs.list.retry_policy
|
529
531
|
|
530
532
|
options.apply_defaults timeout: @config.timeout,
|
531
|
-
metadata: @config.metadata
|
533
|
+
metadata: @config.metadata,
|
534
|
+
retry_policy: @config.retry_policy
|
532
535
|
|
533
536
|
@forwarding_rules_stub.list request, options do |result, response|
|
534
537
|
result = ::Gapic::Rest::PagedEnumerable.new @forwarding_rules_stub, :list, "items", request, result, options
|
535
538
|
yield result, response if block_given?
|
536
539
|
return result
|
537
540
|
end
|
538
|
-
rescue ::
|
539
|
-
|
540
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
541
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
542
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
543
|
-
end
|
541
|
+
rescue ::Gapic::Rest::Error => e
|
542
|
+
raise ::Google::Cloud::Error.from_error(e)
|
544
543
|
end
|
545
544
|
|
546
545
|
##
|
@@ -555,8 +554,6 @@ module Google
|
|
555
554
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
556
555
|
# @param options [::Gapic::CallOptions, ::Hash]
|
557
556
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
558
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
559
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
560
557
|
#
|
561
558
|
# @overload patch(forwarding_rule: nil, forwarding_rule_resource: nil, project: nil, region: nil, request_id: nil)
|
562
559
|
# Pass arguments to `patch` via keyword arguments. Note that at
|
@@ -591,17 +588,21 @@ module Google
|
|
591
588
|
# Customize the options with defaults
|
592
589
|
call_metadata = @config.rpcs.patch.metadata.to_h
|
593
590
|
|
594
|
-
# Set x-goog-api-client
|
591
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
595
592
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
596
593
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
597
594
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
598
595
|
transports_version_send: [:rest]
|
599
596
|
|
597
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
598
|
+
|
600
599
|
options.apply_defaults timeout: @config.rpcs.patch.timeout,
|
601
|
-
metadata: call_metadata
|
600
|
+
metadata: call_metadata,
|
601
|
+
retry_policy: @config.rpcs.patch.retry_policy
|
602
602
|
|
603
603
|
options.apply_defaults timeout: @config.timeout,
|
604
|
-
metadata: @config.metadata
|
604
|
+
metadata: @config.metadata,
|
605
|
+
retry_policy: @config.retry_policy
|
605
606
|
|
606
607
|
@forwarding_rules_stub.patch request, options do |result, response|
|
607
608
|
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
@@ -616,12 +617,8 @@ module Google
|
|
616
617
|
yield result, response if block_given?
|
617
618
|
return result
|
618
619
|
end
|
619
|
-
rescue ::
|
620
|
-
|
621
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
622
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
623
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
624
|
-
end
|
620
|
+
rescue ::Gapic::Rest::Error => e
|
621
|
+
raise ::Google::Cloud::Error.from_error(e)
|
625
622
|
end
|
626
623
|
|
627
624
|
##
|
@@ -636,8 +633,6 @@ module Google
|
|
636
633
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
637
634
|
# @param options [::Gapic::CallOptions, ::Hash]
|
638
635
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
639
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
640
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
641
636
|
#
|
642
637
|
# @overload set_labels(project: nil, region: nil, region_set_labels_request_resource: nil, request_id: nil, resource: nil)
|
643
638
|
# Pass arguments to `set_labels` via keyword arguments. Note that at
|
@@ -672,17 +667,21 @@ module Google
|
|
672
667
|
# Customize the options with defaults
|
673
668
|
call_metadata = @config.rpcs.set_labels.metadata.to_h
|
674
669
|
|
675
|
-
# Set x-goog-api-client
|
670
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
676
671
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
677
672
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
678
673
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
679
674
|
transports_version_send: [:rest]
|
680
675
|
|
676
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
677
|
+
|
681
678
|
options.apply_defaults timeout: @config.rpcs.set_labels.timeout,
|
682
|
-
metadata: call_metadata
|
679
|
+
metadata: call_metadata,
|
680
|
+
retry_policy: @config.rpcs.set_labels.retry_policy
|
683
681
|
|
684
682
|
options.apply_defaults timeout: @config.timeout,
|
685
|
-
metadata: @config.metadata
|
683
|
+
metadata: @config.metadata,
|
684
|
+
retry_policy: @config.retry_policy
|
686
685
|
|
687
686
|
@forwarding_rules_stub.set_labels request, options do |result, response|
|
688
687
|
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
@@ -697,12 +696,8 @@ module Google
|
|
697
696
|
yield result, response if block_given?
|
698
697
|
return result
|
699
698
|
end
|
700
|
-
rescue ::
|
701
|
-
|
702
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
703
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
704
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
705
|
-
end
|
699
|
+
rescue ::Gapic::Rest::Error => e
|
700
|
+
raise ::Google::Cloud::Error.from_error(e)
|
706
701
|
end
|
707
702
|
|
708
703
|
##
|
@@ -717,8 +712,6 @@ module Google
|
|
717
712
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
718
713
|
# @param options [::Gapic::CallOptions, ::Hash]
|
719
714
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
720
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
721
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
722
715
|
#
|
723
716
|
# @overload set_target(forwarding_rule: nil, project: nil, region: nil, request_id: nil, target_reference_resource: nil)
|
724
717
|
# Pass arguments to `set_target` via keyword arguments. Note that at
|
@@ -753,17 +746,21 @@ module Google
|
|
753
746
|
# Customize the options with defaults
|
754
747
|
call_metadata = @config.rpcs.set_target.metadata.to_h
|
755
748
|
|
756
|
-
# Set x-goog-api-client
|
749
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
757
750
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
758
751
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
759
752
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
760
753
|
transports_version_send: [:rest]
|
761
754
|
|
755
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
756
|
+
|
762
757
|
options.apply_defaults timeout: @config.rpcs.set_target.timeout,
|
763
|
-
metadata: call_metadata
|
758
|
+
metadata: call_metadata,
|
759
|
+
retry_policy: @config.rpcs.set_target.retry_policy
|
764
760
|
|
765
761
|
options.apply_defaults timeout: @config.timeout,
|
766
|
-
metadata: @config.metadata
|
762
|
+
metadata: @config.metadata,
|
763
|
+
retry_policy: @config.retry_policy
|
767
764
|
|
768
765
|
@forwarding_rules_stub.set_target request, options do |result, response|
|
769
766
|
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
@@ -778,36 +775,38 @@ module Google
|
|
778
775
|
yield result, response if block_given?
|
779
776
|
return result
|
780
777
|
end
|
781
|
-
rescue ::
|
782
|
-
|
783
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
784
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
785
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
786
|
-
end
|
778
|
+
rescue ::Gapic::Rest::Error => e
|
779
|
+
raise ::Google::Cloud::Error.from_error(e)
|
787
780
|
end
|
788
781
|
|
789
782
|
##
|
790
783
|
# Configuration class for the ForwardingRules REST API.
|
791
784
|
#
|
792
785
|
# This class represents the configuration for ForwardingRules REST,
|
793
|
-
# providing control over
|
786
|
+
# providing control over timeouts, retry behavior, logging, transport
|
787
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
788
|
+
# applied individually to specific RPCs. See
|
789
|
+
# {::Google::Cloud::Compute::V1::ForwardingRules::Rest::Client::Configuration::Rpcs}
|
790
|
+
# for a list of RPCs that can be configured independently.
|
794
791
|
#
|
795
792
|
# Configuration can be applied globally to all clients, or to a single client
|
796
793
|
# on construction.
|
797
794
|
#
|
798
|
-
#
|
799
|
-
#
|
800
|
-
# To modify the global config, setting the timeout for all calls to 10 seconds:
|
801
|
-
#
|
802
|
-
# ::Google::Cloud::Compute::V1::ForwardingRules::Client.configure do |config|
|
803
|
-
# config.timeout = 10.0
|
804
|
-
# end
|
795
|
+
# @example
|
805
796
|
#
|
806
|
-
#
|
797
|
+
# # Modify the global config, setting the timeout for
|
798
|
+
# # aggregated_list to 20 seconds,
|
799
|
+
# # and all remaining timeouts to 10 seconds.
|
800
|
+
# ::Google::Cloud::Compute::V1::ForwardingRules::Rest::Client.configure do |config|
|
801
|
+
# config.timeout = 10.0
|
802
|
+
# config.rpcs.aggregated_list.timeout = 20.0
|
803
|
+
# end
|
807
804
|
#
|
808
|
-
#
|
809
|
-
#
|
810
|
-
#
|
805
|
+
# # Apply the above configuration only to a new client.
|
806
|
+
# client = ::Google::Cloud::Compute::V1::ForwardingRules::Rest::Client.new do |config|
|
807
|
+
# config.timeout = 10.0
|
808
|
+
# config.rpcs.aggregated_list.timeout = 20.0
|
809
|
+
# end
|
811
810
|
#
|
812
811
|
# @!attribute [rw] endpoint
|
813
812
|
# The hostname or hostname:port of the service endpoint.
|
@@ -836,8 +835,19 @@ module Google
|
|
836
835
|
# The call timeout in seconds.
|
837
836
|
# @return [::Numeric]
|
838
837
|
# @!attribute [rw] metadata
|
839
|
-
# Additional
|
838
|
+
# Additional headers to be sent with the call.
|
840
839
|
# @return [::Hash{::Symbol=>::String}]
|
840
|
+
# @!attribute [rw] retry_policy
|
841
|
+
# The retry policy. The value is a hash with the following keys:
|
842
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
843
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
844
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
845
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
846
|
+
# trigger a retry.
|
847
|
+
# @return [::Hash]
|
848
|
+
# @!attribute [rw] quota_project
|
849
|
+
# A separate project against which to charge quota.
|
850
|
+
# @return [::String]
|
841
851
|
#
|
842
852
|
class Configuration
|
843
853
|
extend ::Gapic::Config
|
@@ -852,6 +862,8 @@ module Google
|
|
852
862
|
config_attr :lib_version, nil, ::String, nil
|
853
863
|
config_attr :timeout, nil, ::Numeric, nil
|
854
864
|
config_attr :metadata, nil, ::Hash, nil
|
865
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
866
|
+
config_attr :quota_project, nil, ::String, nil
|
855
867
|
|
856
868
|
# @private
|
857
869
|
def initialize parent_config = nil
|
@@ -880,9 +892,14 @@ module Google
|
|
880
892
|
# the following configuration fields:
|
881
893
|
#
|
882
894
|
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
883
|
-
#
|
884
|
-
#
|
885
|
-
#
|
895
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
896
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
897
|
+
# include the following keys:
|
898
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
899
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
900
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
901
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
902
|
+
# trigger a retry.
|
886
903
|
#
|
887
904
|
class Rpcs
|
888
905
|
##
|
@@ -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 insert 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_insert_request request_pb
|
171
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_insert_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 list 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_list_request request_pb
|
208
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_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 patch 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_patch_request request_pb
|
245
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_patch_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 set_labels 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_set_labels_request request_pb
|
282
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_set_labels_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 set_target 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_set_target_request request_pb
|
319
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_set_target_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
|
@@ -334,9 +336,6 @@ module Google
|
|
334
336
|
result
|
335
337
|
end
|
336
338
|
|
337
|
-
|
338
|
-
private
|
339
|
-
|
340
339
|
##
|
341
340
|
# @private
|
342
341
|
#
|
@@ -346,7 +345,7 @@ module Google
|
|
346
345
|
# A request object representing the call parameters. Required.
|
347
346
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
348
347
|
# Uri, Body, Query string parameters
|
349
|
-
def transcode_aggregated_list_request request_pb
|
348
|
+
def self.transcode_aggregated_list_request request_pb
|
350
349
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
351
350
|
.with_bindings(
|
352
351
|
uri_method: :get,
|
@@ -367,7 +366,7 @@ module Google
|
|
367
366
|
# A request object representing the call parameters. Required.
|
368
367
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
369
368
|
# Uri, Body, Query string parameters
|
370
|
-
def transcode_delete_request request_pb
|
369
|
+
def self.transcode_delete_request request_pb
|
371
370
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
372
371
|
.with_bindings(
|
373
372
|
uri_method: :delete,
|
@@ -390,7 +389,7 @@ module Google
|
|
390
389
|
# A request object representing the call parameters. Required.
|
391
390
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
392
391
|
# Uri, Body, Query string parameters
|
393
|
-
def transcode_get_request request_pb
|
392
|
+
def self.transcode_get_request request_pb
|
394
393
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
395
394
|
.with_bindings(
|
396
395
|
uri_method: :get,
|
@@ -413,7 +412,7 @@ module Google
|
|
413
412
|
# A request object representing the call parameters. Required.
|
414
413
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
415
414
|
# Uri, Body, Query string parameters
|
416
|
-
def transcode_insert_request request_pb
|
415
|
+
def self.transcode_insert_request request_pb
|
417
416
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
418
417
|
.with_bindings(
|
419
418
|
uri_method: :post,
|
@@ -436,7 +435,7 @@ module Google
|
|
436
435
|
# A request object representing the call parameters. Required.
|
437
436
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
438
437
|
# Uri, Body, Query string parameters
|
439
|
-
def transcode_list_request request_pb
|
438
|
+
def self.transcode_list_request request_pb
|
440
439
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
441
440
|
.with_bindings(
|
442
441
|
uri_method: :get,
|
@@ -458,7 +457,7 @@ module Google
|
|
458
457
|
# A request object representing the call parameters. Required.
|
459
458
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
460
459
|
# Uri, Body, Query string parameters
|
461
|
-
def transcode_patch_request request_pb
|
460
|
+
def self.transcode_patch_request request_pb
|
462
461
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
463
462
|
.with_bindings(
|
464
463
|
uri_method: :patch,
|
@@ -482,7 +481,7 @@ module Google
|
|
482
481
|
# A request object representing the call parameters. Required.
|
483
482
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
484
483
|
# Uri, Body, Query string parameters
|
485
|
-
def transcode_set_labels_request request_pb
|
484
|
+
def self.transcode_set_labels_request request_pb
|
486
485
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
487
486
|
.with_bindings(
|
488
487
|
uri_method: :post,
|
@@ -506,7 +505,7 @@ module Google
|
|
506
505
|
# A request object representing the call parameters. Required.
|
507
506
|
# @return [Array(String, [String, nil], Hash{String => String})]
|
508
507
|
# Uri, Body, Query string parameters
|
509
|
-
def transcode_set_target_request request_pb
|
508
|
+
def self.transcode_set_target_request request_pb
|
510
509
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
511
510
|
.with_bindings(
|
512
511
|
uri_method: :post,
|