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.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/network_services/v1/dep_service/client.rb +37 -11
- data/lib/google/cloud/network_services/v1/dep_service/operations.rb +12 -15
- data/lib/google/cloud/network_services/v1/dep_service/rest/client.rb +35 -11
- data/lib/google/cloud/network_services/v1/dep_service/rest/operations.rb +43 -38
- data/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb +94 -62
- data/lib/google/cloud/network_services/v1/network_services/client.rb +60 -40
- data/lib/google/cloud/network_services/v1/network_services/operations.rb +12 -15
- data/lib/google/cloud/network_services/v1/network_services/rest/client.rb +60 -40
- data/lib/google/cloud/network_services/v1/network_services/rest/operations.rb +43 -38
- data/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb +326 -236
- data/lib/google/cloud/network_services/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +70 -10
- data/proto_docs/google/api/field_info.rb +23 -0
- data/proto_docs/google/api/resource.rb +7 -2
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
@@ -168,14 +168,26 @@ module Google
|
|
168
168
|
universe_domain: @config.universe_domain,
|
169
169
|
channel_args: @config.channel_args,
|
170
170
|
interceptors: @config.interceptors,
|
171
|
-
channel_pool_config: @config.channel_pool
|
171
|
+
channel_pool_config: @config.channel_pool,
|
172
|
+
logger: @config.logger
|
172
173
|
)
|
173
174
|
|
175
|
+
@network_services_stub.stub_logger&.info do |entry|
|
176
|
+
entry.set_system_name
|
177
|
+
entry.set_service
|
178
|
+
entry.message = "Created client for #{entry.service}"
|
179
|
+
entry.set_credentials_fields credentials
|
180
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
181
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
182
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
183
|
+
end
|
184
|
+
|
174
185
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
175
186
|
config.credentials = credentials
|
176
187
|
config.quota_project = @quota_project_id
|
177
188
|
config.endpoint = @network_services_stub.endpoint
|
178
189
|
config.universe_domain = @network_services_stub.universe_domain
|
190
|
+
config.logger = @network_services_stub.logger if config.respond_to? :logger=
|
179
191
|
end
|
180
192
|
|
181
193
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -183,6 +195,7 @@ module Google
|
|
183
195
|
config.quota_project = @quota_project_id
|
184
196
|
config.endpoint = @network_services_stub.endpoint
|
185
197
|
config.universe_domain = @network_services_stub.universe_domain
|
198
|
+
config.logger = @network_services_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
|
+
@network_services_stub.logger
|
230
|
+
end
|
231
|
+
|
210
232
|
# Service calls
|
211
233
|
|
212
234
|
##
|
@@ -302,7 +324,7 @@ module Google
|
|
302
324
|
@network_services_stub.call_rpc :list_endpoint_policies, request, options: options do |response, operation|
|
303
325
|
response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_endpoint_policies, request, response, operation, options
|
304
326
|
yield response, operation if block_given?
|
305
|
-
|
327
|
+
throw :response, response
|
306
328
|
end
|
307
329
|
rescue ::GRPC::BadStatus => e
|
308
330
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -389,7 +411,6 @@ module Google
|
|
389
411
|
|
390
412
|
@network_services_stub.call_rpc :get_endpoint_policy, request, options: options do |response, operation|
|
391
413
|
yield response, operation if block_given?
|
392
|
-
return response
|
393
414
|
end
|
394
415
|
rescue ::GRPC::BadStatus => e
|
395
416
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -489,7 +510,7 @@ module Google
|
|
489
510
|
@network_services_stub.call_rpc :create_endpoint_policy, request, options: options do |response, operation|
|
490
511
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
491
512
|
yield response, operation if block_given?
|
492
|
-
|
513
|
+
throw :response, response
|
493
514
|
end
|
494
515
|
rescue ::GRPC::BadStatus => e
|
495
516
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -589,7 +610,7 @@ module Google
|
|
589
610
|
@network_services_stub.call_rpc :update_endpoint_policy, request, options: options do |response, operation|
|
590
611
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
591
612
|
yield response, operation if block_given?
|
592
|
-
|
613
|
+
throw :response, response
|
593
614
|
end
|
594
615
|
rescue ::GRPC::BadStatus => e
|
595
616
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -684,7 +705,7 @@ module Google
|
|
684
705
|
@network_services_stub.call_rpc :delete_endpoint_policy, request, options: options do |response, operation|
|
685
706
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
686
707
|
yield response, operation if block_given?
|
687
|
-
|
708
|
+
throw :response, response
|
688
709
|
end
|
689
710
|
rescue ::GRPC::BadStatus => e
|
690
711
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -782,7 +803,7 @@ module Google
|
|
782
803
|
@network_services_stub.call_rpc :list_gateways, request, options: options do |response, operation|
|
783
804
|
response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_gateways, request, response, operation, options
|
784
805
|
yield response, operation if block_given?
|
785
|
-
|
806
|
+
throw :response, response
|
786
807
|
end
|
787
808
|
rescue ::GRPC::BadStatus => e
|
788
809
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -869,7 +890,6 @@ module Google
|
|
869
890
|
|
870
891
|
@network_services_stub.call_rpc :get_gateway, request, options: options do |response, operation|
|
871
892
|
yield response, operation if block_given?
|
872
|
-
return response
|
873
893
|
end
|
874
894
|
rescue ::GRPC::BadStatus => e
|
875
895
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -968,7 +988,7 @@ module Google
|
|
968
988
|
@network_services_stub.call_rpc :create_gateway, request, options: options do |response, operation|
|
969
989
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
970
990
|
yield response, operation if block_given?
|
971
|
-
|
991
|
+
throw :response, response
|
972
992
|
end
|
973
993
|
rescue ::GRPC::BadStatus => e
|
974
994
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1068,7 +1088,7 @@ module Google
|
|
1068
1088
|
@network_services_stub.call_rpc :update_gateway, request, options: options do |response, operation|
|
1069
1089
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1070
1090
|
yield response, operation if block_given?
|
1071
|
-
|
1091
|
+
throw :response, response
|
1072
1092
|
end
|
1073
1093
|
rescue ::GRPC::BadStatus => e
|
1074
1094
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1163,7 +1183,7 @@ module Google
|
|
1163
1183
|
@network_services_stub.call_rpc :delete_gateway, request, options: options do |response, operation|
|
1164
1184
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1165
1185
|
yield response, operation if block_given?
|
1166
|
-
|
1186
|
+
throw :response, response
|
1167
1187
|
end
|
1168
1188
|
rescue ::GRPC::BadStatus => e
|
1169
1189
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1261,7 +1281,7 @@ module Google
|
|
1261
1281
|
@network_services_stub.call_rpc :list_grpc_routes, request, options: options do |response, operation|
|
1262
1282
|
response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_grpc_routes, request, response, operation, options
|
1263
1283
|
yield response, operation if block_given?
|
1264
|
-
|
1284
|
+
throw :response, response
|
1265
1285
|
end
|
1266
1286
|
rescue ::GRPC::BadStatus => e
|
1267
1287
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1348,7 +1368,6 @@ module Google
|
|
1348
1368
|
|
1349
1369
|
@network_services_stub.call_rpc :get_grpc_route, request, options: options do |response, operation|
|
1350
1370
|
yield response, operation if block_given?
|
1351
|
-
return response
|
1352
1371
|
end
|
1353
1372
|
rescue ::GRPC::BadStatus => e
|
1354
1373
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1447,7 +1466,7 @@ module Google
|
|
1447
1466
|
@network_services_stub.call_rpc :create_grpc_route, request, options: options do |response, operation|
|
1448
1467
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1449
1468
|
yield response, operation if block_given?
|
1450
|
-
|
1469
|
+
throw :response, response
|
1451
1470
|
end
|
1452
1471
|
rescue ::GRPC::BadStatus => e
|
1453
1472
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1547,7 +1566,7 @@ module Google
|
|
1547
1566
|
@network_services_stub.call_rpc :update_grpc_route, request, options: options do |response, operation|
|
1548
1567
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1549
1568
|
yield response, operation if block_given?
|
1550
|
-
|
1569
|
+
throw :response, response
|
1551
1570
|
end
|
1552
1571
|
rescue ::GRPC::BadStatus => e
|
1553
1572
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1642,7 +1661,7 @@ module Google
|
|
1642
1661
|
@network_services_stub.call_rpc :delete_grpc_route, request, options: options do |response, operation|
|
1643
1662
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1644
1663
|
yield response, operation if block_given?
|
1645
|
-
|
1664
|
+
throw :response, response
|
1646
1665
|
end
|
1647
1666
|
rescue ::GRPC::BadStatus => e
|
1648
1667
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1740,7 +1759,7 @@ module Google
|
|
1740
1759
|
@network_services_stub.call_rpc :list_http_routes, request, options: options do |response, operation|
|
1741
1760
|
response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_http_routes, request, response, operation, options
|
1742
1761
|
yield response, operation if block_given?
|
1743
|
-
|
1762
|
+
throw :response, response
|
1744
1763
|
end
|
1745
1764
|
rescue ::GRPC::BadStatus => e
|
1746
1765
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1827,7 +1846,6 @@ module Google
|
|
1827
1846
|
|
1828
1847
|
@network_services_stub.call_rpc :get_http_route, request, options: options do |response, operation|
|
1829
1848
|
yield response, operation if block_given?
|
1830
|
-
return response
|
1831
1849
|
end
|
1832
1850
|
rescue ::GRPC::BadStatus => e
|
1833
1851
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1926,7 +1944,7 @@ module Google
|
|
1926
1944
|
@network_services_stub.call_rpc :create_http_route, request, options: options do |response, operation|
|
1927
1945
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1928
1946
|
yield response, operation if block_given?
|
1929
|
-
|
1947
|
+
throw :response, response
|
1930
1948
|
end
|
1931
1949
|
rescue ::GRPC::BadStatus => e
|
1932
1950
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2026,7 +2044,7 @@ module Google
|
|
2026
2044
|
@network_services_stub.call_rpc :update_http_route, request, options: options do |response, operation|
|
2027
2045
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2028
2046
|
yield response, operation if block_given?
|
2029
|
-
|
2047
|
+
throw :response, response
|
2030
2048
|
end
|
2031
2049
|
rescue ::GRPC::BadStatus => e
|
2032
2050
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2121,7 +2139,7 @@ module Google
|
|
2121
2139
|
@network_services_stub.call_rpc :delete_http_route, request, options: options do |response, operation|
|
2122
2140
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2123
2141
|
yield response, operation if block_given?
|
2124
|
-
|
2142
|
+
throw :response, response
|
2125
2143
|
end
|
2126
2144
|
rescue ::GRPC::BadStatus => e
|
2127
2145
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2219,7 +2237,7 @@ module Google
|
|
2219
2237
|
@network_services_stub.call_rpc :list_tcp_routes, request, options: options do |response, operation|
|
2220
2238
|
response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_tcp_routes, request, response, operation, options
|
2221
2239
|
yield response, operation if block_given?
|
2222
|
-
|
2240
|
+
throw :response, response
|
2223
2241
|
end
|
2224
2242
|
rescue ::GRPC::BadStatus => e
|
2225
2243
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2306,7 +2324,6 @@ module Google
|
|
2306
2324
|
|
2307
2325
|
@network_services_stub.call_rpc :get_tcp_route, request, options: options do |response, operation|
|
2308
2326
|
yield response, operation if block_given?
|
2309
|
-
return response
|
2310
2327
|
end
|
2311
2328
|
rescue ::GRPC::BadStatus => e
|
2312
2329
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2405,7 +2422,7 @@ module Google
|
|
2405
2422
|
@network_services_stub.call_rpc :create_tcp_route, request, options: options do |response, operation|
|
2406
2423
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2407
2424
|
yield response, operation if block_given?
|
2408
|
-
|
2425
|
+
throw :response, response
|
2409
2426
|
end
|
2410
2427
|
rescue ::GRPC::BadStatus => e
|
2411
2428
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2505,7 +2522,7 @@ module Google
|
|
2505
2522
|
@network_services_stub.call_rpc :update_tcp_route, request, options: options do |response, operation|
|
2506
2523
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2507
2524
|
yield response, operation if block_given?
|
2508
|
-
|
2525
|
+
throw :response, response
|
2509
2526
|
end
|
2510
2527
|
rescue ::GRPC::BadStatus => e
|
2511
2528
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2600,7 +2617,7 @@ module Google
|
|
2600
2617
|
@network_services_stub.call_rpc :delete_tcp_route, request, options: options do |response, operation|
|
2601
2618
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2602
2619
|
yield response, operation if block_given?
|
2603
|
-
|
2620
|
+
throw :response, response
|
2604
2621
|
end
|
2605
2622
|
rescue ::GRPC::BadStatus => e
|
2606
2623
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2698,7 +2715,7 @@ module Google
|
|
2698
2715
|
@network_services_stub.call_rpc :list_tls_routes, request, options: options do |response, operation|
|
2699
2716
|
response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_tls_routes, request, response, operation, options
|
2700
2717
|
yield response, operation if block_given?
|
2701
|
-
|
2718
|
+
throw :response, response
|
2702
2719
|
end
|
2703
2720
|
rescue ::GRPC::BadStatus => e
|
2704
2721
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2785,7 +2802,6 @@ module Google
|
|
2785
2802
|
|
2786
2803
|
@network_services_stub.call_rpc :get_tls_route, request, options: options do |response, operation|
|
2787
2804
|
yield response, operation if block_given?
|
2788
|
-
return response
|
2789
2805
|
end
|
2790
2806
|
rescue ::GRPC::BadStatus => e
|
2791
2807
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2884,7 +2900,7 @@ module Google
|
|
2884
2900
|
@network_services_stub.call_rpc :create_tls_route, request, options: options do |response, operation|
|
2885
2901
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2886
2902
|
yield response, operation if block_given?
|
2887
|
-
|
2903
|
+
throw :response, response
|
2888
2904
|
end
|
2889
2905
|
rescue ::GRPC::BadStatus => e
|
2890
2906
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2984,7 +3000,7 @@ module Google
|
|
2984
3000
|
@network_services_stub.call_rpc :update_tls_route, request, options: options do |response, operation|
|
2985
3001
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2986
3002
|
yield response, operation if block_given?
|
2987
|
-
|
3003
|
+
throw :response, response
|
2988
3004
|
end
|
2989
3005
|
rescue ::GRPC::BadStatus => e
|
2990
3006
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3079,7 +3095,7 @@ module Google
|
|
3079
3095
|
@network_services_stub.call_rpc :delete_tls_route, request, options: options do |response, operation|
|
3080
3096
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3081
3097
|
yield response, operation if block_given?
|
3082
|
-
|
3098
|
+
throw :response, response
|
3083
3099
|
end
|
3084
3100
|
rescue ::GRPC::BadStatus => e
|
3085
3101
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3177,7 +3193,7 @@ module Google
|
|
3177
3193
|
@network_services_stub.call_rpc :list_service_bindings, request, options: options do |response, operation|
|
3178
3194
|
response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_service_bindings, request, response, operation, options
|
3179
3195
|
yield response, operation if block_given?
|
3180
|
-
|
3196
|
+
throw :response, response
|
3181
3197
|
end
|
3182
3198
|
rescue ::GRPC::BadStatus => e
|
3183
3199
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3264,7 +3280,6 @@ module Google
|
|
3264
3280
|
|
3265
3281
|
@network_services_stub.call_rpc :get_service_binding, request, options: options do |response, operation|
|
3266
3282
|
yield response, operation if block_given?
|
3267
|
-
return response
|
3268
3283
|
end
|
3269
3284
|
rescue ::GRPC::BadStatus => e
|
3270
3285
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3363,7 +3378,7 @@ module Google
|
|
3363
3378
|
@network_services_stub.call_rpc :create_service_binding, request, options: options do |response, operation|
|
3364
3379
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3365
3380
|
yield response, operation if block_given?
|
3366
|
-
|
3381
|
+
throw :response, response
|
3367
3382
|
end
|
3368
3383
|
rescue ::GRPC::BadStatus => e
|
3369
3384
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3458,7 +3473,7 @@ module Google
|
|
3458
3473
|
@network_services_stub.call_rpc :delete_service_binding, request, options: options do |response, operation|
|
3459
3474
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3460
3475
|
yield response, operation if block_given?
|
3461
|
-
|
3476
|
+
throw :response, response
|
3462
3477
|
end
|
3463
3478
|
rescue ::GRPC::BadStatus => e
|
3464
3479
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3556,7 +3571,7 @@ module Google
|
|
3556
3571
|
@network_services_stub.call_rpc :list_meshes, request, options: options do |response, operation|
|
3557
3572
|
response = ::Gapic::PagedEnumerable.new @network_services_stub, :list_meshes, request, response, operation, options
|
3558
3573
|
yield response, operation if block_given?
|
3559
|
-
|
3574
|
+
throw :response, response
|
3560
3575
|
end
|
3561
3576
|
rescue ::GRPC::BadStatus => e
|
3562
3577
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3643,7 +3658,6 @@ module Google
|
|
3643
3658
|
|
3644
3659
|
@network_services_stub.call_rpc :get_mesh, request, options: options do |response, operation|
|
3645
3660
|
yield response, operation if block_given?
|
3646
|
-
return response
|
3647
3661
|
end
|
3648
3662
|
rescue ::GRPC::BadStatus => e
|
3649
3663
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3742,7 +3756,7 @@ module Google
|
|
3742
3756
|
@network_services_stub.call_rpc :create_mesh, request, options: options do |response, operation|
|
3743
3757
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3744
3758
|
yield response, operation if block_given?
|
3745
|
-
|
3759
|
+
throw :response, response
|
3746
3760
|
end
|
3747
3761
|
rescue ::GRPC::BadStatus => e
|
3748
3762
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3842,7 +3856,7 @@ module Google
|
|
3842
3856
|
@network_services_stub.call_rpc :update_mesh, request, options: options do |response, operation|
|
3843
3857
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3844
3858
|
yield response, operation if block_given?
|
3845
|
-
|
3859
|
+
throw :response, response
|
3846
3860
|
end
|
3847
3861
|
rescue ::GRPC::BadStatus => e
|
3848
3862
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3937,7 +3951,7 @@ module Google
|
|
3937
3951
|
@network_services_stub.call_rpc :delete_mesh, request, options: options do |response, operation|
|
3938
3952
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3939
3953
|
yield response, operation if block_given?
|
3940
|
-
|
3954
|
+
throw :response, response
|
3941
3955
|
end
|
3942
3956
|
rescue ::GRPC::BadStatus => e
|
3943
3957
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4026,6 +4040,11 @@ module Google
|
|
4026
4040
|
# default endpoint URL. The default value of nil uses the environment
|
4027
4041
|
# universe (usually the default "googleapis.com" universe).
|
4028
4042
|
# @return [::String,nil]
|
4043
|
+
# @!attribute [rw] logger
|
4044
|
+
# A custom logger to use for request/response debug logging, or the value
|
4045
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
4046
|
+
# explicitly disable logging.
|
4047
|
+
# @return [::Logger,:default,nil]
|
4029
4048
|
#
|
4030
4049
|
class Configuration
|
4031
4050
|
extend ::Gapic::Config
|
@@ -4050,6 +4069,7 @@ module Google
|
|
4050
4069
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
4051
4070
|
config_attr :quota_project, nil, ::String, nil
|
4052
4071
|
config_attr :universe_domain, nil, ::String, nil
|
4072
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
4053
4073
|
|
4054
4074
|
# @private
|
4055
4075
|
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)
|
@@ -688,6 +679,11 @@ module Google
|
|
688
679
|
# default endpoint URL. The default value of nil uses the environment
|
689
680
|
# universe (usually the default "googleapis.com" universe).
|
690
681
|
# @return [::String,nil]
|
682
|
+
# @!attribute [rw] logger
|
683
|
+
# A custom logger to use for request/response debug logging, or the value
|
684
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
685
|
+
# explicitly disable logging.
|
686
|
+
# @return [::Logger,:default,nil]
|
691
687
|
#
|
692
688
|
class Configuration
|
693
689
|
extend ::Gapic::Config
|
@@ -712,6 +708,7 @@ module Google
|
|
712
708
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
713
709
|
config_attr :quota_project, nil, ::String, nil
|
714
710
|
config_attr :universe_domain, nil, ::String, nil
|
711
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
715
712
|
|
716
713
|
# @private
|
717
714
|
def initialize parent_config = nil
|