google-cloud-compute-v1 0.2.0 → 0.3.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 +12 -12
- data/README.md +4 -30
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +123 -66
- 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 +166 -96
- 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 +210 -128
- 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 +228 -143
- 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 +294 -187
- 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 +816 -135
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +123 -66
- 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 +334 -213
- 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 +180 -107
- 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 +463 -280
- 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 +185 -113
- 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 +292 -127
- 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 +141 -81
- 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 +259 -112
- 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 +207 -128
- 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 +159 -88
- 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 +116 -64
- 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 +170 -97
- 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 +210 -128
- 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/images/rest/client.rb +284 -174
- 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 +497 -328
- 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 +255 -161
- 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 +198 -117
- 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 +1079 -609
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +1975 -0
- data/lib/google/cloud/compute/v1/instances/rest.rb +0 -2
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +188 -112
- 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 +98 -51
- 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 +184 -108
- 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 +91 -48
- 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 +198 -117
- 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 +123 -66
- 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 +251 -157
- 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 +349 -173
- 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 +333 -211
- 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 +223 -132
- 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 +123 -66
- 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 +206 -124
- 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 +338 -219
- 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 +170 -97
- 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 +196 -112
- 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 +185 -113
- 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 +203 -125
- 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 +145 -82
- 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 +98 -51
- 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 +309 -198
- 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 +163 -97
- 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 +185 -113
- 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 +472 -313
- 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 +143 -84
- 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 +75 -40
- 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 +141 -81
- 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 +141 -81
- 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 +134 -73
- 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 +141 -81
- 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 +163 -97
- 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 +185 -113
- 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 +203 -125
- 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 +98 -51
- 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 +245 -148
- 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 +223 -132
- 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 +274 -166
- 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 +141 -81
- 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 +270 -166
- 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/snapshots/rest/client.rb +197 -115
- 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 +166 -96
- 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 +185 -110
- 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 +314 -195
- 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 +163 -97
- 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 +210 -128
- 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 +334 -159
- 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 +166 -96
- 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 +294 -188
- 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 +229 -145
- 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 +185 -113
- 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 +166 -96
- 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 +250 -156
- 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 +227 -135
- 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 +166 -96
- 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 +134 -73
- 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 +98 -51
- 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 +5 -0
- data/proto_docs/README.md +1 -1
- data/proto_docs/google/cloud/compute/v1/compute.rb +2526 -640
- metadata +84 -8
@@ -0,0 +1,324 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/compute/v1/compute_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Compute
|
24
|
+
module V1
|
25
|
+
module SslPolicies
|
26
|
+
module Rest
|
27
|
+
##
|
28
|
+
# REST service stub for the SslPolicies service.
|
29
|
+
# service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call and deserialing the response
|
31
|
+
#
|
32
|
+
class ServiceStub
|
33
|
+
def initialize endpoint:, credentials:
|
34
|
+
# These require statements are intentionally placed here to initialize
|
35
|
+
# the REST modules only when it's required.
|
36
|
+
require "gapic/rest"
|
37
|
+
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials
|
39
|
+
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# Baseline implementation for the delete REST call
|
43
|
+
#
|
44
|
+
# @param request_pb [::Google::Cloud::Compute::V1::DeleteSslPolicyRequest]
|
45
|
+
# A request object representing the call parameters. Required.
|
46
|
+
# @param options [::Gapic::CallOptions]
|
47
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
48
|
+
#
|
49
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
50
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
51
|
+
# @yieldparam response [::Faraday::Response]
|
52
|
+
#
|
53
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
54
|
+
# A result object deserialized from the server's reply
|
55
|
+
def delete request_pb, options = nil
|
56
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
57
|
+
|
58
|
+
uri, _body, query_string_params = transcode_delete_request request_pb
|
59
|
+
response = @client_stub.make_delete_request(
|
60
|
+
uri: uri,
|
61
|
+
params: query_string_params,
|
62
|
+
options: options
|
63
|
+
)
|
64
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
65
|
+
|
66
|
+
yield result, response if block_given?
|
67
|
+
result
|
68
|
+
end
|
69
|
+
|
70
|
+
##
|
71
|
+
# GRPC transcoding helper method for the delete REST call
|
72
|
+
#
|
73
|
+
# @param request_pb [::Google::Cloud::Compute::V1::DeleteSslPolicyRequest]
|
74
|
+
# A request object representing the call parameters. Required.
|
75
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
76
|
+
# Uri, Body, Query string parameters
|
77
|
+
def transcode_delete_request request_pb
|
78
|
+
uri = "/compute/v1/projects/#{request_pb.project}/global/sslPolicies/#{request_pb.ssl_policy}"
|
79
|
+
body = nil
|
80
|
+
query_string_params = {}
|
81
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
82
|
+
|
83
|
+
[uri, body, query_string_params]
|
84
|
+
end
|
85
|
+
|
86
|
+
##
|
87
|
+
# Baseline implementation for the get REST call
|
88
|
+
#
|
89
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetSslPolicyRequest]
|
90
|
+
# A request object representing the call parameters. Required.
|
91
|
+
# @param options [::Gapic::CallOptions]
|
92
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
93
|
+
#
|
94
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
95
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::SslPolicy]
|
96
|
+
# @yieldparam response [::Faraday::Response]
|
97
|
+
#
|
98
|
+
# @return [::Google::Cloud::Compute::V1::SslPolicy]
|
99
|
+
# A result object deserialized from the server's reply
|
100
|
+
def get request_pb, options = nil
|
101
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
102
|
+
|
103
|
+
uri, _body, _query_string_params = transcode_get_request request_pb
|
104
|
+
response = @client_stub.make_get_request(
|
105
|
+
uri: uri,
|
106
|
+
options: options
|
107
|
+
)
|
108
|
+
result = ::Google::Cloud::Compute::V1::SslPolicy.decode_json response.body, ignore_unknown_fields: true
|
109
|
+
|
110
|
+
yield result, response if block_given?
|
111
|
+
result
|
112
|
+
end
|
113
|
+
|
114
|
+
##
|
115
|
+
# GRPC transcoding helper method for the get REST call
|
116
|
+
#
|
117
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetSslPolicyRequest]
|
118
|
+
# A request object representing the call parameters. Required.
|
119
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
120
|
+
# Uri, Body, Query string parameters
|
121
|
+
def transcode_get_request request_pb
|
122
|
+
uri = "/compute/v1/projects/#{request_pb.project}/global/sslPolicies/#{request_pb.ssl_policy}"
|
123
|
+
body = nil
|
124
|
+
query_string_params = {}
|
125
|
+
|
126
|
+
[uri, body, query_string_params]
|
127
|
+
end
|
128
|
+
|
129
|
+
##
|
130
|
+
# Baseline implementation for the insert REST call
|
131
|
+
#
|
132
|
+
# @param request_pb [::Google::Cloud::Compute::V1::InsertSslPolicyRequest]
|
133
|
+
# A request object representing the call parameters. Required.
|
134
|
+
# @param options [::Gapic::CallOptions]
|
135
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
136
|
+
#
|
137
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
138
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
139
|
+
# @yieldparam response [::Faraday::Response]
|
140
|
+
#
|
141
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
142
|
+
# A result object deserialized from the server's reply
|
143
|
+
def insert request_pb, options = nil
|
144
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
145
|
+
|
146
|
+
uri, body, query_string_params = transcode_insert_request request_pb
|
147
|
+
response = @client_stub.make_post_request(
|
148
|
+
uri: uri,
|
149
|
+
body: body,
|
150
|
+
params: query_string_params,
|
151
|
+
options: options
|
152
|
+
)
|
153
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
154
|
+
|
155
|
+
yield result, response if block_given?
|
156
|
+
result
|
157
|
+
end
|
158
|
+
|
159
|
+
##
|
160
|
+
# GRPC transcoding helper method for the insert REST call
|
161
|
+
#
|
162
|
+
# @param request_pb [::Google::Cloud::Compute::V1::InsertSslPolicyRequest]
|
163
|
+
# A request object representing the call parameters. Required.
|
164
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
165
|
+
# Uri, Body, Query string parameters
|
166
|
+
def transcode_insert_request request_pb
|
167
|
+
uri = "/compute/v1/projects/#{request_pb.project}/global/sslPolicies"
|
168
|
+
body = request_pb.ssl_policy_resource.to_json
|
169
|
+
query_string_params = {}
|
170
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
171
|
+
|
172
|
+
[uri, body, query_string_params]
|
173
|
+
end
|
174
|
+
|
175
|
+
##
|
176
|
+
# Baseline implementation for the list REST call
|
177
|
+
#
|
178
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ListSslPoliciesRequest]
|
179
|
+
# A request object representing the call parameters. Required.
|
180
|
+
# @param options [::Gapic::CallOptions]
|
181
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
182
|
+
#
|
183
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
184
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::SslPoliciesList]
|
185
|
+
# @yieldparam response [::Faraday::Response]
|
186
|
+
#
|
187
|
+
# @return [::Google::Cloud::Compute::V1::SslPoliciesList]
|
188
|
+
# A result object deserialized from the server's reply
|
189
|
+
def list request_pb, options = nil
|
190
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
191
|
+
|
192
|
+
uri, _body, query_string_params = transcode_list_request request_pb
|
193
|
+
response = @client_stub.make_get_request(
|
194
|
+
uri: uri,
|
195
|
+
params: query_string_params,
|
196
|
+
options: options
|
197
|
+
)
|
198
|
+
result = ::Google::Cloud::Compute::V1::SslPoliciesList.decode_json response.body, ignore_unknown_fields: true
|
199
|
+
|
200
|
+
yield result, response if block_given?
|
201
|
+
result
|
202
|
+
end
|
203
|
+
|
204
|
+
##
|
205
|
+
# GRPC transcoding helper method for the list REST call
|
206
|
+
#
|
207
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ListSslPoliciesRequest]
|
208
|
+
# A request object representing the call parameters. Required.
|
209
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
210
|
+
# Uri, Body, Query string parameters
|
211
|
+
def transcode_list_request request_pb
|
212
|
+
uri = "/compute/v1/projects/#{request_pb.project}/global/sslPolicies"
|
213
|
+
body = nil
|
214
|
+
query_string_params = {}
|
215
|
+
query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
|
216
|
+
query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
|
217
|
+
query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
|
218
|
+
query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
|
219
|
+
query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
|
220
|
+
|
221
|
+
[uri, body, query_string_params]
|
222
|
+
end
|
223
|
+
|
224
|
+
##
|
225
|
+
# Baseline implementation for the list_available_features REST call
|
226
|
+
#
|
227
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ListAvailableFeaturesSslPoliciesRequest]
|
228
|
+
# A request object representing the call parameters. Required.
|
229
|
+
# @param options [::Gapic::CallOptions]
|
230
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
231
|
+
#
|
232
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
233
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::SslPoliciesListAvailableFeaturesResponse]
|
234
|
+
# @yieldparam response [::Faraday::Response]
|
235
|
+
#
|
236
|
+
# @return [::Google::Cloud::Compute::V1::SslPoliciesListAvailableFeaturesResponse]
|
237
|
+
# A result object deserialized from the server's reply
|
238
|
+
def list_available_features request_pb, options = nil
|
239
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
240
|
+
|
241
|
+
uri, _body, query_string_params = transcode_list_available_features_request request_pb
|
242
|
+
response = @client_stub.make_get_request(
|
243
|
+
uri: uri,
|
244
|
+
params: query_string_params,
|
245
|
+
options: options
|
246
|
+
)
|
247
|
+
result = ::Google::Cloud::Compute::V1::SslPoliciesListAvailableFeaturesResponse.decode_json response.body, ignore_unknown_fields: true
|
248
|
+
|
249
|
+
yield result, response if block_given?
|
250
|
+
result
|
251
|
+
end
|
252
|
+
|
253
|
+
##
|
254
|
+
# GRPC transcoding helper method for the list_available_features REST call
|
255
|
+
#
|
256
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ListAvailableFeaturesSslPoliciesRequest]
|
257
|
+
# A request object representing the call parameters. Required.
|
258
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
259
|
+
# Uri, Body, Query string parameters
|
260
|
+
def transcode_list_available_features_request request_pb
|
261
|
+
uri = "/compute/v1/projects/#{request_pb.project}/global/sslPolicies/listAvailableFeatures"
|
262
|
+
body = nil
|
263
|
+
query_string_params = {}
|
264
|
+
query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
|
265
|
+
query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
|
266
|
+
query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
|
267
|
+
query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
|
268
|
+
query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
|
269
|
+
|
270
|
+
[uri, body, query_string_params]
|
271
|
+
end
|
272
|
+
|
273
|
+
##
|
274
|
+
# Baseline implementation for the patch REST call
|
275
|
+
#
|
276
|
+
# @param request_pb [::Google::Cloud::Compute::V1::PatchSslPolicyRequest]
|
277
|
+
# A request object representing the call parameters. Required.
|
278
|
+
# @param options [::Gapic::CallOptions]
|
279
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
280
|
+
#
|
281
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
282
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
283
|
+
# @yieldparam response [::Faraday::Response]
|
284
|
+
#
|
285
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
286
|
+
# A result object deserialized from the server's reply
|
287
|
+
def patch request_pb, options = nil
|
288
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
289
|
+
|
290
|
+
uri, body, query_string_params = transcode_patch_request request_pb
|
291
|
+
response = @client_stub.make_patch_request(
|
292
|
+
uri: uri,
|
293
|
+
body: body,
|
294
|
+
params: query_string_params,
|
295
|
+
options: options
|
296
|
+
)
|
297
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
298
|
+
|
299
|
+
yield result, response if block_given?
|
300
|
+
result
|
301
|
+
end
|
302
|
+
|
303
|
+
##
|
304
|
+
# GRPC transcoding helper method for the patch REST call
|
305
|
+
#
|
306
|
+
# @param request_pb [::Google::Cloud::Compute::V1::PatchSslPolicyRequest]
|
307
|
+
# A request object representing the call parameters. Required.
|
308
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
309
|
+
# Uri, Body, Query string parameters
|
310
|
+
def transcode_patch_request request_pb
|
311
|
+
uri = "/compute/v1/projects/#{request_pb.project}/global/sslPolicies/#{request_pb.ssl_policy}"
|
312
|
+
body = request_pb.ssl_policy_resource.to_json
|
313
|
+
query_string_params = {}
|
314
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
315
|
+
|
316
|
+
[uri, body, query_string_params]
|
317
|
+
end
|
318
|
+
end
|
319
|
+
end
|
320
|
+
end
|
321
|
+
end
|
322
|
+
end
|
323
|
+
end
|
324
|
+
end
|
@@ -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
|
-
#
|
44
|
+
# @example
|
46
45
|
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
# end
|
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
|
@@ -178,12 +207,12 @@ module Google
|
|
178
207
|
# @param project [::String]
|
179
208
|
# Project ID for this request.
|
180
209
|
# @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::
|
210
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
211
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
212
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::SubnetworksScopedList>]
|
184
213
|
# @yieldparam response [::Faraday::Response]
|
185
214
|
#
|
186
|
-
# @return [::Google::Cloud::Compute::V1::
|
215
|
+
# @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::SubnetworksScopedList>]
|
187
216
|
#
|
188
217
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
189
218
|
def aggregated_list request, options = nil
|
@@ -195,7 +224,7 @@ module Google
|
|
195
224
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
196
225
|
|
197
226
|
# Customize the options with defaults
|
198
|
-
call_metadata =
|
227
|
+
call_metadata = @config.rpcs.aggregated_list.metadata.to_h
|
199
228
|
|
200
229
|
# Set x-goog-api-client header
|
201
230
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -203,19 +232,17 @@ module Google
|
|
203
232
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
204
233
|
transports_version_send: [:rest]
|
205
234
|
|
206
|
-
options.apply_defaults timeout: @config.timeout,
|
235
|
+
options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
|
207
236
|
metadata: call_metadata
|
208
237
|
|
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
|
238
|
+
options.apply_defaults timeout: @config.timeout,
|
239
|
+
metadata: @config.metadata
|
216
240
|
|
217
|
-
|
218
|
-
|
241
|
+
@subnetworks_stub.aggregated_list request, options do |result, response|
|
242
|
+
result = ::Gapic::Rest::PagedEnumerable.new @subnetworks_stub, :aggregated_list, "items", request, result, options
|
243
|
+
yield result, response if block_given?
|
244
|
+
return result
|
245
|
+
end
|
219
246
|
rescue ::Faraday::Error => e
|
220
247
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
221
248
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -253,11 +280,11 @@ module Google
|
|
253
280
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
254
281
|
# @param subnetwork [::String]
|
255
282
|
# Name of the Subnetwork resource to delete.
|
256
|
-
# @yield [result,
|
257
|
-
# @yieldparam result [::
|
283
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
284
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
258
285
|
# @yieldparam response [::Faraday::Response]
|
259
286
|
#
|
260
|
-
# @return [::
|
287
|
+
# @return [::Gapic::Rest::BaseOperation]
|
261
288
|
#
|
262
289
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
263
290
|
def delete request, options = nil
|
@@ -269,7 +296,7 @@ module Google
|
|
269
296
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
270
297
|
|
271
298
|
# Customize the options with defaults
|
272
|
-
call_metadata =
|
299
|
+
call_metadata = @config.rpcs.delete.metadata.to_h
|
273
300
|
|
274
301
|
# Set x-goog-api-client header
|
275
302
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -277,19 +304,17 @@ module Google
|
|
277
304
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
278
305
|
transports_version_send: [:rest]
|
279
306
|
|
280
|
-
options.apply_defaults timeout: @config.timeout,
|
307
|
+
options.apply_defaults timeout: @config.rpcs.delete.timeout,
|
281
308
|
metadata: call_metadata
|
282
309
|
|
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
|
310
|
+
options.apply_defaults timeout: @config.timeout,
|
311
|
+
metadata: @config.metadata
|
290
312
|
|
291
|
-
|
292
|
-
|
313
|
+
@subnetworks_stub.delete request, options do |result, response|
|
314
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
315
|
+
yield result, response if block_given?
|
316
|
+
return result
|
317
|
+
end
|
293
318
|
rescue ::Faraday::Error => e
|
294
319
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
295
320
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -329,11 +354,11 @@ module Google
|
|
329
354
|
# Name of the Subnetwork resource to update.
|
330
355
|
# @param subnetworks_expand_ip_cidr_range_request_resource [::Google::Cloud::Compute::V1::SubnetworksExpandIpCidrRangeRequest, ::Hash]
|
331
356
|
# The body resource for this request
|
332
|
-
# @yield [result,
|
333
|
-
# @yieldparam result [::
|
357
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
358
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
334
359
|
# @yieldparam response [::Faraday::Response]
|
335
360
|
#
|
336
|
-
# @return [::
|
361
|
+
# @return [::Gapic::Rest::BaseOperation]
|
337
362
|
#
|
338
363
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
339
364
|
def expand_ip_cidr_range request, options = nil
|
@@ -345,7 +370,7 @@ module Google
|
|
345
370
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
346
371
|
|
347
372
|
# Customize the options with defaults
|
348
|
-
call_metadata =
|
373
|
+
call_metadata = @config.rpcs.expand_ip_cidr_range.metadata.to_h
|
349
374
|
|
350
375
|
# Set x-goog-api-client header
|
351
376
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -353,20 +378,17 @@ module Google
|
|
353
378
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
354
379
|
transports_version_send: [:rest]
|
355
380
|
|
356
|
-
options.apply_defaults timeout: @config.timeout,
|
381
|
+
options.apply_defaults timeout: @config.rpcs.expand_ip_cidr_range.timeout,
|
357
382
|
metadata: call_metadata
|
358
383
|
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
yield result, response if block_given?
|
369
|
-
result
|
384
|
+
options.apply_defaults timeout: @config.timeout,
|
385
|
+
metadata: @config.metadata
|
386
|
+
|
387
|
+
@subnetworks_stub.expand_ip_cidr_range request, options do |result, response|
|
388
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
389
|
+
yield result, response if block_given?
|
390
|
+
return result
|
391
|
+
end
|
370
392
|
rescue ::Faraday::Error => e
|
371
393
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
372
394
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -398,7 +420,7 @@ module Google
|
|
398
420
|
# Name of the region scoping this request.
|
399
421
|
# @param subnetwork [::String]
|
400
422
|
# Name of the Subnetwork resource to return.
|
401
|
-
# @yield [result,
|
423
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
402
424
|
# @yieldparam result [::Google::Cloud::Compute::V1::Subnetwork]
|
403
425
|
# @yieldparam response [::Faraday::Response]
|
404
426
|
#
|
@@ -414,7 +436,7 @@ module Google
|
|
414
436
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
415
437
|
|
416
438
|
# Customize the options with defaults
|
417
|
-
call_metadata =
|
439
|
+
call_metadata = @config.rpcs.get.metadata.to_h
|
418
440
|
|
419
441
|
# Set x-goog-api-client header
|
420
442
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -422,18 +444,16 @@ module Google
|
|
422
444
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
423
445
|
transports_version_send: [:rest]
|
424
446
|
|
425
|
-
options.apply_defaults timeout: @config.timeout,
|
447
|
+
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
426
448
|
metadata: call_metadata
|
427
449
|
|
428
|
-
|
429
|
-
|
430
|
-
uri: uri,
|
431
|
-
options: options
|
432
|
-
)
|
433
|
-
result = ::Google::Cloud::Compute::V1::Subnetwork.decode_json response.body, ignore_unknown_fields: true
|
450
|
+
options.apply_defaults timeout: @config.timeout,
|
451
|
+
metadata: @config.metadata
|
434
452
|
|
435
|
-
|
436
|
-
|
453
|
+
@subnetworks_stub.get request, options do |result, response|
|
454
|
+
yield result, response if block_given?
|
455
|
+
return result
|
456
|
+
end
|
437
457
|
rescue ::Faraday::Error => e
|
438
458
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
439
459
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -467,7 +487,7 @@ module Google
|
|
467
487
|
# The name of the region for this request.
|
468
488
|
# @param resource [::String]
|
469
489
|
# Name or id of the resource for this request.
|
470
|
-
# @yield [result,
|
490
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
471
491
|
# @yieldparam result [::Google::Cloud::Compute::V1::Policy]
|
472
492
|
# @yieldparam response [::Faraday::Response]
|
473
493
|
#
|
@@ -483,7 +503,7 @@ module Google
|
|
483
503
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
484
504
|
|
485
505
|
# Customize the options with defaults
|
486
|
-
call_metadata =
|
506
|
+
call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
487
507
|
|
488
508
|
# Set x-goog-api-client header
|
489
509
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -491,19 +511,16 @@ module Google
|
|
491
511
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
492
512
|
transports_version_send: [:rest]
|
493
513
|
|
494
|
-
options.apply_defaults timeout: @config.timeout,
|
514
|
+
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
495
515
|
metadata: call_metadata
|
496
516
|
|
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
|
517
|
+
options.apply_defaults timeout: @config.timeout,
|
518
|
+
metadata: @config.metadata
|
504
519
|
|
505
|
-
|
506
|
-
|
520
|
+
@subnetworks_stub.get_iam_policy request, options do |result, response|
|
521
|
+
yield result, response if block_given?
|
522
|
+
return result
|
523
|
+
end
|
507
524
|
rescue ::Faraday::Error => e
|
508
525
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
509
526
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -541,11 +558,11 @@ module Google
|
|
541
558
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
542
559
|
# @param subnetwork_resource [::Google::Cloud::Compute::V1::Subnetwork, ::Hash]
|
543
560
|
# The body resource for this request
|
544
|
-
# @yield [result,
|
545
|
-
# @yieldparam result [::
|
561
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
562
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
546
563
|
# @yieldparam response [::Faraday::Response]
|
547
564
|
#
|
548
|
-
# @return [::
|
565
|
+
# @return [::Gapic::Rest::BaseOperation]
|
549
566
|
#
|
550
567
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
551
568
|
def insert request, options = nil
|
@@ -557,7 +574,7 @@ module Google
|
|
557
574
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
558
575
|
|
559
576
|
# Customize the options with defaults
|
560
|
-
call_metadata =
|
577
|
+
call_metadata = @config.rpcs.insert.metadata.to_h
|
561
578
|
|
562
579
|
# Set x-goog-api-client header
|
563
580
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -565,20 +582,17 @@ module Google
|
|
565
582
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
566
583
|
transports_version_send: [:rest]
|
567
584
|
|
568
|
-
options.apply_defaults timeout: @config.timeout,
|
585
|
+
options.apply_defaults timeout: @config.rpcs.insert.timeout,
|
569
586
|
metadata: call_metadata
|
570
587
|
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
yield result, response if block_given?
|
581
|
-
result
|
588
|
+
options.apply_defaults timeout: @config.timeout,
|
589
|
+
metadata: @config.metadata
|
590
|
+
|
591
|
+
@subnetworks_stub.insert request, options do |result, response|
|
592
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
593
|
+
yield result, response if block_given?
|
594
|
+
return result
|
595
|
+
end
|
582
596
|
rescue ::Faraday::Error => e
|
583
597
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
584
598
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -627,12 +641,12 @@ module Google
|
|
627
641
|
# @param region [::String]
|
628
642
|
# Name of the region scoping this request.
|
629
643
|
# @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::
|
644
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
645
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
646
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Subnetwork>]
|
633
647
|
# @yieldparam response [::Faraday::Response]
|
634
648
|
#
|
635
|
-
# @return [::Google::Cloud::Compute::V1::
|
649
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Subnetwork>]
|
636
650
|
#
|
637
651
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
638
652
|
def list request, options = nil
|
@@ -644,7 +658,7 @@ module Google
|
|
644
658
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
645
659
|
|
646
660
|
# Customize the options with defaults
|
647
|
-
call_metadata =
|
661
|
+
call_metadata = @config.rpcs.list.metadata.to_h
|
648
662
|
|
649
663
|
# Set x-goog-api-client header
|
650
664
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -652,19 +666,17 @@ module Google
|
|
652
666
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
653
667
|
transports_version_send: [:rest]
|
654
668
|
|
655
|
-
options.apply_defaults timeout: @config.timeout,
|
669
|
+
options.apply_defaults timeout: @config.rpcs.list.timeout,
|
656
670
|
metadata: call_metadata
|
657
671
|
|
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
|
672
|
+
options.apply_defaults timeout: @config.timeout,
|
673
|
+
metadata: @config.metadata
|
665
674
|
|
666
|
-
|
667
|
-
|
675
|
+
@subnetworks_stub.list request, options do |result, response|
|
676
|
+
result = ::Gapic::Rest::PagedEnumerable.new @subnetworks_stub, :list, "items", request, result, options
|
677
|
+
yield result, response if block_given?
|
678
|
+
return result
|
679
|
+
end
|
668
680
|
rescue ::Faraday::Error => e
|
669
681
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
670
682
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -711,12 +723,12 @@ module Google
|
|
711
723
|
# @param project [::String]
|
712
724
|
# Project ID for this request.
|
713
725
|
# @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::
|
726
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
727
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
728
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::UsableSubnetwork>]
|
717
729
|
# @yieldparam response [::Faraday::Response]
|
718
730
|
#
|
719
|
-
# @return [::Google::Cloud::Compute::V1::
|
731
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::UsableSubnetwork>]
|
720
732
|
#
|
721
733
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
722
734
|
def list_usable request, options = nil
|
@@ -728,7 +740,7 @@ module Google
|
|
728
740
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
729
741
|
|
730
742
|
# Customize the options with defaults
|
731
|
-
call_metadata =
|
743
|
+
call_metadata = @config.rpcs.list_usable.metadata.to_h
|
732
744
|
|
733
745
|
# Set x-goog-api-client header
|
734
746
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -736,19 +748,17 @@ module Google
|
|
736
748
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
737
749
|
transports_version_send: [:rest]
|
738
750
|
|
739
|
-
options.apply_defaults timeout: @config.timeout,
|
751
|
+
options.apply_defaults timeout: @config.rpcs.list_usable.timeout,
|
740
752
|
metadata: call_metadata
|
741
753
|
|
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
|
754
|
+
options.apply_defaults timeout: @config.timeout,
|
755
|
+
metadata: @config.metadata
|
749
756
|
|
750
|
-
|
751
|
-
|
757
|
+
@subnetworks_stub.list_usable request, options do |result, response|
|
758
|
+
result = ::Gapic::Rest::PagedEnumerable.new @subnetworks_stub, :list_usable, "items", request, result, options
|
759
|
+
yield result, response if block_given?
|
760
|
+
return result
|
761
|
+
end
|
752
762
|
rescue ::Faraday::Error => e
|
753
763
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
754
764
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -790,11 +800,11 @@ module Google
|
|
790
800
|
# Name of the Subnetwork resource to patch.
|
791
801
|
# @param subnetwork_resource [::Google::Cloud::Compute::V1::Subnetwork, ::Hash]
|
792
802
|
# The body resource for this request
|
793
|
-
# @yield [result,
|
794
|
-
# @yieldparam result [::
|
803
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
804
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
795
805
|
# @yieldparam response [::Faraday::Response]
|
796
806
|
#
|
797
|
-
# @return [::
|
807
|
+
# @return [::Gapic::Rest::BaseOperation]
|
798
808
|
#
|
799
809
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
800
810
|
def patch request, options = nil
|
@@ -806,7 +816,7 @@ module Google
|
|
806
816
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
807
817
|
|
808
818
|
# Customize the options with defaults
|
809
|
-
call_metadata =
|
819
|
+
call_metadata = @config.rpcs.patch.metadata.to_h
|
810
820
|
|
811
821
|
# Set x-goog-api-client header
|
812
822
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -814,20 +824,17 @@ module Google
|
|
814
824
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
815
825
|
transports_version_send: [:rest]
|
816
826
|
|
817
|
-
options.apply_defaults timeout: @config.timeout,
|
827
|
+
options.apply_defaults timeout: @config.rpcs.patch.timeout,
|
818
828
|
metadata: call_metadata
|
819
829
|
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
yield result, response if block_given?
|
830
|
-
result
|
830
|
+
options.apply_defaults timeout: @config.timeout,
|
831
|
+
metadata: @config.metadata
|
832
|
+
|
833
|
+
@subnetworks_stub.patch request, options do |result, response|
|
834
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
835
|
+
yield result, response if block_given?
|
836
|
+
return result
|
837
|
+
end
|
831
838
|
rescue ::Faraday::Error => e
|
832
839
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
833
840
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -861,7 +868,7 @@ module Google
|
|
861
868
|
# The body resource for this request
|
862
869
|
# @param resource [::String]
|
863
870
|
# Name or id of the resource for this request.
|
864
|
-
# @yield [result,
|
871
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
865
872
|
# @yieldparam result [::Google::Cloud::Compute::V1::Policy]
|
866
873
|
# @yieldparam response [::Faraday::Response]
|
867
874
|
#
|
@@ -877,7 +884,7 @@ module Google
|
|
877
884
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
878
885
|
|
879
886
|
# Customize the options with defaults
|
880
|
-
call_metadata =
|
887
|
+
call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
881
888
|
|
882
889
|
# Set x-goog-api-client header
|
883
890
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -885,19 +892,16 @@ module Google
|
|
885
892
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
886
893
|
transports_version_send: [:rest]
|
887
894
|
|
888
|
-
options.apply_defaults timeout: @config.timeout,
|
895
|
+
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
889
896
|
metadata: call_metadata
|
890
897
|
|
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
|
898
|
+
options.apply_defaults timeout: @config.timeout,
|
899
|
+
metadata: @config.metadata
|
898
900
|
|
899
|
-
|
900
|
-
|
901
|
+
@subnetworks_stub.set_iam_policy request, options do |result, response|
|
902
|
+
yield result, response if block_given?
|
903
|
+
return result
|
904
|
+
end
|
901
905
|
rescue ::Faraday::Error => e
|
902
906
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
903
907
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -937,11 +941,11 @@ module Google
|
|
937
941
|
# Name of the Subnetwork resource.
|
938
942
|
# @param subnetworks_set_private_ip_google_access_request_resource [::Google::Cloud::Compute::V1::SubnetworksSetPrivateIpGoogleAccessRequest, ::Hash]
|
939
943
|
# The body resource for this request
|
940
|
-
# @yield [result,
|
941
|
-
# @yieldparam result [::
|
944
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
945
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
942
946
|
# @yieldparam response [::Faraday::Response]
|
943
947
|
#
|
944
|
-
# @return [::
|
948
|
+
# @return [::Gapic::Rest::BaseOperation]
|
945
949
|
#
|
946
950
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
947
951
|
def set_private_ip_google_access request, options = nil
|
@@ -953,7 +957,7 @@ module Google
|
|
953
957
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
954
958
|
|
955
959
|
# Customize the options with defaults
|
956
|
-
call_metadata =
|
960
|
+
call_metadata = @config.rpcs.set_private_ip_google_access.metadata.to_h
|
957
961
|
|
958
962
|
# Set x-goog-api-client header
|
959
963
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -961,20 +965,17 @@ module Google
|
|
961
965
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
962
966
|
transports_version_send: [:rest]
|
963
967
|
|
964
|
-
options.apply_defaults timeout: @config.timeout,
|
968
|
+
options.apply_defaults timeout: @config.rpcs.set_private_ip_google_access.timeout,
|
965
969
|
metadata: call_metadata
|
966
970
|
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
yield result, response if block_given?
|
977
|
-
result
|
971
|
+
options.apply_defaults timeout: @config.timeout,
|
972
|
+
metadata: @config.metadata
|
973
|
+
|
974
|
+
@subnetworks_stub.set_private_ip_google_access request, options do |result, response|
|
975
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
976
|
+
yield result, response if block_given?
|
977
|
+
return result
|
978
|
+
end
|
978
979
|
rescue ::Faraday::Error => e
|
979
980
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
980
981
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1008,7 +1009,7 @@ module Google
|
|
1008
1009
|
# Name or id of the resource for this request.
|
1009
1010
|
# @param test_permissions_request_resource [::Google::Cloud::Compute::V1::TestPermissionsRequest, ::Hash]
|
1010
1011
|
# The body resource for this request
|
1011
|
-
# @yield [result,
|
1012
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1012
1013
|
# @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
|
1013
1014
|
# @yieldparam response [::Faraday::Response]
|
1014
1015
|
#
|
@@ -1024,7 +1025,7 @@ module Google
|
|
1024
1025
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1025
1026
|
|
1026
1027
|
# Customize the options with defaults
|
1027
|
-
call_metadata =
|
1028
|
+
call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
1028
1029
|
|
1029
1030
|
# Set x-goog-api-client header
|
1030
1031
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1032,19 +1033,16 @@ module Google
|
|
1032
1033
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1033
1034
|
transports_version_send: [:rest]
|
1034
1035
|
|
1035
|
-
options.apply_defaults timeout: @config.timeout,
|
1036
|
+
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
1036
1037
|
metadata: call_metadata
|
1037
1038
|
|
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
|
1039
|
+
options.apply_defaults timeout: @config.timeout,
|
1040
|
+
metadata: @config.metadata
|
1045
1041
|
|
1046
|
-
|
1047
|
-
|
1042
|
+
@subnetworks_stub.test_iam_permissions request, options do |result, response|
|
1043
|
+
yield result, response if block_given?
|
1044
|
+
return result
|
1045
|
+
end
|
1048
1046
|
rescue ::Faraday::Error => e
|
1049
1047
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1050
1048
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1099,6 +1097,9 @@ module Google
|
|
1099
1097
|
# @!attribute [rw] timeout
|
1100
1098
|
# The call timeout in seconds.
|
1101
1099
|
# @return [::Numeric]
|
1100
|
+
# @!attribute [rw] metadata
|
1101
|
+
# Additional REST headers to be sent with the call.
|
1102
|
+
# @return [::Hash{::Symbol=>::String}]
|
1102
1103
|
#
|
1103
1104
|
class Configuration
|
1104
1105
|
extend ::Gapic::Config
|
@@ -1112,6 +1113,7 @@ module Google
|
|
1112
1113
|
config_attr :lib_name, nil, ::String, nil
|
1113
1114
|
config_attr :lib_version, nil, ::String, nil
|
1114
1115
|
config_attr :timeout, nil, ::Numeric, nil
|
1116
|
+
config_attr :metadata, nil, ::Hash, nil
|
1115
1117
|
|
1116
1118
|
# @private
|
1117
1119
|
def initialize parent_config = nil
|
@@ -1119,6 +1121,123 @@ module Google
|
|
1119
1121
|
|
1120
1122
|
yield self if block_given?
|
1121
1123
|
end
|
1124
|
+
|
1125
|
+
##
|
1126
|
+
# Configurations for individual RPCs
|
1127
|
+
# @return [Rpcs]
|
1128
|
+
#
|
1129
|
+
def rpcs
|
1130
|
+
@rpcs ||= begin
|
1131
|
+
parent_rpcs = nil
|
1132
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1133
|
+
Rpcs.new parent_rpcs
|
1134
|
+
end
|
1135
|
+
end
|
1136
|
+
|
1137
|
+
##
|
1138
|
+
# Configuration RPC class for the Subnetworks API.
|
1139
|
+
#
|
1140
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1141
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1142
|
+
# the following configuration fields:
|
1143
|
+
#
|
1144
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1145
|
+
#
|
1146
|
+
# there is one other field (`retry_policy`) that can be set
|
1147
|
+
# but is currently not supported for REST Gapic libraries.
|
1148
|
+
#
|
1149
|
+
class Rpcs
|
1150
|
+
##
|
1151
|
+
# RPC-specific configuration for `aggregated_list`
|
1152
|
+
# @return [::Gapic::Config::Method]
|
1153
|
+
#
|
1154
|
+
attr_reader :aggregated_list
|
1155
|
+
##
|
1156
|
+
# RPC-specific configuration for `delete`
|
1157
|
+
# @return [::Gapic::Config::Method]
|
1158
|
+
#
|
1159
|
+
attr_reader :delete
|
1160
|
+
##
|
1161
|
+
# RPC-specific configuration for `expand_ip_cidr_range`
|
1162
|
+
# @return [::Gapic::Config::Method]
|
1163
|
+
#
|
1164
|
+
attr_reader :expand_ip_cidr_range
|
1165
|
+
##
|
1166
|
+
# RPC-specific configuration for `get`
|
1167
|
+
# @return [::Gapic::Config::Method]
|
1168
|
+
#
|
1169
|
+
attr_reader :get
|
1170
|
+
##
|
1171
|
+
# RPC-specific configuration for `get_iam_policy`
|
1172
|
+
# @return [::Gapic::Config::Method]
|
1173
|
+
#
|
1174
|
+
attr_reader :get_iam_policy
|
1175
|
+
##
|
1176
|
+
# RPC-specific configuration for `insert`
|
1177
|
+
# @return [::Gapic::Config::Method]
|
1178
|
+
#
|
1179
|
+
attr_reader :insert
|
1180
|
+
##
|
1181
|
+
# RPC-specific configuration for `list`
|
1182
|
+
# @return [::Gapic::Config::Method]
|
1183
|
+
#
|
1184
|
+
attr_reader :list
|
1185
|
+
##
|
1186
|
+
# RPC-specific configuration for `list_usable`
|
1187
|
+
# @return [::Gapic::Config::Method]
|
1188
|
+
#
|
1189
|
+
attr_reader :list_usable
|
1190
|
+
##
|
1191
|
+
# RPC-specific configuration for `patch`
|
1192
|
+
# @return [::Gapic::Config::Method]
|
1193
|
+
#
|
1194
|
+
attr_reader :patch
|
1195
|
+
##
|
1196
|
+
# RPC-specific configuration for `set_iam_policy`
|
1197
|
+
# @return [::Gapic::Config::Method]
|
1198
|
+
#
|
1199
|
+
attr_reader :set_iam_policy
|
1200
|
+
##
|
1201
|
+
# RPC-specific configuration for `set_private_ip_google_access`
|
1202
|
+
# @return [::Gapic::Config::Method]
|
1203
|
+
#
|
1204
|
+
attr_reader :set_private_ip_google_access
|
1205
|
+
##
|
1206
|
+
# RPC-specific configuration for `test_iam_permissions`
|
1207
|
+
# @return [::Gapic::Config::Method]
|
1208
|
+
#
|
1209
|
+
attr_reader :test_iam_permissions
|
1210
|
+
|
1211
|
+
# @private
|
1212
|
+
def initialize parent_rpcs = nil
|
1213
|
+
aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
|
1214
|
+
@aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
|
1215
|
+
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
1216
|
+
@delete = ::Gapic::Config::Method.new delete_config
|
1217
|
+
expand_ip_cidr_range_config = parent_rpcs.expand_ip_cidr_range if parent_rpcs.respond_to? :expand_ip_cidr_range
|
1218
|
+
@expand_ip_cidr_range = ::Gapic::Config::Method.new expand_ip_cidr_range_config
|
1219
|
+
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|
1220
|
+
@get = ::Gapic::Config::Method.new get_config
|
1221
|
+
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
1222
|
+
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
1223
|
+
insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
|
1224
|
+
@insert = ::Gapic::Config::Method.new insert_config
|
1225
|
+
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
1226
|
+
@list = ::Gapic::Config::Method.new list_config
|
1227
|
+
list_usable_config = parent_rpcs.list_usable if parent_rpcs.respond_to? :list_usable
|
1228
|
+
@list_usable = ::Gapic::Config::Method.new list_usable_config
|
1229
|
+
patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
|
1230
|
+
@patch = ::Gapic::Config::Method.new patch_config
|
1231
|
+
set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
|
1232
|
+
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
1233
|
+
set_private_ip_google_access_config = parent_rpcs.set_private_ip_google_access if parent_rpcs.respond_to? :set_private_ip_google_access
|
1234
|
+
@set_private_ip_google_access = ::Gapic::Config::Method.new set_private_ip_google_access_config
|
1235
|
+
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
1236
|
+
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
1237
|
+
|
1238
|
+
yield self if block_given?
|
1239
|
+
end
|
1240
|
+
end
|
1122
1241
|
end
|
1123
1242
|
end
|
1124
1243
|
end
|