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,371 @@
|
|
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 HealthChecks
|
26
|
+
module Rest
|
27
|
+
##
|
28
|
+
# REST service stub for the HealthChecks 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::AggregatedListHealthChecksRequest]
|
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::HealthChecksAggregatedList]
|
51
|
+
# @yieldparam response [::Faraday::Response]
|
52
|
+
#
|
53
|
+
# @return [::Google::Cloud::Compute::V1::HealthChecksAggregatedList]
|
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::HealthChecksAggregatedList.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::AggregatedListHealthChecksRequest]
|
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/healthChecks"
|
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::DeleteHealthCheckRequest]
|
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::DeleteHealthCheckRequest]
|
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}/global/healthChecks/#{request_pb.health_check}"
|
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::GetHealthCheckRequest]
|
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::HealthCheck]
|
146
|
+
# @yieldparam response [::Faraday::Response]
|
147
|
+
#
|
148
|
+
# @return [::Google::Cloud::Compute::V1::HealthCheck]
|
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::HealthCheck.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::GetHealthCheckRequest]
|
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}/global/healthChecks/#{request_pb.health_check}"
|
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::InsertHealthCheckRequest]
|
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::InsertHealthCheckRequest]
|
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}/global/healthChecks"
|
218
|
+
body = request_pb.health_check_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::ListHealthChecksRequest]
|
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::HealthCheckList]
|
235
|
+
# @yieldparam response [::Faraday::Response]
|
236
|
+
#
|
237
|
+
# @return [::Google::Cloud::Compute::V1::HealthCheckList]
|
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::HealthCheckList.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::ListHealthChecksRequest]
|
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}/global/healthChecks"
|
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
|
+
|
274
|
+
##
|
275
|
+
# Baseline implementation for the patch REST call
|
276
|
+
#
|
277
|
+
# @param request_pb [::Google::Cloud::Compute::V1::PatchHealthCheckRequest]
|
278
|
+
# A request object representing the call parameters. Required.
|
279
|
+
# @param options [::Gapic::CallOptions]
|
280
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
281
|
+
#
|
282
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
283
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
284
|
+
# @yieldparam response [::Faraday::Response]
|
285
|
+
#
|
286
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
287
|
+
# A result object deserialized from the server's reply
|
288
|
+
def patch request_pb, options = nil
|
289
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
290
|
+
|
291
|
+
uri, body, query_string_params = transcode_patch_request request_pb
|
292
|
+
response = @client_stub.make_patch_request(
|
293
|
+
uri: uri,
|
294
|
+
body: body,
|
295
|
+
params: query_string_params,
|
296
|
+
options: options
|
297
|
+
)
|
298
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
299
|
+
|
300
|
+
yield result, response if block_given?
|
301
|
+
result
|
302
|
+
end
|
303
|
+
|
304
|
+
##
|
305
|
+
# GRPC transcoding helper method for the patch REST call
|
306
|
+
#
|
307
|
+
# @param request_pb [::Google::Cloud::Compute::V1::PatchHealthCheckRequest]
|
308
|
+
# A request object representing the call parameters. Required.
|
309
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
310
|
+
# Uri, Body, Query string parameters
|
311
|
+
def transcode_patch_request request_pb
|
312
|
+
uri = "/compute/v1/projects/#{request_pb.project}/global/healthChecks/#{request_pb.health_check}"
|
313
|
+
body = request_pb.health_check_resource.to_json
|
314
|
+
query_string_params = {}
|
315
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
316
|
+
|
317
|
+
[uri, body, query_string_params]
|
318
|
+
end
|
319
|
+
|
320
|
+
##
|
321
|
+
# Baseline implementation for the update REST call
|
322
|
+
#
|
323
|
+
# @param request_pb [::Google::Cloud::Compute::V1::UpdateHealthCheckRequest]
|
324
|
+
# A request object representing the call parameters. Required.
|
325
|
+
# @param options [::Gapic::CallOptions]
|
326
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
327
|
+
#
|
328
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
329
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
330
|
+
# @yieldparam response [::Faraday::Response]
|
331
|
+
#
|
332
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
333
|
+
# A result object deserialized from the server's reply
|
334
|
+
def update request_pb, options = nil
|
335
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
336
|
+
|
337
|
+
uri, body, query_string_params = transcode_update_request request_pb
|
338
|
+
response = @client_stub.make_put_request(
|
339
|
+
uri: uri,
|
340
|
+
body: body,
|
341
|
+
params: query_string_params,
|
342
|
+
options: options
|
343
|
+
)
|
344
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
345
|
+
|
346
|
+
yield result, response if block_given?
|
347
|
+
result
|
348
|
+
end
|
349
|
+
|
350
|
+
##
|
351
|
+
# GRPC transcoding helper method for the update REST call
|
352
|
+
#
|
353
|
+
# @param request_pb [::Google::Cloud::Compute::V1::UpdateHealthCheckRequest]
|
354
|
+
# A request object representing the call parameters. Required.
|
355
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
356
|
+
# Uri, Body, Query string parameters
|
357
|
+
def transcode_update_request request_pb
|
358
|
+
uri = "/compute/v1/projects/#{request_pb.project}/global/healthChecks/#{request_pb.health_check}"
|
359
|
+
body = request_pb.health_check_resource.to_json
|
360
|
+
query_string_params = {}
|
361
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
362
|
+
|
363
|
+
[uri, body, query_string_params]
|
364
|
+
end
|
365
|
+
end
|
366
|
+
end
|
367
|
+
end
|
368
|
+
end
|
369
|
+
end
|
370
|
+
end
|
371
|
+
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/images/rest/service_stub"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -31,8 +32,6 @@ module Google
|
|
31
32
|
# The Images API.
|
32
33
|
#
|
33
34
|
class Client
|
34
|
-
include GrpcTranscoding
|
35
|
-
|
36
35
|
# @private
|
37
36
|
attr_reader :images_stub
|
38
37
|
|
@@ -42,13 +41,12 @@ module Google
|
|
42
41
|
# See {::Google::Cloud::Compute::V1::Images::Rest::Client::Configuration}
|
43
42
|
# for a description of the configuration fields.
|
44
43
|
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
# To modify the configuration for all Images clients:
|
44
|
+
# @example
|
48
45
|
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
46
|
+
# # Modify the configuration for all Images clients
|
47
|
+
# ::Google::Cloud::Compute::V1::Images::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,40 @@ module Google
|
|
66
64
|
end
|
67
65
|
default_config = Client::Configuration.new parent_config
|
68
66
|
|
67
|
+
default_config.rpcs.delete.timeout = 600.0
|
68
|
+
|
69
|
+
default_config.rpcs.deprecate.timeout = 600.0
|
70
|
+
|
71
|
+
default_config.rpcs.get.timeout = 600.0
|
72
|
+
default_config.rpcs.get.retry_policy = {
|
73
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
74
|
+
}
|
75
|
+
|
76
|
+
default_config.rpcs.get_from_family.timeout = 600.0
|
77
|
+
default_config.rpcs.get_from_family.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.patch.timeout = 600.0
|
94
|
+
|
95
|
+
default_config.rpcs.set_iam_policy.timeout = 600.0
|
96
|
+
|
97
|
+
default_config.rpcs.set_labels.timeout = 600.0
|
98
|
+
|
99
|
+
default_config.rpcs.test_iam_permissions.timeout = 600.0
|
100
|
+
|
69
101
|
default_config
|
70
102
|
end
|
71
103
|
yield @configure if block_given?
|
@@ -95,28 +127,20 @@ module Google
|
|
95
127
|
##
|
96
128
|
# Create a new Images REST client object.
|
97
129
|
#
|
98
|
-
#
|
130
|
+
# @example
|
99
131
|
#
|
100
|
-
#
|
101
|
-
#
|
132
|
+
# # Create a client using the default configuration
|
133
|
+
# client = ::Google::Cloud::Compute::V1::Images::Rest::Client.new
|
102
134
|
#
|
103
|
-
#
|
104
|
-
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
# client = ::Google::Cloud::Compute::V1::Images::Rest::Client.new do |config|
|
109
|
-
# config.timeout = 10.0
|
110
|
-
# end
|
135
|
+
# # Create a client using a custom configuration
|
136
|
+
# client = ::Google::Cloud::Compute::V1::Images::Rest::Client.new do |config|
|
137
|
+
# config.timeout = 10.0
|
138
|
+
# end
|
111
139
|
#
|
112
140
|
# @yield [config] Configure the Images client.
|
113
141
|
# @yieldparam config [Client::Configuration]
|
114
142
|
#
|
115
143
|
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
144
|
# Create the configuration object
|
121
145
|
@config = Configuration.new Client.configure
|
122
146
|
|
@@ -126,11 +150,11 @@ module Google
|
|
126
150
|
# Create credentials
|
127
151
|
credentials = @config.credentials
|
128
152
|
credentials ||= Credentials.default scope: @config.scope
|
129
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
153
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
130
154
|
credentials = Credentials.new credentials, scope: @config.scope
|
131
155
|
end
|
132
156
|
|
133
|
-
@
|
157
|
+
@images_stub = ::Google::Cloud::Compute::V1::Images::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
134
158
|
end
|
135
159
|
|
136
160
|
# Service calls
|
@@ -165,11 +189,11 @@ module Google
|
|
165
189
|
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
166
190
|
#
|
167
191
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
168
|
-
# @yield [result,
|
169
|
-
# @yieldparam result [::
|
192
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
193
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
170
194
|
# @yieldparam response [::Faraday::Response]
|
171
195
|
#
|
172
|
-
# @return [::
|
196
|
+
# @return [::Gapic::Rest::BaseOperation]
|
173
197
|
#
|
174
198
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
175
199
|
def delete request, options = nil
|
@@ -181,7 +205,7 @@ module Google
|
|
181
205
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
182
206
|
|
183
207
|
# Customize the options with defaults
|
184
|
-
call_metadata =
|
208
|
+
call_metadata = @config.rpcs.delete.metadata.to_h
|
185
209
|
|
186
210
|
# Set x-goog-api-client header
|
187
211
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -189,19 +213,17 @@ module Google
|
|
189
213
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
190
214
|
transports_version_send: [:rest]
|
191
215
|
|
192
|
-
options.apply_defaults timeout: @config.timeout,
|
216
|
+
options.apply_defaults timeout: @config.rpcs.delete.timeout,
|
193
217
|
metadata: call_metadata
|
194
218
|
|
195
|
-
|
196
|
-
|
197
|
-
uri: uri,
|
198
|
-
params: query_string_params,
|
199
|
-
options: options
|
200
|
-
)
|
201
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
219
|
+
options.apply_defaults timeout: @config.timeout,
|
220
|
+
metadata: @config.metadata
|
202
221
|
|
203
|
-
|
204
|
-
|
222
|
+
@images_stub.delete request, options do |result, response|
|
223
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
224
|
+
yield result, response if block_given?
|
225
|
+
return result
|
226
|
+
end
|
205
227
|
rescue ::Faraday::Error => e
|
206
228
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
207
229
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -241,11 +263,11 @@ module Google
|
|
241
263
|
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
242
264
|
#
|
243
265
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
244
|
-
# @yield [result,
|
245
|
-
# @yieldparam result [::
|
266
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
267
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
246
268
|
# @yieldparam response [::Faraday::Response]
|
247
269
|
#
|
248
|
-
# @return [::
|
270
|
+
# @return [::Gapic::Rest::BaseOperation]
|
249
271
|
#
|
250
272
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
251
273
|
def deprecate request, options = nil
|
@@ -257,7 +279,7 @@ module Google
|
|
257
279
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
258
280
|
|
259
281
|
# Customize the options with defaults
|
260
|
-
call_metadata =
|
282
|
+
call_metadata = @config.rpcs.deprecate.metadata.to_h
|
261
283
|
|
262
284
|
# Set x-goog-api-client header
|
263
285
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -265,20 +287,17 @@ module Google
|
|
265
287
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
266
288
|
transports_version_send: [:rest]
|
267
289
|
|
268
|
-
options.apply_defaults timeout: @config.timeout,
|
290
|
+
options.apply_defaults timeout: @config.rpcs.deprecate.timeout,
|
269
291
|
metadata: call_metadata
|
270
292
|
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
yield result, response if block_given?
|
281
|
-
result
|
293
|
+
options.apply_defaults timeout: @config.timeout,
|
294
|
+
metadata: @config.metadata
|
295
|
+
|
296
|
+
@images_stub.deprecate request, options do |result, response|
|
297
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
298
|
+
yield result, response if block_given?
|
299
|
+
return result
|
300
|
+
end
|
282
301
|
rescue ::Faraday::Error => e
|
283
302
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
284
303
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -308,7 +327,7 @@ module Google
|
|
308
327
|
# Name of the image resource to return.
|
309
328
|
# @param project [::String]
|
310
329
|
# Project ID for this request.
|
311
|
-
# @yield [result,
|
330
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
312
331
|
# @yieldparam result [::Google::Cloud::Compute::V1::Image]
|
313
332
|
# @yieldparam response [::Faraday::Response]
|
314
333
|
#
|
@@ -324,7 +343,7 @@ module Google
|
|
324
343
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
325
344
|
|
326
345
|
# Customize the options with defaults
|
327
|
-
call_metadata =
|
346
|
+
call_metadata = @config.rpcs.get.metadata.to_h
|
328
347
|
|
329
348
|
# Set x-goog-api-client header
|
330
349
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -332,18 +351,16 @@ module Google
|
|
332
351
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
333
352
|
transports_version_send: [:rest]
|
334
353
|
|
335
|
-
options.apply_defaults timeout: @config.timeout,
|
354
|
+
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
336
355
|
metadata: call_metadata
|
337
356
|
|
338
|
-
|
339
|
-
|
340
|
-
uri: uri,
|
341
|
-
options: options
|
342
|
-
)
|
343
|
-
result = ::Google::Cloud::Compute::V1::Image.decode_json response.body, ignore_unknown_fields: true
|
357
|
+
options.apply_defaults timeout: @config.timeout,
|
358
|
+
metadata: @config.metadata
|
344
359
|
|
345
|
-
|
346
|
-
|
360
|
+
@images_stub.get request, options do |result, response|
|
361
|
+
yield result, response if block_given?
|
362
|
+
return result
|
363
|
+
end
|
347
364
|
rescue ::Faraday::Error => e
|
348
365
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
349
366
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -373,7 +390,7 @@ module Google
|
|
373
390
|
# Name of the image family to search for.
|
374
391
|
# @param project [::String]
|
375
392
|
# Project ID for this request.
|
376
|
-
# @yield [result,
|
393
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
377
394
|
# @yieldparam result [::Google::Cloud::Compute::V1::Image]
|
378
395
|
# @yieldparam response [::Faraday::Response]
|
379
396
|
#
|
@@ -389,7 +406,7 @@ module Google
|
|
389
406
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
390
407
|
|
391
408
|
# Customize the options with defaults
|
392
|
-
call_metadata =
|
409
|
+
call_metadata = @config.rpcs.get_from_family.metadata.to_h
|
393
410
|
|
394
411
|
# Set x-goog-api-client header
|
395
412
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -397,18 +414,16 @@ module Google
|
|
397
414
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
398
415
|
transports_version_send: [:rest]
|
399
416
|
|
400
|
-
options.apply_defaults timeout: @config.timeout,
|
417
|
+
options.apply_defaults timeout: @config.rpcs.get_from_family.timeout,
|
401
418
|
metadata: call_metadata
|
402
419
|
|
403
|
-
|
404
|
-
|
405
|
-
uri: uri,
|
406
|
-
options: options
|
407
|
-
)
|
408
|
-
result = ::Google::Cloud::Compute::V1::Image.decode_json response.body, ignore_unknown_fields: true
|
420
|
+
options.apply_defaults timeout: @config.timeout,
|
421
|
+
metadata: @config.metadata
|
409
422
|
|
410
|
-
|
411
|
-
|
423
|
+
@images_stub.get_from_family request, options do |result, response|
|
424
|
+
yield result, response if block_given?
|
425
|
+
return result
|
426
|
+
end
|
412
427
|
rescue ::Faraday::Error => e
|
413
428
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
414
429
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -440,7 +455,7 @@ module Google
|
|
440
455
|
# Project ID for this request.
|
441
456
|
# @param resource [::String]
|
442
457
|
# Name or id of the resource for this request.
|
443
|
-
# @yield [result,
|
458
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
444
459
|
# @yieldparam result [::Google::Cloud::Compute::V1::Policy]
|
445
460
|
# @yieldparam response [::Faraday::Response]
|
446
461
|
#
|
@@ -456,7 +471,7 @@ module Google
|
|
456
471
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
457
472
|
|
458
473
|
# Customize the options with defaults
|
459
|
-
call_metadata =
|
474
|
+
call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
460
475
|
|
461
476
|
# Set x-goog-api-client header
|
462
477
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -464,19 +479,16 @@ module Google
|
|
464
479
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
465
480
|
transports_version_send: [:rest]
|
466
481
|
|
467
|
-
options.apply_defaults timeout: @config.timeout,
|
482
|
+
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
468
483
|
metadata: call_metadata
|
469
484
|
|
470
|
-
|
471
|
-
|
472
|
-
uri: uri,
|
473
|
-
params: query_string_params,
|
474
|
-
options: options
|
475
|
-
)
|
476
|
-
result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
485
|
+
options.apply_defaults timeout: @config.timeout,
|
486
|
+
metadata: @config.metadata
|
477
487
|
|
478
|
-
|
479
|
-
|
488
|
+
@images_stub.get_iam_policy request, options do |result, response|
|
489
|
+
yield result, response if block_given?
|
490
|
+
return result
|
491
|
+
end
|
480
492
|
rescue ::Faraday::Error => e
|
481
493
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
482
494
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -514,11 +526,11 @@ module Google
|
|
514
526
|
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
515
527
|
#
|
516
528
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
517
|
-
# @yield [result,
|
518
|
-
# @yieldparam result [::
|
529
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
530
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
519
531
|
# @yieldparam response [::Faraday::Response]
|
520
532
|
#
|
521
|
-
# @return [::
|
533
|
+
# @return [::Gapic::Rest::BaseOperation]
|
522
534
|
#
|
523
535
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
524
536
|
def insert request, options = nil
|
@@ -530,7 +542,7 @@ module Google
|
|
530
542
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
531
543
|
|
532
544
|
# Customize the options with defaults
|
533
|
-
call_metadata =
|
545
|
+
call_metadata = @config.rpcs.insert.metadata.to_h
|
534
546
|
|
535
547
|
# Set x-goog-api-client header
|
536
548
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -538,20 +550,17 @@ module Google
|
|
538
550
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
539
551
|
transports_version_send: [:rest]
|
540
552
|
|
541
|
-
options.apply_defaults timeout: @config.timeout,
|
553
|
+
options.apply_defaults timeout: @config.rpcs.insert.timeout,
|
542
554
|
metadata: call_metadata
|
543
555
|
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
yield result, response if block_given?
|
554
|
-
result
|
556
|
+
options.apply_defaults timeout: @config.timeout,
|
557
|
+
metadata: @config.metadata
|
558
|
+
|
559
|
+
@images_stub.insert request, options do |result, response|
|
560
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
561
|
+
yield result, response if block_given?
|
562
|
+
return result
|
563
|
+
end
|
555
564
|
rescue ::Faraday::Error => e
|
556
565
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
557
566
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -598,12 +607,12 @@ module Google
|
|
598
607
|
# @param project [::String]
|
599
608
|
# Project ID for this request.
|
600
609
|
# @param return_partial_success [::Boolean]
|
601
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
602
|
-
# @yield [result,
|
603
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
610
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
611
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
612
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Image>]
|
604
613
|
# @yieldparam response [::Faraday::Response]
|
605
614
|
#
|
606
|
-
# @return [::Google::Cloud::Compute::V1::
|
615
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Image>]
|
607
616
|
#
|
608
617
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
609
618
|
def list request, options = nil
|
@@ -615,7 +624,7 @@ module Google
|
|
615
624
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
616
625
|
|
617
626
|
# Customize the options with defaults
|
618
|
-
call_metadata =
|
627
|
+
call_metadata = @config.rpcs.list.metadata.to_h
|
619
628
|
|
620
629
|
# Set x-goog-api-client header
|
621
630
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -623,19 +632,17 @@ module Google
|
|
623
632
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
624
633
|
transports_version_send: [:rest]
|
625
634
|
|
626
|
-
options.apply_defaults timeout: @config.timeout,
|
635
|
+
options.apply_defaults timeout: @config.rpcs.list.timeout,
|
627
636
|
metadata: call_metadata
|
628
637
|
|
629
|
-
|
630
|
-
|
631
|
-
uri: uri,
|
632
|
-
params: query_string_params,
|
633
|
-
options: options
|
634
|
-
)
|
635
|
-
result = ::Google::Cloud::Compute::V1::ImageList.decode_json response.body, ignore_unknown_fields: true
|
638
|
+
options.apply_defaults timeout: @config.timeout,
|
639
|
+
metadata: @config.metadata
|
636
640
|
|
637
|
-
|
638
|
-
|
641
|
+
@images_stub.list request, options do |result, response|
|
642
|
+
result = ::Gapic::Rest::PagedEnumerable.new @images_stub, :list, "items", request, result, options
|
643
|
+
yield result, response if block_given?
|
644
|
+
return result
|
645
|
+
end
|
639
646
|
rescue ::Faraday::Error => e
|
640
647
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
641
648
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -673,11 +680,11 @@ module Google
|
|
673
680
|
# For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
|
674
681
|
#
|
675
682
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
676
|
-
# @yield [result,
|
677
|
-
# @yieldparam result [::
|
683
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
684
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
678
685
|
# @yieldparam response [::Faraday::Response]
|
679
686
|
#
|
680
|
-
# @return [::
|
687
|
+
# @return [::Gapic::Rest::BaseOperation]
|
681
688
|
#
|
682
689
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
683
690
|
def patch request, options = nil
|
@@ -689,7 +696,7 @@ module Google
|
|
689
696
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
690
697
|
|
691
698
|
# Customize the options with defaults
|
692
|
-
call_metadata =
|
699
|
+
call_metadata = @config.rpcs.patch.metadata.to_h
|
693
700
|
|
694
701
|
# Set x-goog-api-client header
|
695
702
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -697,20 +704,17 @@ module Google
|
|
697
704
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
698
705
|
transports_version_send: [:rest]
|
699
706
|
|
700
|
-
options.apply_defaults timeout: @config.timeout,
|
707
|
+
options.apply_defaults timeout: @config.rpcs.patch.timeout,
|
701
708
|
metadata: call_metadata
|
702
709
|
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
yield result, response if block_given?
|
713
|
-
result
|
710
|
+
options.apply_defaults timeout: @config.timeout,
|
711
|
+
metadata: @config.metadata
|
712
|
+
|
713
|
+
@images_stub.patch request, options do |result, response|
|
714
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
715
|
+
yield result, response if block_given?
|
716
|
+
return result
|
717
|
+
end
|
714
718
|
rescue ::Faraday::Error => e
|
715
719
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
716
720
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -742,7 +746,7 @@ module Google
|
|
742
746
|
# Project ID for this request.
|
743
747
|
# @param resource [::String]
|
744
748
|
# Name or id of the resource for this request.
|
745
|
-
# @yield [result,
|
749
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
746
750
|
# @yieldparam result [::Google::Cloud::Compute::V1::Policy]
|
747
751
|
# @yieldparam response [::Faraday::Response]
|
748
752
|
#
|
@@ -758,7 +762,7 @@ module Google
|
|
758
762
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
759
763
|
|
760
764
|
# Customize the options with defaults
|
761
|
-
call_metadata =
|
765
|
+
call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
762
766
|
|
763
767
|
# Set x-goog-api-client header
|
764
768
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -766,19 +770,16 @@ module Google
|
|
766
770
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
767
771
|
transports_version_send: [:rest]
|
768
772
|
|
769
|
-
options.apply_defaults timeout: @config.timeout,
|
773
|
+
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
770
774
|
metadata: call_metadata
|
771
775
|
|
772
|
-
|
773
|
-
|
774
|
-
uri: uri,
|
775
|
-
body: body,
|
776
|
-
options: options
|
777
|
-
)
|
778
|
-
result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
|
776
|
+
options.apply_defaults timeout: @config.timeout,
|
777
|
+
metadata: @config.metadata
|
779
778
|
|
780
|
-
|
781
|
-
|
779
|
+
@images_stub.set_iam_policy request, options do |result, response|
|
780
|
+
yield result, response if block_given?
|
781
|
+
return result
|
782
|
+
end
|
782
783
|
rescue ::Faraday::Error => e
|
783
784
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
784
785
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -810,11 +811,11 @@ module Google
|
|
810
811
|
# Project ID for this request.
|
811
812
|
# @param resource [::String]
|
812
813
|
# Name or id of the resource for this request.
|
813
|
-
# @yield [result,
|
814
|
-
# @yieldparam result [::
|
814
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
815
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
815
816
|
# @yieldparam response [::Faraday::Response]
|
816
817
|
#
|
817
|
-
# @return [::
|
818
|
+
# @return [::Gapic::Rest::BaseOperation]
|
818
819
|
#
|
819
820
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
820
821
|
def set_labels request, options = nil
|
@@ -826,7 +827,7 @@ module Google
|
|
826
827
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
827
828
|
|
828
829
|
# Customize the options with defaults
|
829
|
-
call_metadata =
|
830
|
+
call_metadata = @config.rpcs.set_labels.metadata.to_h
|
830
831
|
|
831
832
|
# Set x-goog-api-client header
|
832
833
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -834,19 +835,17 @@ module Google
|
|
834
835
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
835
836
|
transports_version_send: [:rest]
|
836
837
|
|
837
|
-
options.apply_defaults timeout: @config.timeout,
|
838
|
+
options.apply_defaults timeout: @config.rpcs.set_labels.timeout,
|
838
839
|
metadata: call_metadata
|
839
840
|
|
840
|
-
|
841
|
-
|
842
|
-
uri: uri,
|
843
|
-
body: body,
|
844
|
-
options: options
|
845
|
-
)
|
846
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
841
|
+
options.apply_defaults timeout: @config.timeout,
|
842
|
+
metadata: @config.metadata
|
847
843
|
|
848
|
-
|
849
|
-
|
844
|
+
@images_stub.set_labels request, options do |result, response|
|
845
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
846
|
+
yield result, response if block_given?
|
847
|
+
return result
|
848
|
+
end
|
850
849
|
rescue ::Faraday::Error => e
|
851
850
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
852
851
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -878,7 +877,7 @@ module Google
|
|
878
877
|
# Name or id of the resource for this request.
|
879
878
|
# @param test_permissions_request_resource [::Google::Cloud::Compute::V1::TestPermissionsRequest, ::Hash]
|
880
879
|
# The body resource for this request
|
881
|
-
# @yield [result,
|
880
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
882
881
|
# @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
|
883
882
|
# @yieldparam response [::Faraday::Response]
|
884
883
|
#
|
@@ -894,7 +893,7 @@ module Google
|
|
894
893
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
895
894
|
|
896
895
|
# Customize the options with defaults
|
897
|
-
call_metadata =
|
896
|
+
call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
898
897
|
|
899
898
|
# Set x-goog-api-client header
|
900
899
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -902,19 +901,16 @@ module Google
|
|
902
901
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
903
902
|
transports_version_send: [:rest]
|
904
903
|
|
905
|
-
options.apply_defaults timeout: @config.timeout,
|
904
|
+
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
906
905
|
metadata: call_metadata
|
907
906
|
|
908
|
-
|
909
|
-
|
910
|
-
uri: uri,
|
911
|
-
body: body,
|
912
|
-
options: options
|
913
|
-
)
|
914
|
-
result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
|
907
|
+
options.apply_defaults timeout: @config.timeout,
|
908
|
+
metadata: @config.metadata
|
915
909
|
|
916
|
-
|
917
|
-
|
910
|
+
@images_stub.test_iam_permissions request, options do |result, response|
|
911
|
+
yield result, response if block_given?
|
912
|
+
return result
|
913
|
+
end
|
918
914
|
rescue ::Faraday::Error => e
|
919
915
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
920
916
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -969,6 +965,9 @@ module Google
|
|
969
965
|
# @!attribute [rw] timeout
|
970
966
|
# The call timeout in seconds.
|
971
967
|
# @return [::Numeric]
|
968
|
+
# @!attribute [rw] metadata
|
969
|
+
# Additional REST headers to be sent with the call.
|
970
|
+
# @return [::Hash{::Symbol=>::String}]
|
972
971
|
#
|
973
972
|
class Configuration
|
974
973
|
extend ::Gapic::Config
|
@@ -982,6 +981,7 @@ module Google
|
|
982
981
|
config_attr :lib_name, nil, ::String, nil
|
983
982
|
config_attr :lib_version, nil, ::String, nil
|
984
983
|
config_attr :timeout, nil, ::Numeric, nil
|
984
|
+
config_attr :metadata, nil, ::Hash, nil
|
985
985
|
|
986
986
|
# @private
|
987
987
|
def initialize parent_config = nil
|
@@ -989,6 +989,116 @@ module Google
|
|
989
989
|
|
990
990
|
yield self if block_given?
|
991
991
|
end
|
992
|
+
|
993
|
+
##
|
994
|
+
# Configurations for individual RPCs
|
995
|
+
# @return [Rpcs]
|
996
|
+
#
|
997
|
+
def rpcs
|
998
|
+
@rpcs ||= begin
|
999
|
+
parent_rpcs = nil
|
1000
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1001
|
+
Rpcs.new parent_rpcs
|
1002
|
+
end
|
1003
|
+
end
|
1004
|
+
|
1005
|
+
##
|
1006
|
+
# Configuration RPC class for the Images API.
|
1007
|
+
#
|
1008
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1009
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1010
|
+
# the following configuration fields:
|
1011
|
+
#
|
1012
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1013
|
+
#
|
1014
|
+
# there is one other field (`retry_policy`) that can be set
|
1015
|
+
# but is currently not supported for REST Gapic libraries.
|
1016
|
+
#
|
1017
|
+
class Rpcs
|
1018
|
+
##
|
1019
|
+
# RPC-specific configuration for `delete`
|
1020
|
+
# @return [::Gapic::Config::Method]
|
1021
|
+
#
|
1022
|
+
attr_reader :delete
|
1023
|
+
##
|
1024
|
+
# RPC-specific configuration for `deprecate`
|
1025
|
+
# @return [::Gapic::Config::Method]
|
1026
|
+
#
|
1027
|
+
attr_reader :deprecate
|
1028
|
+
##
|
1029
|
+
# RPC-specific configuration for `get`
|
1030
|
+
# @return [::Gapic::Config::Method]
|
1031
|
+
#
|
1032
|
+
attr_reader :get
|
1033
|
+
##
|
1034
|
+
# RPC-specific configuration for `get_from_family`
|
1035
|
+
# @return [::Gapic::Config::Method]
|
1036
|
+
#
|
1037
|
+
attr_reader :get_from_family
|
1038
|
+
##
|
1039
|
+
# RPC-specific configuration for `get_iam_policy`
|
1040
|
+
# @return [::Gapic::Config::Method]
|
1041
|
+
#
|
1042
|
+
attr_reader :get_iam_policy
|
1043
|
+
##
|
1044
|
+
# RPC-specific configuration for `insert`
|
1045
|
+
# @return [::Gapic::Config::Method]
|
1046
|
+
#
|
1047
|
+
attr_reader :insert
|
1048
|
+
##
|
1049
|
+
# RPC-specific configuration for `list`
|
1050
|
+
# @return [::Gapic::Config::Method]
|
1051
|
+
#
|
1052
|
+
attr_reader :list
|
1053
|
+
##
|
1054
|
+
# RPC-specific configuration for `patch`
|
1055
|
+
# @return [::Gapic::Config::Method]
|
1056
|
+
#
|
1057
|
+
attr_reader :patch
|
1058
|
+
##
|
1059
|
+
# RPC-specific configuration for `set_iam_policy`
|
1060
|
+
# @return [::Gapic::Config::Method]
|
1061
|
+
#
|
1062
|
+
attr_reader :set_iam_policy
|
1063
|
+
##
|
1064
|
+
# RPC-specific configuration for `set_labels`
|
1065
|
+
# @return [::Gapic::Config::Method]
|
1066
|
+
#
|
1067
|
+
attr_reader :set_labels
|
1068
|
+
##
|
1069
|
+
# RPC-specific configuration for `test_iam_permissions`
|
1070
|
+
# @return [::Gapic::Config::Method]
|
1071
|
+
#
|
1072
|
+
attr_reader :test_iam_permissions
|
1073
|
+
|
1074
|
+
# @private
|
1075
|
+
def initialize parent_rpcs = nil
|
1076
|
+
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
1077
|
+
@delete = ::Gapic::Config::Method.new delete_config
|
1078
|
+
deprecate_config = parent_rpcs.deprecate if parent_rpcs.respond_to? :deprecate
|
1079
|
+
@deprecate = ::Gapic::Config::Method.new deprecate_config
|
1080
|
+
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|
1081
|
+
@get = ::Gapic::Config::Method.new get_config
|
1082
|
+
get_from_family_config = parent_rpcs.get_from_family if parent_rpcs.respond_to? :get_from_family
|
1083
|
+
@get_from_family = ::Gapic::Config::Method.new get_from_family_config
|
1084
|
+
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
1085
|
+
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
1086
|
+
insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
|
1087
|
+
@insert = ::Gapic::Config::Method.new insert_config
|
1088
|
+
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
1089
|
+
@list = ::Gapic::Config::Method.new list_config
|
1090
|
+
patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
|
1091
|
+
@patch = ::Gapic::Config::Method.new patch_config
|
1092
|
+
set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
|
1093
|
+
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
1094
|
+
set_labels_config = parent_rpcs.set_labels if parent_rpcs.respond_to? :set_labels
|
1095
|
+
@set_labels = ::Gapic::Config::Method.new set_labels_config
|
1096
|
+
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
1097
|
+
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
1098
|
+
|
1099
|
+
yield self if block_given?
|
1100
|
+
end
|
1101
|
+
end
|
992
1102
|
end
|
993
1103
|
end
|
994
1104
|
end
|