google-cloud-security_center-v2 0.4.1 → 0.6.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.
@@ -157,8 +157,19 @@ module Google
157
157
  endpoint: @config.endpoint,
158
158
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
159
159
  universe_domain: @config.universe_domain,
160
- credentials: credentials
160
+ credentials: credentials,
161
+ logger: @config.logger
161
162
  )
163
+
164
+ @security_center_stub.logger(stub: true)&.info do |entry|
165
+ entry.set_system_name
166
+ entry.set_service
167
+ entry.message = "Created client for #{entry.service}"
168
+ entry.set_credentials_fields credentials
169
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
170
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
171
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
172
+ end
162
173
  end
163
174
 
164
175
  ##
@@ -168,6 +179,15 @@ module Google
168
179
  #
169
180
  attr_reader :operations_client
170
181
 
182
+ ##
183
+ # The logger used for request/response debug logging.
184
+ #
185
+ # @return [Logger]
186
+ #
187
+ def logger
188
+ @security_center_stub.logger
189
+ end
190
+
171
191
  # Service calls
172
192
 
173
193
  ##
@@ -248,7 +268,6 @@ module Google
248
268
 
249
269
  @security_center_stub.batch_create_resource_value_configs request, options do |result, operation|
250
270
  yield result, operation if block_given?
251
- return result
252
271
  end
253
272
  rescue ::Gapic::Rest::Error => e
254
273
  raise ::Google::Cloud::Error.from_error(e)
@@ -372,7 +391,7 @@ module Google
372
391
  @security_center_stub.bulk_mute_findings request, options do |result, operation|
373
392
  result = ::Gapic::Operation.new result, @operations_client, options: options
374
393
  yield result, operation if block_given?
375
- return result
394
+ throw :response, result
376
395
  end
377
396
  rescue ::Gapic::Rest::Error => e
378
397
  raise ::Google::Cloud::Error.from_error(e)
@@ -461,7 +480,6 @@ module Google
461
480
 
462
481
  @security_center_stub.create_big_query_export request, options do |result, operation|
463
482
  yield result, operation if block_given?
464
- return result
465
483
  end
466
484
  rescue ::Gapic::Rest::Error => e
467
485
  raise ::Google::Cloud::Error.from_error(e)
@@ -553,7 +571,6 @@ module Google
553
571
 
554
572
  @security_center_stub.create_finding request, options do |result, operation|
555
573
  yield result, operation if block_given?
556
- return result
557
574
  end
558
575
  rescue ::Gapic::Rest::Error => e
559
576
  raise ::Google::Cloud::Error.from_error(e)
@@ -642,7 +659,6 @@ module Google
642
659
 
643
660
  @security_center_stub.create_mute_config request, options do |result, operation|
644
661
  yield result, operation if block_given?
645
- return result
646
662
  end
647
663
  rescue ::Gapic::Rest::Error => e
648
664
  raise ::Google::Cloud::Error.from_error(e)
@@ -733,7 +749,6 @@ module Google
733
749
 
734
750
  @security_center_stub.create_notification_config request, options do |result, operation|
735
751
  yield result, operation if block_given?
736
- return result
737
752
  end
738
753
  rescue ::Gapic::Rest::Error => e
739
754
  raise ::Google::Cloud::Error.from_error(e)
@@ -816,7 +831,6 @@ module Google
816
831
 
817
832
  @security_center_stub.create_source request, options do |result, operation|
818
833
  yield result, operation if block_given?
819
- return result
820
834
  end
821
835
  rescue ::Gapic::Rest::Error => e
822
836
  raise ::Google::Cloud::Error.from_error(e)
@@ -901,7 +915,6 @@ module Google
901
915
 
902
916
  @security_center_stub.delete_big_query_export request, options do |result, operation|
903
917
  yield result, operation if block_given?
904
- return result
905
918
  end
906
919
  rescue ::Gapic::Rest::Error => e
907
920
  raise ::Google::Cloud::Error.from_error(e)
@@ -990,7 +1003,6 @@ module Google
990
1003
 
991
1004
  @security_center_stub.delete_mute_config request, options do |result, operation|
992
1005
  yield result, operation if block_given?
993
- return result
994
1006
  end
995
1007
  rescue ::Gapic::Rest::Error => e
996
1008
  raise ::Google::Cloud::Error.from_error(e)
@@ -1077,7 +1089,6 @@ module Google
1077
1089
 
1078
1090
  @security_center_stub.delete_notification_config request, options do |result, operation|
1079
1091
  yield result, operation if block_given?
1080
- return result
1081
1092
  end
1082
1093
  rescue ::Gapic::Rest::Error => e
