google-cloud-alloy_db-v1 0.10.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -206,15 +206,27 @@ module Google
206
206
  endpoint: @config.endpoint,
207
207
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
208
208
  universe_domain: @config.universe_domain,
209
- credentials: credentials
209
+ credentials: credentials,
210
+ logger: @config.logger
210
211
  )
211
212
 
213
+ @alloy_db_admin_stub.logger(stub: true)&.info do |entry|
214
+ entry.set_system_name
215
+ entry.set_service
216
+ entry.message = "Created client for #{entry.service}"
217
+ entry.set_credentials_fields credentials
218
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
219
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
220
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
221
+ end
222
+
212
223
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
213
224
  config.credentials = credentials
214
225
  config.quota_project = @quota_project_id
215
226
  config.endpoint = @alloy_db_admin_stub.endpoint
216
227
  config.universe_domain = @alloy_db_admin_stub.universe_domain
217
228
  config.bindings_override = @config.bindings_override
229
+ config.logger = @alloy_db_admin_stub.logger if config.respond_to? :logger=
218
230
  end
219
231
 
220
232
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
@@ -222,6 +234,7 @@ module Google
222
234
  config.quota_project = @quota_project_id
223
235
  config.endpoint = @alloy_db_admin_stub.endpoint
224
236
  config.universe_domain = @alloy_db_admin_stub.universe_domain
237
+ config.logger = @alloy_db_admin_stub.logger if config.respond_to? :logger=
225
238
  end
226
239
  end
227
240
 
@@ -246,6 +259,15 @@ module Google
246
259
  #
247
260
  attr_reader :iam_policy_client
248
261
 
262
+ ##
263
+ # The logger used for request/response debug logging.
264
+ #
265
+ # @return [Logger]
266
+ #
267
+ def logger
268
+ @alloy_db_admin_stub.logger
269
+ end
270
+
249
271
  # Service calls
250
272
 
251
273
  ##
@@ -337,7 +359,6 @@ module Google
337
359
 
338
360
  @alloy_db_admin_stub.list_clusters request, options do |result, operation|
339
361
  yield result, operation if block_given?
340
- return result
341
362
  end
342
363
  rescue ::Gapic::Rest::Error => e
343
364
  raise ::Google::Cloud::Error.from_error(e)
@@ -420,7 +441,6 @@ module Google
420
441
 
421
442
  @alloy_db_admin_stub.get_cluster request, options do |result, operation|
422
443
  yield result, operation if block_given?
423
- return result
424
444
  end
425
445
  rescue ::Gapic::Rest::Error => e
426
446
  raise ::Google::Cloud::Error.from_error(e)
@@ -530,7 +550,7 @@ module Google
530
550
  @alloy_db_admin_stub.create_cluster request, options do |result, operation|
531
551
  result = ::Gapic::Operation.new result, @operations_client, options: options
532
552
  yield result, operation if block_given?
533
- return result
553
+ throw :response, result
534
554
  end
535
555
  rescue ::Gapic::Rest::Error => e
536
556
  raise ::Google::Cloud::Error.from_error(e)
@@ -644,7 +664,7 @@ module Google
644
664
  @alloy_db_admin_stub.update_cluster request, options do |result, operation|
645
665
  result = ::Gapic::Operation.new result, @operations_client, options: options
646
666
  yield result, operation if block_given?
647
- return result
667
+ throw :response, result
648
668
  end
649
669
  rescue ::Gapic::Rest::Error => e
650
670
  raise ::Google::Cloud::Error.from_error(e)
@@ -756,7 +776,7 @@ module Google
756
776
  @alloy_db_admin_stub.delete_cluster request, options do |result, operation|
757
777
  result = ::Gapic::Operation.new result, @operations_client, options: options
758
778
  yield result, operation if block_given?
759
- return result
779
+ throw :response, result
760
780
  end
761
781
  rescue ::Gapic::Rest::Error => e
762
782
  raise ::Google::Cloud::Error.from_error(e)
@@ -869,7 +889,7 @@ module Google
869
889
  @alloy_db_admin_stub.promote_cluster request, options do |result, operation|
870
890
  result = ::Gapic::Operation.new result, @operations_client, options: options
871
891
  yield result, operation if block_given?
872
- return result
892
+ throw :response, result
873
893
  end
874
894
  rescue ::Gapic::Rest::Error => e
875
895
  raise ::Google::Cloud::Error.from_error(e)
