google-cloud-data_catalog-v1 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -270,6 +270,27 @@ module Google
270
270
  #
271
271
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
272
272
  #
273
+ # @example Basic example
274
+ # require "google/cloud/data_catalog/v1"
275
+ #
276
+ # # Create a client object. The client can be reused for multiple calls.
277
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
278
+ #
279
+ # # Create a request. To set request fields, pass in keyword arguments.
280
+ # request = Google::Cloud::DataCatalog::V1::SearchCatalogRequest.new
281
+ #
282
+ # # Call the search_catalog method.
283
+ # result = client.search_catalog request
284
+ #
285
+ # # The returned object is of type Gapic::PagedEnumerable. You can
286
+ # # iterate over all elements by calling #each, and the enumerable
287
+ # # will lazily make API calls to fetch subsequent pages. Other
288
+ # # methods are also available for managing paging directly.
289
+ # result.each do |response|
290
+ # # Each element is of type ::Google::Cloud::DataCatalog::V1::SearchCatalogResult.
291
+ # p response
292
+ # end
293
+ #
273
294
  def search_catalog request, options = nil
274
295
  raise ::ArgumentError, "request must be provided" if request.nil?
275
296
 
@@ -370,6 +391,21 @@ module Google
370
391
  #
371
392
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
372
393
  #
394
+ # @example Basic example
395
+ # require "google/cloud/data_catalog/v1"
396
+ #
397
+ # # Create a client object. The client can be reused for multiple calls.
398
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
399
+ #
400
+ # # Create a request. To set request fields, pass in keyword arguments.
401
+ # request = Google::Cloud::DataCatalog::V1::CreateEntryGroupRequest.new
402
+ #
403
+ # # Call the create_entry_group method.
404
+ # result = client.create_entry_group request
405
+ #
406
+ # # The returned object is of type Google::Cloud::DataCatalog::V1::EntryGroup.
407
+ # p result
408
+ #
373
409
  def create_entry_group request, options = nil
374
410
  raise ::ArgumentError, "request must be provided" if request.nil?
375
411
 
@@ -387,9 +423,11 @@ module Google
387
423
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
388
424
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
389
425
 
390
- header_params = {
391
- "parent" => request.parent
392
- }
426
+ header_params = {}
427
+ if request.parent
428
+ header_params["parent"] = request.parent
429
+ end
430
+
393
431
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
394
432
  metadata[:"x-goog-request-params"] ||= request_params_header
395
433
 
@@ -440,6 +478,21 @@ module Google
440
478
  #
441
479
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
442
480
  #
481
+ # @example Basic example
482
+ # require "google/cloud/data_catalog/v1"
483
+ #
484
+ # # Create a client object. The client can be reused for multiple calls.
485
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
486
+ #
487
+ # # Create a request. To set request fields, pass in keyword arguments.
488
+ # request = Google::Cloud::DataCatalog::V1::GetEntryGroupRequest.new
489
+ #
490
+ # # Call the get_entry_group method.
491
+ # result = client.get_entry_group request
492
+ #
493
+ # # The returned object is of type Google::Cloud::DataCatalog::V1::EntryGroup.
494
+ # p result
495
+ #
443
496
  def get_entry_group request, options = nil
444
497
  raise ::ArgumentError, "request must be provided" if request.nil?
445
498
 
@@ -457,9 +510,11 @@ module Google
457
510
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
458
511
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
459
512
 
460
- header_params = {
461
- "name" => request.name
462
- }
513
+ header_params = {}
514
+ if request.name
515
+ header_params["name"] = request.name
516
+ end
517
+
463
518
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
464
519
  metadata[:"x-goog-request-params"] ||= request_params_header
465
520
 
@@ -519,6 +574,21 @@ module Google
519
574
  #
520
575
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
521
576
  #
577
+ # @example Basic example
578
+ # require "google/cloud/data_catalog/v1"
579
+ #
580
+ # # Create a client object. The client can be reused for multiple calls.
581
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
582
+ #
583
+ # # Create a request. To set request fields, pass in keyword arguments.
584
+ # request = Google::Cloud::DataCatalog::V1::UpdateEntryGroupRequest.new
585
+ #
586
+ # # Call the update_entry_group method.
587
+ # result = client.update_entry_group request
588
+ #
589
+ # # The returned object is of type Google::Cloud::DataCatalog::V1::EntryGroup.
590
+ # p result
591
+ #
522
592
  def update_entry_group request, options = nil
523
593
  raise ::ArgumentError, "request must be provided" if request.nil?
524
594
 
@@ -536,9 +606,11 @@ module Google
536
606
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
537
607
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
538
608
 
