google-cloud-alloy_db-v1beta 0.10.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -221,15 +221,27 @@ module Google
221
221
  endpoint: @config.endpoint,
222
222
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
223
223
  universe_domain: @config.universe_domain,
224
- credentials: credentials
224
+ credentials: credentials,
225
+ logger: @config.logger
225
226
  )
226
227
 
228
+ @alloy_db_admin_stub.logger(stub: true)&.info do |entry|
229
+ entry.set_system_name
230
+ entry.set_service
231
+ entry.message = "Created client for #{entry.service}"
232
+ entry.set_credentials_fields credentials
233
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
234
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
235
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
236
+ end
237
+
227
238
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
228
239
  config.credentials = credentials
229
240
  config.quota_project = @quota_project_id
230
241
  config.endpoint = @alloy_db_admin_stub.endpoint
231
242
  config.universe_domain = @alloy_db_admin_stub.universe_domain
232
243
  config.bindings_override = @config.bindings_override
244
+ config.logger = @alloy_db_admin_stub.logger if config.respond_to? :logger=
233
245
  end
234
246
 
235
247
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
@@ -237,6 +249,7 @@ module Google
237
249
  config.quota_project = @quota_project_id
238
250
  config.endpoint = @alloy_db_admin_stub.endpoint
239
251
  config.universe_domain = @alloy_db_admin_stub.universe_domain
252
+ config.logger = @alloy_db_admin_stub.logger if config.respond_to? :logger=
240
253
  end
241
254
  end
242
255
 
@@ -261,6 +274,15 @@ module Google
261
274
  #
262
275
  attr_reader :iam_policy_client
263
276
 
277
+ ##
278
+ # The logger used for request/response debug logging.
279
+ #
280
+ # @return [Logger]
281
+ #
282
+ def logger
283
+ @alloy_db_admin_stub.logger
284
+ end
285
+
264
286
  # Service calls
265
287
 
266
288
  ##
@@ -352,7 +374,6 @@ module Google
352
374
 
353
375
  @alloy_db_admin_stub.list_clusters request, options do |result, operation|
354
376
  yield result, operation if block_given?
355
- return result
356
377
  end
357
378
  rescue ::Gapic::Rest::Error => e
358
379
  raise ::Google::Cloud::Error.from_error(e)
@@ -435,7 +456,6 @@ module Google
435
456
 
436
457
  @alloy_db_admin_stub.get_cluster request, options do |result, operation|
437
458
  yield result, operation if block_given?
438
- return result
439
459
  end
440
460
  rescue ::Gapic::Rest::Error => e
441
461
  raise ::Google::Cloud::Error.from_error(e)
@@ -545,7 +565,7 @@ module Google
545
565
  @alloy_db_admin_stub.create_cluster request, options do |result, operation|
546
566
  result = ::Gapic::Operation.new result, @operations_client, options: options
547
567
  yield result, operation if block_given?
548
- return result
568
+ throw :response, result
549
569
  end
550
570
  rescue ::Gapic::Rest::Error => e
551
571
  raise ::Google::Cloud::Error.from_error(e)
@@ -659,7 +679,7 @@ module Google
659
679
  @alloy_db_admin_stub.update_cluster request, options do |result, operation|
660
680
  result = ::Gapic::Operation.new result, @operations_client, options: options
661
681
  yield result, operation if block_given?
662
- return result
682
+ throw :response, result
663
683
  end
664
684
  rescue ::Gapic::Rest::Error => e
665
685
  raise ::Google::Cloud::Error.from_error(e)
@@ -771,7 +791,7 @@ module Google
771
791
  @alloy_db_admin_stub.upgrade_cluster request, options do |result, operation|
772
792
  result = ::Gapic::Operation.new result, @operations_client, options: options
773
793
  yield result, operation if block_given?
774
- return result
794
+ throw :response, result
775
795
  end
776
796
  rescue ::Gapic::Rest::Error => e
777
797
  raise ::Google::Cloud::Error.from_error(e)