1083
1094
  raise ::Google::Cloud::Error.from_error(e)
@@ -1156,7 +1167,6 @@ module Google
1156
1167
 
1157
1168
  @security_center_stub.delete_resource_value_config request, options do |result, operation|
1158
1169
  yield result, operation if block_given?
1159
- return result
1160
1170
  end
1161
1171
  rescue ::Gapic::Rest::Error => e
1162
1172
  raise ::Google::Cloud::Error.from_error(e)
@@ -1241,7 +1251,6 @@ module Google
1241
1251
 
1242
1252
  @security_center_stub.get_big_query_export request, options do |result, operation|
1243
1253
  yield result, operation if block_given?
1244
- return result
1245
1254
  end
1246
1255
  rescue ::Gapic::Rest::Error => e
1247
1256
  raise ::Google::Cloud::Error.from_error(e)
@@ -1325,7 +1334,6 @@ module Google
1325
1334
 
1326
1335
  @security_center_stub.get_simulation request, options do |result, operation|
1327
1336
  yield result, operation if block_given?
1328
- return result
1329
1337
  end
1330
1338
  rescue ::Gapic::Rest::Error => e
1331
1339
  raise ::Google::Cloud::Error.from_error(e)
@@ -1407,7 +1415,6 @@ module Google
1407
1415
 
1408
1416
  @security_center_stub.get_valued_resource request, options do |result, operation|
1409
1417
  yield result, operation if block_given?
1410
- return result
1411
1418
  end
1412
1419
  rescue ::Gapic::Rest::Error => e
1413
1420
  raise ::Google::Cloud::Error.from_error(e)
@@ -1490,7 +1497,6 @@ module Google
1490
1497
 
1491
1498
  @security_center_stub.get_iam_policy request, options do |result, operation|
1492
1499
  yield result, operation if block_given?
1493
- return result
1494
1500
  end
1495
1501
  rescue ::Gapic::Rest::Error => e
1496
1502
  raise ::Google::Cloud::Error.from_error(e)
@@ -1579,7 +1585,6 @@ module Google
1579
1585
 
1580
1586
  @security_center_stub.get_mute_config request, options do |result, operation|
1581
1587
  yield result, operation if block_given?
1582
- return result
1583
1588
  end
1584
1589
  rescue ::Gapic::Rest::Error => e
1585
1590
  raise ::Google::Cloud::Error.from_error(e)
@@ -1666,7 +1671,6 @@ module Google
1666
1671
 
1667
1672
  @security_center_stub.get_notification_config request, options do |result, operation|
1668
1673
  yield result, operation if block_given?
1669
- return result
1670
1674
  end
1671
1675
  rescue ::Gapic::Rest::Error => e
1672
1676
  raise ::Google::Cloud::Error.from_error(e)
@@ -1746,7 +1750,6 @@ module Google
1746
1750
 
1747
1751
  @security_center_stub.get_resource_value_config request, options do |result, operation|
1748
1752
  yield result, operation if block_given?
1749
- return result
1750
1753
  end
1751
1754
  rescue ::Gapic::Rest::Error => e
1752
1755
  raise ::Google::Cloud::Error.from_error(e)
@@ -1826,7 +1829,6 @@ module Google
1826
1829
 
1827
1830
  @security_center_stub.get_source request, options do |result, operation|
1828
1831
  yield result, operation if block_given?
1829
- return result
1830
1832
  end
1831
1833
  rescue ::Gapic::Rest::Error => e
1832
1834
  raise ::Google::Cloud::Error.from_error(e)
@@ -2002,7 +2004,7 @@ module Google
2002
2004
  @security_center_stub.group_findings request, options do |result, operation|
2003
2005
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_findings, "group_by_results", request, result, options
2004
2006
  yield result, operation if block_given?
2005
- return result
2007
+ throw :response, result
2006
2008
  end
2007
2009
  rescue ::Gapic::Rest::Error => e
2008
2010
  raise ::Google::Cloud::Error.from_error(e)
@@ -2105,7 +2107,7 @@ module Google
2105
2107
  @security_center_stub.list_attack_paths request, options do |result, operation|
2106
2108
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_attack_paths, "attack_paths", request, result, options
2107
2109
  yield result, operation if block_given?
2108
- return result
2110
+ throw :response, result
2109
2111
  end
2110
2112
  rescue ::Gapic::Rest::Error => e
2111
2113
  raise ::Google::Cloud::Error.from_error(e)
@@ -2206,7 +2208,7 @@ module Google
2206
2208
  @security_center_stub.list_big_query_exports request, options do |result, operation|
