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.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +35 -6
  3. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +57 -12
  4. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +83 -21
  5. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +93 -24
  6. data/lib/google/cloud/compute/v1/disks/rest/client.rb +90 -21
  7. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +43 -9
  8. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +97 -30
  9. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +53 -12
  10. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +68 -15
  11. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +33 -6
  12. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +63 -15
  13. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +53 -12
  14. data/lib/google/cloud/compute/v1/global_operations/rest/nonstandard_lro.rb +68 -0
  15. data/lib/google/cloud/compute/v1/global_operations.rb +1 -0
  16. data/lib/google/cloud/compute/v1/global_organization_operations/rest/nonstandard_lro.rb +68 -0
  17. data/lib/google/cloud/compute/v1/global_organization_operations.rb +1 -0
  18. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +43 -9
  19. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +53 -12
  20. data/lib/google/cloud/compute/v1/images/rest/client.rb +63 -15
  21. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +167 -42
  22. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +68 -15
  23. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +33 -6
  24. data/lib/google/cloud/compute/v1/instances/rest/client.rb +365 -96
  25. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +46 -9
  26. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +43 -9
  27. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +33 -6
  28. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +33 -6
  29. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +57 -12
  30. data/lib/google/cloud/compute/v1/networks/rest/client.rb +83 -21
  31. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +79 -18
  32. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +35 -6
  33. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +46 -9
  34. data/lib/google/cloud/compute/v1/projects/rest/client.rb +103 -27
  35. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +43 -9
  36. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +46 -9
  37. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +57 -12
  38. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +57 -12
  39. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +35 -6
  40. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +90 -21
  41. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +46 -9
  42. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +57 -12
  43. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +167 -42
  44. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +24 -3
  45. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +24 -3
  46. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +35 -6
  47. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +35 -6
  48. data/lib/google/cloud/compute/v1/region_operations/rest/nonstandard_lro.rb +68 -0
  49. data/lib/google/cloud/compute/v1/region_operations.rb +1 -0
  50. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +35 -6
  51. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +46 -9
  52. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +57 -12
  53. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +57 -12
  54. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +57 -12
  55. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +35 -6
  56. data/lib/google/cloud/compute/v1/routers/rest/client.rb +57 -12
  57. data/lib/google/cloud/compute/v1/routes/rest/client.rb +33 -6
  58. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +73 -18
  59. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +46 -9
  60. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +43 -9
  61. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +33 -6
  62. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +43 -9
  63. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +68 -15
  64. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +43 -9
  65. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +53 -12
  66. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +83 -21
  67. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +35 -6
  68. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +90 -21
  69. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +73 -18
  70. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +53 -12
  71. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +35 -6
  72. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +63 -15
  73. data/lib/google/cloud/compute/v1/version.rb +1 -1
  74. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +46 -9
  75. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +35 -6
  76. data/lib/google/cloud/compute/v1/zone_operations/rest/nonstandard_lro.rb +68 -0
  77. data/lib/google/cloud/compute/v1/zone_operations.rb +1 -0
  78. data/lib/google/cloud/compute/v1.rb +2 -0
  79. 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/subnetworks/rest/service_stub"
22
+ require "google/cloud/compute/v1/region_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -159,9 +160,21 @@ module Google
159
160
  credentials = Credentials.new credentials, scope: @config.scope
160
161
  end
161
162
 
163
+ @region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
164
+ config.credentials = credentials
165
+ config.endpoint = @config.endpoint
166
+ end
167
+
162
168
  @subnetworks_stub = ::Google::Cloud::Compute::V1::Subnetworks::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
163
169
  end
164
170
 
171
+ ##
172
+ # Get the associated client for long-running operations via RegionOperations.
173
+ #
174
+ # @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
175
+ #
176
+ attr_reader :region_operations
177
+
165
178
  # Service calls
166
179
 
167
180
  ##
@@ -267,10 +280,10 @@ module Google
267
280
  # @param subnetwork [::String]
