google-cloud-datastream-v1 0.11.0 → 0.13.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: 8010f92edc29881e3100047ddc49cb5933579b26eff3c2627830fc81ed3650ff
4
- data.tar.gz: bf943cf84295f12e58f9b930fe88373b33232eb4af44a5789740e6c59b95b924
3
+ metadata.gz: 39ce7079ddf9a1078eeb729792d2be749abcdb91ba3cc2f0bff1516aa43f482f
4
+ data.tar.gz: cfca6f0c8a4c5723c52257160f96c8841a7088128e8e46934db7826c22362ca2
5
5
  SHA512:
6
- metadata.gz: abffd5dc51f759de885ce0e3245fbbccab21e8d892200b533fac1e050b53e5705ae696fa1c67c6d5805e6545648ce484c1343ca98e408e854b14684bd3ddc11a
7
- data.tar.gz: d5156bcd2a01b9c86697140a4a4fc697fa0aa166b24c5e933d76239c12c109451fb3eee07b9254092f053b68df146a0d120cf5211dd1ec34af1a38c9a30e7eac
6
+ metadata.gz: 027f94683cfa66b99869bd7878d8894f28d90b9253a8063b6eaa2aa03c2e2e11ec382f229017255fd3e9a5be011b755470fd28a6c461169368357c529cb667d2
7
+ data.tar.gz: ef77debc952ea1c543e7b4694f1b1ea02edf3062fec3703ba423be968b9a16ce5440a4b782824afd1824423736b6cc8f73e5d1740ccb3e45581cf8df252ed769
data/README.md CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/datastream/)
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/datastream/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::Datastream::V1::Datastream::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).
76
86
 
77
87
  ## Supported Ruby Versions
78
88
 
79
- This library is supported on Ruby 2.7+.
89
+ This library is supported on Ruby 3.0+.
80
90
 
81
91
  Google provides official support for Ruby versions that are actively supported
82
92
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -191,14 +191,26 @@ module Google
191
191
  universe_domain: @config.universe_domain,
192
192
  channel_args: @config.channel_args,
193
193
  interceptors: @config.interceptors,
194
- channel_pool_config: @config.channel_pool
194
+ channel_pool_config: @config.channel_pool,
195
+ logger: @config.logger
195
196
  )
196
197
 
198
+ @datastream_stub.stub_logger&.info do |entry|
199
+ entry.set_system_name
200
+ entry.set_service
201
+ entry.message = "Created client for #{entry.service}"
202
+ entry.set_credentials_fields credentials
203
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
204
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
205
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
206
+ end
207
+
197
208
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
198
209
  config.credentials = credentials
199
210
  config.quota_project = @quota_project_id
200
211
  config.endpoint = @datastream_stub.endpoint
201
212
  config.universe_domain = @datastream_stub.universe_domain
213
+ config.logger = @datastream_stub.logger if config.respond_to? :logger=
202
214
  end
203
215
 
204
216
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
@@ -206,6 +218,7 @@ module Google
206
218
  config.quota_project = @quota_project_id
207
219
  config.endpoint = @datastream_stub.endpoint
208
220
  config.universe_domain = @datastream_stub.universe_domain
221
+ config.logger = @datastream_stub.logger if config.respond_to? :logger=
209
222
  end
210
223
  end
211
224
 
@@ -230,6 +243,15 @@ module Google
230
243
  #
231
244
  attr_reader :iam_policy_client
232
245
 
246
+ ##
247
+ # The logger used for request/response debug logging.
248
+ #
249
+ # @return [Logger]
250
+ #
251
+ def logger
252
+ @datastream_stub.logger
253
+ end
254
+
233
255
  # Service calls
234
256
 
235
257
  ##
@@ -332,7 +354,7 @@ module Google
332
354
  @datastream_stub.call_rpc :list_connection_profiles, request, options: options do |response, operation|
333
355
  response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_connection_profiles, request, response, operation, options