539
- header_params = {
540
- "entry_group.name" => request.entry_group.name
541
- }
609
+ header_params = {}
610
+ if request.entry_group&.name
611
+ header_params["entry_group.name"] = request.entry_group.name
612
+ end
613
+
542
614
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
543
615
  metadata[:"x-goog-request-params"] ||= request_params_header
544
616
 
@@ -594,6 +666,21 @@ module Google
594
666
  #
595
667
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
596
668
  #
669
+ # @example Basic example
670
+ # require "google/cloud/data_catalog/v1"
671
+ #
672
+ # # Create a client object. The client can be reused for multiple calls.
673
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
674
+ #
675
+ # # Create a request. To set request fields, pass in keyword arguments.
676
+ # request = Google::Cloud::DataCatalog::V1::DeleteEntryGroupRequest.new
677
+ #
678
+ # # Call the delete_entry_group method.
679
+ # result = client.delete_entry_group request
680
+ #
681
+ # # The returned object is of type Google::Protobuf::Empty.
682
+ # p result
683
+ #
597
684
  def delete_entry_group request, options = nil
598
685
  raise ::ArgumentError, "request must be provided" if request.nil?
599
686
 
@@ -611,9 +698,11 @@ module Google
611
698
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
612
699
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
613
700
 
614
- header_params = {
615
- "name" => request.name
616
- }
701
+ header_params = {}
702
+ if request.name
703
+ header_params["name"] = request.name
704
+ end
705
+
617
706
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
618
707
  metadata[:"x-goog-request-params"] ||= request_params_header
619
708
 
@@ -672,6 +761,27 @@ module Google
672
761
  #
673
762
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
674
763
  #
764
+ # @example Basic example
765
+ # require "google/cloud/data_catalog/v1"
766
+ #
767
+ # # Create a client object. The client can be reused for multiple calls.
768
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
769
+ #
770
+ # # Create a request. To set request fields, pass in keyword arguments.
771
+ # request = Google::Cloud::DataCatalog::V1::ListEntryGroupsRequest.new
772
+ #
773
+ # # Call the list_entry_groups method.
774
+ # result = client.list_entry_groups request
775
+ #
776
+ # # The returned object is of type Gapic::PagedEnumerable. You can
777
+ # # iterate over all elements by calling #each, and the enumerable
778
+ # # will lazily make API calls to fetch subsequent pages. Other
779
+ # # methods are also available for managing paging directly.
780
+ # result.each do |response|
781
+ # # Each element is of type ::Google::Cloud::DataCatalog::V1::EntryGroup.
782
+ # p response
783
+ # end
784
+ #
675
785
  def list_entry_groups request, options = nil
676
786
  raise ::ArgumentError, "request must be provided" if request.nil?
677
787
 
@@ -689,9 +799,11 @@ module Google
689
799
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
690
800
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
691
801
 
692
- header_params = {
693
- "parent" => request.parent
694
- }
802
+ header_params = {}
803
+ if request.parent
804
+ header_params["parent"] = request.parent
805
+ end
806
+
695
807
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
696
808
  metadata[:"x-goog-request-params"] ||= request_params_header
697
809
 
@@ -762,6 +874,21 @@ module Google
762
874
  #
763
875
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
764
876
  #
877
+ # @example Basic example
878
+ # require "google/cloud/data_catalog/v1"
879
+ #
880
+ # # Create a client object. The client can be reused for multiple calls.
881
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
882
+ #
883
+ # # Create a request. To set request fields, pass in keyword arguments.
884
+ # request = Google::Cloud::DataCatalog::V1::CreateEntryRequest.new
885
+ #
886
+ # # Call the create_entry method.
887
+ # result = client.create_entry request
888
+ #
889
+ # # The returned object is of type Google::Cloud::DataCatalog::V1::Entry.
890
+ # p result
891
+ #
765
892
  def create_entry request, options = nil
766
893
  raise ::ArgumentError, "request must be provided" if request.nil?
767
894
 
@@ -779,9 +906,11 @@ module Google
779
906
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
780
907
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
781
908
 
782
- header_params = {
783
- "parent" => request.parent
784
- }
909
+ header_params = {}
910
+ if request.parent
911
+ header_params["parent"] = request.parent
912
+ end
913
+
785
914
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
786
915
  metadata[:"x-goog-request-params"] ||= request_params_header
787
916
 
@@ -865,6 +994,21 @@ module Google
865
994
  #
866
995
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
867
996
  #
