google-cloud-compute-v1 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/compute/v1/addresses/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +83 -21
- data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +93 -24
- data/lib/google/cloud/compute/v1/disks/rest/client.rb +90 -21
- data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +97 -30
- data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +53 -12
- data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +68 -15
- data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +33 -6
- data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +63 -15
- data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +53 -12
- data/lib/google/cloud/compute/v1/global_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/global_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/global_organization_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/global_organization_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +53 -12
- data/lib/google/cloud/compute/v1/images/rest/client.rb +63 -15
- data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +167 -42
- data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +68 -15
- data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +33 -6
- data/lib/google/cloud/compute/v1/instances/rest/client.rb +365 -96
- data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/licenses/rest/client.rb +33 -6
- data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +33 -6
- data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/networks/rest/client.rb +83 -21
- data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +79 -18
- data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/projects/rest/client.rb +103 -27
- data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +90 -21
- data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +167 -42
- data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +24 -3
- data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +24 -3
- data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/region_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/region_operations.rb +1 -0
- data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/reservations/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/routers/rest/client.rb +57 -12
- data/lib/google/cloud/compute/v1/routes/rest/client.rb +33 -6
- data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +73 -18
- data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +33 -6
- data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +68 -15
- data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +43 -9
- data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +53 -12
- data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +83 -21
- data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +90 -21
- data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +73 -18
- data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +53 -12
- data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +63 -15
- data/lib/google/cloud/compute/v1/version.rb +1 -1
- data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +46 -9
- data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +35 -6
- data/lib/google/cloud/compute/v1/zone_operations/rest/nonstandard_lro.rb +68 -0
- data/lib/google/cloud/compute/v1/zone_operations.rb +1 -0
- data/lib/google/cloud/compute/v1.rb +2 -0
- metadata +6 -2
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
21
|
require "google/cloud/compute/v1/interconnect_attachments/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/region_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -141,9 +142,21 @@ module Google
|
|
141
142
|
credentials = Credentials.new credentials, scope: @config.scope
|
142
143
|
end
|
143
144
|
|
145
|
+
@region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
|
146
|
+
config.credentials = credentials
|
147
|
+
config.endpoint = @config.endpoint
|
148
|
+
end
|
149
|
+
|
144
150
|
@interconnect_attachments_stub = ::Google::Cloud::Compute::V1::InterconnectAttachments::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
145
151
|
end
|
146
152
|
|
153
|
+
##
|
154
|
+
# Get the associated client for long-running operations via RegionOperations.
|
155
|
+
#
|
156
|
+
# @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
|
157
|
+
#
|
158
|
+
attr_reader :region_operations
|
159
|
+
|
147
160
|
# Service calls
|
148
161
|
|
149
162
|
##
|
@@ -249,10 +262,10 @@ module Google
|
|
249
262
|
# @param request_id [::String]
|
250
263
|
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
251
264
|
# @yield [result, response] Access the result along with the Faraday response object
|
252
|
-
# @yieldparam result [::Gapic::
|
265
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
253
266
|
# @yieldparam response [::Faraday::Response]
|
254
267
|
#
|
255
|
-
# @return [::Gapic::
|
268
|
+
# @return [::Gapic::GenericLRO::Operation]
|
256
269
|
#
|
257
270
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
258
271
|
def delete request, options = nil
|
@@ -279,7 +292,15 @@ module Google
|
|
279
292
|
metadata: @config.metadata
|
280
293
|
|
281
294
|
@interconnect_attachments_stub.delete request, options do |result, response|
|
282
|
-
result = ::
|
295
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
296
|
+
operation: result,
|
297
|
+
client: region_operations,
|
298
|
+
request_values: {
|
299
|
+
"project" => request.project,
|
300
|
+
"region" => request.region
|
301
|
+
},
|
302
|
+
options: options
|
303
|
+
)
|
283
304
|
yield result, response if block_given?
|
284
305
|
return result
|
285
306
|
end
|
@@ -384,10 +405,10 @@ module Google
|
|
384
405
|
# @param validate_only [::Boolean]
|
385
406
|
# If true, the request will not be committed.
|
386
407
|
# @yield [result, response] Access the result along with the Faraday response object
|
387
|
-
# @yieldparam result [::Gapic::
|
408
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
388
409
|
# @yieldparam response [::Faraday::Response]
|
389
410
|
#
|
390
|
-
# @return [::Gapic::
|
411
|
+
# @return [::Gapic::GenericLRO::Operation]
|
391
412
|
#
|
392
413
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
393
414
|
def insert request, options = nil
|
@@ -414,7 +435,15 @@ module Google
|
|
414
435
|
metadata: @config.metadata
|
415
436
|
|
416
437
|
@interconnect_attachments_stub.insert request, options do |result, response|
|
417
|
-
result = ::
|
438
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
439
|
+
operation: result,
|
440
|
+
client: region_operations,
|
441
|
+
request_values: {
|
442
|
+
"project" => request.project,
|
443
|
+
"region" => request.region
|
444
|
+
},
|
445
|
+
options: options
|
446
|
+
)
|
418
447
|
yield result, response if block_given?
|
419
448
|
return result
|
420
449
|
end
|
@@ -528,10 +557,10 @@ module Google
|
|
528
557
|
# @param request_id [::String]
|
529
558
|
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
530
559
|
# @yield [result, response] Access the result along with the Faraday response object
|
531
|
-
# @yieldparam result [::Gapic::
|
560
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
532
561
|
# @yieldparam response [::Faraday::Response]
|
533
562
|
#
|
534
|
-
# @return [::Gapic::
|
563
|
+
# @return [::Gapic::GenericLRO::Operation]
|
535
564
|
#
|
536
565
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
537
566
|
def patch request, options = nil
|
@@ -558,7 +587,15 @@ module Google
|
|
558
587
|
metadata: @config.metadata
|
559
588
|
|
560
589
|
@interconnect_attachments_stub.patch request, options do |result, response|
|
561
|
-
result = ::
|
590
|
+
result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
|
591
|
+
operation: result,
|
592
|
+
client: region_operations,
|
593
|
+
request_values: {
|
594
|
+
"project" => request.project,
|
595
|
+
"region" => request.region
|
596
|
+
},
|
597
|
+
options: options
|
598
|
+
)
|
562
599
|
yield result, response if block_given?
|
563
600
|
return result
|
564
601
|
end
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
21
|
require "google/cloud/compute/v1/interconnects/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/global_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -141,9 +142,21 @@ module Google
|
|
141
142
|
credentials = Credentials.new credentials, scope: @config.scope
|
142
143
|
end
|
143
144
|
|
145
|
+
@global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
|
146
|
+
config.credentials = credentials
|
147
|
+
config.endpoint = @config.endpoint
|
148
|
+
end
|
149
|
+
|
144
150
|
@interconnects_stub = ::Google::Cloud::Compute::V1::Interconnects::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
145
151
|
end
|
146
152
|
|
153
|
+
##
|
154
|
+
# Get the associated client for long-running operations via GlobalOperations.
|
155
|
+
#
|
156
|
+
# @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
|
157
|
+
#
|
158
|
+
attr_reader :global_operations
|
159
|
+
|
147
160
|
# Service calls
|
148
161
|
|
149
162
|
##
|
@@ -173,10 +186,10 @@ module Google
|
|
173
186
|
# @param request_id [::String]
|
174
187
|
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
175
188
|
# @yield [result, response] Access the result along with the Faraday response object
|
176
|
-
# @yieldparam result [::Gapic::
|
189
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
177
190
|
# @yieldparam response [::Faraday::Response]
|
178
191
|
#
|
179
|
-
# @return [::Gapic::
|
192
|
+
# @return [::Gapic::GenericLRO::Operation]
|
180
193
|
#
|
181
194
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
182
195
|
def delete request, options = nil
|
@@ -203,7 +216,14 @@ module Google
|
|
203
216
|
metadata: @config.metadata
|
204
217
|
|
205
218
|
@interconnects_stub.delete request, options do |result, response|
|
206
|
-
result = ::
|
219
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
220
|
+
operation: result,
|
221
|
+
client: global_operations,
|
222
|
+
request_values: {
|
223
|
+
"project" => request.project
|
224
|
+
},
|
225
|
+
options: options
|
226
|
+
)
|
207
227
|
yield result, response if block_given?
|
208
228
|
return result
|
209
229
|
end
|
@@ -365,10 +385,10 @@ module Google
|
|
365
385
|
# @param request_id [::String]
|
366
386
|
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
367
387
|
# @yield [result, response] Access the result along with the Faraday response object
|
368
|
-
# @yieldparam result [::Gapic::
|
388
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
369
389
|
# @yieldparam response [::Faraday::Response]
|
370
390
|
#
|
371
|
-
# @return [::Gapic::
|
391
|
+
# @return [::Gapic::GenericLRO::Operation]
|
372
392
|
#
|
373
393
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
374
394
|
def insert request, options = nil
|
@@ -395,7 +415,14 @@ module Google
|
|
395
415
|
metadata: @config.metadata
|
396
416
|
|
397
417
|
@interconnects_stub.insert request, options do |result, response|
|
398
|
-
result = ::
|
418
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
419
|
+
operation: result,
|
420
|
+
client: global_operations,
|
421
|
+
request_values: {
|
422
|
+
"project" => request.project
|
423
|
+
},
|
424
|
+
options: options
|
425
|
+
)
|
399
426
|
yield result, response if block_given?
|
400
427
|
return result
|
401
428
|
end
|
@@ -505,10 +532,10 @@ module Google
|
|
505
532
|
# @param request_id [::String]
|
506
533
|
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
507
534
|
# @yield [result, response] Access the result along with the Faraday response object
|
508
|
-
# @yieldparam result [::Gapic::
|
535
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
509
536
|
# @yieldparam response [::Faraday::Response]
|
510
537
|
#
|
511
|
-
# @return [::Gapic::
|
538
|
+
# @return [::Gapic::GenericLRO::Operation]
|
512
539
|
#
|
513
540
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
514
541
|
def patch request, options = nil
|
@@ -535,7 +562,14 @@ module Google
|
|
535
562
|
metadata: @config.metadata
|
536
563
|
|
537
564
|
@interconnects_stub.patch request, options do |result, response|
|
538
|
-
result = ::
|
565
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
566
|
+
operation: result,
|
567
|
+
client: global_operations,
|
568
|
+
request_values: {
|
569
|
+
"project" => request.project
|
570
|
+
},
|
571
|
+
options: options
|
572
|
+
)
|
539
573
|
yield result, response if block_given?
|
540
574
|
return result
|
541
575
|
end
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
21
|
require "google/cloud/compute/v1/licenses/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/global_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -143,9 +144,21 @@ module Google
|
|
143
144
|
credentials = Credentials.new credentials, scope: @config.scope
|
144
145
|
end
|
145
146
|
|
147
|
+
@global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
|
148
|
+
config.credentials = credentials
|
149
|
+
config.endpoint = @config.endpoint
|
150
|
+
end
|
151
|
+
|
146
152
|
@licenses_stub = ::Google::Cloud::Compute::V1::Licenses::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
147
153
|
end
|
148
154
|
|
155
|
+
##
|
156
|
+
# Get the associated client for long-running operations via GlobalOperations.
|
157
|
+
#
|
158
|
+
# @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
|
159
|
+
#
|
160
|
+
attr_reader :global_operations
|
161
|
+
|
149
162
|
# Service calls
|
150
163
|
|
151
164
|
##
|
@@ -175,10 +188,10 @@ module Google
|
|
175
188
|
# @param request_id [::String]
|
176
189
|
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
177
190
|
# @yield [result, response] Access the result along with the Faraday response object
|
178
|
-
# @yieldparam result [::Gapic::
|
191
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
179
192
|
# @yieldparam response [::Faraday::Response]
|
180
193
|
#
|
181
|
-
# @return [::Gapic::
|
194
|
+
# @return [::Gapic::GenericLRO::Operation]
|
182
195
|
#
|
183
196
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
184
197
|
def delete request, options = nil
|
@@ -205,7 +218,14 @@ module Google
|
|
205
218
|
metadata: @config.metadata
|
206
219
|
|
207
220
|
@licenses_stub.delete request, options do |result, response|
|
208
|
-
result = ::
|
221
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
222
|
+
operation: result,
|
223
|
+
client: global_operations,
|
224
|
+
request_values: {
|
225
|
+
"project" => request.project
|
226
|
+
},
|
227
|
+
options: options
|
228
|
+
)
|
209
229
|
yield result, response if block_given?
|
210
230
|
return result
|
211
231
|
end
|
@@ -369,10 +389,10 @@ module Google
|
|
369
389
|
# @param request_id [::String]
|
370
390
|
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
371
391
|
# @yield [result, response] Access the result along with the Faraday response object
|
372
|
-
# @yieldparam result [::Gapic::
|
392
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
373
393
|
# @yieldparam response [::Faraday::Response]
|
374
394
|
#
|
375
|
-
# @return [::Gapic::
|
395
|
+
# @return [::Gapic::GenericLRO::Operation]
|
376
396
|
#
|
377
397
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
378
398
|
def insert request, options = nil
|
@@ -399,7 +419,14 @@ module Google
|
|
399
419
|
metadata: @config.metadata
|
400
420
|
|
401
421
|
@licenses_stub.insert request, options do |result, response|
|
402
|
-
result = ::
|
422
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
423
|
+
operation: result,
|
424
|
+
client: global_operations,
|
425
|
+
request_values: {
|
426
|
+
"project" => request.project
|
427
|
+
},
|
428
|
+
options: options
|
429
|
+
)
|
403
430
|
yield result, response if block_given?
|
404
431
|
return result
|
405
432
|
end
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
21
|
require "google/cloud/compute/v1/machine_images/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/global_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -143,9 +144,21 @@ module Google
|
|
143
144
|
credentials = Credentials.new credentials, scope: @config.scope
|
144
145
|
end
|
145
146
|
|
147
|
+
@global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
|
148
|
+
config.credentials = credentials
|
149
|
+
config.endpoint = @config.endpoint
|
150
|
+
end
|
151
|
+
|
146
152
|
@machine_images_stub = ::Google::Cloud::Compute::V1::MachineImages::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
147
153
|
end
|
148
154
|
|
155
|
+
##
|
156
|
+
# Get the associated client for long-running operations via GlobalOperations.
|
157
|
+
#
|
158
|
+
# @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
|
159
|
+
#
|
160
|
+
attr_reader :global_operations
|
161
|
+
|
149
162
|
# Service calls
|
150
163
|
|
151
164
|
##
|
@@ -175,10 +188,10 @@ module Google
|
|
175
188
|
# @param request_id [::String]
|
176
189
|
# An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. 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. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
|
177
190
|
# @yield [result, response] Access the result along with the Faraday response object
|
178
|
-
# @yieldparam result [::Gapic::
|
191
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
179
192
|
# @yieldparam response [::Faraday::Response]
|
180
193
|
#
|
181
|
-
# @return [::Gapic::
|
194
|
+
# @return [::Gapic::GenericLRO::Operation]
|
182
195
|
#
|
183
196
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
184
197
|
def delete request, options = nil
|
@@ -205,7 +218,14 @@ module Google
|
|
205
218
|
metadata: @config.metadata
|
206
219
|
|
207
220
|
@machine_images_stub.delete request, options do |result, response|
|
208
|
-
result = ::
|
221
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
222
|
+
operation: result,
|
223
|
+
client: global_operations,
|
224
|
+
request_values: {
|
225
|
+
"project" => request.project
|
226
|
+
},
|
227
|
+
options: options
|
228
|
+
)
|
209
229
|
yield result, response if block_given?
|
210
230
|
return result
|
211
231
|
end
|
@@ -371,10 +391,10 @@ module Google
|
|
371
391
|
# @param source_instance [::String]
|
372
392
|
# Required. Source instance that is used to create the machine image from.
|
373
393
|
# @yield [result, response] Access the result along with the Faraday response object
|
374
|
-
# @yieldparam result [::Gapic::
|
394
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
375
395
|
# @yieldparam response [::Faraday::Response]
|
376
396
|
#
|
377
|
-
# @return [::Gapic::
|
397
|
+
# @return [::Gapic::GenericLRO::Operation]
|
378
398
|
#
|
379
399
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
380
400
|
def insert request, options = nil
|
@@ -401,7 +421,14 @@ module Google
|
|
401
421
|
metadata: @config.metadata
|
402
422
|
|
403
423
|
@machine_images_stub.insert request, options do |result, response|
|
404
|
-
result = ::
|
424
|
+
result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
|
425
|
+
operation: result,
|
426
|
+
client: global_operations,
|
427
|
+
request_values: {
|
428
|
+
"project" => request.project
|
429
|
+
},
|
430
|
+
options: options
|
431
|
+
)
|
405
432
|
yield result, response if block_given?
|
406
433
|
return result
|
407
434
|
end
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/compute/v1/compute_pb"
|
21
21
|
require "google/cloud/compute/v1/network_endpoint_groups/rest/service_stub"
|
22
|
+
require "google/cloud/compute/v1/zone_operations/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -147,9 +148,21 @@ module Google
|
|
147
148
|
credentials = Credentials.new credentials, scope: @config.scope
|
148
149
|
end
|
149
150
|
|
151
|
+
@zone_operations = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client.new do |config|
|
152
|
+
config.credentials = credentials
|
153
|
+
config.endpoint = @config.endpoint
|
154
|
+
end
|
155
|
+
|
150
156
|
@network_endpoint_groups_stub = ::Google::Cloud::Compute::V1::NetworkEndpointGroups::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
151
157
|
end
|
152
158
|
|
159
|
+
##
|
160
|
+
# Get the associated client for long-running operations via ZoneOperations.
|
161
|
+
#
|
162
|
+
# @return [::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client]
|
163
|
+
#
|
164
|
+
attr_reader :zone_operations
|
165
|
+
|
153
166
|
# Service calls
|
154
167
|
|
155
168
|
##
|
@@ -257,10 +270,10 @@ module Google
|
|
257
270
|
# @param zone [::String]
|
258
271
|
# The name of the zone where the network endpoint group is located. It should comply with RFC1035.
|
259
272
|
# @yield [result, response] Access the result along with the Faraday response object
|
260
|
-
# @yieldparam result [::Gapic::
|
273
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
261
274
|
# @yieldparam response [::Faraday::Response]
|
262
275
|
#
|
263
|
-
# @return [::Gapic::
|
276
|
+
# @return [::Gapic::GenericLRO::Operation]
|
264
277
|
#
|
265
278
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
266
279
|
def attach_network_endpoints request, options = nil
|
@@ -287,7 +300,15 @@ module Google
|
|
287
300
|
metadata: @config.metadata
|
288
301
|
|
289
302
|
@network_endpoint_groups_stub.attach_network_endpoints request, options do |result, response|
|
290
|
-
result = ::
|
303
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
304
|
+
operation: result,
|
305
|
+
client: zone_operations,
|
306
|
+
request_values: {
|
307
|
+
"project" => request.project,
|
308
|
+
"zone" => request.zone
|
309
|
+
},
|
310
|
+
options: options
|
311
|
+
)
|
291
312
|
yield result, response if block_given?
|
292
313
|
return result
|
293
314
|
end
|
@@ -325,10 +346,10 @@ module Google
|
|
325
346
|
# @param zone [::String]
|
326
347
|
# The name of the zone where the network endpoint group is located. It should comply with RFC1035.
|
327
348
|
# @yield [result, response] Access the result along with the Faraday response object
|
328
|
-
# @yieldparam result [::Gapic::
|
349
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
329
350
|
# @yieldparam response [::Faraday::Response]
|
330
351
|
#
|
331
|
-
# @return [::Gapic::
|
352
|
+
# @return [::Gapic::GenericLRO::Operation]
|
332
353
|
#
|
333
354
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
334
355
|
def delete request, options = nil
|
@@ -355,7 +376,15 @@ module Google
|
|
355
376
|
metadata: @config.metadata
|
356
377
|
|
357
378
|
@network_endpoint_groups_stub.delete request, options do |result, response|
|
358
|
-
result = ::
|
379
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
380
|
+
operation: result,
|
381
|
+
client: zone_operations,
|
382
|
+
request_values: {
|
383
|
+
"project" => request.project,
|
384
|
+
"zone" => request.zone
|
385
|
+
},
|
386
|
+
options: options
|
387
|
+
)
|
359
388
|
yield result, response if block_given?
|
360
389
|
return result
|
361
390
|
end
|
@@ -395,10 +424,10 @@ module Google
|
|
395
424
|
# @param zone [::String]
|
396
425
|
# The name of the zone where the network endpoint group is located. It should comply with RFC1035.
|
397
426
|
# @yield [result, response] Access the result along with the Faraday response object
|
398
|
-
# @yieldparam result [::Gapic::
|
427
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
399
428
|
# @yieldparam response [::Faraday::Response]
|
400
429
|
#
|
401
|
-
# @return [::Gapic::
|
430
|
+
# @return [::Gapic::GenericLRO::Operation]
|
402
431
|
#
|
403
432
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
404
433
|
def detach_network_endpoints request, options = nil
|
@@ -425,7 +454,15 @@ module Google
|
|
425
454
|
metadata: @config.metadata
|
426
455
|
|
427
456
|
@network_endpoint_groups_stub.detach_network_endpoints request, options do |result, response|
|
428
|
-
result = ::
|
457
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
458
|
+
operation: result,
|
459
|
+
client: zone_operations,
|
460
|
+
request_values: {
|
461
|
+
"project" => request.project,
|
462
|
+
"zone" => request.zone
|
463
|
+
},
|
464
|
+
options: options
|
465
|
+
)
|
429
466
|
yield result, response if block_given?
|
430
467
|
return result
|
431
468
|
end
|
@@ -528,10 +565,10 @@ module Google
|
|
528
565
|
# @param zone [::String]
|
529
566
|
# The name of the zone where you want to create the network endpoint group. It should comply with RFC1035.
|
530
567
|
# @yield [result, response] Access the result along with the Faraday response object
|
531
|
-
# @yieldparam result [::Gapic::
|
568
|
+
# @yieldparam result [::Gapic::GenericLRO::Operation]
|
532
569
|
# @yieldparam response [::Faraday::Response]
|
533
570
|
#
|
534
|
-
# @return [::Gapic::
|
571
|
+
# @return [::Gapic::GenericLRO::Operation]
|
535
572
|
#
|
536
573
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
537
574
|
def insert request, options = nil
|
@@ -558,7 +595,15 @@ module Google
|
|
558
595
|
metadata: @config.metadata
|
559
596
|
|
560
597
|
@network_endpoint_groups_stub.insert request, options do |result, response|
|
561
|
-
result = ::
|
598
|
+
result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
|
599
|
+
operation: result,
|
600
|
+
client: zone_operations,
|
601
|
+
request_values: {
|
602
|
+
"project" => request.project,
|
603
|
+
"zone" => request.zone
|
604
|
+
},
|
605
|
+
options: options
|
606
|
+
)
|
562
607
|
yield result, response if block_given?
|
563
608
|
return result
|
564
609
|
end
|