334
356
  yield response, operation if block_given?
335
- return response
357
+ throw :response, response
336
358
  end
337
359
  rescue ::GRPC::BadStatus => e
338
360
  raise ::Google::Cloud::Error.from_error(e)
@@ -418,7 +440,6 @@ module Google
418
440
 
419
441
  @datastream_stub.call_rpc :get_connection_profile, request, options: options do |response, operation|
420
442
  yield response, operation if block_given?
421
- return response
422
443
  end
423
444
  rescue ::GRPC::BadStatus => e
424
445
  raise ::Google::Cloud::Error.from_error(e)
@@ -535,7 +556,7 @@ module Google
535
556
  @datastream_stub.call_rpc :create_connection_profile, request, options: options do |response, operation|
536
557
  response = ::Gapic::Operation.new response, @operations_client, options: options
537
558
  yield response, operation if block_given?
538
- return response
559
+ throw :response, response
539
560
  end
540
561
  rescue ::GRPC::BadStatus => e
541
562
  raise ::Google::Cloud::Error.from_error(e)
@@ -654,7 +675,7 @@ module Google
654
675
  @datastream_stub.call_rpc :update_connection_profile, request, options: options do |response, operation|
655
676
  response = ::Gapic::Operation.new response, @operations_client, options: options
656
677
  yield response, operation if block_given?
657
- return response
678
+ throw :response, response
658
679
  end
659
680
  rescue ::GRPC::BadStatus => e
660
681
  raise ::Google::Cloud::Error.from_error(e)
@@ -762,7 +783,7 @@ module Google
762
783
  @datastream_stub.call_rpc :delete_connection_profile, request, options: options do |response, operation|
763
784
  response = ::Gapic::Operation.new response, @operations_client, options: options
764
785
  yield response, operation if block_given?
765
- return response
786
+ throw :response, response
766
787
  end
767
788
  rescue ::GRPC::BadStatus => e
768
789
  raise ::Google::Cloud::Error.from_error(e)
@@ -794,22 +815,38 @@ module Google
794
815
  # the format `projects/*/locations/*`.
795
816
  # @param connection_profile [::Google::Cloud::Datastream::V1::ConnectionProfile, ::Hash]
796
817
  # An ad-hoc connection profile configuration.
818
+ #
819
+ # Note: The following fields are mutually exclusive: `connection_profile`, `connection_profile_name`. If a field in that set is populated, all other fields in the set will automatically be cleared.
797
820
  # @param connection_profile_name [::String]
798
821
  # A reference to an existing connection profile.
822
+ #
823
+ # Note: The following fields are mutually exclusive: `connection_profile_name`, `connection_profile`. If a field in that set is populated, all other fields in the set will automatically be cleared.
799
824
  # @param full_hierarchy [::Boolean]
800
825
  # Whether to retrieve the full hierarchy of data objects (TRUE) or only the
801
826
  # current level (FALSE).
827
+ #
828
+ # Note: The following fields are mutually exclusive: `full_hierarchy`, `hierarchy_depth`. If a field in that set is populated, all other fields in the set will automatically be cleared.
802
829
  # @param hierarchy_depth [::Integer]
803
830
  # The number of hierarchy levels below the current level to be retrieved.
831
+ #
832
+ # Note: The following fields are mutually exclusive: `hierarchy_depth`, `full_hierarchy`. If a field in that set is populated, all other fields in the set will automatically be cleared.
804
833
  # @param oracle_rdbms [::Google::Cloud::Datastream::V1::OracleRdbms, ::Hash]
805
834
  # Oracle RDBMS to enrich with child data objects and metadata.
835
+ #
836
+ # Note: The following fields are mutually exclusive: `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`. If a field in that set is populated, all other fields in the set will automatically be cleared.
806
837
  # @param mysql_rdbms [::Google::Cloud::Datastream::V1::MysqlRdbms, ::Hash]
