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/security_policies/rest/service_stub"
22
+ require "google/cloud/compute/v1/global_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -152,9 +153,21 @@ module Google
152
153
  credentials = Credentials.new credentials, scope: @config.scope
153
154
  end
154
155
 
156
+ @global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
157
+ config.credentials = credentials
158
+ config.endpoint = @config.endpoint
159
+ end
160
+
155
161
  @security_policies_stub = ::Google::Cloud::Compute::V1::SecurityPolicies::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
156
162
  end
157
163
 
164
+ ##
165
+ # Get the associated client for long-running operations via GlobalOperations.
166
+ #
167
+ # @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
168
+ #
169
+ attr_reader :global_operations
170
+
158
171
  # Service calls
159
172
 
160
173
  ##
@@ -184,10 +197,10 @@ module Google
184
197
  # @param security_policy_rule_resource [::Google::Cloud::Compute::V1::SecurityPolicyRule, ::Hash]
185
198
  # The body resource for this request
186
199
  # @yield [result, response] Access the result along with the Faraday response object
187
- # @yieldparam result [::Gapic::Rest::BaseOperation]
200
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
188
201
  # @yieldparam response [::Faraday::Response]
189
202
  #
190
- # @return [::Gapic::Rest::BaseOperation]
203
+ # @return [::Gapic::GenericLRO::Operation]
191
204
  #
192
205
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
193
206
  def add_rule request, options = nil
@@ -214,7 +227,14 @@ module Google
214
227
  metadata: @config.metadata
215
228
 
216
229
  @security_policies_stub.add_rule request, options do |result, response|
217
- result = ::Gapic::Rest::BaseOperation.new result
230
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
231
+ operation: result,
232
+ client: global_operations,
233
+ request_values: {
234
+ "project" => request.project
235
+ },
236
+ options: options
237
+ )
218
238
  yield result, response if block_given?
219
239
  return result
220
240
  end
@@ -250,10 +270,10 @@ module Google
250
270
  # @param security_policy [::String]
251
271
  # Name of the security policy to delete.
252
272
  # @yield [result, response] Access the result along with the Faraday response object
253
- # @yieldparam result [::Gapic::Rest::BaseOperation]
273
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
254
274
  # @yieldparam response [::Faraday::Response]
255
275
  #
256
- # @return [::Gapic::Rest::BaseOperation]
276
+ # @return [::Gapic::GenericLRO::Operation]
257
277
  #
258
278
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
259
279
  def delete request, options = nil
@@ -280,7 +300,14 @@ module Google
280
300
  metadata: @config.metadata
281
301
 
282
302
  @security_policies_stub.delete request, options do |result, response|
283
- result = ::Gapic::Rest::BaseOperation.new result
303
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
304
+ operation: result,
305
+ client: global_operations,
306
+ request_values: {
307
+ "project" => request.project
308
+ },
309
+ options: options
310
+ )
284
311
  yield result, response if block_given?
285
312
  return result
286
313
  end
@@ -444,10 +471,10 @@ module Google
444
471
  # @param security_policy_resource [::Google::Cloud::Compute::V1::SecurityPolicy, ::Hash]
445
472
  # The body resource for this request
446
473
  # @yield [result, response] Access the result along with the Faraday response object
447
- # @yieldparam result [::Gapic::Rest::BaseOperation]
474
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
448
475
  # @yieldparam response [::Faraday::Response]
449
476
  #
450
- # @return [::Gapic::Rest::BaseOperation]
477
+ # @return [::Gapic::GenericLRO::Operation]
451
478
  #
452
479
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
453
480
  def insert request, options = nil
@@ -474,7 +501,14 @@ module Google
474
501
  metadata: @config.metadata
475
502
 
476
503
  @security_policies_stub.insert request, options do |result, response|
477
- result = ::Gapic::Rest::BaseOperation.new result
504
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
505
+ operation: result,
506
+ client: global_operations,
507
+ request_values: {
508
+ "project" => request.project
509
+ },
510
+ options: options
511
+ )
478
512
  yield result, response if block_given?
479
513
  return result
480
514
  end
@@ -655,10 +689,10 @@ module Google
655
689
  # @param security_policy_resource [::Google::Cloud::Compute::V1::SecurityPolicy, ::Hash]
