google-cloud-vision_ai-v1 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -20
  3. data/lib/google/cloud/vision_ai/v1/app_platform/client.rb +50 -27
  4. data/lib/google/cloud/vision_ai/v1/app_platform/operations.rb +12 -15
  5. data/lib/google/cloud/vision_ai/v1/app_platform/rest/client.rb +46 -27
  6. data/lib/google/cloud/vision_ai/v1/app_platform/rest/operations.rb +43 -38
  7. data/lib/google/cloud/vision_ai/v1/app_platform/rest/service_stub.rb +222 -158
  8. data/lib/google/cloud/vision_ai/v1/health_check_service/client.rb +29 -2
  9. data/lib/google/cloud/vision_ai/v1/health_check_service/rest/client.rb +29 -2
  10. data/lib/google/cloud/vision_ai/v1/health_check_service/rest/service_stub.rb +22 -8
  11. data/lib/google/cloud/vision_ai/v1/live_video_analytics/client.rb +43 -19
  12. data/lib/google/cloud/vision_ai/v1/live_video_analytics/operations.rb +12 -15
  13. data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/client.rb +40 -19
  14. data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/operations.rb +43 -38
  15. data/lib/google/cloud/vision_ai/v1/live_video_analytics/rest/service_stub.rb +158 -110
  16. data/lib/google/cloud/vision_ai/v1/streaming_service/client.rb +29 -7
  17. data/lib/google/cloud/vision_ai/v1/streaming_service/rest/client.rb +29 -4
  18. data/lib/google/cloud/vision_ai/v1/streaming_service/rest/service_stub.rb +38 -20
  19. data/lib/google/cloud/vision_ai/v1/streams_service/client.rb +47 -24
  20. data/lib/google/cloud/vision_ai/v1/streams_service/operations.rb +12 -15
  21. data/lib/google/cloud/vision_ai/v1/streams_service/rest/client.rb +43 -24
  22. data/lib/google/cloud/vision_ai/v1/streams_service/rest/operations.rb +43 -38
  23. data/lib/google/cloud/vision_ai/v1/streams_service/rest/service_stub.rb +198 -140
  24. data/lib/google/cloud/vision_ai/v1/version.rb +1 -1
  25. data/lib/google/cloud/vision_ai/v1/warehouse/client.rb +61 -64
  26. data/lib/google/cloud/vision_ai/v1/warehouse/operations.rb +12 -15
  27. data/lib/google/cloud/vision_ai/v1/warehouse/rest/client.rb +60 -63
  28. data/lib/google/cloud/vision_ai/v1/warehouse/rest/operations.rb +43 -38
  29. data/lib/google/cloud/vision_ai/v1/warehouse/rest/service_stub.rb +510 -374
  30. data/lib/google/cloud/visionai/v1/warehouse_pb.rb +2 -1
  31. data/lib/google/cloud/visionai/v1/warehouse_services_pb.rb +1 -0
  32. data/proto_docs/google/api/client.rb +56 -0
  33. data/proto_docs/google/cloud/visionai/v1/warehouse.rb +60 -7
  34. data/proto_docs/google/longrunning/operations.rb +19 -14
  35. 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
- return response
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
- return response
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
- return response
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
- return response
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
- return response
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
- return response
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
- return response
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
- return response
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
- return response
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
- return response
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
- return response
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
- return response
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
- return response
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
- return response
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
- return response
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
- return response
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,13 +3409,13 @@ 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)
3410
3415
  end
3411
3416
 
3412
3417
  ##
3418
+ # Supported by STREAM_VIDEO corpus type.
3413
3419
  # Generates clips for downloading. The api takes in a time range, and
3414
3420
  # generates a clip of the first content available after start_time and
3415
3421
  # before end_time, which may overflow beyond these bounds.
@@ -3497,7 +3503,6 @@ module Google
3497
3503
 
3498
3504
  @warehouse_stub.call_rpc :clip_asset, request, options: options do |response, operation|
3499
3505
  yield response, operation if block_given?
3500
- return response
3501
3506
  end
3502
3507
  rescue ::GRPC::BadStatus => e
3503
3508
  raise ::Google::Cloud::Error.from_error(e)
@@ -3593,7 +3598,6 @@ module Google
3593
3598
 
3594
3599
  @warehouse_stub.call_rpc :generate_hls_uri, request, options: options do |response, operation|
3595
3600
  yield response, operation if block_given?
3596
- return response
3597
3601
  end
3598
3602
  rescue ::GRPC::BadStatus => e
