google-cloud-vm_migration-v1 1.0.2 → 1.2.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.
@@ -167,15 +167,27 @@ module Google
167
167
  endpoint: @config.endpoint,
168
168
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
169
169
  universe_domain: @config.universe_domain,
170
- credentials: credentials
170
+ credentials: credentials,
171
+ logger: @config.logger
171
172
  )
172
173
 
174
+ @vm_migration_stub.logger(stub: true)&.info do |entry|
175
+ entry.set_system_name
176
+ entry.set_service
177
+ entry.message = "Created client for #{entry.service}"
178
+ entry.set_credentials_fields credentials
179
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
180
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
181
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
182
+ end
183
+
173
184
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
174
185
  config.credentials = credentials
175
186
  config.quota_project = @quota_project_id
176
187
  config.endpoint = @vm_migration_stub.endpoint
177
188
  config.universe_domain = @vm_migration_stub.universe_domain
178
189
  config.bindings_override = @config.bindings_override
190
+ config.logger = @vm_migration_stub.logger if config.respond_to? :logger=
179
191
  end
180
192
 
181
193
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
@@ -183,6 +195,7 @@ module Google
183
195
  config.quota_project = @quota_project_id
184
196
  config.endpoint = @vm_migration_stub.endpoint
185
197
  config.universe_domain = @vm_migration_stub.universe_domain
198
+ config.logger = @vm_migration_stub.logger if config.respond_to? :logger=
186
199
  end
187
200
  end
188
201
 
@@ -207,6 +220,15 @@ module Google
207
220
  #
208
221
  attr_reader :iam_policy_client
209
222
 
223
+ ##
224
+ # The logger used for request/response debug logging.
225
+ #
226
+ # @return [Logger]
227
+ #
228
+ def logger
229
+ @vm_migration_stub.logger
230
+ end
231
+
210
232
  # Service calls
211
233
 
212
234
  ##
@@ -301,7 +323,6 @@ module Google
301
323
 
302
324
  @vm_migration_stub.list_sources request, options do |result, operation|
303
325
  yield result, operation if block_given?
304
- return result
305
326
  end
306
327
  rescue ::Gapic::Rest::Error => e
307
328
  raise ::Google::Cloud::Error.from_error(e)
@@ -380,7 +401,6 @@ module Google
380
401
 
381
402
  @vm_migration_stub.get_source request, options do |result, operation|
382
403
  yield result, operation if block_given?
383
- return result
384
404
  end
385
405
  rescue ::Gapic::Rest::Error => e
386
406
  raise ::Google::Cloud::Error.from_error(e)
@@ -485,7 +505,7 @@ module Google
485
505
  @vm_migration_stub.create_source request, options do |result, operation|
486
506
  result = ::Gapic::Operation.new result, @operations_client, options: options
487
507
  yield result, operation if block_given?
488
- return result
508
+ throw :response, result
489
509
  end
490
510
  rescue ::Gapic::Rest::Error => e
491
511
  raise ::Google::Cloud::Error.from_error(e)
@@ -592,7 +612,7 @@ module Google
592
612
  @vm_migration_stub.update_source request, options do |result, operation|
593
613
  result = ::Gapic::Operation.new result, @operations_client, options: options
594
614
  yield result, operation if block_given?
595
- return result
615
+ throw :response, result
596
616
  end
597
617
  rescue ::Gapic::Rest::Error => e
598
618
  raise ::Google::Cloud::Error.from_error(e)
@@ -693,7 +713,7 @@ module Google
693
713
  @vm_migration_stub.delete_source request, options do |result, operation|
694
714
  result = ::Gapic::Operation.new result, @operations_client, options: options
695
715
  yield result, operation if block_given?
696
- return result
716
+ throw :response, result
697
717
  end
698
718
  rescue ::Gapic::Rest::Error => e
699
719
  raise ::Google::Cloud::Error.from_error(e)
@@ -779,7 +799,6 @@ module Google
779
799
 
780
800
  @vm_migration_stub.fetch_inventory request, options do |result, operation|