656
690
  # The body resource for this request
657
691
  # @yield [result, response] Access the result along with the Faraday response object
658
- # @yieldparam result [::Gapic::Rest::BaseOperation]
692
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
659
693
  # @yieldparam response [::Faraday::Response]
660
694
  #
661
- # @return [::Gapic::Rest::BaseOperation]
695
+ # @return [::Gapic::GenericLRO::Operation]
662
696
  #
663
697
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
664
698
  def patch request, options = nil
@@ -685,7 +719,14 @@ module Google
685
719
  metadata: @config.metadata
686
720
 
687
721
  @security_policies_stub.patch request, options do |result, response|
688
- result = ::Gapic::Rest::BaseOperation.new result
722
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
723
+ operation: result,
724
+ client: global_operations,
725
+ request_values: {
726
+ "project" => request.project
727
+ },
728
+ options: options
729
+ )
689
730
  yield result, response if block_given?
690
731
  return result
691
732
  end
@@ -723,10 +764,10 @@ module Google
723
764
  # @param security_policy_rule_resource [::Google::Cloud::Compute::V1::SecurityPolicyRule, ::Hash]
724
765
  # The body resource for this request
725
766
  # @yield [result, response] Access the result along with the Faraday response object
726
- # @yieldparam result [::Gapic::Rest::BaseOperation]
767
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
727
768
  # @yieldparam response [::Faraday::Response]
728
769
  #
729
- # @return [::Gapic::Rest::BaseOperation]
770
+ # @return [::Gapic::GenericLRO::Operation]
730
771
  #
731
772
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
732
773
  def patch_rule request, options = nil
@@ -753,7 +794,14 @@ module Google
753
794
  metadata: @config.metadata
754
795
 
755
796
  @security_policies_stub.patch_rule request, options do |result, response|
756
- result = ::Gapic::Rest::BaseOperation.new result
797
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
798
+ operation: result,
799
+ client: global_operations,
800
+ request_values: {
801
+ "project" => request.project
802
+ },
803
+ options: options
804
+ )
757
805
  yield result, response if block_given?
758
806
  return result
759
807
  end
@@ -789,10 +837,10 @@ module Google
789
837
  # @param security_policy [::String]
790
838
  # Name of the security policy to update.
791
839
  # @yield [result, response] Access the result along with the Faraday response object
792
- # @yieldparam result [::Gapic::Rest::BaseOperation]
840
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
793
841
  # @yieldparam response [::Faraday::Response]
794
842
  #
795
- # @return [::Gapic::Rest::BaseOperation]
843
+ # @return [::Gapic::GenericLRO::Operation]
796
844
  #
797
845
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
798
846
  def remove_rule request, options = nil
@@ -819,7 +867,14 @@ module Google
819
867
  metadata: @config.metadata
820
868
 
821
869
  @security_policies_stub.remove_rule request, options do |result, response|
822
- result = ::Gapic::Rest::BaseOperation.new result
870
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
871
+ operation: result,
872
+ client: global_operations,
873
+ request_values: {
874
+ "project" => request.project
875
+ },
876
+ options: options
877
+ )
823
878
  yield result, response if block_given?
824
879
  return result
825
880
  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/service_attachments/rest/service_stub"
22
+ require "google/cloud/compute/v1/region_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -150,9 +151,21 @@ module Google
150
151
  credentials = Credentials.new credentials, scope: @config.scope
151
152
  end
152
153
 
154
+ @region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
155
+ config.credentials = credentials
156
+ config.endpoint = @config.endpoint
157
+ end
158
+
153
159
  @service_attachments_stub = ::Google::Cloud::Compute::V1::ServiceAttachments::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
154
160
  end
155
161
 
162
+ ##
163
+ # Get the associated client for long-running operations via RegionOperations.
164
+ #
165
+ # @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
166
+ #
167
+ attr_reader :region_operations
168
+
156
169
  # Service calls
157
170
 
158
171
  ##
@@ -258,10 +271,10 @@ module Google
258
271
  # @param service_attachment [::String]
259
272
  # Name of the ServiceAttachment resource to delete.
260
273
  # @yield [result, response] Access the result along with the Faraday response object
