google-cloud-network_services-v1 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -161,15 +161,27 @@ module Google
161
161
  endpoint: @config.endpoint,
162
162
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
163
163
  universe_domain: @config.universe_domain,
164
- credentials: credentials
164
+ credentials: credentials,
165
+ logger: @config.logger
165
166
  )
166
167
 
168
+ @network_services_stub.logger(stub: true)&.info do |entry|
169
+ entry.set_system_name
170
+ entry.set_service
171
+ entry.message = "Created client for #{entry.service}"
172
+ entry.set_credentials_fields credentials
173
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
174
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
175
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
176
+ end
177
+
167
178
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
168
179
  config.credentials = credentials
169
180
  config.quota_project = @quota_project_id
170
181
  config.endpoint = @network_services_stub.endpoint
171
182
  config.universe_domain = @network_services_stub.universe_domain
172
183
  config.bindings_override = @config.bindings_override
184
+ config.logger = @network_services_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|
@@ -178,6 +190,7 @@ module Google
178
190
  config.endpoint = @network_services_stub.endpoint
179
191
  config.universe_domain = @network_services_stub.universe_domain
180
192
  config.bindings_override = @config.bindings_override
193
+ config.logger = @network_services_stub.logger if config.respond_to? :logger=
181
194
  end
182
195
  end
183
196
 
@@ -202,6 +215,15 @@ module Google
202
215
  #
203
216
  attr_reader :iam_policy_client
204
217
 
218
+ ##
219
+ # The logger used for request/response debug logging.
220
+ #
221
+ # @return [Logger]
222
+ #
223
+ def logger
224
+ @network_services_stub.logger
225
+ end
226
+
205
227
  # Service calls
206
228
 
207
229
  ##
@@ -290,7 +312,7 @@ module Google
290
312
  @network_services_stub.list_endpoint_policies request, options do |result, operation|
291
313
  result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_endpoint_policies, "endpoint_policies", request, result, options
292
314
  yield result, operation if block_given?
293
- return result
315
+ throw :response, result
294
316
  end
295
317
  rescue ::Gapic::Rest::Error => e
296
318
  raise ::Google::Cloud::Error.from_error(e)
@@ -370,7 +392,6 @@ module Google
370
392
 
371
393
  @network_services_stub.get_endpoint_policy request, options do |result, operation|
372
394
  yield result, operation if block_given?
373
- return result
374
395
  end
375
396
  rescue ::Gapic::Rest::Error => e
376
397
  raise ::Google::Cloud::Error.from_error(e)
@@ -463,7 +484,7 @@ module Google
463
484
  @network_services_stub.create_endpoint_policy request, options do |result, operation|
464
485
  result = ::Gapic::Operation.new result, @operations_client, options: options
465
486
  yield result, operation if block_given?
466
- return result
487
+ throw :response, result
467
488
  end
468
489
  rescue ::Gapic::Rest::Error => e
469
490
  raise ::Google::Cloud::Error.from_error(e)
@@ -556,7 +577,7 @@ module Google
556
577
  @network_services_stub.update_endpoint_policy request, options do |result, operation|
557
578
  result = ::Gapic::Operation.new result, @operations_client, options: options
558
579
  yield result, operation if block_given?
559
- return result
580
+ throw :response, result
560
581
  end
561
582
  rescue ::Gapic::Rest::Error => e
562
583
  raise ::Google::Cloud::Error.from_error(e)
@@ -644,7 +665,7 @@ module Google
644
665
  @network_services_stub.delete_endpoint_policy request, options do |result, operation|
645
666
  result = ::Gapic::Operation.new result, @operations_client, options: options
646
667
  yield result, operation if block_given?
647
- return result
668
+ throw :response, result
648
669
  end
649
670
  rescue ::Gapic::Rest::Error => e
650
671
  raise ::Google::Cloud::Error.from_error(e)
@@ -735,7 +756,7 @@ module Google
735
756
  @network_services_stub.list_gateways request, options do |result, operation|