781
801
  yield result, operation if block_given?
782
- return result
783
802
  end
784
803
  rescue ::Gapic::Rest::Error => e
785
804
  raise ::Google::Cloud::Error.from_error(e)
@@ -880,7 +899,6 @@ module Google
880
899
 
881
900
  @vm_migration_stub.list_utilization_reports request, options do |result, operation|
882
901
  yield result, operation if block_given?
883
- return result
884
902
  end
885
903
  rescue ::Gapic::Rest::Error => e
886
904
  raise ::Google::Cloud::Error.from_error(e)
@@ -962,7 +980,6 @@ module Google
962
980
 
963
981
  @vm_migration_stub.get_utilization_report request, options do |result, operation|
964
982
  yield result, operation if block_given?
965
- return result
966
983
  end
967
984
  rescue ::Gapic::Rest::Error => e
968
985
  raise ::Google::Cloud::Error.from_error(e)
@@ -1072,7 +1089,7 @@ module Google
1072
1089
  @vm_migration_stub.create_utilization_report request, options do |result, operation|
1073
1090
  result = ::Gapic::Operation.new result, @operations_client, options: options
1074
1091
  yield result, operation if block_given?
1075
- return result
1092
+ throw :response, result
1076
1093
  end
1077
1094
  rescue ::Gapic::Rest::Error => e
1078
1095
  raise ::Google::Cloud::Error.from_error(e)
@@ -1173,7 +1190,7 @@ module Google
1173
1190
  @vm_migration_stub.delete_utilization_report request, options do |result, operation|
1174
1191
  result = ::Gapic::Operation.new result, @operations_client, options: options
1175
1192
  yield result, operation if block_given?
1176
- return result
1193
+ throw :response, result
1177
1194
  end
1178
1195
  rescue ::Gapic::Rest::Error => e
1179
1196
  raise ::Google::Cloud::Error.from_error(e)
@@ -1272,7 +1289,6 @@ module Google
1272
1289
 
1273
1290
  @vm_migration_stub.list_datacenter_connectors request, options do |result, operation|
1274
1291
  yield result, operation if block_given?
1275
- return result
1276
1292
  end
1277
1293
  rescue ::Gapic::Rest::Error => e
1278
1294
  raise ::Google::Cloud::Error.from_error(e)
@@ -1351,7 +1367,6 @@ module Google
1351
1367
 
1352
1368
  @vm_migration_stub.get_datacenter_connector request, options do |result, operation|
1353
1369
  yield result, operation if block_given?
1354
- return result
1355
1370
  end
1356
1371
  rescue ::Gapic::Rest::Error => e
1357
1372
  raise ::Google::Cloud::Error.from_error(e)
@@ -1459,7 +1474,7 @@ module Google
1459
1474
  @vm_migration_stub.create_datacenter_connector request, options do |result, operation|
1460
1475
  result = ::Gapic::Operation.new result, @operations_client, options: options
1461
1476
  yield result, operation if block_given?
1462
- return result
1477
+ throw :response, result
1463
1478
  end
1464
1479
  rescue ::Gapic::Rest::Error => e
1465
1480
  raise ::Google::Cloud::Error.from_error(e)
@@ -1560,7 +1575,7 @@ module Google
1560
1575
  @vm_migration_stub.delete_datacenter_connector request, options do |result, operation|
1561
1576
  result = ::Gapic::Operation.new result, @operations_client, options: options
1562
1577
  yield result, operation if block_given?
1563
- return result
1578
+ throw :response, result
1564
1579
  end
1565
1580
  rescue ::Gapic::Rest::Error => e
1566
1581
  raise ::Google::Cloud::Error.from_error(e)
@@ -1662,7 +1677,7 @@ module Google
1662
1677
  @vm_migration_stub.upgrade_appliance request, options do |result, operation|
1663
1678
  result = ::Gapic::Operation.new result, @operations_client, options: options
1664
1679
  yield result, operation if block_given?
1665
- return result
1680
+ throw :response, result
1666
1681
  end
