google-cloud-vision-v1p4beta1 0.5.1 → 0.7.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.
@@ -49,6 +49,9 @@ module Google
49
49
  # `projects/*/locations/*/products/*/referenceImages/*`
50
50
  #
51
51
  class Client
52
+ # @private
53
+ DEFAULT_ENDPOINT_TEMPLATE = "vision.$UNIVERSE_DOMAIN$"
54
+
52
55
  include Paths
53
56
 
54
57
  # @private
@@ -199,6 +202,15 @@ module Google
199
202
  @config
200
203
  end
201
204
 
205
+ ##
206
+ # The effective universe domain
207
+ #
208
+ # @return [String]
209
+ #
210
+ def universe_domain
211
+ @product_search_stub.universe_domain
212
+ end
213
+
202
214
  ##
203
215
  # Create a new ProductSearch REST client object.
204
216
  #
@@ -226,8 +238,9 @@ module Google
226
238
  credentials = @config.credentials
227
239
  # Use self-signed JWT if the endpoint is unchanged from default,
228
240
  # but only if the default endpoint does not have a region prefix.
229
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
230
- !@config.endpoint.split(".").first.include?("-")
241
+ enable_self_signed_jwt = @config.endpoint.nil? ||
242
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
243
+ !@config.endpoint.split(".").first.include?("-"))
231
244
  credentials ||= Credentials.default scope: @config.scope,
232
245
  enable_self_signed_jwt: enable_self_signed_jwt
233
246
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -241,9 +254,15 @@ module Google
241
254
  config.credentials = credentials
242
255
  config.quota_project = @quota_project_id
243
256
  config.endpoint = @config.endpoint
257
+ config.universe_domain = @config.universe_domain
244
258
  end
245
259
 
246
- @product_search_stub = ::Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
260
+ @product_search_stub = ::Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::ServiceStub.new(
261
+ endpoint: @config.endpoint,
262
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
263
+ universe_domain: @config.universe_domain,
264
+ credentials: credentials
265
+ )
247
266
  end
248
267
 
249
268
  ##
@@ -296,6 +315,22 @@ module Google
296
315
  # @return [::Google::Cloud::Vision::V1p4beta1::ProductSet]
297
316
  #
298
317
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
318
+ #
319
+ # @example Basic example
320
+ # require "google/cloud/vision/v1p4beta1"
321
+ #
322
+ # # Create a client object. The client can be reused for multiple calls.
323
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
324
+ #
325
+ # # Create a request. To set request fields, pass in keyword arguments.
326
+ # request = Google::Cloud::Vision::V1p4beta1::CreateProductSetRequest.new
327
+ #
328
+ # # Call the create_product_set method.
329
+ # result = client.create_product_set request
330
+ #
331
+ # # The returned object is of type Google::Cloud::Vision::V1p4beta1::ProductSet.
332
+ # p result
333
+ #
299
334
  def create_product_set request, options = nil
300
335
  raise ::ArgumentError, "request must be provided" if request.nil?
301
336
 
@@ -369,6 +404,26 @@ module Google
369
404
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1p4beta1::ProductSet>]
370
405
  #
371
406
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
407
+ #
408
+ # @example Basic example
409
+ # require "google/cloud/vision/v1p4beta1"
410
+ #
411
+ # # Create a client object. The client can be reused for multiple calls.
412
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
413
+ #
414
+ # # Create a request. To set request fields, pass in keyword arguments.
415
+ # request = Google::Cloud::Vision::V1p4beta1::ListProductSetsRequest.new
416
+ #
417
+ # # Call the list_product_sets method.
418
+ # result = client.list_product_sets request
419
+ #
420
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
421
+ # # over elements, and API calls will be issued to fetch pages as needed.
422
+ # result.each do |item|
423
+ # # Each element is of type ::Google::Cloud::Vision::V1p4beta1::ProductSet.
424
+ # p item
425
+ # end
426
+ #
372
427
  def list_product_sets request, options = nil