997
+ # @example Basic example
998
+ # require "google/cloud/data_catalog/v1"
999
+ #
1000
+ # # Create a client object. The client can be reused for multiple calls.
1001
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
1002
+ #
1003
+ # # Create a request. To set request fields, pass in keyword arguments.
1004
+ # request = Google::Cloud::DataCatalog::V1::UpdateEntryRequest.new
1005
+ #
1006
+ # # Call the update_entry method.
1007
+ # result = client.update_entry request
1008
+ #
1009
+ # # The returned object is of type Google::Cloud::DataCatalog::V1::Entry.
1010
+ # p result
1011
+ #
868
1012
  def update_entry request, options = nil
869
1013
  raise ::ArgumentError, "request must be provided" if request.nil?
870
1014
 
@@ -882,9 +1026,11 @@ module Google
882
1026
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
883
1027
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
884
1028
 
885
- header_params = {
886
- "entry.name" => request.entry.name
887
- }
1029
+ header_params = {}
1030
+ if request.entry&.name
1031
+ header_params["entry.name"] = request.entry.name
1032
+ end
1033
+
888
1034
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
889
1035
  metadata[:"x-goog-request-params"] ||= request_params_header
890
1036
 
@@ -942,6 +1088,21 @@ module Google
942
1088
  #
943
1089
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
944
1090
  #
1091
+ # @example Basic example
1092
+ # require "google/cloud/data_catalog/v1"
1093
+ #
1094
+ # # Create a client object. The client can be reused for multiple calls.
1095
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
1096
+ #
1097
+ # # Create a request. To set request fields, pass in keyword arguments.
1098
+ # request = Google::Cloud::DataCatalog::V1::DeleteEntryRequest.new
1099
+ #
1100
+ # # Call the delete_entry method.
1101
+ # result = client.delete_entry request
1102
+ #
1103
+ # # The returned object is of type Google::Protobuf::Empty.
1104
+ # p result
1105
+ #
945
1106
  def delete_entry request, options = nil
946
1107
  raise ::ArgumentError, "request must be provided" if request.nil?
947
1108
 
@@ -959,9 +1120,11 @@ module Google
959
1120
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
960
1121
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
961
1122
 
962
- header_params = {
963
- "name" => request.name
964
- }
1123
+ header_params = {}
1124
+ if request.name
1125
+ header_params["name"] = request.name
1126
+ end
1127
+
965
1128
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
966
1129
  metadata[:"x-goog-request-params"] ||= request_params_header
967
1130
 
@@ -1010,6 +1173,21 @@ module Google
1010
1173
  #
1011
1174
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1012
1175
  #
1176
+ # @example Basic example
1177
+ # require "google/cloud/data_catalog/v1"
1178
+ #
1179
+ # # Create a client object. The client can be reused for multiple calls.
1180
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
1181
+ #
1182
+ # # Create a request. To set request fields, pass in keyword arguments.
1183
+ # request = Google::Cloud::DataCatalog::V1::GetEntryRequest.new
1184
+ #
1185
+ # # Call the get_entry method.
1186
+ # result = client.get_entry request
1187
+ #
1188
+ # # The returned object is of type Google::Cloud::DataCatalog::V1::Entry.
1189
+ # p result
1190
+ #
1013
1191
  def get_entry request, options = nil
1014
1192
  raise ::ArgumentError, "request must be provided" if request.nil?
1015
1193
 
@@ -1027,9 +1205,11 @@ module Google
1027
1205
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
1028
1206
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1029
1207
 
1030
- header_params = {
1031
- "name" => request.name
1032
- }
1208
+ header_params = {}
1209
+ if request.name
1210
+ header_params["name"] = request.name
1211
+ end
1212
+
1033
1213
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1034
1214
  metadata[:"x-goog-request-params"] ||= request_params_header
1035
1215
 
@@ -1117,6 +1297,21 @@ module Google
1117
1297
  #
1118
1298
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1119
1299
  #
1300
+ # @example Basic example
1301
+ # require "google/cloud/data_catalog/v1"
1302
+ #
1303
+ # # Create a client object. The client can be reused for multiple calls.
1304
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
1305
+ #
1306
+ # # Create a request. To set request fields, pass in keyword arguments.
1307
+ # request = Google::Cloud::DataCatalog::V1::LookupEntryRequest.new
1308
+ #
1309
+ # # Call the lookup_entry method.
1310
+ # result = client.lookup_entry request
1311
+ #
1312
+ # # The returned object is of type Google::Cloud::DataCatalog::V1::Entry.
1313
+ # p result
1314
+ #
1120
1315
  def lookup_entry request, options = nil
1121
1316
  raise ::ArgumentError, "request must be provided" if request.nil?
1122
1317
 
@@ -1193,6 +1388,27 @@ module Google
1193
1388
  #
1194
1389
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1195
1390
  #