1667
1682
  rescue ::Gapic::Rest::Error => e
1668
1683
  raise ::Google::Cloud::Error.from_error(e)
@@ -1767,7 +1782,7 @@ module Google
1767
1782
  @vm_migration_stub.create_migrating_vm request, options do |result, operation|
1768
1783
  result = ::Gapic::Operation.new result, @operations_client, options: options
1769
1784
  yield result, operation if block_given?
1770
- return result
1785
+ throw :response, result
1771
1786
  end
1772
1787
  rescue ::Gapic::Rest::Error => e
1773
1788
  raise ::Google::Cloud::Error.from_error(e)
@@ -1867,7 +1882,6 @@ module Google
1867
1882
 
1868
1883
  @vm_migration_stub.list_migrating_vms request, options do |result, operation|
1869
1884
  yield result, operation if block_given?
1870
- return result
1871
1885
  end
1872
1886
  rescue ::Gapic::Rest::Error => e
1873
1887
  raise ::Google::Cloud::Error.from_error(e)
@@ -1948,7 +1962,6 @@ module Google
1948
1962
 
1949
1963
  @vm_migration_stub.get_migrating_vm request, options do |result, operation|
1950
1964
  yield result, operation if block_given?
1951
- return result
1952
1965
  end
1953
1966
  rescue ::Gapic::Rest::Error => e
1954
1967
  raise ::Google::Cloud::Error.from_error(e)
@@ -2055,7 +2068,7 @@ module Google
2055
2068
  @vm_migration_stub.update_migrating_vm request, options do |result, operation|
2056
2069
  result = ::Gapic::Operation.new result, @operations_client, options: options
2057
2070
  yield result, operation if block_given?
2058
- return result
2071
+ throw :response, result
2059
2072
  end
2060
2073
  rescue ::Gapic::Rest::Error => e
2061
2074
  raise ::Google::Cloud::Error.from_error(e)
@@ -2142,7 +2155,7 @@ module Google
2142
2155
  @vm_migration_stub.delete_migrating_vm request, options do |result, operation|
2143
2156
  result = ::Gapic::Operation.new result, @operations_client, options: options
2144
2157
  yield result, operation if block_given?
2145
- return result
2158
+ throw :response, result
2146
2159
  end
2147
2160
  rescue ::Gapic::Rest::Error => e
2148
2161
  raise ::Google::Cloud::Error.from_error(e)
@@ -2230,7 +2243,7 @@ module Google
2230
2243
  @vm_migration_stub.start_migration request, options do |result, operation|
2231
2244
  result = ::Gapic::Operation.new result, @operations_client, options: options
2232
2245
  yield result, operation if block_given?
2233
- return result
2246
+ throw :response, result
2234
2247
  end
2235
2248
  rescue ::Gapic::Rest::Error => e
2236
2249
  raise ::Google::Cloud::Error.from_error(e)
@@ -2320,7 +2333,7 @@ module Google
2320
2333
  @vm_migration_stub.resume_migration request, options do |result, operation|
2321
2334
  result = ::Gapic::Operation.new result, @operations_client, options: options
2322
2335
  yield result, operation if block_given?
2323
- return result
2336
+ throw :response, result
2324
2337
  end
2325
2338
  rescue ::Gapic::Rest::Error => e
2326
2339
  raise ::Google::Cloud::Error.from_error(e)
@@ -2409,7 +2422,7 @@ module Google
2409
2422
  @vm_migration_stub.pause_migration request, options do |result, operation|
2410
2423
  result = ::Gapic::Operation.new result, @operations_client, options: options
2411
2424
  yield result, operation if block_given?
2412
- return result
2425
+ throw :response, result
2413
2426
  end
2414
2427
  rescue ::Gapic::Rest::Error => e
2415
2428
  raise ::Google::Cloud::Error.from_error(e)
@@ -2497,7 +2510,7 @@ module Google
2497
2510
  @vm_migration_stub.finalize_migration request, options do |result, operation|
2498
2511
  result = ::Gapic::Operation.new result, @operations_client, options: options
