google-cloud-alloy_db-v1alpha 0.8.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -216,15 +216,27 @@ module Google
216
216
  endpoint: @config.endpoint,
217
217
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
218
218
  universe_domain: @config.universe_domain,
219
- credentials: credentials
219
+ credentials: credentials,
220
+ logger: @config.logger
220
221
  )
221
222
 
223
+ @alloy_db_admin_stub.logger(stub: true)&.info do |entry|
224
+ entry.set_system_name
225
+ entry.set_service
226
+ entry.message = "Created client for #{entry.service}"
227
+ entry.set_credentials_fields credentials
228
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
229
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
230
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
231
+ end
232
+
222
233
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
223
234
  config.credentials = credentials
224
235
  config.quota_project = @quota_project_id
225
236
  config.endpoint = @alloy_db_admin_stub.endpoint
226
237
  config.universe_domain = @alloy_db_admin_stub.universe_domain
227
238
  config.bindings_override = @config.bindings_override
239
+ config.logger = @alloy_db_admin_stub.logger if config.respond_to? :logger=
228
240
  end
229
241
 
230
242
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
@@ -232,6 +244,7 @@ module Google
232
244
  config.quota_project = @quota_project_id
233
245
  config.endpoint = @alloy_db_admin_stub.endpoint
234
246
  config.universe_domain = @alloy_db_admin_stub.universe_domain
247
+ config.logger = @alloy_db_admin_stub.logger if config.respond_to? :logger=
235
248
  end
236
249
  end
237
250
 
@@ -256,6 +269,15 @@ module Google
256
269
  #
257
270
  attr_reader :iam_policy_client
258
271
 
272
+ ##
273
+ # The logger used for request/response debug logging.
274
+ #
275
+ # @return [Logger]
276
+ #
277
+ def logger
278
+ @alloy_db_admin_stub.logger
279
+ end
280
+
259
281
  # Service calls
260
282
 
261
283
  ##
@@ -347,7 +369,6 @@ module Google
347
369
 
348
370
  @alloy_db_admin_stub.list_clusters request, options do |result, operation|
349
371
  yield result, operation if block_given?
350
- return result
351
372
  end
352
373
  rescue ::Gapic::Rest::Error => e
353
374
  raise ::Google::Cloud::Error.from_error(e)
@@ -430,7 +451,6 @@ module Google
430
451
 
431
452
  @alloy_db_admin_stub.get_cluster request, options do |result, operation|
432
453
  yield result, operation if block_given?
433
- return result
434
454
  end
435
455
  rescue ::Gapic::Rest::Error => e
436
456
  raise ::Google::Cloud::Error.from_error(e)
@@ -540,7 +560,7 @@ module Google
540
560
  @alloy_db_admin_stub.create_cluster request, options do |result, operation|
541
561
  result = ::Gapic::Operation.new result, @operations_client, options: options
542
562
  yield result, operation if block_given?
543
- return result
563
+ throw :response, result
544
564
  end
545
565
  rescue ::Gapic::Rest::Error => e
546
566
  raise ::Google::Cloud::Error.from_error(e)
@@ -654,7 +674,7 @@ module Google
654
674
  @alloy_db_admin_stub.update_cluster request, options do |result, operation|
655
675
  result = ::Gapic::Operation.new result, @operations_client, options: options
656
676
  yield result, operation if block_given?
657
- return result
677
+ throw :response, result
658
678
  end
659
679
  rescue ::Gapic::Rest::Error => e
660
680
  raise ::Google::Cloud::Error.from_error(e)
@@ -766,7 +786,7 @@ module Google
766
786
  @alloy_db_admin_stub.upgrade_cluster request, options do |result, operation|
767
787
  result = ::Gapic::Operation.new result, @operations_client, options: options
768
788
  yield result, operation if block_given?
769
- return result
789
+ throw :response, result
770
790
  end
771
791
  rescue ::Gapic::Rest::Error => e
772
792
  raise ::Google::Cloud::Error.from_error(e)
