google-cloud-firestore-admin-v1 1.1.0 → 1.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ffaad199ed27b9bb693aef19697ac7c8efe7cbbcbb78dfe558f664c173edb99e
4
- data.tar.gz: 617aff9e02031a7eda441586220edb5e9cbc6e24f6400017b6eac5d7a1f3da11
3
+ metadata.gz: 7dc8ea572c0b2d824575c1591d717ba94dd231dbb618abe69ffd8fa19fa05486
4
+ data.tar.gz: 988f342a094c14e24710d011af6954c0dd6f8f1bcf456cc1a9bfc36dcd4e05d0
5
5
  SHA512:
6
- metadata.gz: 3cf0b6cf8c9190f614f3eae1dfffa1fd1047fa0f88bb144e9aeeef4094574a9b18d85c3ca352bafd13e993e10d4a825671bab70059d5a005f6350f89dade3668
7
- data.tar.gz: e2864ba70b134189f51f16b7dc218ef1e65a76a95c5024faeb9207372b5e4603fd04416588b556a6e1c3f103e47215375b5c0b8eb2d4c8140fe68db2b18d81e2
6
+ metadata.gz: cabd112c6c41e2b97cc83bb1dff0ec0592818515192576473fae00666c495c500a8229d5fd457d47c80aab85bb26c6f62ebdd1e0546ba3a00195e925d412d32a
7
+ data.tar.gz: 197a89c499986c6830d27434727c5657d21a2764c34bb7d5f34cffa6b928df12868edac9dafa8702e40b436f88626ff5adfe01e25a8da5645371df47a632d496
data/README.md CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
43
43
  See also the [Product Documentation](https://cloud.google.com/firestore)
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/firestore/admin/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::Firestore::Admin::V1::FirestoreAdmin::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
@@ -134,6 +134,10 @@ module Google
134
134
 
135
135
  default_config.rpcs.bulk_delete_documents.timeout = 60.0
136
136
 
137
+ default_config.rpcs.create_database.timeout = 120.0
138
+
139
+ default_config.rpcs.restore_database.timeout = 120.0
140
+
137
141
  default_config
138
142
  end
139
143
  yield @configure if block_given?
@@ -228,14 +232,26 @@ module Google
228
232
  universe_domain: @config.universe_domain,
229
233
  channel_args: @config.channel_args,
230
234
  interceptors: @config.interceptors,
231
- channel_pool_config: @config.channel_pool
235
+ channel_pool_config: @config.channel_pool,
236
+ logger: @config.logger
232
237
  )
233
238
 
239
+ @firestore_admin_stub.stub_logger&.info do |entry|
240
+ entry.set_system_name
241
+ entry.set_service
242
+ entry.message = "Created client for #{entry.service}"
243
+ entry.set_credentials_fields credentials
244
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
245
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
246
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
247
+ end
248
+
234
249
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
235
250
  config.credentials = credentials
236
251
  config.quota_project = @quota_project_id
237
252
  config.endpoint = @firestore_admin_stub.endpoint
238
253
  config.universe_domain = @firestore_admin_stub.universe_domain
254
+ config.logger = @firestore_admin_stub.logger if config.respond_to? :logger=
239
255
  end
240
256
  end
241
257
 
@@ -253,6 +269,15 @@ module Google
253
269
  #
254
270
  attr_reader :location_client
255
271
 
272
+ ##
273
+ # The logger used for request/response debug logging.
274
+ #
275
+ # @return [Logger]
276
+ #
277
+ def logger
278
+ @firestore_admin_stub.logger
279
+ end
280
+
256
281
  # Service calls
257
282
 
258
283
  ##
@@ -350,7 +375,7 @@ module Google
350
375
  @firestore_admin_stub.call_rpc :create_index, request, options: options do |response, operation|
351
376
  response = ::Gapic::Operation.new response, @operations_client, options: options
352
377
  yield response, operation if block_given?
353
- return response
378
+ throw :response, response
354
379
  end
355
380
  rescue ::GRPC::BadStatus => e
356
381
  raise ::Google::Cloud::Error.from_error(e)
@@ -450,7 +475,7 @@ module Google
450
475
  @firestore_admin_stub.call_rpc :list_indexes, request, options: options do |response, operation|
451
476
  response = ::Gapic::PagedEnumerable.new @firestore_admin_stub, :list_indexes, request, response, operation, options
