google-cloud-data_labeling-v1beta1 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -317,6 +317,21 @@ module Google
317
317
  #
318
318
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
319
319
  #
320
+ # @example Basic example
321
+ # require "google/cloud/data_labeling/v1beta1"
322
+ #
323
+ # # Create a client object. The client can be reused for multiple calls.
324
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
325
+ #
326
+ # # Create a request. To set request fields, pass in keyword arguments.
327
+ # request = Google::Cloud::DataLabeling::V1beta1::CreateDatasetRequest.new
328
+ #
329
+ # # Call the create_dataset method.
330
+ # result = client.create_dataset request
331
+ #
332
+ # # The returned object is of type Google::Cloud::DataLabeling::V1beta1::Dataset.
333
+ # p result
334
+ #
320
335
  def create_dataset request, options = nil
321
336
  raise ::ArgumentError, "request must be provided" if request.nil?
322
337
 
@@ -334,9 +349,11 @@ module Google
334
349
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
335
350
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
336
351
 
337
- header_params = {
338
- "parent" => request.parent
339
- }
352
+ header_params = {}
353
+ if request.parent
354
+ header_params["parent"] = request.parent
355
+ end
356
+
340
357
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
341
358
  metadata[:"x-goog-request-params"] ||= request_params_header
342
359
 
@@ -386,6 +403,21 @@ module Google
386
403
  #
387
404
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
388
405
  #
406
+ # @example Basic example
407
+ # require "google/cloud/data_labeling/v1beta1"
408
+ #
409
+ # # Create a client object. The client can be reused for multiple calls.
410
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
411
+ #
412
+ # # Create a request. To set request fields, pass in keyword arguments.
413
+ # request = Google::Cloud::DataLabeling::V1beta1::GetDatasetRequest.new
414
+ #
415
+ # # Call the get_dataset method.
416
+ # result = client.get_dataset request
417
+ #
418
+ # # The returned object is of type Google::Cloud::DataLabeling::V1beta1::Dataset.
419
+ # p result
420
+ #
389
421
  def get_dataset request, options = nil
390
422
  raise ::ArgumentError, "request must be provided" if request.nil?
391
423
 
@@ -403,9 +435,11 @@ module Google
403
435
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
404
436
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
405
437
 
406
- header_params = {
407
- "name" => request.name
408
- }
438
+ header_params = {}
439
+ if request.name
440
+ header_params["name"] = request.name
441
+ end
442
+
409
443
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
410
444
  metadata[:"x-goog-request-params"] ||= request_params_header
411
445
 
@@ -466,6 +500,27 @@ module Google
466
500
  #
467
501
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
468
502
  #
503
+ # @example Basic example
504
+ # require "google/cloud/data_labeling/v1beta1"
505
+ #
506
+ # # Create a client object. The client can be reused for multiple calls.
507
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
508
+ #
509
+ # # Create a request. To set request fields, pass in keyword arguments.
510
+ # request = Google::Cloud::DataLabeling::V1beta1::ListDatasetsRequest.new
511
+ #
512
+ # # Call the list_datasets method.
513
+ # result = client.list_datasets request
514
+ #
515
+ # # The returned object is of type Gapic::PagedEnumerable. You can
516
+ # # iterate over all elements by calling #each, and the enumerable
517
+ # # will lazily make API calls to fetch subsequent pages. Other
518
+ # # methods are also available for managing paging directly.
519
+ # result.each do |response|
520
+ # # Each element is of type ::Google::Cloud::DataLabeling::V1beta1::Dataset.
521
+ # p response
522
+ # end
523
+ #
469
524
  def list_datasets request, options = nil
470
525
  raise ::ArgumentError, "request must be provided" if request.nil?
471
526
 
@@ -483,9 +538,11 @@ module Google
483
538
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
484
539
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
485
540
 
486
- header_params = {
487
- "parent" => request.parent
488
- }
541
+ header_params = {}
542
+ if request.parent
543
+ header_params["parent"] = request.parent
544
+ end
545
+
489
546
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
490
547
  metadata[:"x-goog-request-params"] ||= request_params_header
491
548
 
@@ -536,6 +593,21 @@ module Google
536
593
  #
537
594
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
538
595
  #
596
+ # @example Basic example
597
+ # require "google/cloud/data_labeling/v1beta1"
598
+ #
599
+ # # Create a client object. The client can be reused for multiple calls.
600
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
601
+ #
602
+ # # Create a request. To set request fields, pass in keyword arguments.
603
+ # request = Google::Cloud::DataLabeling::V1beta1::DeleteDatasetRequest.new
604
+ #
605
+ # # Call the delete_dataset method.
606
+ # result = client.delete_dataset request
607
+ #
608
+ # # The returned object is of type Google::Protobuf::Empty.
609
+ # p result
610
+ #
539
611
  def delete_dataset request, options = nil
540
612
  raise ::ArgumentError, "request must be provided" if request.nil?
541
613
 
@@ -553,9 +625,11 @@ module Google
553
625
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
554
626
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
555
627
 
556
- header_params = {
557
- "name" => request.name
558
- }
628
+ header_params = {}
629
+ if request.name
630
+ header_params["name"] = request.name
631
+ end
632
+
559
633
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
560
634
  metadata[:"x-goog-request-params"] ||= request_params_header
561
635
 
@@ -614,6 +688,28 @@ module Google
614
688
  #
615
689
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
616
690
  #
691
+ # @example Basic example
692
+ # require "google/cloud/data_labeling/v1beta1"
693
+ #
694
+ # # Create a client object. The client can be reused for multiple calls.
695
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
696
+ #
697
+ # # Create a request. To set request fields, pass in keyword arguments.
698
+ # request = Google::Cloud::DataLabeling::V1beta1::ImportDataRequest.new
699
+ #
700
+ # # Call the import_data method.
701
+ # result = client.import_data request
702
+ #
703
+ # # The returned object is of type Gapic::Operation. You can use this
704
+ # # object to check the status of an operation, cancel it, or wait
705
+ # # for results. Here is how to block until completion:
706
+ # result.wait_until_done! timeout: 60
707
+ # if result.response?
708
+ # p result.response
709
+ # else
710
+ # puts "Error!"
711
+ # end
712
+ #
617
713
  def import_data request, options = nil