@@ -977,7 +997,7 @@ module Google
977
997
  @alloy_db_admin_stub.switchover_cluster request, options do |result, operation|
978
998
  result = ::Gapic::Operation.new result, @operations_client, options: options
979
999
  yield result, operation if block_given?
980
- return result
1000
+ throw :response, result
981
1001
  end
982
1002
  rescue ::Gapic::Rest::Error => e
983
1003
  raise ::Google::Cloud::Error.from_error(e)
@@ -1005,9 +1025,13 @@ module Google
1005
1025
  #
1006
1026
  # @param backup_source [::Google::Cloud::AlloyDB::V1::BackupSource, ::Hash]
1007
1027
  # Backup source.
1028
+ #
1029
+ # Note: The following fields are mutually exclusive: `backup_source`, `continuous_backup_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
1008
1030
  # @param continuous_backup_source [::Google::Cloud::AlloyDB::V1::ContinuousBackupSource, ::Hash]
1009
1031
  # ContinuousBackup source. Continuous backup needs to be enabled in the
1010
1032
  # source cluster for this operation to succeed.
1033
+ #
1034
+ # Note: The following fields are mutually exclusive: `continuous_backup_source`, `backup_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
1011
1035
  # @param parent [::String]
1012
1036
  # Required. The name of the parent resource. For the required format, see the
1013
1037
  # comment on the Cluster.name field.
@@ -1094,7 +1118,7 @@ module Google
1094
1118
  @alloy_db_admin_stub.restore_cluster request, options do |result, operation|
1095
1119
  result = ::Gapic::Operation.new result, @operations_client, options: options
1096
1120
  yield result, operation if block_given?
1097
- return result
1121
+ throw :response, result
1098
1122
  end
1099
1123
  rescue ::Gapic::Rest::Error => e
1100
1124
  raise ::Google::Cloud::Error.from_error(e)
@@ -1205,7 +1229,7 @@ module Google
1205
1229
  @alloy_db_admin_stub.create_secondary_cluster request, options do |result, operation|
1206
1230
  result = ::Gapic::Operation.new result, @operations_client, options: options
1207
1231
  yield result, operation if block_given?
1208
- return result
1232
+ throw :response, result
1209
1233
  end
1210
1234
  rescue ::Gapic::Rest::Error => e
1211
1235
  raise ::Google::Cloud::Error.from_error(e)
@@ -1302,7 +1326,6 @@ module Google
1302
1326
 
1303
1327
  @alloy_db_admin_stub.list_instances request, options do |result, operation|
1304
1328
  yield result, operation if block_given?
1305
- return result
1306
1329
  end
1307
1330
  rescue ::Gapic::Rest::Error => e
1308
1331
  raise ::Google::Cloud::Error.from_error(e)
@@ -1384,7 +1407,6 @@ module Google
1384
1407
 
1385
1408
  @alloy_db_admin_stub.get_instance request, options do |result, operation|
1386
1409
  yield result, operation if block_given?
1387
- return result
1388
1410
  end
1389
1411
  rescue ::Gapic::Rest::Error => e
1390
1412
  raise ::Google::Cloud::Error.from_error(e)
@@ -1494,7 +1516,7 @@ module Google
1494
1516
  @alloy_db_admin_stub.create_instance request, options do |result, operation|
1495
1517
  result = ::Gapic::Operation.new result, @operations_client, options: options
1496
1518
  yield result, operation if block_given?
1497
- return result
1519
+ throw :response, result
1498
1520
  end
1499
1521
  rescue ::Gapic::Rest::Error => e
1500
1522
  raise ::Google::Cloud::Error.from_error(e)
@@ -1604,7 +1626,7 @@ module Google
1604
1626
  @alloy_db_admin_stub.create_secondary_instance request, options do |result, operation|
1605
1627
  result = ::Gapic::Operation.new result, @operations_client, options: options
1606
1628
  yield result, operation if block_given?
1607
- return result
1629
+ throw :response, result
1608
1630
  end
1609
1631
  rescue ::Gapic::Rest::Error => e
1610
1632
  raise ::Google::Cloud::Error.from_error(e)
@@ -1716,7 +1738,7 @@ module Google
1716
1738
  @alloy_db_admin_stub.batch_create_instances request, options do |result, operation|
1717
1739
  result = ::Gapic::Operation.new result, @operations_client, options: options
1718
1740
  yield result, operation if block_given?
