google-cloud-vision-v1p4beta1 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -306,6 +306,21 @@ module Google
306
306
  #
307
307
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
308
308
  #
309
+ # @example Basic example
310
+ # require "google/cloud/vision/v1p4beta1"
311
+ #
312
+ # # Create a client object. The client can be reused for multiple calls.
313
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
314
+ #
315
+ # # Create a request. To set request fields, pass in keyword arguments.
316
+ # request = Google::Cloud::Vision::V1p4beta1::CreateProductSetRequest.new
317
+ #
318
+ # # Call the create_product_set method.
319
+ # result = client.create_product_set request
320
+ #
321
+ # # The returned object is of type Google::Cloud::Vision::V1p4beta1::ProductSet.
322
+ # p result
323
+ #
309
324
  def create_product_set request, options = nil
310
325
  raise ::ArgumentError, "request must be provided" if request.nil?
311
326
 
@@ -323,9 +338,11 @@ module Google
323
338
  gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION
324
339
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
325
340
 
326
- header_params = {
327
- "parent" => request.parent
328
- }
341
+ header_params = {}
342
+ if request.parent
343
+ header_params["parent"] = request.parent
344
+ end
345
+
329
346
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
330
347
  metadata[:"x-goog-request-params"] ||= request_params_header
331
348
 
@@ -385,6 +402,27 @@ module Google
385
402
  #
386
403
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
387
404
  #
405
+ # @example Basic example
406
+ # require "google/cloud/vision/v1p4beta1"
407
+ #
408
+ # # Create a client object. The client can be reused for multiple calls.
409
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
410
+ #
411
+ # # Create a request. To set request fields, pass in keyword arguments.
412
+ # request = Google::Cloud::Vision::V1p4beta1::ListProductSetsRequest.new
413
+ #
414
+ # # Call the list_product_sets method.
415
+ # result = client.list_product_sets request
416
+ #
417
+ # # The returned object is of type Gapic::PagedEnumerable. You can
418
+ # # iterate over all elements by calling #each, and the enumerable
419
+ # # will lazily make API calls to fetch subsequent pages. Other
420
+ # # methods are also available for managing paging directly.
421
+ # result.each do |response|
422
+ # # Each element is of type ::Google::Cloud::Vision::V1p4beta1::ProductSet.
423
+ # p response
424
+ # end
425
+ #
388
426
  def list_product_sets request, options = nil
389
427
  raise ::ArgumentError, "request must be provided" if request.nil?
390
428
 
@@ -402,9 +440,11 @@ module Google
402
440
  gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION
403
441
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
404
442
 
405
- header_params = {
406
- "parent" => request.parent
407
- }
443
+ header_params = {}
444
+ if request.parent
445
+ header_params["parent"] = request.parent
446
+ end
447
+
408
448
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
409
449
  metadata[:"x-goog-request-params"] ||= request_params_header
410
450
 
@@ -461,6 +501,21 @@ module Google
461
501
  #
462
502
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
463
503
  #
504
+ # @example Basic example
505
+ # require "google/cloud/vision/v1p4beta1"
506
+ #
507
+ # # Create a client object. The client can be reused for multiple calls.
508
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
509
+ #
510
+ # # Create a request. To set request fields, pass in keyword arguments.
511
+ # request = Google::Cloud::Vision::V1p4beta1::GetProductSetRequest.new
512
+ #
513
+ # # Call the get_product_set method.
514
+ # result = client.get_product_set request
515
+ #
516
+ # # The returned object is of type Google::Cloud::Vision::V1p4beta1::ProductSet.
517
+ # p result
518
+ #
464
519
  def get_product_set request, options = nil
465
520
  raise ::ArgumentError, "request must be provided" if request.nil?
466
521
 
@@ -478,9 +533,11 @@ module Google
478
533
  gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION
479
534
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
480
535
 
481
- header_params = {
482
- "name" => request.name
483
- }
536
+ header_params = {}
537
+ if request.name
538
+ header_params["name"] = request.name
539
+ end
540
+
484
541
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
485
542
  metadata[:"x-goog-request-params"] ||= request_params_header
486
543
 
@@ -541,6 +598,21 @@ module Google
541
598
  #
542
599
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
543
600
  #