618
714
  raise ::ArgumentError, "request must be provided" if request.nil?
619
715
 
@@ -631,9 +727,11 @@ module Google
631
727
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
632
728
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
633
729
 
634
- header_params = {
635
- "name" => request.name
636
- }
730
+ header_params = {}
731
+ if request.name
732
+ header_params["name"] = request.name
733
+ end
734
+
637
735
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
638
736
  metadata[:"x-goog-request-params"] ||= request_params_header
639
737
 
@@ -697,6 +795,28 @@ module Google
697
795
  #
698
796
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
699
797
  #
798
+ # @example Basic example
799
+ # require "google/cloud/data_labeling/v1beta1"
800
+ #
801
+ # # Create a client object. The client can be reused for multiple calls.
802
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
803
+ #
804
+ # # Create a request. To set request fields, pass in keyword arguments.
805
+ # request = Google::Cloud::DataLabeling::V1beta1::ExportDataRequest.new
806
+ #
807
+ # # Call the export_data method.
808
+ # result = client.export_data request
809
+ #
810
+ # # The returned object is of type Gapic::Operation. You can use this
811
+ # # object to check the status of an operation, cancel it, or wait
812
+ # # for results. Here is how to block until completion:
813
+ # result.wait_until_done! timeout: 60
814
+ # if result.response?
815
+ # p result.response
816
+ # else
817
+ # puts "Error!"
818
+ # end
819
+ #
700
820
  def export_data request, options = nil
701
821
  raise ::ArgumentError, "request must be provided" if request.nil?
702
822
 
@@ -714,9 +834,11 @@ module Google
714
834
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
715
835
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
716
836
 
717
- header_params = {
718
- "name" => request.name
719
- }
837
+ header_params = {}
838
+ if request.name
839
+ header_params["name"] = request.name
840
+ end
841
+
720
842
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
721
843
  metadata[:"x-goog-request-params"] ||= request_params_header
722
844
 
@@ -768,6 +890,21 @@ module Google
768
890
  #
769
891
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
770
892
  #
893
+ # @example Basic example
894
+ # require "google/cloud/data_labeling/v1beta1"
895
+ #
896
+ # # Create a client object. The client can be reused for multiple calls.
897
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
898
+ #
899
+ # # Create a request. To set request fields, pass in keyword arguments.
900
+ # request = Google::Cloud::DataLabeling::V1beta1::GetDataItemRequest.new
901
+ #
902
+ # # Call the get_data_item method.
903
+ # result = client.get_data_item request
904
+ #
905
+ # # The returned object is of type Google::Cloud::DataLabeling::V1beta1::DataItem.
906
+ # p result
907
+ #
771
908
  def get_data_item request, options = nil
772
909
  raise ::ArgumentError, "request must be provided" if request.nil?
773
910
 
@@ -785,9 +922,11 @@ module Google
785
922
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
786
923
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
787
924
 
788
- header_params = {
789
- "name" => request.name
790
- }
925
+ header_params = {}
926
+ if request.name
927
+ header_params["name"] = request.name
928
+ end
929
+
791
930
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
792
931
  metadata[:"x-goog-request-params"] ||= request_params_header
793
932
 
@@ -849,6 +988,27 @@ module Google
849
988
  #
850
989
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
851
990
  #
991
+ # @example Basic example
992
+ # require "google/cloud/data_labeling/v1beta1"
993
+ #
994
+ # # Create a client object. The client can be reused for multiple calls.
995
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
996
+ #
997
+ # # Create a request. To set request fields, pass in keyword arguments.
998
+ # request = Google::Cloud::DataLabeling::V1beta1::ListDataItemsRequest.new
999
+ #
1000
+ # # Call the list_data_items method.
1001
+ # result = client.list_data_items request
1002
+ #
1003
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1004
+ # # iterate over all elements by calling #each, and the enumerable
1005
+ # # will lazily make API calls to fetch subsequent pages. Other
1006
+ # # methods are also available for managing paging directly.
1007
+ # result.each do |response|
1008
+ # # Each element is of type ::Google::Cloud::DataLabeling::V1beta1::DataItem.
1009
+ # p response
1010
+ # end
1011
+ #
852
1012
  def list_data_items request, options = nil
853
1013
  raise ::ArgumentError, "request must be provided" if request.nil?
854
1014
 
@@ -866,9 +1026,11 @@ module Google
866
1026
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
867
1027
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
868
1028
 
869
- header_params = {
870
- "parent" => request.parent
871
- }
1029
+ header_params = {}
1030
+ if request.parent
1031
+ header_params["parent"] = request.parent
1032
+ end
1033
+
872
1034
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
873
1035
  metadata[:"x-goog-request-params"] ||= request_params_header
874
1036
 
@@ -920,6 +1082,21 @@ module Google
920
1082
  #
921
1083
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
922
1084
  #
1085
+ # @example Basic example
1086
+ # require "google/cloud/data_labeling/v1beta1"
1087
+ #
1088
+ # # Create a client object. The client can be reused for multiple calls.
1089
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
1090
+ #
1091
+ # # Create a request. To set request fields, pass in keyword arguments.
1092
+ # request = Google::Cloud::DataLabeling::V1beta1::GetAnnotatedDatasetRequest.new
1093
+ #
1094
+ # # Call the get_annotated_dataset method.
1095
+ # result = client.get_annotated_dataset request
1096
+ #
1097
+ # # The returned object is of type Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset.
1098
+ # p result
1099
+ #
923
1100
  def get_annotated_dataset request, options = nil
924
1101
  raise ::ArgumentError, "request must be provided" if request.nil?
925
1102
 
@@ -937,9 +1114,11 @@ module Google
937
1114
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
938
1115
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
939
1116
 
940
- header_params = {
941
- "name" => request.name
942
- }
1117
+ header_params = {}
1118
+ if request.name
1119
+ header_params["name"] = request.name
1120
+ end
1121
+
943
1122
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
944
1123
  metadata[:"x-goog-request-params"] ||= request_params_header
945
1124
 
@@ -1000,6 +1179,27 @@ module Google
1000
1179
  #
1001
1180
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1002
1181
  #