261
- # @yieldparam result [::Gapic::Rest::BaseOperation]
274
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
262
275
  # @yieldparam response [::Faraday::Response]
263
276
  #
264
- # @return [::Gapic::Rest::BaseOperation]
277
+ # @return [::Gapic::GenericLRO::Operation]
265
278
  #
266
279
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
267
280
  def delete request, options = nil
@@ -288,7 +301,15 @@ module Google
288
301
  metadata: @config.metadata
289
302
 
290
303
  @service_attachments_stub.delete request, options do |result, response|
291
- result = ::Gapic::Rest::BaseOperation.new result
304
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
305
+ operation: result,
306
+ client: region_operations,
307
+ request_values: {
308
+ "project" => request.project,
309
+ "region" => request.region
310
+ },
311
+ options: options
312
+ )
292
313
  yield result, response if block_given?
293
314
  return result
294
315
  end
@@ -458,10 +479,10 @@ module Google
458
479
  # @param service_attachment_resource [::Google::Cloud::Compute::V1::ServiceAttachment, ::Hash]
459
480
  # The body resource for this request
460
481
  # @yield [result, response] Access the result along with the Faraday response object
461
- # @yieldparam result [::Gapic::Rest::BaseOperation]
482
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
462
483
  # @yieldparam response [::Faraday::Response]
463
484
  #
464
- # @return [::Gapic::Rest::BaseOperation]
485
+ # @return [::Gapic::GenericLRO::Operation]
465
486
  #
466
487
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
467
488
  def insert request, options = nil
@@ -488,7 +509,15 @@ module Google
488
509
  metadata: @config.metadata
489
510
 
490
511
  @service_attachments_stub.insert request, options do |result, response|
491
- result = ::Gapic::Rest::BaseOperation.new result
512
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
513
+ operation: result,
514
+ client: region_operations,
515
+ request_values: {
516
+ "project" => request.project,
517
+ "region" => request.region
518
+ },
519
+ options: options
520
+ )
492
521
  yield result, response if block_given?
493
522
  return result
494
523
  end
@@ -602,10 +631,10 @@ module Google
602
631
  # @param service_attachment_resource [::Google::Cloud::Compute::V1::ServiceAttachment, ::Hash]
603
632
  # The body resource for this request
604
633
  # @yield [result, response] Access the result along with the Faraday response object
605
- # @yieldparam result [::Gapic::Rest::BaseOperation]
634
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
606
635
  # @yieldparam response [::Faraday::Response]
607
636
  #
608
- # @return [::Gapic::Rest::BaseOperation]
637
+ # @return [::Gapic::GenericLRO::Operation]
609
638
  #
610
639
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
611
640
  def patch request, options = nil
@@ -632,7 +661,15 @@ module Google
632
661
  metadata: @config.metadata
633
662
 
634
663
  @service_attachments_stub.patch request, options do |result, response|
635
- result = ::Gapic::Rest::BaseOperation.new result
664
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
665
+ operation: result,
666
+ client: region_operations,
667
+ request_values: {
668
+ "project" => request.project,
669
+ "region" => request.region
670
+ },
671
+ options: options
672
+ )
636
673
  yield result, response if block_given?
637
674
  return result
638
675
  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/snapshots/rest/service_stub"
22
+ require "google/cloud/compute/v1/global_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -145,9 +146,21 @@ module Google
145
146
  credentials = Credentials.new credentials, scope: @config.scope
146
147
  end
147
148
 
149
+ @global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
150
+ config.credentials = credentials
151
+ config.endpoint = @config.endpoint
152
+ end
153
+
148
154
  @snapshots_stub = ::Google::Cloud::Compute::V1::Snapshots::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
149
155
  end
150
156
 
157
+ ##
158
+ # Get the associated client for long-running operations via GlobalOperations.
159
+ #
160
+ # @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
161
+ #
162
+ attr_reader :global_operations
163
+
151
164
  # Service calls
152
165
 
153
166
  ##
@@ -177,10 +190,10 @@ module Google
177
190
  # @param snapshot [::String]
178
191
  # Name of the Snapshot resource to delete.
179
192
  # @yield [result, response] Access the result along with the Faraday response object