@@ -883,7 +903,7 @@ module Google
883
903
  @alloy_db_admin_stub.delete_cluster request, options do |result, operation|
884
904
  result = ::Gapic::Operation.new result, @operations_client, options: options
885
905
  yield result, operation if block_given?
886
- return result
906
+ throw :response, result
887
907
  end
888
908
  rescue ::Gapic::Rest::Error => e
889
909
  raise ::Google::Cloud::Error.from_error(e)
@@ -996,7 +1016,7 @@ module Google
996
1016
  @alloy_db_admin_stub.promote_cluster request, options do |result, operation|
997
1017
  result = ::Gapic::Operation.new result, @operations_client, options: options
998
1018
  yield result, operation if block_given?
999
- return result
1019
+ throw :response, result
1000
1020
  end
1001
1021
  rescue ::Gapic::Rest::Error => e
1002
1022
  raise ::Google::Cloud::Error.from_error(e)
@@ -1104,7 +1124,7 @@ module Google
1104
1124
  @alloy_db_admin_stub.switchover_cluster request, options do |result, operation|
1105
1125
  result = ::Gapic::Operation.new result, @operations_client, options: options
1106
1126
  yield result, operation if block_given?
1107
- return result
1127
+ throw :response, result
1108
1128
  end
1109
1129
  rescue ::Gapic::Rest::Error => e
1110
1130
  raise ::Google::Cloud::Error.from_error(e)
@@ -1132,9 +1152,13 @@ module Google
1132
1152
  #
1133
1153
  # @param backup_source [::Google::Cloud::AlloyDB::V1beta::BackupSource, ::Hash]
1134
1154
  # Backup source.
1155
+ #
1156
+ # 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.
1135
1157
  # @param continuous_backup_source [::Google::Cloud::AlloyDB::V1beta::ContinuousBackupSource, ::Hash]
1136
1158
  # ContinuousBackup source. Continuous backup needs to be enabled in the
1137
1159
  # source cluster for this operation to succeed.
1160
+ #
1161
+ # 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.
1138
1162
  # @param parent [::String]
1139
1163
  # Required. The name of the parent resource. For the required format, see the
1140
1164
  # comment on the Cluster.name field.
@@ -1221,7 +1245,7 @@ module Google
1221
1245
  @alloy_db_admin_stub.restore_cluster request, options do |result, operation|
1222
1246
  result = ::Gapic::Operation.new result, @operations_client, options: options
1223
1247
  yield result, operation if block_given?
1224
- return result
1248
+ throw :response, result
1225
1249
  end
1226
1250
  rescue ::Gapic::Rest::Error => e
1227
1251
  raise ::Google::Cloud::Error.from_error(e)
@@ -1332,7 +1356,7 @@ module Google
1332
1356
  @alloy_db_admin_stub.create_secondary_cluster request, options do |result, operation|
1333
1357
  result = ::Gapic::Operation.new result, @operations_client, options: options
1334
1358
  yield result, operation if block_given?
1335
- return result
1359
+ throw :response, result
1336
1360
  end
1337
1361
  rescue ::Gapic::Rest::Error => e
1338
1362
  raise ::Google::Cloud::Error.from_error(e)
@@ -1429,7 +1453,6 @@ module Google
1429
1453
 
1430
1454
  @alloy_db_admin_stub.list_instances request, options do |result, operation|
1431
1455
  yield result, operation if block_given?
1432
- return result
1433
1456
  end
1434
1457
  rescue ::Gapic::Rest::Error => e
1435
1458
  raise ::Google::Cloud::Error.from_error(e)
@@ -1511,7 +1534,6 @@ module Google
1511
1534
 
1512
1535
  @alloy_db_admin_stub.get_instance request, options do |result, operation|
1513
1536
  yield result, operation if block_given?
1514
- return result
1515
1537
  end
1516
1538
  rescue ::Gapic::Rest::Error => e
1517
1539
  raise ::Google::Cloud::Error.from_error(e)