2499
2512
  yield result, operation if block_given?
2500
- return result
2513
+ throw :response, result
2501
2514
  end
2502
2515
  rescue ::Gapic::Rest::Error => e
2503
2516
  raise ::Google::Cloud::Error.from_error(e)
@@ -2602,7 +2615,7 @@ module Google
2602
2615
  @vm_migration_stub.create_clone_job request, options do |result, operation|
2603
2616
  result = ::Gapic::Operation.new result, @operations_client, options: options
2604
2617
  yield result, operation if block_given?
2605
- return result
2618
+ throw :response, result
2606
2619
  end
2607
2620
  rescue ::Gapic::Rest::Error => e
2608
2621
  raise ::Google::Cloud::Error.from_error(e)
@@ -2689,7 +2702,7 @@ module Google
2689
2702
  @vm_migration_stub.cancel_clone_job request, options do |result, operation|
2690
2703
  result = ::Gapic::Operation.new result, @operations_client, options: options
2691
2704
  yield result, operation if block_given?
2692
- return result
2705
+ throw :response, result
2693
2706
  end
2694
2707
  rescue ::Gapic::Rest::Error => e
2695
2708
  raise ::Google::Cloud::Error.from_error(e)
@@ -2787,7 +2800,6 @@ module Google
2787
2800
 
2788
2801
  @vm_migration_stub.list_clone_jobs request, options do |result, operation|
2789
2802
  yield result, operation if block_given?
2790
- return result
2791
2803
  end
2792
2804
  rescue ::Gapic::Rest::Error => e
2793
2805
  raise ::Google::Cloud::Error.from_error(e)
@@ -2866,7 +2878,6 @@ module Google
2866
2878
 
2867
2879
  @vm_migration_stub.get_clone_job request, options do |result, operation|
2868
2880
  yield result, operation if block_given?
2869
- return result
2870
2881
  end
2871
2882
  rescue ::Gapic::Rest::Error => e
2872
2883
  raise ::Google::Cloud::Error.from_error(e)
@@ -2973,7 +2984,7 @@ module Google
2973
2984
  @vm_migration_stub.create_cutover_job request, options do |result, operation|
2974
2985
  result = ::Gapic::Operation.new result, @operations_client, options: options
2975
2986
  yield result, operation if block_given?
2976
- return result
2987
+ throw :response, result
2977
2988
  end
2978
2989
  rescue ::Gapic::Rest::Error => e
2979
2990
  raise ::Google::Cloud::Error.from_error(e)
@@ -3060,7 +3071,7 @@ module Google
3060
3071
  @vm_migration_stub.cancel_cutover_job request, options do |result, operation|
3061
3072
  result = ::Gapic::Operation.new result, @operations_client, options: options
3062
3073
  yield result, operation if block_given?
3063
- return result
3074
+ throw :response, result
3064
3075
  end
3065
3076
  rescue ::Gapic::Rest::Error => e
3066
3077
  raise ::Google::Cloud::Error.from_error(e)
@@ -3158,7 +3169,6 @@ module Google
3158
3169
 
3159
3170
  @vm_migration_stub.list_cutover_jobs request, options do |result, operation|
3160
3171
  yield result, operation if block_given?
3161
- return result
3162
3172
  end
3163
3173
  rescue ::Gapic::Rest::Error => e
3164
3174
  raise ::Google::Cloud::Error.from_error(e)
@@ -3237,7 +3247,6 @@ module Google
3237
3247
 
3238
3248
  @vm_migration_stub.get_cutover_job request, options do |result, operation|
3239
3249
  yield result, operation if block_given?
3240
- return result
3241
3250
  end
3242
3251
  rescue ::Gapic::Rest::Error => e
3243
3252
  raise ::Google::Cloud::Error.from_error(e)
@@ -3335,7 +3344,6 @@ module Google
3335
3344
 
3336
3345
  @vm_migration_stub.list_groups request, options do |result, operation|
3337
3346
  yield result, operation if block_given?
3338
- return result
3339
3347
  end
