google-cloud-alloy_db-v1 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69cf6a6cdf19dcefb5f6494f5886503f6227bb3c1b7d6184012cfd2c96c04595
4
- data.tar.gz: 9c587f78caed0f5b9e9f0320b724d680a2de042b6b00cba064b7ff3b05722f4b
3
+ metadata.gz: d2aeb881d34ecd84e9d1410aa98ef60361c985e06cf67f6c065e2475adf7c1fe
4
+ data.tar.gz: db7935df24ddf9638e22a22e38dbefead524be6089b55ffaeb2df34313be25c2
5
5
  SHA512:
6
- metadata.gz: 32f428e25ec7efc8ac497bf274780e0a285963c0ec41de423c9690731907d738fa138c28086857a96521b1fe934cac5873df0a5322567f4bcf6993e4be98fd26
7
- data.tar.gz: 26cab522e422d2c9490323fc35743828a33e1082641f6211573faa6d2accc48f8aede4f3d6aa8785325ad077b83adeef5a0a4e71697ce9c789840d79dda63449
6
+ metadata.gz: d01423be2f962f44022324f782f00e0fc553e460fd58407323bd63f5d712ac3bd2ad4d47e87a391b188119a6318c835675eee8b16cd55d3e33e9148de8819355
7
+ data.tar.gz: 968908e3da5f467b66cd87a890cade7e2406634596d8ea00cfd3848ad232285d1f57e7e0c8a5f47faaa2677c55af8618a64fb49f007edddd593b646cd8e5c31d
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the AlloyDB V1 API
2
2
 
3
- AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance. AlloyDB is optimized for the most demanding use cases, allowing you to build new applications that require high transaction throughput, large database sizes, or multiple read resources; scale existing PostgreSQL workloads with no application changes; and modernize legacy proprietary databases.
3
+ AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance. AlloyDB is optimized for the most demanding use cases, allowing you to build new applications that require high transaction throughput, large database sizes, or multiple read resources; scale existing PostgreSQL workloads with no application changes; and modernize legacy proprietary databases.
4
4
 
5
5
  AlloyDB for PostgreSQL is an open source-compatible database service that provides a powerful option for migrating, modernizing, or building commercial-grade applications. It offers full compatibility with standard PostgreSQL, and is more than 4x faster for transactional workloads and up to 100x faster for analytical queries than standard PostgreSQL in our performance tests. AlloyDB for PostgreSQL offers a 99.99 percent availability SLA inclusive of maintenance. AlloyDB is optimized for the most demanding use cases, allowing you to build new applications that require high transaction throughput, large database sizes, or multiple read resources; scale existing PostgreSQL workloads with no application changes; and modernize legacy proprietary databases.
6
6
 
@@ -43,33 +43,43 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/alloydb/docs)
44
44
  for general usage information.
45
45
 
46
- ## Enabling Logging
47
-
48
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
51
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
-
54
- Configuring a Ruby stdlib logger:
46
+ ## Debug Logging
47
+
48
+ This library comes with opt-in Debug Logging that can help you troubleshoot
49
+ your application's integration with the API. When logging is activated, key
50
+ events such as requests and responses, along with data payloads and metadata
51
+ such as headers and client configuration, are logged to the standard error
52
+ stream.
53
+
54
+ **WARNING:** Client Library Debug Logging includes your data payloads in
55
+ plaintext, which could include sensitive data such as PII for yourself or your
56
+ customers, private keys, or other security data that could be compromising if
57
+ leaked. Always practice good data hygiene with your application logs, and follow
58
+ the principle of least access. Google also recommends that Client Library Debug
59
+ Logging be enabled only temporarily during active debugging, and not used
60
+ permanently in production.
61
+
62
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
63
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
64
+ list of client library gem names. This will select the default logging behavior,
65
+ which writes logs to the standard error stream. On a local workstation, this may
66
+ result in logs appearing on the console. When running on a Google Cloud hosting
67
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
68
+ results in logs appearing alongside your application logs in the
69
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
70
+
71
+ You can customize logging by modifying the `logger` configuration when
72
+ constructing a client object. For example:
55
73
 
