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,369 @@
|
|
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 PacketMirrorings
|
26
|
+
module Rest
|
27
|
+
##
|
28
|
+
# REST service stub for the PacketMirrorings 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::AggregatedListPacketMirroringsRequest]
|
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::PacketMirroringAggregatedList]
|
51
|
+
# @yieldparam response [::Faraday::Response]
|
52
|
+
#
|
53
|
+
# @return [::Google::Cloud::Compute::V1::PacketMirroringAggregatedList]
|
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::PacketMirroringAggregatedList.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::AggregatedListPacketMirroringsRequest]
|
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/packetMirrorings"
|
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::DeletePacketMirroringRequest]
|
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::DeletePacketMirroringRequest]
|
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}/regions/#{request_pb.region}/packetMirrorings/#{request_pb.packet_mirroring}"
|
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::GetPacketMirroringRequest]
|
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::PacketMirroring]
|
146
|
+
# @yieldparam response [::Faraday::Response]
|
147
|
+
#
|
148
|
+
# @return [::Google::Cloud::Compute::V1::PacketMirroring]
|
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::PacketMirroring.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::GetPacketMirroringRequest]
|
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}/regions/#{request_pb.region}/packetMirrorings/#{request_pb.packet_mirroring}"
|
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::InsertPacketMirroringRequest]
|
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::InsertPacketMirroringRequest]
|
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}/regions/#{request_pb.region}/packetMirrorings"
|
218
|
+
body = request_pb.packet_mirroring_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::ListPacketMirroringsRequest]
|
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::PacketMirroringList]
|
235
|
+
# @yieldparam response [::Faraday::Response]
|
236
|
+
#
|
237
|
+
# @return [::Google::Cloud::Compute::V1::PacketMirroringList]
|
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::PacketMirroringList.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::ListPacketMirroringsRequest]
|
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}/regions/#{request_pb.region}/packetMirrorings"
|
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::PatchPacketMirroringRequest]
|
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::PatchPacketMirroringRequest]
|
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}/regions/#{request_pb.region}/packetMirrorings/#{request_pb.packet_mirroring}"
|
313
|
+
body = request_pb.packet_mirroring_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 test_iam_permissions REST call
|
322
|
+
#
|
323
|
+
# @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsPacketMirroringRequest]
|
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::TestPermissionsResponse]
|
330
|
+
# @yieldparam response [::Faraday::Response]
|
331
|
+
#
|
332
|
+
# @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
|
333
|
+
# A result object deserialized from the server's reply
|
334
|
+
def test_iam_permissions request_pb, options = nil
|
335
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
336
|
+
|
337
|
+
uri, body, _query_string_params = transcode_test_iam_permissions_request request_pb
|
338
|
+
response = @client_stub.make_post_request(
|
339
|
+
uri: uri,
|
340
|
+
body: body,
|
341
|
+
options: options
|
342
|
+
)
|
343
|
+
result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
|
344
|
+
|
345
|
+
yield result, response if block_given?
|
346
|
+
result
|
347
|
+
end
|
348
|
+
|
349
|
+
##
|
350
|
+
# GRPC transcoding helper method for the test_iam_permissions REST call
|
351
|
+
#
|
352
|
+
# @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsPacketMirroringRequest]
|
353
|
+
# A request object representing the call parameters. Required.
|
354
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
355
|
+
# Uri, Body, Query string parameters
|
356
|
+
def transcode_test_iam_permissions_request request_pb
|
357
|
+
uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/packetMirrorings/#{request_pb.resource}/testIamPermissions"
|
358
|
+
body = request_pb.test_permissions_request_resource.to_json
|
359
|
+
query_string_params = {}
|
360
|
+
|
361
|
+
[uri, body, query_string_params]
|
362
|
+
end
|
363
|
+
end
|
364
|
+
end
|
365
|
+
end
|
366
|
+
end
|
367
|
+
end
|
368
|
+
end
|
369
|
+
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/projects/rest/service_stub"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -31,8 +32,6 @@ module Google
|
|
31
32
|
# The Projects API.
|
32
33
|
#
|
33
34
|
class Client
|
34
|
-
include GrpcTranscoding
|
35
|
-
|
36
35
|
# @private
|
37
36
|
attr_reader :projects_stub
|
38
37
|
|
@@ -42,13 +41,12 @@ module Google
|
|
42
41
|
# See {::Google::Cloud::Compute::V1::Projects::Rest::Client::Configuration}
|
43
42
|
# for a description of the configuration fields.
|
44
43
|
#
|
45
|
-
#
|
44
|
+
# @example
|
46
45
|
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
# end
|
46
|
+
# # Modify the configuration for all Projects clients
|
47
|
+
# ::Google::Cloud::Compute::V1::Projects::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,41 @@ module Google
|
|
66
64
|
end
|
67
65
|
default_config = Client::Configuration.new parent_config
|
68
66
|
|
67
|
+
default_config.rpcs.disable_xpn_host.timeout = 600.0
|
68
|
+
|
69
|
+
default_config.rpcs.disable_xpn_resource.timeout = 600.0
|
70
|
+
|
71
|
+
default_config.rpcs.enable_xpn_host.timeout = 600.0
|
72
|
+
|
73
|
+
default_config.rpcs.enable_xpn_resource.timeout = 600.0
|
74
|
+
|
75
|
+
default_config.rpcs.get.timeout = 600.0
|
76
|
+
default_config.rpcs.get.retry_policy = {
|
77
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
78
|
+
}
|
79
|
+
|
80
|
+
default_config.rpcs.get_xpn_host.timeout = 600.0
|
81
|
+
default_config.rpcs.get_xpn_host.retry_policy = {
|
82
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
83
|
+
}
|
84
|
+
|
85
|
+
default_config.rpcs.get_xpn_resources.timeout = 600.0
|
86
|
+
default_config.rpcs.get_xpn_resources.retry_policy = {
|
87
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
88
|
+
}
|
89
|
+
|
90
|
+
default_config.rpcs.list_xpn_hosts.timeout = 600.0
|
91
|
+
|
92
|
+
default_config.rpcs.move_disk.timeout = 600.0
|
93
|
+
|
94
|
+
default_config.rpcs.move_instance.timeout = 600.0
|
95
|
+
|
96
|
+
default_config.rpcs.set_common_instance_metadata.timeout = 600.0
|
97
|
+
|
98
|
+
default_config.rpcs.set_default_network_tier.timeout = 600.0
|
99
|
+
|
100
|
+
default_config.rpcs.set_usage_export_bucket.timeout = 600.0
|
101
|
+
|
69
102
|
default_config
|
70
103
|
end
|
71
104
|
yield @configure if block_given?
|
@@ -95,28 +128,20 @@ module Google
|
|
95
128
|
##
|
96
129
|
# Create a new Projects REST client object.
|
97
130
|
#
|
98
|
-
#
|
131
|
+
# @example
|
99
132
|
#
|
100
|
-
#
|
101
|
-
#
|
133
|
+
# # Create a client using the default configuration
|
134
|
+
# client = ::Google::Cloud::Compute::V1::Projects::Rest::Client.new
|
102
135
|
#
|
103
|
-
#
|
104
|
-
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
# client = ::Google::Cloud::Compute::V1::Projects::Rest::Client.new do |config|
|
109
|
-
# config.timeout = 10.0
|
110
|
-
# end
|
136
|
+
# # Create a client using a custom configuration
|
137
|
+
# client = ::Google::Cloud::Compute::V1::Projects::Rest::Client.new do |config|
|
138
|
+
# config.timeout = 10.0
|
139
|
+
# end
|
111
140
|
#
|
112
141
|
# @yield [config] Configure the Projects client.
|
113
142
|
# @yieldparam config [Client::Configuration]
|
114
143
|
#
|
115
144
|
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
145
|
# Create the configuration object
|
121
146
|
@config = Configuration.new Client.configure
|
122
147
|
|
@@ -126,11 +151,11 @@ module Google
|
|
126
151
|
# Create credentials
|
127
152
|
credentials = @config.credentials
|
128
153
|
credentials ||= Credentials.default scope: @config.scope
|
129
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
154
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
130
155
|
credentials = Credentials.new credentials, scope: @config.scope
|
131
156
|
end
|
132
157
|
|
133
|
-
@
|
158
|
+
@projects_stub = ::Google::Cloud::Compute::V1::Projects::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
134
159
|
end
|
135
160
|
|
136
161
|
# Service calls
|
@@ -163,11 +188,11 @@ module Google
|
|
163
188
|
# 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.
|
164
189
|
#
|
165
190
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
166
|
-
# @yield [result,
|
167
|
-
# @yieldparam result [::
|
191
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
192
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
168
193
|
# @yieldparam response [::Faraday::Response]
|
169
194
|
#
|
170
|
-
# @return [::
|
195
|
+
# @return [::Gapic::Rest::BaseOperation]
|
171
196
|
#
|
172
197
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
173
198
|
def disable_xpn_host request, options = nil
|
@@ -179,7 +204,7 @@ module Google
|
|
179
204
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
180
205
|
|
181
206
|
# Customize the options with defaults
|
182
|
-
call_metadata =
|
207
|
+
call_metadata = @config.rpcs.disable_xpn_host.metadata.to_h
|
183
208
|
|
184
209
|
# Set x-goog-api-client header
|
185
210
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -187,19 +212,17 @@ module Google
|
|
187
212
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
188
213
|
transports_version_send: [:rest]
|
189
214
|
|
190
|
-
options.apply_defaults timeout: @config.timeout,
|
215
|
+
options.apply_defaults timeout: @config.rpcs.disable_xpn_host.timeout,
|
191
216
|
metadata: call_metadata
|
192
217
|
|
193
|
-
|
194
|
-
|
195
|
-
uri: uri,
|
196
|
-
params: query_string_params,
|
197
|
-
options: options
|
198
|
-
)
|
199
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
218
|
+
options.apply_defaults timeout: @config.timeout,
|
219
|
+
metadata: @config.metadata
|
200
220
|
|
201
|
-
|
202
|
-
|
221
|
+
@projects_stub.disable_xpn_host request, options do |result, response|
|
222
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
223
|
+
yield result, response if block_given?
|
224
|
+
return result
|
225
|
+
end
|
203
226
|
rescue ::Faraday::Error => e
|
204
227
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
205
228
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -235,11 +258,11 @@ module Google
|
|
235
258
|
# 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.
|
236
259
|
#
|
237
260
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
238
|
-
# @yield [result,
|
239
|
-
# @yieldparam result [::
|
261
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
262
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
240
263
|
# @yieldparam response [::Faraday::Response]
|
241
264
|
#
|
242
|
-
# @return [::
|
265
|
+
# @return [::Gapic::Rest::BaseOperation]
|
243
266
|
#
|
244
267
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
245
268
|
def disable_xpn_resource request, options = nil
|
@@ -251,7 +274,7 @@ module Google
|
|
251
274
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
252
275
|
|
253
276
|
# Customize the options with defaults
|
254
|
-
call_metadata =
|
277
|
+
call_metadata = @config.rpcs.disable_xpn_resource.metadata.to_h
|
255
278
|
|
256
279
|
# Set x-goog-api-client header
|
257
280
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -259,20 +282,17 @@ module Google
|
|
259
282
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
260
283
|
transports_version_send: [:rest]
|
261
284
|
|
262
|
-
options.apply_defaults timeout: @config.timeout,
|
285
|
+
options.apply_defaults timeout: @config.rpcs.disable_xpn_resource.timeout,
|
263
286
|
metadata: call_metadata
|
264
287
|
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
yield result, response if block_given?
|
275
|
-
result
|
288
|
+
options.apply_defaults timeout: @config.timeout,
|
289
|
+
metadata: @config.metadata
|
290
|
+
|
291
|
+
@projects_stub.disable_xpn_resource request, options do |result, response|
|
292
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
293
|
+
yield result, response if block_given?
|
294
|
+
return result
|
295
|
+
end
|
276
296
|
rescue ::Faraday::Error => e
|
277
297
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
278
298
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -306,11 +326,11 @@ module Google
|
|
306
326
|
# 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.
|
307
327
|
#
|
308
328
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
309
|
-
# @yield [result,
|
310
|
-
# @yieldparam result [::
|
329
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
330
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
311
331
|
# @yieldparam response [::Faraday::Response]
|
312
332
|
#
|
313
|
-
# @return [::
|
333
|
+
# @return [::Gapic::Rest::BaseOperation]
|
314
334
|
#
|
315
335
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
316
336
|
def enable_xpn_host request, options = nil
|
@@ -322,7 +342,7 @@ module Google
|
|
322
342
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
323
343
|
|
324
344
|
# Customize the options with defaults
|
325
|
-
call_metadata =
|
345
|
+
call_metadata = @config.rpcs.enable_xpn_host.metadata.to_h
|
326
346
|
|
327
347
|
# Set x-goog-api-client header
|
328
348
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -330,19 +350,17 @@ module Google
|
|
330
350
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
331
351
|
transports_version_send: [:rest]
|
332
352
|
|
333
|
-
options.apply_defaults timeout: @config.timeout,
|
353
|
+
options.apply_defaults timeout: @config.rpcs.enable_xpn_host.timeout,
|
334
354
|
metadata: call_metadata
|
335
355
|
|
336
|
-
|
337
|
-
|
338
|
-
uri: uri,
|
339
|
-
params: query_string_params,
|
340
|
-
options: options
|
341
|
-
)
|
342
|
-
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
356
|
+
options.apply_defaults timeout: @config.timeout,
|
357
|
+
metadata: @config.metadata
|
343
358
|
|
344
|
-
|
345
|
-
|
359
|
+
@projects_stub.enable_xpn_host request, options do |result, response|
|
360
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
361
|
+
yield result, response if block_given?
|
362
|
+
return result
|
363
|
+
end
|
346
364
|
rescue ::Faraday::Error => e
|
347
365
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
348
366
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -378,11 +396,11 @@ module Google
|
|
378
396
|
# 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.
|
379
397
|
#
|
380
398
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
381
|
-
# @yield [result,
|
382
|
-
# @yieldparam result [::
|
399
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
400
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
383
401
|
# @yieldparam response [::Faraday::Response]
|
384
402
|
#
|
385
|
-
# @return [::
|
403
|
+
# @return [::Gapic::Rest::BaseOperation]
|
386
404
|
#
|
387
405
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
388
406
|
def enable_xpn_resource request, options = nil
|
@@ -394,7 +412,7 @@ module Google
|
|
394
412
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
395
413
|
|
396
414
|
# Customize the options with defaults
|
397
|
-
call_metadata =
|
415
|
+
call_metadata = @config.rpcs.enable_xpn_resource.metadata.to_h
|
398
416
|
|
399
417
|
# Set x-goog-api-client header
|
400
418
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -402,20 +420,17 @@ module Google
|
|
402
420
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
403
421
|
transports_version_send: [:rest]
|
404
422
|
|
405
|
-
options.apply_defaults timeout: @config.timeout,
|
423
|
+
options.apply_defaults timeout: @config.rpcs.enable_xpn_resource.timeout,
|
406
424
|
metadata: call_metadata
|
407
425
|
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
yield result, response if block_given?
|
418
|
-
result
|
426
|
+
options.apply_defaults timeout: @config.timeout,
|
427
|
+
metadata: @config.metadata
|
428
|
+
|
429
|
+
@projects_stub.enable_xpn_resource request, options do |result, response|
|
430
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
431
|
+
yield result, response if block_given?
|
432
|
+
return result
|
433
|
+
end
|
419
434
|
rescue ::Faraday::Error => e
|
420
435
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
421
436
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -443,7 +458,7 @@ module Google
|
|
443
458
|
#
|
444
459
|
# @param project [::String]
|
445
460
|
# Project ID for this request.
|
446
|
-
# @yield [result,
|
461
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
447
462
|
# @yieldparam result [::Google::Cloud::Compute::V1::Project]
|
448
463
|
# @yieldparam response [::Faraday::Response]
|
449
464
|
#
|
@@ -459,7 +474,7 @@ module Google
|
|
459
474
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
460
475
|
|
461
476
|
# Customize the options with defaults
|
462
|
-
call_metadata =
|
477
|
+
call_metadata = @config.rpcs.get.metadata.to_h
|
463
478
|
|
464
479
|
# Set x-goog-api-client header
|
465
480
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -467,18 +482,16 @@ module Google
|
|
467
482
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
468
483
|
transports_version_send: [:rest]
|
469
484
|
|
470
|
-
options.apply_defaults timeout: @config.timeout,
|
485
|
+
options.apply_defaults timeout: @config.rpcs.get.timeout,
|
471
486
|
metadata: call_metadata
|
472
487
|
|
473
|
-
|
474
|
-
|
475
|
-
uri: uri,
|
476
|
-
options: options
|
477
|
-
)
|
478
|
-
result = ::Google::Cloud::Compute::V1::Project.decode_json response.body, ignore_unknown_fields: true
|
488
|
+
options.apply_defaults timeout: @config.timeout,
|
489
|
+
metadata: @config.metadata
|
479
490
|
|
480
|
-
|
481
|
-
|
491
|
+
@projects_stub.get request, options do |result, response|
|
492
|
+
yield result, response if block_given?
|
493
|
+
return result
|
494
|
+
end
|
482
495
|
rescue ::Faraday::Error => e
|
483
496
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
484
497
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -506,7 +519,7 @@ module Google
|
|
506
519
|
#
|
507
520
|
# @param project [::String]
|
508
521
|
# Project ID for this request.
|
509
|
-
# @yield [result,
|
522
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
510
523
|
# @yieldparam result [::Google::Cloud::Compute::V1::Project]
|
511
524
|
# @yieldparam response [::Faraday::Response]
|
512
525
|
#
|
@@ -522,7 +535,7 @@ module Google
|
|
522
535
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
523
536
|
|
524
537
|
# Customize the options with defaults
|
525
|
-
call_metadata =
|
538
|
+
call_metadata = @config.rpcs.get_xpn_host.metadata.to_h
|
526
539
|
|
527
540
|
# Set x-goog-api-client header
|
528
541
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -530,18 +543,16 @@ module Google
|
|
530
543
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
531
544
|
transports_version_send: [:rest]
|
532
545
|
|
533
|
-
options.apply_defaults timeout: @config.timeout,
|
546
|
+
options.apply_defaults timeout: @config.rpcs.get_xpn_host.timeout,
|
534
547
|
metadata: call_metadata
|
535
548
|
|
536
|
-
|
537
|
-
|
538
|
-
uri: uri,
|
539
|
-
options: options
|
540
|
-
)
|
541
|
-
result = ::Google::Cloud::Compute::V1::Project.decode_json response.body, ignore_unknown_fields: true
|
549
|
+
options.apply_defaults timeout: @config.timeout,
|
550
|
+
metadata: @config.metadata
|
542
551
|
|
543
|
-
|
544
|
-
|
552
|
+
@projects_stub.get_xpn_host request, options do |result, response|
|
553
|
+
yield result, response if block_given?
|
554
|
+
return result
|
555
|
+
end
|
545
556
|
rescue ::Faraday::Error => e
|
546
557
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
547
558
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -588,12 +599,12 @@ module Google
|
|
588
599
|
# @param project [::String]
|
589
600
|
# Project ID for this request.
|
590
601
|
# @param return_partial_success [::Boolean]
|
591
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
592
|
-
# @yield [result,
|
593
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
602
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
603
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
604
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::XpnResourceId>]
|
594
605
|
# @yieldparam response [::Faraday::Response]
|
595
606
|
#
|
596
|
-
# @return [::Google::Cloud::Compute::V1::
|
607
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::XpnResourceId>]
|
597
608
|
#
|
598
609
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
599
610
|
def get_xpn_resources request, options = nil
|
@@ -605,7 +616,7 @@ module Google
|
|
605
616
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
606
617
|
|
607
618
|
# Customize the options with defaults
|
608
|
-
call_metadata =
|
619
|
+
call_metadata = @config.rpcs.get_xpn_resources.metadata.to_h
|
609
620
|
|
610
621
|
# Set x-goog-api-client header
|
611
622
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -613,19 +624,17 @@ module Google
|
|
613
624
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
614
625
|
transports_version_send: [:rest]
|
615
626
|
|
616
|
-
options.apply_defaults timeout: @config.timeout,
|
627
|
+
options.apply_defaults timeout: @config.rpcs.get_xpn_resources.timeout,
|
617
628
|
metadata: call_metadata
|
618
629
|
|
619
|
-
|
620
|
-
|
621
|
-
uri: uri,
|
622
|
-
params: query_string_params,
|
623
|
-
options: options
|
624
|
-
)
|
625
|
-
result = ::Google::Cloud::Compute::V1::ProjectsGetXpnResources.decode_json response.body, ignore_unknown_fields: true
|
630
|
+
options.apply_defaults timeout: @config.timeout,
|
631
|
+
metadata: @config.metadata
|
626
632
|
|
627
|
-
|
628
|
-
|
633
|
+
@projects_stub.get_xpn_resources request, options do |result, response|
|
634
|
+
result = ::Gapic::Rest::PagedEnumerable.new @projects_stub, :get_xpn_resources, "resources", request, result, options
|
635
|
+
yield result, response if block_given?
|
636
|
+
return result
|
637
|
+
end
|
629
638
|
rescue ::Faraday::Error => e
|
630
639
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
631
640
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -674,12 +683,12 @@ module Google
|
|
674
683
|
# @param projects_list_xpn_hosts_request_resource [::Google::Cloud::Compute::V1::ProjectsListXpnHostsRequest, ::Hash]
|
675
684
|
# The body resource for this request
|
676
685
|
# @param return_partial_success [::Boolean]
|
677
|
-
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false
|
678
|
-
# @yield [result,
|
679
|
-
# @yieldparam result [::Google::Cloud::Compute::V1::
|
686
|
+
# Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
|
687
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
688
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Project>]
|
680
689
|
# @yieldparam response [::Faraday::Response]
|
681
690
|
#
|
682
|
-
# @return [::Google::Cloud::Compute::V1::
|
691
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Project>]
|
683
692
|
#
|
684
693
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
685
694
|
def list_xpn_hosts request, options = nil
|
@@ -691,7 +700,7 @@ module Google
|
|
691
700
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
692
701
|
|
693
702
|
# Customize the options with defaults
|
694
|
-
call_metadata =
|
703
|
+
call_metadata = @config.rpcs.list_xpn_hosts.metadata.to_h
|
695
704
|
|
696
705
|
# Set x-goog-api-client header
|
697
706
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -699,20 +708,17 @@ module Google
|
|
699
708
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
700
709
|
transports_version_send: [:rest]
|
701
710
|
|
702
|
-
options.apply_defaults timeout: @config.timeout,
|
711
|
+
options.apply_defaults timeout: @config.rpcs.list_xpn_hosts.timeout,
|
703
712
|
metadata: call_metadata
|
704
713
|
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
yield result, response if block_given?
|
715
|
-
result
|
714
|
+
options.apply_defaults timeout: @config.timeout,
|
715
|
+
metadata: @config.metadata
|
716
|
+
|
717
|
+
@projects_stub.list_xpn_hosts request, options do |result, response|
|
718
|
+
result = ::Gapic::Rest::PagedEnumerable.new @projects_stub, :list_xpn_hosts, "items", request, result, options
|
719
|
+
yield result, response if block_given?
|
720
|
+
return result
|
721
|
+
end
|
716
722
|
rescue ::Faraday::Error => e
|
717
723
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
718
724
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -748,11 +754,11 @@ module Google
|
|
748
754
|
# 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.
|
749
755
|
#
|
750
756
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
751
|
-
# @yield [result,
|
752
|
-
# @yieldparam result [::
|
757
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
758
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
753
759
|
# @yieldparam response [::Faraday::Response]
|
754
760
|
#
|
755
|
-
# @return [::
|
761
|
+
# @return [::Gapic::Rest::BaseOperation]
|
756
762
|
#
|
757
763
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
758
764
|
def move_disk request, options = nil
|
@@ -764,7 +770,7 @@ module Google
|
|
764
770
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
765
771
|
|
766
772
|
# Customize the options with defaults
|
767
|
-
call_metadata =
|
773
|
+
call_metadata = @config.rpcs.move_disk.metadata.to_h
|
768
774
|
|
769
775
|
# Set x-goog-api-client header
|
770
776
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -772,20 +778,17 @@ module Google
|
|
772
778
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
773
779
|
transports_version_send: [:rest]
|
774
780
|
|
775
|
-
options.apply_defaults timeout: @config.timeout,
|
781
|
+
options.apply_defaults timeout: @config.rpcs.move_disk.timeout,
|
776
782
|
metadata: call_metadata
|
777
783
|
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
yield result, response if block_given?
|
788
|
-
result
|
784
|
+
options.apply_defaults timeout: @config.timeout,
|
785
|
+
metadata: @config.metadata
|
786
|
+
|
787
|
+
@projects_stub.move_disk request, options do |result, response|
|
788
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
789
|
+
yield result, response if block_given?
|
790
|
+
return result
|
791
|
+
end
|
789
792
|
rescue ::Faraday::Error => e
|
790
793
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
791
794
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -821,11 +824,11 @@ module Google
|
|
821
824
|
# 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.
|
822
825
|
#
|
823
826
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
824
|
-
# @yield [result,
|
825
|
-
# @yieldparam result [::
|
827
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
828
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
826
829
|
# @yieldparam response [::Faraday::Response]
|
827
830
|
#
|
828
|
-
# @return [::
|
831
|
+
# @return [::Gapic::Rest::BaseOperation]
|
829
832
|
#
|
830
833
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
831
834
|
def move_instance request, options = nil
|
@@ -837,7 +840,7 @@ module Google
|
|
837
840
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
838
841
|
|
839
842
|
# Customize the options with defaults
|
840
|
-
call_metadata =
|
843
|
+
call_metadata = @config.rpcs.move_instance.metadata.to_h
|
841
844
|
|
842
845
|
# Set x-goog-api-client header
|
843
846
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -845,20 +848,17 @@ module Google
|
|
845
848
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
846
849
|
transports_version_send: [:rest]
|
847
850
|
|
848
|
-
options.apply_defaults timeout: @config.timeout,
|
851
|
+
options.apply_defaults timeout: @config.rpcs.move_instance.timeout,
|
849
852
|
metadata: call_metadata
|
850
853
|
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
yield result, response if block_given?
|
861
|
-
result
|
854
|
+
options.apply_defaults timeout: @config.timeout,
|
855
|
+
metadata: @config.metadata
|
856
|
+
|
857
|
+
@projects_stub.move_instance request, options do |result, response|
|
858
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
859
|
+
yield result, response if block_given?
|
860
|
+
return result
|
861
|
+
end
|
862
862
|
rescue ::Faraday::Error => e
|
863
863
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
864
864
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -894,11 +894,11 @@ module Google
|
|
894
894
|
# 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.
|
895
895
|
#
|
896
896
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
897
|
-
# @yield [result,
|
898
|
-
# @yieldparam result [::
|
897
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
898
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
899
899
|
# @yieldparam response [::Faraday::Response]
|
900
900
|
#
|
901
|
-
# @return [::
|
901
|
+
# @return [::Gapic::Rest::BaseOperation]
|
902
902
|
#
|
903
903
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
904
904
|
def set_common_instance_metadata request, options = nil
|
@@ -910,7 +910,7 @@ module Google
|
|
910
910
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
911
911
|
|
912
912
|
# Customize the options with defaults
|
913
|
-
call_metadata =
|
913
|
+
call_metadata = @config.rpcs.set_common_instance_metadata.metadata.to_h
|
914
914
|
|
915
915
|
# Set x-goog-api-client header
|
916
916
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -918,20 +918,17 @@ module Google
|
|
918
918
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
919
919
|
transports_version_send: [:rest]
|
920
920
|
|
921
|
-
options.apply_defaults timeout: @config.timeout,
|
921
|
+
options.apply_defaults timeout: @config.rpcs.set_common_instance_metadata.timeout,
|
922
922
|
metadata: call_metadata
|
923
923
|
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
yield result, response if block_given?
|
934
|
-
result
|
924
|
+
options.apply_defaults timeout: @config.timeout,
|
925
|
+
metadata: @config.metadata
|
926
|
+
|
927
|
+
@projects_stub.set_common_instance_metadata request, options do |result, response|
|
928
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
929
|
+
yield result, response if block_given?
|
930
|
+
return result
|
931
|
+
end
|
935
932
|
rescue ::Faraday::Error => e
|
936
933
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
937
934
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -967,11 +964,11 @@ module Google
|
|
967
964
|
# 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.
|
968
965
|
#
|
969
966
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
970
|
-
# @yield [result,
|
971
|
-
# @yieldparam result [::
|
967
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
968
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
972
969
|
# @yieldparam response [::Faraday::Response]
|
973
970
|
#
|
974
|
-
# @return [::
|
971
|
+
# @return [::Gapic::Rest::BaseOperation]
|
975
972
|
#
|
976
973
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
977
974
|
def set_default_network_tier request, options = nil
|
@@ -983,7 +980,7 @@ module Google
|
|
983
980
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
984
981
|
|
985
982
|
# Customize the options with defaults
|
986
|
-
call_metadata =
|
983
|
+
call_metadata = @config.rpcs.set_default_network_tier.metadata.to_h
|
987
984
|
|
988
985
|
# Set x-goog-api-client header
|
989
986
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -991,20 +988,17 @@ module Google
|
|
991
988
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
992
989
|
transports_version_send: [:rest]
|
993
990
|
|
994
|
-
options.apply_defaults timeout: @config.timeout,
|
991
|
+
options.apply_defaults timeout: @config.rpcs.set_default_network_tier.timeout,
|
995
992
|
metadata: call_metadata
|
996
993
|
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
yield result, response if block_given?
|
1007
|
-
result
|
994
|
+
options.apply_defaults timeout: @config.timeout,
|
995
|
+
metadata: @config.metadata
|
996
|
+
|
997
|
+
@projects_stub.set_default_network_tier request, options do |result, response|
|
998
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
999
|
+
yield result, response if block_given?
|
1000
|
+
return result
|
1001
|
+
end
|
1008
1002
|
rescue ::Faraday::Error => e
|
1009
1003
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1010
1004
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1040,11 +1034,11 @@ module Google
|
|
1040
1034
|
# The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
1041
1035
|
# @param usage_export_location_resource [::Google::Cloud::Compute::V1::UsageExportLocation, ::Hash]
|
1042
1036
|
# The body resource for this request
|
1043
|
-
# @yield [result,
|
1044
|
-
# @yieldparam result [::
|
1037
|
+
# @yield [result, response] Access the result along with the Faraday response object
|
1038
|
+
# @yieldparam result [::Gapic::Rest::BaseOperation]
|
1045
1039
|
# @yieldparam response [::Faraday::Response]
|
1046
1040
|
#
|
1047
|
-
# @return [::
|
1041
|
+
# @return [::Gapic::Rest::BaseOperation]
|
1048
1042
|
#
|
1049
1043
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1050
1044
|
def set_usage_export_bucket request, options = nil
|
@@ -1056,7 +1050,7 @@ module Google
|
|
1056
1050
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1057
1051
|
|
1058
1052
|
# Customize the options with defaults
|
1059
|
-
call_metadata =
|
1053
|
+
call_metadata = @config.rpcs.set_usage_export_bucket.metadata.to_h
|
1060
1054
|
|
1061
1055
|
# Set x-goog-api-client header
|
1062
1056
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
@@ -1064,20 +1058,17 @@ module Google
|
|
1064
1058
|
gapic_version: ::Google::Cloud::Compute::V1::VERSION,
|
1065
1059
|
transports_version_send: [:rest]
|
1066
1060
|
|
1067
|
-
options.apply_defaults timeout: @config.timeout,
|
1061
|
+
options.apply_defaults timeout: @config.rpcs.set_usage_export_bucket.timeout,
|
1068
1062
|
metadata: call_metadata
|
1069
1063
|
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
yield result, response if block_given?
|
1080
|
-
result
|
1064
|
+
options.apply_defaults timeout: @config.timeout,
|
1065
|
+
metadata: @config.metadata
|
1066
|
+
|
1067
|
+
@projects_stub.set_usage_export_bucket request, options do |result, response|
|
1068
|
+
result = ::Gapic::Rest::BaseOperation.new result
|
1069
|
+
yield result, response if block_given?
|
1070
|
+
return result
|
1071
|
+
end
|
1081
1072
|
rescue ::Faraday::Error => e
|
1082
1073
|
gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
|
1083
1074
|
raise ::Google::Cloud::Error.from_error(gapic_error)
|
@@ -1132,6 +1123,9 @@ module Google
|
|
1132
1123
|
# @!attribute [rw] timeout
|
1133
1124
|
# The call timeout in seconds.
|
1134
1125
|
# @return [::Numeric]
|
1126
|
+
# @!attribute [rw] metadata
|
1127
|
+
# Additional REST headers to be sent with the call.
|
1128
|
+
# @return [::Hash{::Symbol=>::String}]
|
1135
1129
|
#
|
1136
1130
|
class Configuration
|
1137
1131
|
extend ::Gapic::Config
|
@@ -1145,6 +1139,7 @@ module Google
|
|
1145
1139
|
config_attr :lib_name, nil, ::String, nil
|
1146
1140
|
config_attr :lib_version, nil, ::String, nil
|
1147
1141
|
config_attr :timeout, nil, ::Numeric, nil
|
1142
|
+
config_attr :metadata, nil, ::Hash, nil
|
1148
1143
|
|
1149
1144
|
# @private
|
1150
1145
|
def initialize parent_config = nil
|
@@ -1152,6 +1147,130 @@ module Google
|
|
1152
1147
|
|
1153
1148
|
yield self if block_given?
|
1154
1149
|
end
|
1150
|
+
|
1151
|
+
##
|
1152
|
+
# Configurations for individual RPCs
|
1153
|
+
# @return [Rpcs]
|
1154
|
+
#
|
1155
|
+
def rpcs
|
1156
|
+
@rpcs ||= begin
|
1157
|
+
parent_rpcs = nil
|
1158
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1159
|
+
Rpcs.new parent_rpcs
|
1160
|
+
end
|
1161
|
+
end
|
1162
|
+
|
1163
|
+
##
|
1164
|
+
# Configuration RPC class for the Projects API.
|
1165
|
+
#
|
1166
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1167
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1168
|
+
# the following configuration fields:
|
1169
|
+
#
|
1170
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1171
|
+
#
|
1172
|
+
# there is one other field (`retry_policy`) that can be set
|
1173
|
+
# but is currently not supported for REST Gapic libraries.
|
1174
|
+
#
|
1175
|
+
class Rpcs
|
1176
|
+
##
|
1177
|
+
# RPC-specific configuration for `disable_xpn_host`
|
1178
|
+
# @return [::Gapic::Config::Method]
|
1179
|
+
#
|
1180
|
+
attr_reader :disable_xpn_host
|
1181
|
+
##
|
1182
|
+
# RPC-specific configuration for `disable_xpn_resource`
|
1183
|
+
# @return [::Gapic::Config::Method]
|
1184
|
+
#
|
1185
|
+
attr_reader :disable_xpn_resource
|
1186
|
+
##
|
1187
|
+
# RPC-specific configuration for `enable_xpn_host`
|
1188
|
+
# @return [::Gapic::Config::Method]
|
1189
|
+
#
|
1190
|
+
attr_reader :enable_xpn_host
|
1191
|
+
##
|
1192
|
+
# RPC-specific configuration for `enable_xpn_resource`
|
1193
|
+
# @return [::Gapic::Config::Method]
|
1194
|
+
#
|
1195
|
+
attr_reader :enable_xpn_resource
|
1196
|
+
##
|
1197
|
+
# RPC-specific configuration for `get`
|
1198
|
+
# @return [::Gapic::Config::Method]
|
1199
|
+
#
|
1200
|
+
attr_reader :get
|
1201
|
+
##
|
1202
|
+
# RPC-specific configuration for `get_xpn_host`
|
1203
|
+
# @return [::Gapic::Config::Method]
|
1204
|
+
#
|
1205
|
+
attr_reader :get_xpn_host
|
1206
|
+
##
|
1207
|
+
# RPC-specific configuration for `get_xpn_resources`
|
1208
|
+
# @return [::Gapic::Config::Method]
|
1209
|
+
#
|
1210
|
+
attr_reader :get_xpn_resources
|
1211
|
+
##
|
1212
|
+
# RPC-specific configuration for `list_xpn_hosts`
|
1213
|
+
# @return [::Gapic::Config::Method]
|
1214
|
+
#
|
1215
|
+
attr_reader :list_xpn_hosts
|
1216
|
+
##
|
1217
|
+
# RPC-specific configuration for `move_disk`
|
1218
|
+
# @return [::Gapic::Config::Method]
|
1219
|
+
#
|
1220
|
+
attr_reader :move_disk
|
1221
|
+
##
|
1222
|
+
# RPC-specific configuration for `move_instance`
|
1223
|
+
# @return [::Gapic::Config::Method]
|
1224
|
+
#
|
1225
|
+
attr_reader :move_instance
|
1226
|
+
##
|
1227
|
+
# RPC-specific configuration for `set_common_instance_metadata`
|
1228
|
+
# @return [::Gapic::Config::Method]
|
1229
|
+
#
|
1230
|
+
attr_reader :set_common_instance_metadata
|
1231
|
+
##
|
1232
|
+
# RPC-specific configuration for `set_default_network_tier`
|
1233
|
+
# @return [::Gapic::Config::Method]
|
1234
|
+
#
|
1235
|
+
attr_reader :set_default_network_tier
|
1236
|
+
##
|
1237
|
+
# RPC-specific configuration for `set_usage_export_bucket`
|
1238
|
+
# @return [::Gapic::Config::Method]
|
1239
|
+
#
|
1240
|
+
attr_reader :set_usage_export_bucket
|
1241
|
+
|
1242
|
+
# @private
|
1243
|
+
def initialize parent_rpcs = nil
|
1244
|
+
disable_xpn_host_config = parent_rpcs.disable_xpn_host if parent_rpcs.respond_to? :disable_xpn_host
|
1245
|
+
@disable_xpn_host = ::Gapic::Config::Method.new disable_xpn_host_config
|
1246
|
+
disable_xpn_resource_config = parent_rpcs.disable_xpn_resource if parent_rpcs.respond_to? :disable_xpn_resource
|
1247
|
+
@disable_xpn_resource = ::Gapic::Config::Method.new disable_xpn_resource_config
|
1248
|
+
enable_xpn_host_config = parent_rpcs.enable_xpn_host if parent_rpcs.respond_to? :enable_xpn_host
|
1249
|
+
@enable_xpn_host = ::Gapic::Config::Method.new enable_xpn_host_config
|
1250
|
+
enable_xpn_resource_config = parent_rpcs.enable_xpn_resource if parent_rpcs.respond_to? :enable_xpn_resource
|
1251
|
+
@enable_xpn_resource = ::Gapic::Config::Method.new enable_xpn_resource_config
|
1252
|
+
get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
|
1253
|
+
@get = ::Gapic::Config::Method.new get_config
|
1254
|
+
get_xpn_host_config = parent_rpcs.get_xpn_host if parent_rpcs.respond_to? :get_xpn_host
|
1255
|
+
@get_xpn_host = ::Gapic::Config::Method.new get_xpn_host_config
|
1256
|
+
get_xpn_resources_config = parent_rpcs.get_xpn_resources if parent_rpcs.respond_to? :get_xpn_resources
|
1257
|
+
@get_xpn_resources = ::Gapic::Config::Method.new get_xpn_resources_config
|
1258
|
+
list_xpn_hosts_config = parent_rpcs.list_xpn_hosts if parent_rpcs.respond_to? :list_xpn_hosts
|
1259
|
+
@list_xpn_hosts = ::Gapic::Config::Method.new list_xpn_hosts_config
|
1260
|
+
move_disk_config = parent_rpcs.move_disk if parent_rpcs.respond_to? :move_disk
|
1261
|
+
@move_disk = ::Gapic::Config::Method.new move_disk_config
|
1262
|
+
move_instance_config = parent_rpcs.move_instance if parent_rpcs.respond_to? :move_instance
|
1263
|
+
@move_instance = ::Gapic::Config::Method.new move_instance_config
|
1264
|
+
set_common_instance_metadata_config = parent_rpcs.set_common_instance_metadata if parent_rpcs.respond_to? :set_common_instance_metadata
|
1265
|
+
@set_common_instance_metadata = ::Gapic::Config::Method.new set_common_instance_metadata_config
|
1266
|
+
set_default_network_tier_config = parent_rpcs.set_default_network_tier if parent_rpcs.respond_to? :set_default_network_tier
|
1267
|
+
@set_default_network_tier = ::Gapic::Config::Method.new set_default_network_tier_config
|
1268
|
+
set_usage_export_bucket_config = parent_rpcs.set_usage_export_bucket if parent_rpcs.respond_to? :set_usage_export_bucket
|
1269
|
+
@set_usage_export_bucket = ::Gapic::Config::Method.new set_usage_export_bucket_config
|
1270
|
+
|
1271
|
+
yield self if block_given?
|
1272
|
+
end
|
1273
|
+
end
|
1155
1274
|
end
|
1156
1275
|
end
|
1157
1276
|
end
|