373
428
  raise ::ArgumentError, "request must be provided" if request.nil?
374
429
 
@@ -439,6 +494,22 @@ module Google
439
494
  # @return [::Google::Cloud::Vision::V1p4beta1::ProductSet]
440
495
  #
441
496
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
497
+ #
498
+ # @example Basic example
499
+ # require "google/cloud/vision/v1p4beta1"
500
+ #
501
+ # # Create a client object. The client can be reused for multiple calls.
502
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
503
+ #
504
+ # # Create a request. To set request fields, pass in keyword arguments.
505
+ # request = Google::Cloud::Vision::V1p4beta1::GetProductSetRequest.new
506
+ #
507
+ # # Call the get_product_set method.
508
+ # result = client.get_product_set request
509
+ #
510
+ # # The returned object is of type Google::Cloud::Vision::V1p4beta1::ProductSet.
511
+ # p result
512
+ #
442
513
  def get_product_set request, options = nil
443
514
  raise ::ArgumentError, "request must be provided" if request.nil?
444
515
 
@@ -513,6 +584,22 @@ module Google
513
584
  # @return [::Google::Cloud::Vision::V1p4beta1::ProductSet]
514
585
  #
515
586
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
587
+ #
588
+ # @example Basic example
589
+ # require "google/cloud/vision/v1p4beta1"
590
+ #
591
+ # # Create a client object. The client can be reused for multiple calls.
592
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
593
+ #
594
+ # # Create a request. To set request fields, pass in keyword arguments.
595
+ # request = Google::Cloud::Vision::V1p4beta1::UpdateProductSetRequest.new
596
+ #
597
+ # # Call the update_product_set method.
598
+ # result = client.update_product_set request
599
+ #
600
+ # # The returned object is of type Google::Cloud::Vision::V1p4beta1::ProductSet.
601
+ # p result
602
+ #
516
603
  def update_product_set request, options = nil
517
604
  raise ::ArgumentError, "request must be provided" if request.nil?
518
605
 
@@ -581,6 +668,22 @@ module Google
581
668
  # @return [::Google::Protobuf::Empty]
582
669
  #
583
670
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
671
+ #
672
+ # @example Basic example
673
+ # require "google/cloud/vision/v1p4beta1"
674
+ #
675
+ # # Create a client object. The client can be reused for multiple calls.
676
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
677
+ #
678
+ # # Create a request. To set request fields, pass in keyword arguments.
679
+ # request = Google::Cloud::Vision::V1p4beta1::DeleteProductSetRequest.new
680
+ #
681
+ # # Call the delete_product_set method.
682
+ # result = client.delete_product_set request
683
+ #
684
+ # # The returned object is of type Google::Protobuf::Empty.
685
+ # p result
686
+ #
584
687
  def delete_product_set request, options = nil
585
688
  raise ::ArgumentError, "request must be provided" if request.nil?
586
689
 
@@ -660,6 +763,22 @@ module Google
660
763
  # @return [::Google::Cloud::Vision::V1p4beta1::Product]
661
764
  #
662
765
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
766
+ #
767
+ # @example Basic example
768
+ # require "google/cloud/vision/v1p4beta1"
769
+ #
770
+ # # Create a client object. The client can be reused for multiple calls.
771
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
772
+ #
773
+ # # Create a request. To set request fields, pass in keyword arguments.
774
+ # request = Google::Cloud::Vision::V1p4beta1::CreateProductRequest.new
775
+ #
776
+ # # Call the create_product method.
777
+ # result = client.create_product request
778
+ #
779
+ # # The returned object is of type Google::Cloud::Vision::V1p4beta1::Product.
780
+ # p result
781
+ #
663
782
  def create_product request, options = nil
664
783
  raise ::ArgumentError, "request must be provided" if request.nil?
665
784
 
@@ -733,6 +852,26 @@ module Google
733
852
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1p4beta1::Product>]
734
853
  #