56
74
  ```ruby
75
+ require "google/cloud/alloy_db/v1"
57
76
  require "logger"
58
77
 
59
- module MyLogger
60
- LOGGER = Logger.new $stderr, level: Logger::WARN
61
- def logger
62
- LOGGER
63
- end
64
- end
65
-
66
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
67
- module GRPC
68
- extend MyLogger
78
+ client = ::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Client.new do |config|
79
+ config.logger = Logger.new "my-app.log"
69
80
  end
70
81
  ```
71
82
 
72
-
73
83
  ## Google Cloud Samples
74
84
 
75
85
  To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
@@ -213,14 +213,26 @@ module Google
213
213
  universe_domain: @config.universe_domain,
214
214
  channel_args: @config.channel_args,
215
215
  interceptors: @config.interceptors,
216
- channel_pool_config: @config.channel_pool
216
+ channel_pool_config: @config.channel_pool,
217
+ logger: @config.logger
217
218
  )
218
219
 
220
+ @alloy_db_admin_stub.stub_logger&.info do |entry|
221
+ entry.set_system_name
222
+ entry.set_service
223
+ entry.message = "Created client for #{entry.service}"
224
+ entry.set_credentials_fields credentials
225
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
226
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
227
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
228
+ end
229
+
219
230
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
220
231
  config.credentials = credentials
221
232
  config.quota_project = @quota_project_id
222
233
  config.endpoint = @alloy_db_admin_stub.endpoint
223
234
  config.universe_domain = @alloy_db_admin_stub.universe_domain
235
+ config.logger = @alloy_db_admin_stub.logger if config.respond_to? :logger=
224
236
  end
225
237
 
226
238
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
@@ -228,6 +240,7 @@ module Google
228
240
  config.quota_project = @quota_project_id
229
241
  config.endpoint = @alloy_db_admin_stub.endpoint
230
242
  config.universe_domain = @alloy_db_admin_stub.universe_domain
243
+ config.logger = @alloy_db_admin_stub.logger if config.respond_to? :logger=
231
244
  end
232
245
  end
233
246
 
@@ -252,6 +265,15 @@ module Google
252
265
  #
253
266
  attr_reader :iam_policy_client
254
267
 
268
+ ##
269
+ # The logger used for request/response debug logging.
270
+ #
271
+ # @return [Logger]
272
+ #
273
+ def logger
274
+ @alloy_db_admin_stub.logger
275
+ end
276
+
255
277
  # Service calls
256
278
 
257
279
  ##
@@ -351,7 +373,7 @@ module Google
351
373
  @alloy_db_admin_stub.call_rpc :list_clusters, request, options: options do |response, operation|
352
374
  response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_clusters, request, response, operation, options
353
375
  yield response, operation if block_given?
354
- return response
376
+ throw :response, response
355
377
  end
356
378
  rescue ::GRPC::BadStatus => e
357
379
  raise ::Google::Cloud::Error.from_error(e)
@@ -441,7 +463,6 @@ module Google
441
463
 
442
464
  @alloy_db_admin_stub.call_rpc :get_cluster, request, options: options do |response, operation|
443
465
  yield response, operation if block_given?
444
- return response
445
466
  end
446
467
  rescue ::GRPC::BadStatus => e
447
468
  raise ::Google::Cloud::Error.from_error(e)
@@ -558,7 +579,7 @@ module Google
558
579
  @alloy_db_admin_stub.call_rpc :create_cluster, request, options: options do |response, operation|
559
580
  response = ::Gapic::Operation.new response, @operations_client, options: options
560
581
  yield response, operation if block_given?
561
- return response
582
+ throw :response, response
562
583
  end
563
584
  rescue ::GRPC::BadStatus => e