807
838
  # MySQL RDBMS to enrich with child data objects and metadata.
839
+ #
840
+ # Note: The following fields are mutually exclusive: `mysql_rdbms`, `oracle_rdbms`, `postgresql_rdbms`, `sql_server_rdbms`. If a field in that set is populated, all other fields in the set will automatically be cleared.
808
841
  # @param postgresql_rdbms [::Google::Cloud::Datastream::V1::PostgresqlRdbms, ::Hash]
809
842
  # PostgreSQL RDBMS to enrich with child data objects and metadata.
843
+ #
844
+ # Note: The following fields are mutually exclusive: `postgresql_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `sql_server_rdbms`. If a field in that set is populated, all other fields in the set will automatically be cleared.
810
845
  # @param sql_server_rdbms [::Google::Cloud::Datastream::V1::SqlServerRdbms, ::Hash]
811
846
  # SQLServer RDBMS to enrich with child data objects and metadata.
812
847
  #
848
+ # Note: The following fields are mutually exclusive: `sql_server_rdbms`, `oracle_rdbms`, `mysql_rdbms`, `postgresql_rdbms`. If a field in that set is populated, all other fields in the set will automatically be cleared.
849
+ #
813
850
  # @yield [response, operation] Access the result along with the RPC operation
814
851
  # @yieldparam response [::Google::Cloud::Datastream::V1::DiscoverConnectionProfileResponse]
815
852
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
@@ -869,7 +906,6 @@ module Google
869
906
 
870
907
  @datastream_stub.call_rpc :discover_connection_profile, request, options: options do |response, operation|
871
908
  yield response, operation if block_given?
872
- return response
873
909
  end
874
910
  rescue ::GRPC::BadStatus => e
875
911
  raise ::Google::Cloud::Error.from_error(e)
@@ -974,7 +1010,7 @@ module Google
974
1010
  @datastream_stub.call_rpc :list_streams, request, options: options do |response, operation|
975
1011
  response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_streams, request, response, operation, options
976
1012
  yield response, operation if block_given?
977
- return response
1013
+ throw :response, response
978
1014
  end
979
1015
  rescue ::GRPC::BadStatus => e
980
1016
  raise ::Google::Cloud::Error.from_error(e)
@@ -1060,7 +1096,6 @@ module Google
1060
1096
 
1061
1097
  @datastream_stub.call_rpc :get_stream, request, options: options do |response, operation|
1062
1098
  yield response, operation if block_given?
1063
- return response
1064
1099
  end
1065
1100
  rescue ::GRPC::BadStatus => e
1066
1101
  raise ::Google::Cloud::Error.from_error(e)
@@ -1177,7 +1212,7 @@ module Google
1177
1212
  @datastream_stub.call_rpc :create_stream, request, options: options do |response, operation|
1178
1213
  response = ::Gapic::Operation.new response, @operations_client, options: options
1179
1214
  yield response, operation if block_given?
1180
- return response
1215
+ throw :response, response
1181
1216
  end
1182
1217
  rescue ::GRPC::BadStatus => e
1183
1218
  raise ::Google::Cloud::Error.from_error(e)
@@ -1296,7 +1331,7 @@ module Google
1296
1331
  @datastream_stub.call_rpc :update_stream, request, options: options do |response, operation|
1297
1332
  response = ::Gapic::Operation.new response, @operations_client, options: options
1298
1333
  yield response, operation if block_given?
1299
- return response
1334
+ throw :response, response
1300
1335
  end
1301
1336
  rescue ::GRPC::BadStatus => e
1302
1337
  raise ::Google::Cloud::Error.from_error(e)
@@ -1404,7 +1439,7 @@ module Google
1404
1439
  @datastream_stub.call_rpc :delete_stream, request, options: options do |response, operation|
1405
1440
  response = ::Gapic::Operation.new response, @operations_client, options: options
1406
1441
  yield response, operation if block_given?
