google-cloud-api_keys-v2 0.6.0 → 0.7.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.
@@ -32,6 +32,9 @@ module Google
32
32
  # Manages the API keys associated with projects.
33
33
  #
34
34
  class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
35
38
  # @private
36
39
  DEFAULT_ENDPOINT_TEMPLATE = "apikeys.$UNIVERSE_DOMAIN$"
37
40
 
@@ -156,8 +159,19 @@ module Google
156
159
  endpoint: @config.endpoint,
157
160
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
158
161
  universe_domain: @config.universe_domain,
159
- credentials: credentials
162
+ credentials: credentials,
163
+ logger: @config.logger
160
164
  )
165
+
166
+ @api_keys_stub.logger(stub: true)&.info do |entry|
167
+ entry.set_system_name
168
+ entry.set_service
169
+ entry.message = "Created client for #{entry.service}"
170
+ entry.set_credentials_fields credentials
171
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
172
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
173
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
174
+ end
161
175
  end
162
176
 
163
177
  ##
@@ -167,6 +181,15 @@ module Google
167
181
  #
168
182
  attr_reader :operations_client
169
183
 
184
+ ##
185
+ # The logger used for request/response debug logging.
186
+ #
187
+ # @return [Logger]
188
+ #
189
+ def logger
190
+ @api_keys_stub.logger
191
+ end
192
+
170
193
  # Service calls
171
194
 
172
195
  ##
@@ -247,12 +270,13 @@ module Google
247
270
  # Customize the options with defaults
248
271
  call_metadata = @config.rpcs.create_key.metadata.to_h
249
272
 
250
- # Set x-goog-api-client and x-goog-user-project headers
273
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
251
274
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
252
275
  lib_name: @config.lib_name, lib_version: @config.lib_version,
253
276
  gapic_version: ::Google::Cloud::ApiKeys::V2::VERSION,
254
277
  transports_version_send: [:rest]
255
278
 
279
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
256
280
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
257
281
 
258
282
  options.apply_defaults timeout: @config.rpcs.create_key.timeout,
@@ -266,7 +290,7 @@ module Google
266
290
  @api_keys_stub.create_key request, options do |result, operation|
267
291
  result = ::Gapic::Operation.new result, @operations_client, options: options
268
292
  yield result, operation if block_given?
269
- return result
293
+ throw :response, result
270
294
  end
271
295
  rescue ::Gapic::Rest::Error => e
272
296
  raise ::Google::Cloud::Error.from_error(e)
@@ -341,12 +365,13 @@ module Google
341
365
  # Customize the options with defaults
342
366
  call_metadata = @config.rpcs.list_keys.metadata.to_h
343
367
 
344
- # Set x-goog-api-client and x-goog-user-project headers
368
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
345
369
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
346
370
  lib_name: @config.lib_name, lib_version: @config.lib_version,
347
371
  gapic_version: ::Google::Cloud::ApiKeys::V2::VERSION,
348
372
  transports_version_send: [:rest]
349
373
 
374
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
350
375
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
351
376
 
352
377
  options.apply_defaults timeout: @config.rpcs.list_keys.timeout,
@@ -360,7 +385,7 @@ module Google
360
385
  @api_keys_stub.list_keys request, options do |result, operation|
361
386
  result = ::Gapic::Rest::PagedEnumerable.new @api_keys_stub, :list_keys, "keys", request, result, options
362
387
  yield result, operation if block_given?
363
- return result
388
+ throw :response, result
364
389
  end
365
390
  rescue ::Gapic::Rest::Error => e
366
391
  raise ::Google::Cloud::Error.from_error(e)
@@ -424,12 +449,13 @@ module Google
424
449
  # Customize the options with defaults
425
450
  call_metadata = @config.rpcs.get_key.metadata.to_h
426
451
 
427
- # Set x-goog-api-client and x-goog-user-project headers
452
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
428
453
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
429
454
  lib_name: @config.lib_name, lib_version: @config.lib_version,