180
- # @yieldparam result [::Gapic::Rest::BaseOperation]
193
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
181
194
  # @yieldparam response [::Faraday::Response]
182
195
  #
183
- # @return [::Gapic::Rest::BaseOperation]
196
+ # @return [::Gapic::GenericLRO::Operation]
184
197
  #
185
198
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
186
199
  def delete request, options = nil
@@ -207,7 +220,14 @@ module Google
207
220
  metadata: @config.metadata
208
221
 
209
222
  @snapshots_stub.delete request, options do |result, response|
210
- result = ::Gapic::Rest::BaseOperation.new result
223
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
224
+ operation: result,
225
+ client: global_operations,
226
+ request_values: {
227
+ "project" => request.project
228
+ },
229
+ options: options
230
+ )
211
231
  yield result, response if block_given?
212
232
  return result
213
233
  end
@@ -371,10 +391,10 @@ module Google
371
391
  # @param snapshot_resource [::Google::Cloud::Compute::V1::Snapshot, ::Hash]
372
392
  # The body resource for this request
373
393
  # @yield [result, response] Access the result along with the Faraday response object
374
- # @yieldparam result [::Gapic::Rest::BaseOperation]
394
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
375
395
  # @yieldparam response [::Faraday::Response]
376
396
  #
377
- # @return [::Gapic::Rest::BaseOperation]
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
  @snapshots_stub.insert request, options do |result, response|
404
- result = ::Gapic::Rest::BaseOperation.new 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
@@ -574,10 +601,10 @@ module Google
574
601
  # @param resource [::String]
575
602
  # Name or id of the resource for this request.
576
603
  # @yield [result, response] Access the result along with the Faraday response object
577
- # @yieldparam result [::Gapic::Rest::BaseOperation]
604
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
578
605
  # @yieldparam response [::Faraday::Response]
579
606
  #
580
- # @return [::Gapic::Rest::BaseOperation]
607
+ # @return [::Gapic::GenericLRO::Operation]
581
608
  #
582
609
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
583
610
  def set_labels request, options = nil
@@ -604,7 +631,14 @@ module Google
604
631
  metadata: @config.metadata
605
632
 
606
633
  @snapshots_stub.set_labels request, options do |result, response|
607
- result = ::Gapic::Rest::BaseOperation.new result
634
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
635
+ operation: result,
636
+ client: global_operations,
637
+ request_values: {
638
+ "project" => request.project
639
+ },
640
+ options: options
641
+ )
608
642
  yield result, response if block_given?
609
643
  return result
610
644
  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/ssl_certificates/rest/service_stub"
22
+ require "google/cloud/compute/v1/global_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -139,9 +140,21 @@ module Google
139
140
  credentials = Credentials.new credentials, scope: @config.scope
140
141
  end
141
142
 
143
+ @global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
144
+ config.credentials = credentials
145
+ config.endpoint = @config.endpoint
146
+ end
147
+
142
148
  @ssl_certificates_stub = ::Google::Cloud::Compute::V1::SslCertificates::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
143
149
  end
144
150
 
151
+ ##
152
+ # Get the associated client for long-running operations via GlobalOperations.
153
+ #
154
+ # @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
155
+ #
156
+ attr_reader :global_operations
157
+
145
158
  # Service calls
146
159
 
147
160
  ##
@@ -245,10 +258,10 @@ module Google
245
258
  # @param ssl_certificate [::String]
246
259
  # Name of the SslCertificate resource to delete.
247
260
  # @yield [result, response] Access the result along with the Faraday response object
248
- # @yieldparam result [::Gapic::Rest::BaseOperation]
261
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
249
262
  # @yieldparam response [::Faraday::Response]
250
263
  #
251
- # @return [::Gapic::Rest::BaseOperation]
264
+ # @return [::Gapic::GenericLRO::Operation]
252
265
  #
253
266
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
254
267
  def delete request, options = nil
@@ -275,7 +288,14 @@ module Google
275
288
  metadata: @config.metadata
276
289
 
277
290
  @ssl_certificates_stub.delete request, options do |result, response|
278
- result = ::Gapic::Rest::BaseOperation.new result
291
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
292
+ operation: result,
293
+ client: global_operations,
294
+ request_values: {
295
+ "project" => request.project
296
+ },
297
+ options: options
298
+ )
279
299
  yield result, response if block_given?