1407
- return response
1442
+ throw :response, response
1408
1443
  end
1409
1444
  rescue ::GRPC::BadStatus => e
1410
1445
  raise ::Google::Cloud::Error.from_error(e)
@@ -1505,7 +1540,7 @@ module Google
1505
1540
  @datastream_stub.call_rpc :run_stream, request, options: options do |response, operation|
1506
1541
  response = ::Gapic::Operation.new response, @operations_client, options: options
1507
1542
  yield response, operation if block_given?
1508
- return response
1543
+ throw :response, response
1509
1544
  end
1510
1545
  rescue ::GRPC::BadStatus => e
1511
1546
  raise ::Google::Cloud::Error.from_error(e)
@@ -1591,7 +1626,6 @@ module Google
1591
1626
 
1592
1627
  @datastream_stub.call_rpc :get_stream_object, request, options: options do |response, operation|
1593
1628
  yield response, operation if block_given?
1594
- return response
1595
1629
  end
1596
1630
  rescue ::GRPC::BadStatus => e
1597
1631
  raise ::Google::Cloud::Error.from_error(e)
@@ -1679,7 +1713,6 @@ module Google
1679
1713
 
1680
1714
  @datastream_stub.call_rpc :lookup_stream_object, request, options: options do |response, operation|
1681
1715
  yield response, operation if block_given?
1682
- return response
1683
1716
  end
1684
1717
  rescue ::GRPC::BadStatus => e
1685
1718
  raise ::Google::Cloud::Error.from_error(e)
@@ -1780,7 +1813,7 @@ module Google
1780
1813
  @datastream_stub.call_rpc :list_stream_objects, request, options: options do |response, operation|
1781
1814
  response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_stream_objects, request, response, operation, options
1782
1815
  yield response, operation if block_given?
1783
- return response
1816
+ throw :response, response
1784
1817
  end
1785
1818
  rescue ::GRPC::BadStatus => e
1786
1819
  raise ::Google::Cloud::Error.from_error(e)
@@ -1867,7 +1900,6 @@ module Google
1867
1900
 
1868
1901
  @datastream_stub.call_rpc :start_backfill_job, request, options: options do |response, operation|
1869
1902
  yield response, operation if block_given?
1870
- return response
1871
1903
  end
1872
1904
  rescue ::GRPC::BadStatus => e
1873
1905
  raise ::Google::Cloud::Error.from_error(e)
@@ -1954,7 +1986,6 @@ module Google
1954
1986
 
1955
1987
  @datastream_stub.call_rpc :stop_backfill_job, request, options: options do |response, operation|
1956
1988
  yield response, operation if block_given?
1957
- return response
1958
1989
  end
1959
1990
  rescue ::GRPC::BadStatus => e
1960
1991
  raise ::Google::Cloud::Error.from_error(e)
@@ -2047,7 +2078,6 @@ module Google
2047
2078
 
2048
2079
  @datastream_stub.call_rpc :fetch_static_ips, request, options: options do |response, operation|
2049
2080
  yield response, operation if block_given?
2050
- return response
2051
2081
  end
2052
2082
  rescue ::GRPC::BadStatus => e
2053
2083
  raise ::Google::Cloud::Error.from_error(e)
@@ -2161,7 +2191,7 @@ module Google
2161
2191
  @datastream_stub.call_rpc :create_private_connection, request, options: options do |response, operation|
2162
2192
  response = ::Gapic::Operation.new response, @operations_client, options: options
2163
2193
  yield response, operation if block_given?
2164
- return response
2194
+ throw :response, response
2165
2195
  end
2166
2196
  rescue ::GRPC::BadStatus => e
2167
2197
  raise ::Google::Cloud::Error.from_error(e)
@@ -2247,7 +2277,6 @@ module Google
2247
2277
 
2248
2278
  @datastream_stub.call_rpc :get_private_connection, request, options: options do |response, operation|