735
854
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
855
+ #
856
+ # @example Basic example
857
+ # require "google/cloud/vision/v1p4beta1"
858
+ #
859
+ # # Create a client object. The client can be reused for multiple calls.
860
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
861
+ #
862
+ # # Create a request. To set request fields, pass in keyword arguments.
863
+ # request = Google::Cloud::Vision::V1p4beta1::ListProductsRequest.new
864
+ #
865
+ # # Call the list_products method.
866
+ # result = client.list_products request
867
+ #
868
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
869
+ # # over elements, and API calls will be issued to fetch pages as needed.
870
+ # result.each do |item|
871
+ # # Each element is of type ::Google::Cloud::Vision::V1p4beta1::Product.
872
+ # p item
873
+ # end
874
+ #
736
875
  def list_products request, options = nil
737
876
  raise ::ArgumentError, "request must be provided" if request.nil?
738
877
 
@@ -803,6 +942,22 @@ module Google
803
942
  # @return [::Google::Cloud::Vision::V1p4beta1::Product]
804
943
  #
805
944
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
945
+ #
946
+ # @example Basic example
947
+ # require "google/cloud/vision/v1p4beta1"
948
+ #
949
+ # # Create a client object. The client can be reused for multiple calls.
950
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
951
+ #
952
+ # # Create a request. To set request fields, pass in keyword arguments.
953
+ # request = Google::Cloud::Vision::V1p4beta1::GetProductRequest.new
954
+ #
955
+ # # Call the get_product method.
956
+ # result = client.get_product request
957
+ #
958
+ # # The returned object is of type Google::Cloud::Vision::V1p4beta1::Product.
959
+ # p result
960
+ #
806
961
  def get_product request, options = nil
807
962
  raise ::ArgumentError, "request must be provided" if request.nil?
808
963
 
@@ -886,6 +1041,22 @@ module Google
886
1041
  # @return [::Google::Cloud::Vision::V1p4beta1::Product]
887
1042
  #
888
1043
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1044
+ #
1045
+ # @example Basic example
1046
+ # require "google/cloud/vision/v1p4beta1"
1047
+ #
1048
+ # # Create a client object. The client can be reused for multiple calls.
1049
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
1050
+ #
1051
+ # # Create a request. To set request fields, pass in keyword arguments.
1052
+ # request = Google::Cloud::Vision::V1p4beta1::UpdateProductRequest.new
1053
+ #
1054
+ # # Call the update_product method.
1055
+ # result = client.update_product request
1056
+ #
1057
+ # # The returned object is of type Google::Cloud::Vision::V1p4beta1::Product.
1058
+ # p result
1059
+ #
889
1060
  def update_product request, options = nil
890
1061
  raise ::ArgumentError, "request must be provided" if request.nil?
891
1062
 
@@ -955,6 +1126,22 @@ module Google
955
1126
  # @return [::Google::Protobuf::Empty]
956
1127
  #
957
1128
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1129
+ #
1130
+ # @example Basic example
1131
+ # require "google/cloud/vision/v1p4beta1"
1132
+ #
1133
+ # # Create a client object. The client can be reused for multiple calls.
1134
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
1135
+ #
1136
+ # # Create a request. To set request fields, pass in keyword arguments.
1137
+ # request = Google::Cloud::Vision::V1p4beta1::DeleteProductRequest.new
1138
+ #
1139
+ # # Call the delete_product method.
1140
+ # result = client.delete_product request
1141
+ #
1142
+ # # The returned object is of type Google::Protobuf::Empty.
1143
+ # p result
1144
+ #
958
1145
  def delete_product request, options = nil
959
1146
  raise ::ArgumentError, "request must be provided" if request.nil?
960
1147
 
@@ -1047,6 +1234,22 @@ module Google
1047
1234
  # @return [::Google::Cloud::Vision::V1p4beta1::ReferenceImage]
