google-cloud-compute-v1 0.2.0 → 1.0.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 +19 -37
- data/README.md +4 -30
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +127 -90
- 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 +172 -130
- 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 +218 -172
- 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 +236 -185
- 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 +308 -253
- 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 +127 -90
- 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 +345 -272
- 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 +184 -129
- 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/rest/client.rb +476 -343
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +869 -0
- data/lib/google/cloud/compute/v1/firewall_policies/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +191 -145
- 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 +296 -171
- 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 +145 -103
- 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 +265 -144
- 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 +215 -172
- 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 +165 -118
- 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 +118 -76
- 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/rest/client.rb +175 -124
- 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 +0 -2
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +218 -172
- 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 +291 -209
- 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 +526 -477
- 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 +271 -233
- 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 +202 -139
- 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 +1186 -797
- 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 +195 -151
- 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 +100 -63
- 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 +189 -135
- 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 +93 -50
- 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 +209 -146
- 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 +127 -90
- 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 +261 -213
- 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 +363 -234
- 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 +345 -277
- 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 +229 -166
- 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 +127 -90
- 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 +213 -163
- 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 +351 -288
- 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/rest/client.rb +175 -124
- 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 +0 -2
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +203 -151
- 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 +0 -2
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +191 -145
- 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 +212 -160
- 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 +151 -112
- 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 +100 -63
- 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 +318 -245
- 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 +168 -124
- 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 +191 -145
- 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 +498 -445
- 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 +148 -113
- 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/rest/client.rb +76 -45
- data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +92 -0
- data/lib/google/cloud/compute/v1/region_instances/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +145 -103
- 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 +145 -103
- 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 +137 -90
- 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 +145 -103
- 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 +168 -124
- 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 +191 -145
- 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 +205 -137
- 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 +100 -63
- 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 +252 -187
- 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 +229 -166
- 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 +284 -222
- 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 +145 -103
- 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 +277 -205
- 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 +201 -135
- 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 +172 -130
- 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 +192 -149
- 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 +325 -256
- 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 +168 -124
- 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 +219 -173
- 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 +340 -213
- 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 +172 -130
- 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 +305 -247
- 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 +237 -187
- 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 +191 -145
- 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 +172 -130
- 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 +260 -208
- 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 +234 -174
- 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 +172 -130
- 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 +137 -90
- 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 +100 -63
- 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/api/resource.rb +10 -71
- data/proto_docs/google/cloud/compute/v1/compute.rb +18964 -19481
- data/proto_docs/google/cloud/extended_operations.rb +51 -0
- metadata +110 -9
@@ -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/target_http_proxies/rest/service_stub"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -31,8 +32,6 @@ module Google
|
|
31
32
|
# The TargetHttpProxies API.
|
32
33
|
#
|
33
34
|
class Client
|
34
|
-
include GrpcTranscoding
|
35
|
-
|
36
35
|
# @private
|
37
36
|
attr_reader :target_http_proxies_stub
|
38
37
|
|
@@ -42,13 +41,12 @@ module Google
|
|
42
41
|
# See {::Google::Cloud::Compute::V1::TargetHttpProxies::Rest::Client::Configuration}
|
43
42
|
# for a description of the configuration fields.
|
44
43
|
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
# To modify the configuration for all TargetHttpProxies clients:
|
44
|
+
# @example
|
48
45
|
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
46
|
+
# # Modify the configuration for all TargetHttpProxies clients
|
47
|
+
# ::Google::Cloud::Compute::V1::TargetHttpProxies::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,29 @@ module Google
|
|
66
64
|
end
|
67
65
|
default_config = Client::Configuration.new parent_config
|
68
66
|
|
67
|
+
default_config.rpcs.aggregated_list.timeout = 600.0
|
68
|
+
default_config.rpcs.aggregated_list.retry_policy = {
|
69
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
70
|
+
}
|
71
|
+
|
72
|
+
default_config.rpcs.delete.timeout = 600.0
|
73
|
+
|
74
|
+
default_config.rpcs.get.timeout = 600.0
|
75
|
+
default_config.rpcs.get.retry_policy = {
|
76
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
77
|
+
}
|
78
|
+
|
79
|
+
default_config.rpcs.insert.timeout = 600.0
|
80
|
+
|
81
|
+
default_config.rpcs.list.timeout = 600.0
|
82
|
+
default_config.rpcs.list.retry_policy = {
|
83
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
84
|
+
}
|
85
|
+
|
86
|
+
default_config.rpcs.patch.timeout = 600.0
|
87
|
+
|
88
|
+
default_config.rpcs.set_url_map.timeout = 600.0
|
89
|
+
|
69
90
|
default_config
|
70
91
|
end
|
71
92
|
yield @configure if block_given?
|
@@ -95,28 +116,20 @@ module Google
|
|
95
116
|
##
|
96
117
|
# Create a new TargetHttpProxies REST client object.
|
97
118
|
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
# To create a new TargetHttpProxies REST client with the default
|
101
|
-
# configuration:
|
119
|
+
# @example
|
102
120
|
#
|
103
|
-
#
|
121
|
+
# # Create a client using the default configuration
|
122
|
+
# client = ::Google::Cloud::Compute::V1::TargetHttpProxies::Rest::Client.new
|
104
123
|
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
# config.timeout = 10.0
|
110
|
-
# end
|
124
|
+
# # Create a client using a custom configuration
|
125
|
+
# client = ::Google::Cloud::Compute::V1::TargetHttpProxies::Rest::Client.new do |config|
|
126
|
+
# config.timeout = 10.0
|
127
|
+
# end
|
111
128
|
#
|
112
129
|
# @yield [config] Configure the TargetHttpProxies client.
|
113
130
|
# @yieldparam config [Client::Configuration]
|
114
131
|
#
|
115
132
|
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
133
|
# Create the configuration object
|
121
134
|
@config = Configuration.new Client.configure
|
122
135
|
|
@@ -126,11 +139,11 @@ module Google
|
|
126
139
|
# Create credentials
|
127
140
|
credentials = @config.credentials
|
128
141
|
credentials ||= Credentials.default scope: @config.scope
|
129
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
142
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
130
143
|
credentials = Credentials.new credentials, scope: @config.scope
|
131
144
|
end
|
132
145
|
|
133
|
-
@
|
146
|
+
@target_http_proxies_stub = ::Google::Cloud::Compute::V1::TargetHttpProxies::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
134
147
|
end
|
135
148
|
|
136
149
|
# Service calls
|
@@ -156,34 +169,24 @@ module Google
|
|
156
169
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
157
170
|
#
|
158
171
|
# @param filter [::String]
|
159
|
-
# 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 `<`.
|
160
|
-
#
|
161
|
-
# For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
|
162
|
-
#
|
163
|
-
# 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.
|
164
|
-
#
|
165
|
-
# 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) ```
|
172
|
+
# 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) ```
|
166
173
|
# @param include_all_scopes [::Boolean]
|
167
174
|
# 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.
|
168
175
|
# @param max_results [::Integer]
|
169
176
|
# 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`)
|
170
177
|
# @param order_by [::String]
|
171
|
-
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
|
172
|
-
#
|
173
|
-
# 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.
|
174
|
-
#
|
175
|
-
# Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
178
|
+
# 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.
|
176
179
|
# @param page_token [::String]
|
177
180
|
# Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
|
178
181
|
# @param project [::String]
|
179
182
|
# Name of the project scoping this request.
|
180
183
|
# @param return_partial_success [::Boolean]
|
181
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
182
|
-
# @yield [result,
|
183
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
184
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
185
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
186
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::TargetHttpProxiesScopedList>]
|
184
187
|
# @yieldparam response [::Faraday::Response]
|
185
188
|
#
|
186
|
-
# @return [::Google::Cloud::Compute::V1::
|
189
|
+
# @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::TargetHttpProxiesScopedList>]
|
187
190
|
#
|
188
191
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
189
192
|
def aggregated_list request, options = nil
|
@@ -195,7 +198,7 @@ module Google
|
|
195
198
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
196
199
|
|
197
200
|
# Customize the options with defaults
|
198
|
-
call_metadata =
|
201
|
+
call_metadata = @config.rpcs.aggregated_list.metadata.to_h
|
199
202
|
|
200
203
|
# Set x-goog-api-client header
|
201
204
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -203,19 +206,17 @@ module Google
|
|
203
206
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
204
207
|
transports_version_send: [:rest]
|
205
208
|
|
206
|
-
options.apply_defaults timeout: @config.timeout,
|
209
|
+
options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
|
207
210
|
metadata: call_metadata
|
208
211
|
|
209
|
-
|
210
|
-
|
211
|
-
uri: uri,
|
212
|
-
params: query_string_params,
|
213
|
-
options: options
|
214
|
-
)
|
215
|
-
result = ::Google::Cloud::Compute::V1::TargetHttpProxyAggregatedList.decode_json response.body, ignore_unknown_fields: true
|
212
|
+
options.apply_defaults timeout: @config.timeout,
|
213
|
+
metadata: @config.metadata
|
216
214
|
|
217
|
-
|
218
|
-
|
215
|
+
@target_http_proxies_stub.aggregated_list request, options do |result, response|
|
216
|
+
result = ::Gapic::Rest::PagedEnumerable.new @target_http_proxies_stub, :aggregated_list, "items", request, result, options
|
217
|
+
yield result, response if block_given?
|
218
|
+
return result
|
219
|
+
end
|
219
220
|
rescue ::Faraday::Error => e
|
220
221
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
221
222
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -244,18 +245,14 @@ module Google
|
|
244
245
|
# @param project [::String]
|
245
246
|
# Project ID for this request.
|
246
247
|
# @param request_id [::String]
|
247
|
-
# 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.
|
248
|
-
#
|
249
|
-
# 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.
|
250
|
-
#
|
251
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
248
|
+
# 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).
|
252
249
|
# @param target_http_proxy [::String]
|
253
250
|
# Name of the TargetHttpProxy resource to delete.
|
254
|
-
# @yield [result,
|
255
|
-
# @yieldparam result [::
|
251
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
252
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
256
253
|
# @yieldparam response [::Faraday::Response]
|
257
254
|
#
|
258
|
-
# @return [::
|
255
|
+
# @return [::Gapic::Rest::BaseOperation]
|
259
256
|
#
|
260
257
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
261
258
|
def delete request, options = nil
|
@@ -267,7 +264,7 @@ module Google
|
|
267
264
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
268
265
|
|
269
266
|
# Customize the options with defaults
|
270
|
-
call_metadata =
|
267
|
+
call_metadata = @config.rpcs.delete.metadata.to_h
|
271
268
|
|
272
269
|
# Set x-goog-api-client header
|
273
270
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -275,19 +272,17 @@ module Google
|
|
275
272
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
276
273
|
transports_version_send: [:rest]
|
277
274
|
|
278
|
-
options.apply_defaults timeout: @config.timeout,
|
275
|
+
options.apply_defaults timeout: @config.rpcs.delete.timeout,
|
279
276
|
metadata: call_metadata
|
280
277
|
|
281
|
-
|
282
|
-
|
283
|
-
uri: uri,
|
284
|
-
params: query_string_params,
|
285
|
-
options: options
|
286
|
-
)
|
287
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
278
|
+
options.apply_defaults timeout: @config.timeout,
|
279
|
+
metadata: @config.metadata
|
288
280
|
|
289
|
-
|
290
|
-
|
281
|
+
@target_http_proxies_stub.delete request, options do |result, response|
|
282
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
283
|
+
yield result, response if block_given?
|
284
|
+
return result
|
285
|
+
end
|
291
286
|
rescue ::Faraday::Error => e
|
292
287
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
293
288
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -317,7 +312,7 @@ module Google
|
|
317
312
|
# Project ID for this request.
|
318
313
|
# @param target_http_proxy [::String]
|
319
314
|
# Name of the TargetHttpProxy resource to return.
|
320
|
-
# @yield [result,
|
315
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
321
316
|
# @yieldparam result [::Google::Cloud::Compute::V1::TargetHttpProxy]
|
322
317
|
# @yieldparam response [::Faraday::Response]
|
323
318
|
#
|
@@ -333,7 +328,7 @@ module Google
|
|
333
328
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
334
329
|
|
335
330
|
# Customize the options with defaults
|
336
|
-
call_metadata =
|
331
|
+
call_metadata = @config.rpcs.get.metadata.to_h
|
337
332
|
|
338
333
|
# Set x-goog-api-client header
|
339
334
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -341,18 +336,16 @@ module Google
|
|
341
336
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
342
337
|
transports_version_send: [:rest]
|
343
338
|
|
344
|
-
options.apply_defaults timeout: @config.timeout,
|
339
|
+
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
345
340
|
metadata: call_metadata
|
346
341
|
|
347
|
-
|
348
|
-
|
349
|
-
uri: uri,
|
350
|
-
options: options
|
351
|
-
)
|
352
|
-
result = ::Google::Cloud::Compute::V1::TargetHttpProxy.decode_json response.body, ignore_unknown_fields: true
|
342
|
+
options.apply_defaults timeout: @config.timeout,
|
343
|
+
metadata: @config.metadata
|
353
344
|
|
354
|
-
|
355
|
-
|
345
|
+
@target_http_proxies_stub.get request, options do |result, response|
|
346
|
+
yield result, response if block_given?
|
347
|
+
return result
|
348
|
+
end
|
356
349
|
rescue ::Faraday::Error => e
|
357
350
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
358
351
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -381,18 +374,14 @@ module Google
|
|
381
374
|
# @param project [::String]
|
382
375
|
# Project ID for this request.
|
383
376
|
# @param request_id [::String]
|
384
|
-
# 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.
|
385
|
-
#
|
386
|
-
# 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.
|
387
|
-
#
|
388
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
377
|
+
# 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).
|
389
378
|
# @param target_http_proxy_resource [::Google::Cloud::Compute::V1::TargetHttpProxy, ::Hash]
|
390
379
|
# The body resource for this request
|
391
|
-
# @yield [result,
|
392
|
-
# @yieldparam result [::
|
380
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
381
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
393
382
|
# @yieldparam response [::Faraday::Response]
|
394
383
|
#
|
395
|
-
# @return [::
|
384
|
+
# @return [::Gapic::Rest::BaseOperation]
|
396
385
|
#
|
397
386
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
398
387
|
def insert request, options = nil
|
@@ -404,7 +393,7 @@ module Google
|
|
404
393
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
405
394
|
|
406
395
|
# Customize the options with defaults
|
407
|
-
call_metadata =
|
396
|
+
call_metadata = @config.rpcs.insert.metadata.to_h
|
408
397
|
|
409
398
|
# Set x-goog-api-client header
|
410
399
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -412,20 +401,17 @@ module Google
|
|
412
401
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
413
402
|
transports_version_send: [:rest]
|
414
403
|
|
415
|
-
options.apply_defaults timeout: @config.timeout,
|
404
|
+
options.apply_defaults timeout: @config.rpcs.insert.timeout,
|
416
405
|
metadata: call_metadata
|
417
406
|
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
yield result, response if block_given?
|
428
|
-
result
|
407
|
+
options.apply_defaults timeout: @config.timeout,
|
408
|
+
metadata: @config.metadata
|
409
|
+
|
410
|
+
@target_http_proxies_stub.insert request, options do |result, response|
|
411
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
412
|
+
yield result, response if block_given?
|
413
|
+
return result
|
414
|
+
end
|
429
415
|
rescue ::Faraday::Error => e
|
430
416
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
431
417
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -452,32 +438,22 @@ module Google
|
|
452
438
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
453
439
|
#
|
454
440
|
# @param filter [::String]
|
455
|
-
# 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 `<`.
|
456
|
-
#
|
457
|
-
# For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
|
458
|
-
#
|
459
|
-
# 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.
|
460
|
-
#
|
461
|
-
# 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) ```
|
441
|
+
# 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) ```
|
462
442
|
# @param max_results [::Integer]
|
463
443
|
# 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`)
|
464
444
|
# @param order_by [::String]
|
465
|
-
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
|
466
|
-
#
|
467
|
-
# 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.
|
468
|
-
#
|
469
|
-
# Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
445
|
+
# 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.
|
470
446
|
# @param page_token [::String]
|
471
447
|
# Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
|
472
448
|
# @param project [::String]
|
473
449
|
# Project ID for this request.
|
474
450
|
# @param return_partial_success [::Boolean]
|
475
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
476
|
-
# @yield [result,
|
477
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
451
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
452
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
453
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::TargetHttpProxy>]
|
478
454
|
# @yieldparam response [::Faraday::Response]
|
479
455
|
#
|
480
|
-
# @return [::Google::Cloud::Compute::V1::
|
456
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::TargetHttpProxy>]
|
481
457
|
#
|
482
458
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
483
459
|
def list request, options = nil
|
@@ -489,7 +465,7 @@ module Google
|
|
489
465
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
490
466
|
|
491
467
|
# Customize the options with defaults
|
492
|
-
call_metadata =
|
468
|
+
call_metadata = @config.rpcs.list.metadata.to_h
|
493
469
|
|
494
470
|
# Set x-goog-api-client header
|
495
471
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -497,26 +473,24 @@ module Google
|
|
497
473
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
498
474
|
transports_version_send: [:rest]
|
499
475
|
|
500
|
-
options.apply_defaults timeout: @config.timeout,
|
476
|
+
options.apply_defaults timeout: @config.rpcs.list.timeout,
|
501
477
|
metadata: call_metadata
|
502
478
|
|
503
|
-
|
504
|
-
|
505
|
-
uri: uri,
|
506
|
-
params: query_string_params,
|
507
|
-
options: options
|
508
|
-
)
|
509
|
-
result = ::Google::Cloud::Compute::V1::TargetHttpProxyList.decode_json response.body, ignore_unknown_fields: true
|
479
|
+
options.apply_defaults timeout: @config.timeout,
|
480
|
+
metadata: @config.metadata
|
510
481
|
|
511
|
-
|
512
|
-
|
482
|
+
@target_http_proxies_stub.list request, options do |result, response|
|
483
|
+
result = ::Gapic::Rest::PagedEnumerable.new @target_http_proxies_stub, :list, "items", request, result, options
|
484
|
+
yield result, response if block_given?
|
485
|
+
return result
|
486
|
+
end
|
513
487
|
rescue ::Faraday::Error => e
|
514
488
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
515
489
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
516
490
|
end
|
517
491
|
|
518
492
|
##
|
519
|
-
# Patches the specified TargetHttpProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
|
493
|
+
# Patches the specified TargetHttpProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
|
520
494
|
#
|
521
495
|
# @overload patch(request, options = nil)
|
522
496
|
# Pass arguments to `patch` via a request object, either of type
|
@@ -538,20 +512,16 @@ module Google
|
|
538
512
|
# @param project [::String]
|
539
513
|
# Project ID for this request.
|
540
514
|
# @param request_id [::String]
|
541
|
-
# 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.
|
542
|
-
#
|
543
|
-
# 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.
|
544
|
-
#
|
545
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
515
|
+
# 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). end_interface: MixerMutationRequestBuilder
|
546
516
|
# @param target_http_proxy [::String]
|
547
517
|
# Name of the TargetHttpProxy resource to patch.
|
548
518
|
# @param target_http_proxy_resource [::Google::Cloud::Compute::V1::TargetHttpProxy, ::Hash]
|
549
519
|
# The body resource for this request
|
550
|
-
# @yield [result,
|
551
|
-
# @yieldparam result [::
|
520
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
521
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
552
522
|
# @yieldparam response [::Faraday::Response]
|
553
523
|
#
|
554
|
-
# @return [::
|
524
|
+
# @return [::Gapic::Rest::BaseOperation]
|
555
525
|
#
|
556
526
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
557
527
|
def patch request, options = nil
|
@@ -563,7 +533,7 @@ module Google
|
|
563
533
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
564
534
|
|
565
535
|
# Customize the options with defaults
|
566
|
-
call_metadata =
|
536
|
+
call_metadata = @config.rpcs.patch.metadata.to_h
|
567
537
|
|
568
538
|
# Set x-goog-api-client header
|
569
539
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -571,20 +541,17 @@ module Google
|
|
571
541
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
572
542
|
transports_version_send: [:rest]
|
573
543
|
|
574
|
-
options.apply_defaults timeout: @config.timeout,
|
544
|
+
options.apply_defaults timeout: @config.rpcs.patch.timeout,
|
575
545
|
metadata: call_metadata
|
576
546
|
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
yield result, response if block_given?
|
587
|
-
result
|
547
|
+
options.apply_defaults timeout: @config.timeout,
|
548
|
+
metadata: @config.metadata
|
549
|
+
|
550
|
+
@target_http_proxies_stub.patch request, options do |result, response|
|
551
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
552
|
+
yield result, response if block_given?
|
553
|
+
return result
|
554
|
+
end
|
588
555
|
rescue ::Faraday::Error => e
|
589
556
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
590
557
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -613,20 +580,16 @@ module Google
|
|
613
580
|
# @param project [::String]
|
614
581
|
# Project ID for this request.
|
615
582
|
# @param request_id [::String]
|
616
|
-
# 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.
|
617
|
-
#
|
618
|
-
# 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.
|
619
|
-
#
|
620
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
583
|
+
# 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).
|
621
584
|
# @param target_http_proxy [::String]
|
622
585
|
# Name of the TargetHttpProxy to set a URL map for.
|
623
586
|
# @param url_map_reference_resource [::Google::Cloud::Compute::V1::UrlMapReference, ::Hash]
|
624
587
|
# The body resource for this request
|
625
|
-
# @yield [result,
|
626
|
-
# @yieldparam result [::
|
588
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
589
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
627
590
|
# @yieldparam response [::Faraday::Response]
|
628
591
|
#
|
629
|
-
# @return [::
|
592
|
+
# @return [::Gapic::Rest::BaseOperation]
|
630
593
|
#
|
631
594
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
632
595
|
def set_url_map request, options = nil
|
@@ -638,7 +601,7 @@ module Google
|
|
638
601
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
639
602
|
|
640
603
|
# Customize the options with defaults
|
641
|
-
call_metadata =
|
604
|
+
call_metadata = @config.rpcs.set_url_map.metadata.to_h
|
642
605
|
|
643
606
|
# Set x-goog-api-client header
|
644
607
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -646,20 +609,17 @@ module Google
|
|
646
609
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
647
610
|
transports_version_send: [:rest]
|
648
611
|
|
649
|
-
options.apply_defaults timeout: @config.timeout,
|
612
|
+
options.apply_defaults timeout: @config.rpcs.set_url_map.timeout,
|
650
613
|
metadata: call_metadata
|
651
614
|
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
yield result, response if block_given?
|
662
|
-
result
|
615
|
+
options.apply_defaults timeout: @config.timeout,
|
616
|
+
metadata: @config.metadata
|
617
|
+
|
618
|
+
@target_http_proxies_stub.set_url_map request, options do |result, response|
|
619
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
620
|
+
yield result, response if block_given?
|
621
|
+
return result
|
622
|
+
end
|
663
623
|
rescue ::Faraday::Error => e
|
664
624
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
665
625
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -714,6 +674,9 @@ module Google
|
|
714
674
|
# @!attribute [rw] timeout
|
715
675
|
# The call timeout in seconds.
|
716
676
|
# @return [::Numeric]
|
677
|
+
# @!attribute [rw] metadata
|
678
|
+
# Additional REST headers to be sent with the call.
|
679
|
+
# @return [::Hash{::Symbol=>::String}]
|
717
680
|
#
|
718
681
|
class Configuration
|
719
682
|
extend ::Gapic::Config
|
@@ -727,6 +690,7 @@ module Google
|
|
727
690
|
config_attr :lib_name, nil, ::String, nil
|
728
691
|
config_attr :lib_version, nil, ::String, nil
|
729
692
|
config_attr :timeout, nil, ::Numeric, nil
|
693
|
+
config_attr :metadata, nil, ::Hash, nil
|
730
694
|
|
731
695
|
# @private
|
732
696
|
def initialize parent_config = nil
|
@@ -734,6 +698,88 @@ module Google
|
|
734
698
|
|
735
699
|
yield self if block_given?
|
736
700
|
end
|
701
|
+
|
702
|
+
##
|
703
|
+
# Configurations for individual RPCs
|
704
|
+
# @return [Rpcs]
|
705
|
+
#
|
706
|
+
def rpcs
|
707
|
+
@rpcs ||= begin
|
708
|
+
parent_rpcs = nil
|
709
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
710
|
+
Rpcs.new parent_rpcs
|
711
|
+
end
|
712
|
+
end
|
713
|
+
|
714
|
+
##
|
715
|
+
# Configuration RPC class for the TargetHttpProxies API.
|
716
|
+
#
|
717
|
+
# Includes fields providing the configuration for each RPC in this service.
|
718
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
719
|
+
# the following configuration fields:
|
720
|
+
#
|
721
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
722
|
+
#
|
723
|
+
# there is one other field (`retry_policy`) that can be set
|
724
|
+
# but is currently not supported for REST Gapic libraries.
|
725
|
+
#
|
726
|
+
class Rpcs
|
727
|
+
##
|
728
|
+
# RPC-specific configuration for `aggregated_list`
|
729
|
+
# @return [::Gapic::Config::Method]
|
730
|
+
#
|
731
|
+
attr_reader :aggregated_list
|
732
|
+
##
|
733
|
+
# RPC-specific configuration for `delete`
|
734
|
+
# @return [::Gapic::Config::Method]
|
735
|
+
#
|
736
|
+
attr_reader :delete
|
737
|
+
##
|
738
|
+
# RPC-specific configuration for `get`
|
739
|
+
# @return [::Gapic::Config::Method]
|
740
|
+
#
|
741
|
+
attr_reader :get
|
742
|
+
##
|
743
|
+
# RPC-specific configuration for `insert`
|
744
|
+
# @return [::Gapic::Config::Method]
|
745
|
+
#
|
746
|
+
attr_reader :insert
|
747
|
+
##
|
748
|
+
# RPC-specific configuration for `list`
|
749
|
+
# @return [::Gapic::Config::Method]
|
750
|
+
#
|
751
|
+
attr_reader :list
|
752
|
+
##
|
753
|
+
# RPC-specific configuration for `patch`
|
754
|
+
# @return [::Gapic::Config::Method]
|
755
|
+
#
|
756
|
+
attr_reader :patch
|
757
|
+
##
|
758
|
+
# RPC-specific configuration for `set_url_map`
|
759
|
+
# @return [::Gapic::Config::Method]
|
760
|
+
#
|
761
|
+
attr_reader :set_url_map
|
762
|
+
|
763
|
+
# @private
|
764
|
+
def initialize parent_rpcs = nil
|
765
|
+
aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
|
766
|
+
@aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
|
767
|
+
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
768
|
+
@delete = ::Gapic::Config::Method.new delete_config
|
769
|
+
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|
770
|
+
@get = ::Gapic::Config::Method.new get_config
|
771
|
+
insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
|
772
|
+
@insert = ::Gapic::Config::Method.new insert_config
|
773
|
+
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
774
|
+
@list = ::Gapic::Config::Method.new list_config
|
775
|
+
patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
|
776
|
+
@patch = ::Gapic::Config::Method.new patch_config
|
777
|
+
set_url_map_config = parent_rpcs.set_url_map if parent_rpcs.respond_to? :set_url_map
|
778
|
+
@set_url_map = ::Gapic::Config::Method.new set_url_map_config
|
779
|
+
|
780
|
+
yield self if block_given?
|
781
|
+
end
|
782
|
+
end
|
737
783
|
end
|
738
784
|
end
|
739
785
|
end
|