1391
+ # @example Basic example
1392
+ # require "google/cloud/data_catalog/v1"
1393
+ #
1394
+ # # Create a client object. The client can be reused for multiple calls.
1395
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
1396
+ #
1397
+ # # Create a request. To set request fields, pass in keyword arguments.
1398
+ # request = Google::Cloud::DataCatalog::V1::ListEntriesRequest.new
1399
+ #
1400
+ # # Call the list_entries method.
1401
+ # result = client.list_entries request
1402
+ #
1403
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1404
+ # # iterate over all elements by calling #each, and the enumerable
1405
+ # # will lazily make API calls to fetch subsequent pages. Other
1406
+ # # methods are also available for managing paging directly.
1407
+ # result.each do |response|
1408
+ # # Each element is of type ::Google::Cloud::DataCatalog::V1::Entry.
1409
+ # p response
1410
+ # end
1411
+ #
1196
1412
  def list_entries request, options = nil
1197
1413
  raise ::ArgumentError, "request must be provided" if request.nil?
1198
1414
 
@@ -1210,9 +1426,11 @@ module Google
1210
1426
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
1211
1427
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1212
1428
 
1213
- header_params = {
1214
- "parent" => request.parent
1215
- }
1429
+ header_params = {}
1430
+ if request.parent
1431
+ header_params["parent"] = request.parent
1432
+ end
1433
+
1216
1434
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1217
1435
  metadata[:"x-goog-request-params"] ||= request_params_header
1218
1436
 
@@ -1276,6 +1494,21 @@ module Google
1276
1494
  #
1277
1495
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1278
1496
  #
1497
+ # @example Basic example
1498
+ # require "google/cloud/data_catalog/v1"
1499
+ #
1500
+ # # Create a client object. The client can be reused for multiple calls.
1501
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
1502
+ #
1503
+ # # Create a request. To set request fields, pass in keyword arguments.
1504
+ # request = Google::Cloud::DataCatalog::V1::CreateTagTemplateRequest.new
1505
+ #
1506
+ # # Call the create_tag_template method.
1507
+ # result = client.create_tag_template request
1508
+ #
1509
+ # # The returned object is of type Google::Cloud::DataCatalog::V1::TagTemplate.
1510
+ # p result
1511
+ #
1279
1512
  def create_tag_template request, options = nil
1280
1513
  raise ::ArgumentError, "request must be provided" if request.nil?
1281
1514
 
@@ -1293,9 +1526,11 @@ module Google
1293
1526
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
1294
1527
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1295
1528
 
1296
- header_params = {
1297
- "parent" => request.parent
1298
- }
1529
+ header_params = {}
1530
+ if request.parent
1531
+ header_params["parent"] = request.parent
1532
+ end
1533
+
1299
1534
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1300
1535
  metadata[:"x-goog-request-params"] ||= request_params_header
1301
1536
 
@@ -1344,6 +1579,21 @@ module Google
1344
1579
  #
1345
1580
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1346
1581
  #
1582
+ # @example Basic example
1583
+ # require "google/cloud/data_catalog/v1"
1584
+ #
1585
+ # # Create a client object. The client can be reused for multiple calls.
1586
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
1587
+ #
1588
+ # # Create a request. To set request fields, pass in keyword arguments.
1589
+ # request = Google::Cloud::DataCatalog::V1::GetTagTemplateRequest.new
1590
+ #
1591
+ # # Call the get_tag_template method.
1592
+ # result = client.get_tag_template request
1593
+ #
1594
+ # # The returned object is of type Google::Cloud::DataCatalog::V1::TagTemplate.
1595
+ # p result
1596
+ #
1347
1597
  def get_tag_template request, options = nil
1348
1598
  raise ::ArgumentError, "request must be provided" if request.nil?
1349
1599
 
@@ -1361,9 +1611,11 @@ module Google
1361
1611
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
1362
1612
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1363
1613
 
1364
- header_params = {
1365
- "name" => request.name
1366
- }
1614
+ header_params = {}
1615
+ if request.name
1616
+ header_params["name"] = request.name
1617
+ end
1618
+
1367
1619
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1368
1620
  metadata[:"x-goog-request-params"] ||= request_params_header
1369
1621
 
@@ -1427,6 +1679,21 @@ module Google
1427
1679
  #
1428
1680
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1429
1681
  #
1682
+ # @example Basic example
1683
+ # require "google/cloud/data_catalog/v1"
1684
+ #
1685
+ # # Create a client object. The client can be reused for multiple calls.
1686
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
1687
+ #
1688
+ # # Create a request. To set request fields, pass in keyword arguments.
1689
+ # request = Google::Cloud::DataCatalog::V1::UpdateTagTemplateRequest.new
1690
+ #
1691
+ # # Call the update_tag_template method.
1692
+ # result = client.update_tag_template request
1693
+ #
1694
+ # # The returned object is of type Google::Cloud::DataCatalog::V1::TagTemplate.
1695
+ # p result
1696
+ #
1430
1697
  def update_tag_template request, options = nil