280
300
  return result
281
301
  end
@@ -374,10 +394,10 @@ module Google
374
394
  # @param ssl_certificate_resource [::Google::Cloud::Compute::V1::SslCertificate, ::Hash]
375
395
  # The body resource for this request
376
396
  # @yield [result, response] Access the result along with the Faraday response object
377
- # @yieldparam result [::Gapic::Rest::BaseOperation]
397
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
378
398
  # @yieldparam response [::Faraday::Response]
379
399
  #
380
- # @return [::Gapic::Rest::BaseOperation]
400
+ # @return [::Gapic::GenericLRO::Operation]
381
401
  #
382
402
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
383
403
  def insert request, options = nil
@@ -404,7 +424,14 @@ module Google
404
424
  metadata: @config.metadata
405
425
 
406
426
  @ssl_certificates_stub.insert request, options do |result, response|
407
- result = ::Gapic::Rest::BaseOperation.new result
427
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
428
+ operation: result,
429
+ client: global_operations,
430
+ request_values: {
431
+ "project" => request.project
432
+ },
433
+ options: options
434
+ )
408
435
  yield result, response if block_given?
409
436
  return result
410
437
  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/ssl_policies/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
  @ssl_policies_stub = ::Google::Cloud::Compute::V1::SslPolicies::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 ssl_policy [::String]
174
187
  # Name of the SSL policy to delete. The name must be 1-63 characters long, and comply with RFC1035.
175
188
  # @yield [result, response] Access the result along with the Faraday response object
176
- # @yieldparam result [::Gapic::Rest::BaseOperation]
189
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
177
190
  # @yieldparam response [::Faraday::Response]
178
191
  #
179
- # @return [::Gapic::Rest::BaseOperation]
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
  @ssl_policies_stub.delete request, options do |result, response|
206
- result = ::Gapic::Rest::BaseOperation.new 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
@@ -302,10 +322,10 @@ module Google
302
322
  # @param ssl_policy_resource [::Google::Cloud::Compute::V1::SslPolicy, ::Hash]
303
323
  # The body resource for this request
304
324
  # @yield [result, response] Access the result along with the Faraday response object
305
- # @yieldparam result [::Gapic::Rest::BaseOperation]
325
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
306
326
  # @yieldparam response [::Faraday::Response]
307
327
  #
308
- # @return [::Gapic::Rest::BaseOperation]
328
+ # @return [::Gapic::GenericLRO::Operation]
309
329
  #
310
330
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
311
331
  def insert request, options = nil
@@ -332,7 +352,14 @@ module Google
332
352
  metadata: @config.metadata
333
353
 
334
354
  @ssl_policies_stub.insert request, options do |result, response|
335
- result = ::Gapic::Rest::BaseOperation.new result
355
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
356
+ operation: result,
357
+ client: global_operations,
358
+ request_values: {
359
+ "project" => request.project
360
+ },
361
+ options: options
362
+ )
336
363
  yield result, response if block_given?
337
364
  return result
338
365
  end
@@ -513,10 +540,10 @@ module Google
513
540
  # @param ssl_policy_resource [::Google::Cloud::Compute::V1::SslPolicy, ::Hash]
514
541
  # The body resource for this request
515
542
  # @yield [result, response] Access the result along with the Faraday response object
516
- # @yieldparam result [::Gapic::Rest::BaseOperation]
543
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
517
544
  # @yieldparam response [::Faraday::Response]
518
545
  #
519
- # @return [::Gapic::Rest::BaseOperation]
546
+ # @return [::Gapic::GenericLRO::Operation]
520
547
  #
521
548
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
522
549
  def patch request, options = nil
@@ -543,7 +570,14 @@ module Google
543
570
  metadata: @config.metadata
544
571
 
545
572
  @ssl_policies_stub.patch request, options do |result, response|
546
- result = ::Gapic::Rest::BaseOperation.new result
573
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
574
+ operation: result,
575
+ client: global_operations,
576
+ request_values: {
577
+ "project" => request.project
578
+ },
579
+ options: options
580
+ )
547
581
  yield result, response if block_given?
548
582
  return result
549
583
  end