1719
- return result
1741
+ throw :response, result
1720
1742
  end
1721
1743
  rescue ::Gapic::Rest::Error => e
1722
1744
  raise ::Google::Cloud::Error.from_error(e)
@@ -1830,7 +1852,7 @@ module Google
1830
1852
  @alloy_db_admin_stub.update_instance request, options do |result, operation|
1831
1853
  result = ::Gapic::Operation.new result, @operations_client, options: options
1832
1854
  yield result, operation if block_given?
1833
- return result
1855
+ throw :response, result
1834
1856
  end
1835
1857
  rescue ::Gapic::Rest::Error => e
1836
1858
  raise ::Google::Cloud::Error.from_error(e)
@@ -1940,7 +1962,7 @@ module Google
1940
1962
  @alloy_db_admin_stub.delete_instance request, options do |result, operation|
1941
1963
  result = ::Gapic::Operation.new result, @operations_client, options: options
1942
1964
  yield result, operation if block_given?
1943
- return result
1965
+ throw :response, result
1944
1966
  end
1945
1967
  rescue ::Gapic::Rest::Error => e
1946
1968
  raise ::Google::Cloud::Error.from_error(e)
@@ -2048,7 +2070,7 @@ module Google
2048
2070
  @alloy_db_admin_stub.failover_instance request, options do |result, operation|
2049
2071
  result = ::Gapic::Operation.new result, @operations_client, options: options
2050
2072
  yield result, operation if block_given?
2051
- return result
2073
+ throw :response, result
2052
2074
  end
2053
2075
  rescue ::Gapic::Rest::Error => e
2054
2076
  raise ::Google::Cloud::Error.from_error(e)
@@ -2157,7 +2179,7 @@ module Google
2157
2179
  @alloy_db_admin_stub.inject_fault request, options do |result, operation|
2158
2180
  result = ::Gapic::Operation.new result, @operations_client, options: options
2159
2181
  yield result, operation if block_given?
2160
- return result
2182
+ throw :response, result
2161
2183
  end
2162
2184
  rescue ::Gapic::Rest::Error => e
2163
2185
  raise ::Google::Cloud::Error.from_error(e)
@@ -2267,7 +2289,7 @@ module Google
2267
2289
  @alloy_db_admin_stub.restart_instance request, options do |result, operation|
2268
2290
  result = ::Gapic::Operation.new result, @operations_client, options: options
2269
2291
  yield result, operation if block_given?
2270
- return result
2292
+ throw :response, result
2271
2293
  end
2272
2294
  rescue ::Gapic::Rest::Error => e
2273
2295
  raise ::Google::Cloud::Error.from_error(e)
@@ -2360,7 +2382,6 @@ module Google
2360
2382
 
2361
2383
  @alloy_db_admin_stub.execute_sql request, options do |result, operation|
2362
2384
  yield result, operation if block_given?
2363
- return result
2364
2385
  end
2365
2386
  rescue ::Gapic::Rest::Error => e
2366
2387
  raise ::Google::Cloud::Error.from_error(e)
@@ -2452,7 +2473,6 @@ module Google
2452
2473
 
2453
2474
  @alloy_db_admin_stub.list_backups request, options do |result, operation|
2454
2475
  yield result, operation if block_given?
2455
- return result
2456
2476
  end
2457
2477
  rescue ::Gapic::Rest::Error => e
2458
2478
  raise ::Google::Cloud::Error.from_error(e)
@@ -2531,7 +2551,6 @@ module Google
2531
2551
 
2532
2552
  @alloy_db_admin_stub.get_backup request, options do |result, operation|
2533
2553
  yield result, operation if block_given?
2534
- return result
2535
2554
  end
2536
2555
  rescue ::Gapic::Rest::Error => e
2537
2556
  raise ::Google::Cloud::Error.from_error(e)
@@ -2639,7 +2658,7 @@ module Google
2639
2658
  @alloy_db_admin_stub.create_backup request, options do |result, operation|
2640
2659
  result = ::Gapic::Operation.new result, @operations_client, options: options
2641
2660
  yield result, operation if block_given?
2642
- return result
2661
+ throw :response, result
2643
2662
  end
2644
2663
  rescue ::Gapic::Rest::Error => e
2645
2664
  raise ::Google::Cloud::Error.from_error(e)
@@ -2752,7 +2771,7 @@ module Google
2752
2771
  @alloy_db_admin_stub.update_backup request, options do |result, operation|