1431
1698
  raise ::ArgumentError, "request must be provided" if request.nil?
1432
1699
 
@@ -1444,9 +1711,11 @@ module Google
1444
1711
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
1445
1712
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1446
1713
 
1447
- header_params = {
1448
- "tag_template.name" => request.tag_template.name
1449
- }
1714
+ header_params = {}
1715
+ if request.tag_template&.name
1716
+ header_params["tag_template.name"] = request.tag_template.name
1717
+ end
1718
+
1450
1719
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1451
1720
  metadata[:"x-goog-request-params"] ||= request_params_header
1452
1721
 
@@ -1503,6 +1772,21 @@ module Google
1503
1772
  #
1504
1773
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1505
1774
  #
1775
+ # @example Basic example
1776
+ # require "google/cloud/data_catalog/v1"
1777
+ #
1778
+ # # Create a client object. The client can be reused for multiple calls.
1779
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
1780
+ #
1781
+ # # Create a request. To set request fields, pass in keyword arguments.
1782
+ # request = Google::Cloud::DataCatalog::V1::DeleteTagTemplateRequest.new
1783
+ #
1784
+ # # Call the delete_tag_template method.
1785
+ # result = client.delete_tag_template request
1786
+ #
1787
+ # # The returned object is of type Google::Protobuf::Empty.
1788
+ # p result
1789
+ #
1506
1790
  def delete_tag_template request, options = nil
1507
1791
  raise ::ArgumentError, "request must be provided" if request.nil?
1508
1792
 
@@ -1520,9 +1804,11 @@ module Google
1520
1804
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
1521
1805
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1522
1806
 
1523
- header_params = {
1524
- "name" => request.name
1525
- }
1807
+ header_params = {}
1808
+ if request.name
1809
+ header_params["name"] = request.name
1810
+ end
1811
+
1526
1812
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1527
1813
  metadata[:"x-goog-request-params"] ||= request_params_header
1528
1814
 
@@ -1587,6 +1873,21 @@ module Google
1587
1873
  #
1588
1874
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1589
1875
  #
1876
+ # @example Basic example
1877
+ # require "google/cloud/data_catalog/v1"
1878
+ #
1879
+ # # Create a client object. The client can be reused for multiple calls.
1880
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
1881
+ #
1882
+ # # Create a request. To set request fields, pass in keyword arguments.
1883
+ # request = Google::Cloud::DataCatalog::V1::CreateTagTemplateFieldRequest.new
1884
+ #
1885
+ # # Call the create_tag_template_field method.
1886
+ # result = client.create_tag_template_field request
1887
+ #
1888
+ # # The returned object is of type Google::Cloud::DataCatalog::V1::TagTemplateField.
1889
+ # p result
1890
+ #
1590
1891
  def create_tag_template_field request, options = nil
1591
1892
  raise ::ArgumentError, "request must be provided" if request.nil?
1592
1893
 
@@ -1604,9 +1905,11 @@ module Google
1604
1905
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
1605
1906
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1606
1907
 
1607
- header_params = {
1608
- "parent" => request.parent
1609
- }
1908
+ header_params = {}
1909
+ if request.parent
1910
+ header_params["parent"] = request.parent
1911
+ end
1912
+
1610
1913
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1611
1914
  metadata[:"x-goog-request-params"] ||= request_params_header
1612
1915
 
@@ -1681,6 +1984,21 @@ module Google
1681
1984
  #
1682
1985
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1683
1986
  #
1987
+ # @example Basic example
1988
+ # require "google/cloud/data_catalog/v1"
1989
+ #
1990
+ # # Create a client object. The client can be reused for multiple calls.
1991
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
1992
+ #
1993
+ # # Create a request. To set request fields, pass in keyword arguments.
1994
+ # request = Google::Cloud::DataCatalog::V1::UpdateTagTemplateFieldRequest.new
1995
+ #
1996
+ # # Call the update_tag_template_field method.
1997
+ # result = client.update_tag_template_field request
1998
+ #
1999
+ # # The returned object is of type Google::Cloud::DataCatalog::V1::TagTemplateField.
2000
+ # p result
2001
+ #
1684
2002
  def update_tag_template_field request, options = nil
1685
2003
  raise ::ArgumentError, "request must be provided" if request.nil?
1686
2004
 
@@ -1698,9 +2016,11 @@ module Google
1698
2016
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
1699
2017
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1700
2018
 