3599
3603
  raise ::Google::Cloud::Error.from_error(e)
@@ -3696,7 +3700,7 @@ module Google
3696
3700
  @warehouse_stub.call_rpc :import_assets, request, options: options do |response, operation|
3697
3701
  response = ::Gapic::Operation.new response, @operations_client, options: options
3698
3702
  yield response, operation if block_given?
3699
- return response
3703
+ throw :response, response
3700
3704
  end
3701
3705
  rescue ::GRPC::BadStatus => e
3702
3706
  raise ::Google::Cloud::Error.from_error(e)
@@ -3805,7 +3809,6 @@ module Google
3805
3809
 
3806
3810
  @warehouse_stub.call_rpc :create_search_config, request, options: options do |response, operation|
3807
3811
  yield response, operation if block_given?
3808
- return response
3809
3812
  end
3810
3813
  rescue ::GRPC::BadStatus => e
3811
3814
  raise ::Google::Cloud::Error.from_error(e)
@@ -3911,7 +3914,6 @@ module Google
3911
3914
 
3912
3915
  @warehouse_stub.call_rpc :update_search_config, request, options: options do |response, operation|
3913
3916
  yield response, operation if block_given?
3914
- return response
3915
3917
  end
3916
3918
  rescue ::GRPC::BadStatus => e
3917
3919
  raise ::Google::Cloud::Error.from_error(e)
@@ -3999,7 +4001,6 @@ module Google
3999
4001
 
4000
4002
  @warehouse_stub.call_rpc :get_search_config, request, options: options do |response, operation|
4001
4003
  yield response, operation if block_given?
4002
- return response
4003
4004
  end
4004
4005
  rescue ::GRPC::BadStatus => e
4005
4006
  raise ::Google::Cloud::Error.from_error(e)
@@ -4090,7 +4091,6 @@ module Google
4090
4091
 
4091
4092
  @warehouse_stub.call_rpc :delete_search_config, request, options: options do |response, operation|
4092
4093
  yield response, operation if block_given?
4093
- return response
4094
4094
  end
4095
4095
  rescue ::GRPC::BadStatus => e
4096
4096
  raise ::Google::Cloud::Error.from_error(e)
@@ -4194,7 +4194,7 @@ module Google
4194
4194
  @warehouse_stub.call_rpc :list_search_configs, request, options: options do |response, operation|
4195
4195
  response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_search_configs, request, response, operation, options
4196
4196
  yield response, operation if block_given?
4197
- return response
4197
+ throw :response, response
4198
4198
  end
4199
4199
  rescue ::GRPC::BadStatus => e
4200
4200
  raise ::Google::Cloud::Error.from_error(e)
@@ -4286,7 +4286,6 @@ module Google
4286
4286
 
4287
4287
  @warehouse_stub.call_rpc :create_search_hypernym, request, options: options do |response, operation|
4288
4288
  yield response, operation if block_given?
4289
- return response
4290
4289
  end
4291
4290
  rescue ::GRPC::BadStatus => e
4292
4291
  raise ::Google::Cloud::Error.from_error(e)
@@ -4378,7 +4377,6 @@ module Google
4378
4377
 
4379
4378
  @warehouse_stub.call_rpc :update_search_hypernym, request, options: options do |response, operation|
4380
4379
  yield response, operation if block_given?
4381
- return response
4382
4380
  end
4383
4381
  rescue ::GRPC::BadStatus => e
4384
4382
  raise ::Google::Cloud::Error.from_error(e)
@@ -4466,7 +4464,6 @@ module Google
4466
4464
 
4467
4465
  @warehouse_stub.call_rpc :get_search_hypernym, request, options: options do |response, operation|
4468
4466
  yield response, operation if block_given?
4469
- return response
4470
4467
  end
4471
4468
  rescue ::GRPC::BadStatus => e
4472
4469
  raise ::Google::Cloud::Error.from_error(e)
@@ -4554,7 +4551,6 @@ module Google
4554
4551
 
4555
4552
  @warehouse_stub.call_rpc :delete_search_hypernym, request, options: options do |response, operation|
4556
4553
  yield response, operation if block_given?
4557
- return response
4558
4554
  end
4559
4555
  rescue ::GRPC::BadStatus => e
4560
4556
  raise ::Google::Cloud::Error.from_error(e)
@@ -4658,7 +4654,7 @@ module Google
4658
4654
  @warehouse_stub.call_rpc :list_search_hypernyms, request, options: options do |response, operation|
4659
4655
  response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_search_hypernyms, request, response, operation, options