2753
2772
  result = ::Gapic::Operation.new result, @operations_client, options: options
2754
2773
  yield result, operation if block_given?
2755
- return result
2774
+ throw :response, result
2756
2775
  end
2757
2776
  rescue ::Gapic::Rest::Error => e
2758
2777
  raise ::Google::Cloud::Error.from_error(e)
@@ -2861,7 +2880,7 @@ module Google
2861
2880
  @alloy_db_admin_stub.delete_backup request, options do |result, operation|
2862
2881
  result = ::Gapic::Operation.new result, @operations_client, options: options
2863
2882
  yield result, operation if block_given?
2864
- return result
2883
+ throw :response, result
2865
2884
  end
2866
2885
  rescue ::Gapic::Rest::Error => e
2867
2886
  raise ::Google::Cloud::Error.from_error(e)
@@ -2956,7 +2975,7 @@ module Google
2956
2975
  @alloy_db_admin_stub.list_supported_database_flags request, options do |result, operation|
2957
2976
  result = ::Gapic::Rest::PagedEnumerable.new @alloy_db_admin_stub, :list_supported_database_flags, "supported_database_flags", request, result, options
2958
2977
  yield result, operation if block_given?
2959
- return result
2978
+ throw :response, result
2960
2979
  end
2961
2980
  rescue ::Gapic::Rest::Error => e
2962
2981
  raise ::Google::Cloud::Error.from_error(e)
@@ -3066,7 +3085,6 @@ module Google
3066
3085
 
3067
3086
  @alloy_db_admin_stub.generate_client_certificate request, options do |result, operation|
3068
3087
  yield result, operation if block_given?
3069
- return result
3070
3088
  end
3071
3089
  rescue ::Gapic::Rest::Error => e
3072
3090
  raise ::Google::Cloud::Error.from_error(e)
@@ -3160,7 +3178,6 @@ module Google
3160
3178
 
3161
3179
  @alloy_db_admin_stub.get_connection_info request, options do |result, operation|
3162
3180
  yield result, operation if block_given?
3163
- return result
3164
3181
  end
3165
3182
  rescue ::Gapic::Rest::Error => e
3166
3183
  raise ::Google::Cloud::Error.from_error(e)
@@ -3252,7 +3269,6 @@ module Google
3252
3269
 
3253
3270
  @alloy_db_admin_stub.list_users request, options do |result, operation|
3254
3271
  yield result, operation if block_given?
3255
- return result
3256
3272
  end
3257
3273
  rescue ::Gapic::Rest::Error => e
3258
3274
  raise ::Google::Cloud::Error.from_error(e)
@@ -3332,7 +3348,6 @@ module Google
3332
3348
 
3333
3349
  @alloy_db_admin_stub.get_user request, options do |result, operation|
3334
3350
  yield result, operation if block_given?
3335
- return result
3336
3351
  end
3337
3352
  rescue ::Gapic::Rest::Error => e
3338
3353
  raise ::Google::Cloud::Error.from_error(e)
@@ -3432,7 +3447,6 @@ module Google
3432
3447
 
3433
3448
  @alloy_db_admin_stub.create_user request, options do |result, operation|
3434
3449
  yield result, operation if block_given?
3435
- return result
3436
3450
  end
3437
3451
  rescue ::Gapic::Rest::Error => e
3438
3452
  raise ::Google::Cloud::Error.from_error(e)
@@ -3536,7 +3550,6 @@ module Google
3536
3550
 
3537
3551
  @alloy_db_admin_stub.update_user request, options do |result, operation|
3538
3552
  yield result, operation if block_given?
3539
- return result
3540
3553
  end
3541
3554
  rescue ::Gapic::Rest::Error => e
3542
3555
  raise ::Google::Cloud::Error.from_error(e)
@@ -3633,7 +3646,6 @@ module Google
3633
3646
 
3634
3647
  @alloy_db_admin_stub.delete_user request, options do |result, operation|
3635
3648
  yield result, operation if block_given?
3636
- return result
3637
3649
  end
3638
3650
  rescue ::Gapic::Rest::Error => e
3639
3651
  raise ::Google::Cloud::Error.from_error(e)
@@ -3729,7 +3741,7 @@ module Google
3729
3741
  @alloy_db_admin_stub.list_databases request, options do |result, operation|