564
585
  raise ::Google::Cloud::Error.from_error(e)
@@ -679,7 +700,7 @@ module Google
679
700
  @alloy_db_admin_stub.call_rpc :update_cluster, request, options: options do |response, operation|
680
701
  response = ::Gapic::Operation.new response, @operations_client, options: options
681
702
  yield response, operation if block_given?
682
- return response
703
+ throw :response, response
683
704
  end
684
705
  rescue ::GRPC::BadStatus => e
685
706
  raise ::Google::Cloud::Error.from_error(e)
@@ -798,7 +819,7 @@ module Google
798
819
  @alloy_db_admin_stub.call_rpc :delete_cluster, request, options: options do |response, operation|
799
820
  response = ::Gapic::Operation.new response, @operations_client, options: options
800
821
  yield response, operation if block_given?
801
- return response
822
+ throw :response, response
802
823
  end
803
824
  rescue ::GRPC::BadStatus => e
804
825
  raise ::Google::Cloud::Error.from_error(e)
@@ -918,7 +939,7 @@ module Google
918
939
  @alloy_db_admin_stub.call_rpc :promote_cluster, request, options: options do |response, operation|
919
940
  response = ::Gapic::Operation.new response, @operations_client, options: options
920
941
  yield response, operation if block_given?
921
- return response
942
+ throw :response, response
922
943
  end
923
944
  rescue ::GRPC::BadStatus => e
924
945
  raise ::Google::Cloud::Error.from_error(e)
@@ -1033,7 +1054,7 @@ module Google
1033
1054
  @alloy_db_admin_stub.call_rpc :switchover_cluster, request, options: options do |response, operation|
1034
1055
  response = ::Gapic::Operation.new response, @operations_client, options: options
1035
1056
  yield response, operation if block_given?
1036
- return response
1057
+ throw :response, response
1037
1058
  end
1038
1059
  rescue ::GRPC::BadStatus => e
1039
1060
  raise ::Google::Cloud::Error.from_error(e)
@@ -1157,7 +1178,7 @@ module Google
1157
1178
  @alloy_db_admin_stub.call_rpc :restore_cluster, request, options: options do |response, operation|
1158
1179
  response = ::Gapic::Operation.new response, @operations_client, options: options
1159
1180
  yield response, operation if block_given?
1160
- return response
1181
+ throw :response, response
1161
1182
  end
1162
1183
  rescue ::GRPC::BadStatus => e
1163
1184
  raise ::Google::Cloud::Error.from_error(e)
@@ -1275,7 +1296,7 @@ module Google
1275
1296
  @alloy_db_admin_stub.call_rpc :create_secondary_cluster, request, options: options do |response, operation|
1276
1297
  response = ::Gapic::Operation.new response, @operations_client, options: options
1277
1298
  yield response, operation if block_given?
1278
- return response
1299
+ throw :response, response
1279
1300
  end
1280
1301
  rescue ::GRPC::BadStatus => e
1281
1302
  raise ::Google::Cloud::Error.from_error(e)
@@ -1380,7 +1401,7 @@ module Google
1380
1401
  @alloy_db_admin_stub.call_rpc :list_instances, request, options: options do |response, operation|
1381
1402
  response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_instances, request, response, operation, options
1382
1403
  yield response, operation if block_given?
1383
- return response
1404
+ throw :response, response
1384
1405
  end
1385
1406
  rescue ::GRPC::BadStatus => e
1386
1407
  raise ::Google::Cloud::Error.from_error(e)
@@ -1469,7 +1490,6 @@ module Google
1469
1490
 
1470
1491
  @alloy_db_admin_stub.call_rpc :get_instance, request, options: options do |response, operation|
1471
1492
  yield response, operation if block_given?
1472
- return response
1473
1493
  end
1474
1494
  rescue ::GRPC::BadStatus => e
1475
1495
  raise ::Google::Cloud::Error.from_error(e)