3340
3348
  rescue ::Gapic::Rest::Error => e
3341
3349
  raise ::Google::Cloud::Error.from_error(e)
@@ -3414,7 +3422,6 @@ module Google
3414
3422
 
3415
3423
  @vm_migration_stub.get_group request, options do |result, operation|
3416
3424
  yield result, operation if block_given?
3417
- return result
3418
3425
  end
3419
3426
  rescue ::Gapic::Rest::Error => e
3420
3427
  raise ::Google::Cloud::Error.from_error(e)
@@ -3519,7 +3526,7 @@ module Google
3519
3526
  @vm_migration_stub.create_group request, options do |result, operation|
3520
3527
  result = ::Gapic::Operation.new result, @operations_client, options: options
3521
3528
  yield result, operation if block_given?
3522
- return result
3529
+ throw :response, result
3523
3530
  end
3524
3531
  rescue ::Gapic::Rest::Error => e
3525
3532
  raise ::Google::Cloud::Error.from_error(e)
@@ -3626,7 +3633,7 @@ module Google
3626
3633
  @vm_migration_stub.update_group request, options do |result, operation|
3627
3634
  result = ::Gapic::Operation.new result, @operations_client, options: options
3628
3635
  yield result, operation if block_given?
3629
- return result
3636
+ throw :response, result
3630
3637
  end
3631
3638
  rescue ::Gapic::Rest::Error => e
3632
3639
  raise ::Google::Cloud::Error.from_error(e)
@@ -3727,7 +3734,7 @@ module Google
3727
3734
  @vm_migration_stub.delete_group request, options do |result, operation|
3728
3735
  result = ::Gapic::Operation.new result, @operations_client, options: options
3729
3736
  yield result, operation if block_given?
3730
- return result
3737
+ throw :response, result
3731
3738
  end
3732
3739
  rescue ::Gapic::Rest::Error => e
3733
3740
  raise ::Google::Cloud::Error.from_error(e)
@@ -3816,7 +3823,7 @@ module Google
3816
3823
  @vm_migration_stub.add_group_migration request, options do |result, operation|
3817
3824
  result = ::Gapic::Operation.new result, @operations_client, options: options
3818
3825
  yield result, operation if block_given?
3819
- return result
3826
+ throw :response, result
3820
3827
  end
3821
3828
  rescue ::Gapic::Rest::Error => e
3822
3829
  raise ::Google::Cloud::Error.from_error(e)
@@ -3905,7 +3912,7 @@ module Google
3905
3912
  @vm_migration_stub.remove_group_migration request, options do |result, operation|
3906
3913
  result = ::Gapic::Operation.new result, @operations_client, options: options
3907
3914
  yield result, operation if block_given?
3908
- return result
3915
+ throw :response, result
3909
3916
  end
3910
3917
  rescue ::Gapic::Rest::Error => e
3911
3918
  raise ::Google::Cloud::Error.from_error(e)
@@ -4006,7 +4013,6 @@ module Google
4006
4013
 
4007
4014
  @vm_migration_stub.list_target_projects request, options do |result, operation|
4008
4015
  yield result, operation if block_given?
4009
- return result
4010
4016
  end
4011
4017
  rescue ::Gapic::Rest::Error => e
4012
4018
  raise ::Google::Cloud::Error.from_error(e)
@@ -4088,7 +4094,6 @@ module Google
4088
4094
 
4089
4095
  @vm_migration_stub.get_target_project request, options do |result, operation|
4090
4096
  yield result, operation if block_given?
4091
- return result
4092
4097
  end
4093
4098
  rescue ::Gapic::Rest::Error => e
4094
4099
  raise ::Google::Cloud::Error.from_error(e)
@@ -4196,7 +4201,7 @@ module Google
4196
4201
  @vm_migration_stub.create_target_project request, options do |result, operation|
4197
4202
  result = ::Gapic::Operation.new result, @operations_client, options: options
4198
4203
  yield result, operation if block_given?
4199
- return result
4204
+ throw :response, result
4200
4205
  end