1048
1235
  #
1049
1236
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1237
+ #
1238
+ # @example Basic example
1239
+ # require "google/cloud/vision/v1p4beta1"
1240
+ #
1241
+ # # Create a client object. The client can be reused for multiple calls.
1242
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
1243
+ #
1244
+ # # Create a request. To set request fields, pass in keyword arguments.
1245
+ # request = Google::Cloud::Vision::V1p4beta1::CreateReferenceImageRequest.new
1246
+ #
1247
+ # # Call the create_reference_image method.
1248
+ # result = client.create_reference_image request
1249
+ #
1250
+ # # The returned object is of type Google::Cloud::Vision::V1p4beta1::ReferenceImage.
1251
+ # p result
1252
+ #
1050
1253
  def create_reference_image request, options = nil
1051
1254
  raise ::ArgumentError, "request must be provided" if request.nil?
1052
1255
 
@@ -1119,6 +1322,22 @@ module Google
1119
1322
  # @return [::Google::Protobuf::Empty]
1120
1323
  #
1121
1324
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1325
+ #
1326
+ # @example Basic example
1327
+ # require "google/cloud/vision/v1p4beta1"
1328
+ #
1329
+ # # Create a client object. The client can be reused for multiple calls.
1330
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
1331
+ #
1332
+ # # Create a request. To set request fields, pass in keyword arguments.
1333
+ # request = Google::Cloud::Vision::V1p4beta1::DeleteReferenceImageRequest.new
1334
+ #
1335
+ # # Call the delete_reference_image method.
1336
+ # result = client.delete_reference_image request
1337
+ #
1338
+ # # The returned object is of type Google::Protobuf::Empty.
1339
+ # p result
1340
+ #
1122
1341
  def delete_reference_image request, options = nil
1123
1342
  raise ::ArgumentError, "request must be provided" if request.nil?
1124
1343
 
@@ -1197,6 +1416,26 @@ module Google
1197
1416
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1p4beta1::ReferenceImage>]
1198
1417
  #
1199
1418
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1419
+ #
1420
+ # @example Basic example
1421
+ # require "google/cloud/vision/v1p4beta1"
1422
+ #
1423
+ # # Create a client object. The client can be reused for multiple calls.
1424
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
1425
+ #
1426
+ # # Create a request. To set request fields, pass in keyword arguments.
1427
+ # request = Google::Cloud::Vision::V1p4beta1::ListReferenceImagesRequest.new
1428
+ #
1429
+ # # Call the list_reference_images method.
1430
+ # result = client.list_reference_images request
1431
+ #
1432
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1433
+ # # over elements, and API calls will be issued to fetch pages as needed.
1434
+ # result.each do |item|
1435
+ # # Each element is of type ::Google::Cloud::Vision::V1p4beta1::ReferenceImage.
1436
+ # p item
1437
+ # end
1438
+ #
1200
1439
  def list_reference_images request, options = nil
1201
1440
  raise ::ArgumentError, "request must be provided" if request.nil?
1202
1441
 
@@ -1268,6 +1507,22 @@ module Google
1268
1507
  # @return [::Google::Cloud::Vision::V1p4beta1::ReferenceImage]
1269
1508
  #
1270
1509
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1510
+ #
1511
+ # @example Basic example
1512
+ # require "google/cloud/vision/v1p4beta1"
1513
+ #
1514
+ # # Create a client object. The client can be reused for multiple calls.
1515
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
1516
+ #
1517
+ # # Create a request. To set request fields, pass in keyword arguments.
1518
+ # request = Google::Cloud::Vision::V1p4beta1::GetReferenceImageRequest.new
1519
+ #
1520
+ # # Call the get_reference_image method.
1521
+ # result = client.get_reference_image request
1522
+ #
1523
+ # # The returned object is of type Google::Cloud::Vision::V1p4beta1::ReferenceImage.
1524
+ # p result
1525
+ #
1271
1526
  def get_reference_image request, options = nil