1701
- header_params = {
1702
- "name" => request.name
1703
- }
2019
+ header_params = {}
2020
+ if request.name
2021
+ header_params["name"] = request.name
2022
+ end
2023
+
1704
2024
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1705
2025
  metadata[:"x-goog-request-params"] ||= request_params_header
1706
2026
 
@@ -1755,6 +2075,21 @@ module Google
1755
2075
  #
1756
2076
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1757
2077
  #
2078
+ # @example Basic example
2079
+ # require "google/cloud/data_catalog/v1"
2080
+ #
2081
+ # # Create a client object. The client can be reused for multiple calls.
2082
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
2083
+ #
2084
+ # # Create a request. To set request fields, pass in keyword arguments.
2085
+ # request = Google::Cloud::DataCatalog::V1::RenameTagTemplateFieldRequest.new
2086
+ #
2087
+ # # Call the rename_tag_template_field method.
2088
+ # result = client.rename_tag_template_field request
2089
+ #
2090
+ # # The returned object is of type Google::Cloud::DataCatalog::V1::TagTemplateField.
2091
+ # p result
2092
+ #
1758
2093
  def rename_tag_template_field request, options = nil
1759
2094
  raise ::ArgumentError, "request must be provided" if request.nil?
1760
2095
 
@@ -1772,9 +2107,11 @@ module Google
1772
2107
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
1773
2108
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1774
2109
 
1775
- header_params = {
1776
- "name" => request.name
1777
- }
2110
+ header_params = {}
2111
+ if request.name
2112
+ header_params["name"] = request.name
2113
+ end
2114
+
1778
2115
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1779
2116
  metadata[:"x-goog-request-params"] ||= request_params_header
1780
2117
 
@@ -1827,6 +2164,21 @@ module Google
1827
2164
  #
1828
2165
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1829
2166
  #
2167
+ # @example Basic example
2168
+ # require "google/cloud/data_catalog/v1"
2169
+ #
2170
+ # # Create a client object. The client can be reused for multiple calls.
2171
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
2172
+ #
2173
+ # # Create a request. To set request fields, pass in keyword arguments.
2174
+ # request = Google::Cloud::DataCatalog::V1::RenameTagTemplateFieldEnumValueRequest.new
2175
+ #
2176
+ # # Call the rename_tag_template_field_enum_value method.
2177
+ # result = client.rename_tag_template_field_enum_value request
2178
+ #
2179
+ # # The returned object is of type Google::Cloud::DataCatalog::V1::TagTemplateField.
2180
+ # p result
2181
+ #
1830
2182
  def rename_tag_template_field_enum_value request, options = nil
1831
2183
  raise ::ArgumentError, "request must be provided" if request.nil?
1832
2184
 
@@ -1844,9 +2196,11 @@ module Google
1844
2196
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
1845
2197
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1846
2198
 
1847
- header_params = {
1848
- "name" => request.name
1849
- }
2199
+ header_params = {}
2200
+ if request.name
2201
+ header_params["name"] = request.name
2202
+ end
2203
+
1850
2204
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1851
2205
  metadata[:"x-goog-request-params"] ||= request_params_header
1852
2206
 
@@ -1904,6 +2258,21 @@ module Google
1904
2258
  #
1905
2259
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1906
2260
  #
2261
+ # @example Basic example
2262
+ # require "google/cloud/data_catalog/v1"
2263
+ #
2264
+ # # Create a client object. The client can be reused for multiple calls.
2265
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
2266
+ #
2267
+ # # Create a request. To set request fields, pass in keyword arguments.
2268
+ # request = Google::Cloud::DataCatalog::V1::DeleteTagTemplateFieldRequest.new
2269
+ #
2270
+ # # Call the delete_tag_template_field method.
2271
+ # result = client.delete_tag_template_field request
2272
+ #
2273
+ # # The returned object is of type Google::Protobuf::Empty.
2274
+ # p result
2275
+ #
1907
2276
  def delete_tag_template_field request, options = nil
1908
2277
  raise ::ArgumentError, "request must be provided" if request.nil?
1909
2278
 
@@ -1921,9 +2290,11 @@ module Google
1921
2290
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
1922
2291
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1923
2292
 
1924
- header_params = {
1925
- "name" => request.name
1926
- }
2293
+ header_params = {}
2294
+ if request.name
2295
+ header_params["name"] = request.name
2296
+ end
2297
+
1927
2298
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1928
2299
  metadata[:"x-goog-request-params"] ||= request_params_header
1929
2300
 
@@ -1991,6 +2362,21 @@ module Google
1991
2362
  #
1992
2363
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1993
2364
  #