430
455
  gapic_version: ::Google::Cloud::ApiKeys::V2::VERSION,
431
456
  transports_version_send: [:rest]
432
457
 
458
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
433
459
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
434
460
 
435
461
  options.apply_defaults timeout: @config.rpcs.get_key.timeout,
@@ -442,7 +468,6 @@ module Google
442
468
 
443
469
  @api_keys_stub.get_key request, options do |result, operation|
444
470
  yield result, operation if block_given?
445
- return result
446
471
  end
447
472
  rescue ::Gapic::Rest::Error => e
448
473
  raise ::Google::Cloud::Error.from_error(e)
@@ -505,12 +530,13 @@ module Google
505
530
  # Customize the options with defaults
506
531
  call_metadata = @config.rpcs.get_key_string.metadata.to_h
507
532
 
508
- # Set x-goog-api-client and x-goog-user-project headers
533
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
509
534
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
510
535
  lib_name: @config.lib_name, lib_version: @config.lib_version,
511
536
  gapic_version: ::Google::Cloud::ApiKeys::V2::VERSION,
512
537
  transports_version_send: [:rest]
513
538
 
539
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
514
540
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
515
541
 
516
542
  options.apply_defaults timeout: @config.rpcs.get_key_string.timeout,
@@ -523,7 +549,6 @@ module Google
523
549
 
524
550
  @api_keys_stub.get_key_string request, options do |result, operation|
525
551
  yield result, operation if block_given?
526
- return result
527
552
  end
528
553
  rescue ::Gapic::Rest::Error => e
529
554
  raise ::Google::Cloud::Error.from_error(e)
@@ -604,12 +629,13 @@ module Google
604
629
  # Customize the options with defaults
605
630
  call_metadata = @config.rpcs.update_key.metadata.to_h
606
631
 
607
- # Set x-goog-api-client and x-goog-user-project headers
632
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
608
633
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
609
634
  lib_name: @config.lib_name, lib_version: @config.lib_version,
610
635
  gapic_version: ::Google::Cloud::ApiKeys::V2::VERSION,
611
636
  transports_version_send: [:rest]
612
637
 
638
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
613
639
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
614
640
 
615
641
  options.apply_defaults timeout: @config.rpcs.update_key.timeout,
@@ -623,7 +649,7 @@ module Google
623
649
  @api_keys_stub.update_key request, options do |result, operation|
624
650
  result = ::Gapic::Operation.new result, @operations_client, options: options
625
651
  yield result, operation if block_given?
626
- return result
652
+ throw :response, result
627
653
  end
628
654
  rescue ::Gapic::Rest::Error => e
629
655
  raise ::Google::Cloud::Error.from_error(e)
@@ -697,12 +723,13 @@ module Google
697
723
  # Customize the options with defaults
698
724
  call_metadata = @config.rpcs.delete_key.metadata.to_h
699
725
 
700
- # Set x-goog-api-client and x-goog-user-project headers
726
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
701
727
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
702
728
  lib_name: @config.lib_name, lib_version: @config.lib_version,
703
729
  gapic_version: ::Google::Cloud::ApiKeys::V2::VERSION,
704
730
  transports_version_send: [:rest]
705
731
 
732
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
706
733
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
707
734
 
708
735
  options.apply_defaults timeout: @config.rpcs.delete_key.timeout,
@@ -716,7 +743,7 @@ module Google
716
743
  @api_keys_stub.delete_key request, options do |result, operation|
717
744
  result = ::Gapic::Operation.new result, @operations_client, options: options
718
745
  yield result, operation if block_given?
719
- return result
746
+ throw :response, result
720
747
  end
721
748
  rescue ::Gapic::Rest::Error => e
722
749
  raise ::Google::Cloud::Error.from_error(e)
@@ -786,12 +813,13 @@ module Google
786
813
  # Customize the options with defaults
787
814
  call_metadata = @config.rpcs.undelete_key.metadata.to_h
788
815
 
