google-cloud-document_ai-v1beta3 0.37.0 → 0.39.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -21
  3. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/client.rb +68 -27
  4. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/operations.rb +19 -15
  5. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/client.rb +68 -27
  6. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/operations.rb +50 -38
  7. data/lib/google/cloud/document_ai/v1beta3/document_processor_service/rest/service_stub.rb +198 -140
  8. data/lib/google/cloud/document_ai/v1beta3/document_service/client.rb +39 -8
  9. data/lib/google/cloud/document_ai/v1beta3/document_service/operations.rb +19 -15
  10. data/lib/google/cloud/document_ai/v1beta3/document_service/rest/client.rb +39 -8
  11. data/lib/google/cloud/document_ai/v1beta3/document_service/rest/operations.rb +50 -38
  12. data/lib/google/cloud/document_ai/v1beta3/document_service/rest/service_stub.rb +70 -44
  13. data/lib/google/cloud/document_ai/v1beta3/version.rb +1 -1
  14. data/lib/google/cloud/documentai/v1beta3/dataset_pb.rb +1 -1
  15. data/proto_docs/google/api/client.rb +39 -0
  16. data/proto_docs/google/cloud/documentai/v1beta3/dataset.rb +20 -0
  17. data/proto_docs/google/cloud/documentai/v1beta3/document.rb +34 -0
  18. data/proto_docs/google/cloud/documentai/v1beta3/document_io.rb +4 -0
  19. data/proto_docs/google/cloud/documentai/v1beta3/document_processor_service.rb +20 -0
  20. data/proto_docs/google/cloud/documentai/v1beta3/document_service.rb +4 -0
  21. data/proto_docs/google/cloud/documentai/v1beta3/processor.rb +4 -0
  22. data/proto_docs/google/longrunning/operations.rb +23 -14
  23. data/proto_docs/google/type/datetime.rb +4 -0
  24. metadata +6 -9
@@ -78,17 +78,17 @@ module Google
78
78
 
79
79
  default_config.rpcs.process_document.timeout = 300.0
80
80
  default_config.rpcs.process_document.retry_policy = {
81
- initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
81
+ initial_delay: 1.0, max_delay: 90.0, multiplier: 9.0, retry_codes: [4, 14, 8]
82
82
  }
83
83
 
84
84
  default_config.rpcs.batch_process_documents.timeout = 120.0
85
85
  default_config.rpcs.batch_process_documents.retry_policy = {
86
- initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
86
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.5, retry_codes: [4, 14]
87
87
  }
88
88
 
89
89
  default_config.rpcs.review_document.timeout = 120.0
90
90
  default_config.rpcs.review_document.retry_policy = {
91
- initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
91
+ initial_delay: 1.0, max_delay: 60.0, multiplier: 1.5, retry_codes: [4, 14]
92
92
  }
93
93
 
94
94
  default_config
@@ -176,15 +176,27 @@ module Google
176
176
  endpoint: @config.endpoint,
177
177
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
178
178
  universe_domain: @config.universe_domain,
179
- credentials: credentials
179
+ credentials: credentials,
180
+ logger: @config.logger
180
181
  )
181
182
 
183
+ @document_processor_service_stub.logger(stub: true)&.info do |entry|
184
+ entry.set_system_name
185
+ entry.set_service
186
+ entry.message = "Created client for #{entry.service}"
187
+ entry.set_credentials_fields credentials
188
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
189
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
190
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
191
+ end
192
+
182
193
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
183
194
  config.credentials = credentials
184
195
  config.quota_project = @quota_project_id
185
196
  config.endpoint = @document_processor_service_stub.endpoint
186
197
  config.universe_domain = @document_processor_service_stub.universe_domain
187
198
  config.bindings_override = @config.bindings_override
199
+ config.logger = @document_processor_service_stub.logger if config.respond_to? :logger=
188
200
  end
189
201
  end
190
202
 
@@ -202,6 +214,15 @@ module Google
202
214
  #