268
281
  # Name of the Subnetwork resource to delete.
269
282
  # @yield [result, response] Access the result along with the Faraday response object
270
- # @yieldparam result [::Gapic::Rest::BaseOperation]
283
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
271
284
  # @yieldparam response [::Faraday::Response]
272
285
  #
273
- # @return [::Gapic::Rest::BaseOperation]
286
+ # @return [::Gapic::GenericLRO::Operation]
274
287
  #
275
288
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
276
289
  def delete request, options = nil
@@ -297,7 +310,15 @@ module Google
297
310
  metadata: @config.metadata
298
311
 
299
312
  @subnetworks_stub.delete request, options do |result, response|
300
- result = ::Gapic::Rest::BaseOperation.new result
313
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
314
+ operation: result,
315
+ client: region_operations,
316
+ request_values: {
317
+ "project" => request.project,
318
+ "region" => request.region
319
+ },
320
+ options: options
321
+ )
301
322
  yield result, response if block_given?
302
323
  return result
303
324
  end
@@ -337,10 +358,10 @@ module Google
337
358
  # @param subnetworks_expand_ip_cidr_range_request_resource [::Google::Cloud::Compute::V1::SubnetworksExpandIpCidrRangeRequest, ::Hash]
338
359
  # The body resource for this request
339
360
  # @yield [result, response] Access the result along with the Faraday response object
340
- # @yieldparam result [::Gapic::Rest::BaseOperation]
361
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
341
362
  # @yieldparam response [::Faraday::Response]
342
363
  #
343
- # @return [::Gapic::Rest::BaseOperation]
364
+ # @return [::Gapic::GenericLRO::Operation]
344
365
  #
345
366
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
346
367
  def expand_ip_cidr_range request, options = nil
@@ -367,7 +388,15 @@ module Google
367
388
  metadata: @config.metadata
368
389
 
369
390
  @subnetworks_stub.expand_ip_cidr_range request, options do |result, response|
370
- result = ::Gapic::Rest::BaseOperation.new result
391
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
392
+ operation: result,
393
+ client: region_operations,
394
+ request_values: {
395
+ "project" => request.project,
396
+ "region" => request.region
397
+ },
398
+ options: options
399
+ )
371
400
  yield result, response if block_given?
372
401
  return result
373
402
  end
@@ -537,10 +566,10 @@ module Google
537
566
  # @param subnetwork_resource [::Google::Cloud::Compute::V1::Subnetwork, ::Hash]
538
567
  # The body resource for this request
539
568
  # @yield [result, response] Access the result along with the Faraday response object
540
- # @yieldparam result [::Gapic::Rest::BaseOperation]
569
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
541
570
  # @yieldparam response [::Faraday::Response]
542
571
  #
543
- # @return [::Gapic::Rest::BaseOperation]
572
+ # @return [::Gapic::GenericLRO::Operation]
544
573
  #
545
574
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
546
575
  def insert request, options = nil
@@ -567,7 +596,15 @@ module Google
567
596
  metadata: @config.metadata
568
597
 
569
598
  @subnetworks_stub.insert request, options do |result, response|
570
- result = ::Gapic::Rest::BaseOperation.new result
599
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
600
+ operation: result,
601
+ client: region_operations,
602
+ request_values: {
603
+ "project" => request.project,
604
+ "region" => request.region
605
+ },
606
+ options: options
607
+ )
571
608
  yield result, response if block_given?
572
609
  return result
573
610
  end
@@ -755,10 +792,10 @@ module Google
755
792
  # @param subnetwork_resource [::Google::Cloud::Compute::V1::Subnetwork, ::Hash]
756
793
  # The body resource for this request
757
794
  # @yield [result, response] Access the result along with the Faraday response object
758
- # @yieldparam result [::Gapic::Rest::BaseOperation]
795
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
759
796
  # @yieldparam response [::Faraday::Response]
