google-cloud-asset-v1 0.17.1 → 0.17.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1cd6a10198e7c8942faca2e416d6bc3c449f7b4fc159f0705e00a169066c3c34
4
- data.tar.gz: 18089d8f4e01d9b022aa623189c4b3f78f62a6bd2583f9e15bc6a3ae581f8538
3
+ metadata.gz: 80c338a70895248ed872bed101cf42c8c182e6f0c57b5ce95df4e93bc4eb0a5c
4
+ data.tar.gz: abff9123e9030366be31b5ae21006e4e4405d5ee6552394d4c2ef815c13b08ce
5
5
  SHA512:
6
- metadata.gz: c9fe6cf47912dd3e42dfddbd150e1215c338d68eeb54655ec8f4d1db2d6ebbcb7cf15c5cd02cd9db3259b5454b69ac80e8633bc8c9bde358ea29fd0f90627b81
7
- data.tar.gz: ee9126e92de46728147734b0aa925f554c2330a0c1b5e601ac00a3ab5f4ffe87d2b258acea008ad9a7a46dc1f8e9d2ddb27dc7a83c01066a9f298d1fb336ffc7
6
+ metadata.gz: d17ba0f63f8db767f4dde084d776844da803e6e6f1fff05be828f132df0947a82aecb2641dc4a647b3794153571b93817f85f93cb65993fa684400281f472dc6
7
+ data.tar.gz: 424cb7e826e94b5fbbbd37383605314c1f0393b009fd2b477b9076a13d1788d65e89c4696c5d9d23cc4ee58584637eed4bae18fd7ffb44fb3eec1f0982b3da24
@@ -291,6 +291,28 @@ module Google
291
291
  #
292
292
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
293
293
  #
294
+ # @example Basic example
295
+ # require "google/cloud/asset/v1"
296
+ #
297
+ # # Create a client object. The client can be reused for multiple calls.
298
+ # client = Google::Cloud::Asset::V1::AssetService::Client.new
299
+ #
300
+ # # Create a request. To set request fields, pass in keyword arguments.
301
+ # request = Google::Cloud::Asset::V1::ExportAssetsRequest.new
302
+ #
303
+ # # Call the export_assets method.
304
+ # result = client.export_assets request
305
+ #
306
+ # # The returned object is of type Gapic::Operation. You can use this
307
+ # # object to check the status of an operation, cancel it, or wait
308
+ # # for results. Here is how to block until completion:
309
+ # result.wait_until_done! timeout: 60
310
+ # if result.response?
311
+ # p result.response
312
+ # else
313
+ # puts "Error!"
314
+ # end
315
+ #
294
316
  def export_assets request, options = nil
295
317
  raise ::ArgumentError, "request must be provided" if request.nil?
296
318
 
@@ -308,9 +330,11 @@ module Google
308
330
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
309
331
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
310
332
 
311
- header_params = {
312
- "parent" => request.parent
313
- }
333
+ header_params = {}
334
+ if request.parent
335
+ header_params["parent"] = request.parent
336
+ end
337
+
314
338
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
315
339
  metadata[:"x-goog-request-params"] ||= request_params_header
316
340
 
@@ -415,6 +439,27 @@ module Google
415
439
  #
416
440
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
417
441
  #
442
+ # @example Basic example
443
+ # require "google/cloud/asset/v1"
444
+ #
445
+ # # Create a client object. The client can be reused for multiple calls.
446
+ # client = Google::Cloud::Asset::V1::AssetService::Client.new
447
+ #
448
+ # # Create a request. To set request fields, pass in keyword arguments.
449
+ # request = Google::Cloud::Asset::V1::ListAssetsRequest.new
450
+ #
451
+ # # Call the list_assets method.
452
+ # result = client.list_assets request
453
+ #
454
+ # # The returned object is of type Gapic::PagedEnumerable. You can
455
+ # # iterate over all elements by calling #each, and the enumerable
456
+ # # will lazily make API calls to fetch subsequent pages. Other
457
+ # # methods are also available for managing paging directly.
458
+ # result.each do |response|
459
+ # # Each element is of type ::Google::Cloud::Asset::V1::Asset.
460
+ # p response
461
+ # end
462
+ #
418
463
  def list_assets request, options = nil