601
+ # @example Basic example
602
+ # require "google/cloud/vision/v1p4beta1"
603
+ #
604
+ # # Create a client object. The client can be reused for multiple calls.
605
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
606
+ #
607
+ # # Create a request. To set request fields, pass in keyword arguments.
608
+ # request = Google::Cloud::Vision::V1p4beta1::UpdateProductSetRequest.new
609
+ #
610
+ # # Call the update_product_set method.
611
+ # result = client.update_product_set request
612
+ #
613
+ # # The returned object is of type Google::Cloud::Vision::V1p4beta1::ProductSet.
614
+ # p result
615
+ #
544
616
  def update_product_set request, options = nil
545
617
  raise ::ArgumentError, "request must be provided" if request.nil?
546
618
 
@@ -558,9 +630,11 @@ module Google
558
630
  gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION
559
631
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
560
632
 
561
- header_params = {
562
- "product_set.name" => request.product_set.name
563
- }
633
+ header_params = {}
634
+ if request.product_set&.name
635
+ header_params["product_set.name"] = request.product_set.name
636
+ end
637
+
564
638
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
565
639
  metadata[:"x-goog-request-params"] ||= request_params_header
566
640
 
@@ -615,6 +689,21 @@ module Google
615
689
  #
616
690
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
617
691
  #
692
+ # @example Basic example
693
+ # require "google/cloud/vision/v1p4beta1"
694
+ #
695
+ # # Create a client object. The client can be reused for multiple calls.
696
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
697
+ #
698
+ # # Create a request. To set request fields, pass in keyword arguments.
699
+ # request = Google::Cloud::Vision::V1p4beta1::DeleteProductSetRequest.new
700
+ #
701
+ # # Call the delete_product_set method.
702
+ # result = client.delete_product_set request
703
+ #
704
+ # # The returned object is of type Google::Protobuf::Empty.
705
+ # p result
706
+ #
618
707
  def delete_product_set request, options = nil
619
708
  raise ::ArgumentError, "request must be provided" if request.nil?
620
709
 
@@ -632,9 +721,11 @@ module Google
632
721
  gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION
633
722
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
634
723
 
635
- header_params = {
636
- "name" => request.name
637
- }
724
+ header_params = {}
725
+ if request.name
726
+ header_params["name"] = request.name
727
+ end
728
+
638
729
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
639
730
  metadata[:"x-goog-request-params"] ||= request_params_header
640
731
 
@@ -700,6 +791,21 @@ module Google
700
791
  #
701
792
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
702
793
  #
794
+ # @example Basic example
795
+ # require "google/cloud/vision/v1p4beta1"
796
+ #
797
+ # # Create a client object. The client can be reused for multiple calls.
798
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
799
+ #
800
+ # # Create a request. To set request fields, pass in keyword arguments.
801
+ # request = Google::Cloud::Vision::V1p4beta1::CreateProductRequest.new
802
+ #
803
+ # # Call the create_product method.
804
+ # result = client.create_product request
805
+ #
806
+ # # The returned object is of type Google::Cloud::Vision::V1p4beta1::Product.
807
+ # p result
808
+ #
703
809
  def create_product request, options = nil
704
810
  raise ::ArgumentError, "request must be provided" if request.nil?
705
811
 
@@ -717,9 +823,11 @@ module Google
717
823
  gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION
718
824
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
719
825
 
720
- header_params = {
721
- "parent" => request.parent
722
- }
826
+ header_params = {}
827
+ if request.parent
828
+ header_params["parent"] = request.parent
829
+ end
830
+
723
831
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
724
832
  metadata[:"x-goog-request-params"] ||= request_params_header
725
833
 
@@ -779,6 +887,27 @@ module Google
779
887
  #
780
888
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
781
889
  #
890
+ # @example Basic example
891
+ # require "google/cloud/vision/v1p4beta1"
892
+ #
893
+ # # Create a client object. The client can be reused for multiple calls.
894
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
895
+ #
896
+ # # Create a request. To set request fields, pass in keyword arguments.
897
+ # request = Google::Cloud::Vision::V1p4beta1::ListProductsRequest.new
898
+ #
899
+ # # Call the list_products method.
900
+ # result = client.list_products request
901
+ #
902
+ # # The returned object is of type Gapic::PagedEnumerable. You can
903
+ # # iterate over all elements by calling #each, and the enumerable
904
+ # # will lazily make API calls to fetch subsequent pages. Other
905
+ # # methods are also available for managing paging directly.
906
+ # result.each do |response|
907
+ # # Each element is of type ::Google::Cloud::Vision::V1p4beta1::Product.
908
+ # p response
909
+ # end
910
+ #
782
911
  def list_products request, options = nil
783
912
  raise ::ArgumentError, "request must be provided" if request.nil?