1182
+ # @example Basic example
1183
+ # require "google/cloud/data_labeling/v1beta1"
1184
+ #
1185
+ # # Create a client object. The client can be reused for multiple calls.
1186
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
1187
+ #
1188
+ # # Create a request. To set request fields, pass in keyword arguments.
1189
+ # request = Google::Cloud::DataLabeling::V1beta1::ListAnnotatedDatasetsRequest.new
1190
+ #
1191
+ # # Call the list_annotated_datasets method.
1192
+ # result = client.list_annotated_datasets request
1193
+ #
1194
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1195
+ # # iterate over all elements by calling #each, and the enumerable
1196
+ # # will lazily make API calls to fetch subsequent pages. Other
1197
+ # # methods are also available for managing paging directly.
1198
+ # result.each do |response|
1199
+ # # Each element is of type ::Google::Cloud::DataLabeling::V1beta1::AnnotatedDataset.
1200
+ # p response
1201
+ # end
1202
+ #
1003
1203
  def list_annotated_datasets request, options = nil
1004
1204
  raise ::ArgumentError, "request must be provided" if request.nil?
1005
1205
 
@@ -1017,9 +1217,11 @@ module Google
1017
1217
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
1018
1218
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1019
1219
 
1020
- header_params = {
1021
- "parent" => request.parent
1022
- }
1220
+ header_params = {}
1221
+ if request.parent
1222
+ header_params["parent"] = request.parent
1223
+ end
1224
+
1023
1225
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1024
1226
  metadata[:"x-goog-request-params"] ||= request_params_header
1025
1227
 
@@ -1071,6 +1273,21 @@ module Google
1071
1273
  #
1072
1274
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1073
1275
  #
1276
+ # @example Basic example
1277
+ # require "google/cloud/data_labeling/v1beta1"
1278
+ #
1279
+ # # Create a client object. The client can be reused for multiple calls.
1280
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
1281
+ #
1282
+ # # Create a request. To set request fields, pass in keyword arguments.
1283
+ # request = Google::Cloud::DataLabeling::V1beta1::DeleteAnnotatedDatasetRequest.new
1284
+ #
1285
+ # # Call the delete_annotated_dataset method.
1286
+ # result = client.delete_annotated_dataset request
1287
+ #
1288
+ # # The returned object is of type Google::Protobuf::Empty.
1289
+ # p result
1290
+ #
1074
1291
  def delete_annotated_dataset request, options = nil
1075
1292
  raise ::ArgumentError, "request must be provided" if request.nil?
1076
1293
 
@@ -1088,9 +1305,11 @@ module Google
1088
1305
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
1089
1306
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1090
1307
 
1091
- header_params = {
1092
- "name" => request.name
1093
- }
1308
+ header_params = {}
1309
+ if request.name
1310
+ header_params["name"] = request.name
1311
+ end
1312
+
1094
1313
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1095
1314
  metadata[:"x-goog-request-params"] ||= request_params_header
1096
1315
 
@@ -1161,6 +1380,28 @@ module Google
1161
1380
  #
1162
1381
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1163
1382
  #
1383
+ # @example Basic example
1384
+ # require "google/cloud/data_labeling/v1beta1"
1385
+ #
1386
+ # # Create a client object. The client can be reused for multiple calls.
1387
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
1388
+ #
1389
+ # # Create a request. To set request fields, pass in keyword arguments.
1390
+ # request = Google::Cloud::DataLabeling::V1beta1::LabelImageRequest.new
1391
+ #
1392
+ # # Call the label_image method.
1393
+ # result = client.label_image request
1394
+ #
1395
+ # # The returned object is of type Gapic::Operation. You can use this
1396
+ # # object to check the status of an operation, cancel it, or wait
1397
+ # # for results. Here is how to block until completion:
1398
+ # result.wait_until_done! timeout: 60
1399
+ # if result.response?
1400
+ # p result.response
1401
+ # else
1402
+ # puts "Error!"
1403
+ # end
1404
+ #
1164
1405
  def label_image request, options = nil
1165
1406
  raise ::ArgumentError, "request must be provided" if request.nil?
1166
1407
 
@@ -1178,9 +1419,11 @@ module Google
1178
1419
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
1179
1420
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1180
1421
 
1181
- header_params = {
1182
- "parent" => request.parent
1183
- }
1422
+ header_params = {}
1423
+ if request.parent
1424
+ header_params["parent"] = request.parent
1425
+ end
1426
+
1184
1427
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1185
1428
  metadata[:"x-goog-request-params"] ||= request_params_header
1186
1429
 
@@ -1252,6 +1495,28 @@ module Google
1252
1495
  #
1253
1496
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1254
1497
  #
1498
+ # @example Basic example
1499
+ # require "google/cloud/data_labeling/v1beta1"
1500
+ #
1501
+ # # Create a client object. The client can be reused for multiple calls.
1502
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
1503
+ #
1504
+ # # Create a request. To set request fields, pass in keyword arguments.
1505
+ # request = Google::Cloud::DataLabeling::V1beta1::LabelVideoRequest.new
1506
+ #
1507
+ # # Call the label_video method.
1508
+ # result = client.label_video request
1509
+ #
1510
+ # # The returned object is of type Gapic::Operation. You can use this
1511
+ # # object to check the status of an operation, cancel it, or wait
1512
+ # # for results. Here is how to block until completion:
1513
+ # result.wait_until_done! timeout: 60
1514
+ # if result.response?
1515
+ # p result.response
1516
+ # else
1517
+ # puts "Error!"
1518
+ # end
1519
+ #
1255
1520
  def label_video request, options = nil
1256
1521
  raise ::ArgumentError, "request must be provided" if request.nil?
1257
1522
 
@@ -1269,9 +1534,11 @@ module Google
1269
1534
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
1270
1535
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1271
1536
 
1272
- header_params = {
1273
- "parent" => request.parent
1274
- }
1537
+ header_params = {}
1538
+ if request.parent
1539
+ header_params["parent"] = request.parent
1540
+ end
1541
+
1275
1542
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1276
1543
  metadata[:"x-goog-request-params"] ||= request_params_header
1277
1544
 
@@ -1335,6 +1602,28 @@ module Google
1335
1602
  #
