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/subnetworks/rest/service_stub"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -31,8 +32,6 @@ module Google
|
|
31
32
|
# The Subnetworks API.
|
32
33
|
#
|
33
34
|
class Client
|
34
|
-
include GrpcTranscoding
|
35
|
-
|
36
35
|
# @private
|
37
36
|
attr_reader :subnetworks_stub
|
38
37
|
|
@@ -42,13 +41,12 @@ module Google
|
|
42
41
|
# See {::Google::Cloud::Compute::V1::Subnetworks::Rest::Client::Configuration}
|
43
42
|
# for a description of the configuration fields.
|
44
43
|
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
# To modify the configuration for all Subnetworks clients:
|
44
|
+
# @example
|
48
45
|
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
46
|
+
# # Modify the configuration for all Subnetworks clients
|
47
|
+
# ::Google::Cloud::Compute::V1::Subnetworks::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,45 @@ 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.expand_ip_cidr_range.timeout = 600.0
|
75
|
+
|
76
|
+
default_config.rpcs.get.timeout = 600.0
|
77
|
+
default_config.rpcs.get.retry_policy = {
|
78
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
79
|
+
}
|
80
|
+
|
81
|
+
default_config.rpcs.get_iam_policy.timeout = 600.0
|
82
|
+
default_config.rpcs.get_iam_policy.retry_policy = {
|
83
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
84
|
+
}
|
85
|
+
|
86
|
+
default_config.rpcs.insert.timeout = 600.0
|
87
|
+
|
88
|
+
default_config.rpcs.list.timeout = 600.0
|
89
|
+
default_config.rpcs.list.retry_policy = {
|
90
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
91
|
+
}
|
92
|
+
|
93
|
+
default_config.rpcs.list_usable.timeout = 600.0
|
94
|
+
default_config.rpcs.list_usable.retry_policy = {
|
95
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
96
|
+
}
|
97
|
+
|
98
|
+
default_config.rpcs.patch.timeout = 600.0
|
99
|
+
|
100
|
+
default_config.rpcs.set_iam_policy.timeout = 600.0
|
101
|
+
|
102
|
+
default_config.rpcs.set_private_ip_google_access.timeout = 600.0
|
103
|
+
|
104
|
+
default_config.rpcs.test_iam_permissions.timeout = 600.0
|
105
|
+
|
69
106
|
default_config
|
70
107
|
end
|
71
108
|
yield @configure if block_given?
|
@@ -95,28 +132,20 @@ module Google
|
|
95
132
|
##
|
96
133
|
# Create a new Subnetworks REST client object.
|
97
134
|
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
# To create a new Subnetworks REST client with the default
|
101
|
-
# configuration:
|
135
|
+
# @example
|
102
136
|
#
|
103
|
-
#
|
137
|
+
# # Create a client using the default configuration
|
138
|
+
# client = ::Google::Cloud::Compute::V1::Subnetworks::Rest::Client.new
|
104
139
|
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
# config.timeout = 10.0
|
110
|
-
# end
|
140
|
+
# # Create a client using a custom configuration
|
141
|
+
# client = ::Google::Cloud::Compute::V1::Subnetworks::Rest::Client.new do |config|
|
142
|
+
# config.timeout = 10.0
|
143
|
+
# end
|
111
144
|
#
|
112
145
|
# @yield [config] Configure the Subnetworks client.
|
113
146
|
# @yieldparam config [Client::Configuration]
|
114
147
|
#
|
115
148
|
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
149
|
# Create the configuration object
|
121
150
|
@config = Configuration.new Client.configure
|
122
151
|
|
@@ -126,11 +155,11 @@ module Google
|
|
126
155
|
# Create credentials
|
127
156
|
credentials = @config.credentials
|
128
157
|
credentials ||= Credentials.default scope: @config.scope
|
129
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
158
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
130
159
|
credentials = Credentials.new credentials, scope: @config.scope
|
131
160
|
end
|
132
161
|
|
133
|
-
@
|
162
|
+
@subnetworks_stub = ::Google::Cloud::Compute::V1::Subnetworks::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
134
163
|
end
|
135
164
|
|
136
165
|
# Service calls
|
@@ -156,34 +185,24 @@ module Google
|
|
156
185
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
157
186
|
#
|
158
187
|
# @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) ```
|
188
|
+
# 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
189
|
# @param include_all_scopes [::Boolean]
|
167
190
|
# 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
191
|
# @param max_results [::Integer]
|
169
192
|
# 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
193
|
# @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.
|
194
|
+
# 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
195
|
# @param page_token [::String]
|
177
196
|
# 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
197
|
# @param project [::String]
|
179
198
|
# Project ID for this request.
|
180
199
|
# @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::
|
200
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
201
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
202
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::SubnetworksScopedList>]
|
184
203
|
# @yieldparam response [::Faraday::Response]
|
185
204
|
#
|
186
|
-
# @return [::Google::Cloud::Compute::V1::
|
205
|
+
# @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::SubnetworksScopedList>]
|
187
206
|
#
|
188
207
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
189
208
|
def aggregated_list request, options = nil
|
@@ -195,7 +214,7 @@ module Google
|
|
195
214
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
196
215
|
|
197
216
|
# Customize the options with defaults
|
198
|
-
call_metadata =
|
217
|
+
call_metadata = @config.rpcs.aggregated_list.metadata.to_h
|
199
218
|
|
200
219
|
# Set x-goog-api-client header
|
201
220
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -203,19 +222,17 @@ module Google
|
|
203
222
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
204
223
|
transports_version_send: [:rest]
|
205
224
|
|
206
|
-
options.apply_defaults timeout: @config.timeout,
|
225
|
+
options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
|
207
226
|
metadata: call_metadata
|
208
227
|
|
209
|
-
|
210
|
-
|
211
|
-
uri: uri,
|
212
|
-
params: query_string_params,
|
213
|
-
options: options
|
214
|
-
)
|
215
|
-
result = ::Google::Cloud::Compute::V1::SubnetworkAggregatedList.decode_json response.body, ignore_unknown_fields: true
|
228
|
+
options.apply_defaults timeout: @config.timeout,
|
229
|
+
metadata: @config.metadata
|
216
230
|
|
217
|
-
|
218
|
-
|
231
|
+
@subnetworks_stub.aggregated_list request, options do |result, response|
|
232
|
+
result = ::Gapic::Rest::PagedEnumerable.new @subnetworks_stub, :aggregated_list, "items", request, result, options
|
233
|
+
yield result, response if block_given?
|
234
|
+
return result
|
235
|
+
end
|
219
236
|
rescue ::Faraday::Error => e
|
220
237
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
221
238
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -246,18 +263,14 @@ module Google
|
|
246
263
|
# @param region [::String]
|
247
264
|
# Name of the region scoping this request.
|
248
265
|
# @param request_id [::String]
|
249
|
-
# 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.
|
250
|
-
#
|
251
|
-
# 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.
|
252
|
-
#
|
253
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
266
|
+
# 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).
|
254
267
|
# @param subnetwork [::String]
|
255
268
|
# Name of the Subnetwork resource to delete.
|
256
|
-
# @yield [result,
|
257
|
-
# @yieldparam result [::
|
269
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
270
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
258
271
|
# @yieldparam response [::Faraday::Response]
|
259
272
|
#
|
260
|
-
# @return [::
|
273
|
+
# @return [::Gapic::Rest::BaseOperation]
|
261
274
|
#
|
262
275
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
263
276
|
def delete request, options = nil
|
@@ -269,7 +282,7 @@ module Google
|
|
269
282
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
270
283
|
|
271
284
|
# Customize the options with defaults
|
272
|
-
call_metadata =
|
285
|
+
call_metadata = @config.rpcs.delete.metadata.to_h
|
273
286
|
|
274
287
|
# Set x-goog-api-client header
|
275
288
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -277,19 +290,17 @@ module Google
|
|
277
290
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
278
291
|
transports_version_send: [:rest]
|
279
292
|
|
280
|
-
options.apply_defaults timeout: @config.timeout,
|
293
|
+
options.apply_defaults timeout: @config.rpcs.delete.timeout,
|
281
294
|
metadata: call_metadata
|
282
295
|
|
283
|
-
|
284
|
-
|
285
|
-
uri: uri,
|
286
|
-
params: query_string_params,
|
287
|
-
options: options
|
288
|
-
)
|
289
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
296
|
+
options.apply_defaults timeout: @config.timeout,
|
297
|
+
metadata: @config.metadata
|
290
298
|
|
291
|
-
|
292
|
-
|
299
|
+
@subnetworks_stub.delete request, options do |result, response|
|
300
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
301
|
+
yield result, response if block_given?
|
302
|
+
return result
|
303
|
+
end
|
293
304
|
rescue ::Faraday::Error => e
|
294
305
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
295
306
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -320,20 +331,16 @@ module Google
|
|
320
331
|
# @param region [::String]
|
321
332
|
# Name of the region scoping this request.
|
322
333
|
# @param request_id [::String]
|
323
|
-
# 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.
|
324
|
-
#
|
325
|
-
# 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.
|
326
|
-
#
|
327
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
334
|
+
# 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).
|
328
335
|
# @param subnetwork [::String]
|
329
336
|
# Name of the Subnetwork resource to update.
|
330
337
|
# @param subnetworks_expand_ip_cidr_range_request_resource [::Google::Cloud::Compute::V1::SubnetworksExpandIpCidrRangeRequest, ::Hash]
|
331
338
|
# The body resource for this request
|
332
|
-
# @yield [result,
|
333
|
-
# @yieldparam result [::
|
339
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
340
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
334
341
|
# @yieldparam response [::Faraday::Response]
|
335
342
|
#
|
336
|
-
# @return [::
|
343
|
+
# @return [::Gapic::Rest::BaseOperation]
|
337
344
|
#
|
338
345
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
339
346
|
def expand_ip_cidr_range request, options = nil
|
@@ -345,7 +352,7 @@ module Google
|
|
345
352
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
346
353
|
|
347
354
|
# Customize the options with defaults
|
348
|
-
call_metadata =
|
355
|
+
call_metadata = @config.rpcs.expand_ip_cidr_range.metadata.to_h
|
349
356
|
|
350
357
|
# Set x-goog-api-client header
|
351
358
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -353,20 +360,17 @@ module Google
|
|
353
360
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
354
361
|
transports_version_send: [:rest]
|
355
362
|
|
356
|
-
options.apply_defaults timeout: @config.timeout,
|
363
|
+
options.apply_defaults timeout: @config.rpcs.expand_ip_cidr_range.timeout,
|
357
364
|
metadata: call_metadata
|
358
365
|
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
yield result, response if block_given?
|
369
|
-
result
|
366
|
+
options.apply_defaults timeout: @config.timeout,
|
367
|
+
metadata: @config.metadata
|
368
|
+
|
369
|
+
@subnetworks_stub.expand_ip_cidr_range request, options do |result, response|
|
370
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
371
|
+
yield result, response if block_given?
|
372
|
+
return result
|
373
|
+
end
|
370
374
|
rescue ::Faraday::Error => e
|
371
375
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
372
376
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -398,7 +402,7 @@ module Google
|
|
398
402
|
# Name of the region scoping this request.
|
399
403
|
# @param subnetwork [::String]
|
400
404
|
# Name of the Subnetwork resource to return.
|
401
|
-
# @yield [result,
|
405
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
402
406
|
# @yieldparam result [::Google::Cloud::Compute::V1::Subnetwork]
|
403
407
|
# @yieldparam response [::Faraday::Response]
|
404
408
|
#
|
@@ -414,7 +418,7 @@ module Google
|
|
414
418
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
415
419
|
|
416
420
|
# Customize the options with defaults
|
417
|
-
call_metadata =
|
421
|
+
call_metadata = @config.rpcs.get.metadata.to_h
|
418
422
|
|
419
423
|
# Set x-goog-api-client header
|
420
424
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -422,18 +426,16 @@ module Google
|
|
422
426
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
423
427
|
transports_version_send: [:rest]
|
424
428
|
|
425
|
-
options.apply_defaults timeout: @config.timeout,
|
429
|
+
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
426
430
|
metadata: call_metadata
|
427
431
|
|
428
|
-
|
429
|
-
|
430
|
-
uri: uri,
|
431
|
-
options: options
|
432
|
-
)
|
433
|
-
result = ::Google::Cloud::Compute::V1::Subnetwork.decode_json response.body, ignore_unknown_fields: true
|
432
|
+
options.apply_defaults timeout: @config.timeout,
|
433
|
+
metadata: @config.metadata
|
434
434
|
|
435
|
-
|
436
|
-
|
435
|
+
@subnetworks_stub.get request, options do |result, response|
|
436
|
+
yield result, response if block_given?
|
437
|
+
return result
|
438
|
+
end
|
437
439
|
rescue ::Faraday::Error => e
|
438
440
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
439
441
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -467,7 +469,7 @@ module Google
|
|
467
469
|
# The name of the region for this request.
|
468
470
|
# @param resource [::String]
|
469
471
|
# Name or id of the resource for this request.
|
470
|
-
# @yield [result,
|
472
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
471
473
|
# @yieldparam result [::Google::Cloud::Compute::V1::Policy]
|
472
474
|
# @yieldparam response [::Faraday::Response]
|
473
475
|
#
|
@@ -483,7 +485,7 @@ module Google
|
|
483
485
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
484
486
|
|
485
487
|
# Customize the options with defaults
|
486
|
-
call_metadata =
|
488
|
+
call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
487
489
|
|
488
490
|
# Set x-goog-api-client header
|
489
491
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -491,19 +493,16 @@ module Google
|
|
491
493
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
492
494
|
transports_version_send: [:rest]
|
493
495
|
|
494
|
-
options.apply_defaults timeout: @config.timeout,
|
496
|
+
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
495
497
|
metadata: call_metadata
|
496
498
|
|
497
|
-
|
498
|
-
|
499
|
-
uri: uri,
|
500
|
-
params: query_string_params,
|
501
|
-
options: options
|
502
|
-
)
|
503
|
-
result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
499
|
+
options.apply_defaults timeout: @config.timeout,
|
500
|
+
metadata: @config.metadata
|
504
501
|
|
505
|
-
|
506
|
-
|
502
|
+
@subnetworks_stub.get_iam_policy request, options do |result, response|
|
503
|
+
yield result, response if block_given?
|
504
|
+
return result
|
505
|
+
end
|
507
506
|
rescue ::Faraday::Error => e
|
508
507
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
509
508
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -534,18 +533,14 @@ module Google
|
|
534
533
|
# @param region [::String]
|
535
534
|
# Name of the region scoping this request.
|
536
535
|
# @param request_id [::String]
|
537
|
-
# 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.
|
538
|
-
#
|
539
|
-
# 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.
|
540
|
-
#
|
541
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
536
|
+
# 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).
|
542
537
|
# @param subnetwork_resource [::Google::Cloud::Compute::V1::Subnetwork, ::Hash]
|
543
538
|
# The body resource for this request
|
544
|
-
# @yield [result,
|
545
|
-
# @yieldparam result [::
|
539
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
540
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
546
541
|
# @yieldparam response [::Faraday::Response]
|
547
542
|
#
|
548
|
-
# @return [::
|
543
|
+
# @return [::Gapic::Rest::BaseOperation]
|
549
544
|
#
|
550
545
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
551
546
|
def insert request, options = nil
|
@@ -557,7 +552,7 @@ module Google
|
|
557
552
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
558
553
|
|
559
554
|
# Customize the options with defaults
|
560
|
-
call_metadata =
|
555
|
+
call_metadata = @config.rpcs.insert.metadata.to_h
|
561
556
|
|
562
557
|
# Set x-goog-api-client header
|
563
558
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -565,20 +560,17 @@ module Google
|
|
565
560
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
566
561
|
transports_version_send: [:rest]
|
567
562
|
|
568
|
-
options.apply_defaults timeout: @config.timeout,
|
563
|
+
options.apply_defaults timeout: @config.rpcs.insert.timeout,
|
569
564
|
metadata: call_metadata
|
570
565
|
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
yield result, response if block_given?
|
581
|
-
result
|
566
|
+
options.apply_defaults timeout: @config.timeout,
|
567
|
+
metadata: @config.metadata
|
568
|
+
|
569
|
+
@subnetworks_stub.insert request, options do |result, response|
|
570
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
571
|
+
yield result, response if block_given?
|
572
|
+
return result
|
573
|
+
end
|
582
574
|
rescue ::Faraday::Error => e
|
583
575
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
584
576
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -605,21 +597,11 @@ module Google
|
|
605
597
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
606
598
|
#
|
607
599
|
# @param filter [::String]
|
608
|
-
# 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 `<`.
|
609
|
-
#
|
610
|
-
# For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
|
611
|
-
#
|
612
|
-
# 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.
|
613
|
-
#
|
614
|
-
# 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) ```
|
600
|
+
# 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) ```
|
615
601
|
# @param max_results [::Integer]
|
616
602
|
# 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`)
|
617
603
|
# @param order_by [::String]
|
618
|
-
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
|
619
|
-
#
|
620
|
-
# 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.
|
621
|
-
#
|
622
|
-
# Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
604
|
+
# 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.
|
623
605
|
# @param page_token [::String]
|
624
606
|
# Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
|
625
607
|
# @param project [::String]
|
@@ -627,12 +609,12 @@ module Google
|
|
627
609
|
# @param region [::String]
|
628
610
|
# Name of the region scoping this request.
|
629
611
|
# @param return_partial_success [::Boolean]
|
630
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
631
|
-
# @yield [result,
|
632
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
612
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
613
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
614
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Subnetwork>]
|
633
615
|
# @yieldparam response [::Faraday::Response]
|
634
616
|
#
|
635
|
-
# @return [::Google::Cloud::Compute::V1::
|
617
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Subnetwork>]
|
636
618
|
#
|
637
619
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
638
620
|
def list request, options = nil
|
@@ -644,7 +626,7 @@ module Google
|
|
644
626
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
645
627
|
|
646
628
|
# Customize the options with defaults
|
647
|
-
call_metadata =
|
629
|
+
call_metadata = @config.rpcs.list.metadata.to_h
|
648
630
|
|
649
631
|
# Set x-goog-api-client header
|
650
632
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -652,19 +634,17 @@ module Google
|
|
652
634
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
653
635
|
transports_version_send: [:rest]
|
654
636
|
|
655
|
-
options.apply_defaults timeout: @config.timeout,
|
637
|
+
options.apply_defaults timeout: @config.rpcs.list.timeout,
|
656
638
|
metadata: call_metadata
|
657
639
|
|
658
|
-
|
659
|
-
|
660
|
-
uri: uri,
|
661
|
-
params: query_string_params,
|
662
|
-
options: options
|
663
|
-
)
|
664
|
-
result = ::Google::Cloud::Compute::V1::SubnetworkList.decode_json response.body, ignore_unknown_fields: true
|
640
|
+
options.apply_defaults timeout: @config.timeout,
|
641
|
+
metadata: @config.metadata
|
665
642
|
|
666
|
-
|
667
|
-
|
643
|
+
@subnetworks_stub.list request, options do |result, response|
|
644
|
+
result = ::Gapic::Rest::PagedEnumerable.new @subnetworks_stub, :list, "items", request, result, options
|
645
|
+
yield result, response if block_given?
|
646
|
+
return result
|
647
|
+
end
|
668
648
|
rescue ::Faraday::Error => e
|
669
649
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
670
650
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -691,32 +671,22 @@ module Google
|
|
691
671
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
692
672
|
#
|
693
673
|
# @param filter [::String]
|
694
|
-
# 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 `<`.
|
695
|
-
#
|
696
|
-
# For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
|
697
|
-
#
|
698
|
-
# 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.
|
699
|
-
#
|
700
|
-
# 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) ```
|
674
|
+
# 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) ```
|
701
675
|
# @param max_results [::Integer]
|
702
676
|
# 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`)
|
703
677
|
# @param order_by [::String]
|
704
|
-
# Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
|
705
|
-
#
|
706
|
-
# 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.
|
707
|
-
#
|
708
|
-
# Currently, only sorting by `name` or `creationTimestamp desc` is supported.
|
678
|
+
# 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.
|
709
679
|
# @param page_token [::String]
|
710
680
|
# Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
|
711
681
|
# @param project [::String]
|
712
682
|
# Project ID for this request.
|
713
683
|
# @param return_partial_success [::Boolean]
|
714
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
715
|
-
# @yield [result,
|
716
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
684
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
685
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
686
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::UsableSubnetwork>]
|
717
687
|
# @yieldparam response [::Faraday::Response]
|
718
688
|
#
|
719
|
-
# @return [::Google::Cloud::Compute::V1::
|
689
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::UsableSubnetwork>]
|
720
690
|
#
|
721
691
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
722
692
|
def list_usable request, options = nil
|
@@ -728,7 +698,7 @@ module Google
|
|
728
698
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
729
699
|
|
730
700
|
# Customize the options with defaults
|
731
|
-
call_metadata =
|
701
|
+
call_metadata = @config.rpcs.list_usable.metadata.to_h
|
732
702
|
|
733
703
|
# Set x-goog-api-client header
|
734
704
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -736,19 +706,17 @@ module Google
|
|
736
706
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
737
707
|
transports_version_send: [:rest]
|
738
708
|
|
739
|
-
options.apply_defaults timeout: @config.timeout,
|
709
|
+
options.apply_defaults timeout: @config.rpcs.list_usable.timeout,
|
740
710
|
metadata: call_metadata
|
741
711
|
|
742
|
-
|
743
|
-
|
744
|
-
uri: uri,
|
745
|
-
params: query_string_params,
|
746
|
-
options: options
|
747
|
-
)
|
748
|
-
result = ::Google::Cloud::Compute::V1::UsableSubnetworksAggregatedList.decode_json response.body, ignore_unknown_fields: true
|
712
|
+
options.apply_defaults timeout: @config.timeout,
|
713
|
+
metadata: @config.metadata
|
749
714
|
|
750
|
-
|
751
|
-
|
715
|
+
@subnetworks_stub.list_usable request, options do |result, response|
|
716
|
+
result = ::Gapic::Rest::PagedEnumerable.new @subnetworks_stub, :list_usable, "items", request, result, options
|
717
|
+
yield result, response if block_given?
|
718
|
+
return result
|
719
|
+
end
|
752
720
|
rescue ::Faraday::Error => e
|
753
721
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
754
722
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -781,20 +749,16 @@ module Google
|
|
781
749
|
# @param region [::String]
|
782
750
|
# Name of the region scoping this request.
|
783
751
|
# @param request_id [::String]
|
784
|
-
# 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.
|
785
|
-
#
|
786
|
-
# 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.
|
787
|
-
#
|
788
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
752
|
+
# 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).
|
789
753
|
# @param subnetwork [::String]
|
790
754
|
# Name of the Subnetwork resource to patch.
|
791
755
|
# @param subnetwork_resource [::Google::Cloud::Compute::V1::Subnetwork, ::Hash]
|
792
756
|
# The body resource for this request
|
793
|
-
# @yield [result,
|
794
|
-
# @yieldparam result [::
|
757
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
758
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
795
759
|
# @yieldparam response [::Faraday::Response]
|
796
760
|
#
|
797
|
-
# @return [::
|
761
|
+
# @return [::Gapic::Rest::BaseOperation]
|
798
762
|
#
|
799
763
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
800
764
|
def patch request, options = nil
|
@@ -806,7 +770,7 @@ module Google
|
|
806
770
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
807
771
|
|
808
772
|
# Customize the options with defaults
|
809
|
-
call_metadata =
|
773
|
+
call_metadata = @config.rpcs.patch.metadata.to_h
|
810
774
|
|
811
775
|
# Set x-goog-api-client header
|
812
776
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -814,20 +778,17 @@ module Google
|
|
814
778
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
815
779
|
transports_version_send: [:rest]
|
816
780
|
|
817
|
-
options.apply_defaults timeout: @config.timeout,
|
781
|
+
options.apply_defaults timeout: @config.rpcs.patch.timeout,
|
818
782
|
metadata: call_metadata
|
819
783
|
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
yield result, response if block_given?
|
830
|
-
result
|
784
|
+
options.apply_defaults timeout: @config.timeout,
|
785
|
+
metadata: @config.metadata
|
786
|
+
|
787
|
+
@subnetworks_stub.patch request, options do |result, response|
|
788
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
789
|
+
yield result, response if block_given?
|
790
|
+
return result
|
791
|
+
end
|
831
792
|
rescue ::Faraday::Error => e
|
832
793
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
833
794
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -861,7 +822,7 @@ module Google
|
|
861
822
|
# The body resource for this request
|
862
823
|
# @param resource [::String]
|
863
824
|
# Name or id of the resource for this request.
|
864
|
-
# @yield [result,
|
825
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
865
826
|
# @yieldparam result [::Google::Cloud::Compute::V1::Policy]
|
866
827
|
# @yieldparam response [::Faraday::Response]
|
867
828
|
#
|
@@ -877,7 +838,7 @@ module Google
|
|
877
838
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
878
839
|
|
879
840
|
# Customize the options with defaults
|
880
|
-
call_metadata =
|
841
|
+
call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
881
842
|
|
882
843
|
# Set x-goog-api-client header
|
883
844
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -885,19 +846,16 @@ module Google
|
|
885
846
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
886
847
|
transports_version_send: [:rest]
|
887
848
|
|
888
|
-
options.apply_defaults timeout: @config.timeout,
|
849
|
+
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
889
850
|
metadata: call_metadata
|
890
851
|
|
891
|
-
|
892
|
-
|
893
|
-
uri: uri,
|
894
|
-
body: body,
|
895
|
-
options: options
|
896
|
-
)
|
897
|
-
result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
852
|
+
options.apply_defaults timeout: @config.timeout,
|
853
|
+
metadata: @config.metadata
|
898
854
|
|
899
|
-
|
900
|
-
|
855
|
+
@subnetworks_stub.set_iam_policy request, options do |result, response|
|
856
|
+
yield result, response if block_given?
|
857
|
+
return result
|
858
|
+
end
|
901
859
|
rescue ::Faraday::Error => e
|
902
860
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
903
861
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -928,20 +886,16 @@ module Google
|
|
928
886
|
# @param region [::String]
|
929
887
|
# Name of the region scoping this request.
|
930
888
|
# @param request_id [::String]
|
931
|
-
# 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.
|
932
|
-
#
|
933
|
-
# 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.
|
934
|
-
#
|
935
|
-
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
889
|
+
# 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).
|
936
890
|
# @param subnetwork [::String]
|
937
891
|
# Name of the Subnetwork resource.
|
938
892
|
# @param subnetworks_set_private_ip_google_access_request_resource [::Google::Cloud::Compute::V1::SubnetworksSetPrivateIpGoogleAccessRequest, ::Hash]
|
939
893
|
# The body resource for this request
|
940
|
-
# @yield [result,
|
941
|
-
# @yieldparam result [::
|
894
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
895
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
942
896
|
# @yieldparam response [::Faraday::Response]
|
943
897
|
#
|
944
|
-
# @return [::
|
898
|
+
# @return [::Gapic::Rest::BaseOperation]
|
945
899
|
#
|
946
900
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
947
901
|
def set_private_ip_google_access request, options = nil
|
@@ -953,7 +907,7 @@ module Google
|
|
953
907
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
954
908
|
|
955
909
|
# Customize the options with defaults
|
956
|
-
call_metadata =
|
910
|
+
call_metadata = @config.rpcs.set_private_ip_google_access.metadata.to_h
|
957
911
|
|
958
912
|
# Set x-goog-api-client header
|
959
913
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -961,20 +915,17 @@ module Google
|
|
961
915
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
962
916
|
transports_version_send: [:rest]
|
963
917
|
|
964
|
-
options.apply_defaults timeout: @config.timeout,
|
918
|
+
options.apply_defaults timeout: @config.rpcs.set_private_ip_google_access.timeout,
|
965
919
|
metadata: call_metadata
|
966
920
|
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
yield result, response if block_given?
|
977
|
-
result
|
921
|
+
options.apply_defaults timeout: @config.timeout,
|
922
|
+
metadata: @config.metadata
|
923
|
+
|
924
|
+
@subnetworks_stub.set_private_ip_google_access request, options do |result, response|
|
925
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
926
|
+
yield result, response if block_given?
|
927
|
+
return result
|
928
|
+
end
|
978
929
|
rescue ::Faraday::Error => e
|
979
930
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
980
931
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1008,7 +959,7 @@ module Google
|
|
1008
959
|
# Name or id of the resource for this request.
|
1009
960
|
# @param test_permissions_request_resource [::Google::Cloud::Compute::V1::TestPermissionsRequest, ::Hash]
|
1010
961
|
# The body resource for this request
|
1011
|
-
# @yield [result,
|
962
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1012
963
|
# @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
|
1013
964
|
# @yieldparam response [::Faraday::Response]
|
1014
965
|
#
|
@@ -1024,7 +975,7 @@ module Google
|
|
1024
975
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1025
976
|
|
1026
977
|
# Customize the options with defaults
|
1027
|
-
call_metadata =
|
978
|
+
call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
1028
979
|
|
1029
980
|
# Set x-goog-api-client header
|
1030
981
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1032,19 +983,16 @@ module Google
|
|
1032
983
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1033
984
|
transports_version_send: [:rest]
|
1034
985
|
|
1035
|
-
options.apply_defaults timeout: @config.timeout,
|
986
|
+
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
1036
987
|
metadata: call_metadata
|
1037
988
|
|
1038
|
-
|
1039
|
-
|
1040
|
-
uri: uri,
|
1041
|
-
body: body,
|
1042
|
-
options: options
|
1043
|
-
)
|
1044
|
-
result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
|
989
|
+
options.apply_defaults timeout: @config.timeout,
|
990
|
+
metadata: @config.metadata
|
1045
991
|
|
1046
|
-
|
1047
|
-
|
992
|
+
@subnetworks_stub.test_iam_permissions request, options do |result, response|
|
993
|
+
yield result, response if block_given?
|
994
|
+
return result
|
995
|
+
end
|
1048
996
|
rescue ::Faraday::Error => e
|
1049
997
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1050
998
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1099,6 +1047,9 @@ module Google
|
|
1099
1047
|
# @!attribute [rw] timeout
|
1100
1048
|
# The call timeout in seconds.
|
1101
1049
|
# @return [::Numeric]
|
1050
|
+
# @!attribute [rw] metadata
|
1051
|
+
# Additional REST headers to be sent with the call.
|
1052
|
+
# @return [::Hash{::Symbol=>::String}]
|
1102
1053
|
#
|
1103
1054
|
class Configuration
|
1104
1055
|
extend ::Gapic::Config
|
@@ -1112,6 +1063,7 @@ module Google
|
|
1112
1063
|
config_attr :lib_name, nil, ::String, nil
|
1113
1064
|
config_attr :lib_version, nil, ::String, nil
|
1114
1065
|
config_attr :timeout, nil, ::Numeric, nil
|
1066
|
+
config_attr :metadata, nil, ::Hash, nil
|
1115
1067
|
|
1116
1068
|
# @private
|
1117
1069
|
def initialize parent_config = nil
|
@@ -1119,6 +1071,123 @@ module Google
|
|
1119
1071
|
|
1120
1072
|
yield self if block_given?
|
1121
1073
|
end
|
1074
|
+
|
1075
|
+
##
|
1076
|
+
# Configurations for individual RPCs
|
1077
|
+
# @return [Rpcs]
|
1078
|
+
#
|
1079
|
+
def rpcs
|
1080
|
+
@rpcs ||= begin
|
1081
|
+
parent_rpcs = nil
|
1082
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1083
|
+
Rpcs.new parent_rpcs
|
1084
|
+
end
|
1085
|
+
end
|
1086
|
+
|
1087
|
+
##
|
1088
|
+
# Configuration RPC class for the Subnetworks API.
|
1089
|
+
#
|
1090
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1091
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1092
|
+
# the following configuration fields:
|
1093
|
+
#
|
1094
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1095
|
+
#
|
1096
|
+
# there is one other field (`retry_policy`) that can be set
|
1097
|
+
# but is currently not supported for REST Gapic libraries.
|
1098
|
+
#
|
1099
|
+
class Rpcs
|
1100
|
+
##
|
1101
|
+
# RPC-specific configuration for `aggregated_list`
|
1102
|
+
# @return [::Gapic::Config::Method]
|
1103
|
+
#
|
1104
|
+
attr_reader :aggregated_list
|
1105
|
+
##
|
1106
|
+
# RPC-specific configuration for `delete`
|
1107
|
+
# @return [::Gapic::Config::Method]
|
1108
|
+
#
|
1109
|
+
attr_reader :delete
|
1110
|
+
##
|
1111
|
+
# RPC-specific configuration for `expand_ip_cidr_range`
|
1112
|
+
# @return [::Gapic::Config::Method]
|
1113
|
+
#
|
1114
|
+
attr_reader :expand_ip_cidr_range
|
1115
|
+
##
|
1116
|
+
# RPC-specific configuration for `get`
|
1117
|
+
# @return [::Gapic::Config::Method]
|
1118
|
+
#
|
1119
|
+
attr_reader :get
|
1120
|
+
##
|
1121
|
+
# RPC-specific configuration for `get_iam_policy`
|
1122
|
+
# @return [::Gapic::Config::Method]
|
1123
|
+
#
|
1124
|
+
attr_reader :get_iam_policy
|
1125
|
+
##
|
1126
|
+
# RPC-specific configuration for `insert`
|
1127
|
+
# @return [::Gapic::Config::Method]
|
1128
|
+
#
|
1129
|
+
attr_reader :insert
|
1130
|
+
##
|
1131
|
+
# RPC-specific configuration for `list`
|
1132
|
+
# @return [::Gapic::Config::Method]
|
1133
|
+
#
|
1134
|
+
attr_reader :list
|
1135
|
+
##
|
1136
|
+
# RPC-specific configuration for `list_usable`
|
1137
|
+
# @return [::Gapic::Config::Method]
|
1138
|
+
#
|
1139
|
+
attr_reader :list_usable
|
1140
|
+
##
|
1141
|
+
# RPC-specific configuration for `patch`
|
1142
|
+
# @return [::Gapic::Config::Method]
|
1143
|
+
#
|
1144
|
+
attr_reader :patch
|
1145
|
+
##
|
1146
|
+
# RPC-specific configuration for `set_iam_policy`
|
1147
|
+
# @return [::Gapic::Config::Method]
|
1148
|
+
#
|
1149
|
+
attr_reader :set_iam_policy
|
1150
|
+
##
|
1151
|
+
# RPC-specific configuration for `set_private_ip_google_access`
|
1152
|
+
# @return [::Gapic::Config::Method]
|
1153
|
+
#
|
1154
|
+
attr_reader :set_private_ip_google_access
|
1155
|
+
##
|
1156
|
+
# RPC-specific configuration for `test_iam_permissions`
|
1157
|
+
# @return [::Gapic::Config::Method]
|
1158
|
+
#
|
1159
|
+
attr_reader :test_iam_permissions
|
1160
|
+
|
1161
|
+
# @private
|
1162
|
+
def initialize parent_rpcs = nil
|
1163
|
+
aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
|
1164
|
+
@aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
|
1165
|
+
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
1166
|
+
@delete = ::Gapic::Config::Method.new delete_config
|
1167
|
+
expand_ip_cidr_range_config = parent_rpcs.expand_ip_cidr_range if parent_rpcs.respond_to? :expand_ip_cidr_range
|
1168
|
+
@expand_ip_cidr_range = ::Gapic::Config::Method.new expand_ip_cidr_range_config
|
1169
|
+
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|
1170
|
+
@get = ::Gapic::Config::Method.new get_config
|
1171
|
+
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
1172
|
+
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
1173
|
+
insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
|
1174
|
+
@insert = ::Gapic::Config::Method.new insert_config
|
1175
|
+
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
1176
|
+
@list = ::Gapic::Config::Method.new list_config
|
1177
|
+
list_usable_config = parent_rpcs.list_usable if parent_rpcs.respond_to? :list_usable
|
1178
|
+
@list_usable = ::Gapic::Config::Method.new list_usable_config
|
1179
|
+
patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
|
1180
|
+
@patch = ::Gapic::Config::Method.new patch_config
|
1181
|
+
set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
|
1182
|
+
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
1183
|
+
set_private_ip_google_access_config = parent_rpcs.set_private_ip_google_access if parent_rpcs.respond_to? :set_private_ip_google_access
|
1184
|
+
@set_private_ip_google_access = ::Gapic::Config::Method.new set_private_ip_google_access_config
|
1185
|
+
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
1186
|
+
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
1187
|
+
|
1188
|
+
yield self if block_given?
|
1189
|
+
end
|
1190
|
+
end
|
1122
1191
|
end
|
1123
1192
|
end
|
1124
1193
|
end
|