760
797
  #
761
- # @return [::Gapic::Rest::BaseOperation]
798
+ # @return [::Gapic::GenericLRO::Operation]
762
799
  #
763
800
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
764
801
  def patch request, options = nil
@@ -785,7 +822,15 @@ module Google
785
822
  metadata: @config.metadata
786
823
 
787
824
  @subnetworks_stub.patch request, options do |result, response|
788
- result = ::Gapic::Rest::BaseOperation.new result
825
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
826
+ operation: result,
827
+ client: region_operations,
828
+ request_values: {
829
+ "project" => request.project,
830
+ "region" => request.region
831
+ },
832
+ options: options
833
+ )
789
834
  yield result, response if block_given?
790
835
  return result
791
836
  end
@@ -892,10 +937,10 @@ module Google
892
937
  # @param subnetworks_set_private_ip_google_access_request_resource [::Google::Cloud::Compute::V1::SubnetworksSetPrivateIpGoogleAccessRequest, ::Hash]
893
938
  # The body resource for this request
894
939
  # @yield [result, response] Access the result along with the Faraday response object
895
- # @yieldparam result [::Gapic::Rest::BaseOperation]
940
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
896
941
  # @yieldparam response [::Faraday::Response]
897
942
  #
898
- # @return [::Gapic::Rest::BaseOperation]
943
+ # @return [::Gapic::GenericLRO::Operation]
899
944
  #
900
945
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
901
946
  def set_private_ip_google_access request, options = nil
@@ -922,7 +967,15 @@ module Google
922
967
  metadata: @config.metadata
923
968
 
924
969
  @subnetworks_stub.set_private_ip_google_access request, options do |result, response|
925
- result = ::Gapic::Rest::BaseOperation.new result
970
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
971
+ operation: result,
972
+ client: region_operations,
973
+ request_values: {
974
+ "project" => request.project,
975
+ "region" => request.region
976
+ },
977
+ options: options
978
+ )
926
979
  yield result, response if block_given?
927
980
  return result
928
981
  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/target_grpc_proxies/rest/service_stub"
22
+ require "google/cloud/compute/v1/global_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -136,9 +137,21 @@ module Google
136
137
  credentials = Credentials.new credentials, scope: @config.scope
137
138
  end
138
139
 
140
+ @global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
141
+ config.credentials = credentials
142
+ config.endpoint = @config.endpoint
143
+ end
144
+
139
145
  @target_grpc_proxies_stub = ::Google::Cloud::Compute::V1::TargetGrpcProxies::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
140
146
  end
141
147
 
148
+ ##
149
+ # Get the associated client for long-running operations via GlobalOperations.
150
+ #
151
+ # @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
152
+ #
153
+ attr_reader :global_operations
154
+
142
155
  # Service calls
143
156
 
144
157
  ##
@@ -168,10 +181,10 @@ module Google
168
181
  # @param target_grpc_proxy [::String]
169
182
  # Name of the TargetGrpcProxy resource to delete.
170
183
  # @yield [result, response] Access the result along with the Faraday response object
171
- # @yieldparam result [::Gapic::Rest::BaseOperation]
184
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
172
185
  # @yieldparam response [::Faraday::Response]
173
186
  #
174
- # @return [::Gapic::Rest::BaseOperation]
187
+ # @return [::Gapic::GenericLRO::Operation]
175
188
  #
176
189
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
177
190
  def delete request, options = nil
@@ -198,7 +211,14 @@ module Google
198
211
  metadata: @config.metadata
199
212
 
200
213
  @target_grpc_proxies_stub.delete request, options do |result, response|
201
- result = ::Gapic::Rest::BaseOperation.new result
214
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
215
+ operation: result,
216
+ client: global_operations,
217
+ request_values: {
218
+ "project" => request.project
219
+ },
220
+ options: options
221
+ )
202
222
  yield result, response if block_given?
203
223
  return result
204
224
  end