419
464
  raise ::ArgumentError, "request must be provided" if request.nil?
420
465
 
@@ -432,9 +477,11 @@ module Google
432
477
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
433
478
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
434
479
 
435
- header_params = {
436
- "parent" => request.parent
437
- }
480
+ header_params = {}
481
+ if request.parent
482
+ header_params["parent"] = request.parent
483
+ end
484
+
438
485
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
439
486
  metadata[:"x-goog-request-params"] ||= request_params_header
440
487
 
@@ -527,6 +574,21 @@ module Google
527
574
  #
528
575
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
529
576
  #
577
+ # @example Basic example
578
+ # require "google/cloud/asset/v1"
579
+ #
580
+ # # Create a client object. The client can be reused for multiple calls.
581
+ # client = Google::Cloud::Asset::V1::AssetService::Client.new
582
+ #
583
+ # # Create a request. To set request fields, pass in keyword arguments.
584
+ # request = Google::Cloud::Asset::V1::BatchGetAssetsHistoryRequest.new
585
+ #
586
+ # # Call the batch_get_assets_history method.
587
+ # result = client.batch_get_assets_history request
588
+ #
589
+ # # The returned object is of type Google::Cloud::Asset::V1::BatchGetAssetsHistoryResponse.
590
+ # p result
591
+ #
530
592
  def batch_get_assets_history request, options = nil
531
593
  raise ::ArgumentError, "request must be provided" if request.nil?
532
594
 
@@ -544,9 +606,11 @@ module Google
544
606
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
545
607
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
546
608
 
547
- header_params = {
548
- "parent" => request.parent
549
- }
609
+ header_params = {}
610
+ if request.parent
611
+ header_params["parent"] = request.parent
612
+ end
613
+
550
614
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
551
615
  metadata[:"x-goog-request-params"] ||= request_params_header
552
616
 
@@ -609,6 +673,21 @@ module Google
609
673
  #
610
674
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
611
675
  #
676
+ # @example Basic example
677
+ # require "google/cloud/asset/v1"
678
+ #
679
+ # # Create a client object. The client can be reused for multiple calls.
680
+ # client = Google::Cloud::Asset::V1::AssetService::Client.new
681
+ #
682
+ # # Create a request. To set request fields, pass in keyword arguments.
683
+ # request = Google::Cloud::Asset::V1::CreateFeedRequest.new
684
+ #
685
+ # # Call the create_feed method.
686
+ # result = client.create_feed request
687
+ #
688
+ # # The returned object is of type Google::Cloud::Asset::V1::Feed.
689
+ # p result
690
+ #
612
691
  def create_feed request, options = nil
613
692
  raise ::ArgumentError, "request must be provided" if request.nil?
614
693
 
@@ -626,9 +705,11 @@ module Google
626
705
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
627
706
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
628
707
 
629
- header_params = {
630
- "parent" => request.parent
631
- }
708
+ header_params = {}
709
+ if request.parent
710
+ header_params["parent"] = request.parent
711
+ end
712
+
632
713
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
633
714
  metadata[:"x-goog-request-params"] ||= request_params_header
634
715
 
@@ -680,6 +761,21 @@ module Google
680
761
  #
681
762
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
682
763
  #
764
+ # @example Basic example
765
+ # require "google/cloud/asset/v1"
766
+ #
767
+ # # Create a client object. The client can be reused for multiple calls.
768
+ # client = Google::Cloud::Asset::V1::AssetService::Client.new
769
+ #
770
+ # # Create a request. To set request fields, pass in keyword arguments.
771
+ # request = Google::Cloud::Asset::V1::GetFeedRequest.new
772
+ #
773
+ # # Call the get_feed method.
774
+ # result = client.get_feed request
775
+ #
776
+ # # The returned object is of type Google::Cloud::Asset::V1::Feed.
777
+ # p result
778
+ #
683
779
  def get_feed request, options = nil
684
780
  raise ::ArgumentError, "request must be provided" if request.nil?
685
781
 
@@ -697,9 +793,11 @@ module Google
697
793
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
698
794
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
699
795
 