784
913
 
@@ -796,9 +925,11 @@ module Google
796
925
  gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION
797
926
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
798
927
 
799
- header_params = {
800
- "parent" => request.parent
801
- }
928
+ header_params = {}
929
+ if request.parent
930
+ header_params["parent"] = request.parent
931
+ end
932
+
802
933
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
803
934
  metadata[:"x-goog-request-params"] ||= request_params_header
804
935
 
@@ -855,6 +986,21 @@ module Google
855
986
  #
856
987
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
857
988
  #
989
+ # @example Basic example
990
+ # require "google/cloud/vision/v1p4beta1"
991
+ #
992
+ # # Create a client object. The client can be reused for multiple calls.
993
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
994
+ #
995
+ # # Create a request. To set request fields, pass in keyword arguments.
996
+ # request = Google::Cloud::Vision::V1p4beta1::GetProductRequest.new
997
+ #
998
+ # # Call the get_product method.
999
+ # result = client.get_product request
1000
+ #
1001
+ # # The returned object is of type Google::Cloud::Vision::V1p4beta1::Product.
1002
+ # p result
1003
+ #
858
1004
  def get_product request, options = nil
859
1005
  raise ::ArgumentError, "request must be provided" if request.nil?
860
1006
 
@@ -872,9 +1018,11 @@ module Google
872
1018
  gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION
873
1019
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
874
1020
 
875
- header_params = {
876
- "name" => request.name
877
- }
1021
+ header_params = {}
1022
+ if request.name
1023
+ header_params["name"] = request.name
1024
+ end
1025
+
878
1026
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
879
1027
  metadata[:"x-goog-request-params"] ||= request_params_header
880
1028
 
@@ -944,6 +1092,21 @@ module Google
944
1092
  #
945
1093
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
946
1094
  #
1095
+ # @example Basic example
1096
+ # require "google/cloud/vision/v1p4beta1"
1097
+ #
1098
+ # # Create a client object. The client can be reused for multiple calls.
1099
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
1100
+ #
1101
+ # # Create a request. To set request fields, pass in keyword arguments.
1102
+ # request = Google::Cloud::Vision::V1p4beta1::UpdateProductRequest.new
1103
+ #
1104
+ # # Call the update_product method.
1105
+ # result = client.update_product request
1106
+ #
1107
+ # # The returned object is of type Google::Cloud::Vision::V1p4beta1::Product.
1108
+ # p result
1109
+ #
947
1110
  def update_product request, options = nil
948
1111
  raise ::ArgumentError, "request must be provided" if request.nil?
949
1112
 
@@ -961,9 +1124,11 @@ module Google
961
1124
  gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION
962
1125
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
963
1126
 
964
- header_params = {
965
- "product.name" => request.product.name
966
- }
1127
+ header_params = {}
1128
+ if request.product&.name
1129
+ header_params["product.name"] = request.product.name
1130
+ end
1131
+
967
1132
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
968
1133
  metadata[:"x-goog-request-params"] ||= request_params_header
969
1134
 
@@ -1019,6 +1184,21 @@ module Google
1019
1184
  #
1020
1185
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1021
1186
  #
1187
+ # @example Basic example
1188
+ # require "google/cloud/vision/v1p4beta1"
1189
+ #
1190
+ # # Create a client object. The client can be reused for multiple calls.
1191
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
1192
+ #
1193
+ # # Create a request. To set request fields, pass in keyword arguments.
1194
+ # request = Google::Cloud::Vision::V1p4beta1::DeleteProductRequest.new
1195
+ #
1196
+ # # Call the delete_product method.
1197
+ # result = client.delete_product request
1198
+ #
1199
+ # # The returned object is of type Google::Protobuf::Empty.
1200
+ # p result
1201
+ #
1022
1202
  def delete_product request, options = nil
1023
1203
  raise ::ArgumentError, "request must be provided" if request.nil?
1024
1204
 
@@ -1036,9 +1216,11 @@ module Google
1036
1216
  gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION
1037
1217
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1038
1218
 
1039
- header_params = {
1040
- "name" => request.name
1041
- }
1219
+ header_params = {}
1220
+ if request.name
1221
+ header_params["name"] = request.name
1222
+ end
1223
+
1042
1224
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1043
1225
  metadata[:"x-goog-request-params"] ||= request_params_header
1044
1226
 
@@ -1117,6 +1299,21 @@ module Google
1117
1299
  #
1118
1300
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1119
1301
  #