2207
2209
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_big_query_exports, "big_query_exports", request, result, options
2208
2210
  yield result, operation if block_given?
2209
- return result
2211
+ throw :response, result
2210
2212
  end
2211
2213
  rescue ::Gapic::Rest::Error => e
2212
2214
  raise ::Google::Cloud::Error.from_error(e)
@@ -2395,7 +2397,7 @@ module Google
2395
2397
  @security_center_stub.list_findings request, options do |result, operation|
2396
2398
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_findings, "list_findings_results", request, result, options
2397
2399
  yield result, operation if block_given?
2398
- return result
2400
+ throw :response, result
2399
2401
  end
2400
2402
  rescue ::Gapic::Rest::Error => e
2401
2403
  raise ::Google::Cloud::Error.from_error(e)
@@ -2496,7 +2498,7 @@ module Google
2496
2498
  @security_center_stub.list_mute_configs request, options do |result, operation|
2497
2499
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_mute_configs, "mute_configs", request, result, options
2498
2500
  yield result, operation if block_given?
2499
- return result
2501
+ throw :response, result
2500
2502
  end
2501
2503
  rescue ::Gapic::Rest::Error => e
2502
2504
  raise ::Google::Cloud::Error.from_error(e)
@@ -2591,7 +2593,7 @@ module Google
2591
2593
  @security_center_stub.list_notification_configs request, options do |result, operation|
2592
2594
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_notification_configs, "notification_configs", request, result, options
2593
2595
  yield result, operation if block_given?
2594
- return result
2596
+ throw :response, result
2595
2597
  end
2596
2598
  rescue ::Gapic::Rest::Error => e
2597
2599
  raise ::Google::Cloud::Error.from_error(e)
@@ -2691,7 +2693,7 @@ module Google
2691
2693
  @security_center_stub.list_resource_value_configs request, options do |result, operation|
2692
2694
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_resource_value_configs, "resource_value_configs", request, result, options
2693
2695
  yield result, operation if block_given?
2694
- return result
2696
+ throw :response, result
2695
2697
  end
2696
2698
  rescue ::Gapic::Rest::Error => e
2697
2699
  raise ::Google::Cloud::Error.from_error(e)
@@ -2784,7 +2786,7 @@ module Google
2784
2786
  @security_center_stub.list_sources request, options do |result, operation|
2785
2787
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_sources, "sources", request, result, options
2786
2788
  yield result, operation if block_given?
2787
- return result
2789
+ throw :response, result
2788
2790
  end
2789
2791
  rescue ::Gapic::Rest::Error => e
2790
2792
  raise ::Google::Cloud::Error.from_error(e)
@@ -2903,7 +2905,7 @@ module Google
2903
2905
  @security_center_stub.list_valued_resources request, options do |result, operation|
2904
2906
  result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_valued_resources, "valued_resources", request, result, options
2905
2907
  yield result, operation if block_given?
2906
- return result
2908
+ throw :response, result
2907
2909
  end
2908
2910
  rescue ::Gapic::Rest::Error => e
2909
2911
  raise ::Google::Cloud::Error.from_error(e)
@@ -2999,7 +3001,6 @@ module Google
2999
3001
 
3000
3002
  @security_center_stub.set_finding_state request, options do |result, operation|
3001
3003
  yield result, operation if block_given?
3002
- return result
3003
3004
  end
3004
3005
  rescue ::Gapic::Rest::Error => e
3005
3006
  raise ::Google::Cloud::Error.from_error(e)
@@ -3090,7 +3091,6 @@ module Google
3090
3091
 
3091
3092
  @security_center_stub.set_iam_policy request, options do |result, operation|
3092
3093
  yield result, operation if block_given?
3093
- return result
3094
3094
  end
3095
3095
  rescue ::Gapic::Rest::Error => e
3096
3096
  raise ::Google::Cloud::Error.from_error(e)
@@ -3186,7 +3186,6 @@ module Google
3186
3186
 
3187
3187
  @security_center_stub.set_mute request, options do |result, operation|
3188
3188
  yield result, operation if block_given?
3189
- return result
3190
3189
  end
3191
3190
  rescue ::Gapic::Rest::Error => e
3192
3191
  raise ::Google::Cloud::Error.from_error(e)
@@ -3271,7 +3270,6 @@ module Google
3271
3270
 
3272
3271
  @security_center_stub.test_iam_permissions request, options do |result, operation|
3273
3272
  yield result, operation if block_given?
3274
- return result
3275
3273
  end
3276
3274
  rescue ::Gapic::Rest::Error => e
3277
3275
  raise ::Google::Cloud::Error.from_error(e)
