google-cloud-vision_ai-v1 0.2.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -21
  3. data/lib/google/cloud/vision_ai/v1/app_platform/client.rb +57 -27
  4. data/lib/google/cloud/vision_ai/v1/app_platform/operations.rb +19 -15
  5. data/lib/google/cloud/vision_ai/v1/app_platform/rest/client.rb +53 -27
  6. data/lib/google/cloud/vision_ai/v1/app_platform/rest/operations.rb +50 -38
  7. data/lib/google/cloud/vision_ai/v1/app_platform/rest/service_stub.rb +222 -158
  8. data/lib/google/cloud/vision_ai/v1/health_check_service/client.rb +36 -2
  9. data/lib/google/cloud/vision_ai/v1/health_check_service/rest/client.rb +36 -2
  10. data/lib/google/cloud/vision_ai/v1/health_check_service/rest/service_stub.rb +22 -8
  11. data/lib/google/cloud/vision_ai/v1/live_video_analytics/client.rb +50 -19
  12. data/lib/google/cloud/vision_ai/v1/live_video_analytics/operations.rb +19 -15
  13. data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/client.rb +47 -19
  14. data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/operations.rb +50 -38
  15. data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/service_stub.rb +158 -110
  16. data/lib/google/cloud/vision_ai/v1/streaming_service/client.rb +36 -7
  17. data/lib/google/cloud/vision_ai/v1/streaming_service/rest/client.rb +36 -4
  18. data/lib/google/cloud/vision_ai/v1/streaming_service/rest/service_stub.rb +38 -20
  19. data/lib/google/cloud/vision_ai/v1/streams_service/client.rb +54 -24
  20. data/lib/google/cloud/vision_ai/v1/streams_service/operations.rb +19 -15
  21. data/lib/google/cloud/vision_ai/v1/streams_service/rest/client.rb +50 -24
  22. data/lib/google/cloud/vision_ai/v1/streams_service/rest/operations.rb +50 -38
  23. data/lib/google/cloud/vision_ai/v1/streams_service/rest/service_stub.rb +198 -140
  24. data/lib/google/cloud/vision_ai/v1/version.rb +1 -1
  25. data/lib/google/cloud/vision_ai/v1/warehouse/client.rb +71 -64
  26. data/lib/google/cloud/vision_ai/v1/warehouse/operations.rb +19 -15
  27. data/lib/google/cloud/vision_ai/v1/warehouse/rest/client.rb +70 -63
  28. data/lib/google/cloud/vision_ai/v1/warehouse/rest/operations.rb +50 -38
  29. data/lib/google/cloud/vision_ai/v1/warehouse/rest/service_stub.rb +510 -374
  30. data/proto_docs/google/api/client.rb +39 -0
  31. data/proto_docs/google/cloud/visionai/v1/annotations.rb +4 -0
  32. data/proto_docs/google/cloud/visionai/v1/lva.rb +8 -0
  33. data/proto_docs/google/cloud/visionai/v1/platform.rb +44 -0
  34. data/proto_docs/google/cloud/visionai/v1/streaming_resources.rb +4 -0
  35. data/proto_docs/google/cloud/visionai/v1/streaming_service.rb +32 -0
  36. data/proto_docs/google/cloud/visionai/v1/warehouse.rb +64 -0
  37. data/proto_docs/google/longrunning/operations.rb +23 -14
  38. data/proto_docs/google/protobuf/struct.rb +12 -0
  39. data/proto_docs/google/type/datetime.rb +4 -0
  40. metadata +6 -9
@@ -162,14 +162,26 @@ module Google
162
162
  endpoint: @config.endpoint,
163
163
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
164
164
  universe_domain: @config.universe_domain,
165
- credentials: credentials
165
+ credentials: credentials,
166
+ logger: @config.logger
166
167
  )
167
168
 
169
+ @streams_service_stub.logger(stub: true)&.info do |entry|
170
+ entry.set_system_name
171
+ entry.set_service
172
+ entry.message = "Created client for #{entry.service}"
173
+ entry.set_credentials_fields credentials
174
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
175
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
176
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
177
+ end
178
+
168
179
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
169
180
  config.credentials = credentials
