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/projects/rest/service_stub"
22
+ require "google/cloud/compute/v1/global_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -155,9 +156,21 @@ module Google
155
156
  credentials = Credentials.new credentials, scope: @config.scope
156
157
  end
157
158
 
159
+ @global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
160
+ config.credentials = credentials
161
+ config.endpoint = @config.endpoint
162
+ end
163
+
158
164
  @projects_stub = ::Google::Cloud::Compute::V1::Projects::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
159
165
  end
160
166
 
167
+ ##
168
+ # Get the associated client for long-running operations via GlobalOperations.
169
+ #
170
+ # @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
171
+ #
172
+ attr_reader :global_operations
173
+
161
174
  # Service calls
162
175
 
163
176
  ##
@@ -185,10 +198,10 @@ module Google
185
198
  # @param request_id [::String]
186
199
  # 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).
187
200
  # @yield [result, response] Access the result along with the Faraday response object
188
- # @yieldparam result [::Gapic::Rest::BaseOperation]
201
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
189
202
  # @yieldparam response [::Faraday::Response]
190
203
  #
191
- # @return [::Gapic::Rest::BaseOperation]
204
+ # @return [::Gapic::GenericLRO::Operation]
192
205
  #
193
206
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
194
207
  def disable_xpn_host request, options = nil
@@ -215,7 +228,14 @@ module Google
215
228
  metadata: @config.metadata
216
229
 
217
230
  @projects_stub.disable_xpn_host request, options do |result, response|
218
- result = ::Gapic::Rest::BaseOperation.new result
231
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
232
+ operation: result,
233
+ client: global_operations,
234
+ request_values: {
235
+ "project" => request.project
236
+ },
237
+ options: options
238
+ )
219
239
  yield result, response if block_given?
220
240
  return result
221
241
  end
@@ -251,10 +271,10 @@ module Google
251
271
  # @param request_id [::String]
252
272
  # 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).
253
273
  # @yield [result, response] Access the result along with the Faraday response object
254
- # @yieldparam result [::Gapic::Rest::BaseOperation]
274
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
255
275
  # @yieldparam response [::Faraday::Response]
256
276
  #
257
- # @return [::Gapic::Rest::BaseOperation]
277
+ # @return [::Gapic::GenericLRO::Operation]
258
278
  #
259
279
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
260
280
  def disable_xpn_resource request, options = nil
@@ -281,7 +301,14 @@ module Google
281
301
  metadata: @config.metadata
282
302
 
283
303
  @projects_stub.disable_xpn_resource request, options do |result, response|
284
- result = ::Gapic::Rest::BaseOperation.new result
304
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
305
+ operation: result,
306
+ client: global_operations,
307
+ request_values: {
308
+ "project" => request.project
309
+ },
310
+ options: options
311
+ )
285
312
  yield result, response if block_given?
286
313
  return result
287
314
  end
@@ -315,10 +342,10 @@ module Google
315
342
  # @param request_id [::String]
316
343
  # 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).
317
344
  # @yield [result, response] Access the result along with the Faraday response object
318
- # @yieldparam result [::Gapic::Rest::BaseOperation]
345
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
319
346
  # @yieldparam response [::Faraday::Response]
320
347
  #
321
- # @return [::Gapic::Rest::BaseOperation]
348
+ # @return [::Gapic::GenericLRO::Operation]
322
349
  #
323
350
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
324
351
  def enable_xpn_host request, options = nil
@@ -345,7 +372,14 @@ module Google
345
372
  metadata: @config.metadata
346
373
 
347
374
  @projects_stub.enable_xpn_host request, options do |result, response|
348
- result = ::Gapic::Rest::BaseOperation.new result
375
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
376
+ operation: result,
377
+ client: global_operations,
378
+ request_values: {
379
+ "project" => request.project
380
+ },
381
+ options: options
382
+ )
349
383
  yield result, response if block_given?
350
384
  return result
351
385
  end
@@ -381,10 +415,10 @@ module Google
381
415
  # @param request_id [::String]
382
416
  # 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).
383
417
  # @yield [result, response] Access the result along with the Faraday response object
384
- # @yieldparam result [::Gapic::Rest::BaseOperation]
418
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
385
419
  # @yieldparam response [::Faraday::Response]
386
420
  #
387
- # @return [::Gapic::Rest::BaseOperation]
421
+ # @return [::Gapic::GenericLRO::Operation]
388
422
  #
389
423
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
390
424
  def enable_xpn_resource request, options = nil