@@ -3353,7 +3351,6 @@ module Google
3353
3351
 
3354
3352
  @security_center_stub.update_big_query_export request, options do |result, operation|
3355
3353
  yield result, operation if block_given?
3356
- return result
3357
3354
  end
3358
3355
  rescue ::Gapic::Rest::Error => e
3359
3356
  raise ::Google::Cloud::Error.from_error(e)
@@ -3437,7 +3434,6 @@ module Google
3437
3434
 
3438
3435
  @security_center_stub.update_external_system request, options do |result, operation|
3439
3436
  yield result, operation if block_given?
3440
- return result
3441
3437
  end
3442
3438
  rescue ::Gapic::Rest::Error => e
3443
3439
  raise ::Google::Cloud::Error.from_error(e)
@@ -3531,7 +3527,6 @@ module Google
3531
3527
 
3532
3528
  @security_center_stub.update_finding request, options do |result, operation|
3533
3529
  yield result, operation if block_given?
3534
- return result
3535
3530
  end
3536
3531
  rescue ::Gapic::Rest::Error => e
3537
3532
  raise ::Google::Cloud::Error.from_error(e)
@@ -3614,7 +3609,6 @@ module Google
3614
3609
 
3615
3610
  @security_center_stub.update_mute_config request, options do |result, operation|
3616
3611
  yield result, operation if block_given?
3617
- return result
3618
3612
  end
3619
3613
  rescue ::Gapic::Rest::Error => e
3620
3614
  raise ::Google::Cloud::Error.from_error(e)
@@ -3698,7 +3692,6 @@ module Google
3698
3692
 
3699
3693
  @security_center_stub.update_notification_config request, options do |result, operation|
3700
3694
  yield result, operation if block_given?
3701
- return result
3702
3695
  end
3703
3696
  rescue ::Gapic::Rest::Error => e
3704
3697
  raise ::Google::Cloud::Error.from_error(e)
@@ -3784,7 +3777,6 @@ module Google
3784
3777
 
3785
3778
  @security_center_stub.update_resource_value_config request, options do |result, operation|
3786
3779
  yield result, operation if block_given?
3787
- return result
3788
3780
  end
3789
3781
  rescue ::Gapic::Rest::Error => e
3790
3782
  raise ::Google::Cloud::Error.from_error(e)
@@ -3871,7 +3863,6 @@ module Google
3871
3863
 
3872
3864
  @security_center_stub.update_security_marks request, options do |result, operation|
3873
3865
  yield result, operation if block_given?
3874
- return result
3875
3866
  end
3876
3867
  rescue ::Gapic::Rest::Error => e
3877
3868
  raise ::Google::Cloud::Error.from_error(e)
@@ -3954,7 +3945,6 @@ module Google
3954
3945
 
3955
3946
  @security_center_stub.update_source request, options do |result, operation|
3956
3947
  yield result, operation if block_given?
3957
- return result
3958
3948
  end
3959
3949
  rescue ::Gapic::Rest::Error => e
3960
3950
  raise ::Google::Cloud::Error.from_error(e)
@@ -4002,6 +3992,13 @@ module Google
4002
3992
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
4003
3993
  # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
4004
3994
  # * (`nil`) indicating no credentials
3995
+ #
3996
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
3997
+ # external source for authentication to Google Cloud, you must validate it before
3998
+ # providing it to a Google API client library. Providing an unvalidated credential
3999
+ # configuration to Google APIs can compromise the security of your systems and data.
4000
+ # For more information, refer to [Validate credential configurations from external
4001
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
4005
4002
  # @return [::Object]
4006
4003
  # @!attribute [rw] scope
4007
4004
  # The OAuth scopes
@@ -4034,6 +4031,11 @@ module Google
4034
4031
  # default endpoint URL. The default value of nil uses the environment
4035
4032
  # universe (usually the default "googleapis.com" universe).
4036
4033
  # @return [::String,nil]
4034
+ # @!attribute [rw] logger
4035
+ # A custom logger to use for request/response debug logging, or the value
4036
+ # `:default` (the default) to construct a default logger, or `nil` to
4037
+ # explicitly disable logging.
4038
+ # @return [::Logger,:default,nil]
4037
4039
  #
4038
4040
  class Configuration
4039
4041
  extend ::Gapic::Config
@@ -4055,6 +4057,7 @@ module Google
4055
4057
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
4056
4058
  config_attr :quota_project, nil, ::String, nil
4057
4059
  config_attr :universe_domain, nil, ::String, nil
4060
+ config_attr :logger, :default, ::Logger, nil, :default
4058
4061
 
4059
4062
  # @private
4060
4063
  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
  ##