@@ -1586,7 +1606,7 @@ module Google
1586
1606
  @alloy_db_admin_stub.call_rpc :create_instance, request, options: options do |response, operation|
1587
1607
  response = ::Gapic::Operation.new response, @operations_client, options: options
1588
1608
  yield response, operation if block_given?
1589
- return response
1609
+ throw :response, response
1590
1610
  end
1591
1611
  rescue ::GRPC::BadStatus => e
1592
1612
  raise ::Google::Cloud::Error.from_error(e)
@@ -1703,7 +1723,7 @@ module Google
1703
1723
  @alloy_db_admin_stub.call_rpc :create_secondary_instance, request, options: options do |response, operation|
1704
1724
  response = ::Gapic::Operation.new response, @operations_client, options: options
1705
1725
  yield response, operation if block_given?
1706
- return response
1726
+ throw :response, response
1707
1727
  end
1708
1728
  rescue ::GRPC::BadStatus => e
1709
1729
  raise ::Google::Cloud::Error.from_error(e)
@@ -1822,7 +1842,7 @@ module Google
1822
1842
  @alloy_db_admin_stub.call_rpc :batch_create_instances, request, options: options do |response, operation|
1823
1843
  response = ::Gapic::Operation.new response, @operations_client, options: options
1824
1844
  yield response, operation if block_given?
1825
- return response
1845
+ throw :response, response
1826
1846
  end
1827
1847
  rescue ::GRPC::BadStatus => e
1828
1848
  raise ::Google::Cloud::Error.from_error(e)
@@ -1943,7 +1963,7 @@ module Google
1943
1963
  @alloy_db_admin_stub.call_rpc :update_instance, request, options: options do |response, operation|
1944
1964
  response = ::Gapic::Operation.new response, @operations_client, options: options
1945
1965
  yield response, operation if block_given?
1946
- return response
1966
+ throw :response, response
1947
1967
  end
1948
1968
  rescue ::GRPC::BadStatus => e
1949
1969
  raise ::Google::Cloud::Error.from_error(e)
@@ -2060,7 +2080,7 @@ module Google
2060
2080
  @alloy_db_admin_stub.call_rpc :delete_instance, request, options: options do |response, operation|
2061
2081
  response = ::Gapic::Operation.new response, @operations_client, options: options
2062
2082
  yield response, operation if block_given?
2063
- return response
2083
+ throw :response, response
2064
2084
  end
2065
2085
  rescue ::GRPC::BadStatus => e
2066
2086
  raise ::Google::Cloud::Error.from_error(e)
@@ -2175,7 +2195,7 @@ module Google
2175
2195
  @alloy_db_admin_stub.call_rpc :failover_instance, request, options: options do |response, operation|
2176
2196
  response = ::Gapic::Operation.new response, @operations_client, options: options
2177
2197
  yield response, operation if block_given?
2178
- return response
2198
+ throw :response, response
2179
2199
  end
2180
2200
  rescue ::GRPC::BadStatus => e
2181
2201
  raise ::Google::Cloud::Error.from_error(e)
@@ -2291,7 +2311,7 @@ module Google
2291
2311
  @alloy_db_admin_stub.call_rpc :inject_fault, request, options: options do |response, operation|
2292
2312
  response = ::Gapic::Operation.new response, @operations_client, options: options
2293
2313
  yield response, operation if block_given?
2294
- return response
2314
+ throw :response, response
2295
2315
  end
2296
2316
  rescue ::GRPC::BadStatus => e
2297
2317
  raise ::Google::Cloud::Error.from_error(e)
@@ -2408,7 +2428,7 @@ module Google
2408
2428
  @alloy_db_admin_stub.call_rpc :restart_instance, request, options: options do |response, operation|
2409
2429
  response = ::Gapic::Operation.new response, @operations_client, options: options
2410
2430
  yield response, operation if block_given?