452
477
  yield response, operation if block_given?
453
- return response
478
+ throw :response, response
454
479
  end
455
480
  rescue ::GRPC::BadStatus => e
456
481
  raise ::Google::Cloud::Error.from_error(e)
@@ -537,7 +562,6 @@ module Google
537
562
 
538
563
  @firestore_admin_stub.call_rpc :get_index, request, options: options do |response, operation|
539
564
  yield response, operation if block_given?
540
- return response
541
565
  end
542
566
  rescue ::GRPC::BadStatus => e
543
567
  raise ::Google::Cloud::Error.from_error(e)
@@ -624,7 +648,6 @@ module Google
624
648
 
625
649
  @firestore_admin_stub.call_rpc :delete_index, request, options: options do |response, operation|
626
650
  yield response, operation if block_given?
627
- return response
628
651
  end
629
652
  rescue ::GRPC::BadStatus => e
630
653
  raise ::Google::Cloud::Error.from_error(e)
@@ -711,7 +734,6 @@ module Google
711
734
 
712
735
  @firestore_admin_stub.call_rpc :get_field, request, options: options do |response, operation|
713
736
  yield response, operation if block_given?
714
- return response
715
737
  end
716
738
  rescue ::GRPC::BadStatus => e
717
739
  raise ::Google::Cloud::Error.from_error(e)
@@ -823,7 +845,7 @@ module Google
823
845
  @firestore_admin_stub.call_rpc :update_field, request, options: options do |response, operation|
824
846
  response = ::Gapic::Operation.new response, @operations_client, options: options
825
847
  yield response, operation if block_given?
826
- return response
848
+ throw :response, response
827
849
  end
828
850
  rescue ::GRPC::BadStatus => e
829
851
  raise ::Google::Cloud::Error.from_error(e)
@@ -937,7 +959,7 @@ module Google
937
959
  @firestore_admin_stub.call_rpc :list_fields, request, options: options do |response, operation|
938
960
  response = ::Gapic::PagedEnumerable.new @firestore_admin_stub, :list_fields, request, response, operation, options
939
961
  yield response, operation if block_given?
940
- return response
962
+ throw :response, response
941
963
  end
942
964
  rescue ::GRPC::BadStatus => e
943
965
  raise ::Google::Cloud::Error.from_error(e)
@@ -1069,7 +1091,7 @@ module Google
1069
1091
  @firestore_admin_stub.call_rpc :export_documents, request, options: options do |response, operation|
1070
1092
  response = ::Gapic::Operation.new response, @operations_client, options: options
1071
1093
  yield response, operation if block_given?
1072
- return response
1094
+ throw :response, response
1073
1095
  end
1074
1096
  rescue ::GRPC::BadStatus => e
1075
1097
  raise ::Google::Cloud::Error.from_error(e)
@@ -1184,7 +1206,7 @@ module Google
1184
1206
  @firestore_admin_stub.call_rpc :import_documents, request, options: options do |response, operation|
1185
1207
  response = ::Gapic::Operation.new response, @operations_client, options: options
1186
1208
  yield response, operation if block_given?
1187
- return response
1209
+ throw :response, response
1188
1210
  end
1189
1211
  rescue ::GRPC::BadStatus => e
1190
1212
  raise ::Google::Cloud::Error.from_error(e)
@@ -1302,7 +1324,7 @@ module Google
1302
1324
  @firestore_admin_stub.call_rpc :bulk_delete_documents, request, options: options do |response, operation|
1303
1325
  response = ::Gapic::Operation.new response, @operations_client, options: options
1304
1326
  yield response, operation if block_given?
1305
- return response
1327
+ throw :response, response
1306
1328
  end
1307
1329
  rescue ::GRPC::BadStatus => e
1308
1330
  raise ::Google::Cloud::Error.from_error(e)
@@ -1408,7 +1430,7 @@ module Google
1408
1430
  @firestore_admin_stub.call_rpc :create_database, request, options: options do |response, operation|
1409
1431
  response = ::Gapic::Operation.new response, @operations_client, options: options
1410
1432
  yield response, operation if block_given?
1411
- return response
1433
+ throw :response, response
1412
1434
  end
1413
1435
  rescue ::GRPC::BadStatus => e
1414
1436
  raise ::Google::Cloud::Error.from_error(e)
