google-cloud-migration_center-v1 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -162,15 +162,27 @@ module Google
162
162
  endpoint: @config.endpoint,
163
163
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
164
164
  universe_domain: @config.universe_domain,
165
- credentials: credentials
165
+ credentials: credentials,
166
+ logger: @config.logger
166
167
  )
167
168
 
169
+ @migration_center_stub.logger(stub: true)&.info do |entry|
170
+ entry.set_system_name
171
+ entry.set_service
172
+ entry.message = "Created client for #{entry.service}"
173
+ entry.set_credentials_fields credentials
174
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
175
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
176
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
177
+ end
178
+
168
179
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
169
180
  config.credentials = credentials
170
181
  config.quota_project = @quota_project_id
171
182
  config.endpoint = @migration_center_stub.endpoint
172
183
  config.universe_domain = @migration_center_stub.universe_domain
173
184
  config.bindings_override = @config.bindings_override
185
+ config.logger = @migration_center_stub.logger if config.respond_to? :logger=
174
186
  end
175
187
  end
176
188
 
@@ -188,6 +200,15 @@ module Google
188
200
  #
189
201
  attr_reader :location_client
190
202
 
203
+ ##
204
+ # The logger used for request/response debug logging.
205
+ #
206
+ # @return [Logger]
207
+ #
208
+ def logger
209
+ @migration_center_stub.logger
210
+ end
211
+
191
212
  # Service calls
192
213
 
193
214
  ##
@@ -278,7 +299,6 @@ module Google
278
299
 
279
300
  @migration_center_stub.list_assets request, options do |result, operation|
280
301
  yield result, operation if block_given?
281
- return result
282
302
  end
283
303
  rescue ::Gapic::Rest::Error => e
284
304
  raise ::Google::Cloud::Error.from_error(e)
@@ -359,7 +379,6 @@ module Google
359
379
 
360
380
  @migration_center_stub.get_asset request, options do |result, operation|
361
381
  yield result, operation if block_given?
362
- return result
363
382
  end
364
383
  rescue ::Gapic::Rest::Error => e
365
384
  raise ::Google::Cloud::Error.from_error(e)
@@ -459,7 +478,6 @@ module Google
459
478
 
460
479
  @migration_center_stub.update_asset request, options do |result, operation|
461
480
  yield result, operation if block_given?
462
- return result
463
481
  end
464
482
  rescue ::Gapic::Rest::Error => e
465
483
  raise ::Google::Cloud::Error.from_error(e)
@@ -541,7 +559,6 @@ module Google
541
559
 
542
560
  @migration_center_stub.batch_update_assets request, options do |result, operation|
543
561
  yield result, operation if block_given?
544
- return result
545
562
  end
546
563
  rescue ::Gapic::Rest::Error => e
547
564
  raise ::Google::Cloud::Error.from_error(e)
@@ -634,7 +651,6 @@ module Google
634
651
 
635
652
  @migration_center_stub.delete_asset request, options do |result, operation|
636
653
  yield result, operation if block_given?
637
- return result
638
654
  end
639
655
  rescue ::Gapic::Rest::Error => e
640
656
  raise ::Google::Cloud::Error.from_error(e)
@@ -721,7 +737,6 @@ module Google
721
737
 
722
738
  @migration_center_stub.batch_delete_assets request, options do |result, operation|
723
739
  yield result, operation if block_given?
724
- return result
725
740
  end
726
741
  rescue ::Gapic::Rest::Error => e
727
742
  raise ::Google::Cloud::Error.from_error(e)
@@ -804,7 +819,6 @@ module Google
804
819
 
805
820
  @migration_center_stub.report_asset_frames request, options do |result, operation|
806
821
  yield result, operation if block_given?
807
- return result
808
822
  end
809
823
  rescue ::Gapic::Rest::Error => e
810
824
  raise ::Google::Cloud::Error.from_error(e)
@@ -888,7 +902,6 @@ module Google
888
902
 
889
903
  @migration_center_stub.aggregate_assets_values request, options do |result, operation|
890
904
  yield result, operation if block_given?
891
- return result
892
905
  end
893
906
  rescue ::Gapic::Rest::Error => e
894
907
  raise ::Google::Cloud::Error.from_error(e)
@@ -993,7 +1006,7 @@ module Google
993
1006
  @migration_center_stub.create_import_job request, options do |result, operation|
994
1007
  result = ::Gapic::Operation.new result, @operations_client, options: options
995
1008
  yield result, operation if block_given?
996
- return result
1009
+ throw :response, result
997
1010
  end