2365
+ # @example Basic example
2366
+ # require "google/cloud/data_catalog/v1"
2367
+ #
2368
+ # # Create a client object. The client can be reused for multiple calls.
2369
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
2370
+ #
2371
+ # # Create a request. To set request fields, pass in keyword arguments.
2372
+ # request = Google::Cloud::DataCatalog::V1::CreateTagRequest.new
2373
+ #
2374
+ # # Call the create_tag method.
2375
+ # result = client.create_tag request
2376
+ #
2377
+ # # The returned object is of type Google::Cloud::DataCatalog::V1::Tag.
2378
+ # p result
2379
+ #
1994
2380
  def create_tag request, options = nil
1995
2381
  raise ::ArgumentError, "request must be provided" if request.nil?
1996
2382
 
@@ -2008,9 +2394,11 @@ module Google
2008
2394
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
2009
2395
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2010
2396
 
2011
- header_params = {
2012
- "parent" => request.parent
2013
- }
2397
+ header_params = {}
2398
+ if request.parent
2399
+ header_params["parent"] = request.parent
2400
+ end
2401
+
2014
2402
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2015
2403
  metadata[:"x-goog-request-params"] ||= request_params_header
2016
2404
 
@@ -2066,6 +2454,21 @@ module Google
2066
2454
  #
2067
2455
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2068
2456
  #
2457
+ # @example Basic example
2458
+ # require "google/cloud/data_catalog/v1"
2459
+ #
2460
+ # # Create a client object. The client can be reused for multiple calls.
2461
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
2462
+ #
2463
+ # # Create a request. To set request fields, pass in keyword arguments.
2464
+ # request = Google::Cloud::DataCatalog::V1::UpdateTagRequest.new
2465
+ #
2466
+ # # Call the update_tag method.
2467
+ # result = client.update_tag request
2468
+ #
2469
+ # # The returned object is of type Google::Cloud::DataCatalog::V1::Tag.
2470
+ # p result
2471
+ #
2069
2472
  def update_tag request, options = nil
2070
2473
  raise ::ArgumentError, "request must be provided" if request.nil?
2071
2474
 
@@ -2083,9 +2486,11 @@ module Google
2083
2486
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
2084
2487
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2085
2488
 
2086
- header_params = {
2087
- "tag.name" => request.tag.name
2088
- }
2489
+ header_params = {}
2490
+ if request.tag&.name
2491
+ header_params["tag.name"] = request.tag.name
2492
+ end
2493
+
2089
2494
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2090
2495
  metadata[:"x-goog-request-params"] ||= request_params_header
2091
2496
 
@@ -2134,6 +2539,21 @@ module Google
2134
2539
  #
2135
2540
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2136
2541
  #
2542
+ # @example Basic example
2543
+ # require "google/cloud/data_catalog/v1"
2544
+ #
2545
+ # # Create a client object. The client can be reused for multiple calls.
2546
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
2547
+ #
2548
+ # # Create a request. To set request fields, pass in keyword arguments.
2549
+ # request = Google::Cloud::DataCatalog::V1::DeleteTagRequest.new
2550
+ #
2551
+ # # Call the delete_tag method.
2552
+ # result = client.delete_tag request
2553
+ #
2554
+ # # The returned object is of type Google::Protobuf::Empty.
2555
+ # p result
2556
+ #
2137
2557
  def delete_tag request, options = nil
2138
2558
  raise ::ArgumentError, "request must be provided" if request.nil?
2139
2559
 
@@ -2151,9 +2571,11 @@ module Google
2151
2571
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
2152
2572
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2153
2573
 
2154
- header_params = {
2155
- "name" => request.name
2156
- }
2574
+ header_params = {}
2575
+ if request.name
2576
+ header_params["name"] = request.name
2577
+ end
2578
+
2157
2579
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2158
2580
  metadata[:"x-goog-request-params"] ||= request_params_header
2159
2581
 
@@ -2211,6 +2633,27 @@ module Google
2211
2633
  #
2212
2634
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2213
2635
  #
2636
+ # @example Basic example
2637
+ # require "google/cloud/data_catalog/v1"
2638
+ #
2639
+ # # Create a client object. The client can be reused for multiple calls.
2640
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
2641
+ #
2642
+ # # Create a request. To set request fields, pass in keyword arguments.
2643
+ # request = Google::Cloud::DataCatalog::V1::ListTagsRequest.new
2644
+ #
2645
+ # # Call the list_tags method.
2646
+ # result = client.list_tags request
2647
+ #
2648
+ # # The returned object is of type Gapic::PagedEnumerable. You can
2649
+ # # iterate over all elements by calling #each, and the enumerable
2650
+ # # will lazily make API calls to fetch subsequent pages. Other
2651
+ # # methods are also available for managing paging directly.
2652
+ # result.each do |response|
2653
+ # # Each element is of type ::Google::Cloud::DataCatalog::V1::Tag.
2654
+ # p response
2655
+ # end
2656
+ #
2214
2657
  def list_tags request, options = nil