@@ -1495,7 +1517,6 @@ module Google
1495
1517
 
1496
1518
  @firestore_admin_stub.call_rpc :get_database, request, options: options do |response, operation|
1497
1519
  yield response, operation if block_given?
1498
- return response
1499
1520
  end
1500
1521
  rescue ::GRPC::BadStatus => e
1501
1522
  raise ::Google::Cloud::Error.from_error(e)
@@ -1584,7 +1605,6 @@ module Google
1584
1605
 
1585
1606
  @firestore_admin_stub.call_rpc :list_databases, request, options: options do |response, operation|
1586
1607
  yield response, operation if block_given?
1587
- return response
1588
1608
  end
1589
1609
  rescue ::GRPC::BadStatus => e
1590
1610
  raise ::Google::Cloud::Error.from_error(e)
@@ -1680,7 +1700,7 @@ module Google
1680
1700
  @firestore_admin_stub.call_rpc :update_database, request, options: options do |response, operation|
1681
1701
  response = ::Gapic::Operation.new response, @operations_client, options: options
1682
1702
  yield response, operation if block_given?
1683
- return response
1703
+ throw :response, response
1684
1704
  end
1685
1705
  rescue ::GRPC::BadStatus => e
1686
1706
  raise ::Google::Cloud::Error.from_error(e)
@@ -1779,7 +1799,7 @@ module Google
1779
1799
  @firestore_admin_stub.call_rpc :delete_database, request, options: options do |response, operation|
1780
1800
  response = ::Gapic::Operation.new response, @operations_client, options: options
1781
1801
  yield response, operation if block_given?
1782
- return response
1802
+ throw :response, response
1783
1803
  end
1784
1804
  rescue ::GRPC::BadStatus => e
1785
1805
  raise ::Google::Cloud::Error.from_error(e)
@@ -1867,7 +1887,6 @@ module Google
1867
1887
 
1868
1888
  @firestore_admin_stub.call_rpc :get_backup, request, options: options do |response, operation|
1869
1889
  yield response, operation if block_given?
1870
- return response
1871
1890
  end
1872
1891
  rescue ::GRPC::BadStatus => e
1873
1892
  raise ::Google::Cloud::Error.from_error(e)
@@ -1886,7 +1905,7 @@ module Google
1886
1905
  # @param options [::Gapic::CallOptions, ::Hash]
1887
1906
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1888
1907
  #
1889
- # @overload list_backups(parent: nil)
1908
+ # @overload list_backups(parent: nil, filter: nil)
1890
1909
  # Pass arguments to `list_backups` via keyword arguments. Note that at
1891
1910
  # least one keyword argument is required. To specify no parameters, or to keep all
1892
1911
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1898,6 +1917,19 @@ module Google
1898
1917
  # Use `{location} = '-'` to list backups from all locations for the given
1899
1918
  # project. This allows listing backups from a single location or from all
1900
1919
  # locations.
1920
+ # @param filter [::String]
1921
+ # An expression that filters the list of returned backups.
1922
+ #
1923
+ # A filter expression consists of a field name, a comparison operator, and a
1924
+ # value for filtering.
1925
+ # The value must be a string, a number, or a boolean. The comparison operator
1926
+ # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
1927
+ # Colon `:` is the contains operator. Filter rules are not case sensitive.
1928
+ #
1929
+ # The following fields in the {::Google::Cloud::Firestore::Admin::V1::Backup Backup} are
1930
+ # eligible for filtering:
1931
+ #
1932
+ # * `database_uid` (supports `=` only)
1901
1933
  #
1902
1934
  # @yield [response, operation] Access the result along with the RPC operation
1903
1935
  # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse]
@@ -1958,7 +1990,6 @@ module Google
1958
1990
 
1959
1991
  @firestore_admin_stub.call_rpc :list_backups, request, options: options do |response, operation|
1960
1992
  yield response, operation if block_given?
1961
- return response
1962
1993
  end
1963
1994
  rescue ::GRPC::BadStatus => e
1964
1995
  raise ::Google::Cloud::Error.from_error(e)
@@ -2046,7 +2077,6 @@ module Google
2046
2077
 
2047
2078
  @firestore_admin_stub.call_rpc :delete_backup, request, options: options do |response, operation|
2048
2079
  yield response, operation if block_given?
2049
- return response
2050
2080
  end