3730
3742
  result = ::Gapic::Rest::PagedEnumerable.new @alloy_db_admin_stub, :list_databases, "databases", request, result, options
3731
3743
  yield result, operation if block_given?
3732
- return result
3744
+ throw :response, result
3733
3745
  end
3734
3746
  rescue ::Gapic::Rest::Error => e
3735
3747
  raise ::Google::Cloud::Error.from_error(e)
@@ -3777,6 +3789,13 @@ module Google
3777
3789
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
3778
3790
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
3779
3791
  # * (`nil`) indicating no credentials
3792
+ #
3793
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
3794
+ # external source for authentication to Google Cloud, you must validate it before
3795
+ # providing it to a Google API client library. Providing an unvalidated credential
3796
+ # configuration to Google APIs can compromise the security of your systems and data.
3797
+ # For more information, refer to [Validate credential configurations from external
3798
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
3780
3799
  # @return [::Object]
3781
3800
  # @!attribute [rw] scope
3782
3801
  # The OAuth scopes
@@ -3809,6 +3828,11 @@ module Google
3809
3828
  # default endpoint URL. The default value of nil uses the environment
3810
3829
  # universe (usually the default "googleapis.com" universe).
3811
3830
  # @return [::String,nil]
3831
+ # @!attribute [rw] logger
3832
+ # A custom logger to use for request/response debug logging, or the value
3833
+ # `:default` (the default) to construct a default logger, or `nil` to
3834
+ # explicitly disable logging.
3835
+ # @return [::Logger,:default,nil]
3812
3836
  #
3813
3837
  class Configuration
3814
3838
  extend ::Gapic::Config
@@ -3837,6 +3861,7 @@ module Google
3837
3861
  # by the host service.
3838
3862
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
3839
3863
  config_attr :bindings_override, {}, ::Hash, nil
3864
+ config_attr :logger, :default, ::Logger, nil, :default
3840
3865
 
3841
3866
  # @private
3842
3867
  def initialize parent_config = nil
@@ -115,14 +115,6 @@ module Google
115
115
  # Lists operations that match the specified filter in the request. If the
116
116
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
117
117
  #
118
- # NOTE: the `name` binding allows API services to override the binding
119
- # to use different resource name schemes, such as `users/*/operations`. To
120
- # override the binding, API services can add a binding such as
121
- # `"/v1/{name=users/*}/operations"` to their service configuration.
122
- # For backwards compatibility, the default name includes the operations
123
- # collection id, however overriding users must ensure the name binding
124
- # is the parent resource, without the operations collection id.
125
- #
126
118
  # @overload list_operations(request, options = nil)
127
119
  # Pass arguments to `list_operations` via a request object, either of type
128
120
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -204,7 +196,7 @@ module Google
204
196
  @operations_stub.list_operations request, options do |result, operation|
205
197
  result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
206
198
  yield result, operation if block_given?
207
- return result
199
+ throw :response, result
208
200
  end
209
201
  rescue ::Gapic::Rest::Error => e
210
202
  raise ::Google::Cloud::Error.from_error(e)
@@ -293,7 +285,7 @@ module Google
293
285
  @operations_stub.get_operation request, options do |result, operation|
294
286
  result = ::Gapic::Operation.new result, @operations_client, options: options
295
287
  yield result, operation if block_given?
296
- return result
288
+ throw :response, result
297
289
  end
298
290
  rescue ::Gapic::Rest::Error => e
299
291
  raise ::Google::Cloud::Error.from_error(e)
@@ -375,7 +367,6 @@ module Google
375
367
 
376
368
  @operations_stub.delete_operation request, options do |result, operation|
377
369
  yield result, operation if block_given?
378
- return result
379
370
  end
380
371
  rescue ::Gapic::Rest::Error => e
381
372
  raise ::Google::Cloud::Error.from_error(e)
@@ -390,8 +381,9 @@ module Google
390
381
  # other methods to check whether the cancellation succeeded or whether the
391
382
  # operation completed despite cancellation. On successful cancellation,
392
383
  # the operation is not deleted; instead, it becomes an operation with
393
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
394
- # corresponding to `Code.CANCELLED`.
384
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
385
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
386
+ # `Code.CANCELLED`.
395
387
  #
396
388
  # @overload cancel_operation(request, options = nil)
397
389
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -463,7 +455,6 @@ module Google
463
455
 
464
456
  @operations_stub.cancel_operation request, options do |result, operation|