203
215
  attr_reader :location_client
204
216
 
217
+ ##
218
+ # The logger used for request/response debug logging.
219
+ #
220
+ # @return [Logger]
221
+ #
222
+ def logger
223
+ @document_processor_service_stub.logger
224
+ end
225
+
205
226
  # Service calls
206
227
 
207
228
  ##
@@ -224,10 +245,16 @@ module Google
224
245
  #
225
246
  # @param inline_document [::Google::Cloud::DocumentAI::V1beta3::Document, ::Hash]
226
247
  # An inline document proto.
248
+ #
249
+ # Note: The following fields are mutually exclusive: `inline_document`, `raw_document`, `gcs_document`. If a field in that set is populated, all other fields in the set will automatically be cleared.
227
250
  # @param raw_document [::Google::Cloud::DocumentAI::V1beta3::RawDocument, ::Hash]
228
251
  # A raw document content (bytes).
252
+ #
253
+ # Note: The following fields are mutually exclusive: `raw_document`, `inline_document`, `gcs_document`. If a field in that set is populated, all other fields in the set will automatically be cleared.
229
254
  # @param gcs_document [::Google::Cloud::DocumentAI::V1beta3::GcsDocument, ::Hash]
230
255
  # A raw document on Google Cloud Storage.
256
+ #
257
+ # Note: The following fields are mutually exclusive: `gcs_document`, `inline_document`, `raw_document`. If a field in that set is populated, all other fields in the set will automatically be cleared.
231
258
  # @param name [::String]
232
259
  # Required. The resource name of the
233
260
  # {::Google::Cloud::DocumentAI::V1beta3::Processor Processor} or
@@ -316,7 +343,6 @@ module Google
316
343
 
317
344
  @document_processor_service_stub.process_document request, options do |result, operation|
318
345
  yield result, operation if block_given?
319
- return result
320
346
  end
321
347
  rescue ::Gapic::Rest::Error => e
322
348
  raise ::Google::Cloud::Error.from_error(e)
@@ -433,7 +459,7 @@ module Google
433
459
  @document_processor_service_stub.batch_process_documents request, options do |result, operation|
434
460
  result = ::Gapic::Operation.new result, @operations_client, options: options
435
461
  yield result, operation if block_given?
436
- return result
462
+ throw :response, result
437
463
  end
438
464
  rescue ::Gapic::Rest::Error => e
439
465
  raise ::Google::Cloud::Error.from_error(e)
@@ -515,7 +541,6 @@ module Google
515
541
 
516
542
  @document_processor_service_stub.fetch_processor_types request, options do |result, operation|
517
543
  yield result, operation if block_given?
518
- return result
519
544
  end
520
545
  rescue ::Gapic::Rest::Error => e
521
546
  raise ::Google::Cloud::Error.from_error(e)
@@ -606,7 +631,7 @@ module Google
606
631
  @document_processor_service_stub.list_processor_types request, options do |result, operation|
607
632
  result = ::Gapic::Rest::PagedEnumerable.new @document_processor_service_stub, :list_processor_types, "processor_types", request, result, options
608
633
  yield result, operation if block_given?
609
- return result
634
+ throw :response, result
610
635
  end
611
636
  rescue ::Gapic::Rest::Error => e
612
637
  raise ::Google::Cloud::Error.from_error(e)
@@ -685,7 +710,6 @@ module Google
685
710
 
686
711
  @document_processor_service_stub.get_processor_type request, options do |result, operation|
687
712
  yield result, operation if block_given?
688
- return result
689
713
  end
690
714
  rescue ::Gapic::Rest::Error => e
691
715
  raise ::Google::Cloud::Error.from_error(e)
@@ -777,7 +801,7 @@ module Google
777
801
  @document_processor_service_stub.list_processors request, options do |result, operation|
778
802
  result = ::Gapic::Rest::PagedEnumerable.new @document_processor_service_stub, :list_processors, "processors", request, result, options