@@ -1621,7 +1643,7 @@ module Google
1621
1643
  @alloy_db_admin_stub.create_instance request, options do |result, operation|
1622
1644
  result = ::Gapic::Operation.new result, @operations_client, options: options
1623
1645
  yield result, operation if block_given?
1624
- return result
1646
+ throw :response, result
1625
1647
  end
1626
1648
  rescue ::Gapic::Rest::Error => e
1627
1649
  raise ::Google::Cloud::Error.from_error(e)
@@ -1731,7 +1753,7 @@ module Google
1731
1753
  @alloy_db_admin_stub.create_secondary_instance request, options do |result, operation|
1732
1754
  result = ::Gapic::Operation.new result, @operations_client, options: options
1733
1755
  yield result, operation if block_given?
1734
- return result
1756
+ throw :response, result
1735
1757
  end
1736
1758
  rescue ::Gapic::Rest::Error => e
1737
1759
  raise ::Google::Cloud::Error.from_error(e)
@@ -1843,7 +1865,7 @@ module Google
1843
1865
  @alloy_db_admin_stub.batch_create_instances request, options do |result, operation|
1844
1866
  result = ::Gapic::Operation.new result, @operations_client, options: options
1845
1867
  yield result, operation if block_given?
1846
- return result
1868
+ throw :response, result
1847
1869
  end
1848
1870
  rescue ::Gapic::Rest::Error => e
1849
1871
  raise ::Google::Cloud::Error.from_error(e)
@@ -1957,7 +1979,7 @@ module Google
1957
1979
  @alloy_db_admin_stub.update_instance request, options do |result, operation|
1958
1980
  result = ::Gapic::Operation.new result, @operations_client, options: options
1959
1981
  yield result, operation if block_given?
1960
- return result
1982
+ throw :response, result
1961
1983
  end
1962
1984
  rescue ::Gapic::Rest::Error => e
1963
1985
  raise ::Google::Cloud::Error.from_error(e)
@@ -2067,7 +2089,7 @@ module Google
2067
2089
  @alloy_db_admin_stub.delete_instance request, options do |result, operation|
2068
2090
  result = ::Gapic::Operation.new result, @operations_client, options: options
2069
2091
  yield result, operation if block_given?
2070
- return result
2092
+ throw :response, result
2071
2093
  end
2072
2094
  rescue ::Gapic::Rest::Error => e
2073
2095
  raise ::Google::Cloud::Error.from_error(e)
@@ -2175,7 +2197,7 @@ module Google
2175
2197
  @alloy_db_admin_stub.failover_instance request, options do |result, operation|
2176
2198
  result = ::Gapic::Operation.new result, @operations_client, options: options
2177
2199
  yield result, operation if block_given?
2178
- return result
2200
+ throw :response, result
2179
2201
  end
2180
2202
  rescue ::Gapic::Rest::Error => e
2181
2203
  raise ::Google::Cloud::Error.from_error(e)
@@ -2284,7 +2306,7 @@ module Google
2284
2306
  @alloy_db_admin_stub.inject_fault request, options do |result, operation|
2285
2307
  result = ::Gapic::Operation.new result, @operations_client, options: options
2286
2308
  yield result, operation if block_given?
2287
- return result
2309
+ throw :response, result
2288
2310
  end
2289
2311
  rescue ::Gapic::Rest::Error => e
2290
2312
  raise ::Google::Cloud::Error.from_error(e)
@@ -2394,7 +2416,7 @@ module Google
2394
2416
  @alloy_db_admin_stub.restart_instance request, options do |result, operation|
2395
2417
  result = ::Gapic::Operation.new result, @operations_client, options: options
2396
2418
  yield result, operation if block_given?
2397
- return result
2419
+ throw :response, result
2398
2420
  end
2399
2421
  rescue ::Gapic::Rest::Error => e
2400
2422
  raise ::Google::Cloud::Error.from_error(e)
@@ -2487,7 +2509,6 @@ module Google
2487
2509
 
