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,279 @@
|
|
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 TargetInstances
|
26
|
+
module Rest
|
27
|
+
##
|
28
|
+
# REST service stub for the TargetInstances 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 aggregated_list REST call
|
43
|
+
#
|
44
|
+
# @param request_pb [::Google::Cloud::Compute::V1::AggregatedListTargetInstancesRequest]
|
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::TargetInstanceAggregatedList]
|
51
|
+
# @yieldparam response [::Faraday::Response]
|
52
|
+
#
|
53
|
+
# @return [::Google::Cloud::Compute::V1::TargetInstanceAggregatedList]
|
54
|
+
# A result object deserialized from the server's reply
|
55
|
+
def aggregated_list request_pb, options = nil
|
56
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
57
|
+
|
58
|
+
uri, _body, query_string_params = transcode_aggregated_list_request request_pb
|
59
|
+
response = @client_stub.make_get_request(
|
60
|
+
uri: uri,
|
61
|
+
params: query_string_params,
|
62
|
+
options: options
|
63
|
+
)
|
64
|
+
result = ::Google::Cloud::Compute::V1::TargetInstanceAggregatedList.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 aggregated_list REST call
|
72
|
+
#
|
73
|
+
# @param request_pb [::Google::Cloud::Compute::V1::AggregatedListTargetInstancesRequest]
|
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_aggregated_list_request request_pb
|
78
|
+
uri = "/compute/v1/projects/#{request_pb.project}/aggregated/targetInstances"
|
79
|
+
body = nil
|
80
|
+
query_string_params = {}
|
81
|
+
query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
|
82
|
+
query_string_params["includeAllScopes"] = request_pb.include_all_scopes.to_s if request_pb.has_include_all_scopes?
|
83
|
+
query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
|
84
|
+
query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
|
85
|
+
query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
|
86
|
+
query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
|
87
|
+
|
88
|
+
[uri, body, query_string_params]
|
89
|
+
end
|
90
|
+
|
91
|
+
##
|
92
|
+
# Baseline implementation for the delete REST call
|
93
|
+
#
|
94
|
+
# @param request_pb [::Google::Cloud::Compute::V1::DeleteTargetInstanceRequest]
|
95
|
+
# A request object representing the call parameters. Required.
|
96
|
+
# @param options [::Gapic::CallOptions]
|
97
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
98
|
+
#
|
99
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
100
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
101
|
+
# @yieldparam response [::Faraday::Response]
|
102
|
+
#
|
103
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
104
|
+
# A result object deserialized from the server's reply
|
105
|
+
def delete request_pb, options = nil
|
106
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
107
|
+
|
108
|
+
uri, _body, query_string_params = transcode_delete_request request_pb
|
109
|
+
response = @client_stub.make_delete_request(
|
110
|
+
uri: uri,
|
111
|
+
params: query_string_params,
|
112
|
+
options: options
|
113
|
+
)
|
114
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
115
|
+
|
116
|
+
yield result, response if block_given?
|
117
|
+
result
|
118
|
+
end
|
119
|
+
|
120
|
+
##
|
121
|
+
# GRPC transcoding helper method for the delete REST call
|
122
|
+
#
|
123
|
+
# @param request_pb [::Google::Cloud::Compute::V1::DeleteTargetInstanceRequest]
|
124
|
+
# A request object representing the call parameters. Required.
|
125
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
126
|
+
# Uri, Body, Query string parameters
|
127
|
+
def transcode_delete_request request_pb
|
128
|
+
uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/targetInstances/#{request_pb.target_instance}"
|
129
|
+
body = nil
|
130
|
+
query_string_params = {}
|
131
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
132
|
+
|
133
|
+
[uri, body, query_string_params]
|
134
|
+
end
|
135
|
+
|
136
|
+
##
|
137
|
+
# Baseline implementation for the get REST call
|
138
|
+
#
|
139
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetTargetInstanceRequest]
|
140
|
+
# A request object representing the call parameters. Required.
|
141
|
+
# @param options [::Gapic::CallOptions]
|
142
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
143
|
+
#
|
144
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
145
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::TargetInstance]
|
146
|
+
# @yieldparam response [::Faraday::Response]
|
147
|
+
#
|
148
|
+
# @return [::Google::Cloud::Compute::V1::TargetInstance]
|
149
|
+
# A result object deserialized from the server's reply
|
150
|
+
def get request_pb, options = nil
|
151
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
152
|
+
|
153
|
+
uri, _body, _query_string_params = transcode_get_request request_pb
|
154
|
+
response = @client_stub.make_get_request(
|
155
|
+
uri: uri,
|
156
|
+
options: options
|
157
|
+
)
|
158
|
+
result = ::Google::Cloud::Compute::V1::TargetInstance.decode_json response.body, ignore_unknown_fields: true
|
159
|
+
|
160
|
+
yield result, response if block_given?
|
161
|
+
result
|
162
|
+
end
|
163
|
+
|
164
|
+
##
|
165
|
+
# GRPC transcoding helper method for the get REST call
|
166
|
+
#
|
167
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetTargetInstanceRequest]
|
168
|
+
# A request object representing the call parameters. Required.
|
169
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
170
|
+
# Uri, Body, Query string parameters
|
171
|
+
def transcode_get_request request_pb
|
172
|
+
uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/targetInstances/#{request_pb.target_instance}"
|
173
|
+
body = nil
|
174
|
+
query_string_params = {}
|
175
|
+
|
176
|
+
[uri, body, query_string_params]
|
177
|
+
end
|
178
|
+
|
179
|
+
##
|
180
|
+
# Baseline implementation for the insert REST call
|
181
|
+
#
|
182
|
+
# @param request_pb [::Google::Cloud::Compute::V1::InsertTargetInstanceRequest]
|
183
|
+
# A request object representing the call parameters. Required.
|
184
|
+
# @param options [::Gapic::CallOptions]
|
185
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
186
|
+
#
|
187
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
188
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
189
|
+
# @yieldparam response [::Faraday::Response]
|
190
|
+
#
|
191
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
192
|
+
# A result object deserialized from the server's reply
|
193
|
+
def insert request_pb, options = nil
|
194
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
195
|
+
|
196
|
+
uri, body, query_string_params = transcode_insert_request request_pb
|
197
|
+
response = @client_stub.make_post_request(
|
198
|
+
uri: uri,
|
199
|
+
body: body,
|
200
|
+
params: query_string_params,
|
201
|
+
options: options
|
202
|
+
)
|
203
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
204
|
+
|
205
|
+
yield result, response if block_given?
|
206
|
+
result
|
207
|
+
end
|
208
|
+
|
209
|
+
##
|
210
|
+
# GRPC transcoding helper method for the insert REST call
|
211
|
+
#
|
212
|
+
# @param request_pb [::Google::Cloud::Compute::V1::InsertTargetInstanceRequest]
|
213
|
+
# A request object representing the call parameters. Required.
|
214
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
215
|
+
# Uri, Body, Query string parameters
|
216
|
+
def transcode_insert_request request_pb
|
217
|
+
uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/targetInstances"
|
218
|
+
body = request_pb.target_instance_resource.to_json
|
219
|
+
query_string_params = {}
|
220
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
221
|
+
|
222
|
+
[uri, body, query_string_params]
|
223
|
+
end
|
224
|
+
|
225
|
+
##
|
226
|
+
# Baseline implementation for the list REST call
|
227
|
+
#
|
228
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ListTargetInstancesRequest]
|
229
|
+
# A request object representing the call parameters. Required.
|
230
|
+
# @param options [::Gapic::CallOptions]
|
231
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
232
|
+
#
|
233
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
234
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::TargetInstanceList]
|
235
|
+
# @yieldparam response [::Faraday::Response]
|
236
|
+
#
|
237
|
+
# @return [::Google::Cloud::Compute::V1::TargetInstanceList]
|
238
|
+
# A result object deserialized from the server's reply
|
239
|
+
def list request_pb, options = nil
|
240
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
241
|
+
|
242
|
+
uri, _body, query_string_params = transcode_list_request request_pb
|
243
|
+
response = @client_stub.make_get_request(
|
244
|
+
uri: uri,
|
245
|
+
params: query_string_params,
|
246
|
+
options: options
|
247
|
+
)
|
248
|
+
result = ::Google::Cloud::Compute::V1::TargetInstanceList.decode_json response.body, ignore_unknown_fields: true
|
249
|
+
|
250
|
+
yield result, response if block_given?
|
251
|
+
result
|
252
|
+
end
|
253
|
+
|
254
|
+
##
|
255
|
+
# GRPC transcoding helper method for the list REST call
|
256
|
+
#
|
257
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ListTargetInstancesRequest]
|
258
|
+
# A request object representing the call parameters. Required.
|
259
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
260
|
+
# Uri, Body, Query string parameters
|
261
|
+
def transcode_list_request request_pb
|
262
|
+
uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/targetInstances"
|
263
|
+
body = nil
|
264
|
+
query_string_params = {}
|
265
|
+
query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
|
266
|
+
query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
|
267
|
+
query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
|
268
|
+
query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
|
269
|
+
query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
|
270
|
+
|
271
|
+
[uri, body, query_string_params]
|
272
|
+
end
|
273
|
+
end
|
274
|
+
end
|
275
|
+
end
|
276
|
+
end
|
277
|
+
end
|
278
|
+
end
|
279
|
+
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/target_pools/rest/service_stub"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -31,8 +32,6 @@ module Google
|
|
31
32
|
# The TargetPools API.
|
32
33
|
#
|
33
34
|
class Client
|
34
|
-
include GrpcTranscoding
|
35
|
-
|
36
35
|
# @private
|
37
36
|
attr_reader :target_pools_stub
|
38
37
|
|
@@ -42,13 +41,12 @@ module Google
|
|
42
41
|
# See {::Google::Cloud::Compute::V1::TargetPools::Rest::Client::Configuration}
|
43
42
|
# for a description of the configuration fields.
|
44
43
|
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
# To modify the configuration for all TargetPools clients:
|
44
|
+
# @example
|
48
45
|
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
46
|
+
# # Modify the configuration for all TargetPools clients
|
47
|
+
# ::Google::Cloud::Compute::V1::TargetPools::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,37 @@ module Google
|
|
66
64
|
end
|
67
65
|
default_config = Client::Configuration.new parent_config
|
68
66
|
|
67
|
+
default_config.rpcs.add_health_check.timeout = 600.0
|
68
|
+
|
69
|
+
default_config.rpcs.add_instance.timeout = 600.0
|
70
|
+
|
71
|
+
default_config.rpcs.aggregated_list.timeout = 600.0
|
72
|
+
default_config.rpcs.aggregated_list.retry_policy = {
|
73
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
74
|
+
}
|
75
|
+
|
76
|
+
default_config.rpcs.delete.timeout = 600.0
|
77
|
+
|
78
|
+
default_config.rpcs.get.timeout = 600.0
|
79
|
+
default_config.rpcs.get.retry_policy = {
|
80
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
81
|
+
}
|
82
|
+
|
83
|
+
default_config.rpcs.get_health.timeout = 600.0
|
84
|
+
|
85
|
+
default_config.rpcs.insert.timeout = 600.0
|
86
|
+
|
87
|
+
default_config.rpcs.list.timeout = 600.0
|
88
|
+
default_config.rpcs.list.retry_policy = {
|
89
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
90
|
+
}
|
91
|
+
|
92
|
+
default_config.rpcs.remove_health_check.timeout = 600.0
|
93
|
+
|
94
|
+
default_config.rpcs.remove_instance.timeout = 600.0
|
95
|
+
|
96
|
+
default_config.rpcs.set_backup.timeout = 600.0
|
97
|
+
|
69
98
|
default_config
|
70
99
|
end
|
71
100
|
yield @configure if block_given?
|
@@ -95,28 +124,20 @@ module Google
|
|
95
124
|
##
|
96
125
|
# Create a new TargetPools REST client object.
|
97
126
|
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
# To create a new TargetPools REST client with the default
|
101
|
-
# configuration:
|
127
|
+
# @example
|
102
128
|
#
|
103
|
-
#
|
129
|
+
# # Create a client using the default configuration
|
130
|
+
# client = ::Google::Cloud::Compute::V1::TargetPools::Rest::Client.new
|
104
131
|
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
# config.timeout = 10.0
|
110
|
-
# end
|
132
|
+
# # Create a client using a custom configuration
|
133
|
+
# client = ::Google::Cloud::Compute::V1::TargetPools::Rest::Client.new do |config|
|
134
|
+
# config.timeout = 10.0
|
135
|
+
# end
|
111
136
|
#
|
112
137
|
# @yield [config] Configure the TargetPools client.
|
113
138
|
# @yieldparam config [Client::Configuration]
|
114
139
|
#
|
115
140
|
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
141
|
# Create the configuration object
|
121
142
|
@config = Configuration.new Client.configure
|
122
143
|
|
@@ -126,11 +147,11 @@ module Google
|
|
126
147
|
# Create credentials
|
127
148
|
credentials = @config.credentials
|
128
149
|
credentials ||= Credentials.default scope: @config.scope
|
129
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
150
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
130
151
|
credentials = Credentials.new credentials, scope: @config.scope
|
131
152
|
end
|
132
153
|
|
133
|
-
@
|
154
|
+
@target_pools_stub = ::Google::Cloud::Compute::V1::TargetPools::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
134
155
|
end
|
135
156
|
|
136
157
|
# Service calls
|
@@ -169,11 +190,11 @@ module Google
|
|
169
190
|
# Name of the target pool to add a health check to.
|
170
191
|
# @param target_pools_add_health_check_request_resource [::Google::Cloud::Compute::V1::TargetPoolsAddHealthCheckRequest, ::Hash]
|
171
192
|
# The body resource for this request
|
172
|
-
# @yield [result,
|
173
|
-
# @yieldparam result [::
|
193
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
194
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
174
195
|
# @yieldparam response [::Faraday::Response]
|
175
196
|
#
|
176
|
-
# @return [::
|
197
|
+
# @return [::Gapic::Rest::BaseOperation]
|
177
198
|
#
|
178
199
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
179
200
|
def add_health_check request, options = nil
|
@@ -185,7 +206,7 @@ module Google
|
|
185
206
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
186
207
|
|
187
208
|
# Customize the options with defaults
|
188
|
-
call_metadata =
|
209
|
+
call_metadata = @config.rpcs.add_health_check.metadata.to_h
|
189
210
|
|
190
211
|
# Set x-goog-api-client header
|
191
212
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -193,20 +214,17 @@ module Google
|
|
193
214
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
194
215
|
transports_version_send: [:rest]
|
195
216
|
|
196
|
-
options.apply_defaults timeout: @config.timeout,
|
217
|
+
options.apply_defaults timeout: @config.rpcs.add_health_check.timeout,
|
197
218
|
metadata: call_metadata
|
198
219
|
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
yield result, response if block_given?
|
209
|
-
result
|
220
|
+
options.apply_defaults timeout: @config.timeout,
|
221
|
+
metadata: @config.metadata
|
222
|
+
|
223
|
+
@target_pools_stub.add_health_check request, options do |result, response|
|
224
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
225
|
+
yield result, response if block_given?
|
226
|
+
return result
|
227
|
+
end
|
210
228
|
rescue ::Faraday::Error => e
|
211
229
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
212
230
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -246,11 +264,11 @@ module Google
|
|
246
264
|
# Name of the TargetPool resource to add instances to.
|
247
265
|
# @param target_pools_add_instance_request_resource [::Google::Cloud::Compute::V1::TargetPoolsAddInstanceRequest, ::Hash]
|
248
266
|
# The body resource for this request
|
249
|
-
# @yield [result,
|
250
|
-
# @yieldparam result [::
|
267
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
268
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
251
269
|
# @yieldparam response [::Faraday::Response]
|
252
270
|
#
|
253
|
-
# @return [::
|
271
|
+
# @return [::Gapic::Rest::BaseOperation]
|
254
272
|
#
|
255
273
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
256
274
|
def add_instance request, options = nil
|
@@ -262,7 +280,7 @@ module Google
|
|
262
280
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
263
281
|
|
264
282
|
# Customize the options with defaults
|
265
|
-
call_metadata =
|
283
|
+
call_metadata = @config.rpcs.add_instance.metadata.to_h
|
266
284
|
|
267
285
|
# Set x-goog-api-client header
|
268
286
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -270,20 +288,17 @@ module Google
|
|
270
288
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
271
289
|
transports_version_send: [:rest]
|
272
290
|
|
273
|
-
options.apply_defaults timeout: @config.timeout,
|
291
|
+
options.apply_defaults timeout: @config.rpcs.add_instance.timeout,
|
274
292
|
metadata: call_metadata
|
275
293
|
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
yield result, response if block_given?
|
286
|
-
result
|
294
|
+
options.apply_defaults timeout: @config.timeout,
|
295
|
+
metadata: @config.metadata
|
296
|
+
|
297
|
+
@target_pools_stub.add_instance request, options do |result, response|
|
298
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
299
|
+
yield result, response if block_given?
|
300
|
+
return result
|
301
|
+
end
|
287
302
|
rescue ::Faraday::Error => e
|
288
303
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
289
304
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -332,12 +347,12 @@ module Google
|
|
332
347
|
# @param project [::String]
|
333
348
|
# Project ID for this request.
|
334
349
|
# @param return_partial_success [::Boolean]
|
335
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
336
|
-
# @yield [result,
|
337
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
350
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
351
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
352
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::TargetPoolsScopedList>]
|
338
353
|
# @yieldparam response [::Faraday::Response]
|
339
354
|
#
|
340
|
-
# @return [::Google::Cloud::Compute::V1::
|
355
|
+
# @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::TargetPoolsScopedList>]
|
341
356
|
#
|
342
357
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
343
358
|
def aggregated_list request, options = nil
|
@@ -349,7 +364,7 @@ module Google
|
|
349
364
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
350
365
|
|
351
366
|
# Customize the options with defaults
|
352
|
-
call_metadata =
|
367
|
+
call_metadata = @config.rpcs.aggregated_list.metadata.to_h
|
353
368
|
|
354
369
|
# Set x-goog-api-client header
|
355
370
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -357,19 +372,17 @@ module Google
|
|
357
372
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
358
373
|
transports_version_send: [:rest]
|
359
374
|
|
360
|
-
options.apply_defaults timeout: @config.timeout,
|
375
|
+
options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
|
361
376
|
metadata: call_metadata
|
362
377
|
|
363
|
-
|
364
|
-
|
365
|
-
uri: uri,
|
366
|
-
params: query_string_params,
|
367
|
-
options: options
|
368
|
-
)
|
369
|
-
result = ::Google::Cloud::Compute::V1::TargetPoolAggregatedList.decode_json response.body, ignore_unknown_fields: true
|
378
|
+
options.apply_defaults timeout: @config.timeout,
|
379
|
+
metadata: @config.metadata
|
370
380
|
|
371
|
-
|
372
|
-
|
381
|
+
@target_pools_stub.aggregated_list request, options do |result, response|
|
382
|
+
result = ::Gapic::Rest::PagedEnumerable.new @target_pools_stub, :aggregated_list, "items", request, result, options
|
383
|
+
yield result, response if block_given?
|
384
|
+
return result
|
385
|
+
end
|
373
386
|
rescue ::Faraday::Error => e
|
374
387
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
375
388
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -407,11 +420,11 @@ module Google
|
|
407
420
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
408
421
|
# @param target_pool [::String]
|
409
422
|
# Name of the TargetPool resource to delete.
|
410
|
-
# @yield [result,
|
411
|
-
# @yieldparam result [::
|
423
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
424
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
412
425
|
# @yieldparam response [::Faraday::Response]
|
413
426
|
#
|
414
|
-
# @return [::
|
427
|
+
# @return [::Gapic::Rest::BaseOperation]
|
415
428
|
#
|
416
429
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
417
430
|
def delete request, options = nil
|
@@ -423,7 +436,7 @@ module Google
|
|
423
436
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
424
437
|
|
425
438
|
# Customize the options with defaults
|
426
|
-
call_metadata =
|
439
|
+
call_metadata = @config.rpcs.delete.metadata.to_h
|
427
440
|
|
428
441
|
# Set x-goog-api-client header
|
429
442
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -431,19 +444,17 @@ module Google
|
|
431
444
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
432
445
|
transports_version_send: [:rest]
|
433
446
|
|
434
|
-
options.apply_defaults timeout: @config.timeout,
|
447
|
+
options.apply_defaults timeout: @config.rpcs.delete.timeout,
|
435
448
|
metadata: call_metadata
|
436
449
|
|
437
|
-
|
438
|
-
|
439
|
-
uri: uri,
|
440
|
-
params: query_string_params,
|
441
|
-
options: options
|
442
|
-
)
|
443
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
450
|
+
options.apply_defaults timeout: @config.timeout,
|
451
|
+
metadata: @config.metadata
|
444
452
|
|
445
|
-
|
446
|
-
|
453
|
+
@target_pools_stub.delete request, options do |result, response|
|
454
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
455
|
+
yield result, response if block_given?
|
456
|
+
return result
|
457
|
+
end
|
447
458
|
rescue ::Faraday::Error => e
|
448
459
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
449
460
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -475,7 +486,7 @@ module Google
|
|
475
486
|
# Name of the region scoping this request.
|
476
487
|
# @param target_pool [::String]
|
477
488
|
# Name of the TargetPool resource to return.
|
478
|
-
# @yield [result,
|
489
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
479
490
|
# @yieldparam result [::Google::Cloud::Compute::V1::TargetPool]
|
480
491
|
# @yieldparam response [::Faraday::Response]
|
481
492
|
#
|
@@ -491,7 +502,7 @@ module Google
|
|
491
502
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
492
503
|
|
493
504
|
# Customize the options with defaults
|
494
|
-
call_metadata =
|
505
|
+
call_metadata = @config.rpcs.get.metadata.to_h
|
495
506
|
|
496
507
|
# Set x-goog-api-client header
|
497
508
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -499,18 +510,16 @@ module Google
|
|
499
510
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
500
511
|
transports_version_send: [:rest]
|
501
512
|
|
502
|
-
options.apply_defaults timeout: @config.timeout,
|
513
|
+
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
503
514
|
metadata: call_metadata
|
504
515
|
|
505
|
-
|
506
|
-
|
507
|
-
uri: uri,
|
508
|
-
options: options
|
509
|
-
)
|
510
|
-
result = ::Google::Cloud::Compute::V1::TargetPool.decode_json response.body, ignore_unknown_fields: true
|
516
|
+
options.apply_defaults timeout: @config.timeout,
|
517
|
+
metadata: @config.metadata
|
511
518
|
|
512
|
-
|
513
|
-
|
519
|
+
@target_pools_stub.get request, options do |result, response|
|
520
|
+
yield result, response if block_given?
|
521
|
+
return result
|
522
|
+
end
|
514
523
|
rescue ::Faraday::Error => e
|
515
524
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
516
525
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -544,7 +553,7 @@ module Google
|
|
544
553
|
# Name of the region scoping this request.
|
545
554
|
# @param target_pool [::String]
|
546
555
|
# Name of the TargetPool resource to which the queried instance belongs.
|
547
|
-
# @yield [result,
|
556
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
548
557
|
# @yieldparam result [::Google::Cloud::Compute::V1::TargetPoolInstanceHealth]
|
549
558
|
# @yieldparam response [::Faraday::Response]
|
550
559
|
#
|
@@ -560,7 +569,7 @@ module Google
|
|
560
569
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
561
570
|
|
562
571
|
# Customize the options with defaults
|
563
|
-
call_metadata =
|
572
|
+
call_metadata = @config.rpcs.get_health.metadata.to_h
|
564
573
|
|
565
574
|
# Set x-goog-api-client header
|
566
575
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -568,19 +577,16 @@ module Google
|
|
568
577
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
569
578
|
transports_version_send: [:rest]
|
570
579
|
|
571
|
-
options.apply_defaults timeout: @config.timeout,
|
580
|
+
options.apply_defaults timeout: @config.rpcs.get_health.timeout,
|
572
581
|
metadata: call_metadata
|
573
582
|
|
574
|
-
|
575
|
-
|
576
|
-
uri: uri,
|
577
|
-
body: body,
|
578
|
-
options: options
|
579
|
-
)
|
580
|
-
result = ::Google::Cloud::Compute::V1::TargetPoolInstanceHealth.decode_json response.body, ignore_unknown_fields: true
|
583
|
+
options.apply_defaults timeout: @config.timeout,
|
584
|
+
metadata: @config.metadata
|
581
585
|
|
582
|
-
|
583
|
-
|
586
|
+
@target_pools_stub.get_health request, options do |result, response|
|
587
|
+
yield result, response if block_given?
|
588
|
+
return result
|
589
|
+
end
|
584
590
|
rescue ::Faraday::Error => e
|
585
591
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
586
592
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -618,11 +624,11 @@ module Google
|
|
618
624
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
619
625
|
# @param target_pool_resource [::Google::Cloud::Compute::V1::TargetPool, ::Hash]
|
620
626
|
# The body resource for this request
|
621
|
-
# @yield [result,
|
622
|
-
# @yieldparam result [::
|
627
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
628
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
623
629
|
# @yieldparam response [::Faraday::Response]
|
624
630
|
#
|
625
|
-
# @return [::
|
631
|
+
# @return [::Gapic::Rest::BaseOperation]
|
626
632
|
#
|
627
633
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
628
634
|
def insert request, options = nil
|
@@ -634,7 +640,7 @@ module Google
|
|
634
640
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
635
641
|
|
636
642
|
# Customize the options with defaults
|
637
|
-
call_metadata =
|
643
|
+
call_metadata = @config.rpcs.insert.metadata.to_h
|
638
644
|
|
639
645
|
# Set x-goog-api-client header
|
640
646
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -642,20 +648,17 @@ module Google
|
|
642
648
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
643
649
|
transports_version_send: [:rest]
|
644
650
|
|
645
|
-
options.apply_defaults timeout: @config.timeout,
|
651
|
+
options.apply_defaults timeout: @config.rpcs.insert.timeout,
|
646
652
|
metadata: call_metadata
|
647
653
|
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
yield result, response if block_given?
|
658
|
-
result
|
654
|
+
options.apply_defaults timeout: @config.timeout,
|
655
|
+
metadata: @config.metadata
|
656
|
+
|
657
|
+
@target_pools_stub.insert request, options do |result, response|
|
658
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
659
|
+
yield result, response if block_given?
|
660
|
+
return result
|
661
|
+
end
|
659
662
|
rescue ::Faraday::Error => e
|
660
663
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
661
664
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -704,12 +707,12 @@ module Google
|
|
704
707
|
# @param region [::String]
|
705
708
|
# Name of the region scoping this request.
|
706
709
|
# @param return_partial_success [::Boolean]
|
707
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
708
|
-
# @yield [result,
|
709
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
710
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
711
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
712
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::TargetPool>]
|
710
713
|
# @yieldparam response [::Faraday::Response]
|
711
714
|
#
|
712
|
-
# @return [::Google::Cloud::Compute::V1::
|
715
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::TargetPool>]
|
713
716
|
#
|
714
717
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
715
718
|
def list request, options = nil
|
@@ -721,7 +724,7 @@ module Google
|
|
721
724
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
722
725
|
|
723
726
|
# Customize the options with defaults
|
724
|
-
call_metadata =
|
727
|
+
call_metadata = @config.rpcs.list.metadata.to_h
|
725
728
|
|
726
729
|
# Set x-goog-api-client header
|
727
730
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -729,19 +732,17 @@ module Google
|
|
729
732
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
730
733
|
transports_version_send: [:rest]
|
731
734
|
|
732
|
-
options.apply_defaults timeout: @config.timeout,
|
735
|
+
options.apply_defaults timeout: @config.rpcs.list.timeout,
|
733
736
|
metadata: call_metadata
|
734
737
|
|
735
|
-
|
736
|
-
|
737
|
-
uri: uri,
|
738
|
-
params: query_string_params,
|
739
|
-
options: options
|
740
|
-
)
|
741
|
-
result = ::Google::Cloud::Compute::V1::TargetPoolList.decode_json response.body, ignore_unknown_fields: true
|
738
|
+
options.apply_defaults timeout: @config.timeout,
|
739
|
+
metadata: @config.metadata
|
742
740
|
|
743
|
-
|
744
|
-
|
741
|
+
@target_pools_stub.list request, options do |result, response|
|
742
|
+
result = ::Gapic::Rest::PagedEnumerable.new @target_pools_stub, :list, "items", request, result, options
|
743
|
+
yield result, response if block_given?
|
744
|
+
return result
|
745
|
+
end
|
745
746
|
rescue ::Faraday::Error => e
|
746
747
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
747
748
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -781,11 +782,11 @@ module Google
|
|
781
782
|
# Name of the target pool to remove health checks from.
|
782
783
|
# @param target_pools_remove_health_check_request_resource [::Google::Cloud::Compute::V1::TargetPoolsRemoveHealthCheckRequest, ::Hash]
|
783
784
|
# The body resource for this request
|
784
|
-
# @yield [result,
|
785
|
-
# @yieldparam result [::
|
785
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
786
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
786
787
|
# @yieldparam response [::Faraday::Response]
|
787
788
|
#
|
788
|
-
# @return [::
|
789
|
+
# @return [::Gapic::Rest::BaseOperation]
|
789
790
|
#
|
790
791
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
791
792
|
def remove_health_check request, options = nil
|
@@ -797,7 +798,7 @@ module Google
|
|
797
798
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
798
799
|
|
799
800
|
# Customize the options with defaults
|
800
|
-
call_metadata =
|
801
|
+
call_metadata = @config.rpcs.remove_health_check.metadata.to_h
|
801
802
|
|
802
803
|
# Set x-goog-api-client header
|
803
804
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -805,20 +806,17 @@ module Google
|
|
805
806
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
806
807
|
transports_version_send: [:rest]
|
807
808
|
|
808
|
-
options.apply_defaults timeout: @config.timeout,
|
809
|
+
options.apply_defaults timeout: @config.rpcs.remove_health_check.timeout,
|
809
810
|
metadata: call_metadata
|
810
811
|
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
yield result, response if block_given?
|
821
|
-
result
|
812
|
+
options.apply_defaults timeout: @config.timeout,
|
813
|
+
metadata: @config.metadata
|
814
|
+
|
815
|
+
@target_pools_stub.remove_health_check request, options do |result, response|
|
816
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
817
|
+
yield result, response if block_given?
|
818
|
+
return result
|
819
|
+
end
|
822
820
|
rescue ::Faraday::Error => e
|
823
821
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
824
822
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -858,11 +856,11 @@ module Google
|
|
858
856
|
# Name of the TargetPool resource to remove instances from.
|
859
857
|
# @param target_pools_remove_instance_request_resource [::Google::Cloud::Compute::V1::TargetPoolsRemoveInstanceRequest, ::Hash]
|
860
858
|
# The body resource for this request
|
861
|
-
# @yield [result,
|
862
|
-
# @yieldparam result [::
|
859
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
860
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
863
861
|
# @yieldparam response [::Faraday::Response]
|
864
862
|
#
|
865
|
-
# @return [::
|
863
|
+
# @return [::Gapic::Rest::BaseOperation]
|
866
864
|
#
|
867
865
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
868
866
|
def remove_instance request, options = nil
|
@@ -874,7 +872,7 @@ module Google
|
|
874
872
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
875
873
|
|
876
874
|
# Customize the options with defaults
|
877
|
-
call_metadata =
|
875
|
+
call_metadata = @config.rpcs.remove_instance.metadata.to_h
|
878
876
|
|
879
877
|
# Set x-goog-api-client header
|
880
878
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -882,20 +880,17 @@ module Google
|
|
882
880
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
883
881
|
transports_version_send: [:rest]
|
884
882
|
|
885
|
-
options.apply_defaults timeout: @config.timeout,
|
883
|
+
options.apply_defaults timeout: @config.rpcs.remove_instance.timeout,
|
886
884
|
metadata: call_metadata
|
887
885
|
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
yield result, response if block_given?
|
898
|
-
result
|
886
|
+
options.apply_defaults timeout: @config.timeout,
|
887
|
+
metadata: @config.metadata
|
888
|
+
|
889
|
+
@target_pools_stub.remove_instance request, options do |result, response|
|
890
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
891
|
+
yield result, response if block_given?
|
892
|
+
return result
|
893
|
+
end
|
899
894
|
rescue ::Faraday::Error => e
|
900
895
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
901
896
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -937,11 +932,11 @@ module Google
|
|
937
932
|
# Name of the TargetPool resource to set a backup pool for.
|
938
933
|
# @param target_reference_resource [::Google::Cloud::Compute::V1::TargetReference, ::Hash]
|
939
934
|
# The body resource for this request
|
940
|
-
# @yield [result,
|
941
|
-
# @yieldparam result [::
|
935
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
936
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
942
937
|
# @yieldparam response [::Faraday::Response]
|
943
938
|
#
|
944
|
-
# @return [::
|
939
|
+
# @return [::Gapic::Rest::BaseOperation]
|
945
940
|
#
|
946
941
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
947
942
|
def set_backup request, options = nil
|
@@ -953,7 +948,7 @@ module Google
|
|
953
948
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
954
949
|
|
955
950
|
# Customize the options with defaults
|
956
|
-
call_metadata =
|
951
|
+
call_metadata = @config.rpcs.set_backup.metadata.to_h
|
957
952
|
|
958
953
|
# Set x-goog-api-client header
|
959
954
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -961,20 +956,17 @@ module Google
|
|
961
956
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
962
957
|
transports_version_send: [:rest]
|
963
958
|
|
964
|
-
options.apply_defaults timeout: @config.timeout,
|
959
|
+
options.apply_defaults timeout: @config.rpcs.set_backup.timeout,
|
965
960
|
metadata: call_metadata
|
966
961
|
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
yield result, response if block_given?
|
977
|
-
result
|
962
|
+
options.apply_defaults timeout: @config.timeout,
|
963
|
+
metadata: @config.metadata
|
964
|
+
|
965
|
+
@target_pools_stub.set_backup request, options do |result, response|
|
966
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
967
|
+
yield result, response if block_given?
|
968
|
+
return result
|
969
|
+
end
|
978
970
|
rescue ::Faraday::Error => e
|
979
971
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
980
972
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1029,6 +1021,9 @@ module Google
|
|
1029
1021
|
# @!attribute [rw] timeout
|
1030
1022
|
# The call timeout in seconds.
|
1031
1023
|
# @return [::Numeric]
|
1024
|
+
# @!attribute [rw] metadata
|
1025
|
+
# Additional REST headers to be sent with the call.
|
1026
|
+
# @return [::Hash{::Symbol=>::String}]
|
1032
1027
|
#
|
1033
1028
|
class Configuration
|
1034
1029
|
extend ::Gapic::Config
|
@@ -1042,6 +1037,7 @@ module Google
|
|
1042
1037
|
config_attr :lib_name, nil, ::String, nil
|
1043
1038
|
config_attr :lib_version, nil, ::String, nil
|
1044
1039
|
config_attr :timeout, nil, ::Numeric, nil
|
1040
|
+
config_attr :metadata, nil, ::Hash, nil
|
1045
1041
|
|
1046
1042
|
# @private
|
1047
1043
|
def initialize parent_config = nil
|
@@ -1049,6 +1045,116 @@ module Google
|
|
1049
1045
|
|
1050
1046
|
yield self if block_given?
|
1051
1047
|
end
|
1048
|
+
|
1049
|
+
##
|
1050
|
+
# Configurations for individual RPCs
|
1051
|
+
# @return [Rpcs]
|
1052
|
+
#
|
1053
|
+
def rpcs
|
1054
|
+
@rpcs ||= begin
|
1055
|
+
parent_rpcs = nil
|
1056
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1057
|
+
Rpcs.new parent_rpcs
|
1058
|
+
end
|
1059
|
+
end
|
1060
|
+
|
1061
|
+
##
|
1062
|
+
# Configuration RPC class for the TargetPools API.
|
1063
|
+
#
|
1064
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1065
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1066
|
+
# the following configuration fields:
|
1067
|
+
#
|
1068
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1069
|
+
#
|
1070
|
+
# there is one other field (`retry_policy`) that can be set
|
1071
|
+
# but is currently not supported for REST Gapic libraries.
|
1072
|
+
#
|
1073
|
+
class Rpcs
|
1074
|
+
##
|
1075
|
+
# RPC-specific configuration for `add_health_check`
|
1076
|
+
# @return [::Gapic::Config::Method]
|
1077
|
+
#
|
1078
|
+
attr_reader :add_health_check
|
1079
|
+
##
|
1080
|
+
# RPC-specific configuration for `add_instance`
|
1081
|
+
# @return [::Gapic::Config::Method]
|
1082
|
+
#
|
1083
|
+
attr_reader :add_instance
|
1084
|
+
##
|
1085
|
+
# RPC-specific configuration for `aggregated_list`
|
1086
|
+
# @return [::Gapic::Config::Method]
|
1087
|
+
#
|
1088
|
+
attr_reader :aggregated_list
|
1089
|
+
##
|
1090
|
+
# RPC-specific configuration for `delete`
|
1091
|
+
# @return [::Gapic::Config::Method]
|
1092
|
+
#
|
1093
|
+
attr_reader :delete
|
1094
|
+
##
|
1095
|
+
# RPC-specific configuration for `get`
|
1096
|
+
# @return [::Gapic::Config::Method]
|
1097
|
+
#
|
1098
|
+
attr_reader :get
|
1099
|
+
##
|
1100
|
+
# RPC-specific configuration for `get_health`
|
1101
|
+
# @return [::Gapic::Config::Method]
|
1102
|
+
#
|
1103
|
+
attr_reader :get_health
|
1104
|
+
##
|
1105
|
+
# RPC-specific configuration for `insert`
|
1106
|
+
# @return [::Gapic::Config::Method]
|
1107
|
+
#
|
1108
|
+
attr_reader :insert
|
1109
|
+
##
|
1110
|
+
# RPC-specific configuration for `list`
|
1111
|
+
# @return [::Gapic::Config::Method]
|
1112
|
+
#
|
1113
|
+
attr_reader :list
|
1114
|
+
##
|
1115
|
+
# RPC-specific configuration for `remove_health_check`
|
1116
|
+
# @return [::Gapic::Config::Method]
|
1117
|
+
#
|
1118
|
+
attr_reader :remove_health_check
|
1119
|
+
##
|
1120
|
+
# RPC-specific configuration for `remove_instance`
|
1121
|
+
# @return [::Gapic::Config::Method]
|
1122
|
+
#
|
1123
|
+
attr_reader :remove_instance
|
1124
|
+
##
|
1125
|
+
# RPC-specific configuration for `set_backup`
|
1126
|
+
# @return [::Gapic::Config::Method]
|
1127
|
+
#
|
1128
|
+
attr_reader :set_backup
|
1129
|
+
|
1130
|
+
# @private
|
1131
|
+
def initialize parent_rpcs = nil
|
1132
|
+
add_health_check_config = parent_rpcs.add_health_check if parent_rpcs.respond_to? :add_health_check
|
1133
|
+
@add_health_check = ::Gapic::Config::Method.new add_health_check_config
|
1134
|
+
add_instance_config = parent_rpcs.add_instance if parent_rpcs.respond_to? :add_instance
|
1135
|
+
@add_instance = ::Gapic::Config::Method.new add_instance_config
|
1136
|
+
aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
|
1137
|
+
@aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
|
1138
|
+
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
1139
|
+
@delete = ::Gapic::Config::Method.new delete_config
|
1140
|
+
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|
1141
|
+
@get = ::Gapic::Config::Method.new get_config
|
1142
|
+
get_health_config = parent_rpcs.get_health if parent_rpcs.respond_to? :get_health
|
1143
|
+
@get_health = ::Gapic::Config::Method.new get_health_config
|
1144
|
+
insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
|
1145
|
+
@insert = ::Gapic::Config::Method.new insert_config
|
1146
|
+
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
1147
|
+
@list = ::Gapic::Config::Method.new list_config
|
1148
|
+
remove_health_check_config = parent_rpcs.remove_health_check if parent_rpcs.respond_to? :remove_health_check
|
1149
|
+
@remove_health_check = ::Gapic::Config::Method.new remove_health_check_config
|
1150
|
+
remove_instance_config = parent_rpcs.remove_instance if parent_rpcs.respond_to? :remove_instance
|
1151
|
+
@remove_instance = ::Gapic::Config::Method.new remove_instance_config
|
1152
|
+
set_backup_config = parent_rpcs.set_backup if parent_rpcs.respond_to? :set_backup
|
1153
|
+
@set_backup = ::Gapic::Config::Method.new set_backup_config
|
1154
|
+
|
1155
|
+
yield self if block_given?
|
1156
|
+
end
|
1157
|
+
end
|
1052
1158
|
end
|
1053
1159
|
end
|
1054
1160
|
end
|