700
- header_params = {
701
- "name" => request.name
702
- }
796
+ header_params = {}
797
+ if request.name
798
+ header_params["name"] = request.name
799
+ end
800
+
703
801
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
704
802
  metadata[:"x-goog-request-params"] ||= request_params_header
705
803
 
@@ -750,6 +848,21 @@ module Google
750
848
  #
751
849
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
752
850
  #
851
+ # @example Basic example
852
+ # require "google/cloud/asset/v1"
853
+ #
854
+ # # Create a client object. The client can be reused for multiple calls.
855
+ # client = Google::Cloud::Asset::V1::AssetService::Client.new
856
+ #
857
+ # # Create a request. To set request fields, pass in keyword arguments.
858
+ # request = Google::Cloud::Asset::V1::ListFeedsRequest.new
859
+ #
860
+ # # Call the list_feeds method.
861
+ # result = client.list_feeds request
862
+ #
863
+ # # The returned object is of type Google::Cloud::Asset::V1::ListFeedsResponse.
864
+ # p result
865
+ #
753
866
  def list_feeds request, options = nil
754
867
  raise ::ArgumentError, "request must be provided" if request.nil?
755
868
 
@@ -767,9 +880,11 @@ module Google
767
880
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
768
881
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
769
882
 
770
- header_params = {
771
- "parent" => request.parent
772
- }
883
+ header_params = {}
884
+ if request.parent
885
+ header_params["parent"] = request.parent
886
+ end
887
+
773
888
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
774
889
  metadata[:"x-goog-request-params"] ||= request_params_header
775
890
 
@@ -826,6 +941,21 @@ module Google
826
941
  #
827
942
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
828
943
  #
944
+ # @example Basic example
945
+ # require "google/cloud/asset/v1"
946
+ #
947
+ # # Create a client object. The client can be reused for multiple calls.
948
+ # client = Google::Cloud::Asset::V1::AssetService::Client.new
949
+ #
950
+ # # Create a request. To set request fields, pass in keyword arguments.
951
+ # request = Google::Cloud::Asset::V1::UpdateFeedRequest.new
952
+ #
953
+ # # Call the update_feed method.
954
+ # result = client.update_feed request
955
+ #
956
+ # # The returned object is of type Google::Cloud::Asset::V1::Feed.
957
+ # p result
958
+ #
829
959
  def update_feed request, options = nil
830
960
  raise ::ArgumentError, "request must be provided" if request.nil?
831
961
 
@@ -843,9 +973,11 @@ module Google
843
973
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
844
974
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
845
975
 
846
- header_params = {
847
- "feed.name" => request.feed.name
848
- }
976
+ header_params = {}
977
+ if request.feed&.name
978
+ header_params["feed.name"] = request.feed.name
979
+ end
980
+
849
981
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
850
982
  metadata[:"x-goog-request-params"] ||= request_params_header
851
983
 
@@ -897,6 +1029,21 @@ module Google
897
1029
  #
898
1030
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
899
1031
  #
1032
+ # @example Basic example
1033
+ # require "google/cloud/asset/v1"
1034
+ #
1035
+ # # Create a client object. The client can be reused for multiple calls.
1036
+ # client = Google::Cloud::Asset::V1::AssetService::Client.new
1037
+ #
1038
+ # # Create a request. To set request fields, pass in keyword arguments.
1039
+ # request = Google::Cloud::Asset::V1::DeleteFeedRequest.new
1040
+ #
1041
+ # # Call the delete_feed method.
1042
+ # result = client.delete_feed request
1043
+ #
1044
+ # # The returned object is of type Google::Protobuf::Empty.
1045
+ # p result
1046
+ #
900
1047
  def delete_feed request, options = nil
901
1048
  raise ::ArgumentError, "request must be provided" if request.nil?
902
1049
 
@@ -914,9 +1061,11 @@ module Google
914
1061
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
915
1062
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
916
1063
 
917
- header_params = {
918
- "name" => request.name
919
- }
1064
+ header_params = {}
1065
+ if request.name
1066
+ header_params["name"] = request.name
1067
+ end
1068
+
920
1069
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
921
1070
  metadata[:"x-goog-request-params"] ||= request_params_header
922
1071
 
@@ -1096,6 +1245,27 @@ module Google
1096
1245
  #