@@ -878,7 +898,7 @@ module Google
878
898
  @alloy_db_admin_stub.delete_cluster request, options do |result, operation|
879
899
  result = ::Gapic::Operation.new result, @operations_client, options: options
880
900
  yield result, operation if block_given?
881
- return result
901
+ throw :response, result
882
902
  end
883
903
  rescue ::Gapic::Rest::Error => e
884
904
  raise ::Google::Cloud::Error.from_error(e)
@@ -991,7 +1011,7 @@ module Google
991
1011
  @alloy_db_admin_stub.promote_cluster request, options do |result, operation|
992
1012
  result = ::Gapic::Operation.new result, @operations_client, options: options
993
1013
  yield result, operation if block_given?
994
- return result
1014
+ throw :response, result
995
1015
  end
996
1016
  rescue ::Gapic::Rest::Error => e
997
1017
  raise ::Google::Cloud::Error.from_error(e)
@@ -1099,7 +1119,7 @@ module Google
1099
1119
  @alloy_db_admin_stub.switchover_cluster request, options do |result, operation|
1100
1120
  result = ::Gapic::Operation.new result, @operations_client, options: options
1101
1121
  yield result, operation if block_given?
1102
- return result
1122
+ throw :response, result
1103
1123
  end
1104
1124
  rescue ::Gapic::Rest::Error => e
1105
1125
  raise ::Google::Cloud::Error.from_error(e)
@@ -1127,9 +1147,13 @@ module Google
1127
1147
  #
1128
1148
  # @param backup_source [::Google::Cloud::AlloyDB::V1alpha::BackupSource, ::Hash]
1129
1149
  # Backup source.
1150
+ #
1151
+ # 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.
1130
1152
  # @param continuous_backup_source [::Google::Cloud::AlloyDB::V1alpha::ContinuousBackupSource, ::Hash]
1131
1153
  # ContinuousBackup source. Continuous backup needs to be enabled in the
1132
1154
  # source cluster for this operation to succeed.
1155
+ #
1156
+ # 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.
1133
1157
  # @param parent [::String]
1134
1158
  # Required. The name of the parent resource. For the required format, see the
1135
1159
  # comment on the Cluster.name field.
@@ -1216,7 +1240,7 @@ module Google
1216
1240
  @alloy_db_admin_stub.restore_cluster request, options do |result, operation|
1217
1241
  result = ::Gapic::Operation.new result, @operations_client, options: options
1218
1242
  yield result, operation if block_given?
1219
- return result
1243
+ throw :response, result
1220
1244
  end
1221
1245
  rescue ::Gapic::Rest::Error => e
1222
1246
  raise ::Google::Cloud::Error.from_error(e)
@@ -1327,7 +1351,7 @@ module Google
1327
1351
  @alloy_db_admin_stub.create_secondary_cluster request, options do |result, operation|
1328
1352
  result = ::Gapic::Operation.new result, @operations_client, options: options
1329
1353
  yield result, operation if block_given?
1330
- return result
1354
+ throw :response, result
1331
1355
  end
1332
1356
  rescue ::Gapic::Rest::Error => e
1333
1357
  raise ::Google::Cloud::Error.from_error(e)
@@ -1424,7 +1448,6 @@ module Google
1424
1448
 
1425
1449
  @alloy_db_admin_stub.list_instances request, options do |result, operation|
1426
1450
  yield result, operation if block_given?
1427
- return result
1428
1451
  end
1429
1452
  rescue ::Gapic::Rest::Error => e
1430
1453
  raise ::Google::Cloud::Error.from_error(e)
@@ -1506,7 +1529,6 @@ module Google
1506
1529
 
1507
1530
  @alloy_db_admin_stub.get_instance request, options do |result, operation|
1508
1531
  yield result, operation if block_given?
1509
- return result
1510
1532
  end
1511
1533
  rescue ::Gapic::Rest::Error => e
1512
1534
  raise ::Google::Cloud::Error.from_error(e)