779
803
  yield result, operation if block_given?
780
- return result
804
+ throw :response, result
781
805
  end
782
806
  rescue ::Gapic::Rest::Error => e
783
807
  raise ::Google::Cloud::Error.from_error(e)
@@ -856,7 +880,6 @@ module Google
856
880
 
857
881
  @document_processor_service_stub.get_processor request, options do |result, operation|
858
882
  yield result, operation if block_given?
859
- return result
860
883
  end
861
884
  rescue ::Gapic::Rest::Error => e
862
885
  raise ::Google::Cloud::Error.from_error(e)
@@ -884,8 +907,12 @@ module Google
884
907
  #
885
908
  # @param custom_document_extraction_options [::Google::Cloud::DocumentAI::V1beta3::TrainProcessorVersionRequest::CustomDocumentExtractionOptions, ::Hash]
886
909
  # Options to control Custom Document Extraction (CDE) Processor.
910
+ #
911
+ # Note: The following fields are mutually exclusive: `custom_document_extraction_options`, `foundation_model_tuning_options`. If a field in that set is populated, all other fields in the set will automatically be cleared.
887
912
  # @param foundation_model_tuning_options [::Google::Cloud::DocumentAI::V1beta3::TrainProcessorVersionRequest::FoundationModelTuningOptions, ::Hash]
888
913
  # Options to control foundation model tuning of a processor.
914
+ #
915
+ # Note: The following fields are mutually exclusive: `foundation_model_tuning_options`, `custom_document_extraction_options`. If a field in that set is populated, all other fields in the set will automatically be cleared.
889
916
  # @param parent [::String]
890
917
  # Required. The parent (project, location and processor) to create the new
891
918
  # version for. Format:
@@ -962,7 +989,7 @@ module Google
962
989
  @document_processor_service_stub.train_processor_version request, options do |result, operation|
963
990
  result = ::Gapic::Operation.new result, @operations_client, options: options
964
991
  yield result, operation if block_given?
965
- return result
992
+ throw :response, result
966
993
  end
967
994
  rescue ::Gapic::Rest::Error => e
968
995
  raise ::Google::Cloud::Error.from_error(e)
@@ -1041,7 +1068,6 @@ module Google
1041
1068
 
1042
1069
  @document_processor_service_stub.get_processor_version request, options do |result, operation|
1043
1070
  yield result, operation if block_given?
1044
- return result
1045
1071
  end
1046
1072
  rescue ::Gapic::Rest::Error => e
1047
1073
  raise ::Google::Cloud::Error.from_error(e)
@@ -1134,7 +1160,7 @@ module Google
1134
1160
  @document_processor_service_stub.list_processor_versions request, options do |result, operation|
1135
1161
  result = ::Gapic::Rest::PagedEnumerable.new @document_processor_service_stub, :list_processor_versions, "processor_versions", request, result, options
1136
1162
  yield result, operation if block_given?
1137
- return result
1163
+ throw :response, result
1138
1164
  end
1139
1165
  rescue ::Gapic::Rest::Error => e
1140
1166
  raise ::Google::Cloud::Error.from_error(e)
@@ -1222,7 +1248,7 @@ module Google
1222
1248
  @document_processor_service_stub.delete_processor_version request, options do |result, operation|
1223
1249
  result = ::Gapic::Operation.new result, @operations_client, options: options
1224
1250
  yield result, operation if block_given?
1225
- return result
1251
+ throw :response, result
1226
1252
  end
1227
1253
  rescue ::Gapic::Rest::Error => e
1228
1254
  raise ::Google::Cloud::Error.from_error(e)
@@ -1309,7 +1335,7 @@ module Google
1309
1335
  @document_processor_service_stub.deploy_processor_version request, options do |result, operation|
1310
1336
  result = ::Gapic::Operation.new result, @operations_client, options: options
1311
1337
  yield result, operation if block_given?
1312
- return result
1338
+ throw :response, result
1313
1339
  end