789
- # Set x-goog-api-client and x-goog-user-project headers
816
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
790
817
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
791
818
  lib_name: @config.lib_name, lib_version: @config.lib_version,
792
819
  gapic_version: ::Google::Cloud::ApiKeys::V2::VERSION,
793
820
  transports_version_send: [:rest]
794
821
 
822
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
795
823
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
796
824
 
797
825
  options.apply_defaults timeout: @config.rpcs.undelete_key.timeout,
@@ -805,7 +833,7 @@ module Google
805
833
  @api_keys_stub.undelete_key request, options do |result, operation|
806
834
  result = ::Gapic::Operation.new result, @operations_client, options: options
807
835
  yield result, operation if block_given?
808
- return result
836
+ throw :response, result
809
837
  end
810
838
  rescue ::Gapic::Rest::Error => e
811
839
  raise ::Google::Cloud::Error.from_error(e)
@@ -869,12 +897,13 @@ module Google
869
897
  # Customize the options with defaults
870
898
  call_metadata = @config.rpcs.lookup_key.metadata.to_h
871
899
 
872
- # Set x-goog-api-client and x-goog-user-project headers
900
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
873
901
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
874
902
  lib_name: @config.lib_name, lib_version: @config.lib_version,
875
903
  gapic_version: ::Google::Cloud::ApiKeys::V2::VERSION,
876
904
  transports_version_send: [:rest]
877
905
 
906
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
878
907
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
879
908
 
880
909
  options.apply_defaults timeout: @config.rpcs.lookup_key.timeout,
@@ -887,7 +916,6 @@ module Google
887
916
 
888
917
  @api_keys_stub.lookup_key request, options do |result, operation|
889
918
  yield result, operation if block_given?
890
- return result
891
919
  end
892
920
  rescue ::Gapic::Rest::Error => e
893
921
  raise ::Google::Cloud::Error.from_error(e)
@@ -967,6 +995,11 @@ module Google
967
995
  # default endpoint URL. The default value of nil uses the environment
968
996
  # universe (usually the default "googleapis.com" universe).
969
997
  # @return [::String,nil]
998
+ # @!attribute [rw] logger
999
+ # A custom logger to use for request/response debug logging, or the value
1000
+ # `:default` (the default) to construct a default logger, or `nil` to
1001
+ # explicitly disable logging.
1002
+ # @return [::Logger,:default,nil]
970
1003
  #
971
1004
  class Configuration
972
1005
  extend ::Gapic::Config
@@ -988,6 +1021,7 @@ module Google
988
1021
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
989
1022
  config_attr :quota_project, nil, ::String, nil
990
1023
  config_attr :universe_domain, nil, ::String, nil
1024
+ config_attr :logger, :default, ::Logger, nil, :default
991
1025
 
992
1026
  # @private
993
1027
  def initialize parent_config = nil
@@ -26,6 +26,9 @@ module Google
26
26
  module Rest
27
27
  # Service that implements Longrunning Operations API.
28
28
  class Operations
29
+ # @private
30
+ API_VERSION = ""
31
+
29
32
  # @private
30
33
  DEFAULT_ENDPOINT_TEMPLATE = "apikeys.$UNIVERSE_DOMAIN$"
31
34
 
@@ -112,14 +115,6 @@ module Google
112
115
  # Lists operations that match the specified filter in the request. If the
113
116
  # server doesn't support this method, it returns `UNIMPLEMENTED`.
114
117
  #
115
- # NOTE: the `name` binding allows API services to override the binding
116
- # to use different resource name schemes, such as `users/*/operations`. To
117
- # override the binding, API services can add a binding such as
118
- # `"/v1/{name=users/*}/operations"` to their service configuration.
119
- # For backwards compatibility, the default name includes the operations
120
- # collection id, however overriding users must ensure the name binding
121
- # is the parent resource, without the operations collection id.
122
- #
123
118
  # @overload list_operations(request, options = nil)
124
119
  # Pass arguments to `list_operations` via a request object, either of type