@@ -1616,7 +1638,7 @@ module Google
1616
1638
  @alloy_db_admin_stub.create_instance request, options do |result, operation|
1617
1639
  result = ::Gapic::Operation.new result, @operations_client, options: options
1618
1640
  yield result, operation if block_given?
1619
- return result
1641
+ throw :response, result
1620
1642
  end
1621
1643
  rescue ::Gapic::Rest::Error => e
1622
1644
  raise ::Google::Cloud::Error.from_error(e)
@@ -1726,7 +1748,7 @@ module Google
1726
1748
  @alloy_db_admin_stub.create_secondary_instance request, options do |result, operation|
1727
1749
  result = ::Gapic::Operation.new result, @operations_client, options: options
1728
1750
  yield result, operation if block_given?
1729
- return result
1751
+ throw :response, result
1730
1752
  end
1731
1753
  rescue ::Gapic::Rest::Error => e
1732
1754
  raise ::Google::Cloud::Error.from_error(e)
@@ -1838,7 +1860,7 @@ module Google
1838
1860
  @alloy_db_admin_stub.batch_create_instances request, options do |result, operation|
1839
1861
  result = ::Gapic::Operation.new result, @operations_client, options: options
1840
1862
  yield result, operation if block_given?
1841
- return result
1863
+ throw :response, result
1842
1864
  end
1843
1865
  rescue ::Gapic::Rest::Error => e
1844
1866
  raise ::Google::Cloud::Error.from_error(e)
@@ -1952,7 +1974,7 @@ module Google
1952
1974
  @alloy_db_admin_stub.update_instance request, options do |result, operation|
1953
1975
  result = ::Gapic::Operation.new result, @operations_client, options: options
1954
1976
  yield result, operation if block_given?
1955
- return result
1977
+ throw :response, result
1956
1978
  end
1957
1979
  rescue ::Gapic::Rest::Error => e
1958
1980
  raise ::Google::Cloud::Error.from_error(e)
@@ -2062,7 +2084,7 @@ module Google
2062
2084
  @alloy_db_admin_stub.delete_instance request, options do |result, operation|
2063
2085
  result = ::Gapic::Operation.new result, @operations_client, options: options
2064
2086
  yield result, operation if block_given?
2065
- return result
2087
+ throw :response, result
2066
2088
  end
2067
2089
  rescue ::Gapic::Rest::Error => e
2068
2090
  raise ::Google::Cloud::Error.from_error(e)
@@ -2170,7 +2192,7 @@ module Google
2170
2192
  @alloy_db_admin_stub.failover_instance request, options do |result, operation|
2171
2193
  result = ::Gapic::Operation.new result, @operations_client, options: options
2172
2194
  yield result, operation if block_given?
2173
- return result
2195
+ throw :response, result
2174
2196
  end
2175
2197
  rescue ::Gapic::Rest::Error => e
2176
2198
  raise ::Google::Cloud::Error.from_error(e)
@@ -2279,7 +2301,7 @@ module Google
2279
2301
  @alloy_db_admin_stub.inject_fault request, options do |result, operation|
2280
2302
  result = ::Gapic::Operation.new result, @operations_client, options: options
2281
2303
  yield result, operation if block_given?
2282
- return result
2304
+ throw :response, result
2283
2305
  end
2284
2306
  rescue ::Gapic::Rest::Error => e
2285
2307
  raise ::Google::Cloud::Error.from_error(e)
@@ -2389,7 +2411,7 @@ module Google
2389
2411
  @alloy_db_admin_stub.restart_instance request, options do |result, operation|
2390
2412
  result = ::Gapic::Operation.new result, @operations_client, options: options
2391
2413
  yield result, operation if block_given?
2392
- return result
2414
+ throw :response, result
2393
2415
  end
2394
2416
  rescue ::Gapic::Rest::Error => e
2395
2417
  raise ::Google::Cloud::Error.from_error(e)
@@ -2482,7 +2504,6 @@ module Google
2482
2504
 