1336
1603
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1337
1604
  #
1605
+ # @example Basic example
1606
+ # require "google/cloud/data_labeling/v1beta1"
1607
+ #
1608
+ # # Create a client object. The client can be reused for multiple calls.
1609
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
1610
+ #
1611
+ # # Create a request. To set request fields, pass in keyword arguments.
1612
+ # request = Google::Cloud::DataLabeling::V1beta1::LabelTextRequest.new
1613
+ #
1614
+ # # Call the label_text method.
1615
+ # result = client.label_text request
1616
+ #
1617
+ # # The returned object is of type Gapic::Operation. You can use this
1618
+ # # object to check the status of an operation, cancel it, or wait
1619
+ # # for results. Here is how to block until completion:
1620
+ # result.wait_until_done! timeout: 60
1621
+ # if result.response?
1622
+ # p result.response
1623
+ # else
1624
+ # puts "Error!"
1625
+ # end
1626
+ #
1338
1627
  def label_text request, options = nil
1339
1628
  raise ::ArgumentError, "request must be provided" if request.nil?
1340
1629
 
@@ -1352,9 +1641,11 @@ module Google
1352
1641
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
1353
1642
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1354
1643
 
1355
- header_params = {
1356
- "parent" => request.parent
1357
- }
1644
+ header_params = {}
1645
+ if request.parent
1646
+ header_params["parent"] = request.parent
1647
+ end
1648
+
1358
1649
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1359
1650
  metadata[:"x-goog-request-params"] ||= request_params_header
1360
1651
 
@@ -1410,6 +1701,21 @@ module Google
1410
1701
  #
1411
1702
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1412
1703
  #
1704
+ # @example Basic example
1705
+ # require "google/cloud/data_labeling/v1beta1"
1706
+ #
1707
+ # # Create a client object. The client can be reused for multiple calls.
1708
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
1709
+ #
1710
+ # # Create a request. To set request fields, pass in keyword arguments.
1711
+ # request = Google::Cloud::DataLabeling::V1beta1::GetExampleRequest.new
1712
+ #
1713
+ # # Call the get_example method.
1714
+ # result = client.get_example request
1715
+ #
1716
+ # # The returned object is of type Google::Cloud::DataLabeling::V1beta1::Example.
1717
+ # p result
1718
+ #
1413
1719
  def get_example request, options = nil
1414
1720
  raise ::ArgumentError, "request must be provided" if request.nil?
1415
1721
 
@@ -1427,9 +1733,11 @@ module Google
1427
1733
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
1428
1734
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1429
1735
 
1430
- header_params = {
1431
- "name" => request.name
1432
- }
1736
+ header_params = {}
1737
+ if request.name
1738
+ header_params["name"] = request.name
1739
+ end
1740
+
1433
1741
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1434
1742
  metadata[:"x-goog-request-params"] ||= request_params_header
1435
1743
 
@@ -1492,6 +1800,27 @@ module Google
1492
1800
  #
1493
1801
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1494
1802
  #
1803
+ # @example Basic example
1804
+ # require "google/cloud/data_labeling/v1beta1"
1805
+ #
1806
+ # # Create a client object. The client can be reused for multiple calls.
1807
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
1808
+ #
1809
+ # # Create a request. To set request fields, pass in keyword arguments.
1810
+ # request = Google::Cloud::DataLabeling::V1beta1::ListExamplesRequest.new
1811
+ #
1812
+ # # Call the list_examples method.
1813
+ # result = client.list_examples request
1814
+ #
1815
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1816
+ # # iterate over all elements by calling #each, and the enumerable
1817
+ # # will lazily make API calls to fetch subsequent pages. Other
1818
+ # # methods are also available for managing paging directly.
1819
+ # result.each do |response|
1820
+ # # Each element is of type ::Google::Cloud::DataLabeling::V1beta1::Example.
1821
+ # p response
1822
+ # end
1823
+ #
1495
1824
  def list_examples request, options = nil
1496
1825
  raise ::ArgumentError, "request must be provided" if request.nil?
1497
1826
 
@@ -1509,9 +1838,11 @@ module Google
1509
1838
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
1510
1839
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1511
1840
 
1512
- header_params = {
1513
- "parent" => request.parent
1514
- }
1841
+ header_params = {}
1842
+ if request.parent
1843
+ header_params["parent"] = request.parent
1844
+ end
1845
+
1515
1846
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1516
1847
  metadata[:"x-goog-request-params"] ||= request_params_header
1517
1848
 
@@ -1566,6 +1897,21 @@ module Google
1566
1897
  #
1567
1898
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1568
1899
  #
1900
+ # @example Basic example
1901
+ # require "google/cloud/data_labeling/v1beta1"
1902
+ #
1903
+ # # Create a client object. The client can be reused for multiple calls.
1904
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
1905
+ #
1906
+ # # Create a request. To set request fields, pass in keyword arguments.
1907
+ # request = Google::Cloud::DataLabeling::V1beta1::CreateAnnotationSpecSetRequest.new
1908
+ #
1909
+ # # Call the create_annotation_spec_set method.
1910
+ # result = client.create_annotation_spec_set request
1911
+ #
1912
+ # # The returned object is of type Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet.
1913
+ # p result
1914
+ #
1569
1915
  def create_annotation_spec_set request, options = nil
1570
1916
  raise ::ArgumentError, "request must be provided" if request.nil?
1571
1917
 
@@ -1583,9 +1929,11 @@ module Google
1583
1929
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
1584
1930
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1585
1931
 
1586
- header_params = {
1587
- "parent" => request.parent
1588
- }
1932
+ header_params = {}
1933
+ if request.parent
1934
+ header_params["parent"] = request.parent
1935
+ end
1936
+
1589
1937
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1590
1938
  metadata[:"x-goog-request-params"] ||= request_params_header
1591
1939
 
@@ -1635,6 +1983,21 @@ module Google
1635
1983
  #
1636
1984
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1637
1985
  #