1302
+ # @example Basic example
1303
+ # require "google/cloud/vision/v1p4beta1"
1304
+ #
1305
+ # # Create a client object. The client can be reused for multiple calls.
1306
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
1307
+ #
1308
+ # # Create a request. To set request fields, pass in keyword arguments.
1309
+ # request = Google::Cloud::Vision::V1p4beta1::CreateReferenceImageRequest.new
1310
+ #
1311
+ # # Call the create_reference_image method.
1312
+ # result = client.create_reference_image request
1313
+ #
1314
+ # # The returned object is of type Google::Cloud::Vision::V1p4beta1::ReferenceImage.
1315
+ # p result
1316
+ #
1120
1317
  def create_reference_image request, options = nil
1121
1318
  raise ::ArgumentError, "request must be provided" if request.nil?
1122
1319
 
@@ -1134,9 +1331,11 @@ module Google
1134
1331
  gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION
1135
1332
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1136
1333
 
1137
- header_params = {
1138
- "parent" => request.parent
1139
- }
1334
+ header_params = {}
1335
+ if request.parent
1336
+ header_params["parent"] = request.parent
1337
+ end
1338
+
1140
1339
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1141
1340
  metadata[:"x-goog-request-params"] ||= request_params_header
1142
1341
 
@@ -1195,6 +1394,21 @@ module Google
1195
1394
  #
1196
1395
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1197
1396
  #
1397
+ # @example Basic example
1398
+ # require "google/cloud/vision/v1p4beta1"
1399
+ #
1400
+ # # Create a client object. The client can be reused for multiple calls.
1401
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
1402
+ #
1403
+ # # Create a request. To set request fields, pass in keyword arguments.
1404
+ # request = Google::Cloud::Vision::V1p4beta1::DeleteReferenceImageRequest.new
1405
+ #
1406
+ # # Call the delete_reference_image method.
1407
+ # result = client.delete_reference_image request
1408
+ #
1409
+ # # The returned object is of type Google::Protobuf::Empty.
1410
+ # p result
1411
+ #
1198
1412
  def delete_reference_image request, options = nil
1199
1413
  raise ::ArgumentError, "request must be provided" if request.nil?
1200
1414
 
@@ -1212,9 +1426,11 @@ module Google
1212
1426
  gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION
1213
1427
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1214
1428
 
1215
- header_params = {
1216
- "name" => request.name
1217
- }
1429
+ header_params = {}
1430
+ if request.name
1431
+ header_params["name"] = request.name
1432
+ end
1433
+
1218
1434
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1219
1435
  metadata[:"x-goog-request-params"] ||= request_params_header
1220
1436
 
@@ -1279,6 +1495,27 @@ module Google
1279
1495
  #
1280
1496
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1281
1497
  #
1498
+ # @example Basic example
1499
+ # require "google/cloud/vision/v1p4beta1"
1500
+ #
1501
+ # # Create a client object. The client can be reused for multiple calls.
1502
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
1503
+ #
1504
+ # # Create a request. To set request fields, pass in keyword arguments.
1505
+ # request = Google::Cloud::Vision::V1p4beta1::ListReferenceImagesRequest.new
1506
+ #
1507
+ # # Call the list_reference_images method.
1508
+ # result = client.list_reference_images request
1509
+ #
1510
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1511
+ # # iterate over all elements by calling #each, and the enumerable
1512
+ # # will lazily make API calls to fetch subsequent pages. Other
1513
+ # # methods are also available for managing paging directly.
1514
+ # result.each do |response|
1515
+ # # Each element is of type ::Google::Cloud::Vision::V1p4beta1::ReferenceImage.
1516
+ # p response
1517
+ # end
1518
+ #
1282
1519
  def list_reference_images request, options = nil
1283
1520
  raise ::ArgumentError, "request must be provided" if request.nil?
1284
1521
 
@@ -1296,9 +1533,11 @@ module Google
1296
1533
  gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION
1297
1534
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1298
1535
 
1299
- header_params = {
1300
- "parent" => request.parent
1301
- }
1536
+ header_params = {}
1537
+ if request.parent
1538
+ header_params["parent"] = request.parent
1539
+ end
1540
+
1302
1541
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1303
1542
  metadata[:"x-goog-request-params"] ||= request_params_header
1304
1543
 
@@ -1356,6 +1595,21 @@ module Google
1356
1595
  #
1357
1596
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1358
1597
  #