@@ -411,7 +445,14 @@ module Google
411
445
  metadata: @config.metadata
412
446
 
413
447
  @projects_stub.enable_xpn_resource request, options do |result, response|
414
- result = ::Gapic::Rest::BaseOperation.new result
448
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
449
+ operation: result,
450
+ client: global_operations,
451
+ request_values: {
452
+ "project" => request.project
453
+ },
454
+ options: options
455
+ )
415
456
  yield result, response if block_given?
416
457
  return result
417
458
  end
@@ -715,10 +756,10 @@ module Google
715
756
  # @param request_id [::String]
716
757
  # 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).
717
758
  # @yield [result, response] Access the result along with the Faraday response object
718
- # @yieldparam result [::Gapic::Rest::BaseOperation]
759
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
719
760
  # @yieldparam response [::Faraday::Response]
720
761
  #
721
- # @return [::Gapic::Rest::BaseOperation]
762
+ # @return [::Gapic::GenericLRO::Operation]
722
763
  #
723
764
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
724
765
  def move_disk request, options = nil
@@ -745,7 +786,14 @@ module Google
745
786
  metadata: @config.metadata
746
787
 
747
788
  @projects_stub.move_disk request, options do |result, response|
748
- result = ::Gapic::Rest::BaseOperation.new result
789
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
790
+ operation: result,
791
+ client: global_operations,
792
+ request_values: {
793
+ "project" => request.project
794
+ },
795
+ options: options
796
+ )
749
797
  yield result, response if block_given?
750
798
  return result
751
799
  end
@@ -781,10 +829,10 @@ module Google
781
829
  # @param request_id [::String]
782
830
  # 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).
783
831
  # @yield [result, response] Access the result along with the Faraday response object
784
- # @yieldparam result [::Gapic::Rest::BaseOperation]
832
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
785
833
  # @yieldparam response [::Faraday::Response]
786
834
  #
787
- # @return [::Gapic::Rest::BaseOperation]
835
+ # @return [::Gapic::GenericLRO::Operation]
788
836
  #
789
837
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
790
838
  def move_instance request, options = nil
@@ -811,7 +859,14 @@ module Google
811
859
  metadata: @config.metadata
812
860
 
813
861
  @projects_stub.move_instance request, options do |result, response|
814
- result = ::Gapic::Rest::BaseOperation.new result
862
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
863
+ operation: result,
864
+ client: global_operations,
865
+ request_values: {
866
+ "project" => request.project
867
+ },
868
+ options: options
869
+ )
815
870
  yield result, response if block_given?
816
871
  return result
817
872
  end
@@ -847,10 +902,10 @@ module Google
847
902
  # @param request_id [::String]
848
903
  # 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).
849
904
  # @yield [result, response] Access the result along with the Faraday response object
850
- # @yieldparam result [::Gapic::Rest::BaseOperation]
905
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
851
906
  # @yieldparam response [::Faraday::Response]
852
907
  #
853
- # @return [::Gapic::Rest::BaseOperation]
908
+ # @return [::Gapic::GenericLRO::Operation]
854
909
  #
855
910
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
856
911
  def set_common_instance_metadata request, options = nil
@@ -877,7 +932,14 @@ module Google
877
932
  metadata: @config.metadata
878
933
 
879
934
  @projects_stub.set_common_instance_metadata request, options do |result, response|
880
- result = ::Gapic::Rest::BaseOperation.new result
935
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
936
+ operation: result,
937
+ client: global_operations,
938
+ request_values: {
939
+ "project" => request.project
940
+ },
941
+ options: options
942
+ )
881
943
  yield result, response if block_given?
882
944
  return result
883
945
  end
@@ -913,10 +975,10 @@ module Google
913
975
  # @param request_id [::String]
914
976
  # 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).
915
977
  # @yield [result, response] Access the result along with the Faraday response object
916
- # @yieldparam result [::Gapic::Rest::BaseOperation]
978
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
917
979
  # @yieldparam response [::Faraday::Response]
918
980
  #
919
- # @return [::Gapic::Rest::BaseOperation]
981
+ # @return [::Gapic::GenericLRO::Operation]
920
982
  #
921
983
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
922
984
  def set_default_network_tier request, options = nil
@@ -943,7 +1005,14 @@ module Google
943
1005
  metadata: @config.metadata
944
1006
 
945
1007
  @projects_stub.set_default_network_tier request, options do |result, response|