2249
2279
  yield response, operation if block_given?
2250
- return response
2251
2280
  end
2252
2281
  rescue ::GRPC::BadStatus => e
2253
2282
  raise ::Google::Cloud::Error.from_error(e)
@@ -2356,7 +2385,7 @@ module Google
2356
2385
  @datastream_stub.call_rpc :list_private_connections, request, options: options do |response, operation|
2357
2386
  response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_private_connections, request, response, operation, options
2358
2387
  yield response, operation if block_given?
2359
- return response
2388
+ throw :response, response
2360
2389
  end
2361
2390
  rescue ::GRPC::BadStatus => e
2362
2391
  raise ::Google::Cloud::Error.from_error(e)
@@ -2467,7 +2496,7 @@ module Google
2467
2496
  @datastream_stub.call_rpc :delete_private_connection, request, options: options do |response, operation|
2468
2497
  response = ::Gapic::Operation.new response, @operations_client, options: options
2469
2498
  yield response, operation if block_given?
2470
- return response
2499
+ throw :response, response
2471
2500
  end
2472
2501
  rescue ::GRPC::BadStatus => e
2473
2502
  raise ::Google::Cloud::Error.from_error(e)
@@ -2580,7 +2609,7 @@ module Google
2580
2609
  @datastream_stub.call_rpc :create_route, request, options: options do |response, operation|
2581
2610
  response = ::Gapic::Operation.new response, @operations_client, options: options
2582
2611
  yield response, operation if block_given?
2583
- return response
2612
+ throw :response, response
2584
2613
  end
2585
2614
  rescue ::GRPC::BadStatus => e
2586
2615
  raise ::Google::Cloud::Error.from_error(e)
@@ -2666,7 +2695,6 @@ module Google
2666
2695
 
2667
2696
  @datastream_stub.call_rpc :get_route, request, options: options do |response, operation|
2668
2697
  yield response, operation if block_given?
2669
- return response
2670
2698
  end
2671
2699
  rescue ::GRPC::BadStatus => e
2672
2700
  raise ::Google::Cloud::Error.from_error(e)
@@ -2774,7 +2802,7 @@ module Google
2774
2802
  @datastream_stub.call_rpc :list_routes, request, options: options do |response, operation|
2775
2803
  response = ::Gapic::PagedEnumerable.new @datastream_stub, :list_routes, request, response, operation, options
2776
2804
  yield response, operation if block_given?
2777
- return response
2805
+ throw :response, response
2778
2806
  end
2779
2807
  rescue ::GRPC::BadStatus => e
2780
2808
  raise ::Google::Cloud::Error.from_error(e)
@@ -2882,7 +2910,7 @@ module Google
2882
2910
  @datastream_stub.call_rpc :delete_route, request, options: options do |response, operation|
2883
2911
  response = ::Gapic::Operation.new response, @operations_client, options: options
2884
2912
  yield response, operation if block_given?
2885
- return response
2913
+ throw :response, response
2886
2914
  end
2887
2915
  rescue ::GRPC::BadStatus => e
2888
2916
  raise ::Google::Cloud::Error.from_error(e)
@@ -2932,6 +2960,13 @@ module Google
2932
2960
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
2933
2961
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
2934
2962
  # * (`nil`) indicating no credentials
2963
+ #
2964
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
2965
+ # external source for authentication to Google Cloud, you must validate it before
2966
+ # providing it to a Google API client library. Providing an unvalidated credential
2967
+ # configuration to Google APIs can compromise the security of your systems and data.
2968
+ # For more information, refer to [Validate credential configurations from external
2969
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
2935
2970
  # @return [::Object]
2936
2971
  # @!attribute [rw] scope
2937
2972
  # The OAuth scopes
@@ -2971,6 +3006,11 @@ module Google
2971
3006
  # default endpoint URL. The default value of nil uses the environment
2972
3007
  # universe (usually the default "googleapis.com" universe).
