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/url_maps/rest/service_stub"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -31,8 +32,6 @@ module Google
|
|
31
32
|
# The UrlMaps API.
|
32
33
|
#
|
33
34
|
class Client
|
34
|
-
include GrpcTranscoding
|
35
|
-
|
36
35
|
# @private
|
37
36
|
attr_reader :url_maps_stub
|
38
37
|
|
@@ -42,13 +41,12 @@ module Google
|
|
42
41
|
# See {::Google::Cloud::Compute::V1::UrlMaps::Rest::Client::Configuration}
|
43
42
|
# for a description of the configuration fields.
|
44
43
|
#
|
45
|
-
#
|
44
|
+
# @example
|
46
45
|
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
# end
|
46
|
+
# # Modify the configuration for all UrlMaps clients
|
47
|
+
# ::Google::Cloud::Compute::V1::UrlMaps::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,33 @@ 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.invalidate_cache.timeout = 600.0
|
82
|
+
|
83
|
+
default_config.rpcs.list.timeout = 600.0
|
84
|
+
default_config.rpcs.list.retry_policy = {
|
85
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
86
|
+
}
|
87
|
+
|
88
|
+
default_config.rpcs.patch.timeout = 600.0
|
89
|
+
|
90
|
+
default_config.rpcs.update.timeout = 600.0
|
91
|
+
|
92
|
+
default_config.rpcs.validate.timeout = 600.0
|
93
|
+
|
69
94
|
default_config
|
70
95
|
end
|
71
96
|
yield @configure if block_given?
|
@@ -95,28 +120,20 @@ module Google
|
|
95
120
|
##
|
96
121
|
# Create a new UrlMaps REST client object.
|
97
122
|
#
|
98
|
-
#
|
123
|
+
# @example
|
99
124
|
#
|
100
|
-
#
|
101
|
-
#
|
125
|
+
# # Create a client using the default configuration
|
126
|
+
# client = ::Google::Cloud::Compute::V1::UrlMaps::Rest::Client.new
|
102
127
|
#
|
103
|
-
#
|
104
|
-
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
# client = ::Google::Cloud::Compute::V1::UrlMaps::Rest::Client.new do |config|
|
109
|
-
# config.timeout = 10.0
|
110
|
-
# end
|
128
|
+
# # Create a client using a custom configuration
|
129
|
+
# client = ::Google::Cloud::Compute::V1::UrlMaps::Rest::Client.new do |config|
|
130
|
+
# config.timeout = 10.0
|
131
|
+
# end
|
111
132
|
#
|
112
133
|
# @yield [config] Configure the UrlMaps client.
|
113
134
|
# @yieldparam config [Client::Configuration]
|
114
135
|
#
|
115
136
|
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
137
|
# Create the configuration object
|
121
138
|
@config = Configuration.new Client.configure
|
122
139
|
|
@@ -126,11 +143,11 @@ module Google
|
|
126
143
|
# Create credentials
|
127
144
|
credentials = @config.credentials
|
128
145
|
credentials ||= Credentials.default scope: @config.scope
|
129
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
146
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
130
147
|
credentials = Credentials.new credentials, scope: @config.scope
|
131
148
|
end
|
132
149
|
|
133
|
-
@
|
150
|
+
@url_maps_stub = ::Google::Cloud::Compute::V1::UrlMaps::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
134
151
|
end
|
135
152
|
|
136
153
|
# Service calls
|
@@ -156,34 +173,24 @@ module Google
|
|
156
173
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
157
174
|
#
|
158
175
|
# @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) ```
|
176
|
+
# 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
177
|
# @param include_all_scopes [::Boolean]
|
167
178
|
# 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
179
|
# @param max_results [::Integer]
|
169
180
|
# 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
181
|
# @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.
|
182
|
+
# 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
183
|
# @param page_token [::String]
|
177
184
|
# 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
185
|
# @param project [::String]
|
179
186
|
# Name of the project scoping this request.
|
180
187
|
# @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::
|
188
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
189
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
190
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::UrlMapsScopedList>]
|
184
191
|
# @yieldparam response [::Faraday::Response]
|
185
192
|
#
|
186
|
-
# @return [::Google::Cloud::Compute::V1::
|
193
|
+
# @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::UrlMapsScopedList>]
|
187
194
|
#
|
188
195
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
189
196
|
def aggregated_list request, options = nil
|
@@ -195,7 +202,7 @@ module Google
|
|
195
202
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
196
203
|
|
197
204
|
# Customize the options with defaults
|
198
|
-
call_metadata =
|
205
|
+
call_metadata = @config.rpcs.aggregated_list.metadata.to_h
|
199
206
|
|
200
207
|
# Set x-goog-api-client header
|
201
208
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -203,19 +210,17 @@ module Google
|
|
203
210
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
204
211
|
transports_version_send: [:rest]
|
205
212
|
|
206
|
-
options.apply_defaults timeout: @config.timeout,
|
213
|
+
options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
|
207
214
|
metadata: call_metadata
|
208
215
|
|
209
|
-
|
210
|
-
|
211
|
-
uri: uri,
|
212
|
-
params: query_string_params,
|
213
|
-
options: options
|
214
|
-
)
|
215
|
-
result = ::Google::Cloud::Compute::V1::UrlMapsAggregatedList.decode_json response.body, ignore_unknown_fields: true
|
216
|
+
options.apply_defaults timeout: @config.timeout,
|
217
|
+
metadata: @config.metadata
|
216
218
|
|
217
|
-
|
218
|
-
|
219
|
+
@url_maps_stub.aggregated_list request, options do |result, response|
|
220
|
+
result = ::Gapic::Rest::PagedEnumerable.new @url_maps_stub, :aggregated_list, "items", request, result, options
|
221
|
+
yield result, response if block_given?
|
222
|
+
return result
|
223
|
+
end
|
219
224
|
rescue ::Faraday::Error => e
|
220
225
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
221
226
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -244,18 +249,14 @@ module Google
|
|
244
249
|
# @param project [::String]
|
245
250
|
# Project ID for this request.
|
246
251
|
# @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).
|
252
|
+
# 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
253
|
# @param url_map [::String]
|
253
254
|
# Name of the UrlMap resource to delete.
|
254
|
-
# @yield [result,
|
255
|
-
# @yieldparam result [::
|
255
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
256
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
256
257
|
# @yieldparam response [::Faraday::Response]
|
257
258
|
#
|
258
|
-
# @return [::
|
259
|
+
# @return [::Gapic::Rest::BaseOperation]
|
259
260
|
#
|
260
261
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
261
262
|
def delete request, options = nil
|
@@ -267,7 +268,7 @@ module Google
|
|
267
268
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
268
269
|
|
269
270
|
# Customize the options with defaults
|
270
|
-
call_metadata =
|
271
|
+
call_metadata = @config.rpcs.delete.metadata.to_h
|
271
272
|
|
272
273
|
# Set x-goog-api-client header
|
273
274
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -275,19 +276,17 @@ module Google
|
|
275
276
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
276
277
|
transports_version_send: [:rest]
|
277
278
|
|
278
|
-
options.apply_defaults timeout: @config.timeout,
|
279
|
+
options.apply_defaults timeout: @config.rpcs.delete.timeout,
|
279
280
|
metadata: call_metadata
|
280
281
|
|
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
|
282
|
+
options.apply_defaults timeout: @config.timeout,
|
283
|
+
metadata: @config.metadata
|
288
284
|
|
289
|
-
|
290
|
-
|
285
|
+
@url_maps_stub.delete request, options do |result, response|
|
286
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
287
|
+
yield result, response if block_given?
|
288
|
+
return result
|
289
|
+
end
|
291
290
|
rescue ::Faraday::Error => e
|
292
291
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
293
292
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -317,7 +316,7 @@ module Google
|
|
317
316
|
# Project ID for this request.
|
318
317
|
# @param url_map [::String]
|
319
318
|
# Name of the UrlMap resource to return.
|
320
|
-
# @yield [result,
|
319
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
321
320
|
# @yieldparam result [::Google::Cloud::Compute::V1::UrlMap]
|
322
321
|
# @yieldparam response [::Faraday::Response]
|
323
322
|
#
|
@@ -333,7 +332,7 @@ module Google
|
|
333
332
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
334
333
|
|
335
334
|
# Customize the options with defaults
|
336
|
-
call_metadata =
|
335
|
+
call_metadata = @config.rpcs.get.metadata.to_h
|
337
336
|
|
338
337
|
# Set x-goog-api-client header
|
339
338
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -341,18 +340,16 @@ module Google
|
|
341
340
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
342
341
|
transports_version_send: [:rest]
|
343
342
|
|
344
|
-
options.apply_defaults timeout: @config.timeout,
|
343
|
+
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
345
344
|
metadata: call_metadata
|
346
345
|
|
347
|
-
|
348
|
-
|
349
|
-
uri: uri,
|
350
|
-
options: options
|
351
|
-
)
|
352
|
-
result = ::Google::Cloud::Compute::V1::UrlMap.decode_json response.body, ignore_unknown_fields: true
|
346
|
+
options.apply_defaults timeout: @config.timeout,
|
347
|
+
metadata: @config.metadata
|
353
348
|
|
354
|
-
|
355
|
-
|
349
|
+
@url_maps_stub.get request, options do |result, response|
|
350
|
+
yield result, response if block_given?
|
351
|
+
return result
|
352
|
+
end
|
356
353
|
rescue ::Faraday::Error => e
|
357
354
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
358
355
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -381,18 +378,14 @@ module Google
|
|
381
378
|
# @param project [::String]
|
382
379
|
# Project ID for this request.
|
383
380
|
# @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).
|
381
|
+
# 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
382
|
# @param url_map_resource [::Google::Cloud::Compute::V1::UrlMap, ::Hash]
|
390
383
|
# The body resource for this request
|
391
|
-
# @yield [result,
|
392
|
-
# @yieldparam result [::
|
384
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
385
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
393
386
|
# @yieldparam response [::Faraday::Response]
|
394
387
|
#
|
395
|
-
# @return [::
|
388
|
+
# @return [::Gapic::Rest::BaseOperation]
|
396
389
|
#
|
397
390
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
398
391
|
def insert request, options = nil
|
@@ -404,7 +397,7 @@ module Google
|
|
404
397
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
405
398
|
|
406
399
|
# Customize the options with defaults
|
407
|
-
call_metadata =
|
400
|
+
call_metadata = @config.rpcs.insert.metadata.to_h
|
408
401
|
|
409
402
|
# Set x-goog-api-client header
|
410
403
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -412,29 +405,24 @@ module Google
|
|
412
405
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
413
406
|
transports_version_send: [:rest]
|
414
407
|
|
415
|
-
options.apply_defaults timeout: @config.timeout,
|
408
|
+
options.apply_defaults timeout: @config.rpcs.insert.timeout,
|
416
409
|
metadata: call_metadata
|
417
410
|
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
yield result, response if block_given?
|
428
|
-
result
|
411
|
+
options.apply_defaults timeout: @config.timeout,
|
412
|
+
metadata: @config.metadata
|
413
|
+
|
414
|
+
@url_maps_stub.insert request, options do |result, response|
|
415
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
416
|
+
yield result, response if block_given?
|
417
|
+
return result
|
418
|
+
end
|
429
419
|
rescue ::Faraday::Error => e
|
430
420
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
431
421
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
432
422
|
end
|
433
423
|
|
434
424
|
##
|
435
|
-
# Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.
|
436
|
-
#
|
437
|
-
# For more information, see [Invalidating cached content](/cdn/docs/invalidating-cached-content).
|
425
|
+
# Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap. For more information, see [Invalidating cached content](/cdn/docs/invalidating-cached-content).
|
438
426
|
#
|
439
427
|
# @overload invalidate_cache(request, options = nil)
|
440
428
|
# Pass arguments to `invalidate_cache` via a request object, either of type
|
@@ -458,18 +446,14 @@ module Google
|
|
458
446
|
# @param project [::String]
|
459
447
|
# Project ID for this request.
|
460
448
|
# @param request_id [::String]
|
461
|
-
# 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.
|
462
|
-
#
|
463
|
-
# 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.
|
464
|
-
#
|
465
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
449
|
+
# 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).
|
466
450
|
# @param url_map [::String]
|
467
451
|
# Name of the UrlMap scoping this request.
|
468
|
-
# @yield [result,
|
469
|
-
# @yieldparam result [::
|
452
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
453
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
470
454
|
# @yieldparam response [::Faraday::Response]
|
471
455
|
#
|
472
|
-
# @return [::
|
456
|
+
# @return [::Gapic::Rest::BaseOperation]
|
473
457
|
#
|
474
458
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
475
459
|
def invalidate_cache request, options = nil
|
@@ -481,7 +465,7 @@ module Google
|
|
481
465
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
482
466
|
|
483
467
|
# Customize the options with defaults
|
484
|
-
call_metadata =
|
468
|
+
call_metadata = @config.rpcs.invalidate_cache.metadata.to_h
|
485
469
|
|
486
470
|
# Set x-goog-api-client header
|
487
471
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -489,20 +473,17 @@ module Google
|
|
489
473
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
490
474
|
transports_version_send: [:rest]
|
491
475
|
|
492
|
-
options.apply_defaults timeout: @config.timeout,
|
476
|
+
options.apply_defaults timeout: @config.rpcs.invalidate_cache.timeout,
|
493
477
|
metadata: call_metadata
|
494
478
|
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
yield result, response if block_given?
|
505
|
-
result
|
479
|
+
options.apply_defaults timeout: @config.timeout,
|
480
|
+
metadata: @config.metadata
|
481
|
+
|
482
|
+
@url_maps_stub.invalidate_cache request, options do |result, response|
|
483
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
484
|
+
yield result, response if block_given?
|
485
|
+
return result
|
486
|
+
end
|
506
487
|
rescue ::Faraday::Error => e
|
507
488
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
508
489
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -529,32 +510,22 @@ module Google
|
|
529
510
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
530
511
|
#
|
531
512
|
# @param filter [::String]
|
532
|
-
# 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 `<`.
|
533
|
-
#
|
534
|
-
# For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
|
535
|
-
#
|
536
|
-
# 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.
|
537
|
-
#
|
538
|
-
# 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) ```
|
513
|
+
# 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) ```
|
539
514
|
# @param max_results [::Integer]
|
540
515
|
# 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`)
|
541
516
|
# @param order_by [::String]
|
542
|
-
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
|
543
|
-
#
|
544
|
-
# 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.
|
545
|
-
#
|
546
|
-
# Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
517
|
+
# 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.
|
547
518
|
# @param page_token [::String]
|
548
519
|
# Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
|
549
520
|
# @param project [::String]
|
550
521
|
# Project ID for this request.
|
551
522
|
# @param return_partial_success [::Boolean]
|
552
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
553
|
-
# @yield [result,
|
554
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
523
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
524
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
525
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::UrlMap>]
|
555
526
|
# @yieldparam response [::Faraday::Response]
|
556
527
|
#
|
557
|
-
# @return [::Google::Cloud::Compute::V1::
|
528
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::UrlMap>]
|
558
529
|
#
|
559
530
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
560
531
|
def list request, options = nil
|
@@ -566,7 +537,7 @@ module Google
|
|
566
537
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
567
538
|
|
568
539
|
# Customize the options with defaults
|
569
|
-
call_metadata =
|
540
|
+
call_metadata = @config.rpcs.list.metadata.to_h
|
570
541
|
|
571
542
|
# Set x-goog-api-client header
|
572
543
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -574,19 +545,17 @@ module Google
|
|
574
545
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
575
546
|
transports_version_send: [:rest]
|
576
547
|
|
577
|
-
options.apply_defaults timeout: @config.timeout,
|
548
|
+
options.apply_defaults timeout: @config.rpcs.list.timeout,
|
578
549
|
metadata: call_metadata
|
579
550
|
|
580
|
-
|
581
|
-
|
582
|
-
uri: uri,
|
583
|
-
params: query_string_params,
|
584
|
-
options: options
|
585
|
-
)
|
586
|
-
result = ::Google::Cloud::Compute::V1::UrlMapList.decode_json response.body, ignore_unknown_fields: true
|
551
|
+
options.apply_defaults timeout: @config.timeout,
|
552
|
+
metadata: @config.metadata
|
587
553
|
|
588
|
-
|
589
|
-
|
554
|
+
@url_maps_stub.list request, options do |result, response|
|
555
|
+
result = ::Gapic::Rest::PagedEnumerable.new @url_maps_stub, :list, "items", request, result, options
|
556
|
+
yield result, response if block_given?
|
557
|
+
return result
|
558
|
+
end
|
590
559
|
rescue ::Faraday::Error => e
|
591
560
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
592
561
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -615,20 +584,16 @@ module Google
|
|
615
584
|
# @param project [::String]
|
616
585
|
# Project ID for this request.
|
617
586
|
# @param request_id [::String]
|
618
|
-
# 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.
|
619
|
-
#
|
620
|
-
# 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.
|
621
|
-
#
|
622
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
587
|
+
# 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).
|
623
588
|
# @param url_map [::String]
|
624
589
|
# Name of the UrlMap resource to patch.
|
625
590
|
# @param url_map_resource [::Google::Cloud::Compute::V1::UrlMap, ::Hash]
|
626
591
|
# The body resource for this request
|
627
|
-
# @yield [result,
|
628
|
-
# @yieldparam result [::
|
592
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
593
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
629
594
|
# @yieldparam response [::Faraday::Response]
|
630
595
|
#
|
631
|
-
# @return [::
|
596
|
+
# @return [::Gapic::Rest::BaseOperation]
|
632
597
|
#
|
633
598
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
634
599
|
def patch request, options = nil
|
@@ -640,7 +605,7 @@ module Google
|
|
640
605
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
641
606
|
|
642
607
|
# Customize the options with defaults
|
643
|
-
call_metadata =
|
608
|
+
call_metadata = @config.rpcs.patch.metadata.to_h
|
644
609
|
|
645
610
|
# Set x-goog-api-client header
|
646
611
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -648,20 +613,17 @@ module Google
|
|
648
613
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
649
614
|
transports_version_send: [:rest]
|
650
615
|
|
651
|
-
options.apply_defaults timeout: @config.timeout,
|
616
|
+
options.apply_defaults timeout: @config.rpcs.patch.timeout,
|
652
617
|
metadata: call_metadata
|
653
618
|
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
yield result, response if block_given?
|
664
|
-
result
|
619
|
+
options.apply_defaults timeout: @config.timeout,
|
620
|
+
metadata: @config.metadata
|
621
|
+
|
622
|
+
@url_maps_stub.patch request, options do |result, response|
|
623
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
624
|
+
yield result, response if block_given?
|
625
|
+
return result
|
626
|
+
end
|
665
627
|
rescue ::Faraday::Error => e
|
666
628
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
667
629
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -690,20 +652,16 @@ module Google
|
|
690
652
|
# @param project [::String]
|
691
653
|
# Project ID for this request.
|
692
654
|
# @param request_id [::String]
|
693
|
-
# 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.
|
694
|
-
#
|
695
|
-
# 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.
|
696
|
-
#
|
697
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
655
|
+
# 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).
|
698
656
|
# @param url_map [::String]
|
699
657
|
# Name of the UrlMap resource to update.
|
700
658
|
# @param url_map_resource [::Google::Cloud::Compute::V1::UrlMap, ::Hash]
|
701
659
|
# The body resource for this request
|
702
|
-
# @yield [result,
|
703
|
-
# @yieldparam result [::
|
660
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
661
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
704
662
|
# @yieldparam response [::Faraday::Response]
|
705
663
|
#
|
706
|
-
# @return [::
|
664
|
+
# @return [::Gapic::Rest::BaseOperation]
|
707
665
|
#
|
708
666
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
709
667
|
def update request, options = nil
|
@@ -715,7 +673,7 @@ module Google
|
|
715
673
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
716
674
|
|
717
675
|
# Customize the options with defaults
|
718
|
-
call_metadata =
|
676
|
+
call_metadata = @config.rpcs.update.metadata.to_h
|
719
677
|
|
720
678
|
# Set x-goog-api-client header
|
721
679
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -723,20 +681,17 @@ module Google
|
|
723
681
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
724
682
|
transports_version_send: [:rest]
|
725
683
|
|
726
|
-
options.apply_defaults timeout: @config.timeout,
|
684
|
+
options.apply_defaults timeout: @config.rpcs.update.timeout,
|
727
685
|
metadata: call_metadata
|
728
686
|
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
yield result, response if block_given?
|
739
|
-
result
|
687
|
+
options.apply_defaults timeout: @config.timeout,
|
688
|
+
metadata: @config.metadata
|
689
|
+
|
690
|
+
@url_maps_stub.update request, options do |result, response|
|
691
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
692
|
+
yield result, response if block_given?
|
693
|
+
return result
|
694
|
+
end
|
740
695
|
rescue ::Faraday::Error => e
|
741
696
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
742
697
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -768,7 +723,7 @@ module Google
|
|
768
723
|
# Name of the UrlMap resource to be validated as.
|
769
724
|
# @param url_maps_validate_request_resource [::Google::Cloud::Compute::V1::UrlMapsValidateRequest, ::Hash]
|
770
725
|
# The body resource for this request
|
771
|
-
# @yield [result,
|
726
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
772
727
|
# @yieldparam result [::Google::Cloud::Compute::V1::UrlMapsValidateResponse]
|
773
728
|
# @yieldparam response [::Faraday::Response]
|
774
729
|
#
|
@@ -784,7 +739,7 @@ module Google
|
|
784
739
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
785
740
|
|
786
741
|
# Customize the options with defaults
|
787
|
-
call_metadata =
|
742
|
+
call_metadata = @config.rpcs.validate.metadata.to_h
|
788
743
|
|
789
744
|
# Set x-goog-api-client header
|
790
745
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -792,19 +747,16 @@ module Google
|
|
792
747
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
793
748
|
transports_version_send: [:rest]
|
794
749
|
|
795
|
-
options.apply_defaults timeout: @config.timeout,
|
750
|
+
options.apply_defaults timeout: @config.rpcs.validate.timeout,
|
796
751
|
metadata: call_metadata
|
797
752
|
|
798
|
-
|
799
|
-
|
800
|
-
uri: uri,
|
801
|
-
body: body,
|
802
|
-
options: options
|
803
|
-
)
|
804
|
-
result = ::Google::Cloud::Compute::V1::UrlMapsValidateResponse.decode_json response.body, ignore_unknown_fields: true
|
753
|
+
options.apply_defaults timeout: @config.timeout,
|
754
|
+
metadata: @config.metadata
|
805
755
|
|
806
|
-
|
807
|
-
|
756
|
+
@url_maps_stub.validate request, options do |result, response|
|
757
|
+
yield result, response if block_given?
|
758
|
+
return result
|
759
|
+
end
|
808
760
|
rescue ::Faraday::Error => e
|
809
761
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
810
762
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -859,6 +811,9 @@ module Google
|
|
859
811
|
# @!attribute [rw] timeout
|
860
812
|
# The call timeout in seconds.
|
861
813
|
# @return [::Numeric]
|
814
|
+
# @!attribute [rw] metadata
|
815
|
+
# Additional REST headers to be sent with the call.
|
816
|
+
# @return [::Hash{::Symbol=>::String}]
|
862
817
|
#
|
863
818
|
class Configuration
|
864
819
|
extend ::Gapic::Config
|
@@ -872,6 +827,7 @@ module Google
|
|
872
827
|
config_attr :lib_name, nil, ::String, nil
|
873
828
|
config_attr :lib_version, nil, ::String, nil
|
874
829
|
config_attr :timeout, nil, ::Numeric, nil
|
830
|
+
config_attr :metadata, nil, ::Hash, nil
|
875
831
|
|
876
832
|
# @private
|
877
833
|
def initialize parent_config = nil
|
@@ -879,6 +835,102 @@ module Google
|
|
879
835
|
|
880
836
|
yield self if block_given?
|
881
837
|
end
|
838
|
+
|
839
|
+
##
|
840
|
+
# Configurations for individual RPCs
|
841
|
+
# @return [Rpcs]
|
842
|
+
#
|
843
|
+
def rpcs
|
844
|
+
@rpcs ||= begin
|
845
|
+
parent_rpcs = nil
|
846
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
847
|
+
Rpcs.new parent_rpcs
|
848
|
+
end
|
849
|
+
end
|
850
|
+
|
851
|
+
##
|
852
|
+
# Configuration RPC class for the UrlMaps API.
|
853
|
+
#
|
854
|
+
# Includes fields providing the configuration for each RPC in this service.
|
855
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
856
|
+
# the following configuration fields:
|
857
|
+
#
|
858
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
859
|
+
#
|
860
|
+
# there is one other field (`retry_policy`) that can be set
|
861
|
+
# but is currently not supported for REST Gapic libraries.
|
862
|
+
#
|
863
|
+
class Rpcs
|
864
|
+
##
|
865
|
+
# RPC-specific configuration for `aggregated_list`
|
866
|
+
# @return [::Gapic::Config::Method]
|
867
|
+
#
|
868
|
+
attr_reader :aggregated_list
|
869
|
+
##
|
870
|
+
# RPC-specific configuration for `delete`
|
871
|
+
# @return [::Gapic::Config::Method]
|
872
|
+
#
|
873
|
+
attr_reader :delete
|
874
|
+
##
|
875
|
+
# RPC-specific configuration for `get`
|
876
|
+
# @return [::Gapic::Config::Method]
|
877
|
+
#
|
878
|
+
attr_reader :get
|
879
|
+
##
|
880
|
+
# RPC-specific configuration for `insert`
|
881
|
+
# @return [::Gapic::Config::Method]
|
882
|
+
#
|
883
|
+
attr_reader :insert
|
884
|
+
##
|
885
|
+
# RPC-specific configuration for `invalidate_cache`
|
886
|
+
# @return [::Gapic::Config::Method]
|
887
|
+
#
|
888
|
+
attr_reader :invalidate_cache
|
889
|
+
##
|
890
|
+
# RPC-specific configuration for `list`
|
891
|
+
# @return [::Gapic::Config::Method]
|
892
|
+
#
|
893
|
+
attr_reader :list
|
894
|
+
##
|
895
|
+
# RPC-specific configuration for `patch`
|
896
|
+
# @return [::Gapic::Config::Method]
|
897
|
+
#
|
898
|
+
attr_reader :patch
|
899
|
+
##
|
900
|
+
# RPC-specific configuration for `update`
|
901
|
+
# @return [::Gapic::Config::Method]
|
902
|
+
#
|
903
|
+
attr_reader :update
|
904
|
+
##
|
905
|
+
# RPC-specific configuration for `validate`
|
906
|
+
# @return [::Gapic::Config::Method]
|
907
|
+
#
|
908
|
+
attr_reader :validate
|
909
|
+
|
910
|
+
# @private
|
911
|
+
def initialize parent_rpcs = nil
|
912
|
+
aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
|
913
|
+
@aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
|
914
|
+
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
915
|
+
@delete = ::Gapic::Config::Method.new delete_config
|
916
|
+
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|
917
|
+
@get = ::Gapic::Config::Method.new get_config
|
918
|
+
insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
|
919
|
+
@insert = ::Gapic::Config::Method.new insert_config
|
920
|
+
invalidate_cache_config = parent_rpcs.invalidate_cache if parent_rpcs.respond_to? :invalidate_cache
|
921
|
+
@invalidate_cache = ::Gapic::Config::Method.new invalidate_cache_config
|
922
|
+
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
923
|
+
@list = ::Gapic::Config::Method.new list_config
|
924
|
+
patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
|
925
|
+
@patch = ::Gapic::Config::Method.new patch_config
|
926
|
+
update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
|
927
|
+
@update = ::Gapic::Config::Method.new update_config
|
928
|
+
validate_config = parent_rpcs.validate if parent_rpcs.respond_to? :validate
|
929
|
+
@validate = ::Gapic::Config::Method.new validate_config
|
930
|
+
|
931
|
+
yield self if block_given?
|
932
|
+
end
|
933
|
+
end
|
882
934
|
end
|
883
935
|
end
|
884
936
|
end
|