1314
1340
  rescue ::Gapic::Rest::Error => e
1315
1341
  raise ::Google::Cloud::Error.from_error(e)
@@ -1396,7 +1422,7 @@ module Google
1396
1422
  @document_processor_service_stub.undeploy_processor_version request, options do |result, operation|
1397
1423
  result = ::Gapic::Operation.new result, @operations_client, options: options
1398
1424
  yield result, operation if block_given?
1399
- return result
1425
+ throw :response, result
1400
1426
  end
1401
1427
  rescue ::Gapic::Rest::Error => e
1402
1428
  raise ::Google::Cloud::Error.from_error(e)
@@ -1489,7 +1515,6 @@ module Google
1489
1515
 
1490
1516
  @document_processor_service_stub.create_processor request, options do |result, operation|
1491
1517
  yield result, operation if block_given?
1492
- return result
1493
1518
  end
1494
1519
  rescue ::Gapic::Rest::Error => e
1495
1520
  raise ::Google::Cloud::Error.from_error(e)
@@ -1577,7 +1602,7 @@ module Google
1577
1602
  @document_processor_service_stub.delete_processor request, options do |result, operation|
1578
1603
  result = ::Gapic::Operation.new result, @operations_client, options: options
1579
1604
  yield result, operation if block_given?
1580
- return result
1605
+ throw :response, result
1581
1606
  end
1582
1607
  rescue ::Gapic::Rest::Error => e
1583
1608
  raise ::Google::Cloud::Error.from_error(e)
@@ -1664,7 +1689,7 @@ module Google
1664
1689
  @document_processor_service_stub.enable_processor request, options do |result, operation|
1665
1690
  result = ::Gapic::Operation.new result, @operations_client, options: options
1666
1691
  yield result, operation if block_given?
1667
- return result
1692
+ throw :response, result
1668
1693
  end
1669
1694
  rescue ::Gapic::Rest::Error => e
1670
1695
  raise ::Google::Cloud::Error.from_error(e)
@@ -1751,7 +1776,7 @@ module Google
1751
1776
  @document_processor_service_stub.disable_processor request, options do |result, operation|
1752
1777
  result = ::Gapic::Operation.new result, @operations_client, options: options
1753
1778
  yield result, operation if block_given?
1754
- return result
1779
+ throw :response, result
1755
1780
  end
1756
1781
  rescue ::Gapic::Rest::Error => e
1757
1782
  raise ::Google::Cloud::Error.from_error(e)
@@ -1849,7 +1874,7 @@ module Google
1849
1874
  @document_processor_service_stub.set_default_processor_version request, options do |result, operation|
1850
1875
  result = ::Gapic::Operation.new result, @operations_client, options: options
1851
1876
  yield result, operation if block_given?
1852
- return result
1877
+ throw :response, result
1853
1878
  end
1854
1879
  rescue ::Gapic::Rest::Error => e
1855
1880
  raise ::Google::Cloud::Error.from_error(e)
@@ -1949,7 +1974,7 @@ module Google
1949
1974
  @document_processor_service_stub.review_document request, options do |result, operation|
1950
1975
  result = ::Gapic::Operation.new result, @operations_client, options: options
1951
1976
  yield result, operation if block_given?
1952
- return result
1977
+ throw :response, result
1953
1978
  end
1954
1979
  rescue ::Gapic::Rest::Error => e
1955
1980
  raise ::Google::Cloud::Error.from_error(e)
@@ -2043,7 +2068,7 @@ module Google
2043
2068
  @document_processor_service_stub.evaluate_processor_version request, options do |result, operation|
2044
2069
  result = ::Gapic::Operation.new result, @operations_client, options: options
2045
2070
  yield result, operation if block_given?
2046
- return result
2071
+ throw :response, result
2047
2072
  end
2048
2073
  rescue ::Gapic::Rest::Error => e
2049
2074
  raise ::Google::Cloud::Error.from_error(e)