736
757
  result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_gateways, "gateways", request, result, options
737
758
  yield result, operation if block_given?
738
- return result
759
+ throw :response, result
739
760
  end
740
761
  rescue ::Gapic::Rest::Error => e
741
762
  raise ::Google::Cloud::Error.from_error(e)
@@ -815,7 +836,6 @@ module Google
815
836
 
816
837
  @network_services_stub.get_gateway request, options do |result, operation|
817
838
  yield result, operation if block_given?
818
- return result
819
839
  end
820
840
  rescue ::Gapic::Rest::Error => e
821
841
  raise ::Google::Cloud::Error.from_error(e)
@@ -907,7 +927,7 @@ module Google
907
927
  @network_services_stub.create_gateway request, options do |result, operation|
908
928
  result = ::Gapic::Operation.new result, @operations_client, options: options
909
929
  yield result, operation if block_given?
910
- return result
930
+ throw :response, result
911
931
  end
912
932
  rescue ::Gapic::Rest::Error => e
913
933
  raise ::Google::Cloud::Error.from_error(e)
@@ -1000,7 +1020,7 @@ module Google
1000
1020
  @network_services_stub.update_gateway request, options do |result, operation|
1001
1021
  result = ::Gapic::Operation.new result, @operations_client, options: options
1002
1022
  yield result, operation if block_given?
1003
- return result
1023
+ throw :response, result
1004
1024
  end
1005
1025
  rescue ::Gapic::Rest::Error => e
1006
1026
  raise ::Google::Cloud::Error.from_error(e)
@@ -1088,7 +1108,7 @@ module Google
1088
1108
  @network_services_stub.delete_gateway request, options do |result, operation|
1089
1109
  result = ::Gapic::Operation.new result, @operations_client, options: options
1090
1110
  yield result, operation if block_given?
1091
- return result
1111
+ throw :response, result
1092
1112
  end
1093
1113
  rescue ::Gapic::Rest::Error => e
1094
1114
  raise ::Google::Cloud::Error.from_error(e)
@@ -1179,7 +1199,7 @@ module Google
1179
1199
  @network_services_stub.list_grpc_routes request, options do |result, operation|
1180
1200
  result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_grpc_routes, "grpc_routes", request, result, options
1181
1201
  yield result, operation if block_given?
1182
- return result
1202
+ throw :response, result
1183
1203
  end
1184
1204
  rescue ::Gapic::Rest::Error => e
1185
1205
  raise ::Google::Cloud::Error.from_error(e)
@@ -1259,7 +1279,6 @@ module Google
1259
1279
 
1260
1280
  @network_services_stub.get_grpc_route request, options do |result, operation|
1261
1281
  yield result, operation if block_given?
1262
- return result
1263
1282
  end
1264
1283
  rescue ::Gapic::Rest::Error => e
1265
1284
  raise ::Google::Cloud::Error.from_error(e)
@@ -1351,7 +1370,7 @@ module Google
1351
1370
  @network_services_stub.create_grpc_route request, options do |result, operation|
1352
1371
  result = ::Gapic::Operation.new result, @operations_client, options: options
1353
1372
  yield result, operation if block_given?
1354
- return result
1373
+ throw :response, result
1355
1374
  end
1356
1375
  rescue ::Gapic::Rest::Error => e
1357
1376
  raise ::Google::Cloud::Error.from_error(e)
@@ -1444,7 +1463,7 @@ module Google
1444
1463
  @network_services_stub.update_grpc_route request, options do |result, operation|
1445
1464
  result = ::Gapic::Operation.new result, @operations_client, options: options
1446
1465
  yield result, operation if block_given?
1447
- return result
1466
+ throw :response, result
1448
1467
  end
1449
1468
  rescue ::Gapic::Rest::Error => e
1450
1469
  raise ::Google::Cloud::Error.from_error(e)