2411
- return response
2431
+ throw :response, response
2412
2432
  end
2413
2433
  rescue ::GRPC::BadStatus => e
2414
2434
  raise ::Google::Cloud::Error.from_error(e)
@@ -2508,7 +2528,6 @@ module Google
2508
2528
 
2509
2529
  @alloy_db_admin_stub.call_rpc :execute_sql, request, options: options do |response, operation|
2510
2530
  yield response, operation if block_given?
2511
- return response
2512
2531
  end
2513
2532
  rescue ::GRPC::BadStatus => e
2514
2533
  raise ::Google::Cloud::Error.from_error(e)
@@ -2608,7 +2627,7 @@ module Google
2608
2627
  @alloy_db_admin_stub.call_rpc :list_backups, request, options: options do |response, operation|
2609
2628
  response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_backups, request, response, operation, options
2610
2629
  yield response, operation if block_given?
2611
- return response
2630
+ throw :response, response
2612
2631
  end
2613
2632
  rescue ::GRPC::BadStatus => e
2614
2633
  raise ::Google::Cloud::Error.from_error(e)
@@ -2694,7 +2713,6 @@ module Google
2694
2713
 
2695
2714
  @alloy_db_admin_stub.call_rpc :get_backup, request, options: options do |response, operation|
2696
2715
  yield response, operation if block_given?
2697
- return response
2698
2716
  end
2699
2717
  rescue ::GRPC::BadStatus => e
2700
2718
  raise ::Google::Cloud::Error.from_error(e)
@@ -2809,7 +2827,7 @@ module Google
2809
2827
  @alloy_db_admin_stub.call_rpc :create_backup, request, options: options do |response, operation|
2810
2828
  response = ::Gapic::Operation.new response, @operations_client, options: options
2811
2829
  yield response, operation if block_given?
2812
- return response
2830
+ throw :response, response
2813
2831
  end
2814
2832
  rescue ::GRPC::BadStatus => e
2815
2833
  raise ::Google::Cloud::Error.from_error(e)
@@ -2929,7 +2947,7 @@ module Google
2929
2947
  @alloy_db_admin_stub.call_rpc :update_backup, request, options: options do |response, operation|
2930
2948
  response = ::Gapic::Operation.new response, @operations_client, options: options
2931
2949
  yield response, operation if block_given?
2932
- return response
2950
+ throw :response, response
2933
2951
  end
2934
2952
  rescue ::GRPC::BadStatus => e
2935
2953
  raise ::Google::Cloud::Error.from_error(e)
@@ -3045,7 +3063,7 @@ module Google
3045
3063
  @alloy_db_admin_stub.call_rpc :delete_backup, request, options: options do |response, operation|
3046
3064
  response = ::Gapic::Operation.new response, @operations_client, options: options
3047
3065
  yield response, operation if block_given?
3048
- return response
3066
+ throw :response, response
3049
3067
  end
3050
3068
  rescue ::GRPC::BadStatus => e
3051
3069
  raise ::Google::Cloud::Error.from_error(e)
@@ -3147,7 +3165,7 @@ module Google
3147
3165
  @alloy_db_admin_stub.call_rpc :list_supported_database_flags, request, options: options do |response, operation|
3148
3166
  response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_supported_database_flags, request, response, operation, options
3149
3167
  yield response, operation if block_given?
3150
- return response
3168
+ throw :response, response
3151
3169
  end
3152
3170
  rescue ::GRPC::BadStatus => e
3153
3171
  raise ::Google::Cloud::Error.from_error(e)
@@ -3264,7 +3282,6 @@ module Google
3264
3282
 
3265
3283
  @alloy_db_admin_stub.call_rpc :generate_client_certificate, request, options: options do |response, operation|
3266
3284
  yield response, operation if block_given?
3267
- return response
3268
3285
  end
3269
3286
  rescue ::GRPC::BadStatus => e
3270
3287
  raise ::Google::Cloud::Error.from_error(e)