170
181
  config.quota_project = @quota_project_id
171
182
  config.endpoint = @streams_service_stub.endpoint
172
183
  config.universe_domain = @streams_service_stub.universe_domain
184
+ config.logger = @streams_service_stub.logger if config.respond_to? :logger=
173
185
  end
174
186
 
175
187
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
@@ -177,6 +189,7 @@ module Google
177
189
  config.quota_project = @quota_project_id
178
190
  config.endpoint = @streams_service_stub.endpoint
179
191
  config.universe_domain = @streams_service_stub.universe_domain
192
+ config.logger = @streams_service_stub.logger if config.respond_to? :logger=
180
193
  end
181
194
  end
182
195
 
@@ -201,6 +214,15 @@ module Google
201
214
  #
202
215
  attr_reader :iam_policy_client
203
216
 
217
+ ##
218
+ # The logger used for request/response debug logging.
219
+ #
220
+ # @return [Logger]
221
+ #
222
+ def logger
223
+ @streams_service_stub.logger
224
+ end
225
+
204
226
  # Service calls
205
227
 
206
228
  ##
@@ -289,7 +311,6 @@ module Google
289
311
 
290
312
  @streams_service_stub.list_clusters request, options do |result, operation|
291
313
  yield result, operation if block_given?
292
- return result
293
314
  end
294
315
  rescue ::Gapic::Rest::Error => e
295
316
  raise ::Google::Cloud::Error.from_error(e)
@@ -368,7 +389,6 @@ module Google
368
389
 
369
390
  @streams_service_stub.get_cluster request, options do |result, operation|
370
391
  yield result, operation if block_given?
371
- return result
372
392
  end
373
393
  rescue ::Gapic::Rest::Error => e
374
394
  raise ::Google::Cloud::Error.from_error(e)
@@ -473,7 +493,7 @@ module Google
473
493
  @streams_service_stub.create_cluster request, options do |result, operation|
474
494
  result = ::Gapic::Operation.new result, @operations_client, options: options
475
495
  yield result, operation if block_given?
476
- return result
496
+ throw :response, result
477
497
  end
478
498
  rescue ::Gapic::Rest::Error => e
479
499
  raise ::Google::Cloud::Error.from_error(e)
@@ -580,7 +600,7 @@ module Google
580
600
  @streams_service_stub.update_cluster request, options do |result, operation|
581
601
  result = ::Gapic::Operation.new result, @operations_client, options: options
582
602
  yield result, operation if block_given?
583
- return result
603
+ throw :response, result
584
604
  end
585
605
  rescue ::Gapic::Rest::Error => e
586
606
  raise ::Google::Cloud::Error.from_error(e)
@@ -681,7 +701,7 @@ module Google
681
701
  @streams_service_stub.delete_cluster request, options do |result, operation|
682
702
  result = ::Gapic::Operation.new result, @operations_client, options: options
683
703
  yield result, operation if block_given?
684
- return result
704
+ throw :response, result
685
705
  end
686
706
  rescue ::Gapic::Rest::Error => e
687
707
  raise ::Google::Cloud::Error.from_error(e)
@@ -773,7 +793,6 @@ module Google
773
793
 
774
794
  @streams_service_stub.list_streams request, options do |result, operation|
775
795
  yield result, operation if block_given?
776
- return result
777
796
  end
778
797
  rescue ::Gapic::Rest::Error => e
779
798
  raise ::Google::Cloud::Error.from_error(e)
@@ -852,7 +871,6 @@ module Google
852
871
 
853
872
  @streams_service_stub.get_stream request, options do |result, operation|
854
873
  yield result, operation if block_given?
855
- return result
856
874
  end
857
875
  rescue ::Gapic::Rest::Error => e
858
876
  raise ::Google::Cloud::Error.from_error(e)
@@ -957,7 +975,7 @@ module Google
957
975
  @streams_service_stub.create_stream request, options do |result, operation|
958
976
  result = ::Gapic::Operation.new result, @operations_client, options: options
959
977
  yield result, operation if block_given?
960
- return result
978
+ throw :response, result
961
979
  end
962
980
  rescue ::Gapic::Rest::Error => e
