strongdm 4.6.1 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.git/ORIG_HEAD +1 -1
- data/.git/index +0 -0
- data/.git/logs/HEAD +3 -3
- data/.git/logs/refs/heads/master +2 -2
- data/.git/logs/refs/remotes/origin/HEAD +1 -1
- data/.git/objects/pack/{pack-b9ca351a44eccec0b526c388786b2cd01d119b6e.idx → pack-b1dfafcd7b8c6b715aaf6a4fee0c32ac367fdfef.idx} +0 -0
- data/.git/objects/pack/{pack-b9ca351a44eccec0b526c388786b2cd01d119b6e.pack → pack-b1dfafcd7b8c6b715aaf6a4fee0c32ac367fdfef.pack} +0 -0
- data/.git/packed-refs +4 -2
- data/.git/refs/heads/master +1 -1
- data/lib/grpc/plumbing.rb +796 -83
- data/lib/grpc/workflow_approvers_history_pb.rb +1 -1
- data/lib/grpc/workflow_approvers_pb.rb +77 -0
- data/lib/grpc/workflow_approvers_services_pb.rb +43 -0
- data/lib/grpc/workflow_assignments_history_pb.rb +1 -1
- data/lib/grpc/workflow_assignments_pb.rb +44 -0
- data/lib/grpc/workflow_assignments_services_pb.rb +38 -0
- data/lib/grpc/workflow_roles_history_pb.rb +1 -1
- data/lib/grpc/workflow_roles_pb.rb +77 -0
- data/lib/grpc/workflow_roles_services_pb.rb +44 -0
- data/lib/grpc/workflows_pb.rb +44 -15
- data/lib/grpc/workflows_services_pb.rb +9 -1
- data/lib/models/porcelain.rb +480 -44
- data/lib/strongdm.rb +49 -13
- data/lib/svc.rb +669 -137
- data/lib/version +1 -1
- data/lib/version.rb +1 -1
- metadata +10 -4
data/lib/svc.rb
CHANGED
@@ -47,9 +47,8 @@ module SDM #:nodoc:
|
|
47
47
|
)
|
48
48
|
req = V1::AccessRequestListRequest.new()
|
49
49
|
req.meta = V1::ListRequestMetadata.new()
|
50
|
-
|
51
|
-
|
52
|
-
req.meta.limit = page_size_option
|
50
|
+
if @parent.page_limit > 0
|
51
|
+
req.meta.limit = @parent.page_limit
|
53
52
|
end
|
54
53
|
if not @parent.snapshot_time.nil?
|
55
54
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -126,9 +125,8 @@ module SDM #:nodoc:
|
|
126
125
|
)
|
127
126
|
req = V1::AccessRequestEventHistoryListRequest.new()
|
128
127
|
req.meta = V1::ListRequestMetadata.new()
|
129
|
-
|
130
|
-
|
131
|
-
req.meta.limit = page_size_option
|
128
|
+
if @parent.page_limit > 0
|
129
|
+
req.meta.limit = @parent.page_limit
|
132
130
|
end
|
133
131
|
if not @parent.snapshot_time.nil?
|
134
132
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -182,9 +180,8 @@ module SDM #:nodoc:
|
|
182
180
|
)
|
183
181
|
req = V1::AccessRequestHistoryListRequest.new()
|
184
182
|
req.meta = V1::ListRequestMetadata.new()
|
185
|
-
|
186
|
-
|
187
|
-
req.meta.limit = page_size_option
|
183
|
+
if @parent.page_limit > 0
|
184
|
+
req.meta.limit = @parent.page_limit
|
188
185
|
end
|
189
186
|
if not @parent.snapshot_time.nil?
|
190
187
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -331,9 +328,8 @@ module SDM #:nodoc:
|
|
331
328
|
)
|
332
329
|
req = V1::AccountAttachmentListRequest.new()
|
333
330
|
req.meta = V1::ListRequestMetadata.new()
|
334
|
-
|
335
|
-
|
336
|
-
req.meta.limit = page_size_option
|
331
|
+
if @parent.page_limit > 0
|
332
|
+
req.meta.limit = @parent.page_limit
|
337
333
|
end
|
338
334
|
if not @parent.snapshot_time.nil?
|
339
335
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -421,9 +417,8 @@ module SDM #:nodoc:
|
|
421
417
|
)
|
422
418
|
req = V1::AccountAttachmentHistoryListRequest.new()
|
423
419
|
req.meta = V1::ListRequestMetadata.new()
|
424
|
-
|
425
|
-
|
426
|
-
req.meta.limit = page_size_option
|
420
|
+
if @parent.page_limit > 0
|
421
|
+
req.meta.limit = @parent.page_limit
|
427
422
|
end
|
428
423
|
if not @parent.snapshot_time.nil?
|
429
424
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -570,9 +565,8 @@ module SDM #:nodoc:
|
|
570
565
|
)
|
571
566
|
req = V1::AccountGrantListRequest.new()
|
572
567
|
req.meta = V1::ListRequestMetadata.new()
|
573
|
-
|
574
|
-
|
575
|
-
req.meta.limit = page_size_option
|
568
|
+
if @parent.page_limit > 0
|
569
|
+
req.meta.limit = @parent.page_limit
|
576
570
|
end
|
577
571
|
if not @parent.snapshot_time.nil?
|
578
572
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -660,9 +654,8 @@ module SDM #:nodoc:
|
|
660
654
|
)
|
661
655
|
req = V1::AccountGrantHistoryListRequest.new()
|
662
656
|
req.meta = V1::ListRequestMetadata.new()
|
663
|
-
|
664
|
-
|
665
|
-
req.meta.limit = page_size_option
|
657
|
+
if @parent.page_limit > 0
|
658
|
+
req.meta.limit = @parent.page_limit
|
666
659
|
end
|
667
660
|
if not @parent.snapshot_time.nil?
|
668
661
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -717,9 +710,8 @@ module SDM #:nodoc:
|
|
717
710
|
)
|
718
711
|
req = V1::AccountPermissionListRequest.new()
|
719
712
|
req.meta = V1::ListRequestMetadata.new()
|
720
|
-
|
721
|
-
|
722
|
-
req.meta.limit = page_size_option
|
713
|
+
if @parent.page_limit > 0
|
714
|
+
req.meta.limit = @parent.page_limit
|
723
715
|
end
|
724
716
|
if not @parent.snapshot_time.nil?
|
725
717
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -797,9 +789,8 @@ module SDM #:nodoc:
|
|
797
789
|
)
|
798
790
|
req = V1::AccountResourceListRequest.new()
|
799
791
|
req.meta = V1::ListRequestMetadata.new()
|
800
|
-
|
801
|
-
|
802
|
-
req.meta.limit = page_size_option
|
792
|
+
if @parent.page_limit > 0
|
793
|
+
req.meta.limit = @parent.page_limit
|
803
794
|
end
|
804
795
|
if not @parent.snapshot_time.nil?
|
805
796
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -876,9 +867,8 @@ module SDM #:nodoc:
|
|
876
867
|
)
|
877
868
|
req = V1::AccountResourceHistoryListRequest.new()
|
878
869
|
req.meta = V1::ListRequestMetadata.new()
|
879
|
-
|
880
|
-
|
881
|
-
req.meta.limit = page_size_option
|
870
|
+
if @parent.page_limit > 0
|
871
|
+
req.meta.limit = @parent.page_limit
|
882
872
|
end
|
883
873
|
if not @parent.snapshot_time.nil?
|
884
874
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -1060,9 +1050,8 @@ module SDM #:nodoc:
|
|
1060
1050
|
)
|
1061
1051
|
req = V1::AccountListRequest.new()
|
1062
1052
|
req.meta = V1::ListRequestMetadata.new()
|
1063
|
-
|
1064
|
-
|
1065
|
-
req.meta.limit = page_size_option
|
1053
|
+
if @parent.page_limit > 0
|
1054
|
+
req.meta.limit = @parent.page_limit
|
1066
1055
|
end
|
1067
1056
|
if not @parent.snapshot_time.nil?
|
1068
1057
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -1150,9 +1139,8 @@ module SDM #:nodoc:
|
|
1150
1139
|
)
|
1151
1140
|
req = V1::AccountHistoryListRequest.new()
|
1152
1141
|
req.meta = V1::ListRequestMetadata.new()
|
1153
|
-
|
1154
|
-
|
1155
|
-
req.meta.limit = page_size_option
|
1142
|
+
if @parent.page_limit > 0
|
1143
|
+
req.meta.limit = @parent.page_limit
|
1156
1144
|
end
|
1157
1145
|
if not @parent.snapshot_time.nil?
|
1158
1146
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -1245,9 +1233,8 @@ module SDM #:nodoc:
|
|
1245
1233
|
)
|
1246
1234
|
req = V1::ActivityListRequest.new()
|
1247
1235
|
req.meta = V1::ListRequestMetadata.new()
|
1248
|
-
|
1249
|
-
|
1250
|
-
req.meta.limit = page_size_option
|
1236
|
+
if @parent.page_limit > 0
|
1237
|
+
req.meta.limit = @parent.page_limit
|
1251
1238
|
end
|
1252
1239
|
if not @parent.snapshot_time.nil?
|
1253
1240
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -1501,9 +1488,8 @@ module SDM #:nodoc:
|
|
1501
1488
|
)
|
1502
1489
|
req = V1::NodeListRequest.new()
|
1503
1490
|
req.meta = V1::ListRequestMetadata.new()
|
1504
|
-
|
1505
|
-
|
1506
|
-
req.meta.limit = page_size_option
|
1491
|
+
if @parent.page_limit > 0
|
1492
|
+
req.meta.limit = @parent.page_limit
|
1507
1493
|
end
|
1508
1494
|
if not @parent.snapshot_time.nil?
|
1509
1495
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -1591,9 +1577,8 @@ module SDM #:nodoc:
|
|
1591
1577
|
)
|
1592
1578
|
req = V1::NodeHistoryListRequest.new()
|
1593
1579
|
req.meta = V1::ListRequestMetadata.new()
|
1594
|
-
|
1595
|
-
|
1596
|
-
req.meta.limit = page_size_option
|
1580
|
+
if @parent.page_limit > 0
|
1581
|
+
req.meta.limit = @parent.page_limit
|
1597
1582
|
end
|
1598
1583
|
if not @parent.snapshot_time.nil?
|
1599
1584
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -1647,9 +1632,8 @@ module SDM #:nodoc:
|
|
1647
1632
|
)
|
1648
1633
|
req = V1::OrganizationHistoryListRequest.new()
|
1649
1634
|
req.meta = V1::ListRequestMetadata.new()
|
1650
|
-
|
1651
|
-
|
1652
|
-
req.meta.limit = page_size_option
|
1635
|
+
if @parent.page_limit > 0
|
1636
|
+
req.meta.limit = @parent.page_limit
|
1653
1637
|
end
|
1654
1638
|
if not @parent.snapshot_time.nil?
|
1655
1639
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -1796,9 +1780,8 @@ module SDM #:nodoc:
|
|
1796
1780
|
)
|
1797
1781
|
req = V1::PeeringGroupNodeListRequest.new()
|
1798
1782
|
req.meta = V1::ListRequestMetadata.new()
|
1799
|
-
|
1800
|
-
|
1801
|
-
req.meta.limit = page_size_option
|
1783
|
+
if @parent.page_limit > 0
|
1784
|
+
req.meta.limit = @parent.page_limit
|
1802
1785
|
end
|
1803
1786
|
if not @parent.snapshot_time.nil?
|
1804
1787
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -1979,9 +1962,8 @@ module SDM #:nodoc:
|
|
1979
1962
|
)
|
1980
1963
|
req = V1::PeeringGroupPeerListRequest.new()
|
1981
1964
|
req.meta = V1::ListRequestMetadata.new()
|
1982
|
-
|
1983
|
-
|
1984
|
-
req.meta.limit = page_size_option
|
1965
|
+
if @parent.page_limit > 0
|
1966
|
+
req.meta.limit = @parent.page_limit
|
1985
1967
|
end
|
1986
1968
|
if not @parent.snapshot_time.nil?
|
1987
1969
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -2162,9 +2144,8 @@ module SDM #:nodoc:
|
|
2162
2144
|
)
|
2163
2145
|
req = V1::PeeringGroupResourceListRequest.new()
|
2164
2146
|
req.meta = V1::ListRequestMetadata.new()
|
2165
|
-
|
2166
|
-
|
2167
|
-
req.meta.limit = page_size_option
|
2147
|
+
if @parent.page_limit > 0
|
2148
|
+
req.meta.limit = @parent.page_limit
|
2168
2149
|
end
|
2169
2150
|
if not @parent.snapshot_time.nil?
|
2170
2151
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -2345,9 +2326,8 @@ module SDM #:nodoc:
|
|
2345
2326
|
)
|
2346
2327
|
req = V1::PeeringGroupListRequest.new()
|
2347
2328
|
req.meta = V1::ListRequestMetadata.new()
|
2348
|
-
|
2349
|
-
|
2350
|
-
req.meta.limit = page_size_option
|
2329
|
+
if @parent.page_limit > 0
|
2330
|
+
req.meta.limit = @parent.page_limit
|
2351
2331
|
end
|
2352
2332
|
if not @parent.snapshot_time.nil?
|
2353
2333
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -2437,9 +2417,8 @@ module SDM #:nodoc:
|
|
2437
2417
|
)
|
2438
2418
|
req = V1::QueryListRequest.new()
|
2439
2419
|
req.meta = V1::ListRequestMetadata.new()
|
2440
|
-
|
2441
|
-
|
2442
|
-
req.meta.limit = page_size_option
|
2420
|
+
if @parent.page_limit > 0
|
2421
|
+
req.meta.limit = @parent.page_limit
|
2443
2422
|
end
|
2444
2423
|
if not @parent.snapshot_time.nil?
|
2445
2424
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -2616,9 +2595,8 @@ module SDM #:nodoc:
|
|
2616
2595
|
)
|
2617
2596
|
req = V1::RemoteIdentityListRequest.new()
|
2618
2597
|
req.meta = V1::ListRequestMetadata.new()
|
2619
|
-
|
2620
|
-
|
2621
|
-
req.meta.limit = page_size_option
|
2598
|
+
if @parent.page_limit > 0
|
2599
|
+
req.meta.limit = @parent.page_limit
|
2622
2600
|
end
|
2623
2601
|
if not @parent.snapshot_time.nil?
|
2624
2602
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -2706,9 +2684,8 @@ module SDM #:nodoc:
|
|
2706
2684
|
)
|
2707
2685
|
req = V1::RemoteIdentityHistoryListRequest.new()
|
2708
2686
|
req.meta = V1::ListRequestMetadata.new()
|
2709
|
-
|
2710
|
-
|
2711
|
-
req.meta.limit = page_size_option
|
2687
|
+
if @parent.page_limit > 0
|
2688
|
+
req.meta.limit = @parent.page_limit
|
2712
2689
|
end
|
2713
2690
|
if not @parent.snapshot_time.nil?
|
2714
2691
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -2797,9 +2774,8 @@ module SDM #:nodoc:
|
|
2797
2774
|
)
|
2798
2775
|
req = V1::RemoteIdentityGroupListRequest.new()
|
2799
2776
|
req.meta = V1::ListRequestMetadata.new()
|
2800
|
-
|
2801
|
-
|
2802
|
-
req.meta.limit = page_size_option
|
2777
|
+
if @parent.page_limit > 0
|
2778
|
+
req.meta.limit = @parent.page_limit
|
2803
2779
|
end
|
2804
2780
|
if not @parent.snapshot_time.nil?
|
2805
2781
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -2887,9 +2863,8 @@ module SDM #:nodoc:
|
|
2887
2863
|
)
|
2888
2864
|
req = V1::RemoteIdentityGroupHistoryListRequest.new()
|
2889
2865
|
req.meta = V1::ListRequestMetadata.new()
|
2890
|
-
|
2891
|
-
|
2892
|
-
req.meta.limit = page_size_option
|
2866
|
+
if @parent.page_limit > 0
|
2867
|
+
req.meta.limit = @parent.page_limit
|
2893
2868
|
end
|
2894
2869
|
if not @parent.snapshot_time.nil?
|
2895
2870
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -2944,9 +2919,8 @@ module SDM #:nodoc:
|
|
2944
2919
|
)
|
2945
2920
|
req = V1::ReplayListRequest.new()
|
2946
2921
|
req.meta = V1::ListRequestMetadata.new()
|
2947
|
-
|
2948
|
-
|
2949
|
-
req.meta.limit = page_size_option
|
2922
|
+
if @parent.page_limit > 0
|
2923
|
+
req.meta.limit = @parent.page_limit
|
2950
2924
|
end
|
2951
2925
|
if not @parent.snapshot_time.nil?
|
2952
2926
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -3082,9 +3056,8 @@ module SDM #:nodoc:
|
|
3082
3056
|
)
|
3083
3057
|
req = V1::EnumerateTagsRequest.new()
|
3084
3058
|
req.meta = V1::ListRequestMetadata.new()
|
3085
|
-
|
3086
|
-
|
3087
|
-
req.meta.limit = page_size_option
|
3059
|
+
if @parent.page_limit > 0
|
3060
|
+
req.meta.limit = @parent.page_limit
|
3088
3061
|
end
|
3089
3062
|
if not @parent.snapshot_time.nil?
|
3090
3063
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -3245,9 +3218,8 @@ module SDM #:nodoc:
|
|
3245
3218
|
)
|
3246
3219
|
req = V1::ResourceListRequest.new()
|
3247
3220
|
req.meta = V1::ListRequestMetadata.new()
|
3248
|
-
|
3249
|
-
|
3250
|
-
req.meta.limit = page_size_option
|
3221
|
+
if @parent.page_limit > 0
|
3222
|
+
req.meta.limit = @parent.page_limit
|
3251
3223
|
end
|
3252
3224
|
if not @parent.snapshot_time.nil?
|
3253
3225
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -3335,9 +3307,8 @@ module SDM #:nodoc:
|
|
3335
3307
|
)
|
3336
3308
|
req = V1::ResourceHistoryListRequest.new()
|
3337
3309
|
req.meta = V1::ListRequestMetadata.new()
|
3338
|
-
|
3339
|
-
|
3340
|
-
req.meta.limit = page_size_option
|
3310
|
+
if @parent.page_limit > 0
|
3311
|
+
req.meta.limit = @parent.page_limit
|
3341
3312
|
end
|
3342
3313
|
if not @parent.snapshot_time.nil?
|
3343
3314
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -3392,9 +3363,8 @@ module SDM #:nodoc:
|
|
3392
3363
|
)
|
3393
3364
|
req = V1::RoleResourceListRequest.new()
|
3394
3365
|
req.meta = V1::ListRequestMetadata.new()
|
3395
|
-
|
3396
|
-
|
3397
|
-
req.meta.limit = page_size_option
|
3366
|
+
if @parent.page_limit > 0
|
3367
|
+
req.meta.limit = @parent.page_limit
|
3398
3368
|
end
|
3399
3369
|
if not @parent.snapshot_time.nil?
|
3400
3370
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -3471,9 +3441,8 @@ module SDM #:nodoc:
|
|
3471
3441
|
)
|
3472
3442
|
req = V1::RoleResourceHistoryListRequest.new()
|
3473
3443
|
req.meta = V1::ListRequestMetadata.new()
|
3474
|
-
|
3475
|
-
|
3476
|
-
req.meta.limit = page_size_option
|
3444
|
+
if @parent.page_limit > 0
|
3445
|
+
req.meta.limit = @parent.page_limit
|
3477
3446
|
end
|
3478
3447
|
if not @parent.snapshot_time.nil?
|
3479
3448
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -3652,9 +3621,8 @@ module SDM #:nodoc:
|
|
3652
3621
|
)
|
3653
3622
|
req = V1::RoleListRequest.new()
|
3654
3623
|
req.meta = V1::ListRequestMetadata.new()
|
3655
|
-
|
3656
|
-
|
3657
|
-
req.meta.limit = page_size_option
|
3624
|
+
if @parent.page_limit > 0
|
3625
|
+
req.meta.limit = @parent.page_limit
|
3658
3626
|
end
|
3659
3627
|
if not @parent.snapshot_time.nil?
|
3660
3628
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -3742,9 +3710,8 @@ module SDM #:nodoc:
|
|
3742
3710
|
)
|
3743
3711
|
req = V1::RoleHistoryListRequest.new()
|
3744
3712
|
req.meta = V1::ListRequestMetadata.new()
|
3745
|
-
|
3746
|
-
|
3747
|
-
req.meta.limit = page_size_option
|
3713
|
+
if @parent.page_limit > 0
|
3714
|
+
req.meta.limit = @parent.page_limit
|
3748
3715
|
end
|
3749
3716
|
if not @parent.snapshot_time.nil?
|
3750
3717
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -3930,9 +3897,8 @@ module SDM #:nodoc:
|
|
3930
3897
|
)
|
3931
3898
|
req = V1::SecretStoreListRequest.new()
|
3932
3899
|
req.meta = V1::ListRequestMetadata.new()
|
3933
|
-
|
3934
|
-
|
3935
|
-
req.meta.limit = page_size_option
|
3900
|
+
if @parent.page_limit > 0
|
3901
|
+
req.meta.limit = @parent.page_limit
|
3936
3902
|
end
|
3937
3903
|
if not @parent.snapshot_time.nil?
|
3938
3904
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -4020,9 +3986,8 @@ module SDM #:nodoc:
|
|
4020
3986
|
)
|
4021
3987
|
req = V1::SecretStoreHistoryListRequest.new()
|
4022
3988
|
req.meta = V1::ListRequestMetadata.new()
|
4023
|
-
|
4024
|
-
|
4025
|
-
req.meta.limit = page_size_option
|
3989
|
+
if @parent.page_limit > 0
|
3990
|
+
req.meta.limit = @parent.page_limit
|
4026
3991
|
end
|
4027
3992
|
if not @parent.snapshot_time.nil?
|
4028
3993
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -4053,34 +4018,122 @@ module SDM #:nodoc:
|
|
4053
4018
|
end
|
4054
4019
|
end
|
4055
4020
|
|
4056
|
-
#
|
4057
|
-
# the users that can request that access, and the mechanism for approving those requests which can either
|
4058
|
-
# but automatic approval or a set of users authorized to approve the requests.
|
4021
|
+
# WorkflowApprovers is an account with the ability to approve requests bound to a workflow.
|
4059
4022
|
#
|
4060
|
-
# See {
|
4061
|
-
class
|
4023
|
+
# See {WorkflowApprover}.
|
4024
|
+
class WorkflowApprovers
|
4062
4025
|
extend Gem::Deprecate
|
4063
4026
|
|
4064
4027
|
def initialize(channel, parent)
|
4065
4028
|
begin
|
4066
|
-
@stub = V1::
|
4029
|
+
@stub = V1::WorkflowApprovers::Stub.new(nil, nil, channel_override: channel)
|
4067
4030
|
rescue => exception
|
4068
4031
|
raise Plumbing::convert_error_to_porcelain(exception)
|
4069
4032
|
end
|
4070
4033
|
@parent = parent
|
4071
4034
|
end
|
4072
4035
|
|
4073
|
-
#
|
4036
|
+
# Create creates a new workflow approver
|
4037
|
+
def create(
|
4038
|
+
workflow_approver,
|
4039
|
+
deadline: nil
|
4040
|
+
)
|
4041
|
+
req = V1::WorkflowApproversCreateRequest.new()
|
4042
|
+
|
4043
|
+
req.workflow_approver = Plumbing::convert_workflow_approver_to_plumbing(workflow_approver)
|
4044
|
+
tries = 0
|
4045
|
+
plumbing_response = nil
|
4046
|
+
loop do
|
4047
|
+
begin
|
4048
|
+
plumbing_response = @stub.create(req, metadata: @parent.get_metadata("WorkflowApprovers.Create", req), deadline: deadline)
|
4049
|
+
rescue => exception
|
4050
|
+
if (@parent.shouldRetry(tries, exception))
|
4051
|
+
tries + +@parent.jitterSleep(tries)
|
4052
|
+
next
|
4053
|
+
end
|
4054
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
4055
|
+
end
|
4056
|
+
break
|
4057
|
+
end
|
4058
|
+
|
4059
|
+
resp = WorkflowApproversCreateResponse.new()
|
4060
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
4061
|
+
resp.workflow_approver = Plumbing::convert_workflow_approver_to_porcelain(plumbing_response.workflow_approver)
|
4062
|
+
resp
|
4063
|
+
end
|
4064
|
+
|
4065
|
+
# Get reads one workflow approver by ID.
|
4066
|
+
def get(
|
4067
|
+
id,
|
4068
|
+
deadline: nil
|
4069
|
+
)
|
4070
|
+
req = V1::WorkflowApproverGetRequest.new()
|
4071
|
+
if not @parent.snapshot_time.nil?
|
4072
|
+
req.meta = V1::GetRequestMetadata.new()
|
4073
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
4074
|
+
end
|
4075
|
+
|
4076
|
+
req.id = (id)
|
4077
|
+
tries = 0
|
4078
|
+
plumbing_response = nil
|
4079
|
+
loop do
|
4080
|
+
begin
|
4081
|
+
plumbing_response = @stub.get(req, metadata: @parent.get_metadata("WorkflowApprovers.Get", req), deadline: deadline)
|
4082
|
+
rescue => exception
|
4083
|
+
if (@parent.shouldRetry(tries, exception))
|
4084
|
+
tries + +@parent.jitterSleep(tries)
|
4085
|
+
next
|
4086
|
+
end
|
4087
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
4088
|
+
end
|
4089
|
+
break
|
4090
|
+
end
|
4091
|
+
|
4092
|
+
resp = WorkflowApproverGetResponse.new()
|
4093
|
+
resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
|
4094
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
4095
|
+
resp.workflow_approver = Plumbing::convert_workflow_approver_to_porcelain(plumbing_response.workflow_approver)
|
4096
|
+
resp
|
4097
|
+
end
|
4098
|
+
|
4099
|
+
# Delete deletes a workflow approver
|
4100
|
+
def delete(
|
4101
|
+
id,
|
4102
|
+
deadline: nil
|
4103
|
+
)
|
4104
|
+
req = V1::WorkflowApproversDeleteRequest.new()
|
4105
|
+
|
4106
|
+
req.id = (id)
|
4107
|
+
tries = 0
|
4108
|
+
plumbing_response = nil
|
4109
|
+
loop do
|
4110
|
+
begin
|
4111
|
+
plumbing_response = @stub.delete(req, metadata: @parent.get_metadata("WorkflowApprovers.Delete", req), deadline: deadline)
|
4112
|
+
rescue => exception
|
4113
|
+
if (@parent.shouldRetry(tries, exception))
|
4114
|
+
tries + +@parent.jitterSleep(tries)
|
4115
|
+
next
|
4116
|
+
end
|
4117
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
4118
|
+
end
|
4119
|
+
break
|
4120
|
+
end
|
4121
|
+
|
4122
|
+
resp = WorkflowApproversDeleteResponse.new()
|
4123
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
4124
|
+
resp
|
4125
|
+
end
|
4126
|
+
|
4127
|
+
# Lists existing workflow approvers.
|
4074
4128
|
def list(
|
4075
4129
|
filter,
|
4076
4130
|
*args,
|
4077
4131
|
deadline: nil
|
4078
4132
|
)
|
4079
|
-
req = V1::
|
4133
|
+
req = V1::WorkflowApproversListRequest.new()
|
4080
4134
|
req.meta = V1::ListRequestMetadata.new()
|
4081
|
-
|
4082
|
-
|
4083
|
-
req.meta.limit = page_size_option
|
4135
|
+
if @parent.page_limit > 0
|
4136
|
+
req.meta.limit = @parent.page_limit
|
4084
4137
|
end
|
4085
4138
|
if not @parent.snapshot_time.nil?
|
4086
4139
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -4091,7 +4144,7 @@ module SDM #:nodoc:
|
|
4091
4144
|
tries = 0
|
4092
4145
|
loop do
|
4093
4146
|
begin
|
4094
|
-
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("
|
4147
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("WorkflowApprovers.List", req), deadline: deadline)
|
4095
4148
|
rescue => exception
|
4096
4149
|
if (@parent.shouldRetry(tries, exception))
|
4097
4150
|
tries + +@parent.jitterSleep(tries)
|
@@ -4100,8 +4153,8 @@ module SDM #:nodoc:
|
|
4100
4153
|
raise Plumbing::convert_error_to_porcelain(exception)
|
4101
4154
|
end
|
4102
4155
|
tries = 0
|
4103
|
-
plumbing_response.
|
4104
|
-
g.yield Plumbing::
|
4156
|
+
plumbing_response.workflow_approvers.each do |plumbing_item|
|
4157
|
+
g.yield Plumbing::convert_workflow_approver_to_porcelain(plumbing_item)
|
4105
4158
|
end
|
4106
4159
|
break if plumbing_response.meta.next_cursor == ""
|
4107
4160
|
req.meta.cursor = plumbing_response.meta.next_cursor
|
@@ -4111,22 +4164,33 @@ module SDM #:nodoc:
|
|
4111
4164
|
end
|
4112
4165
|
end
|
4113
4166
|
|
4114
|
-
#
|
4167
|
+
# SnapshotWorkflowApprovers exposes the read only methods of the WorkflowApprovers
|
4115
4168
|
# service for historical queries.
|
4116
|
-
class
|
4169
|
+
class SnapshotWorkflowApprovers
|
4117
4170
|
extend Gem::Deprecate
|
4118
4171
|
|
4119
|
-
def initialize(
|
4120
|
-
@
|
4172
|
+
def initialize(workflow_approvers)
|
4173
|
+
@workflow_approvers = workflow_approvers
|
4121
4174
|
end
|
4122
4175
|
|
4123
|
-
#
|
4176
|
+
# Get reads one workflow approver by ID.
|
4177
|
+
def get(
|
4178
|
+
id,
|
4179
|
+
deadline: nil
|
4180
|
+
)
|
4181
|
+
return @workflow_approvers.get(
|
4182
|
+
id,
|
4183
|
+
deadline: deadline,
|
4184
|
+
)
|
4185
|
+
end
|
4186
|
+
|
4187
|
+
# Lists existing workflow approvers.
|
4124
4188
|
def list(
|
4125
4189
|
filter,
|
4126
4190
|
*args,
|
4127
4191
|
deadline: nil
|
4128
4192
|
)
|
4129
|
-
return @
|
4193
|
+
return @workflow_approvers.list(
|
4130
4194
|
filter,
|
4131
4195
|
*args,
|
4132
4196
|
deadline: deadline,
|
@@ -4157,9 +4221,8 @@ module SDM #:nodoc:
|
|
4157
4221
|
)
|
4158
4222
|
req = V1::WorkflowApproversHistoryListRequest.new()
|
4159
4223
|
req.meta = V1::ListRequestMetadata.new()
|
4160
|
-
|
4161
|
-
|
4162
|
-
req.meta.limit = page_size_option
|
4224
|
+
if @parent.page_limit > 0
|
4225
|
+
req.meta.limit = @parent.page_limit
|
4163
4226
|
end
|
4164
4227
|
if not @parent.snapshot_time.nil?
|
4165
4228
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -4190,6 +4253,85 @@ module SDM #:nodoc:
|
|
4190
4253
|
end
|
4191
4254
|
end
|
4192
4255
|
|
4256
|
+
# WorkflowAssignments links a Resource to a Workflow. The assigned resources are those that a user can request
|
4257
|
+
# access to via the workflow.
|
4258
|
+
#
|
4259
|
+
# See {WorkflowAssignment}.
|
4260
|
+
class WorkflowAssignments
|
4261
|
+
extend Gem::Deprecate
|
4262
|
+
|
4263
|
+
def initialize(channel, parent)
|
4264
|
+
begin
|
4265
|
+
@stub = V1::WorkflowAssignments::Stub.new(nil, nil, channel_override: channel)
|
4266
|
+
rescue => exception
|
4267
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
4268
|
+
end
|
4269
|
+
@parent = parent
|
4270
|
+
end
|
4271
|
+
|
4272
|
+
# Lists existing workflow assignments.
|
4273
|
+
def list(
|
4274
|
+
filter,
|
4275
|
+
*args,
|
4276
|
+
deadline: nil
|
4277
|
+
)
|
4278
|
+
req = V1::WorkflowAssignmentsListRequest.new()
|
4279
|
+
req.meta = V1::ListRequestMetadata.new()
|
4280
|
+
if @parent.page_limit > 0
|
4281
|
+
req.meta.limit = @parent.page_limit
|
4282
|
+
end
|
4283
|
+
if not @parent.snapshot_time.nil?
|
4284
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
4285
|
+
end
|
4286
|
+
|
4287
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
4288
|
+
resp = Enumerator::Generator.new { |g|
|
4289
|
+
tries = 0
|
4290
|
+
loop do
|
4291
|
+
begin
|
4292
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("WorkflowAssignments.List", req), deadline: deadline)
|
4293
|
+
rescue => exception
|
4294
|
+
if (@parent.shouldRetry(tries, exception))
|
4295
|
+
tries + +@parent.jitterSleep(tries)
|
4296
|
+
next
|
4297
|
+
end
|
4298
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
4299
|
+
end
|
4300
|
+
tries = 0
|
4301
|
+
plumbing_response.workflow_assignments.each do |plumbing_item|
|
4302
|
+
g.yield Plumbing::convert_workflow_assignment_to_porcelain(plumbing_item)
|
4303
|
+
end
|
4304
|
+
break if plumbing_response.meta.next_cursor == ""
|
4305
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
4306
|
+
end
|
4307
|
+
}
|
4308
|
+
resp
|
4309
|
+
end
|
4310
|
+
end
|
4311
|
+
|
4312
|
+
# SnapshotWorkflowAssignments exposes the read only methods of the WorkflowAssignments
|
4313
|
+
# service for historical queries.
|
4314
|
+
class SnapshotWorkflowAssignments
|
4315
|
+
extend Gem::Deprecate
|
4316
|
+
|
4317
|
+
def initialize(workflow_assignments)
|
4318
|
+
@workflow_assignments = workflow_assignments
|
4319
|
+
end
|
4320
|
+
|
4321
|
+
# Lists existing workflow assignments.
|
4322
|
+
def list(
|
4323
|
+
filter,
|
4324
|
+
*args,
|
4325
|
+
deadline: nil
|
4326
|
+
)
|
4327
|
+
return @workflow_assignments.list(
|
4328
|
+
filter,
|
4329
|
+
*args,
|
4330
|
+
deadline: deadline,
|
4331
|
+
)
|
4332
|
+
end
|
4333
|
+
end
|
4334
|
+
|
4193
4335
|
# WorkflowAssignmentsHistory provides records of all changes to the state of a WorkflowAssignment.
|
4194
4336
|
#
|
4195
4337
|
# See {WorkflowAssignmentHistory}.
|
@@ -4213,9 +4355,8 @@ module SDM #:nodoc:
|
|
4213
4355
|
)
|
4214
4356
|
req = V1::WorkflowAssignmentsHistoryListRequest.new()
|
4215
4357
|
req.meta = V1::ListRequestMetadata.new()
|
4216
|
-
|
4217
|
-
|
4218
|
-
req.meta.limit = page_size_option
|
4358
|
+
if @parent.page_limit > 0
|
4359
|
+
req.meta.limit = @parent.page_limit
|
4219
4360
|
end
|
4220
4361
|
if not @parent.snapshot_time.nil?
|
4221
4362
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -4246,6 +4387,187 @@ module SDM #:nodoc:
|
|
4246
4387
|
end
|
4247
4388
|
end
|
4248
4389
|
|
4390
|
+
# WorkflowRole links a role to a workflow. The linked roles indicate which roles a user must be a part of
|
4391
|
+
# to request access to a resource via the workflow.
|
4392
|
+
#
|
4393
|
+
# See {WorkflowRole}.
|
4394
|
+
class WorkflowRoles
|
4395
|
+
extend Gem::Deprecate
|
4396
|
+
|
4397
|
+
def initialize(channel, parent)
|
4398
|
+
begin
|
4399
|
+
@stub = V1::WorkflowRoles::Stub.new(nil, nil, channel_override: channel)
|
4400
|
+
rescue => exception
|
4401
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
4402
|
+
end
|
4403
|
+
@parent = parent
|
4404
|
+
end
|
4405
|
+
|
4406
|
+
# Create creates a new workflow role
|
4407
|
+
def create(
|
4408
|
+
workflow_role,
|
4409
|
+
deadline: nil
|
4410
|
+
)
|
4411
|
+
req = V1::WorkflowRolesCreateRequest.new()
|
4412
|
+
|
4413
|
+
req.workflow_role = Plumbing::convert_workflow_role_to_plumbing(workflow_role)
|
4414
|
+
tries = 0
|
4415
|
+
plumbing_response = nil
|
4416
|
+
loop do
|
4417
|
+
begin
|
4418
|
+
plumbing_response = @stub.create(req, metadata: @parent.get_metadata("WorkflowRoles.Create", req), deadline: deadline)
|
4419
|
+
rescue => exception
|
4420
|
+
if (@parent.shouldRetry(tries, exception))
|
4421
|
+
tries + +@parent.jitterSleep(tries)
|
4422
|
+
next
|
4423
|
+
end
|
4424
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
4425
|
+
end
|
4426
|
+
break
|
4427
|
+
end
|
4428
|
+
|
4429
|
+
resp = WorkflowRolesCreateResponse.new()
|
4430
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
4431
|
+
resp.workflow_role = Plumbing::convert_workflow_role_to_porcelain(plumbing_response.workflow_role)
|
4432
|
+
resp
|
4433
|
+
end
|
4434
|
+
|
4435
|
+
# Get reads one workflow role by ID.
|
4436
|
+
def get(
|
4437
|
+
id,
|
4438
|
+
deadline: nil
|
4439
|
+
)
|
4440
|
+
req = V1::WorkflowRoleGetRequest.new()
|
4441
|
+
if not @parent.snapshot_time.nil?
|
4442
|
+
req.meta = V1::GetRequestMetadata.new()
|
4443
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
4444
|
+
end
|
4445
|
+
|
4446
|
+
req.id = (id)
|
4447
|
+
tries = 0
|
4448
|
+
plumbing_response = nil
|
4449
|
+
loop do
|
4450
|
+
begin
|
4451
|
+
plumbing_response = @stub.get(req, metadata: @parent.get_metadata("WorkflowRoles.Get", req), deadline: deadline)
|
4452
|
+
rescue => exception
|
4453
|
+
if (@parent.shouldRetry(tries, exception))
|
4454
|
+
tries + +@parent.jitterSleep(tries)
|
4455
|
+
next
|
4456
|
+
end
|
4457
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
4458
|
+
end
|
4459
|
+
break
|
4460
|
+
end
|
4461
|
+
|
4462
|
+
resp = WorkflowRoleGetResponse.new()
|
4463
|
+
resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
|
4464
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
4465
|
+
resp.workflow_role = Plumbing::convert_workflow_role_to_porcelain(plumbing_response.workflow_role)
|
4466
|
+
resp
|
4467
|
+
end
|
4468
|
+
|
4469
|
+
# Delete deletes a workflow role
|
4470
|
+
def delete(
|
4471
|
+
id,
|
4472
|
+
deadline: nil
|
4473
|
+
)
|
4474
|
+
req = V1::WorkflowRolesDeleteRequest.new()
|
4475
|
+
|
4476
|
+
req.id = (id)
|
4477
|
+
tries = 0
|
4478
|
+
plumbing_response = nil
|
4479
|
+
loop do
|
4480
|
+
begin
|
4481
|
+
plumbing_response = @stub.delete(req, metadata: @parent.get_metadata("WorkflowRoles.Delete", req), deadline: deadline)
|
4482
|
+
rescue => exception
|
4483
|
+
if (@parent.shouldRetry(tries, exception))
|
4484
|
+
tries + +@parent.jitterSleep(tries)
|
4485
|
+
next
|
4486
|
+
end
|
4487
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
4488
|
+
end
|
4489
|
+
break
|
4490
|
+
end
|
4491
|
+
|
4492
|
+
resp = WorkflowRolesDeleteResponse.new()
|
4493
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
4494
|
+
resp
|
4495
|
+
end
|
4496
|
+
|
4497
|
+
# Lists existing workflow roles.
|
4498
|
+
def list(
|
4499
|
+
filter,
|
4500
|
+
*args,
|
4501
|
+
deadline: nil
|
4502
|
+
)
|
4503
|
+
req = V1::WorkflowRolesListRequest.new()
|
4504
|
+
req.meta = V1::ListRequestMetadata.new()
|
4505
|
+
if @parent.page_limit > 0
|
4506
|
+
req.meta.limit = @parent.page_limit
|
4507
|
+
end
|
4508
|
+
if not @parent.snapshot_time.nil?
|
4509
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
4510
|
+
end
|
4511
|
+
|
4512
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
4513
|
+
resp = Enumerator::Generator.new { |g|
|
4514
|
+
tries = 0
|
4515
|
+
loop do
|
4516
|
+
begin
|
4517
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("WorkflowRoles.List", req), deadline: deadline)
|
4518
|
+
rescue => exception
|
4519
|
+
if (@parent.shouldRetry(tries, exception))
|
4520
|
+
tries + +@parent.jitterSleep(tries)
|
4521
|
+
next
|
4522
|
+
end
|
4523
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
4524
|
+
end
|
4525
|
+
tries = 0
|
4526
|
+
plumbing_response.workflow_role.each do |plumbing_item|
|
4527
|
+
g.yield Plumbing::convert_workflow_role_to_porcelain(plumbing_item)
|
4528
|
+
end
|
4529
|
+
break if plumbing_response.meta.next_cursor == ""
|
4530
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
4531
|
+
end
|
4532
|
+
}
|
4533
|
+
resp
|
4534
|
+
end
|
4535
|
+
end
|
4536
|
+
|
4537
|
+
# SnapshotWorkflowRoles exposes the read only methods of the WorkflowRoles
|
4538
|
+
# service for historical queries.
|
4539
|
+
class SnapshotWorkflowRoles
|
4540
|
+
extend Gem::Deprecate
|
4541
|
+
|
4542
|
+
def initialize(workflow_roles)
|
4543
|
+
@workflow_roles = workflow_roles
|
4544
|
+
end
|
4545
|
+
|
4546
|
+
# Get reads one workflow role by ID.
|
4547
|
+
def get(
|
4548
|
+
id,
|
4549
|
+
deadline: nil
|
4550
|
+
)
|
4551
|
+
return @workflow_roles.get(
|
4552
|
+
id,
|
4553
|
+
deadline: deadline,
|
4554
|
+
)
|
4555
|
+
end
|
4556
|
+
|
4557
|
+
# Lists existing workflow roles.
|
4558
|
+
def list(
|
4559
|
+
filter,
|
4560
|
+
*args,
|
4561
|
+
deadline: nil
|
4562
|
+
)
|
4563
|
+
return @workflow_roles.list(
|
4564
|
+
filter,
|
4565
|
+
*args,
|
4566
|
+
deadline: deadline,
|
4567
|
+
)
|
4568
|
+
end
|
4569
|
+
end
|
4570
|
+
|
4249
4571
|
# WorkflowRolesHistory provides records of all changes to the state of a WorkflowRole
|
4250
4572
|
#
|
4251
4573
|
# See {WorkflowRoleHistory}.
|
@@ -4269,9 +4591,8 @@ module SDM #:nodoc:
|
|
4269
4591
|
)
|
4270
4592
|
req = V1::WorkflowRolesHistoryListRequest.new()
|
4271
4593
|
req.meta = V1::ListRequestMetadata.new()
|
4272
|
-
|
4273
|
-
|
4274
|
-
req.meta.limit = page_size_option
|
4594
|
+
if @parent.page_limit > 0
|
4595
|
+
req.meta.limit = @parent.page_limit
|
4275
4596
|
end
|
4276
4597
|
if not @parent.snapshot_time.nil?
|
4277
4598
|
req.meta.snapshot_at = @parent.snapshot_time
|
@@ -4302,6 +4623,218 @@ module SDM #:nodoc:
|
|
4302
4623
|
end
|
4303
4624
|
end
|
4304
4625
|
|
4626
|
+
# Workflows are the collection of rules that define the resources to which access can be requested,
|
4627
|
+
# the users that can request that access, and the mechanism for approving those requests which can either
|
4628
|
+
# be automatic approval or a set of users authorized to approve the requests.
|
4629
|
+
#
|
4630
|
+
# See {Workflow}.
|
4631
|
+
class Workflows
|
4632
|
+
extend Gem::Deprecate
|
4633
|
+
|
4634
|
+
def initialize(channel, parent)
|
4635
|
+
begin
|
4636
|
+
@stub = V1::Workflows::Stub.new(nil, nil, channel_override: channel)
|
4637
|
+
rescue => exception
|
4638
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
4639
|
+
end
|
4640
|
+
@parent = parent
|
4641
|
+
end
|
4642
|
+
|
4643
|
+
# Create creates a new workflow and requires a name for the workflow.
|
4644
|
+
def create(
|
4645
|
+
workflow,
|
4646
|
+
deadline: nil
|
4647
|
+
)
|
4648
|
+
req = V1::WorkflowCreateRequest.new()
|
4649
|
+
|
4650
|
+
req.workflow = Plumbing::convert_workflow_to_plumbing(workflow)
|
4651
|
+
tries = 0
|
4652
|
+
plumbing_response = nil
|
4653
|
+
loop do
|
4654
|
+
begin
|
4655
|
+
plumbing_response = @stub.create(req, metadata: @parent.get_metadata("Workflows.Create", req), deadline: deadline)
|
4656
|
+
rescue => exception
|
4657
|
+
if (@parent.shouldRetry(tries, exception))
|
4658
|
+
tries + +@parent.jitterSleep(tries)
|
4659
|
+
next
|
4660
|
+
end
|
4661
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
4662
|
+
end
|
4663
|
+
break
|
4664
|
+
end
|
4665
|
+
|
4666
|
+
resp = WorkflowCreateResponse.new()
|
4667
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
4668
|
+
resp.workflow = Plumbing::convert_workflow_to_porcelain(plumbing_response.workflow)
|
4669
|
+
resp
|
4670
|
+
end
|
4671
|
+
|
4672
|
+
# Get reads one workflow by ID.
|
4673
|
+
def get(
|
4674
|
+
id,
|
4675
|
+
deadline: nil
|
4676
|
+
)
|
4677
|
+
req = V1::WorkflowGetRequest.new()
|
4678
|
+
if not @parent.snapshot_time.nil?
|
4679
|
+
req.meta = V1::GetRequestMetadata.new()
|
4680
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
4681
|
+
end
|
4682
|
+
|
4683
|
+
req.id = (id)
|
4684
|
+
tries = 0
|
4685
|
+
plumbing_response = nil
|
4686
|
+
loop do
|
4687
|
+
begin
|
4688
|
+
plumbing_response = @stub.get(req, metadata: @parent.get_metadata("Workflows.Get", req), deadline: deadline)
|
4689
|
+
rescue => exception
|
4690
|
+
if (@parent.shouldRetry(tries, exception))
|
4691
|
+
tries + +@parent.jitterSleep(tries)
|
4692
|
+
next
|
4693
|
+
end
|
4694
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
4695
|
+
end
|
4696
|
+
break
|
4697
|
+
end
|
4698
|
+
|
4699
|
+
resp = WorkflowGetResponse.new()
|
4700
|
+
resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
|
4701
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
4702
|
+
resp.workflow = Plumbing::convert_workflow_to_porcelain(plumbing_response.workflow)
|
4703
|
+
resp
|
4704
|
+
end
|
4705
|
+
|
4706
|
+
# Delete deletes an existing workflow.
|
4707
|
+
def delete(
|
4708
|
+
id,
|
4709
|
+
deadline: nil
|
4710
|
+
)
|
4711
|
+
req = V1::WorkflowDeleteRequest.new()
|
4712
|
+
|
4713
|
+
req.id = (id)
|
4714
|
+
tries = 0
|
4715
|
+
plumbing_response = nil
|
4716
|
+
loop do
|
4717
|
+
begin
|
4718
|
+
plumbing_response = @stub.delete(req, metadata: @parent.get_metadata("Workflows.Delete", req), deadline: deadline)
|
4719
|
+
rescue => exception
|
4720
|
+
if (@parent.shouldRetry(tries, exception))
|
4721
|
+
tries + +@parent.jitterSleep(tries)
|
4722
|
+
next
|
4723
|
+
end
|
4724
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
4725
|
+
end
|
4726
|
+
break
|
4727
|
+
end
|
4728
|
+
|
4729
|
+
resp = WorkflowDeleteResponse.new()
|
4730
|
+
resp.id = (plumbing_response.id)
|
4731
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
4732
|
+
resp
|
4733
|
+
end
|
4734
|
+
|
4735
|
+
# Update updates an existing workflow.
|
4736
|
+
def update(
|
4737
|
+
workflow,
|
4738
|
+
deadline: nil
|
4739
|
+
)
|
4740
|
+
req = V1::WorkflowUpdateRequest.new()
|
4741
|
+
|
4742
|
+
req.workflow = Plumbing::convert_workflow_to_plumbing(workflow)
|
4743
|
+
tries = 0
|
4744
|
+
plumbing_response = nil
|
4745
|
+
loop do
|
4746
|
+
begin
|
4747
|
+
plumbing_response = @stub.update(req, metadata: @parent.get_metadata("Workflows.Update", req), deadline: deadline)
|
4748
|
+
rescue => exception
|
4749
|
+
if (@parent.shouldRetry(tries, exception))
|
4750
|
+
tries + +@parent.jitterSleep(tries)
|
4751
|
+
next
|
4752
|
+
end
|
4753
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
4754
|
+
end
|
4755
|
+
break
|
4756
|
+
end
|
4757
|
+
|
4758
|
+
resp = WorkflowUpdateResponse.new()
|
4759
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
4760
|
+
resp.workflow = Plumbing::convert_workflow_to_porcelain(plumbing_response.workflow)
|
4761
|
+
resp
|
4762
|
+
end
|
4763
|
+
|
4764
|
+
# Lists existing workflows.
|
4765
|
+
def list(
|
4766
|
+
filter,
|
4767
|
+
*args,
|
4768
|
+
deadline: nil
|
4769
|
+
)
|
4770
|
+
req = V1::WorkflowListRequest.new()
|
4771
|
+
req.meta = V1::ListRequestMetadata.new()
|
4772
|
+
if @parent.page_limit > 0
|
4773
|
+
req.meta.limit = @parent.page_limit
|
4774
|
+
end
|
4775
|
+
if not @parent.snapshot_time.nil?
|
4776
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
4777
|
+
end
|
4778
|
+
|
4779
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
4780
|
+
resp = Enumerator::Generator.new { |g|
|
4781
|
+
tries = 0
|
4782
|
+
loop do
|
4783
|
+
begin
|
4784
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("Workflows.List", req), deadline: deadline)
|
4785
|
+
rescue => exception
|
4786
|
+
if (@parent.shouldRetry(tries, exception))
|
4787
|
+
tries + +@parent.jitterSleep(tries)
|
4788
|
+
next
|
4789
|
+
end
|
4790
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
4791
|
+
end
|
4792
|
+
tries = 0
|
4793
|
+
plumbing_response.workflows.each do |plumbing_item|
|
4794
|
+
g.yield Plumbing::convert_workflow_to_porcelain(plumbing_item)
|
4795
|
+
end
|
4796
|
+
break if plumbing_response.meta.next_cursor == ""
|
4797
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
4798
|
+
end
|
4799
|
+
}
|
4800
|
+
resp
|
4801
|
+
end
|
4802
|
+
end
|
4803
|
+
|
4804
|
+
# SnapshotWorkflows exposes the read only methods of the Workflows
|
4805
|
+
# service for historical queries.
|
4806
|
+
class SnapshotWorkflows
|
4807
|
+
extend Gem::Deprecate
|
4808
|
+
|
4809
|
+
def initialize(workflows)
|
4810
|
+
@workflows = workflows
|
4811
|
+
end
|
4812
|
+
|
4813
|
+
# Get reads one workflow by ID.
|
4814
|
+
def get(
|
4815
|
+
id,
|
4816
|
+
deadline: nil
|
4817
|
+
)
|
4818
|
+
return @workflows.get(
|
4819
|
+
id,
|
4820
|
+
deadline: deadline,
|
4821
|
+
)
|
4822
|
+
end
|
4823
|
+
|
4824
|
+
# Lists existing workflows.
|
4825
|
+
def list(
|
4826
|
+
filter,
|
4827
|
+
*args,
|
4828
|
+
deadline: nil
|
4829
|
+
)
|
4830
|
+
return @workflows.list(
|
4831
|
+
filter,
|
4832
|
+
*args,
|
4833
|
+
deadline: deadline,
|
4834
|
+
)
|
4835
|
+
end
|
4836
|
+
end
|
4837
|
+
|
4305
4838
|
# WorkflowsHistory provides records of all changes to the state of a Workflow.
|
4306
4839
|
#
|
4307
4840
|
# See {WorkflowHistory}.
|
@@ -4325,9 +4858,8 @@ module SDM #:nodoc:
|
|
4325
4858
|
)
|
4326
4859
|
req = V1::WorkflowHistoryListRequest.new()
|
4327
4860
|
req.meta = V1::ListRequestMetadata.new()
|
4328
|
-
|
4329
|
-
|
4330
|
-
req.meta.limit = page_size_option
|
4861
|
+
if @parent.page_limit > 0
|
4862
|
+
req.meta.limit = @parent.page_limit
|
4331
4863
|
end
|
4332
4864
|
if not @parent.snapshot_time.nil?
|
4333
4865
|
req.meta.snapshot_at = @parent.snapshot_time
|