1097
1246
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1098
1247
  #
1248
+ # @example Basic example
1249
+ # require "google/cloud/asset/v1"
1250
+ #
1251
+ # # Create a client object. The client can be reused for multiple calls.
1252
+ # client = Google::Cloud::Asset::V1::AssetService::Client.new
1253
+ #
1254
+ # # Create a request. To set request fields, pass in keyword arguments.
1255
+ # request = Google::Cloud::Asset::V1::SearchAllResourcesRequest.new
1256
+ #
1257
+ # # Call the search_all_resources method.
1258
+ # result = client.search_all_resources request
1259
+ #
1260
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1261
+ # # iterate over all elements by calling #each, and the enumerable
1262
+ # # will lazily make API calls to fetch subsequent pages. Other
1263
+ # # methods are also available for managing paging directly.
1264
+ # result.each do |response|
1265
+ # # Each element is of type ::Google::Cloud::Asset::V1::ResourceSearchResult.
1266
+ # p response
1267
+ # end
1268
+ #
1099
1269
  def search_all_resources request, options = nil
1100
1270
  raise ::ArgumentError, "request must be provided" if request.nil?
1101
1271
 
@@ -1113,9 +1283,11 @@ module Google
1113
1283
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
1114
1284
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1115
1285
 
1116
- header_params = {
1117
- "scope" => request.scope
1118
- }
1286
+ header_params = {}
1287
+ if request.scope
1288
+ header_params["scope"] = request.scope
1289
+ end
1290
+
1119
1291
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1120
1292
  metadata[:"x-goog-request-params"] ||= request_params_header
1121
1293
 
@@ -1260,6 +1432,27 @@ module Google
1260
1432
  #
1261
1433
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1262
1434
  #
1435
+ # @example Basic example
1436
+ # require "google/cloud/asset/v1"
1437
+ #
1438
+ # # Create a client object. The client can be reused for multiple calls.
1439
+ # client = Google::Cloud::Asset::V1::AssetService::Client.new
1440
+ #
1441
+ # # Create a request. To set request fields, pass in keyword arguments.
1442
+ # request = Google::Cloud::Asset::V1::SearchAllIamPoliciesRequest.new
1443
+ #
1444
+ # # Call the search_all_iam_policies method.
1445
+ # result = client.search_all_iam_policies request
1446
+ #
1447
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1448
+ # # iterate over all elements by calling #each, and the enumerable
1449
+ # # will lazily make API calls to fetch subsequent pages. Other
1450
+ # # methods are also available for managing paging directly.
1451
+ # result.each do |response|
1452
+ # # Each element is of type ::Google::Cloud::Asset::V1::IamPolicySearchResult.
1453
+ # p response
1454
+ # end
1455
+ #
1263
1456
  def search_all_iam_policies request, options = nil
1264
1457
  raise ::ArgumentError, "request must be provided" if request.nil?
1265
1458
 
@@ -1277,9 +1470,11 @@ module Google
1277
1470
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
1278
1471
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1279
1472
 
1280
- header_params = {
1281
- "scope" => request.scope
1282
- }
1473
+ header_params = {}
1474
+ if request.scope
1475
+ header_params["scope"] = request.scope
1476
+ end
1477
+
1283
1478
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1284
1479
  metadata[:"x-goog-request-params"] ||= request_params_header
1285
1480
 
@@ -1341,6 +1536,21 @@ module Google
1341
1536
  #
1342
1537
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1343
1538
  #
1539
+ # @example Basic example
1540
+ # require "google/cloud/asset/v1"
1541
+ #
1542
+ # # Create a client object. The client can be reused for multiple calls.
1543
+ # client = Google::Cloud::Asset::V1::AssetService::Client.new
1544
+ #
1545
+ # # Create a request. To set request fields, pass in keyword arguments.
1546
+ # request = Google::Cloud::Asset::V1::AnalyzeIamPolicyRequest.new
1547
+ #
1548
+ # # Call the analyze_iam_policy method.
1549
+ # result = client.analyze_iam_policy request
1550
+ #
1551
+ # # The returned object is of type Google::Cloud::Asset::V1::AnalyzeIamPolicyResponse.
1552
+ # p result
1553
+ #
1344
1554
  def analyze_iam_policy request, options = nil