998
1011
  rescue ::Gapic::Rest::Error => e
999
1012
  raise ::Google::Cloud::Error.from_error(e)
@@ -1088,7 +1101,6 @@ module Google
1088
1101
 
1089
1102
  @migration_center_stub.list_import_jobs request, options do |result, operation|
1090
1103
  yield result, operation if block_given?
1091
- return result
1092
1104
  end
1093
1105
  rescue ::Gapic::Rest::Error => e
1094
1106
  raise ::Google::Cloud::Error.from_error(e)
@@ -1170,7 +1182,6 @@ module Google
1170
1182
 
1171
1183
  @migration_center_stub.get_import_job request, options do |result, operation|
1172
1184
  yield result, operation if block_given?
1173
- return result
1174
1185
  end
1175
1186
  rescue ::Gapic::Rest::Error => e
1176
1187
  raise ::Google::Cloud::Error.from_error(e)
@@ -1275,7 +1286,7 @@ module Google
1275
1286
  @migration_center_stub.delete_import_job request, options do |result, operation|
1276
1287
  result = ::Gapic::Operation.new result, @operations_client, options: options
1277
1288
  yield result, operation if block_given?
1278
- return result
1289
+ throw :response, result
1279
1290
  end
1280
1291
  rescue ::Gapic::Rest::Error => e
1281
1292
  raise ::Google::Cloud::Error.from_error(e)
@@ -1383,7 +1394,7 @@ module Google
1383
1394
  @migration_center_stub.update_import_job request, options do |result, operation|
1384
1395
  result = ::Gapic::Operation.new result, @operations_client, options: options
1385
1396
  yield result, operation if block_given?
1386
- return result
1397
+ throw :response, result
1387
1398
  end
1388
1399
  rescue ::Gapic::Rest::Error => e
1389
1400
  raise ::Google::Cloud::Error.from_error(e)
@@ -1484,7 +1495,7 @@ module Google
1484
1495
  @migration_center_stub.validate_import_job request, options do |result, operation|
1485
1496
  result = ::Gapic::Operation.new result, @operations_client, options: options
1486
1497
  yield result, operation if block_given?
1487
- return result
1498
+ throw :response, result
1488
1499
  end
1489
1500
  rescue ::Gapic::Rest::Error => e
1490
1501
  raise ::Google::Cloud::Error.from_error(e)
@@ -1585,7 +1596,7 @@ module Google
1585
1596
  @migration_center_stub.run_import_job request, options do |result, operation|
1586
1597
  result = ::Gapic::Operation.new result, @operations_client, options: options
1587
1598
  yield result, operation if block_given?
1588
- return result
1599
+ throw :response, result
1589
1600
  end
1590
1601
  rescue ::Gapic::Rest::Error => e
1591
1602
  raise ::Google::Cloud::Error.from_error(e)
@@ -1664,7 +1675,6 @@ module Google
1664
1675
 
1665
1676
  @migration_center_stub.get_import_data_file request, options do |result, operation|
1666
1677
  yield result, operation if block_given?
1667
- return result
1668
1678
  end
1669
1679
  rescue ::Gapic::Rest::Error => e
1670
1680
  raise ::Google::Cloud::Error.from_error(e)
@@ -1762,7 +1772,6 @@ module Google
1762
1772
 
1763
1773
  @migration_center_stub.list_import_data_files request, options do |result, operation|
1764
1774
  yield result, operation if block_given?
1765
- return result
1766
1775
  end
1767
1776
  rescue ::Gapic::Rest::Error => e
1768
1777
  raise ::Google::Cloud::Error.from_error(e)
@@ -1867,7 +1876,7 @@ module Google
1867
1876
  @migration_center_stub.create_import_data_file request, options do |result, operation|
1868
1877
  result = ::Gapic::Operation.new result, @operations_client, options: options
1869
1878
  yield result, operation if block_given?
1870
- return result
1879
+ throw :response, result
1871
1880
  end
1872
1881
  rescue ::Gapic::Rest::Error => e
1873
1882
  raise ::Google::Cloud::Error.from_error(e)
@@ -1968,7 +1977,7 @@ module Google
1968
1977
  @migration_center_stub.delete_import_data_file request, options do |result, operation|
1969
1978
  result = ::Gapic::Operation.new result, @operations_client, options: options
1970
1979
  yield result, operation if block_given?
1971
- return result
1980
+ throw :response, result
1972
1981
  end
1973
1982
  rescue ::Gapic::Rest::Error => e