2488
2510
  @alloy_db_admin_stub.execute_sql request, options do |result, operation|
2489
2511
  yield result, operation if block_given?
2490
- return result
2491
2512
  end
2492
2513
  rescue ::Gapic::Rest::Error => e
2493
2514
  raise ::Google::Cloud::Error.from_error(e)
@@ -2579,7 +2600,6 @@ module Google
2579
2600
 
2580
2601
  @alloy_db_admin_stub.list_backups request, options do |result, operation|
2581
2602
  yield result, operation if block_given?
2582
- return result
2583
2603
  end
2584
2604
  rescue ::Gapic::Rest::Error => e
2585
2605
  raise ::Google::Cloud::Error.from_error(e)
@@ -2658,7 +2678,6 @@ module Google
2658
2678
 
2659
2679
  @alloy_db_admin_stub.get_backup request, options do |result, operation|
2660
2680
  yield result, operation if block_given?
2661
- return result
2662
2681
  end
2663
2682
  rescue ::Gapic::Rest::Error => e
2664
2683
  raise ::Google::Cloud::Error.from_error(e)
@@ -2766,7 +2785,7 @@ module Google
2766
2785
  @alloy_db_admin_stub.create_backup request, options do |result, operation|
2767
2786
  result = ::Gapic::Operation.new result, @operations_client, options: options
2768
2787
  yield result, operation if block_given?
2769
- return result
2788
+ throw :response, result
2770
2789
  end
2771
2790
  rescue ::Gapic::Rest::Error => e
2772
2791
  raise ::Google::Cloud::Error.from_error(e)
@@ -2879,7 +2898,7 @@ module Google
2879
2898
  @alloy_db_admin_stub.update_backup request, options do |result, operation|
2880
2899
  result = ::Gapic::Operation.new result, @operations_client, options: options
2881
2900
  yield result, operation if block_given?
2882
- return result
2901
+ throw :response, result
2883
2902
  end
2884
2903
  rescue ::Gapic::Rest::Error => e
2885
2904
  raise ::Google::Cloud::Error.from_error(e)
@@ -2988,7 +3007,7 @@ module Google
2988
3007
  @alloy_db_admin_stub.delete_backup request, options do |result, operation|
2989
3008
  result = ::Gapic::Operation.new result, @operations_client, options: options
2990
3009
  yield result, operation if block_given?
2991
- return result
3010
+ throw :response, result
2992
3011
  end
2993
3012
  rescue ::Gapic::Rest::Error => e
2994
3013
  raise ::Google::Cloud::Error.from_error(e)
@@ -3083,7 +3102,7 @@ module Google
3083
3102
  @alloy_db_admin_stub.list_supported_database_flags request, options do |result, operation|
3084
3103
  result = ::Gapic::Rest::PagedEnumerable.new @alloy_db_admin_stub, :list_supported_database_flags, "supported_database_flags", request, result, options
3085
3104
  yield result, operation if block_given?
3086
- return result
3105
+ throw :response, result
3087
3106
  end
3088
3107
  rescue ::Gapic::Rest::Error => e
3089
3108
  raise ::Google::Cloud::Error.from_error(e)
@@ -3196,7 +3215,6 @@ module Google
3196
3215
 
3197
3216
  @alloy_db_admin_stub.generate_client_certificate request, options do |result, operation|
3198
3217
  yield result, operation if block_given?
3199
- return result
3200
3218
  end
3201
3219
  rescue ::Gapic::Rest::Error => e
3202
3220
  raise ::Google::Cloud::Error.from_error(e)
@@ -3290,7 +3308,6 @@ module Google
3290
3308
 
3291
3309
  @alloy_db_admin_stub.get_connection_info request, options do |result, operation|
3292
3310
  yield result, operation if block_given?
3293
- return result
3294
3311
  end
3295
3312
  rescue ::Gapic::Rest::Error => e
3296
3313
  raise ::Google::Cloud::Error.from_error(e)
@@ -3382,7 +3399,6 @@ module Google
3382
3399
 