1345
1555
  raise ::ArgumentError, "request must be provided" if request.nil?
1346
1556
 
@@ -1358,9 +1568,11 @@ module Google
1358
1568
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
1359
1569
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1360
1570
 
1361
- header_params = {
1362
- "analysis_query.scope" => request.analysis_query.scope
1363
- }
1571
+ header_params = {}
1572
+ if request.analysis_query&.scope
1573
+ header_params["analysis_query.scope"] = request.analysis_query.scope
1574
+ end
1575
+
1364
1576
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1365
1577
  metadata[:"x-goog-request-params"] ||= request_params_header
1366
1578
 
@@ -1419,6 +1631,28 @@ module Google
1419
1631
  #
1420
1632
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1421
1633
  #
1634
+ # @example Basic example
1635
+ # require "google/cloud/asset/v1"
1636
+ #
1637
+ # # Create a client object. The client can be reused for multiple calls.
1638
+ # client = Google::Cloud::Asset::V1::AssetService::Client.new
1639
+ #
1640
+ # # Create a request. To set request fields, pass in keyword arguments.
1641
+ # request = Google::Cloud::Asset::V1::AnalyzeIamPolicyLongrunningRequest.new
1642
+ #
1643
+ # # Call the analyze_iam_policy_longrunning method.
1644
+ # result = client.analyze_iam_policy_longrunning request
1645
+ #
1646
+ # # The returned object is of type Gapic::Operation. You can use this
1647
+ # # object to check the status of an operation, cancel it, or wait
1648
+ # # for results. Here is how to block until completion:
1649
+ # result.wait_until_done! timeout: 60
1650
+ # if result.response?
1651
+ # p result.response
1652
+ # else
1653
+ # puts "Error!"
1654
+ # end
1655
+ #
1422
1656
  def analyze_iam_policy_longrunning request, options = nil
1423
1657
  raise ::ArgumentError, "request must be provided" if request.nil?
1424
1658
 
@@ -1436,9 +1670,11 @@ module Google
1436
1670
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
1437
1671
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1438
1672
 
1439
- header_params = {
1440
- "analysis_query.scope" => request.analysis_query.scope
1441
- }
1673
+ header_params = {}
1674
+ if request.analysis_query&.scope
1675
+ header_params["analysis_query.scope"] = request.analysis_query.scope
1676
+ end
1677
+
1442
1678
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1443
1679
  metadata[:"x-goog-request-params"] ||= request_params_header
1444
1680
 
@@ -1504,6 +1740,21 @@ module Google
1504
1740
  #
1505
1741
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1506
1742
  #
1743
+ # @example Basic example
1744
+ # require "google/cloud/asset/v1"
1745
+ #
1746
+ # # Create a client object. The client can be reused for multiple calls.
1747
+ # client = Google::Cloud::Asset::V1::AssetService::Client.new
1748
+ #
1749
+ # # Create a request. To set request fields, pass in keyword arguments.
1750
+ # request = Google::Cloud::Asset::V1::AnalyzeMoveRequest.new
1751
+ #
1752
+ # # Call the analyze_move method.
1753
+ # result = client.analyze_move request
1754
+ #
1755
+ # # The returned object is of type Google::Cloud::Asset::V1::AnalyzeMoveResponse.
1756
+ # p result
1757
+ #
1507
1758
  def analyze_move request, options = nil
1508
1759
  raise ::ArgumentError, "request must be provided" if request.nil?
1509
1760
 
@@ -1521,9 +1772,11 @@ module Google
1521
1772
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
1522
1773
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1523
1774
 
1524
- header_params = {
1525
- "resource" => request.resource
1526
- }
1775
+ header_params = {}
1776
+ if request.resource
1777
+ header_params["resource"] = request.resource
1778
+ end
1779
+
1527
1780
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1528
1781
  metadata[:"x-goog-request-params"] ||= request_params_header
1529
1782
 
@@ -143,6 +143,27 @@ module Google
143
143
  #
144
144
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
145
145
  #