2051
2081
  rescue ::GRPC::BadStatus => e
2052
2082
  raise ::Google::Cloud::Error.from_error(e)
@@ -2181,7 +2211,7 @@ module Google
2181
2211
  @firestore_admin_stub.call_rpc :restore_database, request, options: options do |response, operation|
2182
2212
  response = ::Gapic::Operation.new response, @operations_client, options: options
2183
2213
  yield response, operation if block_given?
2184
- return response
2214
+ throw :response, response
2185
2215
  end
2186
2216
  rescue ::GRPC::BadStatus => e
2187
2217
  raise ::Google::Cloud::Error.from_error(e)
@@ -2273,7 +2303,6 @@ module Google
2273
2303
 
2274
2304
  @firestore_admin_stub.call_rpc :create_backup_schedule, request, options: options do |response, operation|
2275
2305
  yield response, operation if block_given?
2276
- return response
2277
2306
  end
2278
2307
  rescue ::GRPC::BadStatus => e
2279
2308
  raise ::Google::Cloud::Error.from_error(e)
@@ -2362,7 +2391,6 @@ module Google
2362
2391
 
2363
2392
  @firestore_admin_stub.call_rpc :get_backup_schedule, request, options: options do |response, operation|
2364
2393
  yield response, operation if block_given?
2365
- return response
2366
2394
  end
2367
2395
  rescue ::GRPC::BadStatus => e
2368
2396
  raise ::Google::Cloud::Error.from_error(e)
@@ -2450,7 +2478,6 @@ module Google
2450
2478
 
2451
2479
  @firestore_admin_stub.call_rpc :list_backup_schedules, request, options: options do |response, operation|
2452
2480
  yield response, operation if block_given?
2453
- return response
2454
2481
  end
2455
2482
  rescue ::GRPC::BadStatus => e
2456
2483
  raise ::Google::Cloud::Error.from_error(e)
@@ -2538,7 +2565,6 @@ module Google
2538
2565
 
2539
2566
  @firestore_admin_stub.call_rpc :update_backup_schedule, request, options: options do |response, operation|
2540
2567
  yield response, operation if block_given?
2541
- return response
2542
2568
  end
2543
2569
  rescue ::GRPC::BadStatus => e
2544
2570
  raise ::Google::Cloud::Error.from_error(e)
@@ -2627,7 +2653,6 @@ module Google
2627
2653
 
2628
2654
  @firestore_admin_stub.call_rpc :delete_backup_schedule, request, options: options do |response, operation|
2629
2655
  yield response, operation if block_given?
2630
- return response
2631
2656
  end
2632
2657
  rescue ::GRPC::BadStatus => e
2633
2658
  raise ::Google::Cloud::Error.from_error(e)
@@ -2677,6 +2702,13 @@ module Google
2677
2702
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
2678
2703
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
2679
2704
  # * (`nil`) indicating no credentials
2705
+ #
2706
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
2707
+ # external source for authentication to Google Cloud, you must validate it before
2708
+ # providing it to a Google API client library. Providing an unvalidated credential
2709
+ # configuration to Google APIs can compromise the security of your systems and data.
2710
+ # For more information, refer to [Validate credential configurations from external
2711
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
2680
2712
  # @return [::Object]
2681
2713
  # @!attribute [rw] scope
2682
2714
  # The OAuth scopes
@@ -2716,6 +2748,11 @@ module Google
2716
2748
  # default endpoint URL. The default value of nil uses the environment
2717
2749
  # universe (usually the default "googleapis.com" universe).
2718
2750
  # @return [::String,nil]
2751
+ # @!attribute [rw] logger
2752
+ # A custom logger to use for request/response debug logging, or the value
2753
+ # `:default` (the default) to construct a default logger, or `nil` to
2754
+ # explicitly disable logging.
2755
+ # @return [::Logger,:default,nil]
2719
2756
  #
2720
2757
  class Configuration
2721
2758
  extend ::Gapic::Config
@@ -2740,6 +2777,7 @@ module Google
2740
2777
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2741
2778
  config_attr :quota_project, nil, ::String, nil
2742
2779
  config_attr :universe_domain, nil, ::String, nil
2780
+ config_attr :logger, :default, ::Logger, nil, :default
2743
2781
 
2744
2782
  # @private
2745
2783
  def initialize parent_config = nil