946
- result = ::Gapic::Rest::BaseOperation.new result
1008
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
1009
+ operation: result,
1010
+ client: global_operations,
1011
+ request_values: {
1012
+ "project" => request.project
1013
+ },
1014
+ options: options
1015
+ )
947
1016
  yield result, response if block_given?
948
1017
  return result
949
1018
  end
@@ -979,10 +1048,10 @@ module Google
979
1048
  # @param usage_export_location_resource [::Google::Cloud::Compute::V1::UsageExportLocation, ::Hash]
980
1049
  # The body resource for this request
981
1050
  # @yield [result, response] Access the result along with the Faraday response object
982
- # @yieldparam result [::Gapic::Rest::BaseOperation]
1051
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
983
1052
  # @yieldparam response [::Faraday::Response]
984
1053
  #
985
- # @return [::Gapic::Rest::BaseOperation]
1054
+ # @return [::Gapic::GenericLRO::Operation]
986
1055
  #
987
1056
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
988
1057
  def set_usage_export_bucket request, options = nil
@@ -1009,7 +1078,14 @@ module Google
1009
1078
  metadata: @config.metadata
1010
1079
 
1011
1080
  @projects_stub.set_usage_export_bucket request, options do |result, response|
1012
- result = ::Gapic::Rest::BaseOperation.new result
1081
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
1082
+ operation: result,
1083
+ client: global_operations,
1084
+ request_values: {
1085
+ "project" => request.project
1086
+ },
1087
+ options: options
1088
+ )
1013
1089
  yield result, response if block_given?
1014
1090
  return result
1015
1091
  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/public_advertised_prefixes/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
  @public_advertised_prefixes_stub = ::Google::Cloud::Compute::V1::PublicAdvertisedPrefixes::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 request_id [::String]
169
182
  # 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).
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
  @public_advertised_prefixes_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 request_id [::String]
298
318
  # 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).
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
  @public_advertised_prefixes_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 request_id [::String]
438
465
  # 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).
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
  @public_advertised_prefixes_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/public_delegated_prefixes/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
  @public_delegated_prefixes_stub = ::Google::Cloud::Compute::V1::PublicDelegatedPrefixes::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::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,15 @@ module Google
279
292
  metadata: @config.metadata
280
293
 
281
294
  @public_delegated_prefixes_stub.delete request, options do |result, response|
282
- result = ::Gapic::Rest::BaseOperation.new 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
@@ -382,10 +403,10 @@ module Google
382
403
  # @param request_id [::String]
383
404
  # 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).
384
405
  # @yield [result, response] Access the result along with the Faraday response object
385
- # @yieldparam result [::Gapic::Rest::BaseOperation]
406
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
386
407
  # @yieldparam response [::Faraday::Response]
387
408
  #
388
- # @return [::Gapic::Rest::BaseOperation]
409
+ # @return [::Gapic::GenericLRO::Operation]
389
410
  #
390
411
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
391
412
  def insert request, options = nil
@@ -412,7 +433,15 @@ module Google
412
433
  metadata: @config.metadata
413
434
 
414
435
  @public_delegated_prefixes_stub.insert request, options do |result, response|
415
- result = ::Gapic::Rest::BaseOperation.new result
436
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
437
+ operation: result,
438
+ client: region_operations,
439
+ request_values: {
440
+ "project" => request.project,
441
+ "region" => request.region
442
+ },
443
+ options: options
444
+ )
416
445
  yield result, response if block_given?
417
446
  return result
418
447
  end
@@ -526,10 +555,10 @@ module Google
526
555
  # @param request_id [::String]
527
556
  # 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).
528
557
  # @yield [result, response] Access the result along with the Faraday response object
529
- # @yieldparam result [::Gapic::Rest::BaseOperation]
558
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
530
559
  # @yieldparam response [::Faraday::Response]
531
560
  #
532
- # @return [::Gapic::Rest::BaseOperation]
561
+ # @return [::Gapic::GenericLRO::Operation]
533
562
  #
534
563
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
535
564
  def patch request, options = nil
@@ -556,7 +585,15 @@ module Google
556
585
  metadata: @config.metadata
557
586
 
558
587
  @public_delegated_prefixes_stub.patch request, options do |result, response|
559
- result = ::Gapic::Rest::BaseOperation.new result
588
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
589
+ operation: result,
590
+ client: region_operations,
591
+ request_values: {
592
+ "project" => request.project,
593
+ "region" => request.region
594
+ },
595
+ options: options
596
+ )
560
597
  yield result, response if block_given?
561
598
  return result
562
599
  end