146
+ # @example Basic example
147
+ # require "google/longrunning"
148
+ #
149
+ # # Create a client object. The client can be reused for multiple calls.
150
+ # client = Google::Longrunning::Operations::Client.new
151
+ #
152
+ # # Create a request. To set request fields, pass in keyword arguments.
153
+ # request = Google::Longrunning::ListOperationsRequest.new
154
+ #
155
+ # # Call the list_operations method.
156
+ # result = client.list_operations request
157
+ #
158
+ # # The returned object is of type Gapic::PagedEnumerable. You can
159
+ # # iterate over all elements by calling #each, and the enumerable
160
+ # # will lazily make API calls to fetch subsequent pages. Other
161
+ # # methods are also available for managing paging directly.
162
+ # result.each do |response|
163
+ # # Each element is of type ::Google::Longrunning::Operation.
164
+ # p response
165
+ # end
166
+ #
146
167
  def list_operations request, options = nil
147
168
  raise ::ArgumentError, "request must be provided" if request.nil?
148
169
 
@@ -160,9 +181,11 @@ module Google
160
181
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
161
182
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
162
183
 
163
- header_params = {
164
- "name" => request.name
165
- }
184
+ header_params = {}
185
+ if request.name
186
+ header_params["name"] = request.name
187
+ end
188
+
166
189
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
167
190
  metadata[:"x-goog-request-params"] ||= request_params_header
168
191
 
@@ -215,6 +238,28 @@ module Google
215
238
  #
216
239
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
217
240
  #
241
+ # @example Basic example
242
+ # require "google/longrunning"
243
+ #
244
+ # # Create a client object. The client can be reused for multiple calls.
245
+ # client = Google::Longrunning::Operations::Client.new
246
+ #
247
+ # # Create a request. To set request fields, pass in keyword arguments.
248
+ # request = Google::Longrunning::GetOperationRequest.new
249
+ #
250
+ # # Call the get_operation method.
251
+ # result = client.get_operation request
252
+ #
253
+ # # The returned object is of type Gapic::Operation. You can use this
254
+ # # object to check the status of an operation, cancel it, or wait
255
+ # # for results. Here is how to block until completion:
256
+ # result.wait_until_done! timeout: 60
257
+ # if result.response?
258
+ # p result.response
259
+ # else
260
+ # puts "Error!"
261
+ # end
262
+ #
218
263
  def get_operation request, options = nil
219
264
  raise ::ArgumentError, "request must be provided" if request.nil?
220
265
 
@@ -232,9 +277,11 @@ module Google
232
277
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
233
278
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
234
279
 
235
- header_params = {
236
- "name" => request.name
237
- }
280
+ header_params = {}
281
+ if request.name
282
+ header_params["name"] = request.name
283
+ end
284
+
238
285
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
239
286
  metadata[:"x-goog-request-params"] ||= request_params_header
240
287
 
@@ -287,6 +334,21 @@ module Google
287
334
  #
288
335
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
289
336
  #
337
+ # @example Basic example
338
+ # require "google/longrunning"
339
+ #
340
+ # # Create a client object. The client can be reused for multiple calls.
341
+ # client = Google::Longrunning::Operations::Client.new
342
+ #
343
+ # # Create a request. To set request fields, pass in keyword arguments.
344
+ # request = Google::Longrunning::DeleteOperationRequest.new
345
+ #
346
+ # # Call the delete_operation method.
347
+ # result = client.delete_operation request
348
+ #
349
+ # # The returned object is of type Google::Protobuf::Empty.
350
+ # p result
351
+ #
290
352
  def delete_operation request, options = nil
291
353
  raise ::ArgumentError, "request must be provided" if request.nil?
292
354
 
@@ -304,9 +366,11 @@ module Google
304
366
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
305
367
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
306
368
 
307
- header_params = {
308
- "name" => request.name
309
- }
369
+ header_params = {}
370
+ if request.name
371
+ header_params["name"] = request.name
372
+ end
373
+
310
374
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
311
375
  metadata[:"x-goog-request-params"] ||= request_params_header
312
376
 
@@ -364,6 +428,21 @@ module Google
364
428
  #
365
429
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
366
430
  #