@@ -2124,7 +2149,6 @@ module Google
2124
2149
 
2125
2150
  @document_processor_service_stub.get_evaluation request, options do |result, operation|
2126
2151
  yield result, operation if block_given?
2127
- return result
2128
2152
  end
2129
2153
  rescue ::Gapic::Rest::Error => e
2130
2154
  raise ::Google::Cloud::Error.from_error(e)
@@ -2218,7 +2242,7 @@ module Google
2218
2242
  @document_processor_service_stub.list_evaluations request, options do |result, operation|
2219
2243
  result = ::Gapic::Rest::PagedEnumerable.new @document_processor_service_stub, :list_evaluations, "evaluations", request, result, options
2220
2244
  yield result, operation if block_given?
2221
- return result
2245
+ throw :response, result
2222
2246
  end
2223
2247
  rescue ::Gapic::Rest::Error => e
2224
2248
  raise ::Google::Cloud::Error.from_error(e)
@@ -2247,9 +2271,13 @@ module Google
2247
2271
  # and destination processor need to be in the same environment and region.
2248
2272
  # Note that ProcessorVersions with `model_type` `MODEL_TYPE_LLM` are not
2249
2273
  # supported.
2274
+ #
2275
+ # Note: The following fields are mutually exclusive: `processor_version_source`, `external_processor_version_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
2250
2276
  # @param external_processor_version_source [::Google::Cloud::DocumentAI::V1beta3::ImportProcessorVersionRequest::ExternalProcessorVersionSource, ::Hash]
2251
2277
  # The source processor version to import from. It can be from a different
2252
2278
  # environment and region than the destination processor.
2279
+ #
2280
+ # Note: The following fields are mutually exclusive: `external_processor_version_source`, `processor_version_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
2253
2281
  # @param parent [::String]
2254
2282
  # Required. The destination processor name to create the processor version
2255
2283
  # in. Format:
@@ -2315,7 +2343,7 @@ module Google
2315
2343
  @document_processor_service_stub.import_processor_version request, options do |result, operation|
2316
2344
  result = ::Gapic::Operation.new result, @operations_client, options: options
2317
2345
  yield result, operation if block_given?
2318
- return result
2346
+ throw :response, result
2319
2347
  end
2320
2348
  rescue ::Gapic::Rest::Error => e
2321
2349
  raise ::Google::Cloud::Error.from_error(e)
@@ -2363,6 +2391,13 @@ module Google
2363
2391
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2364
2392
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2365
2393
  # * (`nil`) indicating no credentials
2394
+ #
2395
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
2396
+ # external source for authentication to Google Cloud, you must validate it before
2397
+ # providing it to a Google API client library. Providing an unvalidated credential
2398
+ # configuration to Google APIs can compromise the security of your systems and data.
2399
+ # For more information, refer to [Validate credential configurations from external
2400
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
2366
2401
  # @return [::Object]
2367
2402
  # @!attribute [rw] scope
2368
2403
  # The OAuth scopes
@@ -2395,6 +2430,11 @@ module Google
2395
2430
  # default endpoint URL. The default value of nil uses the environment
2396
2431
  # universe (usually the default "googleapis.com" universe).
2397
2432
  # @return [::String,nil]
2433
+ # @!attribute [rw] logger
2434
+ # A custom logger to use for request/response debug logging, or the value
2435
+ # `:default` (the default) to construct a default logger, or `nil` to
2436
+ # explicitly disable logging.
2437
+ # @return [::Logger,:default,nil]
2398
2438
  #
2399
2439
  class Configuration
2400
2440
  extend ::Gapic::Config
@@ -2423,6 +2463,7 @@ module Google
2423
2463
  # by the host service.
2424
2464
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
2425
2465
  config_attr :bindings_override, {}, ::Hash, nil
2466
+ config_attr :logger, :default, ::Logger, nil, :default
2426
2467
 
2427
2468
  # @private
2428
2469
  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
  ##