2483
2505
  @alloy_db_admin_stub.execute_sql request, options do |result, operation|
2484
2506
  yield result, operation if block_given?
2485
- return result
2486
2507
  end
2487
2508
  rescue ::Gapic::Rest::Error => e
2488
2509
  raise ::Google::Cloud::Error.from_error(e)
@@ -2574,7 +2595,6 @@ module Google
2574
2595
 
2575
2596
  @alloy_db_admin_stub.list_backups request, options do |result, operation|
2576
2597
  yield result, operation if block_given?
2577
- return result
2578
2598
  end
2579
2599
  rescue ::Gapic::Rest::Error => e
2580
2600
  raise ::Google::Cloud::Error.from_error(e)
@@ -2653,7 +2673,6 @@ module Google
2653
2673
 
2654
2674
  @alloy_db_admin_stub.get_backup request, options do |result, operation|
2655
2675
  yield result, operation if block_given?
2656
- return result
2657
2676
  end
2658
2677
  rescue ::Gapic::Rest::Error => e
2659
2678
  raise ::Google::Cloud::Error.from_error(e)
@@ -2761,7 +2780,7 @@ module Google
2761
2780
  @alloy_db_admin_stub.create_backup request, options do |result, operation|
2762
2781
  result = ::Gapic::Operation.new result, @operations_client, options: options
2763
2782
  yield result, operation if block_given?
2764
- return result
2783
+ throw :response, result
2765
2784
  end
2766
2785
  rescue ::Gapic::Rest::Error => e
2767
2786
  raise ::Google::Cloud::Error.from_error(e)
@@ -2874,7 +2893,7 @@ module Google
2874
2893
  @alloy_db_admin_stub.update_backup request, options do |result, operation|
2875
2894
  result = ::Gapic::Operation.new result, @operations_client, options: options
2876
2895
  yield result, operation if block_given?
2877
- return result
2896
+ throw :response, result
2878
2897
  end
2879
2898
  rescue ::Gapic::Rest::Error => e
2880
2899
  raise ::Google::Cloud::Error.from_error(e)
@@ -2983,7 +3002,7 @@ module Google
2983
3002
  @alloy_db_admin_stub.delete_backup request, options do |result, operation|
2984
3003
  result = ::Gapic::Operation.new result, @operations_client, options: options
2985
3004
  yield result, operation if block_given?
2986
- return result
3005
+ throw :response, result
2987
3006
  end
2988
3007
  rescue ::Gapic::Rest::Error => e
2989
3008
  raise ::Google::Cloud::Error.from_error(e)
@@ -3078,7 +3097,7 @@ module Google
3078
3097
  @alloy_db_admin_stub.list_supported_database_flags request, options do |result, operation|
3079
3098
  result = ::Gapic::Rest::PagedEnumerable.new @alloy_db_admin_stub, :list_supported_database_flags, "supported_database_flags", request, result, options
3080
3099
  yield result, operation if block_given?
3081
- return result
3100
+ throw :response, result
3082
3101
  end
3083
3102
  rescue ::Gapic::Rest::Error => e
3084
3103
  raise ::Google::Cloud::Error.from_error(e)
@@ -3191,7 +3210,6 @@ module Google
3191
3210
 
3192
3211
  @alloy_db_admin_stub.generate_client_certificate request, options do |result, operation|
3193
3212
  yield result, operation if block_given?
3194
- return result
3195
3213
  end
3196
3214
  rescue ::Gapic::Rest::Error => e
3197
3215
  raise ::Google::Cloud::Error.from_error(e)
@@ -3285,7 +3303,6 @@ module Google
3285
3303
 
3286
3304
  @alloy_db_admin_stub.get_connection_info request, options do |result, operation|
3287
3305
  yield result, operation if block_given?
3288
- return result
3289
3306
  end
3290
3307
  rescue ::Gapic::Rest::Error => e
3291
3308
  raise ::Google::Cloud::Error.from_error(e)
@@ -3377,7 +3394,6 @@ module Google
3377
3394
 