1986
+ # @example Basic example
1987
+ # require "google/cloud/data_labeling/v1beta1"
1988
+ #
1989
+ # # Create a client object. The client can be reused for multiple calls.
1990
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
1991
+ #
1992
+ # # Create a request. To set request fields, pass in keyword arguments.
1993
+ # request = Google::Cloud::DataLabeling::V1beta1::GetAnnotationSpecSetRequest.new
1994
+ #
1995
+ # # Call the get_annotation_spec_set method.
1996
+ # result = client.get_annotation_spec_set request
1997
+ #
1998
+ # # The returned object is of type Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet.
1999
+ # p result
2000
+ #
1638
2001
  def get_annotation_spec_set request, options = nil
1639
2002
  raise ::ArgumentError, "request must be provided" if request.nil?
1640
2003
 
@@ -1652,9 +2015,11 @@ module Google
1652
2015
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
1653
2016
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1654
2017
 
1655
- header_params = {
1656
- "name" => request.name
1657
- }
2018
+ header_params = {}
2019
+ if request.name
2020
+ header_params["name"] = request.name
2021
+ end
2022
+
1658
2023
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1659
2024
  metadata[:"x-goog-request-params"] ||= request_params_header
1660
2025
 
@@ -1715,6 +2080,27 @@ module Google
1715
2080
  #
1716
2081
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1717
2082
  #
2083
+ # @example Basic example
2084
+ # require "google/cloud/data_labeling/v1beta1"
2085
+ #
2086
+ # # Create a client object. The client can be reused for multiple calls.
2087
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
2088
+ #
2089
+ # # Create a request. To set request fields, pass in keyword arguments.
2090
+ # request = Google::Cloud::DataLabeling::V1beta1::ListAnnotationSpecSetsRequest.new
2091
+ #
2092
+ # # Call the list_annotation_spec_sets method.
2093
+ # result = client.list_annotation_spec_sets request
2094
+ #
2095
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2096
+ # # iterate over all elements by calling #each, and the enumerable
2097
+ # # will lazily make API calls to fetch subsequent pages. Other
2098
+ # # methods are also available for managing paging directly.
2099
+ # result.each do |response|
2100
+ # # Each element is of type ::Google::Cloud::DataLabeling::V1beta1::AnnotationSpecSet.
2101
+ # p response
2102
+ # end
2103
+ #
1718
2104
  def list_annotation_spec_sets request, options = nil
1719
2105
  raise ::ArgumentError, "request must be provided" if request.nil?
1720
2106
 
@@ -1732,9 +2118,11 @@ module Google
1732
2118
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
1733
2119
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1734
2120
 
1735
- header_params = {
1736
- "parent" => request.parent
1737
- }
2121
+ header_params = {}
2122
+ if request.parent
2123
+ header_params["parent"] = request.parent
2124
+ end
2125
+
1738
2126
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1739
2127
  metadata[:"x-goog-request-params"] ||= request_params_header
1740
2128
 
@@ -1785,6 +2173,21 @@ module Google
1785
2173
  #
1786
2174
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1787
2175
  #
2176
+ # @example Basic example
2177
+ # require "google/cloud/data_labeling/v1beta1"
2178
+ #
2179
+ # # Create a client object. The client can be reused for multiple calls.
2180
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
2181
+ #
2182
+ # # Create a request. To set request fields, pass in keyword arguments.
2183
+ # request = Google::Cloud::DataLabeling::V1beta1::DeleteAnnotationSpecSetRequest.new
2184
+ #
2185
+ # # Call the delete_annotation_spec_set method.
2186
+ # result = client.delete_annotation_spec_set request
2187
+ #
2188
+ # # The returned object is of type Google::Protobuf::Empty.
2189
+ # p result
2190
+ #
1788
2191
  def delete_annotation_spec_set request, options = nil
1789
2192
  raise ::ArgumentError, "request must be provided" if request.nil?
1790
2193
 
@@ -1802,9 +2205,11 @@ module Google
1802
2205
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
1803
2206
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1804
2207
 
1805
- header_params = {
1806
- "name" => request.name
1807
- }
2208
+ header_params = {}
2209
+ if request.name
2210
+ header_params["name"] = request.name
2211
+ end
2212
+
1808
2213
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1809
2214
  metadata[:"x-goog-request-params"] ||= request_params_header
1810
2215
 
@@ -1856,6 +2261,28 @@ module Google
1856
2261
  #
1857
2262
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1858
2263
  #
2264
+ # @example Basic example
2265
+ # require "google/cloud/data_labeling/v1beta1"
2266
+ #
2267
+ # # Create a client object. The client can be reused for multiple calls.
2268
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
2269
+ #
2270
+ # # Create a request. To set request fields, pass in keyword arguments.
2271
+ # request = Google::Cloud::DataLabeling::V1beta1::CreateInstructionRequest.new
2272
+ #
2273
+ # # Call the create_instruction method.
2274
+ # result = client.create_instruction request
2275
+ #
2276
+ # # The returned object is of type Gapic::Operation. You can use this
2277
+ # # object to check the status of an operation, cancel it, or wait
2278
+ # # for results. Here is how to block until completion:
2279
+ # result.wait_until_done! timeout: 60
2280
+ # if result.response?
2281
+ # p result.response
2282
+ # else
2283
+ # puts "Error!"
2284
+ # end
2285
+ #
1859
2286
  def create_instruction request, options = nil
1860
2287
  raise ::ArgumentError, "request must be provided" if request.nil?
1861
2288
 
@@ -1873,9 +2300,11 @@ module Google
1873
2300
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
1874
2301
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1875
2302
 
1876
- header_params = {
1877
- "parent" => request.parent
1878
- }
2303
+ header_params = {}
2304
+ if request.parent
2305
+ header_params["parent"] = request.parent
2306
+ end
2307
+
1879
2308
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1880
2309
  metadata[:"x-goog-request-params"] ||= request_params_header
1881
2310
 
@@ -1926,6 +2355,21 @@ module Google
1926
2355
  #
1927
2356
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1928
2357
  #
2358
+ # @example Basic example
2359
+ # require "google/cloud/data_labeling/v1beta1"
2360
+ #
2361
+ # # Create a client object. The client can be reused for multiple calls.
2362
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
2363
+ #
2364
+ # # Create a request. To set request fields, pass in keyword arguments.
2365
+ # request = Google::Cloud::DataLabeling::V1beta1::GetInstructionRequest.new
2366
+ #
2367
+ # # Call the get_instruction method.
2368
+ # result = client.get_instruction request
2369
+ #
2370
+ # # The returned object is of type Google::Cloud::DataLabeling::V1beta1::Instruction.
2371
+ # p result
2372
+ #
1929
2373
  def get_instruction request, options = nil