3383
3400
  @alloy_db_admin_stub.list_users request, options do |result, operation|
3384
3401
  yield result, operation if block_given?
3385
- return result
3386
3402
  end
3387
3403
  rescue ::Gapic::Rest::Error => e
3388
3404
  raise ::Google::Cloud::Error.from_error(e)
@@ -3462,7 +3478,6 @@ module Google
3462
3478
 
3463
3479
  @alloy_db_admin_stub.get_user request, options do |result, operation|
3464
3480
  yield result, operation if block_given?
3465
- return result
3466
3481
  end
3467
3482
  rescue ::Gapic::Rest::Error => e
3468
3483
  raise ::Google::Cloud::Error.from_error(e)
@@ -3562,7 +3577,6 @@ module Google
3562
3577
 
3563
3578
  @alloy_db_admin_stub.create_user request, options do |result, operation|
3564
3579
  yield result, operation if block_given?
3565
- return result
3566
3580
  end
3567
3581
  rescue ::Gapic::Rest::Error => e
3568
3582
  raise ::Google::Cloud::Error.from_error(e)
@@ -3666,7 +3680,6 @@ module Google
3666
3680
 
3667
3681
  @alloy_db_admin_stub.update_user request, options do |result, operation|
3668
3682
  yield result, operation if block_given?
3669
- return result
3670
3683
  end
3671
3684
  rescue ::Gapic::Rest::Error => e
3672
3685
  raise ::Google::Cloud::Error.from_error(e)
@@ -3763,7 +3776,6 @@ module Google
3763
3776
 
3764
3777
  @alloy_db_admin_stub.delete_user request, options do |result, operation|
3765
3778
  yield result, operation if block_given?
3766
- return result
3767
3779
  end
3768
3780
  rescue ::Gapic::Rest::Error => e
3769
3781
  raise ::Google::Cloud::Error.from_error(e)
@@ -3859,7 +3871,7 @@ module Google
3859
3871
  @alloy_db_admin_stub.list_databases request, options do |result, operation|
3860
3872
  result = ::Gapic::Rest::PagedEnumerable.new @alloy_db_admin_stub, :list_databases, "databases", request, result, options
3861
3873
  yield result, operation if block_given?
3862
- return result
3874
+ throw :response, result
3863
3875
  end
3864
3876
  rescue ::Gapic::Rest::Error => e
3865
3877
  raise ::Google::Cloud::Error.from_error(e)
@@ -3907,6 +3919,13 @@ module Google
3907
3919
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
3908
3920
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
3909
3921
  # * (`nil`) indicating no credentials
3922
+ #
3923
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
3924
+ # external source for authentication to Google Cloud, you must validate it before
3925
+ # providing it to a Google API client library. Providing an unvalidated credential
3926
+ # configuration to Google APIs can compromise the security of your systems and data.
3927
+ # For more information, refer to [Validate credential configurations from external
3928
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
3910
3929
  # @return [::Object]
3911
3930
  # @!attribute [rw] scope
3912
3931
  # The OAuth scopes
@@ -3939,6 +3958,11 @@ module Google
3939
3958
  # default endpoint URL. The default value of nil uses the environment
3940
3959
  # universe (usually the default "googleapis.com" universe).
3941
3960
  # @return [::String,nil]
3961
+ # @!attribute [rw] logger
3962
+ # A custom logger to use for request/response debug logging, or the value
3963
+ # `:default` (the default) to construct a default logger, or `nil` to
3964
+ # explicitly disable logging.
3965
+ # @return [::Logger,:default,nil]
3942
3966
  #
3943
3967
  class Configuration
3944
3968
  extend ::Gapic::Config
@@ -3967,6 +3991,7 @@ module Google
3967
3991
  # by the host service.
3968
3992
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
3969
3993
  config_attr :bindings_override, {}, ::Hash, nil
3994
+ config_attr :logger, :default, ::Logger, nil, :default
3970
3995
 
3971
3996
  # @private
3972
3997
  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
  ##