3378
3395
  @alloy_db_admin_stub.list_users request, options do |result, operation|
3379
3396
  yield result, operation if block_given?
3380
- return result
3381
3397
  end
3382
3398
  rescue ::Gapic::Rest::Error => e
3383
3399
  raise ::Google::Cloud::Error.from_error(e)
@@ -3457,7 +3473,6 @@ module Google
3457
3473
 
3458
3474
  @alloy_db_admin_stub.get_user request, options do |result, operation|
3459
3475
  yield result, operation if block_given?
3460
- return result
3461
3476
  end
3462
3477
  rescue ::Gapic::Rest::Error => e
3463
3478
  raise ::Google::Cloud::Error.from_error(e)
@@ -3557,7 +3572,6 @@ module Google
3557
3572
 
3558
3573
  @alloy_db_admin_stub.create_user request, options do |result, operation|
3559
3574
  yield result, operation if block_given?
3560
- return result
3561
3575
  end
3562
3576
  rescue ::Gapic::Rest::Error => e
3563
3577
  raise ::Google::Cloud::Error.from_error(e)
@@ -3661,7 +3675,6 @@ module Google
3661
3675
 
3662
3676
  @alloy_db_admin_stub.update_user request, options do |result, operation|
3663
3677
  yield result, operation if block_given?
3664
- return result
3665
3678
  end
3666
3679
  rescue ::Gapic::Rest::Error => e
3667
3680
  raise ::Google::Cloud::Error.from_error(e)
@@ -3758,7 +3771,6 @@ module Google
3758
3771
 
3759
3772
  @alloy_db_admin_stub.delete_user request, options do |result, operation|
3760
3773
  yield result, operation if block_given?
3761
- return result
3762
3774
  end
3763
3775
  rescue ::Gapic::Rest::Error => e
3764
3776
  raise ::Google::Cloud::Error.from_error(e)
@@ -3854,7 +3866,7 @@ module Google
3854
3866
  @alloy_db_admin_stub.list_databases request, options do |result, operation|
3855
3867
  result = ::Gapic::Rest::PagedEnumerable.new @alloy_db_admin_stub, :list_databases, "databases", request, result, options
3856
3868
  yield result, operation if block_given?
3857
- return result
3869
+ throw :response, result
3858
3870
  end
3859
3871
  rescue ::Gapic::Rest::Error => e
3860
3872
  raise ::Google::Cloud::Error.from_error(e)
@@ -3902,6 +3914,13 @@ module Google
3902
3914
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
3903
3915
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
3904
3916
  # * (`nil`) indicating no credentials
3917
+ #
3918
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
3919
+ # external source for authentication to Google Cloud, you must validate it before
3920
+ # providing it to a Google API client library. Providing an unvalidated credential
3921
+ # configuration to Google APIs can compromise the security of your systems and data.
3922
+ # For more information, refer to [Validate credential configurations from external
3923
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
3905
3924
  # @return [::Object]
3906
3925
  # @!attribute [rw] scope
3907
3926
  # The OAuth scopes
@@ -3934,6 +3953,11 @@ module Google
3934
3953
  # default endpoint URL. The default value of nil uses the environment
3935
3954
  # universe (usually the default "googleapis.com" universe).
3936
3955
  # @return [::String,nil]
3956
+ # @!attribute [rw] logger
3957
+ # A custom logger to use for request/response debug logging, or the value
3958
+ # `:default` (the default) to construct a default logger, or `nil` to
3959
+ # explicitly disable logging.
3960
+ # @return [::Logger,:default,nil]
3937
3961
  #
3938
3962
  class Configuration
3939
3963
  extend ::Gapic::Config
@@ -3962,6 +3986,7 @@ module Google
3962
3986
  # by the host service.
3963
3987
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
3964
3988
  config_attr :bindings_override, {}, ::Hash, nil
3989
+ config_attr :logger, :default, ::Logger, nil, :default
3965
3990
 
3966
3991
  # @private
3967
3992
  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
  ##