@@ -1532,7 +1551,7 @@ module Google
1532
1551
  @network_services_stub.delete_grpc_route request, options do |result, operation|
1533
1552
  result = ::Gapic::Operation.new result, @operations_client, options: options
1534
1553
  yield result, operation if block_given?
1535
- return result
1554
+ throw :response, result
1536
1555
  end
1537
1556
  rescue ::Gapic::Rest::Error => e
1538
1557
  raise ::Google::Cloud::Error.from_error(e)
@@ -1623,7 +1642,7 @@ module Google
1623
1642
  @network_services_stub.list_http_routes request, options do |result, operation|
1624
1643
  result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_http_routes, "http_routes", request, result, options
1625
1644
  yield result, operation if block_given?
1626
- return result
1645
+ throw :response, result
1627
1646
  end
1628
1647
  rescue ::Gapic::Rest::Error => e
1629
1648
  raise ::Google::Cloud::Error.from_error(e)
@@ -1703,7 +1722,6 @@ module Google
1703
1722
 
1704
1723
  @network_services_stub.get_http_route request, options do |result, operation|
1705
1724
  yield result, operation if block_given?
1706
- return result
1707
1725
  end
1708
1726
  rescue ::Gapic::Rest::Error => e
1709
1727
  raise ::Google::Cloud::Error.from_error(e)
@@ -1795,7 +1813,7 @@ module Google
1795
1813
  @network_services_stub.create_http_route request, options do |result, operation|
1796
1814
  result = ::Gapic::Operation.new result, @operations_client, options: options
1797
1815
  yield result, operation if block_given?
1798
- return result
1816
+ throw :response, result
1799
1817
  end
1800
1818
  rescue ::Gapic::Rest::Error => e
1801
1819
  raise ::Google::Cloud::Error.from_error(e)
@@ -1888,7 +1906,7 @@ module Google
1888
1906
  @network_services_stub.update_http_route request, options do |result, operation|
1889
1907
  result = ::Gapic::Operation.new result, @operations_client, options: options
1890
1908
  yield result, operation if block_given?
1891
- return result
1909
+ throw :response, result
1892
1910
  end
1893
1911
  rescue ::Gapic::Rest::Error => e
1894
1912
  raise ::Google::Cloud::Error.from_error(e)
@@ -1976,7 +1994,7 @@ module Google
1976
1994
  @network_services_stub.delete_http_route request, options do |result, operation|
1977
1995
  result = ::Gapic::Operation.new result, @operations_client, options: options
1978
1996
  yield result, operation if block_given?
1979
- return result
1997
+ throw :response, result
1980
1998
  end
1981
1999
  rescue ::Gapic::Rest::Error => e
1982
2000
  raise ::Google::Cloud::Error.from_error(e)
@@ -2067,7 +2085,7 @@ module Google
2067
2085
  @network_services_stub.list_tcp_routes request, options do |result, operation|
2068
2086
  result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_tcp_routes, "tcp_routes", request, result, options
2069
2087
  yield result, operation if block_given?
2070
- return result
2088
+ throw :response, result
2071
2089
  end
2072
2090
  rescue ::Gapic::Rest::Error => e
2073
2091
  raise ::Google::Cloud::Error.from_error(e)
@@ -2147,7 +2165,6 @@ module Google
2147
2165
 
2148
2166
  @network_services_stub.get_tcp_route request, options do |result, operation|
2149
2167
  yield result, operation if block_given?
2150
- return result
2151
2168
  end
2152
2169
  rescue ::Gapic::Rest::Error => e
2153
2170
  raise ::Google::Cloud::Error.from_error(e)
@@ -2239,7 +2256,7 @@ module Google
2239
2256
  @network_services_stub.create_tcp_route request, options do |result, operation|
2240
2257
  result = ::Gapic::Operation.new result, @operations_client, options: options
2241
2258
  yield result, operation if block_given?
2242
- return result
2259
+ throw :response, result
2243
2260
  end
2244
2261
  rescue ::Gapic::Rest::Error => e