1930
2374
  raise ::ArgumentError, "request must be provided" if request.nil?
1931
2375
 
@@ -1943,9 +2387,11 @@ module Google
1943
2387
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
1944
2388
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1945
2389
 
1946
- header_params = {
1947
- "name" => request.name
1948
- }
2390
+ header_params = {}
2391
+ if request.name
2392
+ header_params["name"] = request.name
2393
+ end
2394
+
1949
2395
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1950
2396
  metadata[:"x-goog-request-params"] ||= request_params_header
1951
2397
 
@@ -2006,6 +2452,27 @@ module Google
2006
2452
  #
2007
2453
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2008
2454
  #
2455
+ # @example Basic example
2456
+ # require "google/cloud/data_labeling/v1beta1"
2457
+ #
2458
+ # # Create a client object. The client can be reused for multiple calls.
2459
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
2460
+ #
2461
+ # # Create a request. To set request fields, pass in keyword arguments.
2462
+ # request = Google::Cloud::DataLabeling::V1beta1::ListInstructionsRequest.new
2463
+ #
2464
+ # # Call the list_instructions method.
2465
+ # result = client.list_instructions request
2466
+ #
2467
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2468
+ # # iterate over all elements by calling #each, and the enumerable
2469
+ # # will lazily make API calls to fetch subsequent pages. Other
2470
+ # # methods are also available for managing paging directly.
2471
+ # result.each do |response|
2472
+ # # Each element is of type ::Google::Cloud::DataLabeling::V1beta1::Instruction.
2473
+ # p response
2474
+ # end
2475
+ #
2009
2476
  def list_instructions request, options = nil
2010
2477
  raise ::ArgumentError, "request must be provided" if request.nil?
2011
2478
 
@@ -2023,9 +2490,11 @@ module Google
2023
2490
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
2024
2491
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2025
2492
 
2026
- header_params = {
2027
- "parent" => request.parent
2028
- }
2493
+ header_params = {}
2494
+ if request.parent
2495
+ header_params["parent"] = request.parent
2496
+ end
2497
+
2029
2498
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2030
2499
  metadata[:"x-goog-request-params"] ||= request_params_header
2031
2500
 
@@ -2076,6 +2545,21 @@ module Google
2076
2545
  #
2077
2546
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2078
2547
  #
2548
+ # @example Basic example
2549
+ # require "google/cloud/data_labeling/v1beta1"
2550
+ #
2551
+ # # Create a client object. The client can be reused for multiple calls.
2552
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
2553
+ #
2554
+ # # Create a request. To set request fields, pass in keyword arguments.
2555
+ # request = Google::Cloud::DataLabeling::V1beta1::DeleteInstructionRequest.new
2556
+ #
2557
+ # # Call the delete_instruction method.
2558
+ # result = client.delete_instruction request
2559
+ #
2560
+ # # The returned object is of type Google::Protobuf::Empty.
2561
+ # p result
2562
+ #
2079
2563
  def delete_instruction request, options = nil
2080
2564
  raise ::ArgumentError, "request must be provided" if request.nil?
2081
2565
 
@@ -2093,9 +2577,11 @@ module Google
2093
2577
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
2094
2578
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2095
2579
 
2096
- header_params = {
2097
- "name" => request.name
2098
- }
2580
+ header_params = {}
2581
+ if request.name
2582
+ header_params["name"] = request.name
2583
+ end
2584
+
2099
2585
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2100
2586
  metadata[:"x-goog-request-params"] ||= request_params_header
2101
2587
 
@@ -2147,6 +2633,21 @@ module Google
2147
2633
  #
2148
2634
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2149
2635
  #
2636
+ # @example Basic example
2637
+ # require "google/cloud/data_labeling/v1beta1"
2638
+ #
2639
+ # # Create a client object. The client can be reused for multiple calls.
2640
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
2641
+ #
2642
+ # # Create a request. To set request fields, pass in keyword arguments.
2643
+ # request = Google::Cloud::DataLabeling::V1beta1::GetEvaluationRequest.new
2644
+ #
2645
+ # # Call the get_evaluation method.
2646
+ # result = client.get_evaluation request
2647
+ #
2648
+ # # The returned object is of type Google::Cloud::DataLabeling::V1beta1::Evaluation.
2649
+ # p result
2650
+ #
2150
2651
  def get_evaluation request, options = nil
2151
2652
  raise ::ArgumentError, "request must be provided" if request.nil?
2152
2653
 
@@ -2164,9 +2665,11 @@ module Google
2164
2665
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
2165
2666
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2166
2667
 
2167
- header_params = {
2168
- "name" => request.name
2169
- }
2668
+ header_params = {}
2669
+ if request.name
2670
+ header_params["name"] = request.name
2671
+ end
2672
+
2170
2673
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2171
2674
  metadata[:"x-goog-request-params"] ||= request_params_header
2172
2675
 
@@ -2259,6 +2762,27 @@ module Google
2259
2762
  #
2260
2763
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2261
2764
  #
2765
+ # @example Basic example
2766
+ # require "google/cloud/data_labeling/v1beta1"
2767
+ #
2768
+ # # Create a client object. The client can be reused for multiple calls.
2769
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
2770
+ #
2771
+ # # Create a request. To set request fields, pass in keyword arguments.
2772
+ # request = Google::Cloud::DataLabeling::V1beta1::SearchEvaluationsRequest.new
2773
+ #
2774
+ # # Call the search_evaluations method.
2775
+ # result = client.search_evaluations request
2776
+ #
2777
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2778
+ # # iterate over all elements by calling #each, and the enumerable
2779
+ # # will lazily make API calls to fetch subsequent pages. Other
2780
+ # # methods are also available for managing paging directly.
2781
+ # result.each do |response|
2782
+ # # Each element is of type ::Google::Cloud::DataLabeling::V1beta1::Evaluation.
2783
+ # p response
2784
+ # end
2785
+ #
2262
2786
  def search_evaluations request, options = nil
