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,413 @@
|
|
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 BackendBuckets
|
26
|
+
module Rest
|
27
|
+
##
|
28
|
+
# REST service stub for the BackendBuckets 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 add_signed_url_key REST call
|
43
|
+
#
|
44
|
+
# @param request_pb [::Google::Cloud::Compute::V1::AddSignedUrlKeyBackendBucketRequest]
|
45
|
+
# A request object representing the call parameters. Required.
|
46
|
+
# @param options [::Gapic::CallOptions]
|
47
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
48
|
+
#
|
49
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
50
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
51
|
+
# @yieldparam response [::Faraday::Response]
|
52
|
+
#
|
53
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
54
|
+
# A result object deserialized from the server's reply
|
55
|
+
def add_signed_url_key request_pb, options = nil
|
56
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
57
|
+
|
58
|
+
uri, body, query_string_params = transcode_add_signed_url_key_request request_pb
|
59
|
+
response = @client_stub.make_post_request(
|
60
|
+
uri: uri,
|
61
|
+
body: body,
|
62
|
+
params: query_string_params,
|
63
|
+
options: options
|
64
|
+
)
|
65
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
66
|
+
|
67
|
+
yield result, response if block_given?
|
68
|
+
result
|
69
|
+
end
|
70
|
+
|
71
|
+
##
|
72
|
+
# GRPC transcoding helper method for the add_signed_url_key REST call
|
73
|
+
#
|
74
|
+
# @param request_pb [::Google::Cloud::Compute::V1::AddSignedUrlKeyBackendBucketRequest]
|
75
|
+
# A request object representing the call parameters. Required.
|
76
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
77
|
+
# Uri, Body, Query string parameters
|
78
|
+
def transcode_add_signed_url_key_request request_pb
|
79
|
+
uri = "/compute/v1/projects/#{request_pb.project}/global/backendBuckets/#{request_pb.backend_bucket}/addSignedUrlKey"
|
80
|
+
body = request_pb.signed_url_key_resource.to_json
|
81
|
+
query_string_params = {}
|
82
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
83
|
+
|
84
|
+
[uri, body, query_string_params]
|
85
|
+
end
|
86
|
+
|
87
|
+
##
|
88
|
+
# Baseline implementation for the delete REST call
|
89
|
+
#
|
90
|
+
# @param request_pb [::Google::Cloud::Compute::V1::DeleteBackendBucketRequest]
|
91
|
+
# A request object representing the call parameters. Required.
|
92
|
+
# @param options [::Gapic::CallOptions]
|
93
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
94
|
+
#
|
95
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
96
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
97
|
+
# @yieldparam response [::Faraday::Response]
|
98
|
+
#
|
99
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
100
|
+
# A result object deserialized from the server's reply
|
101
|
+
def delete request_pb, options = nil
|
102
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
103
|
+
|
104
|
+
uri, _body, query_string_params = transcode_delete_request request_pb
|
105
|
+
response = @client_stub.make_delete_request(
|
106
|
+
uri: uri,
|
107
|
+
params: query_string_params,
|
108
|
+
options: options
|
109
|
+
)
|
110
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
111
|
+
|
112
|
+
yield result, response if block_given?
|
113
|
+
result
|
114
|
+
end
|
115
|
+
|
116
|
+
##
|
117
|
+
# GRPC transcoding helper method for the delete REST call
|
118
|
+
#
|
119
|
+
# @param request_pb [::Google::Cloud::Compute::V1::DeleteBackendBucketRequest]
|
120
|
+
# A request object representing the call parameters. Required.
|
121
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
122
|
+
# Uri, Body, Query string parameters
|
123
|
+
def transcode_delete_request request_pb
|
124
|
+
uri = "/compute/v1/projects/#{request_pb.project}/global/backendBuckets/#{request_pb.backend_bucket}"
|
125
|
+
body = nil
|
126
|
+
query_string_params = {}
|
127
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
128
|
+
|
129
|
+
[uri, body, query_string_params]
|
130
|
+
end
|
131
|
+
|
132
|
+
##
|
133
|
+
# Baseline implementation for the delete_signed_url_key REST call
|
134
|
+
#
|
135
|
+
# @param request_pb [::Google::Cloud::Compute::V1::DeleteSignedUrlKeyBackendBucketRequest]
|
136
|
+
# A request object representing the call parameters. Required.
|
137
|
+
# @param options [::Gapic::CallOptions]
|
138
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
139
|
+
#
|
140
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
141
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
142
|
+
# @yieldparam response [::Faraday::Response]
|
143
|
+
#
|
144
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
145
|
+
# A result object deserialized from the server's reply
|
146
|
+
def delete_signed_url_key request_pb, options = nil
|
147
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
148
|
+
|
149
|
+
uri, _body, query_string_params = transcode_delete_signed_url_key_request request_pb
|
150
|
+
response = @client_stub.make_post_request(
|
151
|
+
uri: uri,
|
152
|
+
params: query_string_params,
|
153
|
+
options: options
|
154
|
+
)
|
155
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
156
|
+
|
157
|
+
yield result, response if block_given?
|
158
|
+
result
|
159
|
+
end
|
160
|
+
|
161
|
+
##
|
162
|
+
# GRPC transcoding helper method for the delete_signed_url_key REST call
|
163
|
+
#
|
164
|
+
# @param request_pb [::Google::Cloud::Compute::V1::DeleteSignedUrlKeyBackendBucketRequest]
|
165
|
+
# A request object representing the call parameters. Required.
|
166
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
167
|
+
# Uri, Body, Query string parameters
|
168
|
+
def transcode_delete_signed_url_key_request request_pb
|
169
|
+
uri = "/compute/v1/projects/#{request_pb.project}/global/backendBuckets/#{request_pb.backend_bucket}/deleteSignedUrlKey"
|
170
|
+
body = nil
|
171
|
+
query_string_params = {}
|
172
|
+
query_string_params["keyName"] = request_pb.key_name.to_s
|
173
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
174
|
+
|
175
|
+
[uri, body, query_string_params]
|
176
|
+
end
|
177
|
+
|
178
|
+
##
|
179
|
+
# Baseline implementation for the get REST call
|
180
|
+
#
|
181
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetBackendBucketRequest]
|
182
|
+
# A request object representing the call parameters. Required.
|
183
|
+
# @param options [::Gapic::CallOptions]
|
184
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
185
|
+
#
|
186
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
187
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::BackendBucket]
|
188
|
+
# @yieldparam response [::Faraday::Response]
|
189
|
+
#
|
190
|
+
# @return [::Google::Cloud::Compute::V1::BackendBucket]
|
191
|
+
# A result object deserialized from the server's reply
|
192
|
+
def get request_pb, options = nil
|
193
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
194
|
+
|
195
|
+
uri, _body, _query_string_params = transcode_get_request request_pb
|
196
|
+
response = @client_stub.make_get_request(
|
197
|
+
uri: uri,
|
198
|
+
options: options
|
199
|
+
)
|
200
|
+
result = ::Google::Cloud::Compute::V1::BackendBucket.decode_json response.body, ignore_unknown_fields: true
|
201
|
+
|
202
|
+
yield result, response if block_given?
|
203
|
+
result
|
204
|
+
end
|
205
|
+
|
206
|
+
##
|
207
|
+
# GRPC transcoding helper method for the get REST call
|
208
|
+
#
|
209
|
+
# @param request_pb [::Google::Cloud::Compute::V1::GetBackendBucketRequest]
|
210
|
+
# A request object representing the call parameters. Required.
|
211
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
212
|
+
# Uri, Body, Query string parameters
|
213
|
+
def transcode_get_request request_pb
|
214
|
+
uri = "/compute/v1/projects/#{request_pb.project}/global/backendBuckets/#{request_pb.backend_bucket}"
|
215
|
+
body = nil
|
216
|
+
query_string_params = {}
|
217
|
+
|
218
|
+
[uri, body, query_string_params]
|
219
|
+
end
|
220
|
+
|
221
|
+
##
|
222
|
+
# Baseline implementation for the insert REST call
|
223
|
+
#
|
224
|
+
# @param request_pb [::Google::Cloud::Compute::V1::InsertBackendBucketRequest]
|
225
|
+
# A request object representing the call parameters. Required.
|
226
|
+
# @param options [::Gapic::CallOptions]
|
227
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
228
|
+
#
|
229
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
230
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
231
|
+
# @yieldparam response [::Faraday::Response]
|
232
|
+
#
|
233
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
234
|
+
# A result object deserialized from the server's reply
|
235
|
+
def insert request_pb, options = nil
|
236
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
237
|
+
|
238
|
+
uri, body, query_string_params = transcode_insert_request request_pb
|
239
|
+
response = @client_stub.make_post_request(
|
240
|
+
uri: uri,
|
241
|
+
body: body,
|
242
|
+
params: query_string_params,
|
243
|
+
options: options
|
244
|
+
)
|
245
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
246
|
+
|
247
|
+
yield result, response if block_given?
|
248
|
+
result
|
249
|
+
end
|
250
|
+
|
251
|
+
##
|
252
|
+
# GRPC transcoding helper method for the insert REST call
|
253
|
+
#
|
254
|
+
# @param request_pb [::Google::Cloud::Compute::V1::InsertBackendBucketRequest]
|
255
|
+
# A request object representing the call parameters. Required.
|
256
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
257
|
+
# Uri, Body, Query string parameters
|
258
|
+
def transcode_insert_request request_pb
|
259
|
+
uri = "/compute/v1/projects/#{request_pb.project}/global/backendBuckets"
|
260
|
+
body = request_pb.backend_bucket_resource.to_json
|
261
|
+
query_string_params = {}
|
262
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
263
|
+
|
264
|
+
[uri, body, query_string_params]
|
265
|
+
end
|
266
|
+
|
267
|
+
##
|
268
|
+
# Baseline implementation for the list REST call
|
269
|
+
#
|
270
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ListBackendBucketsRequest]
|
271
|
+
# A request object representing the call parameters. Required.
|
272
|
+
# @param options [::Gapic::CallOptions]
|
273
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
274
|
+
#
|
275
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
276
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::BackendBucketList]
|
277
|
+
# @yieldparam response [::Faraday::Response]
|
278
|
+
#
|
279
|
+
# @return [::Google::Cloud::Compute::V1::BackendBucketList]
|
280
|
+
# A result object deserialized from the server's reply
|
281
|
+
def list request_pb, options = nil
|
282
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
283
|
+
|
284
|
+
uri, _body, query_string_params = transcode_list_request request_pb
|
285
|
+
response = @client_stub.make_get_request(
|
286
|
+
uri: uri,
|
287
|
+
params: query_string_params,
|
288
|
+
options: options
|
289
|
+
)
|
290
|
+
result = ::Google::Cloud::Compute::V1::BackendBucketList.decode_json response.body, ignore_unknown_fields: true
|
291
|
+
|
292
|
+
yield result, response if block_given?
|
293
|
+
result
|
294
|
+
end
|
295
|
+
|
296
|
+
##
|
297
|
+
# GRPC transcoding helper method for the list REST call
|
298
|
+
#
|
299
|
+
# @param request_pb [::Google::Cloud::Compute::V1::ListBackendBucketsRequest]
|
300
|
+
# A request object representing the call parameters. Required.
|
301
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
302
|
+
# Uri, Body, Query string parameters
|
303
|
+
def transcode_list_request request_pb
|
304
|
+
uri = "/compute/v1/projects/#{request_pb.project}/global/backendBuckets"
|
305
|
+
body = nil
|
306
|
+
query_string_params = {}
|
307
|
+
query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
|
308
|
+
query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
|
309
|
+
query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
|
310
|
+
query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
|
311
|
+
query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
|
312
|
+
|
313
|
+
[uri, body, query_string_params]
|
314
|
+
end
|
315
|
+
|
316
|
+
##
|
317
|
+
# Baseline implementation for the patch REST call
|
318
|
+
#
|
319
|
+
# @param request_pb [::Google::Cloud::Compute::V1::PatchBackendBucketRequest]
|
320
|
+
# A request object representing the call parameters. Required.
|
321
|
+
# @param options [::Gapic::CallOptions]
|
322
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
323
|
+
#
|
324
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
325
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
326
|
+
# @yieldparam response [::Faraday::Response]
|
327
|
+
#
|
328
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
329
|
+
# A result object deserialized from the server's reply
|
330
|
+
def patch request_pb, options = nil
|
331
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
332
|
+
|
333
|
+
uri, body, query_string_params = transcode_patch_request request_pb
|
334
|
+
response = @client_stub.make_patch_request(
|
335
|
+
uri: uri,
|
336
|
+
body: body,
|
337
|
+
params: query_string_params,
|
338
|
+
options: options
|
339
|
+
)
|
340
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
341
|
+
|
342
|
+
yield result, response if block_given?
|
343
|
+
result
|
344
|
+
end
|
345
|
+
|
346
|
+
##
|
347
|
+
# GRPC transcoding helper method for the patch REST call
|
348
|
+
#
|
349
|
+
# @param request_pb [::Google::Cloud::Compute::V1::PatchBackendBucketRequest]
|
350
|
+
# A request object representing the call parameters. Required.
|
351
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
352
|
+
# Uri, Body, Query string parameters
|
353
|
+
def transcode_patch_request request_pb
|
354
|
+
uri = "/compute/v1/projects/#{request_pb.project}/global/backendBuckets/#{request_pb.backend_bucket}"
|
355
|
+
body = request_pb.backend_bucket_resource.to_json
|
356
|
+
query_string_params = {}
|
357
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
358
|
+
|
359
|
+
[uri, body, query_string_params]
|
360
|
+
end
|
361
|
+
|
362
|
+
##
|
363
|
+
# Baseline implementation for the update REST call
|
364
|
+
#
|
365
|
+
# @param request_pb [::Google::Cloud::Compute::V1::UpdateBackendBucketRequest]
|
366
|
+
# A request object representing the call parameters. Required.
|
367
|
+
# @param options [::Gapic::CallOptions]
|
368
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
369
|
+
#
|
370
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
371
|
+
# @yieldparam result [::Google::Cloud::Compute::V1::Operation]
|
372
|
+
# @yieldparam response [::Faraday::Response]
|
373
|
+
#
|
374
|
+
# @return [::Google::Cloud::Compute::V1::Operation]
|
375
|
+
# A result object deserialized from the server's reply
|
376
|
+
def update request_pb, options = nil
|
377
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
378
|
+
|
379
|
+
uri, body, query_string_params = transcode_update_request request_pb
|
380
|
+
response = @client_stub.make_put_request(
|
381
|
+
uri: uri,
|
382
|
+
body: body,
|
383
|
+
params: query_string_params,
|
384
|
+
options: options
|
385
|
+
)
|
386
|
+
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
387
|
+
|
388
|
+
yield result, response if block_given?
|
389
|
+
result
|
390
|
+
end
|
391
|
+
|
392
|
+
##
|
393
|
+
# GRPC transcoding helper method for the update REST call
|
394
|
+
#
|
395
|
+
# @param request_pb [::Google::Cloud::Compute::V1::UpdateBackendBucketRequest]
|
396
|
+
# A request object representing the call parameters. Required.
|
397
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
398
|
+
# Uri, Body, Query string parameters
|
399
|
+
def transcode_update_request request_pb
|
400
|
+
uri = "/compute/v1/projects/#{request_pb.project}/global/backendBuckets/#{request_pb.backend_bucket}"
|
401
|
+
body = request_pb.backend_bucket_resource.to_json
|
402
|
+
query_string_params = {}
|
403
|
+
query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
|
404
|
+
|
405
|
+
[uri, body, query_string_params]
|
406
|
+
end
|
407
|
+
end
|
408
|
+
end
|
409
|
+
end
|
410
|
+
end
|
411
|
+
end
|
412
|
+
end
|
413
|
+
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/backend_services/rest/service_stub"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -31,8 +32,6 @@ module Google
|
|
31
32
|
# The BackendServices API.
|
32
33
|
#
|
33
34
|
class Client
|
34
|
-
include GrpcTranscoding
|
35
|
-
|
36
35
|
# @private
|
37
36
|
attr_reader :backend_services_stub
|
38
37
|
|
@@ -42,13 +41,12 @@ module Google
|
|
42
41
|
# See {::Google::Cloud::Compute::V1::BackendServices::Rest::Client::Configuration}
|
43
42
|
# for a description of the configuration fields.
|
44
43
|
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
# To modify the configuration for all BackendServices clients:
|
44
|
+
# @example
|
48
45
|
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
46
|
+
# # Modify the configuration for all BackendServices clients
|
47
|
+
# ::Google::Cloud::Compute::V1::BackendServices::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_signed_url_key.timeout = 600.0
|
68
|
+
|
69
|
+
default_config.rpcs.aggregated_list.timeout = 600.0
|
70
|
+
default_config.rpcs.aggregated_list.retry_policy = {
|
71
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
72
|
+
}
|
73
|
+
|
74
|
+
default_config.rpcs.delete.timeout = 600.0
|
75
|
+
|
76
|
+
default_config.rpcs.delete_signed_url_key.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.patch.timeout = 600.0
|
93
|
+
|
94
|
+
default_config.rpcs.set_security_policy.timeout = 600.0
|
95
|
+
|
96
|
+
default_config.rpcs.update.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 BackendServices REST client object.
|
97
126
|
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
# To create a new BackendServices 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::BackendServices::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::BackendServices::Rest::Client.new do |config|
|
134
|
+
# config.timeout = 10.0
|
135
|
+
# end
|
111
136
|
#
|
112
137
|
# @yield [config] Configure the BackendServices 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
|
+
@backend_services_stub = ::Google::Cloud::Compute::V1::BackendServices::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
134
155
|
end
|
135
156
|
|
136
157
|
# Service calls
|
@@ -167,11 +188,11 @@ module Google
|
|
167
188
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
168
189
|
# @param signed_url_key_resource [::Google::Cloud::Compute::V1::SignedUrlKey, ::Hash]
|
169
190
|
# The body resource for this request
|
170
|
-
# @yield [result,
|
171
|
-
# @yieldparam result [::
|
191
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
192
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
172
193
|
# @yieldparam response [::Faraday::Response]
|
173
194
|
#
|
174
|
-
# @return [::
|
195
|
+
# @return [::Gapic::Rest::BaseOperation]
|
175
196
|
#
|
176
197
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
177
198
|
def add_signed_url_key request, options = nil
|
@@ -183,7 +204,7 @@ module Google
|
|
183
204
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
184
205
|
|
185
206
|
# Customize the options with defaults
|
186
|
-
call_metadata =
|
207
|
+
call_metadata = @config.rpcs.add_signed_url_key.metadata.to_h
|
187
208
|
|
188
209
|
# Set x-goog-api-client header
|
189
210
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -191,20 +212,17 @@ module Google
|
|
191
212
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
192
213
|
transports_version_send: [:rest]
|
193
214
|
|
194
|
-
options.apply_defaults timeout: @config.timeout,
|
215
|
+
options.apply_defaults timeout: @config.rpcs.add_signed_url_key.timeout,
|
195
216
|
metadata: call_metadata
|
196
217
|
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
yield result, response if block_given?
|
207
|
-
result
|
218
|
+
options.apply_defaults timeout: @config.timeout,
|
219
|
+
metadata: @config.metadata
|
220
|
+
|
221
|
+
@backend_services_stub.add_signed_url_key request, options do |result, response|
|
222
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
223
|
+
yield result, response if block_given?
|
224
|
+
return result
|
225
|
+
end
|
208
226
|
rescue ::Faraday::Error => e
|
209
227
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
210
228
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -253,12 +271,12 @@ module Google
|
|
253
271
|
# @param project [::String]
|
254
272
|
# Name of the project scoping this request.
|
255
273
|
# @param return_partial_success [::Boolean]
|
256
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
257
|
-
# @yield [result,
|
258
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
274
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
275
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
276
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::BackendServicesScopedList>]
|
259
277
|
# @yieldparam response [::Faraday::Response]
|
260
278
|
#
|
261
|
-
# @return [::Google::Cloud::Compute::V1::
|
279
|
+
# @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::BackendServicesScopedList>]
|
262
280
|
#
|
263
281
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
264
282
|
def aggregated_list request, options = nil
|
@@ -270,7 +288,7 @@ module Google
|
|
270
288
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
271
289
|
|
272
290
|
# Customize the options with defaults
|
273
|
-
call_metadata =
|
291
|
+
call_metadata = @config.rpcs.aggregated_list.metadata.to_h
|
274
292
|
|
275
293
|
# Set x-goog-api-client header
|
276
294
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -278,19 +296,17 @@ module Google
|
|
278
296
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
279
297
|
transports_version_send: [:rest]
|
280
298
|
|
281
|
-
options.apply_defaults timeout: @config.timeout,
|
299
|
+
options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
|
282
300
|
metadata: call_metadata
|
283
301
|
|
284
|
-
|
285
|
-
|
286
|
-
uri: uri,
|
287
|
-
params: query_string_params,
|
288
|
-
options: options
|
289
|
-
)
|
290
|
-
result = ::Google::Cloud::Compute::V1::BackendServiceAggregatedList.decode_json response.body, ignore_unknown_fields: true
|
302
|
+
options.apply_defaults timeout: @config.timeout,
|
303
|
+
metadata: @config.metadata
|
291
304
|
|
292
|
-
|
293
|
-
|
305
|
+
@backend_services_stub.aggregated_list request, options do |result, response|
|
306
|
+
result = ::Gapic::Rest::PagedEnumerable.new @backend_services_stub, :aggregated_list, "items", request, result, options
|
307
|
+
yield result, response if block_given?
|
308
|
+
return result
|
309
|
+
end
|
294
310
|
rescue ::Faraday::Error => e
|
295
311
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
296
312
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -326,11 +342,11 @@ module Google
|
|
326
342
|
# 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.
|
327
343
|
#
|
328
344
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
329
|
-
# @yield [result,
|
330
|
-
# @yieldparam result [::
|
345
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
346
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
331
347
|
# @yieldparam response [::Faraday::Response]
|
332
348
|
#
|
333
|
-
# @return [::
|
349
|
+
# @return [::Gapic::Rest::BaseOperation]
|
334
350
|
#
|
335
351
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
336
352
|
def delete request, options = nil
|
@@ -342,7 +358,7 @@ module Google
|
|
342
358
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
343
359
|
|
344
360
|
# Customize the options with defaults
|
345
|
-
call_metadata =
|
361
|
+
call_metadata = @config.rpcs.delete.metadata.to_h
|
346
362
|
|
347
363
|
# Set x-goog-api-client header
|
348
364
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -350,19 +366,17 @@ module Google
|
|
350
366
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
351
367
|
transports_version_send: [:rest]
|
352
368
|
|
353
|
-
options.apply_defaults timeout: @config.timeout,
|
369
|
+
options.apply_defaults timeout: @config.rpcs.delete.timeout,
|
354
370
|
metadata: call_metadata
|
355
371
|
|
356
|
-
|
357
|
-
|
358
|
-
uri: uri,
|
359
|
-
params: query_string_params,
|
360
|
-
options: options
|
361
|
-
)
|
362
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
372
|
+
options.apply_defaults timeout: @config.timeout,
|
373
|
+
metadata: @config.metadata
|
363
374
|
|
364
|
-
|
365
|
-
|
375
|
+
@backend_services_stub.delete request, options do |result, response|
|
376
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
377
|
+
yield result, response if block_given?
|
378
|
+
return result
|
379
|
+
end
|
366
380
|
rescue ::Faraday::Error => e
|
367
381
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
368
382
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -400,11 +414,11 @@ module Google
|
|
400
414
|
# 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.
|
401
415
|
#
|
402
416
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
403
|
-
# @yield [result,
|
404
|
-
# @yieldparam result [::
|
417
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
418
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
405
419
|
# @yieldparam response [::Faraday::Response]
|
406
420
|
#
|
407
|
-
# @return [::
|
421
|
+
# @return [::Gapic::Rest::BaseOperation]
|
408
422
|
#
|
409
423
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
410
424
|
def delete_signed_url_key request, options = nil
|
@@ -416,7 +430,7 @@ module Google
|
|
416
430
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
417
431
|
|
418
432
|
# Customize the options with defaults
|
419
|
-
call_metadata =
|
433
|
+
call_metadata = @config.rpcs.delete_signed_url_key.metadata.to_h
|
420
434
|
|
421
435
|
# Set x-goog-api-client header
|
422
436
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -424,19 +438,17 @@ module Google
|
|
424
438
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
425
439
|
transports_version_send: [:rest]
|
426
440
|
|
427
|
-
options.apply_defaults timeout: @config.timeout,
|
441
|
+
options.apply_defaults timeout: @config.rpcs.delete_signed_url_key.timeout,
|
428
442
|
metadata: call_metadata
|
429
443
|
|
430
|
-
|
431
|
-
|
432
|
-
uri: uri,
|
433
|
-
params: query_string_params,
|
434
|
-
options: options
|
435
|
-
)
|
436
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
444
|
+
options.apply_defaults timeout: @config.timeout,
|
445
|
+
metadata: @config.metadata
|
437
446
|
|
438
|
-
|
439
|
-
|
447
|
+
@backend_services_stub.delete_signed_url_key request, options do |result, response|
|
448
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
449
|
+
yield result, response if block_given?
|
450
|
+
return result
|
451
|
+
end
|
440
452
|
rescue ::Faraday::Error => e
|
441
453
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
442
454
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -466,7 +478,7 @@ module Google
|
|
466
478
|
# Name of the BackendService resource to return.
|
467
479
|
# @param project [::String]
|
468
480
|
# Project ID for this request.
|
469
|
-
# @yield [result,
|
481
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
470
482
|
# @yieldparam result [::Google::Cloud::Compute::V1::BackendService]
|
471
483
|
# @yieldparam response [::Faraday::Response]
|
472
484
|
#
|
@@ -482,7 +494,7 @@ module Google
|
|
482
494
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
483
495
|
|
484
496
|
# Customize the options with defaults
|
485
|
-
call_metadata =
|
497
|
+
call_metadata = @config.rpcs.get.metadata.to_h
|
486
498
|
|
487
499
|
# Set x-goog-api-client header
|
488
500
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -490,18 +502,16 @@ module Google
|
|
490
502
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
491
503
|
transports_version_send: [:rest]
|
492
504
|
|
493
|
-
options.apply_defaults timeout: @config.timeout,
|
505
|
+
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
494
506
|
metadata: call_metadata
|
495
507
|
|
496
|
-
|
497
|
-
|
498
|
-
uri: uri,
|
499
|
-
options: options
|
500
|
-
)
|
501
|
-
result = ::Google::Cloud::Compute::V1::BackendService.decode_json response.body, ignore_unknown_fields: true
|
508
|
+
options.apply_defaults timeout: @config.timeout,
|
509
|
+
metadata: @config.metadata
|
502
510
|
|
503
|
-
|
504
|
-
|
511
|
+
@backend_services_stub.get request, options do |result, response|
|
512
|
+
yield result, response if block_given?
|
513
|
+
return result
|
514
|
+
end
|
505
515
|
rescue ::Faraday::Error => e
|
506
516
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
507
517
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -536,7 +546,7 @@ module Google
|
|
536
546
|
# @param project [::String]
|
537
547
|
# @param resource_group_reference_resource [::Google::Cloud::Compute::V1::ResourceGroupReference, ::Hash]
|
538
548
|
# The body resource for this request
|
539
|
-
# @yield [result,
|
549
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
540
550
|
# @yieldparam result [::Google::Cloud::Compute::V1::BackendServiceGroupHealth]
|
541
551
|
# @yieldparam response [::Faraday::Response]
|
542
552
|
#
|
@@ -552,7 +562,7 @@ module Google
|
|
552
562
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
553
563
|
|
554
564
|
# Customize the options with defaults
|
555
|
-
call_metadata =
|
565
|
+
call_metadata = @config.rpcs.get_health.metadata.to_h
|
556
566
|
|
557
567
|
# Set x-goog-api-client header
|
558
568
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -560,19 +570,16 @@ module Google
|
|
560
570
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
561
571
|
transports_version_send: [:rest]
|
562
572
|
|
563
|
-
options.apply_defaults timeout: @config.timeout,
|
573
|
+
options.apply_defaults timeout: @config.rpcs.get_health.timeout,
|
564
574
|
metadata: call_metadata
|
565
575
|
|
566
|
-
|
567
|
-
|
568
|
-
uri: uri,
|
569
|
-
body: body,
|
570
|
-
options: options
|
571
|
-
)
|
572
|
-
result = ::Google::Cloud::Compute::V1::BackendServiceGroupHealth.decode_json response.body, ignore_unknown_fields: true
|
576
|
+
options.apply_defaults timeout: @config.timeout,
|
577
|
+
metadata: @config.metadata
|
573
578
|
|
574
|
-
|
575
|
-
|
579
|
+
@backend_services_stub.get_health request, options do |result, response|
|
580
|
+
yield result, response if block_given?
|
581
|
+
return result
|
582
|
+
end
|
576
583
|
rescue ::Faraday::Error => e
|
577
584
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
578
585
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -608,11 +615,11 @@ module Google
|
|
608
615
|
# 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.
|
609
616
|
#
|
610
617
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
611
|
-
# @yield [result,
|
612
|
-
# @yieldparam result [::
|
618
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
619
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
613
620
|
# @yieldparam response [::Faraday::Response]
|
614
621
|
#
|
615
|
-
# @return [::
|
622
|
+
# @return [::Gapic::Rest::BaseOperation]
|
616
623
|
#
|
617
624
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
618
625
|
def insert request, options = nil
|
@@ -624,7 +631,7 @@ module Google
|
|
624
631
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
625
632
|
|
626
633
|
# Customize the options with defaults
|
627
|
-
call_metadata =
|
634
|
+
call_metadata = @config.rpcs.insert.metadata.to_h
|
628
635
|
|
629
636
|
# Set x-goog-api-client header
|
630
637
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -632,20 +639,17 @@ module Google
|
|
632
639
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
633
640
|
transports_version_send: [:rest]
|
634
641
|
|
635
|
-
options.apply_defaults timeout: @config.timeout,
|
642
|
+
options.apply_defaults timeout: @config.rpcs.insert.timeout,
|
636
643
|
metadata: call_metadata
|
637
644
|
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
yield result, response if block_given?
|
648
|
-
result
|
645
|
+
options.apply_defaults timeout: @config.timeout,
|
646
|
+
metadata: @config.metadata
|
647
|
+
|
648
|
+
@backend_services_stub.insert request, options do |result, response|
|
649
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
650
|
+
yield result, response if block_given?
|
651
|
+
return result
|
652
|
+
end
|
649
653
|
rescue ::Faraday::Error => e
|
650
654
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
651
655
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -692,12 +696,12 @@ module Google
|
|
692
696
|
# @param project [::String]
|
693
697
|
# Project ID for this request.
|
694
698
|
# @param return_partial_success [::Boolean]
|
695
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
696
|
-
# @yield [result,
|
697
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
699
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
700
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
701
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::BackendService>]
|
698
702
|
# @yieldparam response [::Faraday::Response]
|
699
703
|
#
|
700
|
-
# @return [::Google::Cloud::Compute::V1::
|
704
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::BackendService>]
|
701
705
|
#
|
702
706
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
703
707
|
def list request, options = nil
|
@@ -709,7 +713,7 @@ module Google
|
|
709
713
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
710
714
|
|
711
715
|
# Customize the options with defaults
|
712
|
-
call_metadata =
|
716
|
+
call_metadata = @config.rpcs.list.metadata.to_h
|
713
717
|
|
714
718
|
# Set x-goog-api-client header
|
715
719
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -717,19 +721,17 @@ module Google
|
|
717
721
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
718
722
|
transports_version_send: [:rest]
|
719
723
|
|
720
|
-
options.apply_defaults timeout: @config.timeout,
|
724
|
+
options.apply_defaults timeout: @config.rpcs.list.timeout,
|
721
725
|
metadata: call_metadata
|
722
726
|
|
723
|
-
|
724
|
-
|
725
|
-
uri: uri,
|
726
|
-
params: query_string_params,
|
727
|
-
options: options
|
728
|
-
)
|
729
|
-
result = ::Google::Cloud::Compute::V1::BackendServiceList.decode_json response.body, ignore_unknown_fields: true
|
727
|
+
options.apply_defaults timeout: @config.timeout,
|
728
|
+
metadata: @config.metadata
|
730
729
|
|
731
|
-
|
732
|
-
|
730
|
+
@backend_services_stub.list request, options do |result, response|
|
731
|
+
result = ::Gapic::Rest::PagedEnumerable.new @backend_services_stub, :list, "items", request, result, options
|
732
|
+
yield result, response if block_given?
|
733
|
+
return result
|
734
|
+
end
|
733
735
|
rescue ::Faraday::Error => e
|
734
736
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
735
737
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -767,11 +769,11 @@ module Google
|
|
767
769
|
# 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.
|
768
770
|
#
|
769
771
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
770
|
-
# @yield [result,
|
771
|
-
# @yieldparam result [::
|
772
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
773
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
772
774
|
# @yieldparam response [::Faraday::Response]
|
773
775
|
#
|
774
|
-
# @return [::
|
776
|
+
# @return [::Gapic::Rest::BaseOperation]
|
775
777
|
#
|
776
778
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
777
779
|
def patch request, options = nil
|
@@ -783,7 +785,7 @@ module Google
|
|
783
785
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
784
786
|
|
785
787
|
# Customize the options with defaults
|
786
|
-
call_metadata =
|
788
|
+
call_metadata = @config.rpcs.patch.metadata.to_h
|
787
789
|
|
788
790
|
# Set x-goog-api-client header
|
789
791
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -791,27 +793,24 @@ module Google
|
|
791
793
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
792
794
|
transports_version_send: [:rest]
|
793
795
|
|
794
|
-
options.apply_defaults timeout: @config.timeout,
|
796
|
+
options.apply_defaults timeout: @config.rpcs.patch.timeout,
|
795
797
|
metadata: call_metadata
|
796
798
|
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
yield result, response if block_given?
|
807
|
-
result
|
799
|
+
options.apply_defaults timeout: @config.timeout,
|
800
|
+
metadata: @config.metadata
|
801
|
+
|
802
|
+
@backend_services_stub.patch request, options do |result, response|
|
803
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
804
|
+
yield result, response if block_given?
|
805
|
+
return result
|
806
|
+
end
|
808
807
|
rescue ::Faraday::Error => e
|
809
808
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
810
809
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
811
810
|
end
|
812
811
|
|
813
812
|
##
|
814
|
-
# Sets the security policy for the specified backend service.
|
813
|
+
# Sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview
|
815
814
|
#
|
816
815
|
# @overload set_security_policy(request, options = nil)
|
817
816
|
# Pass arguments to `set_security_policy` via a request object, either of type
|
@@ -842,11 +841,11 @@ module Google
|
|
842
841
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
843
842
|
# @param security_policy_reference_resource [::Google::Cloud::Compute::V1::SecurityPolicyReference, ::Hash]
|
844
843
|
# The body resource for this request
|
845
|
-
# @yield [result,
|
846
|
-
# @yieldparam result [::
|
844
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
845
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
847
846
|
# @yieldparam response [::Faraday::Response]
|
848
847
|
#
|
849
|
-
# @return [::
|
848
|
+
# @return [::Gapic::Rest::BaseOperation]
|
850
849
|
#
|
851
850
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
852
851
|
def set_security_policy request, options = nil
|
@@ -858,7 +857,7 @@ module Google
|
|
858
857
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
859
858
|
|
860
859
|
# Customize the options with defaults
|
861
|
-
call_metadata =
|
860
|
+
call_metadata = @config.rpcs.set_security_policy.metadata.to_h
|
862
861
|
|
863
862
|
# Set x-goog-api-client header
|
864
863
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -866,20 +865,17 @@ module Google
|
|
866
865
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
867
866
|
transports_version_send: [:rest]
|
868
867
|
|
869
|
-
options.apply_defaults timeout: @config.timeout,
|
868
|
+
options.apply_defaults timeout: @config.rpcs.set_security_policy.timeout,
|
870
869
|
metadata: call_metadata
|
871
870
|
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
yield result, response if block_given?
|
882
|
-
result
|
871
|
+
options.apply_defaults timeout: @config.timeout,
|
872
|
+
metadata: @config.metadata
|
873
|
+
|
874
|
+
@backend_services_stub.set_security_policy request, options do |result, response|
|
875
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
876
|
+
yield result, response if block_given?
|
877
|
+
return result
|
878
|
+
end
|
883
879
|
rescue ::Faraday::Error => e
|
884
880
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
885
881
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -917,11 +913,11 @@ module Google
|
|
917
913
|
# 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.
|
918
914
|
#
|
919
915
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
920
|
-
# @yield [result,
|
921
|
-
# @yieldparam result [::
|
916
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
917
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
922
918
|
# @yieldparam response [::Faraday::Response]
|
923
919
|
#
|
924
|
-
# @return [::
|
920
|
+
# @return [::Gapic::Rest::BaseOperation]
|
925
921
|
#
|
926
922
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
927
923
|
def update request, options = nil
|
@@ -933,7 +929,7 @@ module Google
|
|
933
929
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
934
930
|
|
935
931
|
# Customize the options with defaults
|
936
|
-
call_metadata =
|
932
|
+
call_metadata = @config.rpcs.update.metadata.to_h
|
937
933
|
|
938
934
|
# Set x-goog-api-client header
|
939
935
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -941,20 +937,17 @@ module Google
|
|
941
937
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
942
938
|
transports_version_send: [:rest]
|
943
939
|
|
944
|
-
options.apply_defaults timeout: @config.timeout,
|
940
|
+
options.apply_defaults timeout: @config.rpcs.update.timeout,
|
945
941
|
metadata: call_metadata
|
946
942
|
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
yield result, response if block_given?
|
957
|
-
result
|
943
|
+
options.apply_defaults timeout: @config.timeout,
|
944
|
+
metadata: @config.metadata
|
945
|
+
|
946
|
+
@backend_services_stub.update request, options do |result, response|
|
947
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
948
|
+
yield result, response if block_given?
|
949
|
+
return result
|
950
|
+
end
|
958
951
|
rescue ::Faraday::Error => e
|
959
952
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
960
953
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1009,6 +1002,9 @@ module Google
|
|
1009
1002
|
# @!attribute [rw] timeout
|
1010
1003
|
# The call timeout in seconds.
|
1011
1004
|
# @return [::Numeric]
|
1005
|
+
# @!attribute [rw] metadata
|
1006
|
+
# Additional REST headers to be sent with the call.
|
1007
|
+
# @return [::Hash{::Symbol=>::String}]
|
1012
1008
|
#
|
1013
1009
|
class Configuration
|
1014
1010
|
extend ::Gapic::Config
|
@@ -1022,6 +1018,7 @@ module Google
|
|
1022
1018
|
config_attr :lib_name, nil, ::String, nil
|
1023
1019
|
config_attr :lib_version, nil, ::String, nil
|
1024
1020
|
config_attr :timeout, nil, ::Numeric, nil
|
1021
|
+
config_attr :metadata, nil, ::Hash, nil
|
1025
1022
|
|
1026
1023
|
# @private
|
1027
1024
|
def initialize parent_config = nil
|
@@ -1029,6 +1026,116 @@ module Google
|
|
1029
1026
|
|
1030
1027
|
yield self if block_given?
|
1031
1028
|
end
|
1029
|
+
|
1030
|
+
##
|
1031
|
+
# Configurations for individual RPCs
|
1032
|
+
# @return [Rpcs]
|
1033
|
+
#
|
1034
|
+
def rpcs
|
1035
|
+
@rpcs ||= begin
|
1036
|
+
parent_rpcs = nil
|
1037
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1038
|
+
Rpcs.new parent_rpcs
|
1039
|
+
end
|
1040
|
+
end
|
1041
|
+
|
1042
|
+
##
|
1043
|
+
# Configuration RPC class for the BackendServices API.
|
1044
|
+
#
|
1045
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1046
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1047
|
+
# the following configuration fields:
|
1048
|
+
#
|
1049
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1050
|
+
#
|
1051
|
+
# there is one other field (`retry_policy`) that can be set
|
1052
|
+
# but is currently not supported for REST Gapic libraries.
|
1053
|
+
#
|
1054
|
+
class Rpcs
|
1055
|
+
##
|
1056
|
+
# RPC-specific configuration for `add_signed_url_key`
|
1057
|
+
# @return [::Gapic::Config::Method]
|
1058
|
+
#
|
1059
|
+
attr_reader :add_signed_url_key
|
1060
|
+
##
|
1061
|
+
# RPC-specific configuration for `aggregated_list`
|
1062
|
+
# @return [::Gapic::Config::Method]
|
1063
|
+
#
|
1064
|
+
attr_reader :aggregated_list
|
1065
|
+
##
|
1066
|
+
# RPC-specific configuration for `delete`
|
1067
|
+
# @return [::Gapic::Config::Method]
|
1068
|
+
#
|
1069
|
+
attr_reader :delete
|
1070
|
+
##
|
1071
|
+
# RPC-specific configuration for `delete_signed_url_key`
|
1072
|
+
# @return [::Gapic::Config::Method]
|
1073
|
+
#
|
1074
|
+
attr_reader :delete_signed_url_key
|
1075
|
+
##
|
1076
|
+
# RPC-specific configuration for `get`
|
1077
|
+
# @return [::Gapic::Config::Method]
|
1078
|
+
#
|
1079
|
+
attr_reader :get
|
1080
|
+
##
|
1081
|
+
# RPC-specific configuration for `get_health`
|
1082
|
+
# @return [::Gapic::Config::Method]
|
1083
|
+
#
|
1084
|
+
attr_reader :get_health
|
1085
|
+
##
|
1086
|
+
# RPC-specific configuration for `insert`
|
1087
|
+
# @return [::Gapic::Config::Method]
|
1088
|
+
#
|
1089
|
+
attr_reader :insert
|
1090
|
+
##
|
1091
|
+
# RPC-specific configuration for `list`
|
1092
|
+
# @return [::Gapic::Config::Method]
|
1093
|
+
#
|
1094
|
+
attr_reader :list
|
1095
|
+
##
|
1096
|
+
# RPC-specific configuration for `patch`
|
1097
|
+
# @return [::Gapic::Config::Method]
|
1098
|
+
#
|
1099
|
+
attr_reader :patch
|
1100
|
+
##
|
1101
|
+
# RPC-specific configuration for `set_security_policy`
|
1102
|
+
# @return [::Gapic::Config::Method]
|
1103
|
+
#
|
1104
|
+
attr_reader :set_security_policy
|
1105
|
+
##
|
1106
|
+
# RPC-specific configuration for `update`
|
1107
|
+
# @return [::Gapic::Config::Method]
|
1108
|
+
#
|
1109
|
+
attr_reader :update
|
1110
|
+
|
1111
|
+
# @private
|
1112
|
+
def initialize parent_rpcs = nil
|
1113
|
+
add_signed_url_key_config = parent_rpcs.add_signed_url_key if parent_rpcs.respond_to? :add_signed_url_key
|
1114
|
+
@add_signed_url_key = ::Gapic::Config::Method.new add_signed_url_key_config
|
1115
|
+
aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
|
1116
|
+
@aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
|
1117
|
+
delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
|
1118
|
+
@delete = ::Gapic::Config::Method.new delete_config
|
1119
|
+
delete_signed_url_key_config = parent_rpcs.delete_signed_url_key if parent_rpcs.respond_to? :delete_signed_url_key
|
1120
|
+
@delete_signed_url_key = ::Gapic::Config::Method.new delete_signed_url_key_config
|
1121
|
+
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|
1122
|
+
@get = ::Gapic::Config::Method.new get_config
|
1123
|
+
get_health_config = parent_rpcs.get_health if parent_rpcs.respond_to? :get_health
|
1124
|
+
@get_health = ::Gapic::Config::Method.new get_health_config
|
1125
|
+
insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
|
1126
|
+
@insert = ::Gapic::Config::Method.new insert_config
|
1127
|
+
list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
|
1128
|
+
@list = ::Gapic::Config::Method.new list_config
|
1129
|
+
patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
|
1130
|
+
@patch = ::Gapic::Config::Method.new patch_config
|
1131
|
+
set_security_policy_config = parent_rpcs.set_security_policy if parent_rpcs.respond_to? :set_security_policy
|
1132
|
+
@set_security_policy = ::Gapic::Config::Method.new set_security_policy_config
|
1133
|
+
update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
|
1134
|
+
@update = ::Gapic::Config::Method.new update_config
|
1135
|
+
|
1136
|
+
yield self if block_given?
|
1137
|
+
end
|
1138
|
+
end
|
1032
1139
|
end
|
1033
1140
|
end
|
1034
1141
|
end
|