2245
2262
  raise ::Google::Cloud::Error.from_error(e)
@@ -2332,7 +2349,7 @@ module Google
2332
2349
  @network_services_stub.update_tcp_route request, options do |result, operation|
2333
2350
  result = ::Gapic::Operation.new result, @operations_client, options: options
2334
2351
  yield result, operation if block_given?
2335
- return result
2352
+ throw :response, result
2336
2353
  end
2337
2354
  rescue ::Gapic::Rest::Error => e
2338
2355
  raise ::Google::Cloud::Error.from_error(e)
@@ -2420,7 +2437,7 @@ module Google
2420
2437
  @network_services_stub.delete_tcp_route request, options do |result, operation|
2421
2438
  result = ::Gapic::Operation.new result, @operations_client, options: options
2422
2439
  yield result, operation if block_given?
2423
- return result
2440
+ throw :response, result
2424
2441
  end
2425
2442
  rescue ::Gapic::Rest::Error => e
2426
2443
  raise ::Google::Cloud::Error.from_error(e)
@@ -2511,7 +2528,7 @@ module Google
2511
2528
  @network_services_stub.list_tls_routes request, options do |result, operation|
2512
2529
  result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_tls_routes, "tls_routes", request, result, options
2513
2530
  yield result, operation if block_given?
2514
- return result
2531
+ throw :response, result
2515
2532
  end
2516
2533
  rescue ::Gapic::Rest::Error => e
2517
2534
  raise ::Google::Cloud::Error.from_error(e)
@@ -2591,7 +2608,6 @@ module Google
2591
2608
 
2592
2609
  @network_services_stub.get_tls_route request, options do |result, operation|
2593
2610
  yield result, operation if block_given?
2594
- return result
2595
2611
  end
2596
2612
  rescue ::Gapic::Rest::Error => e
2597
2613
  raise ::Google::Cloud::Error.from_error(e)
@@ -2683,7 +2699,7 @@ module Google
2683
2699
  @network_services_stub.create_tls_route request, options do |result, operation|
2684
2700
  result = ::Gapic::Operation.new result, @operations_client, options: options
2685
2701
  yield result, operation if block_given?
2686
- return result
2702
+ throw :response, result
2687
2703
  end
2688
2704
  rescue ::Gapic::Rest::Error => e
2689
2705
  raise ::Google::Cloud::Error.from_error(e)
@@ -2776,7 +2792,7 @@ module Google
2776
2792
  @network_services_stub.update_tls_route request, options do |result, operation|
2777
2793
  result = ::Gapic::Operation.new result, @operations_client, options: options
2778
2794
  yield result, operation if block_given?
2779
- return result
2795
+ throw :response, result
2780
2796
  end
2781
2797
  rescue ::Gapic::Rest::Error => e
2782
2798
  raise ::Google::Cloud::Error.from_error(e)
@@ -2864,7 +2880,7 @@ module Google
2864
2880
  @network_services_stub.delete_tls_route request, options do |result, operation|
2865
2881
  result = ::Gapic::Operation.new result, @operations_client, options: options
2866
2882
  yield result, operation if block_given?
2867
- return result
2883
+ throw :response, result
2868
2884
  end
2869
2885
  rescue ::Gapic::Rest::Error => e
2870
2886
  raise ::Google::Cloud::Error.from_error(e)
@@ -2955,7 +2971,7 @@ module Google
2955
2971
  @network_services_stub.list_service_bindings request, options do |result, operation|
2956
2972
  result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_service_bindings, "service_bindings", request, result, options
2957
2973
  yield result, operation if block_given?
2958
- return result
2974
+ throw :response, result
2959
2975
  end
2960
2976
  rescue ::Gapic::Rest::Error => e
2961
2977
  raise ::Google::Cloud::Error.from_error(e)
@@ -3035,7 +3051,6 @@ module Google
3035
3051
 
3036
3052
  @network_services_stub.get_service_binding request, options do |result, operation|