2263
2787
  raise ::ArgumentError, "request must be provided" if request.nil?
2264
2788
 
@@ -2276,9 +2800,11 @@ module Google
2276
2800
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
2277
2801
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2278
2802
 
2279
- header_params = {
2280
- "parent" => request.parent
2281
- }
2803
+ header_params = {}
2804
+ if request.parent
2805
+ header_params["parent"] = request.parent
2806
+ end
2807
+
2282
2808
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2283
2809
  metadata[:"x-goog-request-params"] ||= request_params_header
2284
2810
 
@@ -2344,6 +2870,27 @@ module Google
2344
2870
  #
2345
2871
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2346
2872
  #
2873
+ # @example Basic example
2874
+ # require "google/cloud/data_labeling/v1beta1"
2875
+ #
2876
+ # # Create a client object. The client can be reused for multiple calls.
2877
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
2878
+ #
2879
+ # # Create a request. To set request fields, pass in keyword arguments.
2880
+ # request = Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsRequest.new
2881
+ #
2882
+ # # Call the search_example_comparisons method.
2883
+ # result = client.search_example_comparisons request
2884
+ #
2885
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2886
+ # # iterate over all elements by calling #each, and the enumerable
2887
+ # # will lazily make API calls to fetch subsequent pages. Other
2888
+ # # methods are also available for managing paging directly.
2889
+ # result.each do |response|
2890
+ # # Each element is of type ::Google::Cloud::DataLabeling::V1beta1::SearchExampleComparisonsResponse::ExampleComparison.
2891
+ # p response
2892
+ # end
2893
+ #
2347
2894
  def search_example_comparisons request, options = nil
2348
2895
  raise ::ArgumentError, "request must be provided" if request.nil?
2349
2896
 
@@ -2361,9 +2908,11 @@ module Google
2361
2908
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
2362
2909
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2363
2910
 
2364
- header_params = {
2365
- "parent" => request.parent
2366
- }
2911
+ header_params = {}
2912
+ if request.parent
2913
+ header_params["parent"] = request.parent
2914
+ end
2915
+
2367
2916
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2368
2917
  metadata[:"x-goog-request-params"] ||= request_params_header
2369
2918
 
@@ -2416,6 +2965,21 @@ module Google
2416
2965
  #
2417
2966
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2418
2967
  #
2968
+ # @example Basic example
2969
+ # require "google/cloud/data_labeling/v1beta1"
2970
+ #
2971
+ # # Create a client object. The client can be reused for multiple calls.
2972
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
2973
+ #
2974
+ # # Create a request. To set request fields, pass in keyword arguments.
2975
+ # request = Google::Cloud::DataLabeling::V1beta1::CreateEvaluationJobRequest.new
2976
+ #
2977
+ # # Call the create_evaluation_job method.
2978
+ # result = client.create_evaluation_job request
2979
+ #
2980
+ # # The returned object is of type Google::Cloud::DataLabeling::V1beta1::EvaluationJob.
2981
+ # p result
2982
+ #
2419
2983
  def create_evaluation_job request, options = nil
2420
2984
  raise ::ArgumentError, "request must be provided" if request.nil?
2421
2985
 
@@ -2433,9 +2997,11 @@ module Google
2433
2997
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
2434
2998
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2435
2999
 
2436
- header_params = {
2437
- "parent" => request.parent
2438
- }
3000
+ header_params = {}
3001
+ if request.parent
3002
+ header_params["parent"] = request.parent
3003
+ end
3004
+
2439
3005
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2440
3006
  metadata[:"x-goog-request-params"] ||= request_params_header
2441
3007
 
@@ -2499,6 +3065,21 @@ module Google
2499
3065
  #
2500
3066
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2501
3067
  #
3068
+ # @example Basic example
3069
+ # require "google/cloud/data_labeling/v1beta1"
3070
+ #
3071
+ # # Create a client object. The client can be reused for multiple calls.
3072
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
3073
+ #
3074
+ # # Create a request. To set request fields, pass in keyword arguments.
3075
+ # request = Google::Cloud::DataLabeling::V1beta1::UpdateEvaluationJobRequest.new
3076
+ #
3077
+ # # Call the update_evaluation_job method.
3078
+ # result = client.update_evaluation_job request
3079
+ #
3080
+ # # The returned object is of type Google::Cloud::DataLabeling::V1beta1::EvaluationJob.
3081
+ # p result
3082
+ #
2502
3083
  def update_evaluation_job request, options = nil
2503
3084
  raise ::ArgumentError, "request must be provided" if request.nil?
2504
3085
 
@@ -2516,9 +3097,11 @@ module Google
2516
3097
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
2517
3098
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2518
3099
 
2519
- header_params = {
2520
- "evaluation_job.name" => request.evaluation_job.name
2521
- }
3100
+ header_params = {}
3101
+ if request.evaluation_job&.name
3102
+ header_params["evaluation_job.name"] = request.evaluation_job.name
3103
+ end
3104
+
2522
3105
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2523
3106
  metadata[:"x-goog-request-params"] ||= request_params_header
2524
3107
 
@@ -2569,6 +3152,21 @@ module Google
2569
3152
  #
2570
3153
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2571
3154
  #
3155
+ # @example Basic example
3156
+ # require "google/cloud/data_labeling/v1beta1"
3157
+ #
3158
+ # # Create a client object. The client can be reused for multiple calls.
3159
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
3160
+ #
3161
+ # # Create a request. To set request fields, pass in keyword arguments.
3162
+ # request = Google::Cloud::DataLabeling::V1beta1::GetEvaluationJobRequest.new
3163
+ #
3164
+ # # Call the get_evaluation_job method.
3165
+ # result = client.get_evaluation_job request
3166
+ #
3167
+ # # The returned object is of type Google::Cloud::DataLabeling::V1beta1::EvaluationJob.
3168
+ # p result
3169
+ #
2572
3170
  def get_evaluation_job request, options = nil
2573
3171
  raise ::ArgumentError, "request must be provided" if request.nil?
2574
3172
 
@@ -2586,9 +3184,11 @@ module Google
2586
3184
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
2587
3185
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2588
3186
 