1974
1983
  raise ::Google::Cloud::Error.from_error(e)
@@ -2060,7 +2069,6 @@ module Google
2060
2069
 
2061
2070
  @migration_center_stub.list_groups request, options do |result, operation|
2062
2071
  yield result, operation if block_given?
2063
- return result
2064
2072
  end
2065
2073
  rescue ::Gapic::Rest::Error => e
2066
2074
  raise ::Google::Cloud::Error.from_error(e)
@@ -2139,7 +2147,6 @@ module Google
2139
2147
 
2140
2148
  @migration_center_stub.get_group request, options do |result, operation|
2141
2149
  yield result, operation if block_given?
2142
- return result
2143
2150
  end
2144
2151
  rescue ::Gapic::Rest::Error => e
2145
2152
  raise ::Google::Cloud::Error.from_error(e)
@@ -2248,7 +2255,7 @@ module Google
2248
2255
  @migration_center_stub.create_group request, options do |result, operation|
2249
2256
  result = ::Gapic::Operation.new result, @operations_client, options: options
2250
2257
  yield result, operation if block_given?
2251
- return result
2258
+ throw :response, result
2252
2259
  end
2253
2260
  rescue ::Gapic::Rest::Error => e
2254
2261
  raise ::Google::Cloud::Error.from_error(e)
@@ -2355,7 +2362,7 @@ module Google
2355
2362
  @migration_center_stub.update_group request, options do |result, operation|
2356
2363
  result = ::Gapic::Operation.new result, @operations_client, options: options
2357
2364
  yield result, operation if block_given?
2358
- return result
2365
+ throw :response, result
2359
2366
  end
2360
2367
  rescue ::Gapic::Rest::Error => e
2361
2368
  raise ::Google::Cloud::Error.from_error(e)
@@ -2456,7 +2463,7 @@ module Google
2456
2463
  @migration_center_stub.delete_group request, options do |result, operation|
2457
2464
  result = ::Gapic::Operation.new result, @operations_client, options: options
2458
2465
  yield result, operation if block_given?
2459
- return result
2466
+ throw :response, result
2460
2467
  end
2461
2468
  rescue ::Gapic::Rest::Error => e
2462
2469
  raise ::Google::Cloud::Error.from_error(e)
@@ -2568,7 +2575,7 @@ module Google
2568
2575
  @migration_center_stub.add_assets_to_group request, options do |result, operation|
2569
2576
  result = ::Gapic::Operation.new result, @operations_client, options: options
2570
2577
  yield result, operation if block_given?
2571
- return result
2578
+ throw :response, result
2572
2579
  end
2573
2580
  rescue ::Gapic::Rest::Error => e
2574
2581
  raise ::Google::Cloud::Error.from_error(e)
@@ -2679,7 +2686,7 @@ module Google
2679
2686
  @migration_center_stub.remove_assets_from_group request, options do |result, operation|
2680
2687
  result = ::Gapic::Operation.new result, @operations_client, options: options
2681
2688
  yield result, operation if block_given?
2682
- return result
2689
+ throw :response, result
2683
2690
  end
2684
2691
  rescue ::Gapic::Rest::Error => e
2685
2692
  raise ::Google::Cloud::Error.from_error(e)
@@ -2770,7 +2777,6 @@ module Google
2770
2777
 
2771
2778
  @migration_center_stub.list_error_frames request, options do |result, operation|
2772
2779
  yield result, operation if block_given?
2773
- return result
2774
2780
  end
2775
2781
  rescue ::Gapic::Rest::Error => e
2776
2782
  raise ::Google::Cloud::Error.from_error(e)
@@ -2854,7 +2860,6 @@ module Google
2854
2860
 
2855
2861
  @migration_center_stub.get_error_frame request, options do |result, operation|
2856
2862
  yield result, operation if block_given?
2857
- return result
2858
2863
  end
2859
2864
  rescue ::Gapic::Rest::Error => e
2860
2865
  raise ::Google::Cloud::Error.from_error(e)
@@ -2946,7 +2951,6 @@ module Google
2946
2951
 
2947
2952
  @migration_center_stub.list_sources request, options do |result, operation|
2948
2953
  yield result, operation if block_given?
2949
- return result
2950
2954
  end
2951
2955
  rescue ::Gapic::Rest::Error => e
2952
2956
  raise ::Google::Cloud::Error.from_error(e)
@@ -3025,7 +3029,6 @@ module Google
3025
3029
 
3026
3030
  @migration_center_stub.get_source request, options do |result, operation|
3027
3031
  yield result, operation if block_given?