1598
+ # @example Basic example
1599
+ # require "google/cloud/vision/v1p4beta1"
1600
+ #
1601
+ # # Create a client object. The client can be reused for multiple calls.
1602
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
1603
+ #
1604
+ # # Create a request. To set request fields, pass in keyword arguments.
1605
+ # request = Google::Cloud::Vision::V1p4beta1::GetReferenceImageRequest.new
1606
+ #
1607
+ # # Call the get_reference_image method.
1608
+ # result = client.get_reference_image request
1609
+ #
1610
+ # # The returned object is of type Google::Cloud::Vision::V1p4beta1::ReferenceImage.
1611
+ # p result
1612
+ #
1359
1613
  def get_reference_image request, options = nil
1360
1614
  raise ::ArgumentError, "request must be provided" if request.nil?
1361
1615
 
@@ -1373,9 +1627,11 @@ module Google
1373
1627
  gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION
1374
1628
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1375
1629
 
1376
- header_params = {
1377
- "name" => request.name
1378
- }
1630
+ header_params = {}
1631
+ if request.name
1632
+ header_params["name"] = request.name
1633
+ end
1634
+
1379
1635
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1380
1636
  metadata[:"x-goog-request-params"] ||= request_params_header
1381
1637
 
@@ -1439,6 +1695,21 @@ module Google
1439
1695
  #
1440
1696
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1441
1697
  #
1698
+ # @example Basic example
1699
+ # require "google/cloud/vision/v1p4beta1"
1700
+ #
1701
+ # # Create a client object. The client can be reused for multiple calls.
1702
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
1703
+ #
1704
+ # # Create a request. To set request fields, pass in keyword arguments.
1705
+ # request = Google::Cloud::Vision::V1p4beta1::AddProductToProductSetRequest.new
1706
+ #
1707
+ # # Call the add_product_to_product_set method.
1708
+ # result = client.add_product_to_product_set request
1709
+ #
1710
+ # # The returned object is of type Google::Protobuf::Empty.
1711
+ # p result
1712
+ #
1442
1713
  def add_product_to_product_set request, options = nil
1443
1714
  raise ::ArgumentError, "request must be provided" if request.nil?
1444
1715
 
@@ -1456,9 +1727,11 @@ module Google
1456
1727
  gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION
1457
1728
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1458
1729
 
1459
- header_params = {
1460
- "name" => request.name
1461
- }
1730
+ header_params = {}
1731
+ if request.name
1732
+ header_params["name"] = request.name
1733
+ end
1734
+
1462
1735
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1463
1736
  metadata[:"x-goog-request-params"] ||= request_params_header
1464
1737
 
@@ -1516,6 +1789,21 @@ module Google
1516
1789
  #
1517
1790
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1518
1791
  #
1792
+ # @example Basic example
1793
+ # require "google/cloud/vision/v1p4beta1"
1794
+ #
1795
+ # # Create a client object. The client can be reused for multiple calls.
1796
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
1797
+ #
1798
+ # # Create a request. To set request fields, pass in keyword arguments.
1799
+ # request = Google::Cloud::Vision::V1p4beta1::RemoveProductFromProductSetRequest.new
1800
+ #
1801
+ # # Call the remove_product_from_product_set method.
1802
+ # result = client.remove_product_from_product_set request
1803
+ #
1804
+ # # The returned object is of type Google::Protobuf::Empty.
1805
+ # p result
1806
+ #
1519
1807
  def remove_product_from_product_set request, options = nil
1520
1808
  raise ::ArgumentError, "request must be provided" if request.nil?
1521
1809
 
@@ -1533,9 +1821,11 @@ module Google
1533
1821
  gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION
1534
1822
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1535
1823
 
1536
- header_params = {
1537
- "name" => request.name
1538
- }
1824
+ header_params = {}
1825
+ if request.name
1826
+ header_params["name"] = request.name
1827
+ end
1828
+
1539
1829
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1540
1830
  metadata[:"x-goog-request-params"] ||= request_params_header
1541
1831
 
@@ -1597,6 +1887,27 @@ module Google
1597
1887
  #
1598
1888
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1599
1889
  #