465
457
  yield result, operation if block_given?
466
- return result
467
458
  end
468
459
  rescue ::Gapic::Rest::Error => e
469
460
  raise ::Google::Cloud::Error.from_error(e)
@@ -511,6 +502,13 @@ module Google
511
502
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
512
503
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
513
504
  # * (`nil`) indicating no credentials
505
+ #
506
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
507
+ # external source for authentication to Google Cloud, you must validate it before
508
+ # providing it to a Google API client library. Providing an unvalidated credential
509
+ # configuration to Google APIs can compromise the security of your systems and data.
510
+ # For more information, refer to [Validate credential configurations from external
511
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
514
512
  # @return [::Object]
515
513
  # @!attribute [rw] scope
516
514
  # The OAuth scopes
@@ -543,6 +541,11 @@ module Google
543
541
  # default endpoint URL. The default value of nil uses the environment
544
542
  # universe (usually the default "googleapis.com" universe).
545
543
  # @return [::String,nil]
544
+ # @!attribute [rw] logger
545
+ # A custom logger to use for request/response debug logging, or the value
546
+ # `:default` (the default) to construct a default logger, or `nil` to
547
+ # explicitly disable logging.
548
+ # @return [::Logger,:default,nil]
546
549
  #
547
550
  class Configuration
548
551
  extend ::Gapic::Config
@@ -564,6 +567,7 @@ module Google
564
567
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
565
568
  config_attr :quota_project, nil, ::String, nil
566
569
  config_attr :universe_domain, nil, ::String, nil
570
+ config_attr :logger, :default, ::Logger, nil, :default
567
571
 
568
572
  # @private
569
573
  def initialize parent_config = nil
@@ -683,16 +687,18 @@ module Google
683
687
 
684
688
  response = @client_stub.make_http_request(
685
689
  verb,
686
- uri: uri,
687
- body: body || "",
688
- params: query_string_params,
690
+ uri: uri,
691
+ body: body || "",
692
+ params: query_string_params,
693
+ method_name: "list_operations",
689
694
  options: options
690
695
  )
691
696
  operation = ::Gapic::Rest::TransportOperation.new response
692
697
  result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
693
-
694
- yield result, operation if block_given?
695
- result
698
+ catch :response do
699
+ yield result, operation if block_given?
700
+ result
701
+ end
696
702
  end
697
703
 
698
704
  ##
@@ -721,16 +727,18 @@ module Google
721
727
 
722
728
  response = @client_stub.make_http_request(
723
729
  verb,
724
- uri: uri,
725
- body: body || "",
726
- params: query_string_params,
730
+ uri: uri,
731
+ body: body || "",
732
+ params: query_string_params,
733
+ method_name: "get_operation",
727
734
  options: options
728
735
  )
729
736
  operation = ::Gapic::Rest::TransportOperation.new response
730
737
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
731
-
732
- yield result, operation if block_given?
733
- result
738
+ catch :response do
739
+ yield result, operation if block_given?
740
+ result
741
+ end
734
742
  end
735
743
 
736
744
  ##
@@ -759,16 +767,18 @@ module Google
759
767
 
760
768
  response = @client_stub.make_http_request(
761
769
  verb,
762
- uri: uri,
763
- body: body || "",
764
- params: query_string_params,
770
+ uri: uri,
771
+ body: body || "",
772
+ params: query_string_params,
773
+ method_name: "delete_operation",
765
774
  options: options
766
775
  )
767
776
  operation = ::Gapic::Rest::TransportOperation.new response
768
777
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
769
-
770
- yield result, operation if block_given?
771
- result
778
+ catch :response do
779
+ yield result, operation if block_given?
780
+ result
781
+ end
772
782
  end
773
783
 
774
784
  ##
@@ -797,16 +807,18 @@ module Google
797
807
 
798
808
  response = @client_stub.make_http_request(
799
809
  verb,
800
- uri: uri,
801
- body: body || "",
802
- params: query_string_params,
810
+ uri: uri,
811
+ body: body || "",
812
+ params: query_string_params,
813
+ method_name: "cancel_operation",
803
814
  options: options
804
815
  )
805
816
  operation = ::Gapic::Rest::TransportOperation.new response
806
817
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
807
-
808
- yield result, operation if block_given?
809
- result
818
+ catch :response do
819
+ yield result, operation if block_given?
820
+ result
821
+ end
810
822
  end
811
823
 
812
824
  ##