3028
- return result
3029
3032
  end
3030
3033
  rescue ::Gapic::Rest::Error => e
3031
3034
  raise ::Google::Cloud::Error.from_error(e)
@@ -3134,7 +3137,7 @@ module Google
3134
3137
  @migration_center_stub.create_source request, options do |result, operation|
3135
3138
  result = ::Gapic::Operation.new result, @operations_client, options: options
3136
3139
  yield result, operation if block_given?
3137
- return result
3140
+ throw :response, result
3138
3141
  end
3139
3142
  rescue ::Gapic::Rest::Error => e
3140
3143
  raise ::Google::Cloud::Error.from_error(e)
@@ -3242,7 +3245,7 @@ module Google
3242
3245
  @migration_center_stub.update_source request, options do |result, operation|
3243
3246
  result = ::Gapic::Operation.new result, @operations_client, options: options
3244
3247
  yield result, operation if block_given?
3245
- return result
3248
+ throw :response, result
3246
3249
  end
3247
3250
  rescue ::Gapic::Rest::Error => e
3248
3251
  raise ::Google::Cloud::Error.from_error(e)
@@ -3343,7 +3346,7 @@ module Google
3343
3346
  @migration_center_stub.delete_source request, options do |result, operation|
3344
3347
  result = ::Gapic::Operation.new result, @operations_client, options: options
3345
3348
  yield result, operation if block_given?
3346
- return result
3349
+ throw :response, result
3347
3350
  end
3348
3351
  rescue ::Gapic::Rest::Error => e
3349
3352
  raise ::Google::Cloud::Error.from_error(e)
@@ -3434,7 +3437,6 @@ module Google
3434
3437
 
3435
3438
  @migration_center_stub.list_preference_sets request, options do |result, operation|
3436
3439
  yield result, operation if block_given?
3437
- return result
3438
3440
  end
3439
3441
  rescue ::Gapic::Rest::Error => e
3440
3442
  raise ::Google::Cloud::Error.from_error(e)
@@ -3513,7 +3515,6 @@ module Google
3513
3515
 
3514
3516
  @migration_center_stub.get_preference_set request, options do |result, operation|
3515
3517
  yield result, operation if block_given?
3516
- return result
3517
3518
  end
3518
3519
  rescue ::Gapic::Rest::Error => e
3519
3520
  raise ::Google::Cloud::Error.from_error(e)
@@ -3623,7 +3624,7 @@ module Google
3623
3624
  @migration_center_stub.create_preference_set request, options do |result, operation|
3624
3625
  result = ::Gapic::Operation.new result, @operations_client, options: options
3625
3626
  yield result, operation if block_given?
3626
- return result
3627
+ throw :response, result
3627
3628
  end
3628
3629
  rescue ::Gapic::Rest::Error => e
3629
3630
  raise ::Google::Cloud::Error.from_error(e)
@@ -3731,7 +3732,7 @@ module Google
3731
3732
  @migration_center_stub.update_preference_set request, options do |result, operation|
3732
3733
  result = ::Gapic::Operation.new result, @operations_client, options: options
3733
3734
  yield result, operation if block_given?
3734
- return result
3735
+ throw :response, result
3735
3736
  end
3736
3737
  rescue ::Gapic::Rest::Error => e
3737
3738
  raise ::Google::Cloud::Error.from_error(e)
@@ -3832,7 +3833,7 @@ module Google
3832
3833
  @migration_center_stub.delete_preference_set request, options do |result, operation|
3833
3834
  result = ::Gapic::Operation.new result, @operations_client, options: options
3834
3835
  yield result, operation if block_given?
3835
- return result
3836
+ throw :response, result
3836
3837
  end
3837
3838
  rescue ::Gapic::Rest::Error => e
3838
3839
  raise ::Google::Cloud::Error.from_error(e)
@@ -3911,7 +3912,6 @@ module Google
3911
3912
 
3912
3913
  @migration_center_stub.get_settings request, options do |result, operation|
3913
3914
  yield result, operation if block_given?
3914
- return result
3915
3915
  end
3916
3916
  rescue ::Gapic::Rest::Error => e
3917
3917
  raise ::Google::Cloud::Error.from_error(e)
@@ -4019,7 +4019,7 @@ module Google
4019
4019
  @migration_center_stub.update_settings request, options do |result, operation|
4020
4020
  result = ::Gapic::Operation.new result, @operations_client, options: options
4021
4021
  yield result, operation if block_given?
4022
- return result
4022
+ throw :response, result
4023
4023
  end