1890
+ # @example Basic example
1891
+ # require "google/cloud/vision/v1p4beta1"
1892
+ #
1893
+ # # Create a client object. The client can be reused for multiple calls.
1894
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
1895
+ #
1896
+ # # Create a request. To set request fields, pass in keyword arguments.
1897
+ # request = Google::Cloud::Vision::V1p4beta1::ListProductsInProductSetRequest.new
1898
+ #
1899
+ # # Call the list_products_in_product_set method.
1900
+ # result = client.list_products_in_product_set request
1901
+ #
1902
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1903
+ # # iterate over all elements by calling #each, and the enumerable
1904
+ # # will lazily make API calls to fetch subsequent pages. Other
1905
+ # # methods are also available for managing paging directly.
1906
+ # result.each do |response|
1907
+ # # Each element is of type ::Google::Cloud::Vision::V1p4beta1::Product.
1908
+ # p response
1909
+ # end
1910
+ #
1600
1911
  def list_products_in_product_set request, options = nil
1601
1912
  raise ::ArgumentError, "request must be provided" if request.nil?
1602
1913
 
@@ -1614,9 +1925,11 @@ module Google
1614
1925
  gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION
1615
1926
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1616
1927
 
1617
- header_params = {
1618
- "name" => request.name
1619
- }
1928
+ header_params = {}
1929
+ if request.name
1930
+ header_params["name"] = request.name
1931
+ end
1932
+
1620
1933
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1621
1934
  metadata[:"x-goog-request-params"] ||= request_params_header
1622
1935
 
@@ -1680,6 +1993,28 @@ module Google
1680
1993
  #
1681
1994
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1682
1995
  #
1996
+ # @example Basic example
1997
+ # require "google/cloud/vision/v1p4beta1"
1998
+ #
1999
+ # # Create a client object. The client can be reused for multiple calls.
2000
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
2001
+ #
2002
+ # # Create a request. To set request fields, pass in keyword arguments.
2003
+ # request = Google::Cloud::Vision::V1p4beta1::ImportProductSetsRequest.new
2004
+ #
2005
+ # # Call the import_product_sets method.
2006
+ # result = client.import_product_sets request
2007
+ #
2008
+ # # The returned object is of type Gapic::Operation. You can use this
2009
+ # # object to check the status of an operation, cancel it, or wait
2010
+ # # for results. Here is how to block until completion:
2011
+ # result.wait_until_done! timeout: 60
2012
+ # if result.response?
2013
+ # p result.response
2014
+ # else
2015
+ # puts "Error!"
2016
+ # end
2017
+ #
1683
2018
  def import_product_sets request, options = nil
1684
2019
  raise ::ArgumentError, "request must be provided" if request.nil?
1685
2020
 
@@ -1697,9 +2032,11 @@ module Google
1697
2032
  gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION
1698
2033
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1699
2034
 
1700
- header_params = {
1701
- "parent" => request.parent
1702
- }
2035
+ header_params = {}
2036
+ if request.parent
2037
+ header_params["parent"] = request.parent
2038
+ end
2039
+
1703
2040
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1704
2041
  metadata[:"x-goog-request-params"] ||= request_params_header
1705
2042
 
@@ -1782,6 +2119,28 @@ module Google
1782
2119
  #
1783
2120
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1784
2121
  #
2122
+ # @example Basic example
2123
+ # require "google/cloud/vision/v1p4beta1"
2124
+ #
2125
+ # # Create a client object. The client can be reused for multiple calls.
2126
+ # client = Google::Cloud::Vision::V1p4beta1::ProductSearch::Client.new
2127
+ #
2128
+ # # Create a request. To set request fields, pass in keyword arguments.
2129
+ # request = Google::Cloud::Vision::V1p4beta1::PurgeProductsRequest.new
2130
+ #
2131
+ # # Call the purge_products method.
2132
+ # result = client.purge_products request
2133
+ #
2134
+ # # The returned object is of type Gapic::Operation. You can use this
2135
+ # # object to check the status of an operation, cancel it, or wait
2136
+ # # for results. Here is how to block until completion:
2137
+ # result.wait_until_done! timeout: 60
2138
+ # if result.response?
2139
+ # p result.response
2140
+ # else
2141
+ # puts "Error!"
2142
+ # end
2143
+ #
1785
2144
  def purge_products request, options = nil
1786
2145
  raise ::ArgumentError, "request must be provided" if request.nil?
1787
2146
 
@@ -1799,9 +2158,11 @@ module Google
1799
2158
  gapic_version: ::Google::Cloud::Vision::V1p4beta1::VERSION
1800
2159
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1801
2160
 
1802
- header_params = {
1803
- "parent" => request.parent
1804
- }
2161
+ header_params = {}
2162
+ if request.parent
2163
+ header_params["parent"] = request.parent
2164
+ end
2165
+
1805
2166
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1806
2167
  metadata[:"x-goog-request-params"] ||= request_params_header
1807
2168