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
@@ -146,13 +146,22 @@ module Google
|
|
146
146
|
|
147
147
|
# Create credentials
|
148
148
|
credentials = @config.credentials
|
149
|
-
|
149
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
150
|
+
# but only if the default endpoint does not have a region prefix.
|
151
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
152
|
+
!@config.endpoint.split(".").first.include?("-")
|
153
|
+
credentials ||= Credentials.default scope: @config.scope,
|
154
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
150
155
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
151
156
|
credentials = Credentials.new credentials, scope: @config.scope
|
152
157
|
end
|
153
158
|
|
159
|
+
@quota_project_id = @config.quota_project
|
160
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
161
|
+
|
154
162
|
@region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
|
155
163
|
config.credentials = credentials
|
164
|
+
config.quota_project = @quota_project_id
|
156
165
|
config.endpoint = @config.endpoint
|
157
166
|
end
|
158
167
|
|
@@ -180,8 +189,6 @@ module Google
|
|
180
189
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
181
190
|
# @param options [::Gapic::CallOptions, ::Hash]
|
182
191
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
183
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
184
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
185
192
|
#
|
186
193
|
# @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
|
187
194
|
# Pass arguments to `aggregated_list` via keyword arguments. Note that at
|
@@ -220,29 +227,29 @@ module Google
|
|
220
227
|
# Customize the options with defaults
|
221
228
|
call_metadata = @config.rpcs.aggregated_list.metadata.to_h
|
222
229
|
|
223
|
-
# Set x-goog-api-client
|
230
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
224
231
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
225
232
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
226
233
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
227
234
|
transports_version_send: [:rest]
|
228
235
|
|
236
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
237
|
+
|
229
238
|
options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
|
230
|
-
metadata: call_metadata
|
239
|
+
metadata: call_metadata,
|
240
|
+
retry_policy: @config.rpcs.aggregated_list.retry_policy
|
231
241
|
|
232
242
|
options.apply_defaults timeout: @config.timeout,
|
233
|
-
metadata: @config.metadata
|
243
|
+
metadata: @config.metadata,
|
244
|
+
retry_policy: @config.retry_policy
|
234
245
|
|
235
246
|
@service_attachments_stub.aggregated_list request, options do |result, response|
|
236
247
|
result = ::Gapic::Rest::PagedEnumerable.new @service_attachments_stub, :aggregated_list, "items", request, result, options
|
237
248
|
yield result, response if block_given?
|
238
249
|
return result
|
239
250
|
end
|
240
|
-
rescue ::
|
241
|
-
|
242
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
243
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
244
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
245
|
-
end
|
251
|
+
rescue ::Gapic::Rest::Error => e
|
252
|
+
raise ::Google::Cloud::Error.from_error(e)
|
246
253
|
end
|
247
254
|
|
248
255
|
##
|
@@ -257,8 +264,6 @@ module Google
|
|
257
264
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
258
265
|
# @param options [::Gapic::CallOptions, ::Hash]
|
259
266
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
260
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
261
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
262
267
|
#
|
263
268
|
# @overload delete(project: nil, region: nil, request_id: nil, service_attachment: nil)
|
264
269
|
# Pass arguments to `delete` via keyword arguments. Note that at
|
@@ -291,17 +296,21 @@ module Google
|
|
291
296
|
# Customize the options with defaults
|
292
297
|
call_metadata = @config.rpcs.delete.metadata.to_h
|
293
298
|
|
294
|
-
# Set x-goog-api-client
|
299
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
295
300
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
296
301
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
297
302
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
298
303
|
transports_version_send: [:rest]
|
299
304
|
|
305
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
306
|
+
|
300
307
|
options.apply_defaults timeout: @config.rpcs.delete.timeout,
|
301
|
-
metadata: call_metadata
|
308
|
+
metadata: call_metadata,
|
309
|
+
retry_policy: @config.rpcs.delete.retry_policy
|
302
310
|
|
303
311
|
options.apply_defaults timeout: @config.timeout,
|
304
|
-
metadata: @config.metadata
|
312
|
+
metadata: @config.metadata,
|
313
|
+
retry_policy: @config.retry_policy
|
305
314
|
|
306
315
|
@service_attachments_stub.delete request, options do |result, response|
|
307
316
|
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
@@ -316,12 +325,8 @@ module Google
|
|
316
325
|
yield result, response if block_given?
|
317
326
|
return result
|
318
327
|
end
|
319
|
-
rescue ::
|
320
|
-
|
321
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
322
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
323
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
324
|
-
end
|
328
|
+
rescue ::Gapic::Rest::Error => e
|
329
|
+
raise ::Google::Cloud::Error.from_error(e)
|
325
330
|
end
|
326
331
|
|
327
332
|
##
|
@@ -336,8 +341,6 @@ module Google
|
|
336
341
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
337
342
|
# @param options [::Gapic::CallOptions, ::Hash]
|
338
343
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
339
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
340
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
341
344
|
#
|
342
345
|
# @overload get(project: nil, region: nil, service_attachment: nil)
|
343
346
|
# Pass arguments to `get` via keyword arguments. Note that at
|
@@ -368,28 +371,28 @@ module Google
|
|
368
371
|
# Customize the options with defaults
|
369
372
|
call_metadata = @config.rpcs.get.metadata.to_h
|
370
373
|
|
371
|
-
# Set x-goog-api-client
|
374
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
372
375
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
373
376
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
374
377
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
375
378
|
transports_version_send: [:rest]
|
376
379
|
|
380
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
381
|
+
|
377
382
|
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
378
|
-
metadata: call_metadata
|
383
|
+
metadata: call_metadata,
|
384
|
+
retry_policy: @config.rpcs.get.retry_policy
|
379
385
|
|
380
386
|
options.apply_defaults timeout: @config.timeout,
|
381
|
-
metadata: @config.metadata
|
387
|
+
metadata: @config.metadata,
|
388
|
+
retry_policy: @config.retry_policy
|
382
389
|
|
383
390
|
@service_attachments_stub.get request, options do |result, response|
|
384
391
|
yield result, response if block_given?
|
385
392
|
return result
|
386
393
|
end
|
387
|
-
rescue ::
|
388
|
-
|
389
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
390
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
391
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
392
|
-
end
|
394
|
+
rescue ::Gapic::Rest::Error => e
|
395
|
+
raise ::Google::Cloud::Error.from_error(e)
|
393
396
|
end
|
394
397
|
|
395
398
|
##
|
@@ -404,8 +407,6 @@ module Google
|
|
404
407
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
405
408
|
# @param options [::Gapic::CallOptions, ::Hash]
|
406
409
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
407
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
408
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
409
410
|
#
|
410
411
|
# @overload get_iam_policy(options_requested_policy_version: nil, project: nil, region: nil, resource: nil)
|
411
412
|
# Pass arguments to `get_iam_policy` via keyword arguments. Note that at
|
@@ -438,28 +439,28 @@ module Google
|
|
438
439
|
# Customize the options with defaults
|
439
440
|
call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
440
441
|
|
441
|
-
# Set x-goog-api-client
|
442
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
442
443
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
443
444
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
444
445
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
445
446
|
transports_version_send: [:rest]
|
446
447
|
|
448
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
449
|
+
|
447
450
|
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
448
|
-
metadata: call_metadata
|
451
|
+
metadata: call_metadata,
|
452
|
+
retry_policy: @config.rpcs.get_iam_policy.retry_policy
|
449
453
|
|
450
454
|
options.apply_defaults timeout: @config.timeout,
|
451
|
-
metadata: @config.metadata
|
455
|
+
metadata: @config.metadata,
|
456
|
+
retry_policy: @config.retry_policy
|
452
457
|
|
453
458
|
@service_attachments_stub.get_iam_policy request, options do |result, response|
|
454
459
|
yield result, response if block_given?
|
455
460
|
return result
|
456
461
|
end
|
457
|
-
rescue ::
|
458
|
-
|
459
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
460
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
461
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
462
|
-
end
|
462
|
+
rescue ::Gapic::Rest::Error => e
|
463
|
+
raise ::Google::Cloud::Error.from_error(e)
|
463
464
|
end
|
464
465
|
|
465
466
|
##
|
@@ -474,8 +475,6 @@ module Google
|
|
474
475
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
475
476
|
# @param options [::Gapic::CallOptions, ::Hash]
|
476
477
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
477
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
478
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
479
478
|
#
|
480
479
|
# @overload insert(project: nil, region: nil, request_id: nil, service_attachment_resource: nil)
|
481
480
|
# Pass arguments to `insert` via keyword arguments. Note that at
|
@@ -508,17 +507,21 @@ module Google
|
|
508
507
|
# Customize the options with defaults
|
509
508
|
call_metadata = @config.rpcs.insert.metadata.to_h
|
510
509
|
|
511
|
-
# Set x-goog-api-client
|
510
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
512
511
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
513
512
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
514
513
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
515
514
|
transports_version_send: [:rest]
|
516
515
|
|
516
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
517
|
+
|
517
518
|
options.apply_defaults timeout: @config.rpcs.insert.timeout,
|
518
|
-
metadata: call_metadata
|
519
|
+
metadata: call_metadata,
|
520
|
+
retry_policy: @config.rpcs.insert.retry_policy
|
519
521
|
|
520
522
|
options.apply_defaults timeout: @config.timeout,
|
521
|
-
metadata: @config.metadata
|
523
|
+
metadata: @config.metadata,
|
524
|
+
retry_policy: @config.retry_policy
|
522
525
|
|
523
526
|
@service_attachments_stub.insert request, options do |result, response|
|
524
527
|
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
@@ -533,12 +536,8 @@ module Google
|
|
533
536
|
yield result, response if block_given?
|
534
537
|
return result
|
535
538
|
end
|
536
|
-
rescue ::
|
537
|
-
|
538
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
539
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
540
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
541
|
-
end
|
539
|
+
rescue ::Gapic::Rest::Error => e
|
540
|
+
raise ::Google::Cloud::Error.from_error(e)
|
542
541
|
end
|
543
542
|
|
544
543
|
##
|
@@ -553,8 +552,6 @@ module Google
|
|
553
552
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
554
553
|
# @param options [::Gapic::CallOptions, ::Hash]
|
555
554
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
556
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
557
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
558
555
|
#
|
559
556
|
# @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil)
|
560
557
|
# Pass arguments to `list` via keyword arguments. Note that at
|
@@ -593,29 +590,29 @@ module Google
|
|
593
590
|
# Customize the options with defaults
|
594
591
|
call_metadata = @config.rpcs.list.metadata.to_h
|
595
592
|
|
596
|
-
# Set x-goog-api-client
|
593
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
597
594
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
598
595
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
599
596
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
600
597
|
transports_version_send: [:rest]
|
601
598
|
|
599
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
600
|
+
|
602
601
|
options.apply_defaults timeout: @config.rpcs.list.timeout,
|
603
|
-
metadata: call_metadata
|
602
|
+
metadata: call_metadata,
|
603
|
+
retry_policy: @config.rpcs.list.retry_policy
|
604
604
|
|
605
605
|
options.apply_defaults timeout: @config.timeout,
|
606
|
-
metadata: @config.metadata
|
606
|
+
metadata: @config.metadata,
|
607
|
+
retry_policy: @config.retry_policy
|
607
608
|
|
608
609
|
@service_attachments_stub.list request, options do |result, response|
|
609
610
|
result = ::Gapic::Rest::PagedEnumerable.new @service_attachments_stub, :list, "items", request, result, options
|
610
611
|
yield result, response if block_given?
|
611
612
|
return result
|
612
613
|
end
|
613
|
-
rescue ::
|
614
|
-
|
615
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
616
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
617
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
618
|
-
end
|
614
|
+
rescue ::Gapic::Rest::Error => e
|
615
|
+
raise ::Google::Cloud::Error.from_error(e)
|
619
616
|
end
|
620
617
|
|
621
618
|
##
|
@@ -630,8 +627,6 @@ module Google
|
|
630
627
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
631
628
|
# @param options [::Gapic::CallOptions, ::Hash]
|
632
629
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
633
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
634
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
635
630
|
#
|
636
631
|
# @overload patch(project: nil, region: nil, request_id: nil, service_attachment: nil, service_attachment_resource: nil)
|
637
632
|
# Pass arguments to `patch` via keyword arguments. Note that at
|
@@ -666,17 +661,21 @@ module Google
|
|
666
661
|
# Customize the options with defaults
|
667
662
|
call_metadata = @config.rpcs.patch.metadata.to_h
|
668
663
|
|
669
|
-
# Set x-goog-api-client
|
664
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
670
665
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
671
666
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
672
667
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
673
668
|
transports_version_send: [:rest]
|
674
669
|
|
670
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
671
|
+
|
675
672
|
options.apply_defaults timeout: @config.rpcs.patch.timeout,
|
676
|
-
metadata: call_metadata
|
673
|
+
metadata: call_metadata,
|
674
|
+
retry_policy: @config.rpcs.patch.retry_policy
|
677
675
|
|
678
676
|
options.apply_defaults timeout: @config.timeout,
|
679
|
-
metadata: @config.metadata
|
677
|
+
metadata: @config.metadata,
|
678
|
+
retry_policy: @config.retry_policy
|
680
679
|
|
681
680
|
@service_attachments_stub.patch request, options do |result, response|
|
682
681
|
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
@@ -691,12 +690,8 @@ module Google
|
|
691
690
|
yield result, response if block_given?
|
692
691
|
return result
|
693
692
|
end
|
694
|
-
rescue ::
|
695
|
-
|
696
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
697
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
698
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
699
|
-
end
|
693
|
+
rescue ::Gapic::Rest::Error => e
|
694
|
+
raise ::Google::Cloud::Error.from_error(e)
|
700
695
|
end
|
701
696
|
|
702
697
|
##
|
@@ -711,8 +706,6 @@ module Google
|
|
711
706
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
712
707
|
# @param options [::Gapic::CallOptions, ::Hash]
|
713
708
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
714
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
715
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
716
709
|
#
|
717
710
|
# @overload set_iam_policy(project: nil, region: nil, region_set_policy_request_resource: nil, resource: nil)
|
718
711
|
# Pass arguments to `set_iam_policy` via keyword arguments. Note that at
|
@@ -745,28 +738,28 @@ module Google
|
|
745
738
|
# Customize the options with defaults
|
746
739
|
call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
747
740
|
|
748
|
-
# Set x-goog-api-client
|
741
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
749
742
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
750
743
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
751
744
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
752
745
|
transports_version_send: [:rest]
|
753
746
|
|
747
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
748
|
+
|
754
749
|
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
755
|
-
metadata: call_metadata
|
750
|
+
metadata: call_metadata,
|
751
|
+
retry_policy: @config.rpcs.set_iam_policy.retry_policy
|
756
752
|
|
757
753
|
options.apply_defaults timeout: @config.timeout,
|
758
|
-
metadata: @config.metadata
|
754
|
+
metadata: @config.metadata,
|
755
|
+
retry_policy: @config.retry_policy
|
759
756
|
|
760
757
|
@service_attachments_stub.set_iam_policy request, options do |result, response|
|
761
758
|
yield result, response if block_given?
|
762
759
|
return result
|
763
760
|
end
|
764
|
-
rescue ::
|
765
|
-
|
766
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
767
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
768
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
769
|
-
end
|
761
|
+
rescue ::Gapic::Rest::Error => e
|
762
|
+
raise ::Google::Cloud::Error.from_error(e)
|
770
763
|
end
|
771
764
|
|
772
765
|
##
|
@@ -781,8 +774,6 @@ module Google
|
|
781
774
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
782
775
|
# @param options [::Gapic::CallOptions, ::Hash]
|
783
776
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
784
|
-
# Note: currently retry functionality is not implemented. While it is possible
|
785
|
-
# to set it using ::Gapic::CallOptions, it will not be applied
|
786
777
|
#
|
787
778
|
# @overload test_iam_permissions(project: nil, region: nil, resource: nil, test_permissions_request_resource: nil)
|
788
779
|
# Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
|
@@ -815,52 +806,58 @@ module Google
|
|
815
806
|
# Customize the options with defaults
|
816
807
|
call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
817
808
|
|
818
|
-
# Set x-goog-api-client
|
809
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
819
810
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
820
811
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
821
812
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
822
813
|
transports_version_send: [:rest]
|
823
814
|
|
815
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
816
|
+
|
824
817
|
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
825
|
-
metadata: call_metadata
|
818
|
+
metadata: call_metadata,
|
819
|
+
retry_policy: @config.rpcs.test_iam_permissions.retry_policy
|
826
820
|
|
827
821
|
options.apply_defaults timeout: @config.timeout,
|
828
|
-
metadata: @config.metadata
|
822
|
+
metadata: @config.metadata,
|
823
|
+
retry_policy: @config.retry_policy
|
829
824
|
|
830
825
|
@service_attachments_stub.test_iam_permissions request, options do |result, response|
|
831
826
|
yield result, response if block_given?
|
832
827
|
return result
|
833
828
|
end
|
834
|
-
rescue ::
|
835
|
-
|
836
|
-
raise ::Gapic::Rest::Error.wrap_faraday_error e
|
837
|
-
rescue ::Gapic::Rest::Error => gapic_error
|
838
|
-
raise ::Google::Cloud::Error.from_error gapic_error
|
839
|
-
end
|
829
|
+
rescue ::Gapic::Rest::Error => e
|
830
|
+
raise ::Google::Cloud::Error.from_error(e)
|
840
831
|
end
|
841
832
|
|
842
833
|
##
|
843
834
|
# Configuration class for the ServiceAttachments REST API.
|
844
835
|
#
|
845
836
|
# This class represents the configuration for ServiceAttachments REST,
|
846
|
-
# providing control over
|
837
|
+
# providing control over timeouts, retry behavior, logging, transport
|
838
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
839
|
+
# applied individually to specific RPCs. See
|
840
|
+
# {::Google::Cloud::Compute::V1::ServiceAttachments::Rest::Client::Configuration::Rpcs}
|
841
|
+
# for a list of RPCs that can be configured independently.
|
847
842
|
#
|
848
843
|
# Configuration can be applied globally to all clients, or to a single client
|
849
844
|
# on construction.
|
850
845
|
#
|
851
|
-
#
|
852
|
-
#
|
853
|
-
# To modify the global config, setting the timeout for all calls to 10 seconds:
|
854
|
-
#
|
855
|
-
# ::Google::Cloud::Compute::V1::ServiceAttachments::Client.configure do |config|
|
856
|
-
# config.timeout = 10.0
|
857
|
-
# end
|
846
|
+
# @example
|
858
847
|
#
|
859
|
-
#
|
848
|
+
# # Modify the global config, setting the timeout for
|
849
|
+
# # aggregated_list to 20 seconds,
|
850
|
+
# # and all remaining timeouts to 10 seconds.
|
851
|
+
# ::Google::Cloud::Compute::V1::ServiceAttachments::Rest::Client.configure do |config|
|
852
|
+
# config.timeout = 10.0
|
853
|
+
# config.rpcs.aggregated_list.timeout = 20.0
|
854
|
+
# end
|
860
855
|
#
|
861
|
-
#
|
862
|
-
#
|
863
|
-
#
|
856
|
+
# # Apply the above configuration only to a new client.
|
857
|
+
# client = ::Google::Cloud::Compute::V1::ServiceAttachments::Rest::Client.new do |config|
|
858
|
+
# config.timeout = 10.0
|
859
|
+
# config.rpcs.aggregated_list.timeout = 20.0
|
860
|
+
# end
|
864
861
|
#
|
865
862
|
# @!attribute [rw] endpoint
|
866
863
|
# The hostname or hostname:port of the service endpoint.
|
@@ -889,8 +886,19 @@ module Google
|
|
889
886
|
# The call timeout in seconds.
|
890
887
|
# @return [::Numeric]
|
891
888
|
# @!attribute [rw] metadata
|
892
|
-
# Additional
|
889
|
+
# Additional headers to be sent with the call.
|
893
890
|
# @return [::Hash{::Symbol=>::String}]
|
891
|
+
# @!attribute [rw] retry_policy
|
892
|
+
# The retry policy. The value is a hash with the following keys:
|
893
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
894
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
895
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
896
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
897
|
+
# trigger a retry.
|
898
|
+
# @return [::Hash]
|
899
|
+
# @!attribute [rw] quota_project
|
900
|
+
# A separate project against which to charge quota.
|
901
|
+
# @return [::String]
|
894
902
|
#
|
895
903
|
class Configuration
|
896
904
|
extend ::Gapic::Config
|
@@ -905,6 +913,8 @@ module Google
|
|
905
913
|
config_attr :lib_version, nil, ::String, nil
|
906
914
|
config_attr :timeout, nil, ::Numeric, nil
|
907
915
|
config_attr :metadata, nil, ::Hash, nil
|
916
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
917
|
+
config_attr :quota_project, nil, ::String, nil
|
908
918
|
|
909
919
|
# @private
|
910
920
|
def initialize parent_config = nil
|
@@ -933,9 +943,14 @@ module Google
|
|
933
943
|
# the following configuration fields:
|
934
944
|
#
|
935
945
|
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
936
|
-
#
|
937
|
-
#
|
938
|
-
#
|
946
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
947
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
948
|
+
# include the following keys:
|
949
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
950
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
951
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
952
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
953
|
+
# trigger a retry.
|
939
954
|
#
|
940
955
|
class Rpcs
|
941
956
|
##
|