4660
4656
  yield response, operation if block_given?
4661
- return response
4657
+ throw :response, response
4662
4658
  end
4663
4659
  rescue ::GRPC::BadStatus => e
4664
4660
  raise ::Google::Cloud::Error.from_error(e)
@@ -4778,7 +4774,7 @@ module Google
4778
4774
  @warehouse_stub.call_rpc :search_assets, request, options: options do |response, operation|
4779
4775
  response = ::Gapic::PagedEnumerable.new @warehouse_stub, :search_assets, request, response, operation, options
4780
4776
  yield response, operation if block_given?
4781
- return response
4777
+ throw :response, response
4782
4778
  end
4783
4779
  rescue ::GRPC::BadStatus => e
4784
4780
  raise ::Google::Cloud::Error.from_error(e)
@@ -4889,7 +4885,7 @@ module Google
4889
4885
  @warehouse_stub.call_rpc :search_index_endpoint, request, options: options do |response, operation|
4890
4886
  response = ::Gapic::PagedEnumerable.new @warehouse_stub, :search_index_endpoint, request, response, operation, options
4891
4887
  yield response, operation if block_given?
4892
- return response
4888
+ throw :response, response
4893
4889
  end
4894
4890
  rescue ::GRPC::BadStatus => e
4895
4891
  raise ::Google::Cloud::Error.from_error(e)
@@ -4993,7 +4989,7 @@ module Google
4993
4989
  @warehouse_stub.call_rpc :create_index_endpoint, request, options: options do |response, operation|
4994
4990
  response = ::Gapic::Operation.new response, @operations_client, options: options
4995
4991
  yield response, operation if block_given?
4996
- return response
4992
+ throw :response, response
4997
4993
  end
4998
4994
  rescue ::GRPC::BadStatus => e
4999
4995
  raise ::Google::Cloud::Error.from_error(e)
@@ -5079,7 +5075,6 @@ module Google
5079
5075
 
5080
5076
  @warehouse_stub.call_rpc :get_index_endpoint, request, options: options do |response, operation|
5081
5077
  yield response, operation if block_given?
5082
- return response
5083
5078
  end
5084
5079
  rescue ::GRPC::BadStatus => e
5085
5080
  raise ::Google::Cloud::Error.from_error(e)
@@ -5189,7 +5184,7 @@ module Google
5189
5184
  @warehouse_stub.call_rpc :list_index_endpoints, request, options: options do |response, operation|
5190
5185
  response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_index_endpoints, request, response, operation, options
5191
5186
  yield response, operation if block_given?
5192
- return response
5187
+ throw :response, response
5193
5188
  end
5194
5189
  rescue ::GRPC::BadStatus => e
5195
5190
  raise ::Google::Cloud::Error.from_error(e)
@@ -5291,7 +5286,7 @@ module Google
5291
5286
  @warehouse_stub.call_rpc :update_index_endpoint, request, options: options do |response, operation|
5292
5287
  response = ::Gapic::Operation.new response, @operations_client, options: options
5293
5288
  yield response, operation if block_given?
5294
- return response
5289
+ throw :response, response
5295
5290
  end
5296
5291
  rescue ::GRPC::BadStatus => e
5297
5292
  raise ::Google::Cloud::Error.from_error(e)
@@ -5385,7 +5380,7 @@ module Google
5385
5380
  @warehouse_stub.call_rpc :delete_index_endpoint, request, options: options do |response, operation|
5386
5381
  response = ::Gapic::Operation.new response, @operations_client, options: options
5387
5382
  yield response, operation if block_given?
5388
- return response
5383
+ throw :response, response
5389
5384
  end
5390
5385
  rescue ::GRPC::BadStatus => e
5391
5386
  raise ::Google::Cloud::Error.from_error(e)
@@ -5483,7 +5478,7 @@ module Google
5483
5478
  @warehouse_stub.call_rpc :deploy_index, request, options: options do |response, operation|
5484
5479
  response = ::Gapic::Operation.new response, @operations_client, options: options
5485
5480
  yield response, operation if block_given?
5486
- return response
5481
+ throw :response, response
5487
5482
  end
5488
5483
  rescue ::GRPC::BadStatus => e
5489
5484
  raise ::Google::Cloud::Error.from_error(e)
@@ -5579,7 +5574,7 @@ module Google
5579
5574
  @warehouse_stub.call_rpc :undeploy_index, request, options: options do |response, operation|
5580
5575
  response = ::Gapic::Operation.new response, @operations_client, options: options
5581
5576
  yield response, operation if block_given?