@@ -297,10 +317,10 @@ module Google
297
317
  # @param target_grpc_proxy_resource [::Google::Cloud::Compute::V1::TargetGrpcProxy, ::Hash]
298
318
  # The body resource for this request
299
319
  # @yield [result, response] Access the result along with the Faraday response object
300
- # @yieldparam result [::Gapic::Rest::BaseOperation]
320
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
301
321
  # @yieldparam response [::Faraday::Response]
302
322
  #
303
- # @return [::Gapic::Rest::BaseOperation]
323
+ # @return [::Gapic::GenericLRO::Operation]
304
324
  #
305
325
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
306
326
  def insert request, options = nil
@@ -327,7 +347,14 @@ module Google
327
347
  metadata: @config.metadata
328
348
 
329
349
  @target_grpc_proxies_stub.insert request, options do |result, response|
330
- result = ::Gapic::Rest::BaseOperation.new result
350
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
351
+ operation: result,
352
+ client: global_operations,
353
+ request_values: {
354
+ "project" => request.project
355
+ },
356
+ options: options
357
+ )
331
358
  yield result, response if block_given?
332
359
  return result
333
360
  end
@@ -437,10 +464,10 @@ module Google
437
464
  # @param target_grpc_proxy_resource [::Google::Cloud::Compute::V1::TargetGrpcProxy, ::Hash]
438
465
  # The body resource for this request
439
466
  # @yield [result, response] Access the result along with the Faraday response object
440
- # @yieldparam result [::Gapic::Rest::BaseOperation]
467
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
441
468
  # @yieldparam response [::Faraday::Response]
442
469
  #
443
- # @return [::Gapic::Rest::BaseOperation]
470
+ # @return [::Gapic::GenericLRO::Operation]
444
471
  #
445
472
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
446
473
  def patch request, options = nil
@@ -467,7 +494,14 @@ module Google
467
494
  metadata: @config.metadata
468
495
 
469
496
  @target_grpc_proxies_stub.patch request, options do |result, response|
470
- result = ::Gapic::Rest::BaseOperation.new result
497
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
498
+ operation: result,
499
+ client: global_operations,
500
+ request_values: {
501
+ "project" => request.project
502
+ },
503
+ options: options
504
+ )
471
505
  yield result, response if block_given?
472
506
  return result
473
507
  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/target_http_proxies/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
  @target_http_proxies_stub = ::Google::Cloud::Compute::V1::TargetHttpProxies::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
  ##
@@ -249,10 +262,10 @@ module Google
249
262
  # @param target_http_proxy [::String]
250
263
  # Name of the TargetHttpProxy resource to delete.
251
264
  # @yield [result, response] Access the result along with the Faraday response object
252
- # @yieldparam result [::Gapic::Rest::BaseOperation]
265
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
253
266
  # @yieldparam response [::Faraday::Response]
254
267
  #
255
- # @return [::Gapic::Rest::BaseOperation]
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,14 @@ module Google
279
292
  metadata: @config.metadata
280
293
 
281
294
  @target_http_proxies_stub.delete request, options do |result, response|
282
- result = ::Gapic::Rest::BaseOperation.new result
295
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
296
+ operation: result,
297
+ client: global_operations,
298
+ request_values: {
299
+ "project" => request.project
300
+ },
301
+ options: options
302
+ )
283
303
  yield result, response if block_given?
284
304
  return result
285
305
  end
@@ -378,10 +398,10 @@ module Google
378
398
  # @param target_http_proxy_resource [::Google::Cloud::Compute::V1::TargetHttpProxy, ::Hash]
379
399
  # The body resource for this request
380
400
  # @yield [result, response] Access the result along with the Faraday response object
381
- # @yieldparam result [::Gapic::Rest::BaseOperation]
401
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
382
402
  # @yieldparam response [::Faraday::Response]
383
403
  #
384
- # @return [::Gapic::Rest::BaseOperation]
404
+ # @return [::Gapic::GenericLRO::Operation]
385
405
  #