125
120
  # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
@@ -181,12 +176,13 @@ module Google
181
176
  # Customize the options with defaults
182
177
  call_metadata = @config.rpcs.list_operations.metadata.to_h
183
178
 
184
- # Set x-goog-api-client and x-goog-user-project headers
179
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
185
180
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
186
181
  lib_name: @config.lib_name, lib_version: @config.lib_version,
187
182
  gapic_version: ::Google::Cloud::ApiKeys::V2::VERSION,
188
183
  transports_version_send: [:rest]
189
184
 
185
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
190
186
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
191
187
 
192
188
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
@@ -200,7 +196,7 @@ module Google
200
196
  @operations_stub.list_operations request, options do |result, operation|
201
197
  result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
202
198
  yield result, operation if block_given?
203
- return result
199
+ throw :response, result
204
200
  end
205
201
  rescue ::Gapic::Rest::Error => e
206
202
  raise ::Google::Cloud::Error.from_error(e)
@@ -269,12 +265,13 @@ module Google
269
265
  # Customize the options with defaults
270
266
  call_metadata = @config.rpcs.get_operation.metadata.to_h
271
267
 
272
- # Set x-goog-api-client and x-goog-user-project headers
268
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
273
269
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
274
270
  lib_name: @config.lib_name, lib_version: @config.lib_version,
275
271
  gapic_version: ::Google::Cloud::ApiKeys::V2::VERSION,
276
272
  transports_version_send: [:rest]
277
273
 
274
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
278
275
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
279
276
 
280
277
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
@@ -288,7 +285,7 @@ module Google
288
285
  @operations_stub.get_operation request, options do |result, operation|
289
286
  result = ::Gapic::Operation.new result, @operations_client, options: options
290
287
  yield result, operation if block_given?
291
- return result
288
+ throw :response, result
292
289
  end
293
290
  rescue ::Gapic::Rest::Error => e
294
291
  raise ::Google::Cloud::Error.from_error(e)
@@ -351,12 +348,13 @@ module Google
351
348
  # Customize the options with defaults
352
349
  call_metadata = @config.rpcs.delete_operation.metadata.to_h
353
350
 
354
- # Set x-goog-api-client and x-goog-user-project headers
351
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
355
352
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
356
353
  lib_name: @config.lib_name, lib_version: @config.lib_version,
357
354
  gapic_version: ::Google::Cloud::ApiKeys::V2::VERSION,
358
355
  transports_version_send: [:rest]
359
356
 
357
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
360
358
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
361
359
 
362
360
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
@@ -369,7 +367,6 @@ module Google
369
367
 
370
368
  @operations_stub.delete_operation request, options do |result, operation|
371
369
  yield result, operation if block_given?
372
- return result
373
370
  end
374
371
  rescue ::Gapic::Rest::Error => e
375
372
  raise ::Google::Cloud::Error.from_error(e)
@@ -384,8 +381,9 @@ module Google
384
381
  # other methods to check whether the cancellation succeeded or whether the
385
382
  # operation completed despite cancellation. On successful cancellation,
386
383
  # the operation is not deleted; instead, it becomes an operation with
387
- # an {::Google::Longrunning::Operation#error Operation.error} value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1,
388
- # 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`.
389
387
  #
390
388
  # @overload cancel_operation(request, options = nil)
391
389
  # Pass arguments to `cancel_operation` via a request object, either of type
@@ -438,12 +436,13 @@ module Google
438
436
  # Customize the options with defaults
439
437
  call_metadata = @config.rpcs.cancel_operation.metadata.to_h
440
438
 
441
- # Set x-goog-api-client and x-goog-user-project headers
439
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
442
440
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
443
441
  lib_name: @config.lib_name, lib_version: @config.lib_version,
444
442
  gapic_version: ::Google::Cloud::ApiKeys::V2::VERSION,
445
443
  transports_version_send: [:rest]
446
444
 
445
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
447
446
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
448
447
 
449
448
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
@@ -456,7 +455,6 @@ module Google
456
455
 
