google-cloud-migration_center-v1 1.0.1 → 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.
- checksums.yaml +4 -4
- data/README.md +31 -21
- data/lib/google/cloud/migration_center/v1/migration_center/client.rb +67 -49
- data/lib/google/cloud/migration_center/v1/migration_center/operations.rb +19 -15
- data/lib/google/cloud/migration_center/v1/migration_center/rest/client.rb +58 -49
- data/lib/google/cloud/migration_center/v1/migration_center/rest/operations.rb +50 -38
- data/lib/google/cloud/migration_center/v1/migration_center/rest/service_stub.rb +398 -290
- data/lib/google/cloud/migration_center/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/cloud/migrationcenter/v1/migrationcenter.rb +30 -0
- data/proto_docs/google/longrunning/operations.rb +23 -14
- metadata +6 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87689ae2e4a1bf50f18f0e8982886d424110808323f0d7f2075bc609525693a6
|
4
|
+
data.tar.gz: d08a0153f20b4c90bdece818a422f7d51638c0ef223f60aa1230d4804d9d6a01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83e975a35543680a1a56c915dbdf4bfaba81c6f16fe7f6dbfd21e16738da1b05fd7177f5fa20ce84576cbbf369b946dbf0e96153e045e57003cdb5a657159405
|
7
|
+
data.tar.gz: a83bf579d37068b2372b98822ae2b3f15306d084150c93a45330973049cfa7eb620677b1adbf3576c80a28b7bfae6fa5ab2dcd1f46788e40f91bac35fd4cda13
|
data/README.md
CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/migration-center/docs/migration-center-overview)
|
44
44
|
for general usage information.
|
45
45
|
|
46
|
-
##
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
## Debug Logging
|
47
|
+
|
48
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
49
|
+
your application's integration with the API. When logging is activated, key
|
50
|
+
events such as requests and responses, along with data payloads and metadata
|
51
|
+
such as headers and client configuration, are logged to the standard error
|
52
|
+
stream.
|
53
|
+
|
54
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
55
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
56
|
+
customers, private keys, or other security data that could be compromising if
|
57
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
58
|
+
the principle of least access. Google also recommends that Client Library Debug
|
59
|
+
Logging be enabled only temporarily during active debugging, and not used
|
60
|
+
permanently in production.
|
61
|
+
|
62
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
63
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
64
|
+
list of client library gem names. This will select the default logging behavior,
|
65
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
66
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
67
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
68
|
+
results in logs appearing alongside your application logs in the
|
69
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
70
|
+
|
71
|
+
You can customize logging by modifying the `logger` configuration when
|
72
|
+
constructing a client object. For example:
|
55
73
|
|
56
74
|
```ruby
|
75
|
+
require "google/cloud/migration_center/v1"
|
57
76
|
require "logger"
|
58
77
|
|
59
|
-
|
60
|
-
|
61
|
-
def logger
|
62
|
-
LOGGER
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
-
module GRPC
|
68
|
-
extend MyLogger
|
78
|
+
client = ::Google::Cloud::MigrationCenter::V1::MigrationCenter::Client.new do |config|
|
79
|
+
config.logger = Logger.new "my-app.log"
|
69
80
|
end
|
70
81
|
```
|
71
82
|
|
72
|
-
|
73
83
|
## Google Cloud Samples
|
74
84
|
|
75
85
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
76
86
|
|
77
87
|
## Supported Ruby Versions
|
78
88
|
|
79
|
-
This library is supported on Ruby
|
89
|
+
This library is supported on Ruby 3.0+.
|
80
90
|
|
81
91
|
Google provides official support for Ruby versions that are actively supported
|
82
92
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
@@ -169,14 +169,26 @@ module Google
|
|
169
169
|
universe_domain: @config.universe_domain,
|
170
170
|
channel_args: @config.channel_args,
|
171
171
|
interceptors: @config.interceptors,
|
172
|
-
channel_pool_config: @config.channel_pool
|
172
|
+
channel_pool_config: @config.channel_pool,
|
173
|
+
logger: @config.logger
|
173
174
|
)
|
174
175
|
|
176
|
+
@migration_center_stub.stub_logger&.info do |entry|
|
177
|
+
entry.set_system_name
|
178
|
+
entry.set_service
|
179
|
+
entry.message = "Created client for #{entry.service}"
|
180
|
+
entry.set_credentials_fields credentials
|
181
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
182
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
183
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
184
|
+
end
|
185
|
+
|
175
186
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
176
187
|
config.credentials = credentials
|
177
188
|
config.quota_project = @quota_project_id
|
178
189
|
config.endpoint = @migration_center_stub.endpoint
|
179
190
|
config.universe_domain = @migration_center_stub.universe_domain
|
191
|
+
config.logger = @migration_center_stub.logger if config.respond_to? :logger=
|
180
192
|
end
|
181
193
|
end
|
182
194
|
|
@@ -194,6 +206,15 @@ module Google
|
|
194
206
|
#
|
195
207
|
attr_reader :location_client
|
196
208
|
|
209
|
+
##
|
210
|
+
# The logger used for request/response debug logging.
|
211
|
+
#
|
212
|
+
# @return [Logger]
|
213
|
+
#
|
214
|
+
def logger
|
215
|
+
@migration_center_stub.logger
|
216
|
+
end
|
217
|
+
|
197
218
|
# Service calls
|
198
219
|
|
199
220
|
##
|
@@ -292,7 +313,7 @@ module Google
|
|
292
313
|
@migration_center_stub.call_rpc :list_assets, request, options: options do |response, operation|
|
293
314
|
response = ::Gapic::PagedEnumerable.new @migration_center_stub, :list_assets, request, response, operation, options
|
294
315
|
yield response, operation if block_given?
|
295
|
-
|
316
|
+
throw :response, response
|
296
317
|
end
|
297
318
|
rescue ::GRPC::BadStatus => e
|
298
319
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -380,7 +401,6 @@ module Google
|
|
380
401
|
|
381
402
|
@migration_center_stub.call_rpc :get_asset, request, options: options do |response, operation|
|
382
403
|
yield response, operation if block_given?
|
383
|
-
return response
|
384
404
|
end
|
385
405
|
rescue ::GRPC::BadStatus => e
|
386
406
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -487,7 +507,6 @@ module Google
|
|
487
507
|
|
488
508
|
@migration_center_stub.call_rpc :update_asset, request, options: options do |response, operation|
|
489
509
|
yield response, operation if block_given?
|
490
|
-
return response
|
491
510
|
end
|
492
511
|
rescue ::GRPC::BadStatus => e
|
493
512
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -576,7 +595,6 @@ module Google
|
|
576
595
|
|
577
596
|
@migration_center_stub.call_rpc :batch_update_assets, request, options: options do |response, operation|
|
578
597
|
yield response, operation if block_given?
|
579
|
-
return response
|
580
598
|
end
|
581
599
|
rescue ::GRPC::BadStatus => e
|
582
600
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -676,7 +694,6 @@ module Google
|
|
676
694
|
|
677
695
|
@migration_center_stub.call_rpc :delete_asset, request, options: options do |response, operation|
|
678
696
|
yield response, operation if block_given?
|
679
|
-
return response
|
680
697
|
end
|
681
698
|
rescue ::GRPC::BadStatus => e
|
682
699
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -770,7 +787,6 @@ module Google
|
|
770
787
|
|
771
788
|
@migration_center_stub.call_rpc :batch_delete_assets, request, options: options do |response, operation|
|
772
789
|
yield response, operation if block_given?
|
773
|
-
return response
|
774
790
|
end
|
775
791
|
rescue ::GRPC::BadStatus => e
|
776
792
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -860,7 +876,6 @@ module Google
|
|
860
876
|
|
861
877
|
@migration_center_stub.call_rpc :report_asset_frames, request, options: options do |response, operation|
|
862
878
|
yield response, operation if block_given?
|
863
|
-
return response
|
864
879
|
end
|
865
880
|
rescue ::GRPC::BadStatus => e
|
866
881
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -951,7 +966,6 @@ module Google
|
|
951
966
|
|
952
967
|
@migration_center_stub.call_rpc :aggregate_assets_values, request, options: options do |response, operation|
|
953
968
|
yield response, operation if block_given?
|
954
|
-
return response
|
955
969
|
end
|
956
970
|
rescue ::GRPC::BadStatus => e
|
957
971
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1063,7 +1077,7 @@ module Google
|
|
1063
1077
|
@migration_center_stub.call_rpc :create_import_job, request, options: options do |response, operation|
|
1064
1078
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1065
1079
|
yield response, operation if block_given?
|
1066
|
-
|
1080
|
+
throw :response, response
|
1067
1081
|
end
|
1068
1082
|
rescue ::GRPC::BadStatus => e
|
1069
1083
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1166,7 +1180,7 @@ module Google
|
|
1166
1180
|
@migration_center_stub.call_rpc :list_import_jobs, request, options: options do |response, operation|
|
1167
1181
|
response = ::Gapic::PagedEnumerable.new @migration_center_stub, :list_import_jobs, request, response, operation, options
|
1168
1182
|
yield response, operation if block_given?
|
1169
|
-
|
1183
|
+
throw :response, response
|
1170
1184
|
end
|
1171
1185
|
rescue ::GRPC::BadStatus => e
|
1172
1186
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1255,7 +1269,6 @@ module Google
|
|
1255
1269
|
|
1256
1270
|
@migration_center_stub.call_rpc :get_import_job, request, options: options do |response, operation|
|
1257
1271
|
yield response, operation if block_given?
|
1258
|
-
return response
|
1259
1272
|
end
|
1260
1273
|
rescue ::GRPC::BadStatus => e
|
1261
1274
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1367,7 +1380,7 @@ module Google
|
|
1367
1380
|
@migration_center_stub.call_rpc :delete_import_job, request, options: options do |response, operation|
|
1368
1381
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1369
1382
|
yield response, operation if block_given?
|
1370
|
-
|
1383
|
+
throw :response, response
|
1371
1384
|
end
|
1372
1385
|
rescue ::GRPC::BadStatus => e
|
1373
1386
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1482,7 +1495,7 @@ module Google
|
|
1482
1495
|
@migration_center_stub.call_rpc :update_import_job, request, options: options do |response, operation|
|
1483
1496
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1484
1497
|
yield response, operation if block_given?
|
1485
|
-
|
1498
|
+
throw :response, response
|
1486
1499
|
end
|
1487
1500
|
rescue ::GRPC::BadStatus => e
|
1488
1501
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1590,7 +1603,7 @@ module Google
|
|
1590
1603
|
@migration_center_stub.call_rpc :validate_import_job, request, options: options do |response, operation|
|
1591
1604
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1592
1605
|
yield response, operation if block_given?
|
1593
|
-
|
1606
|
+
throw :response, response
|
1594
1607
|
end
|
1595
1608
|
rescue ::GRPC::BadStatus => e
|
1596
1609
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1698,7 +1711,7 @@ module Google
|
|
1698
1711
|
@migration_center_stub.call_rpc :run_import_job, request, options: options do |response, operation|
|
1699
1712
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1700
1713
|
yield response, operation if block_given?
|
1701
|
-
|
1714
|
+
throw :response, response
|
1702
1715
|
end
|
1703
1716
|
rescue ::GRPC::BadStatus => e
|
1704
1717
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1784,7 +1797,6 @@ module Google
|
|
1784
1797
|
|
1785
1798
|
@migration_center_stub.call_rpc :get_import_data_file, request, options: options do |response, operation|
|
1786
1799
|
yield response, operation if block_given?
|
1787
|
-
return response
|
1788
1800
|
end
|
1789
1801
|
rescue ::GRPC::BadStatus => e
|
1790
1802
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1890,7 +1902,7 @@ module Google
|
|
1890
1902
|
@migration_center_stub.call_rpc :list_import_data_files, request, options: options do |response, operation|
|
1891
1903
|
response = ::Gapic::PagedEnumerable.new @migration_center_stub, :list_import_data_files, request, response, operation, options
|
1892
1904
|
yield response, operation if block_given?
|
1893
|
-
|
1905
|
+
throw :response, response
|
1894
1906
|
end
|
1895
1907
|
rescue ::GRPC::BadStatus => e
|
1896
1908
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2002,7 +2014,7 @@ module Google
|
|
2002
2014
|
@migration_center_stub.call_rpc :create_import_data_file, request, options: options do |response, operation|
|
2003
2015
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2004
2016
|
yield response, operation if block_given?
|
2005
|
-
|
2017
|
+
throw :response, response
|
2006
2018
|
end
|
2007
2019
|
rescue ::GRPC::BadStatus => e
|
2008
2020
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2110,7 +2122,7 @@ module Google
|
|
2110
2122
|
@migration_center_stub.call_rpc :delete_import_data_file, request, options: options do |response, operation|
|
2111
2123
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2112
2124
|
yield response, operation if block_given?
|
2113
|
-
|
2125
|
+
throw :response, response
|
2114
2126
|
end
|
2115
2127
|
rescue ::GRPC::BadStatus => e
|
2116
2128
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2210,7 +2222,7 @@ module Google
|
|
2210
2222
|
@migration_center_stub.call_rpc :list_groups, request, options: options do |response, operation|
|
2211
2223
|
response = ::Gapic::PagedEnumerable.new @migration_center_stub, :list_groups, request, response, operation, options
|
2212
2224
|
yield response, operation if block_given?
|
2213
|
-
|
2225
|
+
throw :response, response
|
2214
2226
|
end
|
2215
2227
|
rescue ::GRPC::BadStatus => e
|
2216
2228
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2296,7 +2308,6 @@ module Google
|
|
2296
2308
|
|
2297
2309
|
@migration_center_stub.call_rpc :get_group, request, options: options do |response, operation|
|
2298
2310
|
yield response, operation if block_given?
|
2299
|
-
return response
|
2300
2311
|
end
|
2301
2312
|
rescue ::GRPC::BadStatus => e
|
2302
2313
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2412,7 +2423,7 @@ module Google
|
|
2412
2423
|
@migration_center_stub.call_rpc :create_group, request, options: options do |response, operation|
|
2413
2424
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2414
2425
|
yield response, operation if block_given?
|
2415
|
-
|
2426
|
+
throw :response, response
|
2416
2427
|
end
|
2417
2428
|
rescue ::GRPC::BadStatus => e
|
2418
2429
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2526,7 +2537,7 @@ module Google
|
|
2526
2537
|
@migration_center_stub.call_rpc :update_group, request, options: options do |response, operation|
|
2527
2538
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2528
2539
|
yield response, operation if block_given?
|
2529
|
-
|
2540
|
+
throw :response, response
|
2530
2541
|
end
|
2531
2542
|
rescue ::GRPC::BadStatus => e
|
2532
2543
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2634,7 +2645,7 @@ module Google
|
|
2634
2645
|
@migration_center_stub.call_rpc :delete_group, request, options: options do |response, operation|
|
2635
2646
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2636
2647
|
yield response, operation if block_given?
|
2637
|
-
|
2648
|
+
throw :response, response
|
2638
2649
|
end
|
2639
2650
|
rescue ::GRPC::BadStatus => e
|
2640
2651
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2753,7 +2764,7 @@ module Google
|
|
2753
2764
|
@migration_center_stub.call_rpc :add_assets_to_group, request, options: options do |response, operation|
|
2754
2765
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2755
2766
|
yield response, operation if block_given?
|
2756
|
-
|
2767
|
+
throw :response, response
|
2757
2768
|
end
|
2758
2769
|
rescue ::GRPC::BadStatus => e
|
2759
2770
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2871,7 +2882,7 @@ module Google
|
|
2871
2882
|
@migration_center_stub.call_rpc :remove_assets_from_group, request, options: options do |response, operation|
|
2872
2883
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2873
2884
|
yield response, operation if block_given?
|
2874
|
-
|
2885
|
+
throw :response, response
|
2875
2886
|
end
|
2876
2887
|
rescue ::GRPC::BadStatus => e
|
2877
2888
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2970,7 +2981,7 @@ module Google
|
|
2970
2981
|
@migration_center_stub.call_rpc :list_error_frames, request, options: options do |response, operation|
|
2971
2982
|
response = ::Gapic::PagedEnumerable.new @migration_center_stub, :list_error_frames, request, response, operation, options
|
2972
2983
|
yield response, operation if block_given?
|
2973
|
-
|
2984
|
+
throw :response, response
|
2974
2985
|
end
|
2975
2986
|
rescue ::GRPC::BadStatus => e
|
2976
2987
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3061,7 +3072,6 @@ module Google
|
|
3061
3072
|
|
3062
3073
|
@migration_center_stub.call_rpc :get_error_frame, request, options: options do |response, operation|
|
3063
3074
|
yield response, operation if block_given?
|
3064
|
-
return response
|
3065
3075
|
end
|
3066
3076
|
rescue ::GRPC::BadStatus => e
|
3067
3077
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3161,7 +3171,7 @@ module Google
|
|
3161
3171
|
@migration_center_stub.call_rpc :list_sources, request, options: options do |response, operation|
|
3162
3172
|
response = ::Gapic::PagedEnumerable.new @migration_center_stub, :list_sources, request, response, operation, options
|
3163
3173
|
yield response, operation if block_given?
|
3164
|
-
|
3174
|
+
throw :response, response
|
3165
3175
|
end
|
3166
3176
|
rescue ::GRPC::BadStatus => e
|
3167
3177
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3247,7 +3257,6 @@ module Google
|
|
3247
3257
|
|
3248
3258
|
@migration_center_stub.call_rpc :get_source, request, options: options do |response, operation|
|
3249
3259
|
yield response, operation if block_given?
|
3250
|
-
return response
|
3251
3260
|
end
|
3252
3261
|
rescue ::GRPC::BadStatus => e
|
3253
3262
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3363,7 +3372,7 @@ module Google
|
|
3363
3372
|
@migration_center_stub.call_rpc :create_source, request, options: options do |response, operation|
|
3364
3373
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3365
3374
|
yield response, operation if block_given?
|
3366
|
-
|
3375
|
+
throw :response, response
|
3367
3376
|
end
|
3368
3377
|
rescue ::GRPC::BadStatus => e
|
3369
3378
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3478,7 +3487,7 @@ module Google
|
|
3478
3487
|
@migration_center_stub.call_rpc :update_source, request, options: options do |response, operation|
|
3479
3488
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3480
3489
|
yield response, operation if block_given?
|
3481
|
-
|
3490
|
+
throw :response, response
|
3482
3491
|
end
|
3483
3492
|
rescue ::GRPC::BadStatus => e
|
3484
3493
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3586,7 +3595,7 @@ module Google
|
|
3586
3595
|
@migration_center_stub.call_rpc :delete_source, request, options: options do |response, operation|
|
3587
3596
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3588
3597
|
yield response, operation if block_given?
|
3589
|
-
|
3598
|
+
throw :response, response
|
3590
3599
|
end
|
3591
3600
|
rescue ::GRPC::BadStatus => e
|
3592
3601
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3685,7 +3694,7 @@ module Google
|
|
3685
3694
|
@migration_center_stub.call_rpc :list_preference_sets, request, options: options do |response, operation|
|
3686
3695
|
response = ::Gapic::PagedEnumerable.new @migration_center_stub, :list_preference_sets, request, response, operation, options
|
3687
3696
|
yield response, operation if block_given?
|
3688
|
-
|
3697
|
+
throw :response, response
|
3689
3698
|
end
|
3690
3699
|
rescue ::GRPC::BadStatus => e
|
3691
3700
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3771,7 +3780,6 @@ module Google
|
|
3771
3780
|
|
3772
3781
|
@migration_center_stub.call_rpc :get_preference_set, request, options: options do |response, operation|
|
3773
3782
|
yield response, operation if block_given?
|
3774
|
-
return response
|
3775
3783
|
end
|
3776
3784
|
rescue ::GRPC::BadStatus => e
|
3777
3785
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3888,7 +3896,7 @@ module Google
|
|
3888
3896
|
@migration_center_stub.call_rpc :create_preference_set, request, options: options do |response, operation|
|
3889
3897
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3890
3898
|
yield response, operation if block_given?
|
3891
|
-
|
3899
|
+
throw :response, response
|
3892
3900
|
end
|
3893
3901
|
rescue ::GRPC::BadStatus => e
|
3894
3902
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4003,7 +4011,7 @@ module Google
|
|
4003
4011
|
@migration_center_stub.call_rpc :update_preference_set, request, options: options do |response, operation|
|
4004
4012
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4005
4013
|
yield response, operation if block_given?
|
4006
|
-
|
4014
|
+
throw :response, response
|
4007
4015
|
end
|
4008
4016
|
rescue ::GRPC::BadStatus => e
|
4009
4017
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4111,7 +4119,7 @@ module Google
|
|
4111
4119
|
@migration_center_stub.call_rpc :delete_preference_set, request, options: options do |response, operation|
|
4112
4120
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4113
4121
|
yield response, operation if block_given?
|
4114
|
-
|
4122
|
+
throw :response, response
|
4115
4123
|
end
|
4116
4124
|
rescue ::GRPC::BadStatus => e
|
4117
4125
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4197,7 +4205,6 @@ module Google
|
|
4197
4205
|
|
4198
4206
|
@migration_center_stub.call_rpc :get_settings, request, options: options do |response, operation|
|
4199
4207
|
yield response, operation if block_given?
|
4200
|
-
return response
|
4201
4208
|
end
|
4202
4209
|
rescue ::GRPC::BadStatus => e
|
4203
4210
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4312,7 +4319,7 @@ module Google
|
|
4312
4319
|
@migration_center_stub.call_rpc :update_settings, request, options: options do |response, operation|
|
4313
4320
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4314
4321
|
yield response, operation if block_given?
|
4315
|
-
|
4322
|
+
throw :response, response
|
4316
4323
|
end
|
4317
4324
|
rescue ::GRPC::BadStatus => e
|
4318
4325
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4428,7 +4435,7 @@ module Google
|
|
4428
4435
|
@migration_center_stub.call_rpc :create_report_config, request, options: options do |response, operation|
|
4429
4436
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4430
4437
|
yield response, operation if block_given?
|
4431
|
-
|
4438
|
+
throw :response, response
|
4432
4439
|
end
|
4433
4440
|
rescue ::GRPC::BadStatus => e
|
4434
4441
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4514,7 +4521,6 @@ module Google
|
|
4514
4521
|
|
4515
4522
|
@migration_center_stub.call_rpc :get_report_config, request, options: options do |response, operation|
|
4516
4523
|
yield response, operation if block_given?
|
4517
|
-
return response
|
4518
4524
|
end
|
4519
4525
|
rescue ::GRPC::BadStatus => e
|
4520
4526
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4614,7 +4620,7 @@ module Google
|
|
4614
4620
|
@migration_center_stub.call_rpc :list_report_configs, request, options: options do |response, operation|
|
4615
4621
|
response = ::Gapic::PagedEnumerable.new @migration_center_stub, :list_report_configs, request, response, operation, options
|
4616
4622
|
yield response, operation if block_given?
|
4617
|
-
|
4623
|
+
throw :response, response
|
4618
4624
|
end
|
4619
4625
|
rescue ::GRPC::BadStatus => e
|
4620
4626
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4726,7 +4732,7 @@ module Google
|
|
4726
4732
|
@migration_center_stub.call_rpc :delete_report_config, request, options: options do |response, operation|
|
4727
4733
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4728
4734
|
yield response, operation if block_given?
|
4729
|
-
|
4735
|
+
throw :response, response
|
4730
4736
|
end
|
4731
4737
|
rescue ::GRPC::BadStatus => e
|
4732
4738
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4842,7 +4848,7 @@ module Google
|
|
4842
4848
|
@migration_center_stub.call_rpc :create_report, request, options: options do |response, operation|
|
4843
4849
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4844
4850
|
yield response, operation if block_given?
|
4845
|
-
|
4851
|
+
throw :response, response
|
4846
4852
|
end
|
4847
4853
|
rescue ::GRPC::BadStatus => e
|
4848
4854
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4930,7 +4936,6 @@ module Google
|
|
4930
4936
|
|
4931
4937
|
@migration_center_stub.call_rpc :get_report, request, options: options do |response, operation|
|
4932
4938
|
yield response, operation if block_given?
|
4933
|
-
return response
|
4934
4939
|
end
|
4935
4940
|
rescue ::GRPC::BadStatus => e
|
4936
4941
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5032,7 +5037,7 @@ module Google
|
|
5032
5037
|
@migration_center_stub.call_rpc :list_reports, request, options: options do |response, operation|
|
5033
5038
|
response = ::Gapic::PagedEnumerable.new @migration_center_stub, :list_reports, request, response, operation, options
|
5034
5039
|
yield response, operation if block_given?
|
5035
|
-
|
5040
|
+
throw :response, response
|
5036
5041
|
end
|
5037
5042
|
rescue ::GRPC::BadStatus => e
|
5038
5043
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5140,7 +5145,7 @@ module Google
|
|
5140
5145
|
@migration_center_stub.call_rpc :delete_report, request, options: options do |response, operation|
|
5141
5146
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
5142
5147
|
yield response, operation if block_given?
|
5143
|
-
|
5148
|
+
throw :response, response
|
5144
5149
|
end
|
5145
5150
|
rescue ::GRPC::BadStatus => e
|
5146
5151
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5190,6 +5195,13 @@ module Google
|
|
5190
5195
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
5191
5196
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
5192
5197
|
# * (`nil`) indicating no credentials
|
5198
|
+
#
|
5199
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
5200
|
+
# external source for authentication to Google Cloud, you must validate it before
|
5201
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
5202
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
5203
|
+
# For more information, refer to [Validate credential configurations from external
|
5204
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
5193
5205
|
# @return [::Object]
|
5194
5206
|
# @!attribute [rw] scope
|
5195
5207
|
# The OAuth scopes
|
@@ -5229,6 +5241,11 @@ module Google
|
|
5229
5241
|
# default endpoint URL. The default value of nil uses the environment
|
5230
5242
|
# universe (usually the default "googleapis.com" universe).
|
5231
5243
|
# @return [::String,nil]
|
5244
|
+
# @!attribute [rw] logger
|
5245
|
+
# A custom logger to use for request/response debug logging, or the value
|
5246
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
5247
|
+
# explicitly disable logging.
|
5248
|
+
# @return [::Logger,:default,nil]
|
5232
5249
|
#
|
5233
5250
|
class Configuration
|
5234
5251
|
extend ::Gapic::Config
|
@@ -5253,6 +5270,7 @@ module Google
|
|
5253
5270
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
5254
5271
|
config_attr :quota_project, nil, ::String, nil
|
5255
5272
|
config_attr :universe_domain, nil, ::String, nil
|
5273
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
5256
5274
|
|
5257
5275
|
# @private
|
5258
5276
|
def initialize parent_config = nil
|
@@ -124,14 +124,6 @@ module Google
|
|
124
124
|
# Lists operations that match the specified filter in the request. If the
|
125
125
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
126
126
|
#
|
127
|
-
# NOTE: the `name` binding allows API services to override the binding
|
128
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
129
|
-
# override the binding, API services can add a binding such as
|
130
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
131
|
-
# For backwards compatibility, the default name includes the operations
|
132
|
-
# collection id, however overriding users must ensure the name binding
|
133
|
-
# is the parent resource, without the operations collection id.
|
134
|
-
#
|
135
127
|
# @overload list_operations(request, options = nil)
|
136
128
|
# Pass arguments to `list_operations` via a request object, either of type
|
137
129
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -221,7 +213,7 @@ module Google
|
|
221
213
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
222
214
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
223
215
|
yield response, operation if block_given?
|
224
|
-
|
216
|
+
throw :response, response
|
225
217
|
end
|
226
218
|
rescue ::GRPC::BadStatus => e
|
227
219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -317,7 +309,7 @@ module Google
|
|
317
309
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
318
310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
319
311
|
yield response, operation if block_given?
|
320
|
-
|
312
|
+
throw :response, response
|
321
313
|
end
|
322
314
|
rescue ::GRPC::BadStatus => e
|
323
315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -406,7 +398,6 @@ module Google
|
|
406
398
|
|
407
399
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
408
400
|
yield response, operation if block_given?
|
409
|
-
return response
|
410
401
|
end
|
411
402
|
rescue ::GRPC::BadStatus => e
|
412
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -421,8 +412,9 @@ module Google
|
|
421
412
|
# other methods to check whether the cancellation succeeded or whether the
|
422
413
|
# operation completed despite cancellation. On successful cancellation,
|
423
414
|
# the operation is not deleted; instead, it becomes an operation with
|
424
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
425
|
-
# corresponding to
|
415
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
416
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
417
|
+
# `Code.CANCELLED`.
|
426
418
|
#
|
427
419
|
# @overload cancel_operation(request, options = nil)
|
428
420
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -501,7 +493,6 @@ module Google
|
|
501
493
|
|
502
494
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
503
495
|
yield response, operation if block_given?
|
504
|
-
return response
|
505
496
|
end
|
506
497
|
rescue ::GRPC::BadStatus => e
|
507
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -599,7 +590,7 @@ module Google
|
|
599
590
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
600
591
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
601
592
|
yield response, operation if block_given?
|
602
|
-
|
593
|
+
throw :response, response
|
603
594
|
end
|
604
595
|
rescue ::GRPC::BadStatus => e
|
605
596
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -649,6 +640,13 @@ module Google
|
|
649
640
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
650
641
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
651
642
|
# * (`nil`) indicating no credentials
|
643
|
+
#
|
644
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
645
|
+
# external source for authentication to Google Cloud, you must validate it before
|
646
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
647
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
648
|
+
# For more information, refer to [Validate credential configurations from external
|
649
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
652
650
|
# @return [::Object]
|
653
651
|
# @!attribute [rw] scope
|
654
652
|
# The OAuth scopes
|
@@ -688,6 +686,11 @@ module Google
|
|
688
686
|
# default endpoint URL. The default value of nil uses the environment
|
689
687
|
# universe (usually the default "googleapis.com" universe).
|
690
688
|
# @return [::String,nil]
|
689
|
+
# @!attribute [rw] logger
|
690
|
+
# A custom logger to use for request/response debug logging, or the value
|
691
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
692
|
+
# explicitly disable logging.
|
693
|
+
# @return [::Logger,:default,nil]
|
691
694
|
#
|
692
695
|
class Configuration
|
693
696
|
extend ::Gapic::Config
|
@@ -712,6 +715,7 @@ module Google
|
|
712
715
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
713
716
|
config_attr :quota_project, nil, ::String, nil
|
714
717
|
config_attr :universe_domain, nil, ::String, nil
|
718
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
715
719
|
|
716
720
|
# @private
|
717
721
|
def initialize parent_config = nil
|