google-cloud-compute-v1 2.14.0 → 2.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +36 -0
- data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +29 -4
- data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +38 -20
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +33 -8
- data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +70 -44
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +33 -8
- data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +70 -44
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +35 -13
- data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +110 -74
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +38 -17
- data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +142 -98
- data/lib/google/cloud/compute/v1/compute_pb.rb +52 -1
- data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +29 -4
- data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +38 -20
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +41 -19
- data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +158 -110
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +31 -7
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +62 -38
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +38 -19
- data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +158 -110
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +32 -7
- data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +62 -38
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +34 -9
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +78 -50
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +32 -7
- data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +62 -38
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +33 -8
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +70 -44
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +33 -8
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +70 -44
- data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +29 -6
- data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +54 -32
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +28 -4
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +38 -20
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +31 -6
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +54 -32
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +33 -8
- data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +70 -44
- data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +27 -2
- data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +22 -8
- data/lib/google/cloud/compute/v1/images/rest/client.rb +33 -12
- data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +102 -68
- data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/rest/client.rb +31 -6
- data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/rest/service_stub.rb +54 -32
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +466 -21
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +428 -120
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +35 -10
- data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +86 -56
- data/lib/google/cloud/compute/v1/instance_settings_service/rest/client.rb +28 -3
- data/lib/google/cloud/compute/v1/instance_settings_service/rest/service_stub.rb +30 -14
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +31 -9
- data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +78 -50
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +66 -50
- data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +398 -290
- data/lib/google/cloud/compute/v1/instant_snapshots/rest/client.rb +32 -10
- data/lib/google/cloud/compute/v1/instant_snapshots/rest/service_stub.rb +86 -56
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +33 -8
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +70 -44
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +28 -3
- data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +30 -14
- data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +28 -3
- data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/service_stub.rb +30 -14
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +32 -9
- data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +78 -50
- data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +27 -3
- data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +30 -14
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +30 -8
- data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +70 -44
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +30 -8
- data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +70 -44
- data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +29 -4
- data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +38 -20
- data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +32 -10
- data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +86 -56
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +31 -6
- data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +54 -32
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +34 -10
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +86 -56
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +37 -17
- data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +142 -98
- data/lib/google/cloud/compute/v1/network_profiles/credentials.rb +53 -0
- data/lib/google/cloud/compute/v1/network_profiles/rest/client.rb +522 -0
- data/lib/google/cloud/compute/v1/network_profiles/rest/service_stub.rb +204 -0
- data/lib/google/cloud/compute/v1/network_profiles/rest.rb +51 -0
- data/lib/google/cloud/compute/v1/network_profiles.rb +47 -0
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +36 -12
- data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +102 -68
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +38 -16
- data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +134 -92
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +31 -9
- data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +78 -50
- data/lib/google/cloud/compute/v1/node_types/rest/client.rb +29 -4
- data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +38 -20
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +32 -8
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +70 -44
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +39 -15
- data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +126 -86
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +33 -8
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +70 -44
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +34 -9
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +78 -50
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +32 -7
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +62 -38
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +34 -13
- data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +110 -74
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +31 -6
- data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +54 -32
- data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +28 -3
- data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +30 -14
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +40 -18
- data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +150 -104
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +31 -6
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +54 -32
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +32 -7
- data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +62 -38
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +465 -20
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +420 -114
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +30 -5
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +46 -26
- data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +30 -5
- data/lib/google/cloud/compute/v1/region_instance_templates/rest/service_stub.rb +46 -26
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +28 -2
- data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +22 -8
- data/lib/google/cloud/compute/v1/region_instant_snapshots/rest/client.rb +31 -9
- data/lib/google/cloud/compute/v1/region_instant_snapshots/rest/service_stub.rb +78 -50
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +33 -8
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +70 -44
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +37 -18
- data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +150 -104
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +30 -5
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +46 -26
- data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +28 -5
- data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +46 -26
- data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +139 -10
- data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +149 -55
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +30 -5
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +46 -26
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +31 -7
- data/lib/google/cloud/compute/v1/region_ssl_policies/rest/service_stub.rb +62 -38
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +31 -6
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +54 -32
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +33 -8
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +70 -44
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +30 -5
- data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/service_stub.rb +46 -26
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +32 -8
- data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +70 -44
- data/lib/google/cloud/compute/v1/region_zones/rest/client.rb +28 -2
- data/lib/google/cloud/compute/v1/region_zones/rest/service_stub.rb +22 -8
- data/lib/google/cloud/compute/v1/regions/rest/client.rb +28 -3
- data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +30 -14
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +33 -11
- data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +94 -62
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +32 -10
- data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +86 -56
- data/lib/google/cloud/compute/v1/rest.rb +1 -0
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +34 -12
- data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +102 -68
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +30 -5
- data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +46 -26
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +36 -13
- data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +110 -74
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +32 -10
- data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +86 -56
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +28 -3
- data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/service_stub.rb +30 -14
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +31 -9
- data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +78 -50
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +31 -6
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +54 -32
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +32 -8
- data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +70 -44
- data/lib/google/cloud/compute/v1/storage_pool_types/rest/client.rb +29 -4
- data/lib/google/cloud/compute/v1/storage_pool_types/rest/service_stub.rb +38 -20
- data/lib/google/cloud/compute/v1/storage_pools/rest/client.rb +31 -11
- data/lib/google/cloud/compute/v1/storage_pools/rest/service_stub.rb +94 -62
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +35 -13
- data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +110 -74
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +31 -6
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +54 -32
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +33 -8
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +70 -44
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +37 -12
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +102 -68
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +32 -7
- data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +62 -38
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +37 -13
- data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +110 -74
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +35 -10
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +86 -56
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +33 -8
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +70 -44
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +32 -7
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +62 -38
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +34 -10
- data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +86 -56
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +32 -9
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +78 -50
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +32 -7
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +62 -38
- data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +28 -5
- data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +46 -26
- data/lib/google/cloud/compute/v1/zones/rest/client.rb +28 -3
- data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +30 -14
- data/lib/google/cloud/compute/v1.rb +1 -0
- data/proto_docs/google/api/client.rb +19 -0
- data/proto_docs/google/cloud/compute/v1/compute.rb +889 -33
- metadata +10 -5
@@ -30,7 +30,8 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
34
35
|
# These require statements are intentionally placed here to initialize
|
35
36
|
# the REST modules only when it's required.
|
36
37
|
require "gapic/rest"
|
@@ -40,7 +41,9 @@ module Google
|
|
40
41
|
universe_domain: universe_domain,
|
41
42
|
credentials: credentials,
|
42
43
|
numeric_enums: false,
|
43
|
-
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
44
47
|
end
|
45
48
|
|
46
49
|
##
|
@@ -61,6 +64,15 @@ module Google
|
|
61
64
|
@client_stub.endpoint
|
62
65
|
end
|
63
66
|
|
67
|
+
##
|
68
|
+
# The logger used for request/response debug logging.
|
69
|
+
#
|
70
|
+
# @return [Logger]
|
71
|
+
#
|
72
|
+
def logger stub: false
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
74
|
+
end
|
75
|
+
|
64
76
|
##
|
65
77
|
# Baseline implementation for the delete REST call
|
66
78
|
#
|
@@ -87,16 +99,18 @@ module Google
|
|
87
99
|
|
88
100
|
response = @client_stub.make_http_request(
|
89
101
|
verb,
|
90
|
-
uri:
|
91
|
-
body:
|
92
|
-
params:
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "delete",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
97
|
-
|
98
|
-
|
99
|
-
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
100
114
|
end
|
101
115
|
|
102
116
|
##
|
@@ -125,16 +139,18 @@ module Google
|
|
125
139
|
|
126
140
|
response = @client_stub.make_http_request(
|
127
141
|
verb,
|
128
|
-
uri:
|
129
|
-
body:
|
130
|
-
params:
|
142
|
+
uri: uri,
|
143
|
+
body: body || "",
|
144
|
+
params: query_string_params,
|
145
|
+
method_name: "get",
|
131
146
|
options: options
|
132
147
|
)
|
133
148
|
operation = ::Gapic::Rest::TransportOperation.new response
|
134
149
|
result = ::Google::Cloud::Compute::V1::ExternalVpnGateway.decode_json response.body, ignore_unknown_fields: true
|
135
|
-
|
136
|
-
|
137
|
-
|
150
|
+
catch :response do
|
151
|
+
yield result, operation if block_given?
|
152
|
+
result
|
153
|
+
end
|
138
154
|
end
|
139
155
|
|
140
156
|
##
|
@@ -163,16 +179,18 @@ module Google
|
|
163
179
|
|
164
180
|
response = @client_stub.make_http_request(
|
165
181
|
verb,
|
166
|
-
uri:
|
167
|
-
body:
|
168
|
-
params:
|
182
|
+
uri: uri,
|
183
|
+
body: body || "",
|
184
|
+
params: query_string_params,
|
185
|
+
method_name: "insert",
|
169
186
|
options: options
|
170
187
|
)
|
171
188
|
operation = ::Gapic::Rest::TransportOperation.new response
|
172
189
|
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
173
|
-
|
174
|
-
|
175
|
-
|
190
|
+
catch :response do
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
176
194
|
end
|
177
195
|
|
178
196
|
##
|
@@ -201,16 +219,18 @@ module Google
|
|
201
219
|
|
202
220
|
response = @client_stub.make_http_request(
|
203
221
|
verb,
|
204
|
-
uri:
|
205
|
-
body:
|
206
|
-
params:
|
222
|
+
uri: uri,
|
223
|
+
body: body || "",
|
224
|
+
params: query_string_params,
|
225
|
+
method_name: "list",
|
207
226
|
options: options
|
208
227
|
)
|
209
228
|
operation = ::Gapic::Rest::TransportOperation.new response
|
210
229
|
result = ::Google::Cloud::Compute::V1::ExternalVpnGatewayList.decode_json response.body, ignore_unknown_fields: true
|
211
|
-
|
212
|
-
|
213
|
-
|
230
|
+
catch :response do
|
231
|
+
yield result, operation if block_given?
|
232
|
+
result
|
233
|
+
end
|
214
234
|
end
|
215
235
|
|
216
236
|
##
|
@@ -239,16 +259,18 @@ module Google
|
|
239
259
|
|
240
260
|
response = @client_stub.make_http_request(
|
241
261
|
verb,
|
242
|
-
uri:
|
243
|
-
body:
|
244
|
-
params:
|
262
|
+
uri: uri,
|
263
|
+
body: body || "",
|
264
|
+
params: query_string_params,
|
265
|
+
method_name: "set_labels",
|
245
266
|
options: options
|
246
267
|
)
|
247
268
|
operation = ::Gapic::Rest::TransportOperation.new response
|
248
269
|
result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
|
249
|
-
|
250
|
-
|
251
|
-
|
270
|
+
catch :response do
|
271
|
+
yield result, operation if block_given?
|
272
|
+
result
|
273
|
+
end
|
252
274
|
end
|
253
275
|
|
254
276
|
##
|
@@ -277,16 +299,18 @@ module Google
|
|
277
299
|
|
278
300
|
response = @client_stub.make_http_request(
|
279
301
|
verb,
|
280
|
-
uri:
|
281
|
-
body:
|
282
|
-
params:
|
302
|
+
uri: uri,
|
303
|
+
body: body || "",
|
304
|
+
params: query_string_params,
|
305
|
+
method_name: "test_iam_permissions",
|
283
306
|
options: options
|
284
307
|
)
|
285
308
|
operation = ::Gapic::Rest::TransportOperation.new response
|
286
309
|
result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
|
287
|
-
|
288
|
-
|
289
|
-
|
310
|
+
catch :response do
|
311
|
+
yield result, operation if block_given?
|
312
|
+
result
|
313
|
+
end
|
290
314
|
end
|
291
315
|
|
292
316
|
##
|
@@ -210,8 +210,19 @@ module Google
|
|
210
210
|
endpoint: @config.endpoint,
|
211
211
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
212
212
|
universe_domain: @config.universe_domain,
|
213
|
-
credentials: credentials
|
213
|
+
credentials: credentials,
|
214
|
+
logger: @config.logger
|
214
215
|
)
|
216
|
+
|
217
|
+
@firewall_policies_stub.logger(stub: true)&.info do |entry|
|
218
|
+
entry.set_system_name
|
219
|
+
entry.set_service
|
220
|
+
entry.message = "Created client for #{entry.service}"
|
221
|
+
entry.set_credentials_fields credentials
|
222
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
223
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
224
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
225
|
+
end
|
215
226
|
end
|
216
227
|
|
217
228
|
##
|
@@ -221,6 +232,15 @@ module Google
|
|
221
232
|
#
|
222
233
|
attr_reader :global_organization_operations
|
223
234
|
|
235
|
+
##
|
236
|
+
# The logger used for request/response debug logging.
|
237
|
+
#
|
238
|
+
# @return [Logger]
|
239
|
+
#
|
240
|
+
def logger
|
241
|
+
@firewall_policies_stub.logger
|
242
|
+
end
|
243
|
+
|
224
244
|
# Service calls
|
225
245
|
|
226
246
|
##
|
@@ -308,7 +328,7 @@ module Google
|
|
308
328
|
options: options
|
309
329
|
)
|
310
330
|
yield result, response if block_given?
|
311
|
-
|
331
|
+
throw :response, result
|
312
332
|
end
|
313
333
|
rescue ::Gapic::Rest::Error => e
|
314
334
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -397,7 +417,7 @@ module Google
|
|
397
417
|
options: options
|
398
418
|
)
|
399
419
|
yield result, response if block_given?
|
400
|
-
|
420
|
+
throw :response, result
|
401
421
|
end
|
402
422
|
rescue ::Gapic::Rest::Error => e
|
403
423
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -486,7 +506,7 @@ module Google
|
|
486
506
|
options: options
|
487
507
|
)
|
488
508
|
yield result, response if block_given?
|
489
|
-
|
509
|
+
throw :response, result
|
490
510
|
end
|
491
511
|
rescue ::Gapic::Rest::Error => e
|
492
512
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -573,7 +593,7 @@ module Google
|
|
573
593
|
options: options
|
574
594
|
)
|
575
595
|
yield result, response if block_given?
|
576
|
-
|
596
|
+
throw :response, result
|
577
597
|
end
|
578
598
|
rescue ::Gapic::Rest::Error => e
|
579
599
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -652,7 +672,6 @@ module Google
|
|
652
672
|
|
653
673
|
@firewall_policies_stub.get request, options do |result, operation|
|
654
674
|
yield result, operation if block_given?
|
655
|
-
return result
|
656
675
|
end
|
657
676
|
rescue ::Gapic::Rest::Error => e
|
658
677
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -733,7 +752,6 @@ module Google
|
|
733
752
|
|
734
753
|
@firewall_policies_stub.get_association request, options do |result, operation|
|
735
754
|
yield result, operation if block_given?
|
736
|
-
return result
|
737
755
|
end
|
738
756
|
rescue ::Gapic::Rest::Error => e
|
739
757
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -814,7 +832,6 @@ module Google
|
|
814
832
|
|
815
833
|
@firewall_policies_stub.get_iam_policy request, options do |result, operation|
|
816
834
|
yield result, operation if block_given?
|
817
|
-
return result
|
818
835
|
end
|
819
836
|
rescue ::Gapic::Rest::Error => e
|
820
837
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -895,7 +912,6 @@ module Google
|
|
895
912
|
|
896
913
|
@firewall_policies_stub.get_rule request, options do |result, operation|
|
897
914
|
yield result, operation if block_given?
|
898
|
-
return result
|
899
915
|
end
|
900
916
|
rescue ::Gapic::Rest::Error => e
|
901
917
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -986,7 +1002,7 @@ module Google
|
|
986
1002
|
options: options
|
987
1003
|
)
|
988
1004
|
yield result, response if block_given?
|
989
|
-
|
1005
|
+
throw :response, result
|
990
1006
|
end
|
991
1007
|
rescue ::Gapic::Rest::Error => e
|
992
1008
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1076,7 +1092,7 @@ module Google
|
|
1076
1092
|
@firewall_policies_stub.list request, options do |result, operation|
|
1077
1093
|
result = ::Gapic::Rest::PagedEnumerable.new @firewall_policies_stub, :list, "items", request, result, options
|
1078
1094
|
yield result, operation if block_given?
|
1079
|
-
|
1095
|
+
throw :response, result
|
1080
1096
|
end
|
1081
1097
|
rescue ::Gapic::Rest::Error => e
|
1082
1098
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1155,7 +1171,6 @@ module Google
|
|
1155
1171
|
|
1156
1172
|
@firewall_policies_stub.list_associations request, options do |result, operation|
|
1157
1173
|
yield result, operation if block_given?
|
1158
|
-
return result
|
1159
1174
|
end
|
1160
1175
|
rescue ::Gapic::Rest::Error => e
|
1161
1176
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1246,7 +1261,7 @@ module Google
|
|
1246
1261
|
options: options
|
1247
1262
|
)
|
1248
1263
|
yield result, response if block_given?
|
1249
|
-
|
1264
|
+
throw :response, result
|
1250
1265
|
end
|
1251
1266
|
rescue ::Gapic::Rest::Error => e
|
1252
1267
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1335,7 +1350,7 @@ module Google
|
|
1335
1350
|
options: options
|
1336
1351
|
)
|
1337
1352
|
yield result, response if block_given?
|
1338
|
-
|
1353
|
+
throw :response, result
|
1339
1354
|
end
|
1340
1355
|
rescue ::Gapic::Rest::Error => e
|
1341
1356
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1426,7 +1441,7 @@ module Google
|
|
1426
1441
|
options: options
|
1427
1442
|
)
|
1428
1443
|
yield result, response if block_given?
|
1429
|
-
|
1444
|
+
throw :response, result
|
1430
1445
|
end
|
1431
1446
|
rescue ::Gapic::Rest::Error => e
|
1432
1447
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1515,7 +1530,7 @@ module Google
|
|
1515
1530
|
options: options
|
1516
1531
|
)
|
1517
1532
|
yield result, response if block_given?
|
1518
|
-
|
1533
|
+
throw :response, result
|
1519
1534
|
end
|
1520
1535
|
rescue ::Gapic::Rest::Error => e
|
1521
1536
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1604,7 +1619,7 @@ module Google
|
|
1604
1619
|
options: options
|
1605
1620
|
)
|
1606
1621
|
yield result, response if block_given?
|
1607
|
-
|
1622
|
+
throw :response, result
|
1608
1623
|
end
|
1609
1624
|
rescue ::Gapic::Rest::Error => e
|
1610
1625
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1685,7 +1700,6 @@ module Google
|
|
1685
1700
|
|
1686
1701
|
@firewall_policies_stub.set_iam_policy request, options do |result, operation|
|
1687
1702
|
yield result, operation if block_given?
|
1688
|
-
return result
|
1689
1703
|
end
|
1690
1704
|
rescue ::Gapic::Rest::Error => e
|
1691
1705
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1766,7 +1780,6 @@ module Google
|
|
1766
1780
|
|
1767
1781
|
@firewall_policies_stub.test_iam_permissions request, options do |result, operation|
|
1768
1782
|
yield result, operation if block_given?
|
1769
|
-
return result
|
1770
1783
|
end
|
1771
1784
|
rescue ::Gapic::Rest::Error => e
|
1772
1785
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1846,6 +1859,11 @@ module Google
|
|
1846
1859
|
# default endpoint URL. The default value of nil uses the environment
|
1847
1860
|
# universe (usually the default "googleapis.com" universe).
|
1848
1861
|
# @return [::String,nil]
|
1862
|
+
# @!attribute [rw] logger
|
1863
|
+
# A custom logger to use for request/response debug logging, or the value
|
1864
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1865
|
+
# explicitly disable logging.
|
1866
|
+
# @return [::Logger,:default,nil]
|
1849
1867
|
#
|
1850
1868
|
class Configuration
|
1851
1869
|
extend ::Gapic::Config
|
@@ -1867,6 +1885,7 @@ module Google
|
|
1867
1885
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1868
1886
|
config_attr :quota_project, nil, ::String, nil
|
1869
1887
|
config_attr :universe_domain, nil, ::String, nil
|
1888
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1870
1889
|
|
1871
1890
|
# @private
|
1872
1891
|
def initialize parent_config = nil
|