2589
- header_params = {
2590
- "name" => request.name
2591
- }
3187
+ header_params = {}
3188
+ if request.name
3189
+ header_params["name"] = request.name
3190
+ end
3191
+
2592
3192
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2593
3193
  metadata[:"x-goog-request-params"] ||= request_params_header
2594
3194
 
@@ -2640,6 +3240,21 @@ module Google
2640
3240
  #
2641
3241
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2642
3242
  #
3243
+ # @example Basic example
3244
+ # require "google/cloud/data_labeling/v1beta1"
3245
+ #
3246
+ # # Create a client object. The client can be reused for multiple calls.
3247
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
3248
+ #
3249
+ # # Create a request. To set request fields, pass in keyword arguments.
3250
+ # request = Google::Cloud::DataLabeling::V1beta1::PauseEvaluationJobRequest.new
3251
+ #
3252
+ # # Call the pause_evaluation_job method.
3253
+ # result = client.pause_evaluation_job request
3254
+ #
3255
+ # # The returned object is of type Google::Protobuf::Empty.
3256
+ # p result
3257
+ #
2643
3258
  def pause_evaluation_job request, options = nil
2644
3259
  raise ::ArgumentError, "request must be provided" if request.nil?
2645
3260
 
@@ -2657,9 +3272,11 @@ module Google
2657
3272
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
2658
3273
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2659
3274
 
2660
- header_params = {
2661
- "name" => request.name
2662
- }
3275
+ header_params = {}
3276
+ if request.name
3277
+ header_params["name"] = request.name
3278
+ end
3279
+
2663
3280
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2664
3281
  metadata[:"x-goog-request-params"] ||= request_params_header
2665
3282
 
@@ -2711,6 +3328,21 @@ module Google
2711
3328
  #
2712
3329
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2713
3330
  #
3331
+ # @example Basic example
3332
+ # require "google/cloud/data_labeling/v1beta1"
3333
+ #
3334
+ # # Create a client object. The client can be reused for multiple calls.
3335
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
3336
+ #
3337
+ # # Create a request. To set request fields, pass in keyword arguments.
3338
+ # request = Google::Cloud::DataLabeling::V1beta1::ResumeEvaluationJobRequest.new
3339
+ #
3340
+ # # Call the resume_evaluation_job method.
3341
+ # result = client.resume_evaluation_job request
3342
+ #
3343
+ # # The returned object is of type Google::Protobuf::Empty.
3344
+ # p result
3345
+ #
2714
3346
  def resume_evaluation_job request, options = nil
2715
3347
  raise ::ArgumentError, "request must be provided" if request.nil?
2716
3348
 
@@ -2728,9 +3360,11 @@ module Google
2728
3360
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
2729
3361
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2730
3362
 
2731
- header_params = {
2732
- "name" => request.name
2733
- }
3363
+ header_params = {}
3364
+ if request.name
3365
+ header_params["name"] = request.name
3366
+ end
3367
+
2734
3368
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2735
3369
  metadata[:"x-goog-request-params"] ||= request_params_header
2736
3370
 
@@ -2781,6 +3415,21 @@ module Google
2781
3415
  #
2782
3416
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2783
3417
  #
3418
+ # @example Basic example
3419
+ # require "google/cloud/data_labeling/v1beta1"
3420
+ #
3421
+ # # Create a client object. The client can be reused for multiple calls.
3422
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
3423
+ #
3424
+ # # Create a request. To set request fields, pass in keyword arguments.
3425
+ # request = Google::Cloud::DataLabeling::V1beta1::DeleteEvaluationJobRequest.new
3426
+ #
3427
+ # # Call the delete_evaluation_job method.
3428
+ # result = client.delete_evaluation_job request
3429
+ #
3430
+ # # The returned object is of type Google::Protobuf::Empty.
3431
+ # p result
3432
+ #
2784
3433
  def delete_evaluation_job request, options = nil
2785
3434
  raise ::ArgumentError, "request must be provided" if request.nil?
2786
3435
 
@@ -2798,9 +3447,11 @@ module Google
2798
3447
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
2799
3448
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2800
3449
 
2801
- header_params = {
2802
- "name" => request.name
2803
- }
3450
+ header_params = {}
3451
+ if request.name
3452
+ header_params["name"] = request.name
3453
+ end
3454
+
2804
3455
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2805
3456
  metadata[:"x-goog-request-params"] ||= request_params_header
2806
3457
 
@@ -2869,6 +3520,27 @@ module Google
2869
3520
  #
2870
3521
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2871
3522
  #
3523
+ # @example Basic example
3524
+ # require "google/cloud/data_labeling/v1beta1"
3525
+ #
3526
+ # # Create a client object. The client can be reused for multiple calls.
3527
+ # client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new
3528
+ #
3529
+ # # Create a request. To set request fields, pass in keyword arguments.
3530
+ # request = Google::Cloud::DataLabeling::V1beta1::ListEvaluationJobsRequest.new
3531
+ #
3532
+ # # Call the list_evaluation_jobs method.
3533
+ # result = client.list_evaluation_jobs request
3534
+ #
3535
+ # # The returned object is of type Gapic::PagedEnumerable. You can
3536
+ # # iterate over all elements by calling #each, and the enumerable
3537
+ # # will lazily make API calls to fetch subsequent pages. Other
3538
+ # # methods are also available for managing paging directly.
3539
+ # result.each do |response|
3540
+ # # Each element is of type ::Google::Cloud::DataLabeling::V1beta1::EvaluationJob.
3541
+ # p response
3542
+ # end
3543
+ #
2872
3544
  def list_evaluation_jobs request, options = nil
2873
3545
  raise ::ArgumentError, "request must be provided" if request.nil?
2874
3546
 
@@ -2886,9 +3558,11 @@ module Google
2886
3558
  gapic_version: ::Google::Cloud::DataLabeling::V1beta1::VERSION
2887
3559
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2888
3560
 
2889
- header_params = {
2890
- "parent" => request.parent
2891
- }
3561
+ header_params = {}
3562
+ if request.parent
3563
+ header_params["parent"] = request.parent
3564
+ end
3565
+
2892
3566
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2893
3567
  metadata[:"x-goog-request-params"] ||= request_params_header
2894
3568