386
406
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
387
407
  def insert request, options = nil
@@ -408,7 +428,14 @@ module Google
408
428
  metadata: @config.metadata
409
429
 
410
430
  @target_http_proxies_stub.insert request, options do |result, response|
411
- result = ::Gapic::Rest::BaseOperation.new result
431
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
432
+ operation: result,
433
+ client: global_operations,
434
+ request_values: {
435
+ "project" => request.project
436
+ },
437
+ options: options
438
+ )
412
439
  yield result, response if block_given?
413
440
  return result
414
441
  end
@@ -518,10 +545,10 @@ module Google
518
545
  # @param target_http_proxy_resource [::Google::Cloud::Compute::V1::TargetHttpProxy, ::Hash]
519
546
  # The body resource for this request
520
547
  # @yield [result, response] Access the result along with the Faraday response object
521
- # @yieldparam result [::Gapic::Rest::BaseOperation]
548
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
522
549
  # @yieldparam response [::Faraday::Response]
523
550
  #
524
- # @return [::Gapic::Rest::BaseOperation]
551
+ # @return [::Gapic::GenericLRO::Operation]
525
552
  #
526
553
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
527
554
  def patch request, options = nil
@@ -548,7 +575,14 @@ module Google
548
575
  metadata: @config.metadata
549
576
 
550
577
  @target_http_proxies_stub.patch request, options do |result, response|
551
- result = ::Gapic::Rest::BaseOperation.new result
578
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
579
+ operation: result,
580
+ client: global_operations,
581
+ request_values: {
582
+ "project" => request.project
583
+ },
584
+ options: options
585
+ )
552
586
  yield result, response if block_given?
553
587
  return result
554
588
  end
@@ -586,10 +620,10 @@ module Google
586
620
  # @param url_map_reference_resource [::Google::Cloud::Compute::V1::UrlMapReference, ::Hash]
587
621
  # The body resource for this request
588
622
  # @yield [result, response] Access the result along with the Faraday response object
589
- # @yieldparam result [::Gapic::Rest::BaseOperation]
623
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
590
624
  # @yieldparam response [::Faraday::Response]
591
625
  #
592
- # @return [::Gapic::Rest::BaseOperation]
626
+ # @return [::Gapic::GenericLRO::Operation]
593
627
  #
594
628
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
595
629
  def set_url_map request, options = nil
@@ -616,7 +650,14 @@ module Google
616
650
  metadata: @config.metadata
617
651
 
618
652
  @target_http_proxies_stub.set_url_map request, options do |result, response|
619
- result = ::Gapic::Rest::BaseOperation.new result
653
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
654
+ operation: result,
655
+ client: global_operations,
656
+ request_values: {
657
+ "project" => request.project
658
+ },
659
+ options: options
660
+ )
620
661
  yield result, response if block_given?
621
662
  return result
622
663
  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/target_https_proxies/rest/service_stub"
22
+ require "google/cloud/compute/v1/global_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -149,9 +150,21 @@ module Google
149
150
  credentials = Credentials.new credentials, scope: @config.scope
150
151
  end
151
152
 
153
+ @global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
154
+ config.credentials = credentials
155
+ config.endpoint = @config.endpoint
156
+ end
157
+
152
158
  @target_https_proxies_stub = ::Google::Cloud::Compute::V1::TargetHttpsProxies::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
153
159
  end
154
160
 
161
+ ##
162
+ # Get the associated client for long-running operations via GlobalOperations.
163
+ #
164
+ # @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
165
+ #
166
+ attr_reader :global_operations
167
+
155
168
  # Service calls
156
169
 
157
170
  ##
@@ -255,10 +268,10 @@ module Google
255
268
  # @param target_https_proxy [::String]
256
269
  # Name of the TargetHttpsProxy resource to delete.
257
270
  # @yield [result, response] Access the result along with the Faraday response object