963
981
  raise ::Google::Cloud::Error.from_error(e)
@@ -1064,7 +1082,7 @@ module Google
1064
1082
  @streams_service_stub.update_stream request, options do |result, operation|
1065
1083
  result = ::Gapic::Operation.new result, @operations_client, options: options
1066
1084
  yield result, operation if block_given?
1067
- return result
1085
+ throw :response, result
1068
1086
  end
1069
1087
  rescue ::Gapic::Rest::Error => e
1070
1088
  raise ::Google::Cloud::Error.from_error(e)
@@ -1165,7 +1183,7 @@ module Google
1165
1183
  @streams_service_stub.delete_stream request, options do |result, operation|
1166
1184
  result = ::Gapic::Operation.new result, @operations_client, options: options
1167
1185
  yield result, operation if block_given?
1168
- return result
1186
+ throw :response, result
1169
1187
  end
1170
1188
  rescue ::Gapic::Rest::Error => e
1171
1189
  raise ::Google::Cloud::Error.from_error(e)
@@ -1271,7 +1289,7 @@ module Google
1271
1289
  @streams_service_stub.get_stream_thumbnail request, options do |result, operation|
1272
1290
  result = ::Gapic::Operation.new result, @operations_client, options: options
1273
1291
  yield result, operation if block_given?
1274
- return result
1292
+ throw :response, result
1275
1293
  end
1276
1294
  rescue ::Gapic::Rest::Error => e
1277
1295
  raise ::Google::Cloud::Error.from_error(e)
@@ -1350,7 +1368,6 @@ module Google
1350
1368
 
1351
1369
  @streams_service_stub.generate_stream_hls_token request, options do |result, operation|
1352
1370
  yield result, operation if block_given?
1353
- return result
1354
1371
  end
1355
1372
  rescue ::Gapic::Rest::Error => e
1356
1373
  raise ::Google::Cloud::Error.from_error(e)
@@ -1442,7 +1459,6 @@ module Google
1442
1459
 
1443
1460
  @streams_service_stub.list_events request, options do |result, operation|
1444
1461
  yield result, operation if block_given?
1445
- return result
1446
1462
  end
1447
1463
  rescue ::Gapic::Rest::Error => e
1448
1464
  raise ::Google::Cloud::Error.from_error(e)
@@ -1521,7 +1537,6 @@ module Google
1521
1537
 
1522
1538
  @streams_service_stub.get_event request, options do |result, operation|
1523
1539
  yield result, operation if block_given?
1524
- return result
1525
1540
  end
1526
1541
  rescue ::Gapic::Rest::Error => e
1527
1542
  raise ::Google::Cloud::Error.from_error(e)
@@ -1626,7 +1641,7 @@ module Google
1626
1641
  @streams_service_stub.create_event request, options do |result, operation|
1627
1642
  result = ::Gapic::Operation.new result, @operations_client, options: options
1628
1643
  yield result, operation if block_given?
1629
- return result
1644
+ throw :response, result
1630
1645
  end
1631
1646
  rescue ::Gapic::Rest::Error => e
1632
1647
  raise ::Google::Cloud::Error.from_error(e)
@@ -1733,7 +1748,7 @@ module Google
1733
1748
  @streams_service_stub.update_event request, options do |result, operation|
1734
1749
  result = ::Gapic::Operation.new result, @operations_client, options: options
1735
1750
  yield result, operation if block_given?
1736
- return result
1751
+ throw :response, result
1737
1752
  end
1738
1753
  rescue ::Gapic::Rest::Error => e
1739
1754
  raise ::Google::Cloud::Error.from_error(e)
@@ -1834,7 +1849,7 @@ module Google
1834
1849
  @streams_service_stub.delete_event request, options do |result, operation|
1835
1850
  result = ::Gapic::Operation.new result, @operations_client, options: options
1836
1851
  yield result, operation if block_given?
1837
- return result
1852
+ throw :response, result
1838
1853
  end
1839
1854
  rescue ::Gapic::Rest::Error => e
1840
1855
  raise ::Google::Cloud::Error.from_error(e)
@@ -1926,7 +1941,6 @@ module Google
1926
1941
 