@@ -125,14 +125,6 @@ module Google
125
125
  # Lists operations that match the specified filter in the request. If the
126
126
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
127
127
  #
128
- # NOTE: the `name` binding allows API services to override the binding
129
- # to use different resource name schemes, such as `users/*/operations`. To
130
- # override the binding, API services can add a binding such as
131
- # `"/v1/{name=users/*}/operations"` to their service configuration.
132
- # For backwards compatibility, the default name includes the operations
133
- # collection id, however overriding users must ensure the name binding
134
- # is the parent resource, without the operations collection id.
135
- #
136
128
  # @overload list_operations(request, options = nil)
137
129
  # Pass arguments to `list_operations` via a request object, either of type
138
130
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -222,7 +214,7 @@ module Google
222
214
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
223
215
  response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
224
216
  yield response, operation if block_given?
225
- return response
217
+ throw :response, response
226
218
  end
227
219
  rescue ::GRPC::BadStatus => e
228
220
  raise ::Google::Cloud::Error.from_error(e)
@@ -318,7 +310,7 @@ module Google
318
310
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
319
311
  response = ::Gapic::Operation.new response, @operations_client, options: options
320
312
  yield response, operation if block_given?
321
- return response
313
+ throw :response, response
322
314
  end
323
315
  rescue ::GRPC::BadStatus => e
324
316
  raise ::Google::Cloud::Error.from_error(e)
@@ -407,7 +399,6 @@ module Google
407
399
 
408
400
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
409
401
  yield response, operation if block_given?
410
- return response
411
402
  end
412
403
  rescue ::GRPC::BadStatus => e
413
404
  raise ::Google::Cloud::Error.from_error(e)
@@ -422,8 +413,9 @@ module Google
422
413
  # other methods to check whether the cancellation succeeded or whether the
423
414
  # operation completed despite cancellation. On successful cancellation,
424
415
  # the operation is not deleted; instead, it becomes an operation with
425
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
426
- # corresponding to `Code.CANCELLED`.
416
+ # an {::Google::Longrunning::Operation#error Operation.error} value with a
417
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
418
+ # `Code.CANCELLED`.
427
419
  #
428
420
  # @overload cancel_operation(request, options = nil)
429
421
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -502,7 +494,6 @@ module Google
502
494
 
503
495
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
504
496
  yield response, operation if block_given?
505
- return response
506
497
  end
507
498
  rescue ::GRPC::BadStatus => e
508
499
  raise ::Google::Cloud::Error.from_error(e)
@@ -600,7 +591,7 @@ module Google
600
591
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
601
592
  response = ::Gapic::Operation.new response, @operations_client, options: options
602
593
  yield response, operation if block_given?
603
- return response
594
+ throw :response, response
604
595
  end
605
596
  rescue ::GRPC::BadStatus => e
606
597
  raise ::Google::Cloud::Error.from_error(e)
@@ -650,6 +641,13 @@ module Google
650
641
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
651
642
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
652
643
  # * (`nil`) indicating no credentials
644
+ #
645
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
646
+ # external source for authentication to Google Cloud, you must validate it before
647
+ # providing it to a Google API client library. Providing an unvalidated credential
648
+ # configuration to Google APIs can compromise the security of your systems and data.
649
+ # For more information, refer to [Validate credential configurations from external
650
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
653
651
  # @return [::Object]
654
652
  # @!attribute [rw] scope
655
653
  # The OAuth scopes
@@ -689,6 +687,11 @@ module Google
689
687
  # default endpoint URL. The default value of nil uses the environment
690
688
  # universe (usually the default "googleapis.com" universe).
691
689
  # @return [::String,nil]
690
+ # @!attribute [rw] logger
691
+ # A custom logger to use for request/response debug logging, or the value
692
+ # `:default` (the default) to construct a default logger, or `nil` to
693
+ # explicitly disable logging.
694
+ # @return [::Logger,:default,nil]
692
695
  #
693
696
  class Configuration
694
697
  extend ::Gapic::Config
@@ -713,6 +716,7 @@ module Google
713
716
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
714
717
  config_attr :quota_project, nil, ::String, nil
715
718
  config_attr :universe_domain, nil, ::String, nil
719
+ config_attr :logger, :default, ::Logger, nil, :default
716
720
 
717
721
  # @private
718
722
  def initialize parent_config = nil