google-cloud-compute-v1 0.1.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +13 -13
- data/README.md +10 -34
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +133 -93
- data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +188 -0
- data/lib/google/cloud/compute/v1/accelerator_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +181 -133
- data/lib/google/cloud/compute/v1/addresses/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/addresses/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +229 -173
- data/lib/google/cloud/compute/v1/autoscalers/rest/grpc_transcoding.rb +5 -0
- data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +373 -0
- data/lib/google/cloud/compute/v1/autoscalers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +248 -185
- data/lib/google/cloud/compute/v1/backend_buckets/rest/grpc_transcoding.rb +4 -0
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +413 -0
- data/lib/google/cloud/compute/v1/backend_buckets/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +325 -254
- data/lib/google/cloud/compute/v1/backend_services/rest/grpc_transcoding.rb +5 -0
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +553 -0
- data/lib/google/cloud/compute/v1/backend_services/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/compute_pb.rb +8507 -7466
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +133 -93
- data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +188 -0
- data/lib/google/cloud/compute/v1/disk_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +365 -273
- data/lib/google/cloud/compute/v1/disks/rest/grpc_transcoding.rb +8 -0
- data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +644 -0
- data/lib/google/cloud/compute/v1/disks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +195 -133
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +317 -0
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/firewall_policies/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +1592 -0
- data/lib/google/cloud/compute/v1/firewall_policies/rest/grpc_transcoding.rb +269 -0
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +869 -0
- data/lib/google/cloud/compute/v1/firewall_policies/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/firewall_policies.rb +44 -0
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +200 -145
- data/lib/google/cloud/compute/v1/firewalls/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +321 -0
- data/lib/google/cloud/compute/v1/firewalls/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +307 -172
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +417 -0
- data/lib/google/cloud/compute/v1/forwarding_rules/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +152 -105
- data/lib/google/cloud/compute/v1/global_addresses/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/global_addresses/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +274 -144
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +365 -0
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +226 -173
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +370 -0
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +175 -123
- data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +274 -0
- data/lib/google/cloud/compute/v1/global_operations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +124 -79
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +186 -0
- data/lib/google/cloud/compute/v1/global_organization_operations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +627 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/grpc_transcoding.rb +100 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes.rb +44 -0
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +229 -173
- data/lib/google/cloud/compute/v1/health_checks/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +371 -0
- data/lib/google/cloud/compute/v1/health_checks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/image_family_views/credentials.rb +53 -0
- data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +318 -0
- data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +89 -0
- data/lib/google/cloud/compute/v1/image_family_views/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/image_family_views.rb +44 -0
- data/lib/google/cloud/compute/v1/images/rest/client.rb +310 -214
- data/lib/google/cloud/compute/v1/images/rest/grpc_transcoding.rb +4 -0
- data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +542 -0
- data/lib/google/cloud/compute/v1/images/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +556 -477
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/grpc_transcoding.rb +10 -0
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +974 -0
- data/lib/google/cloud/compute/v1/instance_group_managers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +284 -232
- data/lib/google/cloud/compute/v1/instance_groups/rest/grpc_transcoding.rb +9 -0
- data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +467 -0
- data/lib/google/cloud/compute/v1/instance_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +215 -144
- data/lib/google/cloud/compute/v1/instance_templates/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +362 -0
- data/lib/google/cloud/compute/v1/instance_templates/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +1246 -797
- data/lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb +27 -0
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +2018 -0
- data/lib/google/cloud/compute/v1/instances/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +205 -153
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +326 -0
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +104 -65
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +138 -0
- data/lib/google/cloud/compute/v1/interconnect_locations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +199 -137
- data/lib/google/cloud/compute/v1/interconnects/rest/grpc_transcoding.rb +2 -0
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +318 -0
- data/lib/google/cloud/compute/v1/interconnects/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +97 -52
- data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +133 -0
- data/lib/google/cloud/compute/v1/license_codes/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +222 -151
- data/lib/google/cloud/compute/v1/licenses/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +362 -0
- data/lib/google/cloud/compute/v1/licenses/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +133 -93
- data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +188 -0
- data/lib/google/cloud/compute/v1/machine_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +275 -214
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/grpc_transcoding.rb +8 -0
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +465 -0
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +378 -234
- data/lib/google/cloud/compute/v1/networks/rest/grpc_transcoding.rb +5 -0
- data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +553 -0
- data/lib/google/cloud/compute/v1/networks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +366 -280
- data/lib/google/cloud/compute/v1/node_groups/rest/grpc_transcoding.rb +6 -0
- data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +646 -0
- data/lib/google/cloud/compute/v1/node_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +244 -172
- data/lib/google/cloud/compute/v1/node_templates/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +412 -0
- data/lib/google/cloud/compute/v1/node_templates/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +133 -93
- data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +188 -0
- data/lib/google/cloud/compute/v1/node_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +225 -166
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/grpc_transcoding.rb +2 -0
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +369 -0
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +369 -285
- data/lib/google/cloud/compute/v1/projects/rest/grpc_transcoding.rb +12 -0
- data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +643 -0
- data/lib/google/cloud/compute/v1/projects/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +627 -0
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/grpc_transcoding.rb +100 -0
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/public_advertised_prefixes.rb +44 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +723 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/grpc_transcoding.rb +118 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +325 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/public_delegated_prefixes.rb +44 -0
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +200 -145
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/grpc_transcoding.rb +5 -0
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +323 -0
- data/lib/google/cloud/compute/v1/region_autoscalers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +223 -161
- data/lib/google/cloud/compute/v1/region_backend_services/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +365 -0
- data/lib/google/cloud/compute/v1/region_backend_services/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +158 -114
- data/lib/google/cloud/compute/v1/region_commitments/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +234 -0
- data/lib/google/cloud/compute/v1/region_commitments/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +104 -65
- data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +138 -0
- data/lib/google/cloud/compute/v1/region_disk_types/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +336 -245
- data/lib/google/cloud/compute/v1/region_disks/rest/grpc_transcoding.rb +7 -0
- data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +593 -0
- data/lib/google/cloud/compute/v1/region_disks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +176 -125
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/grpc_transcoding.rb +2 -0
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/region_health_check_services/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +200 -145
- data/lib/google/cloud/compute/v1/region_health_checks/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +321 -0
- data/lib/google/cloud/compute/v1/region_health_checks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +526 -444
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/grpc_transcoding.rb +10 -0
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +924 -0
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +154 -113
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/grpc_transcoding.rb +6 -0
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +234 -0
- data/lib/google/cloud/compute/v1/region_instance_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_instances/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +318 -0
- data/lib/google/cloud/compute/v1/region_instances/rest/grpc_transcoding.rb +46 -0
- data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +92 -0
- data/lib/google/cloud/compute/v1/region_instances/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/region_instances.rb +44 -0
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +152 -105
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +152 -105
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +145 -94
- data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +224 -0
- data/lib/google/cloud/compute/v1/region_operations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +152 -105
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +176 -125
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/grpc_transcoding.rb +2 -0
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +200 -145
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +321 -0
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +216 -138
- data/lib/google/cloud/compute/v1/region_url_maps/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +365 -0
- data/lib/google/cloud/compute/v1/region_url_maps/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +104 -65
- data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +138 -0
- data/lib/google/cloud/compute/v1/regions/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +268 -192
- data/lib/google/cloud/compute/v1/reservations/rest/grpc_transcoding.rb +2 -0
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +458 -0
- data/lib/google/cloud/compute/v1/reservations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +244 -172
- data/lib/google/cloud/compute/v1/resource_policies/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +412 -0
- data/lib/google/cloud/compute/v1/resource_policies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +301 -226
- data/lib/google/cloud/compute/v1/routers/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +507 -0
- data/lib/google/cloud/compute/v1/routers/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +152 -105
- data/lib/google/cloud/compute/v1/routes/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +229 -0
- data/lib/google/cloud/compute/v1/routes/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +294 -209
- data/lib/google/cloud/compute/v1/security_policies/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +504 -0
- data/lib/google/cloud/compute/v1/security_policies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/service_attachments/credentials.rb +52 -0
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +954 -0
- data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +458 -0
- data/lib/google/cloud/compute/v1/service_attachments/rest.rb +33 -0
- data/lib/google/cloud/compute/v1/service_attachments.rb +44 -0
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +215 -142
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +360 -0
- data/lib/google/cloud/compute/v1/snapshots/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +181 -133
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/ssl_certificates/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +202 -151
- data/lib/google/cloud/compute/v1/ssl_policies/rest/grpc_transcoding.rb +2 -0
- data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +324 -0
- data/lib/google/cloud/compute/v1/ssl_policies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +345 -260
- data/lib/google/cloud/compute/v1/subnetworks/rest/grpc_transcoding.rb +5 -0
- data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +600 -0
- data/lib/google/cloud/compute/v1/subnetworks/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +176 -125
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/grpc_transcoding.rb +2 -0
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +275 -0
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +230 -174
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +371 -0
- data/lib/google/cloud/compute/v1/target_http_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +353 -212
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/grpc_transcoding.rb +5 -0
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +509 -0
- data/lib/google/cloud/compute/v1/target_https_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +181 -133
- data/lib/google/cloud/compute/v1/target_instances/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/target_instances/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +321 -246
- data/lib/google/cloud/compute/v1/target_pools/rest/grpc_transcoding.rb +7 -0
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +554 -0
- data/lib/google/cloud/compute/v1/target_pools/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +248 -185
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/grpc_transcoding.rb +5 -0
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +413 -0
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +200 -145
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/grpc_transcoding.rb +3 -0
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +321 -0
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +181 -133
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +274 -209
- data/lib/google/cloud/compute/v1/url_maps/rest/grpc_transcoding.rb +4 -0
- data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +461 -0
- data/lib/google/cloud/compute/v1/url_maps/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +248 -178
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/grpc_transcoding.rb +2 -0
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +412 -0
- data/lib/google/cloud/compute/v1/vpn_gateways/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +181 -133
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/grpc_transcoding.rb +1 -0
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +279 -0
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +145 -94
- data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +224 -0
- data/lib/google/cloud/compute/v1/zone_operations/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +104 -65
- data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +138 -0
- data/lib/google/cloud/compute/v1/zones/rest.rb +0 -2
- data/lib/google/cloud/compute/v1.rb +7 -0
- data/proto_docs/README.md +1 -1
- data/proto_docs/google/api/field_behavior.rb +6 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +18964 -19481
- data/proto_docs/google/cloud/extended_operations.rb +51 -0
- metadata +141 -13
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
|
+
require "google/cloud/compute/v1/disks/rest/service_stub"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -31,8 +32,6 @@ module Google
|
|
31
32
|
# The Disks API.
|
32
33
|
#
|
33
34
|
class Client
|
34
|
-
include GrpcTranscoding
|
35
|
-
|
36
35
|
# @private
|
37
36
|
attr_reader :disks_stub
|
38
37
|
|
@@ -42,13 +41,12 @@ module Google
|
|
42
41
|
# See {::Google::Cloud::Compute::V1::Disks::Rest::Client::Configuration}
|
43
42
|
# for a description of the configuration fields.
|
44
43
|
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
# To modify the configuration for all Disks clients:
|
44
|
+
# @example
|
48
45
|
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
46
|
+
# # Modify the configuration for all Disks clients
|
47
|
+
# ::Google::Cloud::Compute::V1::Disks::Rest::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
|
+
# end
|
52
50
|
#
|
53
51
|
# @yield [config] Configure the Client client.
|
54
52
|
# @yieldparam config [Client::Configuration]
|
@@ -66,6 +64,44 @@ module Google
|
|
66
64
|
end
|
67
65
|
default_config = Client::Configuration.new parent_config
|
68
66
|
|
67
|
+
default_config.rpcs.add_resource_policies.timeout = 600.0
|
68
|
+
|
69
|
+
default_config.rpcs.aggregated_list.timeout = 600.0
|
70
|
+
default_config.rpcs.aggregated_list.retry_policy = {
|
71
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
72
|
+
}
|
73
|
+
|
74
|
+
default_config.rpcs.create_snapshot.timeout = 600.0
|
75
|
+
|
76
|
+
default_config.rpcs.delete.timeout = 600.0
|
77
|
+
|
78
|
+
default_config.rpcs.get.timeout = 600.0
|
79
|
+
default_config.rpcs.get.retry_policy = {
|
80
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
81
|
+
}
|
82
|
+
|
83
|
+
default_config.rpcs.get_iam_policy.timeout = 600.0
|
84
|
+
default_config.rpcs.get_iam_policy.retry_policy = {
|
85
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
86
|
+
}
|
87
|
+
|
88
|
+
default_config.rpcs.insert.timeout = 600.0
|
89
|
+
|
90
|
+
default_config.rpcs.list.timeout = 600.0
|
91
|
+
default_config.rpcs.list.retry_policy = {
|
92
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
93
|
+
}
|
94
|
+
|
95
|
+
default_config.rpcs.remove_resource_policies.timeout = 600.0
|
96
|
+
|
97
|
+
default_config.rpcs.resize.timeout = 600.0
|
98
|
+
|
99
|
+
default_config.rpcs.set_iam_policy.timeout = 600.0
|
100
|
+
|
101
|
+
default_config.rpcs.set_labels.timeout = 600.0
|
102
|
+
|
103
|
+
default_config.rpcs.test_iam_permissions.timeout = 600.0
|
104
|
+
|
69
105
|
default_config
|
70
106
|
end
|
71
107
|
yield @configure if block_given?
|
@@ -95,28 +131,20 @@ module Google
|
|
95
131
|
##
|
96
132
|
# Create a new Disks REST client object.
|
97
133
|
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
# To create a new Disks REST client with the default
|
101
|
-
# configuration:
|
134
|
+
# @example
|
102
135
|
#
|
103
|
-
#
|
136
|
+
# # Create a client using the default configuration
|
137
|
+
# client = ::Google::Cloud::Compute::V1::Disks::Rest::Client.new
|
104
138
|
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
# config.timeout = 10.0
|
110
|
-
# end
|
139
|
+
# # Create a client using a custom configuration
|
140
|
+
# client = ::Google::Cloud::Compute::V1::Disks::Rest::Client.new do |config|
|
141
|
+
# config.timeout = 10.0
|
142
|
+
# end
|
111
143
|
#
|
112
144
|
# @yield [config] Configure the Disks client.
|
113
145
|
# @yieldparam config [Client::Configuration]
|
114
146
|
#
|
115
147
|
def initialize
|
116
|
-
# These require statements are intentionally placed here to initialize
|
117
|
-
# the REST modules only when it's required.
|
118
|
-
require "gapic/rest"
|
119
|
-
|
120
148
|
# Create the configuration object
|
121
149
|
@config = Configuration.new Client.configure
|
122
150
|
|
@@ -126,11 +154,11 @@ module Google
|
|
126
154
|
# Create credentials
|
127
155
|
credentials = @config.credentials
|
128
156
|
credentials ||= Credentials.default scope: @config.scope
|
129
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
157
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
130
158
|
credentials = Credentials.new credentials, scope: @config.scope
|
131
159
|
end
|
132
160
|
|
133
|
-
@
|
161
|
+
@disks_stub = ::Google::Cloud::Compute::V1::Disks::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
134
162
|
end
|
135
163
|
|
136
164
|
# Service calls
|
@@ -162,18 +190,14 @@ module Google
|
|
162
190
|
# @param project [::String]
|
163
191
|
# Project ID for this request.
|
164
192
|
# @param request_id [::String]
|
165
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
166
|
-
#
|
167
|
-
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
168
|
-
#
|
169
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
193
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
170
194
|
# @param zone [::String]
|
171
195
|
# The name of the zone for this request.
|
172
|
-
# @yield [result,
|
173
|
-
# @yieldparam result [::
|
196
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
197
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
174
198
|
# @yieldparam response [::Faraday::Response]
|
175
199
|
#
|
176
|
-
# @return [::
|
200
|
+
# @return [::Gapic::Rest::BaseOperation]
|
177
201
|
#
|
178
202
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
179
203
|
def add_resource_policies request, options = nil
|
@@ -185,26 +209,25 @@ module Google
|
|
185
209
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
186
210
|
|
187
211
|
# Customize the options with defaults
|
188
|
-
call_metadata =
|
212
|
+
call_metadata = @config.rpcs.add_resource_policies.metadata.to_h
|
189
213
|
|
190
214
|
# Set x-goog-api-client header
|
191
215
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
192
216
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
193
|
-
gapic_version: ::Google::Cloud::Compute::V1::VERSION
|
217
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
218
|
+
transports_version_send: [:rest]
|
194
219
|
|
195
|
-
options.apply_defaults timeout: @config.timeout,
|
220
|
+
options.apply_defaults timeout: @config.rpcs.add_resource_policies.timeout,
|
196
221
|
metadata: call_metadata
|
197
222
|
|
198
|
-
|
199
|
-
|
200
|
-
uri: uri,
|
201
|
-
body: body,
|
202
|
-
options: options
|
203
|
-
)
|
204
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
223
|
+
options.apply_defaults timeout: @config.timeout,
|
224
|
+
metadata: @config.metadata
|
205
225
|
|
206
|
-
|
207
|
-
|
226
|
+
@disks_stub.add_resource_policies request, options do |result, response|
|
227
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
228
|
+
yield result, response if block_given?
|
229
|
+
return result
|
230
|
+
end
|
208
231
|
rescue ::Faraday::Error => e
|
209
232
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
210
233
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -231,34 +254,24 @@ module Google
|
|
231
254
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
232
255
|
#
|
233
256
|
# @param filter [::String]
|
234
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
|
235
|
-
#
|
236
|
-
# For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
|
237
|
-
#
|
238
|
-
# You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
|
239
|
-
#
|
240
|
-
# To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
|
257
|
+
# A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
|
241
258
|
# @param include_all_scopes [::Boolean]
|
242
259
|
# Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
|
243
260
|
# @param max_results [::Integer]
|
244
261
|
# The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
|
245
262
|
# @param order_by [::String]
|
246
|
-
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
|
247
|
-
#
|
248
|
-
# You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
|
249
|
-
#
|
250
|
-
# Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
263
|
+
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
251
264
|
# @param page_token [::String]
|
252
265
|
# Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
|
253
266
|
# @param project [::String]
|
254
267
|
# Project ID for this request.
|
255
268
|
# @param return_partial_success [::Boolean]
|
256
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
257
|
-
# @yield [result,
|
258
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
269
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
270
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
271
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::DisksScopedList>]
|
259
272
|
# @yieldparam response [::Faraday::Response]
|
260
273
|
#
|
261
|
-
# @return [::Google::Cloud::Compute::V1::
|
274
|
+
# @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::DisksScopedList>]
|
262
275
|
#
|
263
276
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
264
277
|
def aggregated_list request, options = nil
|
@@ -270,26 +283,25 @@ module Google
|
|
270
283
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
271
284
|
|
272
285
|
# Customize the options with defaults
|
273
|
-
call_metadata =
|
286
|
+
call_metadata = @config.rpcs.aggregated_list.metadata.to_h
|
274
287
|
|
275
288
|
# Set x-goog-api-client header
|
276
289
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
277
290
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
278
|
-
gapic_version: ::Google::Cloud::Compute::V1::VERSION
|
291
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
292
|
+
transports_version_send: [:rest]
|
279
293
|
|
280
|
-
options.apply_defaults timeout: @config.timeout,
|
294
|
+
options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
|
281
295
|
metadata: call_metadata
|
282
296
|
|
283
|
-
|
284
|
-
|
285
|
-
uri: uri,
|
286
|
-
params: query_string_params,
|
287
|
-
options: options
|
288
|
-
)
|
289
|
-
result = ::Google::Cloud::Compute::V1::DiskAggregatedList.decode_json response.body, ignore_unknown_fields: true
|
297
|
+
options.apply_defaults timeout: @config.timeout,
|
298
|
+
metadata: @config.metadata
|
290
299
|
|
291
|
-
|
292
|
-
|
300
|
+
@disks_stub.aggregated_list request, options do |result, response|
|
301
|
+
result = ::Gapic::Rest::PagedEnumerable.new @disks_stub, :aggregated_list, "items", request, result, options
|
302
|
+
yield result, response if block_given?
|
303
|
+
return result
|
304
|
+
end
|
293
305
|
rescue ::Faraday::Error => e
|
294
306
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
295
307
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -322,20 +334,16 @@ module Google
|
|
322
334
|
# @param project [::String]
|
323
335
|
# Project ID for this request.
|
324
336
|
# @param request_id [::String]
|
325
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
326
|
-
#
|
327
|
-
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
328
|
-
#
|
329
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
337
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
330
338
|
# @param snapshot_resource [::Google::Cloud::Compute::V1::Snapshot, ::Hash]
|
331
339
|
# The body resource for this request
|
332
340
|
# @param zone [::String]
|
333
341
|
# The name of the zone for this request.
|
334
|
-
# @yield [result,
|
335
|
-
# @yieldparam result [::
|
342
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
343
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
336
344
|
# @yieldparam response [::Faraday::Response]
|
337
345
|
#
|
338
|
-
# @return [::
|
346
|
+
# @return [::Gapic::Rest::BaseOperation]
|
339
347
|
#
|
340
348
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
341
349
|
def create_snapshot request, options = nil
|
@@ -347,26 +355,25 @@ module Google
|
|
347
355
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
348
356
|
|
349
357
|
# Customize the options with defaults
|
350
|
-
call_metadata =
|
358
|
+
call_metadata = @config.rpcs.create_snapshot.metadata.to_h
|
351
359
|
|
352
360
|
# Set x-goog-api-client header
|
353
361
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
354
362
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
355
|
-
gapic_version: ::Google::Cloud::Compute::V1::VERSION
|
363
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
364
|
+
transports_version_send: [:rest]
|
356
365
|
|
357
|
-
options.apply_defaults timeout: @config.timeout,
|
366
|
+
options.apply_defaults timeout: @config.rpcs.create_snapshot.timeout,
|
358
367
|
metadata: call_metadata
|
359
368
|
|
360
|
-
|
361
|
-
|
362
|
-
uri: uri,
|
363
|
-
body: body,
|
364
|
-
options: options
|
365
|
-
)
|
366
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
369
|
+
options.apply_defaults timeout: @config.timeout,
|
370
|
+
metadata: @config.metadata
|
367
371
|
|
368
|
-
|
369
|
-
|
372
|
+
@disks_stub.create_snapshot request, options do |result, response|
|
373
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
374
|
+
yield result, response if block_given?
|
375
|
+
return result
|
376
|
+
end
|
370
377
|
rescue ::Faraday::Error => e
|
371
378
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
372
379
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -397,18 +404,14 @@ module Google
|
|
397
404
|
# @param project [::String]
|
398
405
|
# Project ID for this request.
|
399
406
|
# @param request_id [::String]
|
400
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
401
|
-
#
|
402
|
-
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
403
|
-
#
|
404
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
407
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
405
408
|
# @param zone [::String]
|
406
409
|
# The name of the zone for this request.
|
407
|
-
# @yield [result,
|
408
|
-
# @yieldparam result [::
|
410
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
411
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
409
412
|
# @yieldparam response [::Faraday::Response]
|
410
413
|
#
|
411
|
-
# @return [::
|
414
|
+
# @return [::Gapic::Rest::BaseOperation]
|
412
415
|
#
|
413
416
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
414
417
|
def delete request, options = nil
|
@@ -420,26 +423,25 @@ module Google
|
|
420
423
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
421
424
|
|
422
425
|
# Customize the options with defaults
|
423
|
-
call_metadata =
|
426
|
+
call_metadata = @config.rpcs.delete.metadata.to_h
|
424
427
|
|
425
428
|
# Set x-goog-api-client header
|
426
429
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
427
430
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
428
|
-
gapic_version: ::Google::Cloud::Compute::V1::VERSION
|
431
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
432
|
+
transports_version_send: [:rest]
|
429
433
|
|
430
|
-
options.apply_defaults timeout: @config.timeout,
|
434
|
+
options.apply_defaults timeout: @config.rpcs.delete.timeout,
|
431
435
|
metadata: call_metadata
|
432
436
|
|
433
|
-
|
434
|
-
|
435
|
-
uri: uri,
|
436
|
-
params: query_string_params,
|
437
|
-
options: options
|
438
|
-
)
|
439
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
437
|
+
options.apply_defaults timeout: @config.timeout,
|
438
|
+
metadata: @config.metadata
|
440
439
|
|
441
|
-
|
442
|
-
|
440
|
+
@disks_stub.delete request, options do |result, response|
|
441
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
442
|
+
yield result, response if block_given?
|
443
|
+
return result
|
444
|
+
end
|
443
445
|
rescue ::Faraday::Error => e
|
444
446
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
445
447
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -471,7 +473,7 @@ module Google
|
|
471
473
|
# Project ID for this request.
|
472
474
|
# @param zone [::String]
|
473
475
|
# The name of the zone for this request.
|
474
|
-
# @yield [result,
|
476
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
475
477
|
# @yieldparam result [::Google::Cloud::Compute::V1::Disk]
|
476
478
|
# @yieldparam response [::Faraday::Response]
|
477
479
|
#
|
@@ -487,25 +489,24 @@ module Google
|
|
487
489
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
488
490
|
|
489
491
|
# Customize the options with defaults
|
490
|
-
call_metadata =
|
492
|
+
call_metadata = @config.rpcs.get.metadata.to_h
|
491
493
|
|
492
494
|
# Set x-goog-api-client header
|
493
495
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
494
496
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
495
|
-
gapic_version: ::Google::Cloud::Compute::V1::VERSION
|
497
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
498
|
+
transports_version_send: [:rest]
|
496
499
|
|
497
|
-
options.apply_defaults timeout: @config.timeout,
|
500
|
+
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
498
501
|
metadata: call_metadata
|
499
502
|
|
500
|
-
|
501
|
-
|
502
|
-
uri: uri,
|
503
|
-
options: options
|
504
|
-
)
|
505
|
-
result = ::Google::Cloud::Compute::V1::Disk.decode_json response.body, ignore_unknown_fields: true
|
503
|
+
options.apply_defaults timeout: @config.timeout,
|
504
|
+
metadata: @config.metadata
|
506
505
|
|
507
|
-
|
508
|
-
|
506
|
+
@disks_stub.get request, options do |result, response|
|
507
|
+
yield result, response if block_given?
|
508
|
+
return result
|
509
|
+
end
|
509
510
|
rescue ::Faraday::Error => e
|
510
511
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
511
512
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -539,7 +540,7 @@ module Google
|
|
539
540
|
# Name or id of the resource for this request.
|
540
541
|
# @param zone [::String]
|
541
542
|
# The name of the zone for this request.
|
542
|
-
# @yield [result,
|
543
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
543
544
|
# @yieldparam result [::Google::Cloud::Compute::V1::Policy]
|
544
545
|
# @yieldparam response [::Faraday::Response]
|
545
546
|
#
|
@@ -555,26 +556,24 @@ module Google
|
|
555
556
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
556
557
|
|
557
558
|
# Customize the options with defaults
|
558
|
-
call_metadata =
|
559
|
+
call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
559
560
|
|
560
561
|
# Set x-goog-api-client header
|
561
562
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
562
563
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
563
|
-
gapic_version: ::Google::Cloud::Compute::V1::VERSION
|
564
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
565
|
+
transports_version_send: [:rest]
|
564
566
|
|
565
|
-
options.apply_defaults timeout: @config.timeout,
|
567
|
+
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
566
568
|
metadata: call_metadata
|
567
569
|
|
568
|
-
|
569
|
-
|
570
|
-
uri: uri,
|
571
|
-
params: query_string_params,
|
572
|
-
options: options
|
573
|
-
)
|
574
|
-
result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
570
|
+
options.apply_defaults timeout: @config.timeout,
|
571
|
+
metadata: @config.metadata
|
575
572
|
|
576
|
-
|
577
|
-
|
573
|
+
@disks_stub.get_iam_policy request, options do |result, response|
|
574
|
+
yield result, response if block_given?
|
575
|
+
return result
|
576
|
+
end
|
578
577
|
rescue ::Faraday::Error => e
|
579
578
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
580
579
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -605,20 +604,16 @@ module Google
|
|
605
604
|
# @param project [::String]
|
606
605
|
# Project ID for this request.
|
607
606
|
# @param request_id [::String]
|
608
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
609
|
-
#
|
610
|
-
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
611
|
-
#
|
612
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
607
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
613
608
|
# @param source_image [::String]
|
614
|
-
#
|
609
|
+
# Source image to restore onto a disk. This field is optional.
|
615
610
|
# @param zone [::String]
|
616
611
|
# The name of the zone for this request.
|
617
|
-
# @yield [result,
|
618
|
-
# @yieldparam result [::
|
612
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
613
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
619
614
|
# @yieldparam response [::Faraday::Response]
|
620
615
|
#
|
621
|
-
# @return [::
|
616
|
+
# @return [::Gapic::Rest::BaseOperation]
|
622
617
|
#
|
623
618
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
624
619
|
def insert request, options = nil
|
@@ -630,26 +625,25 @@ module Google
|
|
630
625
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
631
626
|
|
632
627
|
# Customize the options with defaults
|
633
|
-
call_metadata =
|
628
|
+
call_metadata = @config.rpcs.insert.metadata.to_h
|
634
629
|
|
635
630
|
# Set x-goog-api-client header
|
636
631
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
637
632
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
638
|
-
gapic_version: ::Google::Cloud::Compute::V1::VERSION
|
633
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
634
|
+
transports_version_send: [:rest]
|
639
635
|
|
640
|
-
options.apply_defaults timeout: @config.timeout,
|
636
|
+
options.apply_defaults timeout: @config.rpcs.insert.timeout,
|
641
637
|
metadata: call_metadata
|
642
638
|
|
643
|
-
|
644
|
-
|
645
|
-
uri: uri,
|
646
|
-
body: body,
|
647
|
-
options: options
|
648
|
-
)
|
649
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
639
|
+
options.apply_defaults timeout: @config.timeout,
|
640
|
+
metadata: @config.metadata
|
650
641
|
|
651
|
-
|
652
|
-
|
642
|
+
@disks_stub.insert request, options do |result, response|
|
643
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
644
|
+
yield result, response if block_given?
|
645
|
+
return result
|
646
|
+
end
|
653
647
|
rescue ::Faraday::Error => e
|
654
648
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
655
649
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -676,34 +670,24 @@ module Google
|
|
676
670
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
677
671
|
#
|
678
672
|
# @param filter [::String]
|
679
|
-
# A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
|
680
|
-
#
|
681
|
-
# For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
|
682
|
-
#
|
683
|
-
# You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
|
684
|
-
#
|
685
|
-
# To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
|
673
|
+
# A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
|
686
674
|
# @param max_results [::Integer]
|
687
675
|
# The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
|
688
676
|
# @param order_by [::String]
|
689
|
-
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
|
690
|
-
#
|
691
|
-
# You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
|
692
|
-
#
|
693
|
-
# Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
677
|
+
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
694
678
|
# @param page_token [::String]
|
695
679
|
# Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
|
696
680
|
# @param project [::String]
|
697
681
|
# Project ID for this request.
|
698
682
|
# @param return_partial_success [::Boolean]
|
699
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
683
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
700
684
|
# @param zone [::String]
|
701
685
|
# The name of the zone for this request.
|
702
|
-
# @yield [result,
|
703
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
686
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
687
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Disk>]
|
704
688
|
# @yieldparam response [::Faraday::Response]
|
705
689
|
#
|
706
|
-
# @return [::Google::Cloud::Compute::V1::
|
690
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Disk>]
|
707
691
|
#
|
708
692
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
709
693
|
def list request, options = nil
|
@@ -715,26 +699,25 @@ module Google
|
|
715
699
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
716
700
|
|
717
701
|
# Customize the options with defaults
|
718
|
-
call_metadata =
|
702
|
+
call_metadata = @config.rpcs.list.metadata.to_h
|
719
703
|
|
720
704
|
# Set x-goog-api-client header
|
721
705
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
722
706
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
723
|
-
gapic_version: ::Google::Cloud::Compute::V1::VERSION
|
707
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
708
|
+
transports_version_send: [:rest]
|
724
709
|
|
725
|
-
options.apply_defaults timeout: @config.timeout,
|
710
|
+
options.apply_defaults timeout: @config.rpcs.list.timeout,
|
726
711
|
metadata: call_metadata
|
727
712
|
|
728
|
-
|
729
|
-
|
730
|
-
uri: uri,
|
731
|
-
params: query_string_params,
|
732
|
-
options: options
|
733
|
-
)
|
734
|
-
result = ::Google::Cloud::Compute::V1::DiskList.decode_json response.body, ignore_unknown_fields: true
|
713
|
+
options.apply_defaults timeout: @config.timeout,
|
714
|
+
metadata: @config.metadata
|
735
715
|
|
736
|
-
|
737
|
-
|
716
|
+
@disks_stub.list request, options do |result, response|
|
717
|
+
result = ::Gapic::Rest::PagedEnumerable.new @disks_stub, :list, "items", request, result, options
|
718
|
+
yield result, response if block_given?
|
719
|
+
return result
|
720
|
+
end
|
738
721
|
rescue ::Faraday::Error => e
|
739
722
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
740
723
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -767,18 +750,14 @@ module Google
|
|
767
750
|
# @param project [::String]
|
768
751
|
# Project ID for this request.
|
769
752
|
# @param request_id [::String]
|
770
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
771
|
-
#
|
772
|
-
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
773
|
-
#
|
774
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
753
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
775
754
|
# @param zone [::String]
|
776
755
|
# The name of the zone for this request.
|
777
|
-
# @yield [result,
|
778
|
-
# @yieldparam result [::
|
756
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
757
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
779
758
|
# @yieldparam response [::Faraday::Response]
|
780
759
|
#
|
781
|
-
# @return [::
|
760
|
+
# @return [::Gapic::Rest::BaseOperation]
|
782
761
|
#
|
783
762
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
784
763
|
def remove_resource_policies request, options = nil
|
@@ -790,26 +769,25 @@ module Google
|
|
790
769
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
791
770
|
|
792
771
|
# Customize the options with defaults
|
793
|
-
call_metadata =
|
772
|
+
call_metadata = @config.rpcs.remove_resource_policies.metadata.to_h
|
794
773
|
|
795
774
|
# Set x-goog-api-client header
|
796
775
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
797
776
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
798
|
-
gapic_version: ::Google::Cloud::Compute::V1::VERSION
|
777
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
778
|
+
transports_version_send: [:rest]
|
799
779
|
|
800
|
-
options.apply_defaults timeout: @config.timeout,
|
780
|
+
options.apply_defaults timeout: @config.rpcs.remove_resource_policies.timeout,
|
801
781
|
metadata: call_metadata
|
802
782
|
|
803
|
-
|
804
|
-
|
805
|
-
uri: uri,
|
806
|
-
body: body,
|
807
|
-
options: options
|
808
|
-
)
|
809
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
783
|
+
options.apply_defaults timeout: @config.timeout,
|
784
|
+
metadata: @config.metadata
|
810
785
|
|
811
|
-
|
812
|
-
|
786
|
+
@disks_stub.remove_resource_policies request, options do |result, response|
|
787
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
788
|
+
yield result, response if block_given?
|
789
|
+
return result
|
790
|
+
end
|
813
791
|
rescue ::Faraday::Error => e
|
814
792
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
815
793
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -842,18 +820,14 @@ module Google
|
|
842
820
|
# @param project [::String]
|
843
821
|
# Project ID for this request.
|
844
822
|
# @param request_id [::String]
|
845
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
846
|
-
#
|
847
|
-
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
848
|
-
#
|
849
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
823
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
850
824
|
# @param zone [::String]
|
851
825
|
# The name of the zone for this request.
|
852
|
-
# @yield [result,
|
853
|
-
# @yieldparam result [::
|
826
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
827
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
854
828
|
# @yieldparam response [::Faraday::Response]
|
855
829
|
#
|
856
|
-
# @return [::
|
830
|
+
# @return [::Gapic::Rest::BaseOperation]
|
857
831
|
#
|
858
832
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
859
833
|
def resize request, options = nil
|
@@ -865,26 +839,25 @@ module Google
|
|
865
839
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
866
840
|
|
867
841
|
# Customize the options with defaults
|
868
|
-
call_metadata =
|
842
|
+
call_metadata = @config.rpcs.resize.metadata.to_h
|
869
843
|
|
870
844
|
# Set x-goog-api-client header
|
871
845
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
872
846
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
873
|
-
gapic_version: ::Google::Cloud::Compute::V1::VERSION
|
847
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
848
|
+
transports_version_send: [:rest]
|
874
849
|
|
875
|
-
options.apply_defaults timeout: @config.timeout,
|
850
|
+
options.apply_defaults timeout: @config.rpcs.resize.timeout,
|
876
851
|
metadata: call_metadata
|
877
852
|
|
878
|
-
|
879
|
-
|
880
|
-
uri: uri,
|
881
|
-
body: body,
|
882
|
-
options: options
|
883
|
-
)
|
884
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
853
|
+
options.apply_defaults timeout: @config.timeout,
|
854
|
+
metadata: @config.metadata
|
885
855
|
|
886
|
-
|
887
|
-
|
856
|
+
@disks_stub.resize request, options do |result, response|
|
857
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
858
|
+
yield result, response if block_given?
|
859
|
+
return result
|
860
|
+
end
|
888
861
|
rescue ::Faraday::Error => e
|
889
862
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
890
863
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -918,7 +891,7 @@ module Google
|
|
918
891
|
# The name of the zone for this request.
|
919
892
|
# @param zone_set_policy_request_resource [::Google::Cloud::Compute::V1::ZoneSetPolicyRequest, ::Hash]
|
920
893
|
# The body resource for this request
|
921
|
-
# @yield [result,
|
894
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
922
895
|
# @yieldparam result [::Google::Cloud::Compute::V1::Policy]
|
923
896
|
# @yieldparam response [::Faraday::Response]
|
924
897
|
#
|
@@ -934,26 +907,24 @@ module Google
|
|
934
907
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
935
908
|
|
936
909
|
# Customize the options with defaults
|
937
|
-
call_metadata =
|
910
|
+
call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
938
911
|
|
939
912
|
# Set x-goog-api-client header
|
940
913
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
941
914
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
942
|
-
gapic_version: ::Google::Cloud::Compute::V1::VERSION
|
915
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
916
|
+
transports_version_send: [:rest]
|
943
917
|
|
944
|
-
options.apply_defaults timeout: @config.timeout,
|
918
|
+
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
945
919
|
metadata: call_metadata
|
946
920
|
|
947
|
-
|
948
|
-
|
949
|
-
uri: uri,
|
950
|
-
body: body,
|
951
|
-
options: options
|
952
|
-
)
|
953
|
-
result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
921
|
+
options.apply_defaults timeout: @config.timeout,
|
922
|
+
metadata: @config.metadata
|
954
923
|
|
955
|
-
|
956
|
-
|
924
|
+
@disks_stub.set_iam_policy request, options do |result, response|
|
925
|
+
yield result, response if block_given?
|
926
|
+
return result
|
927
|
+
end
|
957
928
|
rescue ::Faraday::Error => e
|
958
929
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
959
930
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -982,22 +953,18 @@ module Google
|
|
982
953
|
# @param project [::String]
|
983
954
|
# Project ID for this request.
|
984
955
|
# @param request_id [::String]
|
985
|
-
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
|
986
|
-
#
|
987
|
-
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
988
|
-
#
|
989
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
956
|
+
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
990
957
|
# @param resource [::String]
|
991
958
|
# Name or id of the resource for this request.
|
992
959
|
# @param zone [::String]
|
993
960
|
# The name of the zone for this request.
|
994
961
|
# @param zone_set_labels_request_resource [::Google::Cloud::Compute::V1::ZoneSetLabelsRequest, ::Hash]
|
995
962
|
# The body resource for this request
|
996
|
-
# @yield [result,
|
997
|
-
# @yieldparam result [::
|
963
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
964
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
998
965
|
# @yieldparam response [::Faraday::Response]
|
999
966
|
#
|
1000
|
-
# @return [::
|
967
|
+
# @return [::Gapic::Rest::BaseOperation]
|
1001
968
|
#
|
1002
969
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1003
970
|
def set_labels request, options = nil
|
@@ -1009,26 +976,25 @@ module Google
|
|
1009
976
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1010
977
|
|
1011
978
|
# Customize the options with defaults
|
1012
|
-
call_metadata =
|
979
|
+
call_metadata = @config.rpcs.set_labels.metadata.to_h
|
1013
980
|
|
1014
981
|
# Set x-goog-api-client header
|
1015
982
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1016
983
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1017
|
-
gapic_version: ::Google::Cloud::Compute::V1::VERSION
|
984
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
985
|
+
transports_version_send: [:rest]
|
1018
986
|
|
1019
|
-
options.apply_defaults timeout: @config.timeout,
|
987
|
+
options.apply_defaults timeout: @config.rpcs.set_labels.timeout,
|
1020
988
|
metadata: call_metadata
|
1021
989
|
|
1022
|
-
|
1023
|
-
|
1024
|
-
uri: uri,
|
1025
|
-
body: body,
|
1026
|
-
options: options
|
1027
|
-
)
|
1028
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
990
|
+
options.apply_defaults timeout: @config.timeout,
|
991
|
+
metadata: @config.metadata
|
1029
992
|
|
1030
|
-
|
1031
|
-
|
993
|
+
@disks_stub.set_labels request, options do |result, response|
|
994
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
995
|
+
yield result, response if block_given?
|
996
|
+
return result
|
997
|
+
end
|
1032
998
|
rescue ::Faraday::Error => e
|
1033
999
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1034
1000
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1062,7 +1028,7 @@ module Google
|
|
1062
1028
|
# The body resource for this request
|
1063
1029
|
# @param zone [::String]
|
1064
1030
|
# The name of the zone for this request.
|
1065
|
-
# @yield [result,
|
1031
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1066
1032
|
# @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
|
1067
1033
|
# @yieldparam response [::Faraday::Response]
|
1068
1034
|
#
|
@@ -1078,26 +1044,24 @@ module Google
|
|
1078
1044
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1079
1045
|
|
1080
1046
|
# Customize the options with defaults
|
1081
|
-
call_metadata =
|
1047
|
+
call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
1082
1048
|
|
1083
1049
|
# Set x-goog-api-client header
|
1084
1050
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1085
1051
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1086
|
-
gapic_version: ::Google::Cloud::Compute::V1::VERSION
|
1052
|
+
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1053
|
+
transports_version_send: [:rest]
|
1087
1054
|
|
1088
|
-
options.apply_defaults timeout: @config.timeout,
|
1055
|
+
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
1089
1056
|
metadata: call_metadata
|
1090
1057
|
|
1091
|
-
|
1092
|
-
|
1093
|
-
uri: uri,
|
1094
|
-
body: body,
|
1095
|
-
options: options
|
1096
|
-
)
|
1097
|
-
result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
|
1058
|
+
options.apply_defaults timeout: @config.timeout,
|
1059
|
+
metadata: @config.metadata
|
1098
1060
|
|
1099
|
-
|
1100
|
-
|
1061
|
+
@disks_stub.test_iam_permissions request, options do |result, response|
|
1062
|
+
yield result, response if block_given?
|
1063
|
+
return result
|
1064
|
+
end
|
1101
1065
|
rescue ::Faraday::Error => e
|
1102
1066
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1103
1067
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1152,6 +1116,9 @@ module Google
|
|
1152
1116
|
# @!attribute [rw] timeout
|
1153
1117
|
# The call timeout in seconds.
|
1154
1118
|
# @return [::Numeric]
|
1119
|
+
# @!attribute [rw] metadata
|
1120
|
+
# Additional REST headers to be sent with the call.
|
1121
|
+
# @return [::Hash{::Symbol=>::String}]
|
1155
1122
|
#
|
1156
1123
|
class Configuration
|
1157
1124
|
extend ::Gapic::Config
|
@@ -1165,6 +1132,7 @@ module Google
|
|
1165
1132
|
config_attr :lib_name, nil, ::String, nil
|
1166
1133
|
config_attr :lib_version, nil, ::String, nil
|
1167
1134
|
config_attr :timeout, nil, ::Numeric, nil
|
1135
|
+
config_attr :metadata, nil, ::Hash, nil
|
1168
1136
|
|
1169
1137
|
# @private
|
1170
1138
|
def initialize parent_config = nil
|
@@ -1172,6 +1140,130 @@ module Google
|
|
1172
1140
|
|
1173
1141
|
yield self if block_given?
|
1174
1142
|
end
|
1143
|
+
|
1144
|
+
##
|
1145
|
+
# Configurations for individual RPCs
|
1146
|
+
# @return [Rpcs]
|
1147
|
+
#
|
1148
|
+
def rpcs
|
1149
|
+
@rpcs ||= begin
|
1150
|
+
parent_rpcs = nil
|
1151
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1152
|
+
Rpcs.new parent_rpcs
|
1153
|
+
end
|
1154
|
+
end
|
1155
|
+
|
1156
|
+
##
|
1157
|
+
# Configuration RPC class for the Disks API.
|
1158
|
+
#
|
1159
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1160
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1161
|
+
# the following configuration fields:
|
1162
|
+
#
|
1163
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1164
|
+
#
|
1165
|
+
# there is one other field (`retry_policy`) that can be set
|
1166
|
+
# but is currently not supported for REST Gapic libraries.
|
1167
|
+
#
|
1168
|
+
class Rpcs
|
1169
|
+
##
|
1170
|
+
# RPC-specific configuration for `add_resource_policies`
|
1171
|
+
# @return [::Gapic::Config::Method]
|
1172
|
+
#
|
1173
|
+
attr_reader :add_resource_policies
|
1174
|
+
##
|
1175
|
+
# RPC-specific configuration for `aggregated_list`
|
1176
|
+
# @return [::Gapic::Config::Method]
|
1177
|
+
#
|
1178
|
+
attr_reader :aggregated_list
|
1179
|
+
##
|
1180
|
+
# RPC-specific configuration for `create_snapshot`
|
1181
|
+
# @return [::Gapic::Config::Method]
|
1182
|
+
#
|
1183
|
+
attr_reader :create_snapshot
|
1184
|
+
##
|
1185
|
+
# RPC-specific configuration for `delete`
|
1186
|
+
# @return [::Gapic::Config::Method]
|
1187
|
+
#
|
1188
|
+
attr_reader :delete
|
1189
|
+
##
|
1190
|
+
# RPC-specific configuration for `get`
|
1191
|
+
# @return [::Gapic::Config::Method]
|
1192
|
+
#
|
1193
|
+
attr_reader :get
|
1194
|
+
##
|
1195
|
+
# RPC-specific configuration for `get_iam_policy`
|
1196
|
+
# @return [::Gapic::Config::Method]
|
1197
|
+
#
|
1198
|
+
attr_reader :get_iam_policy
|
1199
|
+
##
|
1200
|
+
# RPC-specific configuration for `insert`
|
1201
|
+
# @return [::Gapic::Config::Method]
|
1202
|
+
#
|
1203
|
+
attr_reader :insert
|
1204
|
+
##
|
1205
|
+
# RPC-specific configuration for `list`
|
1206
|
+
# @return [::Gapic::Config::Method]
|
1207
|
+
#
|
1208
|
+
attr_reader :list
|
1209
|
+
##
|
1210
|
+
# RPC-specific configuration for `remove_resource_policies`
|
1211
|
+
# @return [::Gapic::Config::Method]
|
1212
|
+
#
|
1213
|
+
attr_reader :remove_resource_policies
|
1214
|
+
##
|
1215
|
+
# RPC-specific configuration for `resize`
|
1216
|
+
# @return [::Gapic::Config::Method]
|
1217
|
+
#
|
1218
|
+
attr_reader :resize
|
1219
|
+
##
|
1220
|
+
# RPC-specific configuration for `set_iam_policy`
|
1221
|
+
# @return [::Gapic::Config::Method]
|
1222
|
+
#
|
1223
|
+
attr_reader :set_iam_policy
|
1224
|
+
##
|
1225
|
+
# RPC-specific configuration for `set_labels`
|
1226
|
+
# @return [::Gapic::Config::Method]
|
1227
|
+
#
|
1228
|
+
attr_reader :set_labels
|
1229
|
+
##
|
1230
|
+
# RPC-specific configuration for `test_iam_permissions`
|
1231
|
+
# @return [::Gapic::Config::Method]
|
1232
|
+
#
|
1233
|
+
attr_reader :test_iam_permissions
|
1234
|
+
|
1235
|
+
# @private
|
1236
|
+
def initialize parent_rpcs = nil
|
1237
|
+
add_resource_policies_config = parent_rpcs.add_resource_policies if parent_rpcs.respond_to? :add_resource_policies
|
1238
|
+
@add_resource_policies = ::Gapic::Config::Method.new add_resource_policies_config
|
1239
|
+
aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
|
1240
|
+
@aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
|
1241
|
+
create_snapshot_config = parent_rpcs.create_snapshot if parent_rpcs.respond_to? :create_snapshot
|
1242
|
+
@create_snapshot = ::Gapic::Config::Method.new create_snapshot_config
|
1243
|
+
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
1244
|
+
@delete = ::Gapic::Config::Method.new delete_config
|
1245
|
+
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|
1246
|
+
@get = ::Gapic::Config::Method.new get_config
|
1247
|
+
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
1248
|
+
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
1249
|
+
insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
|
1250
|
+
@insert = ::Gapic::Config::Method.new insert_config
|
1251
|
+
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
1252
|
+
@list = ::Gapic::Config::Method.new list_config
|
1253
|
+
remove_resource_policies_config = parent_rpcs.remove_resource_policies if parent_rpcs.respond_to? :remove_resource_policies
|
1254
|
+
@remove_resource_policies = ::Gapic::Config::Method.new remove_resource_policies_config
|
1255
|
+
resize_config = parent_rpcs.resize if parent_rpcs.respond_to? :resize
|
1256
|
+
@resize = ::Gapic::Config::Method.new resize_config
|
1257
|
+
set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
|
1258
|
+
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
1259
|
+
set_labels_config = parent_rpcs.set_labels if parent_rpcs.respond_to? :set_labels
|
1260
|
+
@set_labels = ::Gapic::Config::Method.new set_labels_config
|
1261
|
+
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
1262
|
+
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
1263
|
+
|
1264
|
+
yield self if block_given?
|
1265
|
+
end
|
1266
|
+
end
|
1175
1267
|
end
|
1176
1268
|
end
|
1177
1269
|
end
|