1927
1942
  @streams_service_stub.list_series request, options do |result, operation|
1928
1943
  yield result, operation if block_given?
1929
- return result
1930
1944
  end
1931
1945
  rescue ::Gapic::Rest::Error => e
1932
1946
  raise ::Google::Cloud::Error.from_error(e)
@@ -2005,7 +2019,6 @@ module Google
2005
2019
 
2006
2020
  @streams_service_stub.get_series request, options do |result, operation|
2007
2021
  yield result, operation if block_given?
2008
- return result
2009
2022
  end
2010
2023
  rescue ::Gapic::Rest::Error => e
2011
2024
  raise ::Google::Cloud::Error.from_error(e)
@@ -2110,7 +2123,7 @@ module Google
2110
2123
  @streams_service_stub.create_series request, options do |result, operation|
2111
2124
  result = ::Gapic::Operation.new result, @operations_client, options: options
2112
2125
  yield result, operation if block_given?
2113
- return result
2126
+ throw :response, result
2114
2127
  end
2115
2128
  rescue ::Gapic::Rest::Error => e
2116
2129
  raise ::Google::Cloud::Error.from_error(e)
@@ -2217,7 +2230,7 @@ module Google
2217
2230
  @streams_service_stub.update_series request, options do |result, operation|
2218
2231
  result = ::Gapic::Operation.new result, @operations_client, options: options
2219
2232
  yield result, operation if block_given?
2220
- return result
2233
+ throw :response, result
2221
2234
  end
2222
2235
  rescue ::Gapic::Rest::Error => e
2223
2236
  raise ::Google::Cloud::Error.from_error(e)
@@ -2318,7 +2331,7 @@ module Google
2318
2331
  @streams_service_stub.delete_series request, options do |result, operation|
2319
2332
  result = ::Gapic::Operation.new result, @operations_client, options: options
2320
2333
  yield result, operation if block_given?
2321
- return result
2334
+ throw :response, result
2322
2335
  end
2323
2336
  rescue ::Gapic::Rest::Error => e
2324
2337
  raise ::Google::Cloud::Error.from_error(e)
@@ -2423,7 +2436,7 @@ module Google
2423
2436
  @streams_service_stub.materialize_channel request, options do |result, operation|
2424
2437
  result = ::Gapic::Operation.new result, @operations_client, options: options
2425
2438
  yield result, operation if block_given?
2426
- return result
2439
+ throw :response, result
2427
2440
  end
2428
2441
  rescue ::Gapic::Rest::Error => e
2429
2442
  raise ::Google::Cloud::Error.from_error(e)
@@ -2471,6 +2484,13 @@ module Google
2471
2484
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
2472
2485
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
2473
2486
  # * (`nil`) indicating no credentials
2487
+ #
2488
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
2489
+ # external source for authentication to Google Cloud, you must validate it before
2490
+ # providing it to a Google API client library. Providing an unvalidated credential
2491
+ # configuration to Google APIs can compromise the security of your systems and data.
2492
+ # For more information, refer to [Validate credential configurations from external
2493
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
2474
2494
  # @return [::Object]
2475
2495
  # @!attribute [rw] scope
2476
2496
  # The OAuth scopes
@@ -2503,6 +2523,11 @@ module Google
2503
2523
  # default endpoint URL. The default value of nil uses the environment
2504
2524
  # universe (usually the default "googleapis.com" universe).
2505
2525
  # @return [::String,nil]
2526
+ # @!attribute [rw] logger
2527
+ # A custom logger to use for request/response debug logging, or the value
2528
+ # `:default` (the default) to construct a default logger, or `nil` to
2529
+ # explicitly disable logging.
2530
+ # @return [::Logger,:default,nil]
2506
2531
  #
2507
2532
  class Configuration
2508
2533
  extend ::Gapic::Config
@@ -2524,6 +2549,7 @@ module Google
2524
2549
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
2525
2550
  config_attr :quota_project, nil, ::String, nil
2526
2551
  config_attr :universe_domain, nil, ::String, nil
2552
+ config_attr :logger, :default, ::Logger, nil, :default
2527
2553
 
2528
2554
  # @private
2529
2555
  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
  ##