4201
4206
  rescue ::Gapic::Rest::Error => e
4202
4207
  raise ::Google::Cloud::Error.from_error(e)
@@ -4306,7 +4311,7 @@ module Google
4306
4311
  @vm_migration_stub.update_target_project request, options do |result, operation|
4307
4312
  result = ::Gapic::Operation.new result, @operations_client, options: options
4308
4313
  yield result, operation if block_given?
4309
- return result
4314
+ throw :response, result
4310
4315
  end
4311
4316
  rescue ::Gapic::Rest::Error => e
4312
4317
  raise ::Google::Cloud::Error.from_error(e)
@@ -4410,7 +4415,7 @@ module Google
4410
4415
  @vm_migration_stub.delete_target_project request, options do |result, operation|
4411
4416
  result = ::Gapic::Operation.new result, @operations_client, options: options
4412
4417
  yield result, operation if block_given?
4413
- return result
4418
+ throw :response, result
4414
4419
  end
4415
4420
  rescue ::Gapic::Rest::Error => e
4416
4421
  raise ::Google::Cloud::Error.from_error(e)
@@ -4508,7 +4513,6 @@ module Google
4508
4513
 
4509
4514
  @vm_migration_stub.list_replication_cycles request, options do |result, operation|
4510
4515
  yield result, operation if block_given?
4511
- return result
4512
4516
  end
4513
4517
  rescue ::Gapic::Rest::Error => e
4514
4518
  raise ::Google::Cloud::Error.from_error(e)
@@ -4587,7 +4591,6 @@ module Google
4587
4591
 
4588
4592
  @vm_migration_stub.get_replication_cycle request, options do |result, operation|
4589
4593
  yield result, operation if block_given?
4590
- return result
4591
4594
  end
4592
4595
  rescue ::Gapic::Rest::Error => e
4593
4596
  raise ::Google::Cloud::Error.from_error(e)
@@ -4667,6 +4670,11 @@ module Google
4667
4670
  # default endpoint URL. The default value of nil uses the environment
4668
4671
  # universe (usually the default "googleapis.com" universe).
4669
4672
  # @return [::String,nil]
4673
+ # @!attribute [rw] logger
4674
+ # A custom logger to use for request/response debug logging, or the value
4675
+ # `:default` (the default) to construct a default logger, or `nil` to
4676
+ # explicitly disable logging.
4677
+ # @return [::Logger,:default,nil]
4670
4678
  #
4671
4679
  class Configuration
4672
4680
  extend ::Gapic::Config
@@ -4695,6 +4703,7 @@ module Google
4695
4703
  # by the host service.
4696
4704
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
4697
4705
  config_attr :bindings_override, {}, ::Hash, nil
4706
+ config_attr :logger, :default, ::Logger, nil, :default
4698
4707
 
4699
4708
  # @private
4700
4709
  def initialize parent_config = nil
@@ -196,7 +196,7 @@ module Google
196
196
  @operations_stub.list_operations request, options do |result, operation|
197
197
  result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
198
198
  yield result, operation if block_given?
199
- return result
199
+ throw :response, result
200
200
  end
201
201
  rescue ::Gapic::Rest::Error => e
202
202
  raise ::Google::Cloud::Error.from_error(e)
@@ -285,7 +285,7 @@ module Google
285
285
  @operations_stub.get_operation request, options do |result, operation|
286
286
  result = ::Gapic::Operation.new result, @operations_client, options: options
287
287
  yield result, operation if block_given?
288
- return result
288
+ throw :response, result
289
289
  end
290
290
  rescue ::Gapic::Rest::Error => e
291
291
  raise ::Google::Cloud::Error.from_error(e)
@@ -367,7 +367,6 @@ module Google
367
367
 
368
368
  @operations_stub.delete_operation request, options do |result, operation|
369
369
  yield result, operation if block_given?
370
- return result
371
370
  end
372
371
  rescue ::Gapic::Rest::Error => e
373
372
  raise ::Google::Cloud::Error.from_error(e)
@@ -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
  ##