3037
3053
  yield result, operation if block_given?
3038
- return result
3039
3054
  end
3040
3055
  rescue ::Gapic::Rest::Error => e
3041
3056
  raise ::Google::Cloud::Error.from_error(e)
@@ -3127,7 +3142,7 @@ module Google
3127
3142
  @network_services_stub.create_service_binding request, options do |result, operation|
3128
3143
  result = ::Gapic::Operation.new result, @operations_client, options: options
3129
3144
  yield result, operation if block_given?
3130
- return result
3145
+ throw :response, result
3131
3146
  end
3132
3147
  rescue ::Gapic::Rest::Error => e
3133
3148
  raise ::Google::Cloud::Error.from_error(e)
@@ -3215,7 +3230,7 @@ module Google
3215
3230
  @network_services_stub.delete_service_binding request, options do |result, operation|
3216
3231
  result = ::Gapic::Operation.new result, @operations_client, options: options
3217
3232
  yield result, operation if block_given?
3218
- return result
3233
+ throw :response, result
3219
3234
  end
3220
3235
  rescue ::Gapic::Rest::Error => e
3221
3236
  raise ::Google::Cloud::Error.from_error(e)
@@ -3306,7 +3321,7 @@ module Google
3306
3321
  @network_services_stub.list_meshes request, options do |result, operation|
3307
3322
  result = ::Gapic::Rest::PagedEnumerable.new @network_services_stub, :list_meshes, "meshes", request, result, options
3308
3323
  yield result, operation if block_given?
3309
- return result
3324
+ throw :response, result
3310
3325
  end
3311
3326
  rescue ::Gapic::Rest::Error => e
3312
3327
  raise ::Google::Cloud::Error.from_error(e)
@@ -3386,7 +3401,6 @@ module Google
3386
3401
 
3387
3402
  @network_services_stub.get_mesh request, options do |result, operation|
3388
3403
  yield result, operation if block_given?
3389
- return result
3390
3404
  end
3391
3405
  rescue ::Gapic::Rest::Error => e
3392
3406
  raise ::Google::Cloud::Error.from_error(e)
@@ -3478,7 +3492,7 @@ module Google
3478
3492
  @network_services_stub.create_mesh request, options do |result, operation|
3479
3493
  result = ::Gapic::Operation.new result, @operations_client, options: options
3480
3494
  yield result, operation if block_given?
3481
- return result
3495
+ throw :response, result
3482
3496
  end
3483
3497
  rescue ::Gapic::Rest::Error => e
3484
3498
  raise ::Google::Cloud::Error.from_error(e)
@@ -3571,7 +3585,7 @@ module Google
3571
3585
  @network_services_stub.update_mesh request, options do |result, operation|
3572
3586
  result = ::Gapic::Operation.new result, @operations_client, options: options
3573
3587
  yield result, operation if block_given?
3574
- return result
3588
+ throw :response, result
3575
3589
  end
3576
3590
  rescue ::Gapic::Rest::Error => e
3577
3591
  raise ::Google::Cloud::Error.from_error(e)
@@ -3659,7 +3673,7 @@ module Google
3659
3673
  @network_services_stub.delete_mesh request, options do |result, operation|
3660
3674
  result = ::Gapic::Operation.new result, @operations_client, options: options
3661
3675
  yield result, operation if block_given?
3662
- return result
3676
+ throw :response, result
3663
3677
  end
3664
3678
  rescue ::Gapic::Rest::Error => e
3665
3679
  raise ::Google::Cloud::Error.from_error(e)
@@ -3739,6 +3753,11 @@ module Google
3739
3753
  # default endpoint URL. The default value of nil uses the environment
3740
3754
  # universe (usually the default "googleapis.com" universe).
3741
3755
  # @return [::String,nil]