457
456
  @operations_stub.cancel_operation request, options do |result, operation|
458
457
  yield result, operation if block_given?
459
- return result
460
458
  end
461
459
  rescue ::Gapic::Rest::Error => e
462
460
  raise ::Google::Cloud::Error.from_error(e)
@@ -536,6 +534,11 @@ module Google
536
534
  # default endpoint URL. The default value of nil uses the environment
537
535
  # universe (usually the default "googleapis.com" universe).
538
536
  # @return [::String,nil]
537
+ # @!attribute [rw] logger
538
+ # A custom logger to use for request/response debug logging, or the value
539
+ # `:default` (the default) to construct a default logger, or `nil` to
540
+ # explicitly disable logging.
541
+ # @return [::Logger,:default,nil]
539
542
  #
540
543
  class Configuration
541
544
  extend ::Gapic::Config
@@ -557,6 +560,7 @@ module Google
557
560
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
558
561
  config_attr :quota_project, nil, ::String, nil
559
562
  config_attr :universe_domain, nil, ::String, nil
563
+ config_attr :logger, :default, ::Logger, nil, :default
560
564
 
561
565
  # @private
562
566
  def initialize parent_config = nil
@@ -676,16 +680,18 @@ module Google
676
680
 
677
681
  response = @client_stub.make_http_request(
678
682
  verb,
679
- uri: uri,
680
- body: body || "",
681
- params: query_string_params,
683
+ uri: uri,
684
+ body: body || "",
685
+ params: query_string_params,
686
+ method_name: "list_operations",
682
687
  options: options
683
688
  )
684
689
  operation = ::Gapic::Rest::TransportOperation.new response
685
690
  result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
686
-
687
- yield result, operation if block_given?
688
- result
691
+ catch :response do
692
+ yield result, operation if block_given?
693
+ result
694
+ end
689
695
  end
690
696
 
691
697
  ##
@@ -714,16 +720,18 @@ module Google
714
720
 
715
721
  response = @client_stub.make_http_request(
716
722
  verb,
717
- uri: uri,
718
- body: body || "",
719
- params: query_string_params,
723
+ uri: uri,
724
+ body: body || "",
725
+ params: query_string_params,
726
+ method_name: "get_operation",
720
727
  options: options
721
728
  )
722
729
  operation = ::Gapic::Rest::TransportOperation.new response
723
730
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
724
-
725
- yield result, operation if block_given?
726
- result
731
+ catch :response do
732
+ yield result, operation if block_given?
733
+ result
734
+ end
727
735
  end
728
736
 
729
737
  ##
@@ -752,16 +760,18 @@ module Google
752
760
 
753
761
  response = @client_stub.make_http_request(
754
762
  verb,
755
- uri: uri,
756
- body: body || "",
757
- params: query_string_params,
763
+ uri: uri,
764
+ body: body || "",
765
+ params: query_string_params,
766
+ method_name: "delete_operation",
758
767
  options: options
759
768
  )
760
769
  operation = ::Gapic::Rest::TransportOperation.new response
761
770
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
762
-
763
- yield result, operation if block_given?
764
- result
771
+ catch :response do
772
+ yield result, operation if block_given?
773
+ result
774
+ end
765
775
  end
766
776
 
767
777
  ##
@@ -790,16 +800,18 @@ module Google
790
800
 
791
801
  response = @client_stub.make_http_request(
792
802
  verb,
793
- uri: uri,
794
- body: body || "",
795
- params: query_string_params,
803
+ uri: uri,
804
+ body: body || "",
805
+ params: query_string_params,
806
+ method_name: "cancel_operation",
796
807
  options: options
797
808
  )
798
809
  operation = ::Gapic::Rest::TransportOperation.new response
799
810
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
800
-
801
- yield result, operation if block_given?
802
- result
811
+ catch :response do
812
+ yield result, operation if block_given?
813
+ result
814
+ end
803
815
  end
804
816
 
805
817
  ##