431
+ # @example Basic example
432
+ # require "google/longrunning"
433
+ #
434
+ # # Create a client object. The client can be reused for multiple calls.
435
+ # client = Google::Longrunning::Operations::Client.new
436
+ #
437
+ # # Create a request. To set request fields, pass in keyword arguments.
438
+ # request = Google::Longrunning::CancelOperationRequest.new
439
+ #
440
+ # # Call the cancel_operation method.
441
+ # result = client.cancel_operation request
442
+ #
443
+ # # The returned object is of type Google::Protobuf::Empty.
444
+ # p result
445
+ #
367
446
  def cancel_operation request, options = nil
368
447
  raise ::ArgumentError, "request must be provided" if request.nil?
369
448
 
@@ -381,9 +460,11 @@ module Google
381
460
  gapic_version: ::Google::Cloud::Asset::V1::VERSION
382
461
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
383
462
 
384
- header_params = {
385
- "name" => request.name
386
- }
463
+ header_params = {}
464
+ if request.name
465
+ header_params["name"] = request.name
466
+ end
467
+
387
468
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
388
469
  metadata[:"x-goog-request-params"] ||= request_params_header
389
470
 
@@ -444,6 +525,28 @@ module Google
444
525
  #
445
526
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
446
527
  #
528
+ # @example Basic example
529
+ # require "google/longrunning"
530
+ #
531
+ # # Create a client object. The client can be reused for multiple calls.
532
+ # client = Google::Longrunning::Operations::Client.new
533
+ #
534
+ # # Create a request. To set request fields, pass in keyword arguments.
535
+ # request = Google::Longrunning::WaitOperationRequest.new
536
+ #
537
+ # # Call the wait_operation method.
538
+ # result = client.wait_operation request
539
+ #
540
+ # # The returned object is of type Gapic::Operation. You can use this
541
+ # # object to check the status of an operation, cancel it, or wait
542
+ # # for results. Here is how to block until completion:
543
+ # result.wait_until_done! timeout: 60
544
+ # if result.response?
545
+ # p result.response
546
+ # else
547
+ # puts "Error!"
548
+ # end
549
+ #
447
550
  def wait_operation request, options = nil
448
551
  raise ::ArgumentError, "request must be provided" if request.nil?
449
552
 
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/asset/v1/asset_service.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -16,6 +14,8 @@ require 'google/protobuf/struct_pb'
16
14
  require 'google/protobuf/timestamp_pb'
17
15
  require 'google/rpc/status_pb'
18
16
  require 'google/type/expr_pb'
17
+ require 'google/protobuf'
18
+
19
19
  Google::Protobuf::DescriptorPool.generated_pool.build do
20
20
  add_file("google/cloud/asset/v1/asset_service.proto", :syntax => :proto3) do
21
21
  add_message "google.cloud.asset.v1.AnalyzeIamPolicyLongrunningMetadata" do
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/asset/v1/assets.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/resource_pb'
7
5
  require 'google/cloud/orgpolicy/v1/orgpolicy_pb'
8
6
  require 'google/iam/v1/policy_pb'
@@ -15,6 +13,8 @@ require 'google/protobuf/struct_pb'
15
13
  require 'google/protobuf/timestamp_pb'
16
14
  require 'google/rpc/code_pb'
17
15
  require 'google/api/annotations_pb'
16
+ require 'google/protobuf'
17
+
18
18
  Google::Protobuf::DescriptorPool.generated_pool.build do
19
19
  add_file("google/cloud/asset/v1/assets.proto", :syntax => :proto3) do
20
20
  add_message "google.cloud.asset.v1.TemporalAsset" do
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Asset
23
23
  module V1
24
- VERSION = "0.17.1"
24
+ VERSION = "0.17.2"
25
25
  end
26
26
  end
27
27
  end
@@ -1,11 +1,11 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/orgpolicy/v1/orgpolicy.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/protobuf/empty_pb'
7
5
  require 'google/protobuf/timestamp_pb'
8
6
  require 'google/api/annotations_pb'
7
+ require 'google/protobuf'
8
+
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_file("google/cloud/orgpolicy/v1/orgpolicy.proto", :syntax => :proto3) do
11
11
  add_message "google.cloud.orgpolicy.v1.Policy" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-asset-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.1
4
+ version: 0.17.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-24 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common