2215
2658
  raise ::ArgumentError, "request must be provided" if request.nil?
2216
2659
 
@@ -2228,9 +2671,11 @@ module Google
2228
2671
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
2229
2672
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2230
2673
 
2231
- header_params = {
2232
- "parent" => request.parent
2233
- }
2674
+ header_params = {}
2675
+ if request.parent
2676
+ header_params["parent"] = request.parent
2677
+ end
2678
+
2234
2679
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2235
2680
  metadata[:"x-goog-request-params"] ||= request_params_header
2236
2681
 
@@ -2302,6 +2747,21 @@ module Google
2302
2747
  #
2303
2748
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2304
2749
  #
2750
+ # @example Basic example
2751
+ # require "google/cloud/data_catalog/v1"
2752
+ #
2753
+ # # Create a client object. The client can be reused for multiple calls.
2754
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
2755
+ #
2756
+ # # Create a request. To set request fields, pass in keyword arguments.
2757
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
2758
+ #
2759
+ # # Call the set_iam_policy method.
2760
+ # result = client.set_iam_policy request
2761
+ #
2762
+ # # The returned object is of type Google::Iam::V1::Policy.
2763
+ # p result
2764
+ #
2305
2765
  def set_iam_policy request, options = nil
2306
2766
  raise ::ArgumentError, "request must be provided" if request.nil?
2307
2767
 
@@ -2319,9 +2779,11 @@ module Google
2319
2779
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
2320
2780
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2321
2781
 
2322
- header_params = {
2323
- "resource" => request.resource
2324
- }
2782
+ header_params = {}
2783
+ if request.resource
2784
+ header_params["resource"] = request.resource
2785
+ end
2786
+
2325
2787
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2326
2788
  metadata[:"x-goog-request-params"] ||= request_params_header
2327
2789
 
@@ -2394,6 +2856,21 @@ module Google
2394
2856
  #
2395
2857
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2396
2858
  #
2859
+ # @example Basic example
2860
+ # require "google/cloud/data_catalog/v1"
2861
+ #
2862
+ # # Create a client object. The client can be reused for multiple calls.
2863
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
2864
+ #
2865
+ # # Create a request. To set request fields, pass in keyword arguments.
2866
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
2867
+ #
2868
+ # # Call the get_iam_policy method.
2869
+ # result = client.get_iam_policy request
2870
+ #
2871
+ # # The returned object is of type Google::Iam::V1::Policy.
2872
+ # p result
2873
+ #
2397
2874
  def get_iam_policy request, options = nil
2398
2875
  raise ::ArgumentError, "request must be provided" if request.nil?
2399
2876
 
@@ -2411,9 +2888,11 @@ module Google
2411
2888
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
2412
2889
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2413
2890
 
2414
- header_params = {
2415
- "resource" => request.resource
2416
- }
2891
+ header_params = {}
2892
+ if request.resource
2893
+ header_params["resource"] = request.resource
2894
+ end
2895
+
2417
2896
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2418
2897
  metadata[:"x-goog-request-params"] ||= request_params_header
2419
2898
 
@@ -2481,6 +2960,21 @@ module Google
2481
2960
  #
2482
2961
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
2483
2962
  #
2963
+ # @example Basic example
2964
+ # require "google/cloud/data_catalog/v1"
2965
+ #
2966
+ # # Create a client object. The client can be reused for multiple calls.
2967
+ # client = Google::Cloud::DataCatalog::V1::DataCatalog::Client.new
2968
+ #
2969
+ # # Create a request. To set request fields, pass in keyword arguments.
2970
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
2971
+ #
2972
+ # # Call the test_iam_permissions method.
2973
+ # result = client.test_iam_permissions request
2974
+ #
2975
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
2976
+ # p result
2977
+ #
2484
2978
  def test_iam_permissions request, options = nil
2485
2979
  raise ::ArgumentError, "request must be provided" if request.nil?
2486
2980
 
@@ -2498,9 +2992,11 @@ module Google
2498
2992
  gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
2499
2993
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2500
2994
 
2501
- header_params = {
2502
- "resource" => request.resource
2503
- }
2995
+ header_params = {}
2996
+ if request.resource
2997
+ header_params["resource"] = request.resource
2998
+ end
2999
+
2504
3000
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2505
3001
  metadata[:"x-goog-request-params"] ||= request_params_header
2506
3002