google-cloud-vision_ai-v1 0.2.0 → 0.3.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 +30 -20
- data/lib/google/cloud/vision_ai/v1/app_platform/client.rb +50 -27
- data/lib/google/cloud/vision_ai/v1/app_platform/operations.rb +12 -15
- data/lib/google/cloud/vision_ai/v1/app_platform/rest/client.rb +46 -27
- data/lib/google/cloud/vision_ai/v1/app_platform/rest/operations.rb +43 -38
- data/lib/google/cloud/vision_ai/v1/app_platform/rest/service_stub.rb +222 -158
- data/lib/google/cloud/vision_ai/v1/health_check_service/client.rb +29 -2
- data/lib/google/cloud/vision_ai/v1/health_check_service/rest/client.rb +29 -2
- data/lib/google/cloud/vision_ai/v1/health_check_service/rest/service_stub.rb +22 -8
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/client.rb +43 -19
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/operations.rb +12 -15
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/client.rb +40 -19
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/operations.rb +43 -38
- data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/service_stub.rb +158 -110
- data/lib/google/cloud/vision_ai/v1/streaming_service/client.rb +29 -7
- data/lib/google/cloud/vision_ai/v1/streaming_service/rest/client.rb +29 -4
- data/lib/google/cloud/vision_ai/v1/streaming_service/rest/service_stub.rb +38 -20
- data/lib/google/cloud/vision_ai/v1/streams_service/client.rb +47 -24
- data/lib/google/cloud/vision_ai/v1/streams_service/operations.rb +12 -15
- data/lib/google/cloud/vision_ai/v1/streams_service/rest/client.rb +43 -24
- data/lib/google/cloud/vision_ai/v1/streams_service/rest/operations.rb +43 -38
- data/lib/google/cloud/vision_ai/v1/streams_service/rest/service_stub.rb +198 -140
- data/lib/google/cloud/vision_ai/v1/version.rb +1 -1
- data/lib/google/cloud/vision_ai/v1/warehouse/client.rb +60 -64
- data/lib/google/cloud/vision_ai/v1/warehouse/operations.rb +12 -15
- data/lib/google/cloud/vision_ai/v1/warehouse/rest/client.rb +59 -63
- data/lib/google/cloud/vision_ai/v1/warehouse/rest/operations.rb +43 -38
- data/lib/google/cloud/vision_ai/v1/warehouse/rest/service_stub.rb +510 -374
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
@@ -196,14 +196,26 @@ module Google
|
|
196
196
|
universe_domain: @config.universe_domain,
|
197
197
|
channel_args: @config.channel_args,
|
198
198
|
interceptors: @config.interceptors,
|
199
|
-
channel_pool_config: @config.channel_pool
|
199
|
+
channel_pool_config: @config.channel_pool,
|
200
|
+
logger: @config.logger
|
200
201
|
)
|
201
202
|
|
203
|
+
@warehouse_stub.stub_logger&.info do |entry|
|
204
|
+
entry.set_system_name
|
205
|
+
entry.set_service
|
206
|
+
entry.message = "Created client for #{entry.service}"
|
207
|
+
entry.set_credentials_fields credentials
|
208
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
209
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
210
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
211
|
+
end
|
212
|
+
|
202
213
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
203
214
|
config.credentials = credentials
|
204
215
|
config.quota_project = @quota_project_id
|
205
216
|
config.endpoint = @warehouse_stub.endpoint
|
206
217
|
config.universe_domain = @warehouse_stub.universe_domain
|
218
|
+
config.logger = @warehouse_stub.logger if config.respond_to? :logger=
|
207
219
|
end
|
208
220
|
|
209
221
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -211,6 +223,7 @@ module Google
|
|
211
223
|
config.quota_project = @quota_project_id
|
212
224
|
config.endpoint = @warehouse_stub.endpoint
|
213
225
|
config.universe_domain = @warehouse_stub.universe_domain
|
226
|
+
config.logger = @warehouse_stub.logger if config.respond_to? :logger=
|
214
227
|
end
|
215
228
|
end
|
216
229
|
|
@@ -235,6 +248,15 @@ module Google
|
|
235
248
|
#
|
236
249
|
attr_reader :iam_policy_client
|
237
250
|
|
251
|
+
##
|
252
|
+
# The logger used for request/response debug logging.
|
253
|
+
#
|
254
|
+
# @return [Logger]
|
255
|
+
#
|
256
|
+
def logger
|
257
|
+
@warehouse_stub.logger
|
258
|
+
end
|
259
|
+
|
238
260
|
# Service calls
|
239
261
|
|
240
262
|
##
|
@@ -329,7 +351,6 @@ module Google
|
|
329
351
|
|
330
352
|
@warehouse_stub.call_rpc :create_asset, request, options: options do |response, operation|
|
331
353
|
yield response, operation if block_given?
|
332
|
-
return response
|
333
354
|
end
|
334
355
|
rescue ::GRPC::BadStatus => e
|
335
356
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -421,7 +442,6 @@ module Google
|
|
421
442
|
|
422
443
|
@warehouse_stub.call_rpc :update_asset, request, options: options do |response, operation|
|
423
444
|
yield response, operation if block_given?
|
424
|
-
return response
|
425
445
|
end
|
426
446
|
rescue ::GRPC::BadStatus => e
|
427
447
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -509,7 +529,6 @@ module Google
|
|
509
529
|
|
510
530
|
@warehouse_stub.call_rpc :get_asset, request, options: options do |response, operation|
|
511
531
|
yield response, operation if block_given?
|
512
|
-
return response
|
513
532
|
end
|
514
533
|
rescue ::GRPC::BadStatus => e
|
515
534
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -618,7 +637,7 @@ module Google
|
|
618
637
|
@warehouse_stub.call_rpc :list_assets, request, options: options do |response, operation|
|
619
638
|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_assets, request, response, operation, options
|
620
639
|
yield response, operation if block_given?
|
621
|
-
|
640
|
+
throw :response, response
|
622
641
|
end
|
623
642
|
rescue ::GRPC::BadStatus => e
|
624
643
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -714,7 +733,7 @@ module Google
|
|
714
733
|
@warehouse_stub.call_rpc :delete_asset, request, options: options do |response, operation|
|
715
734
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
716
735
|
yield response, operation if block_given?
|
717
|
-
|
736
|
+
throw :response, response
|
718
737
|
end
|
719
738
|
rescue ::GRPC::BadStatus => e
|
720
739
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -821,7 +840,7 @@ module Google
|
|
821
840
|
@warehouse_stub.call_rpc :upload_asset, request, options: options do |response, operation|
|
822
841
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
823
842
|
yield response, operation if block_given?
|
824
|
-
|
843
|
+
throw :response, response
|
825
844
|
end
|
826
845
|
rescue ::GRPC::BadStatus => e
|
827
846
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -911,7 +930,6 @@ module Google
|
|
911
930
|
|
912
931
|
@warehouse_stub.call_rpc :generate_retrieval_url, request, options: options do |response, operation|
|
913
932
|
yield response, operation if block_given?
|
914
|
-
return response
|
915
933
|
end
|
916
934
|
rescue ::GRPC::BadStatus => e
|
917
935
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1007,7 +1025,7 @@ module Google
|
|
1007
1025
|
@warehouse_stub.call_rpc :analyze_asset, request, options: options do |response, operation|
|
1008
1026
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1009
1027
|
yield response, operation if block_given?
|
1010
|
-
|
1028
|
+
throw :response, response
|
1011
1029
|
end
|
1012
1030
|
rescue ::GRPC::BadStatus => e
|
1013
1031
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1108,7 +1126,7 @@ module Google
|
|
1108
1126
|
@warehouse_stub.call_rpc :index_asset, request, options: options do |response, operation|
|
1109
1127
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1110
1128
|
yield response, operation if block_given?
|
1111
|
-
|
1129
|
+
throw :response, response
|
1112
1130
|
end
|
1113
1131
|
rescue ::GRPC::BadStatus => e
|
1114
1132
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1209,7 +1227,7 @@ module Google
|
|
1209
1227
|
@warehouse_stub.call_rpc :remove_index_asset, request, options: options do |response, operation|
|
1210
1228
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1211
1229
|
yield response, operation if block_given?
|
1212
|
-
|
1230
|
+
throw :response, response
|
1213
1231
|
end
|
1214
1232
|
rescue ::GRPC::BadStatus => e
|
1215
1233
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1318,7 +1336,7 @@ module Google
|
|
1318
1336
|
@warehouse_stub.call_rpc :view_indexed_assets, request, options: options do |response, operation|
|
1319
1337
|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :view_indexed_assets, request, response, operation, options
|
1320
1338
|
yield response, operation if block_given?
|
1321
|
-
|
1339
|
+
throw :response, response
|
1322
1340
|
end
|
1323
1341
|
rescue ::GRPC::BadStatus => e
|
1324
1342
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1424,7 +1442,7 @@ module Google
|
|
1424
1442
|
@warehouse_stub.call_rpc :create_index, request, options: options do |response, operation|
|
1425
1443
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1426
1444
|
yield response, operation if block_given?
|
1427
|
-
|
1445
|
+
throw :response, response
|
1428
1446
|
end
|
1429
1447
|
rescue ::GRPC::BadStatus => e
|
1430
1448
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1527,7 +1545,7 @@ module Google
|
|
1527
1545
|
@warehouse_stub.call_rpc :update_index, request, options: options do |response, operation|
|
1528
1546
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1529
1547
|
yield response, operation if block_given?
|
1530
|
-
|
1548
|
+
throw :response, response
|
1531
1549
|
end
|
1532
1550
|
rescue ::GRPC::BadStatus => e
|
1533
1551
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1615,7 +1633,6 @@ module Google
|
|
1615
1633
|
|
1616
1634
|
@warehouse_stub.call_rpc :get_index, request, options: options do |response, operation|
|
1617
1635
|
yield response, operation if block_given?
|
1618
|
-
return response
|
1619
1636
|
end
|
1620
1637
|
rescue ::GRPC::BadStatus => e
|
1621
1638
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1719,7 +1736,7 @@ module Google
|
|
1719
1736
|
@warehouse_stub.call_rpc :list_indexes, request, options: options do |response, operation|
|
1720
1737
|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_indexes, request, response, operation, options
|
1721
1738
|
yield response, operation if block_given?
|
1722
|
-
|
1739
|
+
throw :response, response
|
1723
1740
|
end
|
1724
1741
|
rescue ::GRPC::BadStatus => e
|
1725
1742
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1816,7 +1833,7 @@ module Google
|
|
1816
1833
|
@warehouse_stub.call_rpc :delete_index, request, options: options do |response, operation|
|
1817
1834
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1818
1835
|
yield response, operation if block_given?
|
1819
|
-
|
1836
|
+
throw :response, response
|
1820
1837
|
end
|
1821
1838
|
rescue ::GRPC::BadStatus => e
|
1822
1839
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1912,7 +1929,7 @@ module Google
|
|
1912
1929
|
@warehouse_stub.call_rpc :create_corpus, request, options: options do |response, operation|
|
1913
1930
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1914
1931
|
yield response, operation if block_given?
|
1915
|
-
|
1932
|
+
throw :response, response
|
1916
1933
|
end
|
1917
1934
|
rescue ::GRPC::BadStatus => e
|
1918
1935
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1998,7 +2015,6 @@ module Google
|
|
1998
2015
|
|
1999
2016
|
@warehouse_stub.call_rpc :get_corpus, request, options: options do |response, operation|
|
2000
2017
|
yield response, operation if block_given?
|
2001
|
-
return response
|
2002
2018
|
end
|
2003
2019
|
rescue ::GRPC::BadStatus => e
|
2004
2020
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2086,7 +2102,6 @@ module Google
|
|
2086
2102
|
|
2087
2103
|
@warehouse_stub.call_rpc :update_corpus, request, options: options do |response, operation|
|
2088
2104
|
yield response, operation if block_given?
|
2089
|
-
return response
|
2090
2105
|
end
|
2091
2106
|
rescue ::GRPC::BadStatus => e
|
2092
2107
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2195,7 +2210,7 @@ module Google
|
|
2195
2210
|
@warehouse_stub.call_rpc :list_corpora, request, options: options do |response, operation|
|
2196
2211
|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_corpora, request, response, operation, options
|
2197
2212
|
yield response, operation if block_given?
|
2198
|
-
|
2213
|
+
throw :response, response
|
2199
2214
|
end
|
2200
2215
|
rescue ::GRPC::BadStatus => e
|
2201
2216
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2282,7 +2297,6 @@ module Google
|
|
2282
2297
|
|
2283
2298
|
@warehouse_stub.call_rpc :delete_corpus, request, options: options do |response, operation|
|
2284
2299
|
yield response, operation if block_given?
|
2285
|
-
return response
|
2286
2300
|
end
|
2287
2301
|
rescue ::GRPC::BadStatus => e
|
2288
2302
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2378,7 +2392,7 @@ module Google
|
|
2378
2392
|
@warehouse_stub.call_rpc :analyze_corpus, request, options: options do |response, operation|
|
2379
2393
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
2380
2394
|
yield response, operation if block_given?
|
2381
|
-
|
2395
|
+
throw :response, response
|
2382
2396
|
end
|
2383
2397
|
rescue ::GRPC::BadStatus => e
|
2384
2398
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2468,7 +2482,6 @@ module Google
|
|
2468
2482
|
|
2469
2483
|
@warehouse_stub.call_rpc :create_data_schema, request, options: options do |response, operation|
|
2470
2484
|
yield response, operation if block_given?
|
2471
|
-
return response
|
2472
2485
|
end
|
2473
2486
|
rescue ::GRPC::BadStatus => e
|
2474
2487
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2558,7 +2571,6 @@ module Google
|
|
2558
2571
|
|
2559
2572
|
@warehouse_stub.call_rpc :update_data_schema, request, options: options do |response, operation|
|
2560
2573
|
yield response, operation if block_given?
|
2561
|
-
return response
|
2562
2574
|
end
|
2563
2575
|
rescue ::GRPC::BadStatus => e
|
2564
2576
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2646,7 +2658,6 @@ module Google
|
|
2646
2658
|
|
2647
2659
|
@warehouse_stub.call_rpc :get_data_schema, request, options: options do |response, operation|
|
2648
2660
|
yield response, operation if block_given?
|
2649
|
-
return response
|
2650
2661
|
end
|
2651
2662
|
rescue ::GRPC::BadStatus => e
|
2652
2663
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2734,7 +2745,6 @@ module Google
|
|
2734
2745
|
|
2735
2746
|
@warehouse_stub.call_rpc :delete_data_schema, request, options: options do |response, operation|
|
2736
2747
|
yield response, operation if block_given?
|
2737
|
-
return response
|
2738
2748
|
end
|
2739
2749
|
rescue ::GRPC::BadStatus => e
|
2740
2750
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2837,7 +2847,7 @@ module Google
|
|
2837
2847
|
@warehouse_stub.call_rpc :list_data_schemas, request, options: options do |response, operation|
|
2838
2848
|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_data_schemas, request, response, operation, options
|
2839
2849
|
yield response, operation if block_given?
|
2840
|
-
|
2850
|
+
throw :response, response
|
2841
2851
|
end
|
2842
2852
|
rescue ::GRPC::BadStatus => e
|
2843
2853
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2935,7 +2945,6 @@ module Google
|
|
2935
2945
|
|
2936
2946
|
@warehouse_stub.call_rpc :create_annotation, request, options: options do |response, operation|
|
2937
2947
|
yield response, operation if block_given?
|
2938
|
-
return response
|
2939
2948
|
end
|
2940
2949
|
rescue ::GRPC::BadStatus => e
|
2941
2950
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3023,7 +3032,6 @@ module Google
|
|
3023
3032
|
|
3024
3033
|
@warehouse_stub.call_rpc :get_annotation, request, options: options do |response, operation|
|
3025
3034
|
yield response, operation if block_given?
|
3026
|
-
return response
|
3027
3035
|
end
|
3028
3036
|
rescue ::GRPC::BadStatus => e
|
3029
3037
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3142,7 +3150,7 @@ module Google
|
|
3142
3150
|
@warehouse_stub.call_rpc :list_annotations, request, options: options do |response, operation|
|
3143
3151
|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_annotations, request, response, operation, options
|
3144
3152
|
yield response, operation if block_given?
|
3145
|
-
|
3153
|
+
throw :response, response
|
3146
3154
|
end
|
3147
3155
|
rescue ::GRPC::BadStatus => e
|
3148
3156
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3233,7 +3241,6 @@ module Google
|
|
3233
3241
|
|
3234
3242
|
@warehouse_stub.call_rpc :update_annotation, request, options: options do |response, operation|
|
3235
3243
|
yield response, operation if block_given?
|
3236
|
-
return response
|
3237
3244
|
end
|
3238
3245
|
rescue ::GRPC::BadStatus => e
|
3239
3246
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3321,7 +3328,6 @@ module Google
|
|
3321
3328
|
|
3322
3329
|
@warehouse_stub.call_rpc :delete_annotation, request, options: options do |response, operation|
|
3323
3330
|
yield response, operation if block_given?
|
3324
|
-
return response
|
3325
3331
|
end
|
3326
3332
|
rescue ::GRPC::BadStatus => e
|
3327
3333
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3403,7 +3409,6 @@ module Google
|
|
3403
3409
|
|
3404
3410
|
@warehouse_stub.call_rpc :ingest_asset, request, options: options do |response, operation|
|
3405
3411
|
yield response, operation if block_given?
|
3406
|
-
return response
|
3407
3412
|
end
|
3408
3413
|
rescue ::GRPC::BadStatus => e
|
3409
3414
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3498,7 +3503,6 @@ module Google
|
|
3498
3503
|
|
3499
3504
|
@warehouse_stub.call_rpc :clip_asset, request, options: options do |response, operation|
|
3500
3505
|
yield response, operation if block_given?
|
3501
|
-
return response
|
3502
3506
|
end
|
3503
3507
|
rescue ::GRPC::BadStatus => e
|
3504
3508
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3594,7 +3598,6 @@ module Google
|
|
3594
3598
|
|
3595
3599
|
@warehouse_stub.call_rpc :generate_hls_uri, request, options: options do |response, operation|
|
3596
3600
|
yield response, operation if block_given?
|
3597
|
-
return response
|
3598
3601
|
end
|
3599
3602
|
rescue ::GRPC::BadStatus => e
|
3600
3603
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3697,7 +3700,7 @@ module Google
|
|
3697
3700
|
@warehouse_stub.call_rpc :import_assets, request, options: options do |response, operation|
|
3698
3701
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
3699
3702
|
yield response, operation if block_given?
|
3700
|
-
|
3703
|
+
throw :response, response
|
3701
3704
|
end
|
3702
3705
|
rescue ::GRPC::BadStatus => e
|
3703
3706
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3806,7 +3809,6 @@ module Google
|
|
3806
3809
|
|
3807
3810
|
@warehouse_stub.call_rpc :create_search_config, request, options: options do |response, operation|
|
3808
3811
|
yield response, operation if block_given?
|
3809
|
-
return response
|
3810
3812
|
end
|
3811
3813
|
rescue ::GRPC::BadStatus => e
|
3812
3814
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -3912,7 +3914,6 @@ module Google
|
|
3912
3914
|
|
3913
3915
|
@warehouse_stub.call_rpc :update_search_config, request, options: options do |response, operation|
|
3914
3916
|
yield response, operation if block_given?
|
3915
|
-
return response
|
3916
3917
|
end
|
3917
3918
|
rescue ::GRPC::BadStatus => e
|
3918
3919
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4000,7 +4001,6 @@ module Google
|
|
4000
4001
|
|
4001
4002
|
@warehouse_stub.call_rpc :get_search_config, request, options: options do |response, operation|
|
4002
4003
|
yield response, operation if block_given?
|
4003
|
-
return response
|
4004
4004
|
end
|
4005
4005
|
rescue ::GRPC::BadStatus => e
|
4006
4006
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4091,7 +4091,6 @@ module Google
|
|
4091
4091
|
|
4092
4092
|
@warehouse_stub.call_rpc :delete_search_config, request, options: options do |response, operation|
|
4093
4093
|
yield response, operation if block_given?
|
4094
|
-
return response
|
4095
4094
|
end
|
4096
4095
|
rescue ::GRPC::BadStatus => e
|
4097
4096
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4195,7 +4194,7 @@ module Google
|
|
4195
4194
|
@warehouse_stub.call_rpc :list_search_configs, request, options: options do |response, operation|
|
4196
4195
|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_search_configs, request, response, operation, options
|
4197
4196
|
yield response, operation if block_given?
|
4198
|
-
|
4197
|
+
throw :response, response
|
4199
4198
|
end
|
4200
4199
|
rescue ::GRPC::BadStatus => e
|
4201
4200
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4287,7 +4286,6 @@ module Google
|
|
4287
4286
|
|
4288
4287
|
@warehouse_stub.call_rpc :create_search_hypernym, request, options: options do |response, operation|
|
4289
4288
|
yield response, operation if block_given?
|
4290
|
-
return response
|
4291
4289
|
end
|
4292
4290
|
rescue ::GRPC::BadStatus => e
|
4293
4291
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4379,7 +4377,6 @@ module Google
|
|
4379
4377
|
|
4380
4378
|
@warehouse_stub.call_rpc :update_search_hypernym, request, options: options do |response, operation|
|
4381
4379
|
yield response, operation if block_given?
|
4382
|
-
return response
|
4383
4380
|
end
|
4384
4381
|
rescue ::GRPC::BadStatus => e
|
4385
4382
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4467,7 +4464,6 @@ module Google
|
|
4467
4464
|
|
4468
4465
|
@warehouse_stub.call_rpc :get_search_hypernym, request, options: options do |response, operation|
|
4469
4466
|
yield response, operation if block_given?
|
4470
|
-
return response
|
4471
4467
|
end
|
4472
4468
|
rescue ::GRPC::BadStatus => e
|
4473
4469
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4555,7 +4551,6 @@ module Google
|
|
4555
4551
|
|
4556
4552
|
@warehouse_stub.call_rpc :delete_search_hypernym, request, options: options do |response, operation|
|
4557
4553
|
yield response, operation if block_given?
|
4558
|
-
return response
|
4559
4554
|
end
|
4560
4555
|
rescue ::GRPC::BadStatus => e
|
4561
4556
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4659,7 +4654,7 @@ module Google
|
|
4659
4654
|
@warehouse_stub.call_rpc :list_search_hypernyms, request, options: options do |response, operation|
|
4660
4655
|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_search_hypernyms, request, response, operation, options
|
4661
4656
|
yield response, operation if block_given?
|
4662
|
-
|
4657
|
+
throw :response, response
|
4663
4658
|
end
|
4664
4659
|
rescue ::GRPC::BadStatus => e
|
4665
4660
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4779,7 +4774,7 @@ module Google
|
|
4779
4774
|
@warehouse_stub.call_rpc :search_assets, request, options: options do |response, operation|
|
4780
4775
|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :search_assets, request, response, operation, options
|
4781
4776
|
yield response, operation if block_given?
|
4782
|
-
|
4777
|
+
throw :response, response
|
4783
4778
|
end
|
4784
4779
|
rescue ::GRPC::BadStatus => e
|
4785
4780
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4890,7 +4885,7 @@ module Google
|
|
4890
4885
|
@warehouse_stub.call_rpc :search_index_endpoint, request, options: options do |response, operation|
|
4891
4886
|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :search_index_endpoint, request, response, operation, options
|
4892
4887
|
yield response, operation if block_given?
|
4893
|
-
|
4888
|
+
throw :response, response
|
4894
4889
|
end
|
4895
4890
|
rescue ::GRPC::BadStatus => e
|
4896
4891
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -4994,7 +4989,7 @@ module Google
|
|
4994
4989
|
@warehouse_stub.call_rpc :create_index_endpoint, request, options: options do |response, operation|
|
4995
4990
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
4996
4991
|
yield response, operation if block_given?
|
4997
|
-
|
4992
|
+
throw :response, response
|
4998
4993
|
end
|
4999
4994
|
rescue ::GRPC::BadStatus => e
|
5000
4995
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5080,7 +5075,6 @@ module Google
|
|
5080
5075
|
|
5081
5076
|
@warehouse_stub.call_rpc :get_index_endpoint, request, options: options do |response, operation|
|
5082
5077
|
yield response, operation if block_given?
|
5083
|
-
return response
|
5084
5078
|
end
|
5085
5079
|
rescue ::GRPC::BadStatus => e
|
5086
5080
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5190,7 +5184,7 @@ module Google
|
|
5190
5184
|
@warehouse_stub.call_rpc :list_index_endpoints, request, options: options do |response, operation|
|
5191
5185
|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_index_endpoints, request, response, operation, options
|
5192
5186
|
yield response, operation if block_given?
|
5193
|
-
|
5187
|
+
throw :response, response
|
5194
5188
|
end
|
5195
5189
|
rescue ::GRPC::BadStatus => e
|
5196
5190
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5292,7 +5286,7 @@ module Google
|
|
5292
5286
|
@warehouse_stub.call_rpc :update_index_endpoint, request, options: options do |response, operation|
|
5293
5287
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
5294
5288
|
yield response, operation if block_given?
|
5295
|
-
|
5289
|
+
throw :response, response
|
5296
5290
|
end
|
5297
5291
|
rescue ::GRPC::BadStatus => e
|
5298
5292
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5386,7 +5380,7 @@ module Google
|
|
5386
5380
|
@warehouse_stub.call_rpc :delete_index_endpoint, request, options: options do |response, operation|
|
5387
5381
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
5388
5382
|
yield response, operation if block_given?
|
5389
|
-
|
5383
|
+
throw :response, response
|
5390
5384
|
end
|
5391
5385
|
rescue ::GRPC::BadStatus => e
|
5392
5386
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5484,7 +5478,7 @@ module Google
|
|
5484
5478
|
@warehouse_stub.call_rpc :deploy_index, request, options: options do |response, operation|
|
5485
5479
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
5486
5480
|
yield response, operation if block_given?
|
5487
|
-
|
5481
|
+
throw :response, response
|
5488
5482
|
end
|
5489
5483
|
rescue ::GRPC::BadStatus => e
|
5490
5484
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5580,7 +5574,7 @@ module Google
|
|
5580
5574
|
@warehouse_stub.call_rpc :undeploy_index, request, options: options do |response, operation|
|
5581
5575
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
5582
5576
|
yield response, operation if block_given?
|
5583
|
-
|
5577
|
+
throw :response, response
|
5584
5578
|
end
|
5585
5579
|
rescue ::GRPC::BadStatus => e
|
5586
5580
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5685,7 +5679,7 @@ module Google
|
|
5685
5679
|
@warehouse_stub.call_rpc :create_collection, request, options: options do |response, operation|
|
5686
5680
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
5687
5681
|
yield response, operation if block_given?
|
5688
|
-
|
5682
|
+
throw :response, response
|
5689
5683
|
end
|
5690
5684
|
rescue ::GRPC::BadStatus => e
|
5691
5685
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5780,7 +5774,7 @@ module Google
|
|
5780
5774
|
@warehouse_stub.call_rpc :delete_collection, request, options: options do |response, operation|
|
5781
5775
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
5782
5776
|
yield response, operation if block_given?
|
5783
|
-
|
5777
|
+
throw :response, response
|
5784
5778
|
end
|
5785
5779
|
rescue ::GRPC::BadStatus => e
|
5786
5780
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5867,7 +5861,6 @@ module Google
|
|
5867
5861
|
|
5868
5862
|
@warehouse_stub.call_rpc :get_collection, request, options: options do |response, operation|
|
5869
5863
|
yield response, operation if block_given?
|
5870
|
-
return response
|
5871
5864
|
end
|
5872
5865
|
rescue ::GRPC::BadStatus => e
|
5873
5866
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -5965,7 +5958,6 @@ module Google
|
|
5965
5958
|
|
5966
5959
|
@warehouse_stub.call_rpc :update_collection, request, options: options do |response, operation|
|
5967
5960
|
yield response, operation if block_given?
|
5968
|
-
return response
|
5969
5961
|
end
|
5970
5962
|
rescue ::GRPC::BadStatus => e
|
5971
5963
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -6067,7 +6059,7 @@ module Google
|
|
6067
6059
|
@warehouse_stub.call_rpc :list_collections, request, options: options do |response, operation|
|
6068
6060
|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_collections, request, response, operation, options
|
6069
6061
|
yield response, operation if block_given?
|
6070
|
-
|
6062
|
+
throw :response, response
|
6071
6063
|
end
|
6072
6064
|
rescue ::GRPC::BadStatus => e
|
6073
6065
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -6153,7 +6145,6 @@ module Google
|
|
6153
6145
|
|
6154
6146
|
@warehouse_stub.call_rpc :add_collection_item, request, options: options do |response, operation|
|
6155
6147
|
yield response, operation if block_given?
|
6156
|
-
return response
|
6157
6148
|
end
|
6158
6149
|
rescue ::GRPC::BadStatus => e
|
6159
6150
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -6239,7 +6230,6 @@ module Google
|
|
6239
6230
|
|
6240
6231
|
@warehouse_stub.call_rpc :remove_collection_item, request, options: options do |response, operation|
|
6241
6232
|
yield response, operation if block_given?
|
6242
|
-
return response
|
6243
6233
|
end
|
6244
6234
|
rescue ::GRPC::BadStatus => e
|
6245
6235
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -6342,7 +6332,7 @@ module Google
|
|
6342
6332
|
@warehouse_stub.call_rpc :view_collection_items, request, options: options do |response, operation|
|
6343
6333
|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :view_collection_items, request, response, operation, options
|
6344
6334
|
yield response, operation if block_given?
|
6345
|
-
|
6335
|
+
throw :response, response
|
6346
6336
|
end
|
6347
6337
|
rescue ::GRPC::BadStatus => e
|
6348
6338
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -6431,6 +6421,11 @@ module Google
|
|
6431
6421
|
# default endpoint URL. The default value of nil uses the environment
|
6432
6422
|
# universe (usually the default "googleapis.com" universe).
|
6433
6423
|
# @return [::String,nil]
|
6424
|
+
# @!attribute [rw] logger
|
6425
|
+
# A custom logger to use for request/response debug logging, or the value
|
6426
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
6427
|
+
# explicitly disable logging.
|
6428
|
+
# @return [::Logger,:default,nil]
|
6434
6429
|
#
|
6435
6430
|
class Configuration
|
6436
6431
|
extend ::Gapic::Config
|
@@ -6455,6 +6450,7 @@ module Google
|
|
6455
6450
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
6456
6451
|
config_attr :quota_project, nil, ::String, nil
|
6457
6452
|
config_attr :universe_domain, nil, ::String, nil
|
6453
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
6458
6454
|
|
6459
6455
|
# @private
|
6460
6456
|
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
|