2973
3008
  # @return [::String,nil]
3009
+ # @!attribute [rw] logger
3010
+ # A custom logger to use for request/response debug logging, or the value
3011
+ # `:default` (the default) to construct a default logger, or `nil` to
3012
+ # explicitly disable logging.
3013
+ # @return [::Logger,:default,nil]
2974
3014
  #
2975
3015
  class Configuration
2976
3016
  extend ::Gapic::Config
@@ -2995,6 +3035,7 @@ module Google
2995
3035
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2996
3036
  config_attr :quota_project, nil, ::String, nil
2997
3037
  config_attr :universe_domain, nil, ::String, nil
3038
+ config_attr :logger, :default, ::Logger, nil, :default
2998
3039
 
2999
3040
  # @private
3000
3041
  def initialize parent_config = nil
@@ -213,7 +213,7 @@ module Google
213
213
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
214
214
  response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
215
215
  yield response, operation if block_given?
216
- return response
216
+ throw :response, response
217
217
  end
218
218
  rescue ::GRPC::BadStatus => e
219
219
  raise ::Google::Cloud::Error.from_error(e)
@@ -309,7 +309,7 @@ module Google
309
309
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
310
310
  response = ::Gapic::Operation.new response, @operations_client, options: options
311
311
  yield response, operation if block_given?
312
- return response
312
+ throw :response, response
313
313
  end
314
314
  rescue ::GRPC::BadStatus => e
315
315
  raise ::Google::Cloud::Error.from_error(e)
@@ -398,7 +398,6 @@ module Google
398
398
 
399
399
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
400
400
  yield response, operation if block_given?
401
- return response
402
401
  end
403
402
  rescue ::GRPC::BadStatus => e
404
403
  raise ::Google::Cloud::Error.from_error(e)
@@ -494,7 +493,6 @@ module Google
494
493
 
495
494
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
496
495
  yield response, operation if block_given?
497
- return response
498
496
  end
499
497
  rescue ::GRPC::BadStatus => e
500
498
  raise ::Google::Cloud::Error.from_error(e)
@@ -592,7 +590,7 @@ module Google
592
590
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
593
591
  response = ::Gapic::Operation.new response, @operations_client, options: options
594
592
  yield response, operation if block_given?
595
- return response
593
+ throw :response, response
596
594
  end
597
595
  rescue ::GRPC::BadStatus => e
598
596
  raise ::Google::Cloud::Error.from_error(e)
@@ -642,6 +640,13 @@ module Google
642
640
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
643
641
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
644
642
  # * (`nil`) indicating no credentials
643
+ #
644
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
645
+ # external source for authentication to Google Cloud, you must validate it before
646
+ # providing it to a Google API client library. Providing an unvalidated credential
647
+ # configuration to Google APIs can compromise the security of your systems and data.
648
+ # For more information, refer to [Validate credential configurations from external
649
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
645
650
  # @return [::Object]
646
651
  # @!attribute [rw] scope
647
652
  # The OAuth scopes
@@ -681,6 +686,11 @@ module Google
681
686
  # default endpoint URL. The default value of nil uses the environment
682
687
  # universe (usually the default "googleapis.com" universe).
683
688
  # @return [::String,nil]
689
+ # @!attribute [rw] logger
690
+ # A custom logger to use for request/response debug logging, or the value
691
+ # `:default` (the default) to construct a default logger, or `nil` to
692
+ # explicitly disable logging.
693
+ # @return [::Logger,:default,nil]
684
694
  #
685
695
  class Configuration
686
696
  extend ::Gapic::Config
@@ -705,6 +715,7 @@ module Google
705
715
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
706
716
  config_attr :quota_project, nil, ::String, nil
707
717
  config_attr :universe_domain, nil, ::String, nil
718
+ config_attr :logger, :default, ::Logger, nil, :default
708
719
 
709
720
  # @private
710
721
  def initialize parent_config = nil