1272
1527
  raise ::ArgumentError, "request must be provided" if request.nil?
1273
1528
 
@@ -1345,6 +1600,22 @@ module Google
1345
1600
  # @return [::Google::Protobuf::Empty]
1346
1601
  #
1347
1602
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1603
+ #
1604
+ # @example Basic example
1605
+ # require "google/cloud/vision/v1p4beta1"
1606
+ #
1607
+ # # Create a client object. The client can be reused for multiple calls.
1608
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
1609
+ #
1610
+ # # Create a request. To set request fields, pass in keyword arguments.
1611
+ # request = Google::Cloud::Vision::V1p4beta1::AddProductToProductSetRequest.new
1612
+ #
1613
+ # # Call the add_product_to_product_set method.
1614
+ # result = client.add_product_to_product_set request
1615
+ #
1616
+ # # The returned object is of type Google::Protobuf::Empty.
1617
+ # p result
1618
+ #
1348
1619
  def add_product_to_product_set request, options = nil
1349
1620
  raise ::ArgumentError, "request must be provided" if request.nil?
1350
1621
 
@@ -1416,6 +1687,22 @@ module Google
1416
1687
  # @return [::Google::Protobuf::Empty]
1417
1688
  #
1418
1689
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1690
+ #
1691
+ # @example Basic example
1692
+ # require "google/cloud/vision/v1p4beta1"
1693
+ #
1694
+ # # Create a client object. The client can be reused for multiple calls.
1695
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
1696
+ #
1697
+ # # Create a request. To set request fields, pass in keyword arguments.
1698
+ # request = Google::Cloud::Vision::V1p4beta1::RemoveProductFromProductSetRequest.new
1699
+ #
1700
+ # # Call the remove_product_from_product_set method.
1701
+ # result = client.remove_product_from_product_set request
1702
+ #
1703
+ # # The returned object is of type Google::Protobuf::Empty.
1704
+ # p result
1705
+ #
1419
1706
  def remove_product_from_product_set request, options = nil
1420
1707
  raise ::ArgumentError, "request must be provided" if request.nil?
1421
1708
 
@@ -1491,6 +1778,26 @@ module Google
1491
1778
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Vision::V1p4beta1::Product>]
1492
1779
  #
1493
1780
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1781
+ #
1782
+ # @example Basic example
1783
+ # require "google/cloud/vision/v1p4beta1"
1784
+ #
1785
+ # # Create a client object. The client can be reused for multiple calls.
1786
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
1787
+ #
1788
+ # # Create a request. To set request fields, pass in keyword arguments.
1789
+ # request = Google::Cloud::Vision::V1p4beta1::ListProductsInProductSetRequest.new
1790
+ #
1791
+ # # Call the list_products_in_product_set method.
1792
+ # result = client.list_products_in_product_set request
1793
+ #
1794
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1795
+ # # over elements, and API calls will be issued to fetch pages as needed.
1796
+ # result.each do |item|
1797
+ # # Each element is of type ::Google::Cloud::Vision::V1p4beta1::Product.
1798
+ # p item
1799
+ # end
1800
+ #
1494
1801
  def list_products_in_product_set request, options = nil
1495
1802
  raise ::ArgumentError, "request must be provided" if request.nil?
1496
1803
 
@@ -1568,6 +1875,29 @@ module Google
1568
1875
  # @return [::Gapic::Operation]
1569
1876
  #