258
- # @yieldparam result [::Gapic::Rest::BaseOperation]
271
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
259
272
  # @yieldparam response [::Faraday::Response]
260
273
  #
261
- # @return [::Gapic::Rest::BaseOperation]
274
+ # @return [::Gapic::GenericLRO::Operation]
262
275
  #
263
276
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
264
277
  def delete request, options = nil
@@ -285,7 +298,14 @@ module Google
285
298
  metadata: @config.metadata
286
299
 
287
300
  @target_https_proxies_stub.delete request, options do |result, response|
288
- result = ::Gapic::Rest::BaseOperation.new result
301
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
302
+ operation: result,
303
+ client: global_operations,
304
+ request_values: {
305
+ "project" => request.project
306
+ },
307
+ options: options
308
+ )
289
309
  yield result, response if block_given?
290
310
  return result
291
311
  end
@@ -384,10 +404,10 @@ module Google
384
404
  # @param target_https_proxy_resource [::Google::Cloud::Compute::V1::TargetHttpsProxy, ::Hash]
385
405
  # The body resource for this request
386
406
  # @yield [result, response] Access the result along with the Faraday response object
387
- # @yieldparam result [::Gapic::Rest::BaseOperation]
407
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
388
408
  # @yieldparam response [::Faraday::Response]
389
409
  #
390
- # @return [::Gapic::Rest::BaseOperation]
410
+ # @return [::Gapic::GenericLRO::Operation]
391
411
  #
392
412
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
393
413
  def insert request, options = nil
@@ -414,7 +434,14 @@ module Google
414
434
  metadata: @config.metadata
415
435
 
416
436
  @target_https_proxies_stub.insert request, options do |result, response|
417
- result = ::Gapic::Rest::BaseOperation.new result
437
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
438
+ operation: result,
439
+ client: global_operations,
440
+ request_values: {
441
+ "project" => request.project
442
+ },
443
+ options: options
444
+ )
418
445
  yield result, response if block_given?
419
446
  return result
420
447
  end
@@ -524,10 +551,10 @@ module Google
524
551
  # @param target_https_proxy_resource [::Google::Cloud::Compute::V1::TargetHttpsProxy, ::Hash]
525
552
  # The body resource for this request
526
553
  # @yield [result, response] Access the result along with the Faraday response object
527
- # @yieldparam result [::Gapic::Rest::BaseOperation]
554
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
528
555
  # @yieldparam response [::Faraday::Response]
529
556
  #
530
- # @return [::Gapic::Rest::BaseOperation]
557
+ # @return [::Gapic::GenericLRO::Operation]
531
558
  #
532
559
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
533
560
  def patch request, options = nil
@@ -554,7 +581,14 @@ module Google
554
581
  metadata: @config.metadata
555
582
 
556
583
  @target_https_proxies_stub.patch request, options do |result, response|
557
- result = ::Gapic::Rest::BaseOperation.new result
584
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
585
+ operation: result,
586
+ client: global_operations,
587
+ request_values: {
588
+ "project" => request.project
589
+ },
590
+ options: options
591
+ )
558
592
  yield result, response if block_given?
559
593
  return result
560
594
  end
@@ -592,10 +626,10 @@ module Google
592
626
  # @param target_https_proxy [::String]
593
627
  # Name of the TargetHttpsProxy resource to set the QUIC override policy for. The name should conform to RFC1035.
594
628
  # @yield [result, response] Access the result along with the Faraday response object
595
- # @yieldparam result [::Gapic::Rest::BaseOperation]
629
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
596
630
  # @yieldparam response [::Faraday::Response]
597
631
  #
598
- # @return [::Gapic::Rest::BaseOperation]
632
+ # @return [::Gapic::GenericLRO::Operation]
599
633
  #
600
634
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
601
635
  def set_quic_override request, options = nil
@@ -622,7 +656,14 @@ module Google
622
656
  metadata: @config.metadata
623
657
 