@@ -3365,7 +3382,6 @@ module Google
3365
3382
 
3366
3383
  @alloy_db_admin_stub.call_rpc :get_connection_info, request, options: options do |response, operation|
3367
3384
  yield response, operation if block_given?
3368
- return response
3369
3385
  end
3370
3386
  rescue ::GRPC::BadStatus => e
3371
3387
  raise ::Google::Cloud::Error.from_error(e)
@@ -3465,7 +3481,7 @@ module Google
3465
3481
  @alloy_db_admin_stub.call_rpc :list_users, request, options: options do |response, operation|
3466
3482
  response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_users, request, response, operation, options
3467
3483
  yield response, operation if block_given?
3468
- return response
3484
+ throw :response, response
3469
3485
  end
3470
3486
  rescue ::GRPC::BadStatus => e
3471
3487
  raise ::Google::Cloud::Error.from_error(e)
@@ -3552,7 +3568,6 @@ module Google
3552
3568
 
3553
3569
  @alloy_db_admin_stub.call_rpc :get_user, request, options: options do |response, operation|
3554
3570
  yield response, operation if block_given?
3555
- return response
3556
3571
  end
3557
3572
  rescue ::GRPC::BadStatus => e
3558
3573
  raise ::Google::Cloud::Error.from_error(e)
@@ -3659,7 +3674,6 @@ module Google
3659
3674
 
3660
3675
  @alloy_db_admin_stub.call_rpc :create_user, request, options: options do |response, operation|
3661
3676
  yield response, operation if block_given?
3662
- return response
3663
3677
  end
3664
3678
  rescue ::GRPC::BadStatus => e
3665
3679
  raise ::Google::Cloud::Error.from_error(e)
@@ -3770,7 +3784,6 @@ module Google
3770
3784
 
3771
3785
  @alloy_db_admin_stub.call_rpc :update_user, request, options: options do |response, operation|
3772
3786
  yield response, operation if block_given?
3773
- return response
3774
3787
  end
3775
3788
  rescue ::GRPC::BadStatus => e
3776
3789
  raise ::Google::Cloud::Error.from_error(e)
@@ -3874,7 +3887,6 @@ module Google
3874
3887
 
3875
3888
  @alloy_db_admin_stub.call_rpc :delete_user, request, options: options do |response, operation|
3876
3889
  yield response, operation if block_given?
3877
- return response
3878
3890
  end
3879
3891
  rescue ::GRPC::BadStatus => e
3880
3892
  raise ::Google::Cloud::Error.from_error(e)
@@ -3977,7 +3989,7 @@ module Google
3977
3989
  @alloy_db_admin_stub.call_rpc :list_databases, request, options: options do |response, operation|
3978
3990
  response = ::Gapic::PagedEnumerable.new @alloy_db_admin_stub, :list_databases, request, response, operation, options
3979
3991
  yield response, operation if block_given?
3980
- return response
3992
+ throw :response, response
3981
3993
  end
3982
3994
  rescue ::GRPC::BadStatus => e
3983
3995
  raise ::Google::Cloud::Error.from_error(e)
@@ -4066,6 +4078,11 @@ module Google
4066
4078
  # default endpoint URL. The default value of nil uses the environment
4067
4079
  # universe (usually the default "googleapis.com" universe).
4068
4080
  # @return [::String,nil]
4081
+ # @!attribute [rw] logger
4082
+ # A custom logger to use for request/response debug logging, or the value
4083
+ # `:default` (the default) to construct a default logger, or `nil` to
4084
+ # explicitly disable logging.
4085
+ # @return [::Logger,:default,nil]
4069
4086
  #
4070
4087
  class Configuration
4071
4088
  extend ::Gapic::Config
@@ -4090,6 +4107,7 @@ module Google
4090
4107
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
4091
4108
  config_attr :quota_project, nil, ::String, nil
4092
4109
  config_attr :universe_domain, nil, ::String, nil