4024
4024
  rescue ::Gapic::Rest::Error => e
4025
4025
  raise ::Google::Cloud::Error.from_error(e)
@@ -4128,7 +4128,7 @@ module Google
4128
4128
  @migration_center_stub.create_report_config request, options do |result, operation|
4129
4129
  result = ::Gapic::Operation.new result, @operations_client, options: options
4130
4130
  yield result, operation if block_given?
4131
- return result
4131
+ throw :response, result
4132
4132
  end
4133
4133
  rescue ::Gapic::Rest::Error => e
4134
4134
  raise ::Google::Cloud::Error.from_error(e)
@@ -4207,7 +4207,6 @@ module Google
4207
4207
 
4208
4208
  @migration_center_stub.get_report_config request, options do |result, operation|
4209
4209
  yield result, operation if block_given?
4210
- return result
4211
4210
  end
4212
4211
  rescue ::Gapic::Rest::Error => e
4213
4212
  raise ::Google::Cloud::Error.from_error(e)
@@ -4299,7 +4298,6 @@ module Google
4299
4298
 
4300
4299
  @migration_center_stub.list_report_configs request, options do |result, operation|
4301
4300
  yield result, operation if block_given?
4302
- return result
4303
4301
  end
4304
4302
  rescue ::Gapic::Rest::Error => e
4305
4303
  raise ::Google::Cloud::Error.from_error(e)
@@ -4404,7 +4402,7 @@ module Google
4404
4402
  @migration_center_stub.delete_report_config request, options do |result, operation|
4405
4403
  result = ::Gapic::Operation.new result, @operations_client, options: options
4406
4404
  yield result, operation if block_given?
4407
- return result
4405
+ throw :response, result
4408
4406
  end
4409
4407
  rescue ::Gapic::Rest::Error => e
4410
4408
  raise ::Google::Cloud::Error.from_error(e)
@@ -4513,7 +4511,7 @@ module Google
4513
4511
  @migration_center_stub.create_report request, options do |result, operation|
4514
4512
  result = ::Gapic::Operation.new result, @operations_client, options: options
4515
4513
  yield result, operation if block_given?
4516
- return result
4514
+ throw :response, result
4517
4515
  end
4518
4516
  rescue ::Gapic::Rest::Error => e
4519
4517
  raise ::Google::Cloud::Error.from_error(e)
@@ -4594,7 +4592,6 @@ module Google
4594
4592
 
4595
4593
  @migration_center_stub.get_report request, options do |result, operation|
4596
4594
  yield result, operation if block_given?
4597
- return result
4598
4595
  end
4599
4596
  rescue ::Gapic::Rest::Error => e
4600
4597
  raise ::Google::Cloud::Error.from_error(e)
@@ -4688,7 +4685,6 @@ module Google
4688
4685
 
4689
4686
  @migration_center_stub.list_reports request, options do |result, operation|
4690
4687
  yield result, operation if block_given?
4691
- return result
4692
4688
  end
4693
4689
  rescue ::Gapic::Rest::Error => e
4694
4690
  raise ::Google::Cloud::Error.from_error(e)
@@ -4789,7 +4785,7 @@ module Google
4789
4785
  @migration_center_stub.delete_report request, options do |result, operation|
4790
4786
  result = ::Gapic::Operation.new result, @operations_client, options: options
4791
4787
  yield result, operation if block_given?
4792
- return result
4788
+ throw :response, result
4793
4789
  end
4794
4790
  rescue ::Gapic::Rest::Error => e
4795
4791
  raise ::Google::Cloud::Error.from_error(e)
@@ -4869,6 +4865,11 @@ module Google
4869
4865
  # default endpoint URL. The default value of nil uses the environment
4870
4866
  # universe (usually the default "googleapis.com" universe).
4871
4867
  # @return [::String,nil]
4868
+ # @!attribute [rw] logger
4869
+ # A custom logger to use for request/response debug logging, or the value
4870
+ # `:default` (the default) to construct a default logger, or `nil` to
4871
+ # explicitly disable logging.
4872
+ # @return [::Logger,:default,nil]
4872
4873
  #
4873
4874
  class Configuration
4874
4875
  extend ::Gapic::Config
@@ -4897,6 +4898,7 @@ module Google
4897
4898
  # by the host service.
4898
4899
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
4899
4900
  config_attr :bindings_override, {}, ::Hash, nil
4901
+ config_attr :logger, :default, ::Logger, nil, :default
4900
4902
 
4901
4903
  # @private
4902
4904
  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
  ##