5582
- return response
5577
+ throw :response, response
5583
5578
  end
5584
5579
  rescue ::GRPC::BadStatus => e
5585
5580
  raise ::Google::Cloud::Error.from_error(e)
@@ -5684,7 +5679,7 @@ module Google
5684
5679
  @warehouse_stub.call_rpc :create_collection, request, options: options do |response, operation|
5685
5680
  response = ::Gapic::Operation.new response, @operations_client, options: options
5686
5681
  yield response, operation if block_given?
5687
- return response
5682
+ throw :response, response
5688
5683
  end
5689
5684
  rescue ::GRPC::BadStatus => e
5690
5685
  raise ::Google::Cloud::Error.from_error(e)
@@ -5779,7 +5774,7 @@ module Google
5779
5774
  @warehouse_stub.call_rpc :delete_collection, request, options: options do |response, operation|
5780
5775
  response = ::Gapic::Operation.new response, @operations_client, options: options
5781
5776
  yield response, operation if block_given?
5782
- return response
5777
+ throw :response, response
5783
5778
  end
5784
5779
  rescue ::GRPC::BadStatus => e
5785
5780
  raise ::Google::Cloud::Error.from_error(e)
@@ -5866,7 +5861,6 @@ module Google
5866
5861
 
5867
5862
  @warehouse_stub.call_rpc :get_collection, request, options: options do |response, operation|
5868
5863
  yield response, operation if block_given?
5869
- return response
5870
5864
  end
5871
5865
  rescue ::GRPC::BadStatus => e
5872
5866
  raise ::Google::Cloud::Error.from_error(e)
@@ -5964,7 +5958,6 @@ module Google
5964
5958
 
5965
5959
  @warehouse_stub.call_rpc :update_collection, request, options: options do |response, operation|
5966
5960
  yield response, operation if block_given?
5967
- return response
5968
5961
  end
5969
5962
  rescue ::GRPC::BadStatus => e
5970
5963
  raise ::Google::Cloud::Error.from_error(e)
@@ -6066,7 +6059,7 @@ module Google
6066
6059
  @warehouse_stub.call_rpc :list_collections, request, options: options do |response, operation|
6067
6060
  response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_collections, request, response, operation, options
6068
6061
  yield response, operation if block_given?
6069
- return response
6062
+ throw :response, response
6070
6063
  end
6071
6064
  rescue ::GRPC::BadStatus => e
6072
6065
  raise ::Google::Cloud::Error.from_error(e)
@@ -6152,7 +6145,6 @@ module Google
6152
6145
 
6153
6146
  @warehouse_stub.call_rpc :add_collection_item, request, options: options do |response, operation|
6154
6147
  yield response, operation if block_given?
6155
- return response
6156
6148
  end
6157
6149
  rescue ::GRPC::BadStatus => e
6158
6150
  raise ::Google::Cloud::Error.from_error(e)
@@ -6238,7 +6230,6 @@ module Google
6238
6230
 
6239
6231
  @warehouse_stub.call_rpc :remove_collection_item, request, options: options do |response, operation|
6240
6232
  yield response, operation if block_given?
6241
- return response
6242
6233
  end
6243
6234
  rescue ::GRPC::BadStatus => e
6244
6235
  raise ::Google::Cloud::Error.from_error(e)
@@ -6341,7 +6332,7 @@ module Google
6341
6332
  @warehouse_stub.call_rpc :view_collection_items, request, options: options do |response, operation|
6342
6333
  response = ::Gapic::PagedEnumerable.new @warehouse_stub, :view_collection_items, request, response, operation, options
6343
6334
  yield response, operation if block_given?
6344
- return response
6335
+ throw :response, response
6345
6336
  end
6346
6337
  rescue ::GRPC::BadStatus => e
6347
6338
  raise ::Google::Cloud::Error.from_error(e)
@@ -6430,6 +6421,11 @@ module Google
6430
6421
  # default endpoint URL. The default value of nil uses the environment
6431
6422
  # universe (usually the default "googleapis.com" universe).
6432
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]
6433
6429
  #
6434
6430
  class Configuration
6435
6431
  extend ::Gapic::Config
@@ -6454,6 +6450,7 @@ module Google
6454
6450
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
6455
6451
  config_attr :quota_project, nil, ::String, nil
6456
6452
  config_attr :universe_domain, nil, ::String, nil
6453
+ config_attr :logger, :default, ::Logger, nil, :default
6457
6454
 
6458
6455
  # @private
6459
6456
  def initialize parent_config = nil