3756
+ # @!attribute [rw] logger
3757
+ # A custom logger to use for request/response debug logging, or the value
3758
+ # `:default` (the default) to construct a default logger, or `nil` to
3759
+ # explicitly disable logging.
3760
+ # @return [::Logger,:default,nil]
3742
3761
  #
3743
3762
  class Configuration
3744
3763
  extend ::Gapic::Config
@@ -3767,6 +3786,7 @@ module Google
3767
3786
  # by the host service.
3768
3787
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
3769
3788
  config_attr :bindings_override, {}, ::Hash, nil
3789
+ config_attr :logger, :default, ::Logger, nil, :default
3770
3790
 
3771
3791
  # @private
3772
3792
  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)
@@ -543,6 +534,11 @@ module Google
543
534
  # default endpoint URL. The default value of nil uses the environment
544
535
  # universe (usually the default "googleapis.com" universe).
545
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]
546
542
  #
547
543
  class Configuration
548
544
  extend ::Gapic::Config
@@ -564,6 +560,7 @@ module Google
564
560
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
565
561
  config_attr :quota_project, nil, ::String, nil
566
562
  config_attr :universe_domain, nil, ::String, nil
563
+ config_attr :logger, :default, ::Logger, nil, :default
567
564
 
568
565
  # @private
569
566
  def initialize parent_config = nil
@@ -683,16 +680,18 @@ module Google
683
680
 
684
681
  response = @client_stub.make_http_request(
685
682
  verb,
686
- uri: uri,
687
- body: body || "",
688
- params: query_string_params,
683
+ uri: uri,
684
+ body: body || "",
685
+ params: query_string_params,
686
+ method_name: "list_operations",
689
687
  options: options
690
688
  )
691
689
  operation = ::Gapic::Rest::TransportOperation.new response
692
690
  result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
693
-
694
- yield result, operation if block_given?
695
- result
691
+ catch :response do
692
+ yield result, operation if block_given?
693
+ result
694
+ end
696
695
  end
697
696
 
698
697
  ##
@@ -721,16 +720,18 @@ module Google
721
720
 
722
721
  response = @client_stub.make_http_request(
723
722
  verb,
724
- uri: uri,
725
- body: body || "",
726
- params: query_string_params,
723
+ uri: uri,
724
+ body: body || "",
725
+ params: query_string_params,
726
+ method_name: "get_operation",
727
727
  options: options
728
728
  )
729
729
  operation = ::Gapic::Rest::TransportOperation.new response
730
730
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
731
-
732
- yield result, operation if block_given?
733
- result
731
+ catch :response do
732
+ yield result, operation if block_given?
733
+ result
734
+ end
734
735
  end
735
736
 
736
737
  ##
@@ -759,16 +760,18 @@ module Google
759
760
 
760
761
  response = @client_stub.make_http_request(
761
762
  verb,
762
- uri: uri,
763
- body: body || "",
764
- params: query_string_params,
763
+ uri: uri,
764
+ body: body || "",
765
+ params: query_string_params,
766
+ method_name: "delete_operation",
765
767
  options: options
766
768
  )
767
769
  operation = ::Gapic::Rest::TransportOperation.new response
768
770
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
769
-
770
- yield result, operation if block_given?
771
- result
771
+ catch :response do
772
+ yield result, operation if block_given?
773
+ result
774
+ end
772
775
  end
773
776
 
774
777
  ##
@@ -797,16 +800,18 @@ module Google
797
800
 
798
801
  response = @client_stub.make_http_request(
799
802
  verb,
800
- uri: uri,
801
- body: body || "",
802
- params: query_string_params,
803
+ uri: uri,
804
+ body: body || "",
805
+ params: query_string_params,
806
+ method_name: "cancel_operation",
803
807
  options: options
804
808
  )
805
809
  operation = ::Gapic::Rest::TransportOperation.new response
806
810
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
807
-
808
- yield result, operation if block_given?
809
- result
811
+ catch :response do
812
+ yield result, operation if block_given?
813
+ result
814
+ end
810
815
  end
811
816
 
812
817
  ##