4110
+ config_attr :logger, :default, ::Logger, nil, :default
4093
4111
 
4094
4112
  # @private
4095
4113
  def initialize parent_config = nil
@@ -124,14 +124,6 @@ module Google
124
124
  # Lists operations that match the specified filter in the request. If the
125
125
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
126
126
  #
127
- # NOTE: the `name` binding allows API services to override the binding
128
- # to use different resource name schemes, such as `users/*/operations`. To
129
- # override the binding, API services can add a binding such as
130
- # `"/v1/{name=users/*}/operations"` to their service configuration.
131
- # For backwards compatibility, the default name includes the operations
132
- # collection id, however overriding users must ensure the name binding
133
- # is the parent resource, without the operations collection id.
134
- #
135
127
  # @overload list_operations(request, options = nil)
136
128
  # Pass arguments to `list_operations` via a request object, either of type
137
129
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -221,7 +213,7 @@ module Google
221
213
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
222
214
  response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
223
215
  yield response, operation if block_given?
224
- return response
216
+ throw :response, response
225
217
  end
226
218
  rescue ::GRPC::BadStatus => e
227
219
  raise ::Google::Cloud::Error.from_error(e)
@@ -317,7 +309,7 @@ module Google
317
309
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
318
310
  response = ::Gapic::Operation.new response, @operations_client, options: options
319
311
  yield response, operation if block_given?
320
- return response
312
+ throw :response, response
321
313
  end
322
314
  rescue ::GRPC::BadStatus => e
323
315
  raise ::Google::Cloud::Error.from_error(e)
@@ -406,7 +398,6 @@ module Google
406
398
 
407
399
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
408
400
  yield response, operation if block_given?
409
- return response
410
401
  end
411
402
  rescue ::GRPC::BadStatus => e
412
403
  raise ::Google::Cloud::Error.from_error(e)
@@ -421,8 +412,9 @@ module Google
421
412
  # other methods to check whether the cancellation succeeded or whether the
422
413
  # operation completed despite cancellation. On successful cancellation,
423
414
  # the operation is not deleted; instead, it becomes an operation with
424
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
425
- # corresponding to `Code.CANCELLED`.
415
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
416
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
417
+ # `Code.CANCELLED`.
426
418
  #
427
419
  # @overload cancel_operation(request, options = nil)
428
420
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -501,7 +493,6 @@ module Google
501
493
 
502
494
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
503
495
  yield response, operation if block_given?
504
- return response
505
496
  end
506
497
  rescue ::GRPC::BadStatus => e
507
498
  raise ::Google::Cloud::Error.from_error(e)
@@ -599,7 +590,7 @@ module Google
599
590
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
600
591
  response = ::Gapic::Operation.new response, @operations_client, options: options
601
592
  yield response, operation if block_given?
602
- return response
593
+ throw :response, response
603
594
  end
604
595
  rescue ::GRPC::BadStatus => e
605
596
  raise ::Google::Cloud::Error.from_error(e)
@@ -688,6 +679,11 @@ module Google
688
679
  # default endpoint URL. The default value of nil uses the environment
689
680
  # universe (usually the default "googleapis.com" universe).
690
681
  # @return [::String,nil]
682
+ # @!attribute [rw] logger
683
+ # A custom logger to use for request/response debug logging, or the value
684
+ # `:default` (the default) to construct a default logger, or `nil` to
685
+ # explicitly disable logging.
686
+ # @return [::Logger,:default,nil]
691
687
  #
692
688
  class Configuration
693
689
  extend ::Gapic::Config
@@ -712,6 +708,7 @@ module Google
712
708
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
713
709
  config_attr :quota_project, nil, ::String, nil
714
710
  config_attr :universe_domain, nil, ::String, nil
711
+ config_attr :logger, :default, ::Logger, nil, :default
715
712
 
716
713
  # @private
717
714
  def initialize parent_config = nil