1570
1877
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1878
+ #
1879
+ # @example Basic example
1880
+ # require "google/cloud/vision/v1p4beta1"
1881
+ #
1882
+ # # Create a client object. The client can be reused for multiple calls.
1883
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
1884
+ #
1885
+ # # Create a request. To set request fields, pass in keyword arguments.
1886
+ # request = Google::Cloud::Vision::V1p4beta1::ImportProductSetsRequest.new
1887
+ #
1888
+ # # Call the import_product_sets method.
1889
+ # result = client.import_product_sets request
1890
+ #
1891
+ # # The returned object is of type Gapic::Operation. You can use it to
1892
+ # # check the status of an operation, cancel it, or wait for results.
1893
+ # # Here is how to wait for a response.
1894
+ # result.wait_until_done! timeout: 60
1895
+ # if result.response?
1896
+ # p result.response
1897
+ # else
1898
+ # puts "No response received."
1899
+ # end
1900
+ #
1571
1901
  def import_product_sets request, options = nil
1572
1902
  raise ::ArgumentError, "request must be provided" if request.nil?
1573
1903
 
@@ -1664,6 +1994,29 @@ module Google
1664
1994
  # @return [::Gapic::Operation]
1665
1995
  #
1666
1996
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1997
+ #
1998
+ # @example Basic example
1999
+ # require "google/cloud/vision/v1p4beta1"
2000
+ #
2001
+ # # Create a client object. The client can be reused for multiple calls.
2002
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Rest::Client.new
2003
+ #
2004
+ # # Create a request. To set request fields, pass in keyword arguments.
2005
+ # request = Google::Cloud::Vision::V1p4beta1::PurgeProductsRequest.new
2006
+ #
2007
+ # # Call the purge_products method.
2008
+ # result = client.purge_products request
2009
+ #
2010
+ # # The returned object is of type Gapic::Operation. You can use it to
2011
+ # # check the status of an operation, cancel it, or wait for results.
2012
+ # # Here is how to wait for a response.
2013
+ # result.wait_until_done! timeout: 60
2014
+ # if result.response?
2015
+ # p result.response
2016
+ # else
2017
+ # puts "No response received."
2018
+ # end
2019
+ #
1667
2020
  def purge_products request, options = nil
1668
2021
  raise ::ArgumentError, "request must be provided" if request.nil?
1669
2022
 
@@ -1730,9 +2083,9 @@ module Google
1730
2083
  # end
1731
2084
  #
1732
2085
  # @!attribute [rw] endpoint
1733
- # The hostname or hostname:port of the service endpoint.
1734
- # Defaults to `"vision.googleapis.com"`.
1735
- # @return [::String]
2086
+ # A custom service endpoint, as a hostname or hostname:port. The default is
2087
+ # nil, indicating to use the default endpoint in the current universe domain.
2088
+ # @return [::String,nil]
1736
2089
  # @!attribute [rw] credentials
1737
2090
  # Credentials to send with calls. You may provide any of the following types:
1738
2091
  # * (`String`) The path to a service account key file in JSON format
@@ -1769,13 +2122,20 @@ module Google
1769
2122
  # @!attribute [rw] quota_project
1770
2123
  # A separate project against which to charge quota.
1771
2124
  # @return [::String]
2125
+ # @!attribute [rw] universe_domain
2126
+ # The universe domain within which to make requests. This determines the
2127
+ # default endpoint URL. The default value of nil uses the environment
2128
+ # universe (usually the default "googleapis.com" universe).
2129
+ # @return [::String,nil]
1772
2130
  #
1773
2131
  class Configuration
1774
2132
  extend ::Gapic::Config
1775
2133
 
2134
+ # @private
2135
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1776
2136
  DEFAULT_ENDPOINT = "vision.googleapis.com"
1777
2137
 
1778
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
2138
+ config_attr :endpoint, nil, ::String, nil
1779
2139
  config_attr :credentials, nil do |value|
1780
2140
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1781
2141
  allowed.any? { |klass| klass === value }
@@ -1787,6 +2147,7 @@ module Google
1787
2147
  config_attr :metadata, nil, ::Hash, nil
1788
2148
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1789
2149
  config_attr :quota_project, nil, ::String, nil
2150
+ config_attr :universe_domain, nil, ::String, nil
1790
2151
 
1791
2152
  # @private
1792
2153
  def initialize parent_config = nil