624
658
  @target_https_proxies_stub.set_quic_override request, options do |result, response|
625
- result = ::Gapic::Rest::BaseOperation.new result
659
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
660
+ operation: result,
661
+ client: global_operations,
662
+ request_values: {
663
+ "project" => request.project
664
+ },
665
+ options: options
666
+ )
626
667
  yield result, response if block_given?
627
668
  return result
628
669
  end
@@ -660,10 +701,10 @@ module Google
660
701
  # @param target_https_proxy [::String]
661
702
  # Name of the TargetHttpsProxy resource to set an SslCertificates resource for.
662
703
  # @yield [result, response] Access the result along with the Faraday response object
663
- # @yieldparam result [::Gapic::Rest::BaseOperation]
704
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
664
705
  # @yieldparam response [::Faraday::Response]
665
706
  #
666
- # @return [::Gapic::Rest::BaseOperation]
707
+ # @return [::Gapic::GenericLRO::Operation]
667
708
  #
668
709
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
669
710
  def set_ssl_certificates request, options = nil
@@ -690,7 +731,14 @@ module Google
690
731
  metadata: @config.metadata
691
732
 
692
733
  @target_https_proxies_stub.set_ssl_certificates request, options do |result, response|
693
- result = ::Gapic::Rest::BaseOperation.new result
734
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
735
+ operation: result,
736
+ client: global_operations,
737
+ request_values: {
738
+ "project" => request.project
739
+ },
740
+ options: options
741
+ )
694
742
  yield result, response if block_given?
695
743
  return result
696
744
  end
@@ -728,10 +776,10 @@ module Google
728
776
  # @param target_https_proxy [::String]
729
777
  # Name of the TargetHttpsProxy resource whose SSL policy is to be set. The name must be 1-63 characters long, and comply with RFC1035.
730
778
  # @yield [result, response] Access the result along with the Faraday response object
731
- # @yieldparam result [::Gapic::Rest::BaseOperation]
779
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
732
780
  # @yieldparam response [::Faraday::Response]
733
781
  #
734
- # @return [::Gapic::Rest::BaseOperation]
782
+ # @return [::Gapic::GenericLRO::Operation]
735
783
  #
736
784
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
737
785
  def set_ssl_policy request, options = nil
@@ -758,7 +806,14 @@ module Google
758
806
  metadata: @config.metadata
759
807
 
760
808
  @target_https_proxies_stub.set_ssl_policy request, options do |result, response|
761
- result = ::Gapic::Rest::BaseOperation.new result
809
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
810
+ operation: result,
811
+ client: global_operations,
812
+ request_values: {
813
+ "project" => request.project
814
+ },
815
+ options: options
816
+ )
762
817
  yield result, response if block_given?
763
818
  return result
764
819
  end
@@ -796,10 +851,10 @@ module Google
796
851
  # @param url_map_reference_resource [::Google::Cloud::Compute::V1::UrlMapReference, ::Hash]
797
852
  # The body resource for this request
798
853
  # @yield [result, response] Access the result along with the Faraday response object
799
- # @yieldparam result [::Gapic::Rest::BaseOperation]
854
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
800
855
  # @yieldparam response [::Faraday::Response]
801
856
  #
802
- # @return [::Gapic::Rest::BaseOperation]
857
+ # @return [::Gapic::GenericLRO::Operation]
803
858
  #
804
859
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
805
860
  def set_url_map request, options = nil
@@ -826,7 +881,14 @@ module Google
826
881
  metadata: @config.metadata
827
882
 
828
883
  @target_https_proxies_stub.set_url_map request, options do |result, response|
829
- result = ::Gapic::Rest::BaseOperation.new result
884
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
885
+ operation: result,
886
+ client: global_operations,
887
+ request_values: {
888
+ "project" => request.project
889
+ },
890
+ options: options
891
+ )
830
892
  yield result, response if block_given?
831
893
  return result
832
894
  end