nominal-api 0.1196.0

API bindings for the Nominal platform
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
// This file is @generated by prost-build.
/// A procedure execution node is either a section or a step.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProcedureExecutionNode {
    #[prost(oneof = "procedure_execution_node::Node", tags = "1, 2")]
    pub node: ::core::option::Option<procedure_execution_node::Node>,
}
/// Nested message and enum types in `ProcedureExecutionNode`.
pub mod procedure_execution_node {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Node {
        /// A section node is a visual grouping of other sections and steps.
        /// Execution sections are static and do not have execution state.
        #[prost(message, tag = "1")]
        Section(super::ProcedureExecutionSectionNode),
        /// Execution steps are the interactive steps in a procedure.
        #[prost(message, tag = "2")]
        Step(super::ProcedureExecutionStepNode),
    }
}
/// A section node is a visual grouping of other sections and steps.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProcedureExecutionSectionNode {
    /// Unique identifier of this execution node.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Unique identifier of the template node this execution node is based on.
    #[prost(string, tag = "2")]
    pub template_node_id: ::prost::alloc::string::String,
    /// Title of this section. Uses the template section's title and cannot be changed in execution.
    #[prost(string, tag = "3")]
    pub title: ::prost::alloc::string::String,
    /// Description of this section. Uses the template section's description and cannot be changed in execution.
    #[prost(string, optional, tag = "4")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    /// If set, the commit ID of the procedure template this section is based on.
    /// Otherwise, the section is based on the template commit specified at the top level of the execution.
    #[prost(string, optional, tag = "5")]
    pub template_commit_id: ::core::option::Option<::prost::alloc::string::String>,
}
/// Execution steps are the interactive steps in a procedure.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProcedureExecutionStepNode {
    /// Unique identifier of this execution node.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Unique identifier of the template node this execution node is based on.
    #[prost(string, tag = "2")]
    pub template_node_id: ::prost::alloc::string::String,
    /// Execution steps become "outdated" once any upstream steps are re-run
    /// An outdated execution step should not be further modified.
    #[prost(bool, tag = "3")]
    pub is_outdated: bool,
    /// The current status of the step along with metadata about the status transitions.
    #[prost(message, optional, tag = "4")]
    pub state: ::core::option::Option<ExecutionStepState>,
    /// The current value for the content of the step.
    #[prost(message, optional, tag = "5")]
    pub value: ::core::option::Option<StepContentValue>,
    /// Whether the step has auto-proceed enabled.
    #[prost(message, optional, tag = "6")]
    pub auto_proceed_config: ::core::option::Option<super::super::v1::AutoProceedConfig>,
    /// Completion_condition_status is the status of the completion condition for the step
    /// The backend manages this property and will update it while it monitors the
    /// completion_condition if set.
    /// This property will be unset if no completion_condition is set on the step or
    /// if the execution step's contents has not been submitted yet.
    #[prost(message, optional, tag = "7")]
    pub success_condition_status: ::core::option::Option<SuccessConditionStatus>,
    /// Completion_action_statuses are the status of the completion actions for the step
    /// The backend manages this property and will update it after performing
    /// completion_actions.
    #[prost(message, repeated, tag = "8")]
    pub completion_action_statuses: ::prost::alloc::vec::Vec<CompletionActionStatus>,
    /// Outputs are the values of the fields within this step, set by the backend after the step has reached
    /// the SUCCEEDED state.
    /// The backend will know how to introspect the node and determine these values, for example looking for
    /// form fields with ids in a FormStep.
    /// These outputs can be consumed by other steps later in the procedure by referencing `{output_id}:{field_id}`
    #[prost(map = "string, message", tag = "10")]
    pub outputs: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        FieldOutput,
    >,
    /// If set, the commit ID of the procedure template this step is based on.
    /// Otherwise, the step is based on the template commit specified at the top level of the execution.
    #[prost(string, optional, tag = "11")]
    pub template_commit_id: ::core::option::Option<::prost::alloc::string::String>,
}
/// All execution steps start in the NOT_STARTED state.
/// In this state, the step's values can be modified by the user.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ExecutionStepNotStarted {}
/// An execution step is in the SKIPPED state if it was skipped by a user.
/// An execution step cannot be skipped if it is in a terminal state (SUCCEEDED or ERRORED).
/// This is a terminal state, the step's values cannot be modified by the user.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionStepSkipped {
    #[prost(message, optional, tag = "1")]
    pub skipped_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, tag = "2")]
    pub skipped_by: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "3")]
    pub skip_reason: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional because a step can be skipped from the NOT_STARTED state before these are set
    #[prost(message, optional, tag = "4")]
    pub started_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, optional, tag = "5")]
    pub started_by: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional because a step can be skipped from the IN_PROGRESS state before these are set
    #[prost(message, optional, tag = "6")]
    pub submitted_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, optional, tag = "7")]
    pub submitted_by: ::core::option::Option<::prost::alloc::string::String>,
}
/// An execution step is in the IN_PROGRESS state once it has been started from NOT_STARTED,
/// either manually or automatically.
/// In this state, the step's values can be modified by the user.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionStepInProgress {
    #[prost(message, optional, tag = "1")]
    pub started_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, tag = "2")]
    pub started_by: ::prost::alloc::string::String,
}
/// An execution step is in the SUBMITTED state once it has been submitted from the IN_PROGRESS state,
/// either manually or automatically.
/// In this state, the step's values are considered submitted and cannot be modified by the user.
/// In this state, the backend will monitor the completion condition (if any) and execute the completion
/// actions (if any) once the condition is satisfied.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionStepSubmitted {
    #[prost(message, optional, tag = "1")]
    pub started_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, tag = "2")]
    pub started_by: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub submitted_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, tag = "4")]
    pub submitted_by: ::prost::alloc::string::String,
}
/// An execution step reaches the SUCCEEDED state if all conditions were met and all actions successfully ran.
/// This is a terminal state, the step's values cannot be modified by the user.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionStepSucceeded {
    #[prost(message, optional, tag = "1")]
    pub started_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, tag = "2")]
    pub started_by: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub submitted_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, tag = "4")]
    pub submitted_by: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "5")]
    pub succeeded_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, tag = "6")]
    pub succeeded_by: ::prost::alloc::string::String,
}
/// An execution step reaches the ERRORED state if something went wrong while trying to complete the step.
/// This could be due to a badly configured procedure, an error/timeout in the completion condition,
/// or an error/timeout in one of the completion actions.
/// This is a terminal state, the step's values cannot be modified by the user.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionStepErrored {
    /// Optional because a step can reach ERRORED without having been started
    #[prost(message, optional, tag = "1")]
    pub started_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, optional, tag = "2")]
    pub started_by: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional because a step can be errored before being submitted
    #[prost(message, optional, tag = "3")]
    pub submitted_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, optional, tag = "4")]
    pub submitted_by: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "5")]
    pub errored_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, tag = "6")]
    pub errored_by: ::prost::alloc::string::String,
    #[prost(string, tag = "7")]
    pub error: ::prost::alloc::string::String,
    /// Optional because a step could be skipped but then error while running completion actions
    #[prost(message, optional, tag = "8")]
    pub skipped_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, optional, tag = "9")]
    pub skipped_by: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "10")]
    pub skip_reason: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional because a step can succeed but then error while running completion actions
    #[prost(message, optional, tag = "11")]
    pub succeeded_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, optional, tag = "12")]
    pub succeeded_by: ::core::option::Option<::prost::alloc::string::String>,
}
/// The read-side state for an execution step.
/// Here is the state machine:
/// All steps start in the NOT_STARTED state.
/// From NOT_STARTED, a step can transition to IN_PROGRESS or SKIPPED.
/// - Transitioning to IN_PROGRESS can be done manually by a user or automatically if auto-start is enabled.
///    This transition can only happen if the step's dependencies are in a completed state (SUCCEEDED or SKIPPED)
/// From IN_PROGRESS, a step can transition to SUBMITTED or SKIPPED.
/// - Transitioning to SUBMITTED can be done manually by a user or automatically if auto-proceed is enabled.
///    This transition can only happen if the step's content has its required values set.
/// - Transitioning to SKIPPED can be done manually by a user.
/// From SUBMITTED, a step can transition to SUCCEEDED, ERRORED, or SKIPPED.
/// - Transitioning to SUCCEEDED or ERRORED is done by the backend after monitoring the completion
///    condition (if any) and executing the completion actions (if any).
/// - Transitioning to SKIPPED can be done manually by a user.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionStepState {
    #[prost(oneof = "execution_step_state::State", tags = "1, 2, 3, 4, 5, 6")]
    pub state: ::core::option::Option<execution_step_state::State>,
}
/// Nested message and enum types in `ExecutionStepState`.
pub mod execution_step_state {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum State {
        #[prost(message, tag = "1")]
        NotStarted(super::ExecutionStepNotStarted),
        #[prost(message, tag = "2")]
        InProgress(super::ExecutionStepInProgress),
        #[prost(message, tag = "3")]
        Submitted(super::ExecutionStepSubmitted),
        /// Terminal states below
        #[prost(message, tag = "4")]
        Skipped(super::ExecutionStepSkipped),
        #[prost(message, tag = "5")]
        Succeeded(super::ExecutionStepSucceeded),
        #[prost(message, tag = "6")]
        Errored(super::ExecutionStepErrored),
    }
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StepInProgressRequest {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StepSubmittedRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StepSkippedRequest {
    #[prost(string, optional, tag = "1")]
    pub skip_reason: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StepErroredRequest {
    #[prost(string, optional, tag = "1")]
    pub error_reason: ::core::option::Option<::prost::alloc::string::String>,
}
/// A request to update the state of an execution step.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TargetStepStateRequest {
    #[prost(oneof = "target_step_state_request::TargetState", tags = "1, 2, 3, 4")]
    pub target_state: ::core::option::Option<target_step_state_request::TargetState>,
}
/// Nested message and enum types in `TargetStepStateRequest`.
pub mod target_step_state_request {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum TargetState {
        #[prost(message, tag = "1")]
        InProgress(super::StepInProgressRequest),
        #[prost(message, tag = "2")]
        Submitted(super::StepSubmittedRequest),
        #[prost(message, tag = "3")]
        Skipped(super::StepSkippedRequest),
        #[prost(message, tag = "4")]
        Errored(super::StepErroredRequest),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProcedureAsyncTask {
    #[prost(oneof = "procedure_async_task::Task", tags = "1, 2")]
    pub task: ::core::option::Option<procedure_async_task::Task>,
}
/// Nested message and enum types in `ProcedureAsyncTask`.
pub mod procedure_async_task {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Task {
        #[prost(message, tag = "1")]
        ConditionObservation(super::ConditionObservation),
        #[prost(message, tag = "2")]
        CompletionActionExecution(super::CompletionActionExecution),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConditionObservation {
    #[prost(string, tag = "1")]
    pub user_rid: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub org_rid: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub procedure_execution_rid: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub step_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "5")]
    pub success_condition: ::core::option::Option<super::super::v1::SuccessCondition>,
}
/// All RID fields are required — callers must provide non-empty values.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompletionActionExecution {
    #[prost(string, tag = "1")]
    pub user_rid: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub org_rid: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub procedure_execution_rid: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub procedure_rid: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub workspace_rid: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub step_id: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "7")]
    pub completion_action_configs: ::prost::alloc::vec::Vec<
        super::super::v1::CompletionActionConfig,
    >,
}
/// Represents the current status of one or more nested completion conditions.
/// Mirrors the recursive SuccessCondition in nominal.procedures.v1
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SuccessConditionStatus {
    /// The type of condition being monitored.
    #[prost(oneof = "success_condition_status::Condition", tags = "1, 6, 7, 9, 10")]
    pub condition: ::core::option::Option<success_condition_status::Condition>,
    /// The status of this condition.
    #[prost(oneof = "success_condition_status::Status", tags = "2, 3, 4, 5, 8")]
    pub status: ::core::option::Option<success_condition_status::Status>,
}
/// Nested message and enum types in `SuccessConditionStatus`.
pub mod success_condition_status {
    /// The type of condition being monitored.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Condition {
        #[prost(message, tag = "1")]
        And(super::AndSuccessCondition),
        #[prost(message, tag = "6")]
        Timer(super::super::super::v1::TimerSuccessCondition),
        #[prost(message, tag = "7")]
        IngestJob(super::super::super::v1::IngestJobSuccessCondition),
        #[prost(message, tag = "9")]
        ChannelValidation(super::ChannelValidationSuccessConditionStatus),
        /// OrSuccessConditionOrStatus or = 5;
        #[prost(message, tag = "10")]
        Webhook(super::WebhookConditionStatus),
    }
    /// The status of this condition.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Status {
        #[prost(message, tag = "2")]
        InProgress(super::SuccessConditionInProgress),
        #[prost(message, tag = "3")]
        Satisfied(super::SuccessConditionSatisfied),
        #[prost(message, tag = "4")]
        Failed(super::SuccessConditionFailed),
        #[prost(message, tag = "5")]
        Canceled(super::SuccessConditionCanceled),
        #[prost(message, tag = "8")]
        Submitted(super::SuccessConditionSubmitted),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelValidationSuccessConditionStatus {
    #[prost(message, optional, tag = "9")]
    pub condition: ::core::option::Option<
        super::super::v1::ChannelValidationSuccessCondition,
    >,
    /// Persistence tracking state for channel validation conditions.
    /// Tracks consecutive successful evaluations for point_persistence.
    #[prost(int32, optional, tag = "2")]
    pub consecutive_matches: ::core::option::Option<i32>,
    /// Timestamp when the condition first became satisfied.
    /// Used for time_persistence to track how long the condition has held true.
    #[prost(message, optional, tag = "3")]
    pub first_satisfied_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
}
/// Status tracking for webhook success conditions.
/// Tracks delivery attempts, retry timing, and the last response from the external system.
/// Note: Secret management for retries is handled internally in Temporal workflow state,
/// not exposed in this public API message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WebhookConditionStatus {
    /// The original webhook condition configuration being monitored
    #[prost(message, optional, tag = "9")]
    pub condition: ::core::option::Option<super::super::v1::WebhookSuccessCondition>,
    /// Number of delivery attempts made so far
    #[prost(int32, tag = "1")]
    pub delivery_attempts: i32,
    /// Timestamp of the last delivery attempt
    #[prost(message, optional, tag = "2")]
    pub last_attempt_time: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    /// Timestamp when the next retry should be attempted (null if no retry scheduled)
    #[prost(message, optional, tag = "3")]
    pub next_retry_time: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    /// Unique ID of the last delivery attempt (unset if no attempts made yet)
    /// Generated per-attempt to correlate webhook deliveries with external system logs
    #[prost(string, optional, tag = "4")]
    pub last_delivery_id: ::core::option::Option<::prost::alloc::string::String>,
    /// HTTP status code from the last delivery attempt
    #[prost(int32, optional, tag = "5")]
    pub last_http_status: ::core::option::Option<i32>,
    /// Error message from the last delivery attempt (if failed)
    #[prost(string, optional, tag = "6")]
    pub last_error_message: ::core::option::Option<::prost::alloc::string::String>,
    /// Timestamp when webhook condition evaluation started
    #[prost(message, optional, tag = "7")]
    pub started_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    /// Terminal failure reason for this webhook condition.
    /// Only set when the condition transitions to FAILED status.
    /// Remains unset during retries (use last_error_message for intermediate failures).
    #[prost(enumeration = "WebhookFailureReason", optional, tag = "8")]
    pub terminal_failure_reason: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AndSuccessCondition {
    #[prost(message, repeated, tag = "1")]
    pub conditions: ::prost::alloc::vec::Vec<SuccessConditionStatus>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SuccessConditionSubmitted {
    #[prost(message, optional, tag = "1")]
    pub submitted_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SuccessConditionInProgress {
    #[prost(message, optional, tag = "1")]
    pub started_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SuccessConditionSatisfied {
    #[prost(message, optional, tag = "1")]
    pub started_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(message, optional, tag = "2")]
    pub satisfied_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SuccessConditionFailed {
    #[prost(message, optional, tag = "1")]
    pub started_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(message, optional, tag = "2")]
    pub failed_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, tag = "3")]
    pub failure_reason: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SuccessConditionCanceled {
    #[prost(message, optional, tag = "1")]
    pub started_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(message, optional, tag = "2")]
    pub canceled_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
}
/// The status of a completion action and its result (if any).
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompletionActionStatus {
    #[prost(message, optional, tag = "1")]
    pub state: ::core::option::Option<CompletionActionState>,
    /// This is intentionally not a required oneof
    #[prost(oneof = "completion_action_status::Result", tags = "2, 3, 4, 5, 6")]
    pub result: ::core::option::Option<completion_action_status::Result>,
}
/// Nested message and enum types in `CompletionActionStatus`.
pub mod completion_action_status {
    /// This is intentionally not a required oneof
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Result {
        #[prost(message, tag = "2")]
        CreateEvent(super::CreateEventResult),
        #[prost(message, tag = "3")]
        CreateRun(super::CreateRunResult),
        #[prost(message, tag = "4")]
        ApplyWorkbookTemplates(super::ApplyWorkbookTemplatesResult),
        #[prost(message, tag = "5")]
        ApplyChecklists(super::ApplyChecklistsResult),
        /// ...
        #[prost(message, tag = "6")]
        UpdateRun(super::UpdateRunResult),
    }
}
/// A CreateEvent action results in an EventRid if successful.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateEventResult {
    #[prost(string, tag = "1")]
    pub event_rid: ::prost::alloc::string::String,
}
/// A CreateRun action results in a RunRid if successful.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateRunResult {
    #[prost(string, tag = "1")]
    pub run_rid: ::prost::alloc::string::String,
}
/// An ApplyWorkbookTemplates action results in a list of workbook RIDs if successful.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApplyWorkbookTemplatesResult {
    #[prost(string, repeated, tag = "1")]
    pub workbook_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// An ApplyChecklists action results in a list of DataReviewRids if successful.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApplyChecklistsResult {
    #[prost(string, repeated, tag = "1")]
    pub data_review_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// An UpdateRun action results in the list of RunRids that were updated.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateRunResult {
    #[prost(string, repeated, tag = "1")]
    pub run_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompletionActionState {
    #[prost(oneof = "completion_action_state::State", tags = "1, 2, 3, 4")]
    pub state: ::core::option::Option<completion_action_state::State>,
}
/// Nested message and enum types in `CompletionActionState`.
pub mod completion_action_state {
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct NotRun {}
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct Succeeded {}
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct InProgress {}
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum State {
        /// The action was not run
        #[prost(message, tag = "1")]
        NotRun(NotRun),
        /// The action was run and succeeded. The result is available in CompletionActionStatus.result
        #[prost(message, tag = "2")]
        Succeeded(Succeeded),
        /// The action was run and errored. This field contains the error message.
        #[prost(string, tag = "3")]
        Error(::prost::alloc::string::String),
        /// The action execution is in progress
        #[prost(message, tag = "4")]
        InProgress(InProgress),
    }
}
/// The value for a step's content. Should match the ProcedureStepNode type.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StepContentValue {
    #[prost(oneof = "step_content_value::Value", tags = "1, 2, 3, 4")]
    pub value: ::core::option::Option<step_content_value::Value>,
}
/// Nested message and enum types in `StepContentValue`.
pub mod step_content_value {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Value {
        #[prost(message, tag = "1")]
        Form(super::FormStepValue),
        #[prost(message, tag = "2")]
        StartIngest(super::StartIngestStepValue),
        #[prost(message, tag = "3")]
        SelectOrCreateAsset(super::SelectOrCreateAssetStepValue),
        /// ...
        #[prost(message, tag = "4")]
        Wait(super::WaitStepValue),
    }
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct WaitStepValue {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FormStepValue {
    #[prost(message, repeated, tag = "1")]
    pub fields: ::prost::alloc::vec::Vec<FormFieldValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartIngestStepValue {
    /// The RID of the ingest job that was started by the client.
    /// This must be populated for the step to be submitted.
    #[prost(string, optional, tag = "1")]
    pub ingest_job_rid: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SelectOrCreateAssetStepValue {
    /// The asset that was selected / created by the client.
    /// This must be populated for the step to be submitted.
    #[prost(message, optional, tag = "1")]
    pub asset_reference: ::core::option::Option<super::super::v1::AssetReference>,
}
/// The value chosen for a form field.
/// This differs from FieldOutput in that this should map 1:1 with FormField types,
/// while FieldOutput contains the resolved values after the execution step is complete.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FormFieldValue {
    #[prost(oneof = "form_field_value::Field", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9")]
    pub field: ::core::option::Option<form_field_value::Field>,
}
/// Nested message and enum types in `FormFieldValue`.
pub mod form_field_value {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Field {
        #[prost(message, tag = "1")]
        Asset(super::AssetFieldValue),
        #[prost(message, tag = "2")]
        Checkbox(super::CheckboxFieldValue),
        #[prost(message, tag = "3")]
        Text(super::TextFieldValue),
        #[prost(message, tag = "4")]
        Int(super::IntFieldValue),
        #[prost(message, tag = "5")]
        Double(super::DoubleFieldValue),
        #[prost(message, tag = "6")]
        SingleEnum(super::SingleEnumFieldValue),
        #[prost(message, tag = "7")]
        MultiEnum(super::MultiEnumFieldValue),
        #[prost(message, tag = "8")]
        FileUpload(super::FileUploadFieldValue),
        #[prost(message, tag = "9")]
        MultiFileUpload(super::MultiFileUploadFieldValue),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssetFieldValue {
    /// This oneof will be unset if no asset is set on the field.
    #[prost(oneof = "asset_field_value::Asset", tags = "1")]
    pub asset: ::core::option::Option<asset_field_value::Asset>,
}
/// Nested message and enum types in `AssetFieldValue`.
pub mod asset_field_value {
    /// This oneof will be unset if no asset is set on the field.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Asset {
        #[prost(message, tag = "1")]
        AssetReference(super::super::super::v1::AssetReference),
    }
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CheckboxFieldValue {
    /// Default to false if not set
    #[prost(bool, tag = "1")]
    pub value: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextFieldValue {
    /// Default to empty string if not set
    #[prost(string, optional, tag = "1")]
    pub value: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct IntFieldValue {
    #[prost(int64, optional, tag = "1")]
    pub value: ::core::option::Option<i64>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DoubleFieldValue {
    #[prost(double, optional, tag = "1")]
    pub value: ::core::option::Option<f64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SingleEnumFieldValue {
    /// Default to empty string if not set
    #[prost(string, optional, tag = "1")]
    pub value: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MultiEnumFieldValue {
    /// Default to empty list if not set
    #[prost(string, repeated, tag = "1")]
    pub value: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Corresponds to usage of the upload api
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FileUploadFieldValue {
    #[prost(oneof = "file_upload_field_value::UploadType", tags = "1")]
    pub upload_type: ::core::option::Option<file_upload_field_value::UploadType>,
}
/// Nested message and enum types in `FileUploadFieldValue`.
pub mod file_upload_field_value {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum UploadType {
        #[prost(message, tag = "1")]
        S3Upload(super::S3UploadFileValue),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct S3UploadFileValue {
    /// The S3 path where the uploaded file is stored
    #[prost(string, tag = "1")]
    pub s3_path: ::prost::alloc::string::String,
    /// The original filename of the uploaded file
    #[prost(string, tag = "2")]
    pub file_name: ::prost::alloc::string::String,
    /// The MIME type of the uploaded file
    /// Following the convention of <https://developer.mozilla.org/en-US/docs/Web/API/Blob/type> (from which the File api inherits, we will accept an empty string)
    #[prost(string, optional, tag = "3")]
    pub file_type: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MultiFileUploadFieldValue {
    /// The list of uploads
    #[prost(message, repeated, tag = "1")]
    pub uploads: ::prost::alloc::vec::Vec<FileUploadFieldValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProcedureExecution {
    #[prost(string, tag = "1")]
    pub rid: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub metadata: ::core::option::Option<ProcedureExecutionMetadata>,
    #[prost(message, optional, tag = "3")]
    pub state: ::core::option::Option<ProcedureExecutionState>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProcedureExecutionMetadata {
    #[prost(string, tag = "1")]
    pub rid: ::prost::alloc::string::String,
    /// The procedure template rid this execution is based on.
    #[prost(string, tag = "2")]
    pub procedure_rid: ::prost::alloc::string::String,
    /// The commit ID of the procedure template this execution is based on.
    /// This can be overridden at the node level for individual nodes.
    #[prost(string, tag = "3")]
    pub procedure_commit_id: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub title: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "5")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, repeated, tag = "6")]
    pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(map = "string, string", tag = "7")]
    pub properties: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    #[prost(string, tag = "8")]
    pub created_by: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "9")]
    pub created_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, tag = "10")]
    pub updated_by: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "11")]
    pub updated_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    /// Will be unset until the execution transitions from NOT_STARTED to IN_PROGRESS.
    #[prost(message, optional, tag = "12")]
    pub started_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, optional, tag = "13")]
    pub started_by: ::core::option::Option<::prost::alloc::string::String>,
    /// Will be unset until the execution transitions from IN_PROGRESS to a terminal state.
    #[prost(message, optional, tag = "14")]
    pub finished_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, optional, tag = "15")]
    pub finished_by: ::core::option::Option<::prost::alloc::string::String>,
    /// Will be true/set if the execution is the ABORTED terminal state.
    #[prost(message, optional, tag = "16")]
    pub aborted_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, optional, tag = "17")]
    pub aborted_by: ::core::option::Option<::prost::alloc::string::String>,
    /// Will be set if the execution is in the ERRORED terminal state.
    #[prost(message, optional, tag = "18")]
    pub failed_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, optional, tag = "19")]
    pub failed_by: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "20")]
    pub failed_reason: ::core::option::Option<::prost::alloc::string::String>,
}
/// ProcedureExecutionState is the state of an executing procedure.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProcedureExecutionState {
    /// The current values for the global fields in the procedure.
    #[prost(map = "string, message", tag = "1")]
    pub global_fields: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        FieldOutput,
    >,
    /// A map from execution node ID to the execution node.
    #[prost(map = "string, message", tag = "2")]
    pub nodes: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ProcedureExecutionNode,
    >,
    /// Section edges represent the visual grouping of sections and steps.
    /// All keys are IDs for section nodes, and all values are lists of IDs for section or step nodes.
    /// { A, \[B, C\] } means that section A visually groups nodes B and C together.
    #[prost(map = "string, message", tag = "3")]
    pub section_edges: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        super::super::v1::NodeList,
    >,
    /// Step edges represent the dependencies between steps.
    /// All keys and values are IDs for step nodes.
    /// { A, \[B, C\] } means that steps B and C depend on step A to complete to be started
    #[prost(map = "string, message", tag = "4")]
    pub step_edges: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        super::super::v1::NodeList,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Strings {
    #[prost(string, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// TODO(pchen): how to handle the value typing here
/// The outputs of a field in a step.
/// This is different from FormFieldValue in that this represents the resolved value after the step has
/// been completed. Eg, this would contain an AssetRid while the FormFieldValue could contain an AssetReference
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FieldOutput {
    /// The oneof can be unset if the field has not been set yet.
    #[prost(oneof = "field_output::Output", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10")]
    pub output: ::core::option::Option<field_output::Output>,
}
/// Nested message and enum types in `FieldOutput`.
pub mod field_output {
    /// The oneof can be unset if the field has not been set yet.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Output {
        /// TODO(niwong): I think this could actually be buf validated to be required. If a global field is
        /// not yet defined, I think it's just not present in the global_fields map
        /// option (buf.validate.oneof) = {required: true};
        #[prost(string, tag = "1")]
        AssetRid(::prost::alloc::string::String),
        #[prost(string, tag = "2")]
        StringValue(::prost::alloc::string::String),
        #[prost(double, tag = "3")]
        DoubleValue(f64),
        #[prost(bool, tag = "4")]
        BooleanValue(bool),
        #[prost(int64, tag = "5")]
        IntValue(i64),
        #[prost(message, tag = "6")]
        StringsValue(super::Strings),
        #[prost(string, tag = "7")]
        IngestJobRid(::prost::alloc::string::String),
        #[prost(string, tag = "8")]
        RunRid(::prost::alloc::string::String),
        #[prost(message, tag = "9")]
        FileUploadValue(super::FileUploadFieldValue),
        #[prost(message, tag = "10")]
        MultiFileUploadValue(super::MultiFileUploadFieldValue),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateProcedureExecutionRequest {
    #[prost(string, tag = "1")]
    pub procedure_rid: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub procedure_commit_id: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub title: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "4")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(bool, optional, tag = "5")]
    pub start_immediately: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateProcedureExecutionResponse {
    #[prost(message, optional, tag = "1")]
    pub procedure_execution: ::core::option::Option<ProcedureExecution>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetProcedureExecutionRequest {
    #[prost(string, tag = "1")]
    pub procedure_execution_rid: ::prost::alloc::string::String,
    /// If true, the display graph will be included in the response.
    /// Default is false.
    #[prost(bool, tag = "2")]
    pub include_display_graph: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetProcedureExecutionResponse {
    #[prost(message, optional, tag = "1")]
    pub procedure_execution: ::core::option::Option<ProcedureExecution>,
    /// Included if include_display_graph was set to true. Note that this is the
    /// procedure template's display graph, not the execution graph.
    #[prost(message, optional, tag = "2")]
    pub display_graph: ::core::option::Option<super::super::v1::ProcedureDisplayGraph>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateProcedureExecutionMetadataRequest {
    #[prost(string, tag = "1")]
    pub procedure_execution_rid: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "2")]
    pub title: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "3")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "4")]
    pub commit_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "5")]
    pub labels: ::core::option::Option<super::super::super::types::LabelUpdateWrapper>,
    #[prost(message, optional, tag = "6")]
    pub properties: ::core::option::Option<
        super::super::super::types::PropertyUpdateWrapper,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateProcedureExecutionMetadataResponse {
    #[prost(message, optional, tag = "1")]
    pub metadata: ::core::option::Option<ProcedureExecutionMetadata>,
}
/// TODO(niwong to pchen): I made an "update metadata" endpoint separately above,
/// I think it'd be nice to turn this into a dedicated endpoint for changing the state of
/// the overall execution (start, succeed, abort, fail)
/// I also think in general we shouldn't be updating the entire ProcedureExecutionState
/// but rather leveraging updateStep.
/// TODO(WB-1879): allow to just update the global fields within the ProcExecState.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateProcedureExecutionRequest {
    #[prost(string, tag = "1")]
    pub procedure_execution_rid: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "2")]
    pub title: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "3")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "4")]
    pub commit_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "5")]
    pub labels: ::core::option::Option<super::super::super::types::LabelUpdateWrapper>,
    #[prost(message, optional, tag = "6")]
    pub properties: ::core::option::Option<
        super::super::super::types::PropertyUpdateWrapper,
    >,
    #[prost(message, optional, tag = "7")]
    pub state: ::core::option::Option<ProcedureExecutionState>,
    #[prost(bool, optional, tag = "8")]
    pub is_aborted: ::core::option::Option<bool>,
    #[prost(message, optional, tag = "9")]
    pub started_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(message, optional, tag = "10")]
    pub finished_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateProcedureExecutionResponse {
    #[prost(message, optional, tag = "1")]
    pub procedure_execution: ::core::option::Option<ProcedureExecution>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateStepRequest {
    #[prost(string, tag = "1")]
    pub procedure_execution_rid: ::prost::alloc::string::String,
    /// The unique identifier of the execution step to update.
    #[prost(string, tag = "2")]
    pub step_id: ::prost::alloc::string::String,
    /// Setting the value of the step's content. This is only allowed if the step is NOT_STARTED
    /// or IN_PROGRESS.
    #[prost(message, optional, tag = "3")]
    pub value: ::core::option::Option<StepContentValue>,
    /// Set whether the step has auto-proceed enabled. This is only allowed if the step is NOT_STARTED.
    /// or IN_PROGRESS.
    #[prost(message, optional, tag = "4")]
    pub auto_proceed_config: ::core::option::Option<super::super::v1::AutoProceedConfig>,
    /// Setting the state of the step. This will occur after the other updates in this request.
    #[prost(message, optional, tag = "5")]
    pub target_state: ::core::option::Option<TargetStepStateRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateStepResponse {
    #[prost(message, optional, tag = "1")]
    pub procedure_execution: ::core::option::Option<ProcedureExecution>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateStepSuccessConditionStatusRequest {
    #[prost(string, tag = "1")]
    pub procedure_execution_rid: ::prost::alloc::string::String,
    /// The unique identifier of the execution step to update.
    #[prost(string, tag = "2")]
    pub step_id: ::prost::alloc::string::String,
    /// Setting the success_condition_status is only allowed if the step is SUBMITTED
    /// and should only be done by the backend while monitoring the condition.
    /// If the step is SKIPPED, the success_condition_status will still be set but
    /// no completion actions will be run and the step's state will not be updated.
    #[prost(message, optional, tag = "3")]
    pub success_condition_status: ::core::option::Option<SuccessConditionStatus>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateStepSuccessConditionStatusResponse {
    #[prost(message, optional, tag = "1")]
    pub procedure_execution: ::core::option::Option<ProcedureExecution>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateStepCompletionActionStatusRequest {
    #[prost(string, tag = "1")]
    pub procedure_execution_rid: ::prost::alloc::string::String,
    /// The unique identifier of the execution step to update.
    #[prost(string, tag = "2")]
    pub step_id: ::prost::alloc::string::String,
    /// The updated list of completion action statuses for the step.
    /// The backend replaces the step's completion_action_statuses with this list.
    #[prost(message, repeated, tag = "3")]
    pub completion_action_statuses: ::prost::alloc::vec::Vec<CompletionActionStatus>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateStepCompletionActionStatusResponse {
    #[prost(message, optional, tag = "1")]
    pub procedure_execution: ::core::option::Option<ProcedureExecution>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RepeatStepRequest {
    #[prost(string, tag = "1")]
    pub procedure_execution_rid: ::prost::alloc::string::String,
    /// The unique identifier of the execution step to repeat/duplicate.
    #[prost(string, tag = "2")]
    pub step_id: ::prost::alloc::string::String,
    /// Behavior for how repeating the step will affect dependants.
    #[prost(enumeration = "RepeatStepBehavior", tag = "6")]
    pub behavior: i32,
    /// Setting the value of the step's content.
    #[prost(message, optional, tag = "3")]
    pub value: ::core::option::Option<StepContentValue>,
    /// Set whether the step has auto-proceed enabled.
    #[prost(message, optional, tag = "4")]
    pub auto_proceed_config: ::core::option::Option<super::super::v1::AutoProceedConfig>,
    /// Setting the state of the step. This will occur after the other updates in this request.
    #[prost(message, optional, tag = "5")]
    pub target_state: ::core::option::Option<TargetStepStateRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RepeatStepResponse {
    #[prost(message, optional, tag = "1")]
    pub procedure_execution: ::core::option::Option<ProcedureExecution>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProcedureExecutionSearchQuery {
    #[prost(
        oneof = "procedure_execution_search_query::Query",
        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9"
    )]
    pub query: ::core::option::Option<procedure_execution_search_query::Query>,
}
/// Nested message and enum types in `ProcedureExecutionSearchQuery`.
pub mod procedure_execution_search_query {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ProcedureExecutionSearchAndQuery {
        #[prost(message, repeated, tag = "1")]
        pub queries: ::prost::alloc::vec::Vec<super::ProcedureExecutionSearchQuery>,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ProcedureExecutionSearchOrQuery {
        #[prost(message, repeated, tag = "1")]
        pub queries: ::prost::alloc::vec::Vec<super::ProcedureExecutionSearchQuery>,
    }
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Query {
        #[prost(string, tag = "1")]
        SearchText(::prost::alloc::string::String),
        #[prost(string, tag = "2")]
        Label(::prost::alloc::string::String),
        #[prost(message, tag = "3")]
        Property(super::super::super::super::types::Property),
        #[prost(message, tag = "4")]
        And(ProcedureExecutionSearchAndQuery),
        #[prost(message, tag = "5")]
        Or(ProcedureExecutionSearchOrQuery),
        #[prost(string, tag = "6")]
        Workspace(::prost::alloc::string::String),
        #[prost(string, tag = "7")]
        ProcedureRid(::prost::alloc::string::String),
        #[prost(string, tag = "8")]
        CommitId(::prost::alloc::string::String),
        #[prost(string, tag = "9")]
        CreatedBy(::prost::alloc::string::String),
    }
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProcedureExecutionSortOptions {
    #[prost(bool, tag = "1")]
    pub is_descending: bool,
    #[prost(enumeration = "SearchProcedureExecutionsSortField", tag = "2")]
    pub sort_field: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchProcedureExecutionsRequest {
    #[prost(message, optional, tag = "1")]
    pub query: ::core::option::Option<ProcedureExecutionSearchQuery>,
    #[prost(message, optional, tag = "2")]
    pub sort_options: ::core::option::Option<ProcedureExecutionSortOptions>,
    /// Page sizes greater than 1_000 will be rejected. Default pageSize is 100.
    #[prost(int32, optional, tag = "3")]
    pub page_size: ::core::option::Option<i32>,
    #[prost(string, optional, tag = "4")]
    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchProcedureExecutionsResponse {
    #[prost(message, repeated, tag = "1")]
    pub procedure_executions: ::prost::alloc::vec::Vec<ProcedureExecutionMetadata>,
    #[prost(string, optional, tag = "2")]
    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetProcedureExecutionMetadataRequest {
    #[prost(string, repeated, tag = "1")]
    pub procedure_execution_rids: ::prost::alloc::vec::Vec<
        ::prost::alloc::string::String,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetProcedureExecutionMetadataResponse {
    #[prost(message, repeated, tag = "1")]
    pub procedure_executions: ::prost::alloc::vec::Vec<ProcedureExecutionMetadata>,
}
/// Categorizes why a webhook success condition failed.
/// This enum represents terminal failure states - failures that caused the condition to permanently fail.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum WebhookFailureReason {
    /// Unspecified/unknown failure reason. Should not be used in normal operation.
    Unspecified = 0,
    /// External system returned 4XX client error (permanent failure, no retry attempted).
    /// Indicates misconfiguration or invalid request that won't succeed on retry.
    /// Common causes: 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found.
    ClientError = 1,
    /// External system returned 5XX server error and max retries were exhausted.
    /// Server errors are typically transient and retries were attempted.
    /// Common causes: 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable.
    ServerErrorMaxRetriesExceeded = 2,
    /// Individual HTTP request timed out and max retries were exhausted.
    /// The external system didn't respond within the per-request timeout window.
    TimeoutMaxRetriesExceeded = 3,
    /// Overall condition timeout exceeded before receiving successful 2xx response.
    /// The webhook delivery config's timeout_seconds was reached.
    /// This can occur even if individual requests completed (returned responses)
    /// but took too long cumulatively between retry delays, without receiving 2xx.
    OverallTimeoutExceeded = 4,
    /// Network-level failure prevented request delivery and max retries were exhausted.
    /// Common causes: DNS resolution failure, connection refused, TLS handshake failure.
    NetworkErrorMaxRetriesExceeded = 5,
    /// Template rendering or payload serialization failed (permanent failure).
    /// The payload_template could not be rendered to valid JSON.
    /// Common causes: Invalid Handlebars syntax, circular references, invalid JSON after rendering.
    PayloadError = 6,
    /// Too many redirects encountered (typically indicates redirect loop).
    /// Follows HTTP standard - most clients limit to 20 redirects.
    RedirectLoop = 7,
    /// Integration configuration is invalid or missing required fields.
    /// Common causes: Integration RID not found, missing URL, invalid HMAC config.
    IntegrationConfigError = 8,
}
impl WebhookFailureReason {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "WEBHOOK_FAILURE_REASON_UNSPECIFIED",
            Self::ClientError => "WEBHOOK_FAILURE_REASON_CLIENT_ERROR",
            Self::ServerErrorMaxRetriesExceeded => {
                "WEBHOOK_FAILURE_REASON_SERVER_ERROR_MAX_RETRIES_EXCEEDED"
            }
            Self::TimeoutMaxRetriesExceeded => {
                "WEBHOOK_FAILURE_REASON_TIMEOUT_MAX_RETRIES_EXCEEDED"
            }
            Self::OverallTimeoutExceeded => {
                "WEBHOOK_FAILURE_REASON_OVERALL_TIMEOUT_EXCEEDED"
            }
            Self::NetworkErrorMaxRetriesExceeded => {
                "WEBHOOK_FAILURE_REASON_NETWORK_ERROR_MAX_RETRIES_EXCEEDED"
            }
            Self::PayloadError => "WEBHOOK_FAILURE_REASON_PAYLOAD_ERROR",
            Self::RedirectLoop => "WEBHOOK_FAILURE_REASON_REDIRECT_LOOP",
            Self::IntegrationConfigError => {
                "WEBHOOK_FAILURE_REASON_INTEGRATION_CONFIG_ERROR"
            }
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "WEBHOOK_FAILURE_REASON_UNSPECIFIED" => Some(Self::Unspecified),
            "WEBHOOK_FAILURE_REASON_CLIENT_ERROR" => Some(Self::ClientError),
            "WEBHOOK_FAILURE_REASON_SERVER_ERROR_MAX_RETRIES_EXCEEDED" => {
                Some(Self::ServerErrorMaxRetriesExceeded)
            }
            "WEBHOOK_FAILURE_REASON_TIMEOUT_MAX_RETRIES_EXCEEDED" => {
                Some(Self::TimeoutMaxRetriesExceeded)
            }
            "WEBHOOK_FAILURE_REASON_OVERALL_TIMEOUT_EXCEEDED" => {
                Some(Self::OverallTimeoutExceeded)
            }
            "WEBHOOK_FAILURE_REASON_NETWORK_ERROR_MAX_RETRIES_EXCEEDED" => {
                Some(Self::NetworkErrorMaxRetriesExceeded)
            }
            "WEBHOOK_FAILURE_REASON_PAYLOAD_ERROR" => Some(Self::PayloadError),
            "WEBHOOK_FAILURE_REASON_REDIRECT_LOOP" => Some(Self::RedirectLoop),
            "WEBHOOK_FAILURE_REASON_INTEGRATION_CONFIG_ERROR" => {
                Some(Self::IntegrationConfigError)
            }
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RepeatStepBehavior {
    Unspecified = 0,
    /// The targeted step will be repeated, but the original graph will be preserved
    /// and only direct children will be checked for state updates
    Isolated = 1,
}
impl RepeatStepBehavior {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "REPEAT_STEP_BEHAVIOR_UNSPECIFIED",
            Self::Isolated => "REPEAT_STEP_BEHAVIOR_ISOLATED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "REPEAT_STEP_BEHAVIOR_UNSPECIFIED" => Some(Self::Unspecified),
            "REPEAT_STEP_BEHAVIOR_ISOLATED" => Some(Self::Isolated),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SearchProcedureExecutionsSortField {
    Unspecified = 0,
    CreatedAt = 1,
    StartedAt = 2,
    FinishedAt = 3,
    UpdatedAt = 4,
}
impl SearchProcedureExecutionsSortField {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_UNSPECIFIED",
            Self::CreatedAt => "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_CREATED_AT",
            Self::StartedAt => "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_STARTED_AT",
            Self::FinishedAt => "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_FINISHED_AT",
            Self::UpdatedAt => "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_UPDATED_AT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_UNSPECIFIED" => {
                Some(Self::Unspecified)
            }
            "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_CREATED_AT" => Some(Self::CreatedAt),
            "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_STARTED_AT" => Some(Self::StartedAt),
            "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_FINISHED_AT" => {
                Some(Self::FinishedAt)
            }
            "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_UPDATED_AT" => Some(Self::UpdatedAt),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProcedureExecutionsServiceError {
    Unspecified = 0,
    NotFound = 1,
    ProcNotFound = 2,
    NodeNotFound = 3,
    InvalidNode = 4,
    InvalidGraph = 5,
    InvalidStepTransition = 6,
    InvalidSearchToken = 7,
    InvalidStepUpdate = 8,
}
impl ProcedureExecutionsServiceError {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "PROCEDURE_EXECUTIONS_SERVICE_ERROR_UNSPECIFIED",
            Self::NotFound => "PROCEDURE_EXECUTIONS_SERVICE_ERROR_NOT_FOUND",
            Self::ProcNotFound => "PROCEDURE_EXECUTIONS_SERVICE_ERROR_PROC_NOT_FOUND",
            Self::NodeNotFound => "PROCEDURE_EXECUTIONS_SERVICE_ERROR_NODE_NOT_FOUND",
            Self::InvalidNode => "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_NODE",
            Self::InvalidGraph => "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_GRAPH",
            Self::InvalidStepTransition => {
                "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_STEP_TRANSITION"
            }
            Self::InvalidSearchToken => {
                "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_SEARCH_TOKEN"
            }
            Self::InvalidStepUpdate => {
                "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_STEP_UPDATE"
            }
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PROCEDURE_EXECUTIONS_SERVICE_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
            "PROCEDURE_EXECUTIONS_SERVICE_ERROR_NOT_FOUND" => Some(Self::NotFound),
            "PROCEDURE_EXECUTIONS_SERVICE_ERROR_PROC_NOT_FOUND" => {
                Some(Self::ProcNotFound)
            }
            "PROCEDURE_EXECUTIONS_SERVICE_ERROR_NODE_NOT_FOUND" => {
                Some(Self::NodeNotFound)
            }
            "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_NODE" => Some(Self::InvalidNode),
            "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_GRAPH" => {
                Some(Self::InvalidGraph)
            }
            "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_STEP_TRANSITION" => {
                Some(Self::InvalidStepTransition)
            }
            "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_SEARCH_TOKEN" => {
                Some(Self::InvalidSearchToken)
            }
            "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_STEP_UPDATE" => {
                Some(Self::InvalidStepUpdate)
            }
            _ => None,
        }
    }
}
/// Generated client implementations.
pub mod procedure_executions_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Service for creating and managing procedure executions.
    #[derive(Debug, Clone)]
    pub struct ProcedureExecutionsServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl ProcedureExecutionsServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> ProcedureExecutionsServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::Body>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> ProcedureExecutionsServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::Body>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::Body>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            ProcedureExecutionsServiceClient::new(
                InterceptedService::new(inner, interceptor),
            )
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Create a new procedure execution from a procedure
        pub async fn create_procedure_execution(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateProcedureExecutionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::CreateProcedureExecutionResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.procedures.executions.v1.ProcedureExecutionsService/CreateProcedureExecution",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.procedures.executions.v1.ProcedureExecutionsService",
                        "CreateProcedureExecution",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Get a procedure execution by its RID
        pub async fn get_procedure_execution(
            &mut self,
            request: impl tonic::IntoRequest<super::GetProcedureExecutionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetProcedureExecutionResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.procedures.executions.v1.ProcedureExecutionsService/GetProcedureExecution",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.procedures.executions.v1.ProcedureExecutionsService",
                        "GetProcedureExecution",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Update the metadata of a procedure execution
        pub async fn update_procedure_execution_metadata(
            &mut self,
            request: impl tonic::IntoRequest<
                super::UpdateProcedureExecutionMetadataRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::UpdateProcedureExecutionMetadataResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.procedures.executions.v1.ProcedureExecutionsService/UpdateProcedureExecutionMetadata",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.procedures.executions.v1.ProcedureExecutionsService",
                        "UpdateProcedureExecutionMetadata",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Heavy-handed update method for procedure execution
        /// TODO(pchen): This isn't the expected final endpoint, this is just for editing the graph while we iterate
        /// There likely be additional fine-grained methods for editing the procedure
        pub async fn update_procedure_execution(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateProcedureExecutionRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UpdateProcedureExecutionResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.procedures.executions.v1.ProcedureExecutionsService/UpdateProcedureExecution",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.procedures.executions.v1.ProcedureExecutionsService",
                        "UpdateProcedureExecution",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Update the status of a step in a procedure execution. This can only be done if the step is NOT_STARTED,
        /// IN_PROGRESS, or SUBMITTED. Other state transitions are managed by the backend.
        pub async fn update_step(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateStepRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UpdateStepResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.procedures.executions.v1.ProcedureExecutionsService/UpdateStep",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.procedures.executions.v1.ProcedureExecutionsService",
                        "UpdateStep",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// This should only be called by the backend to update the success_condition_status of a step.
        /// This can only be done if the step is SUBMITTED.
        pub async fn update_step_success_condition_status(
            &mut self,
            request: impl tonic::IntoRequest<
                super::UpdateStepSuccessConditionStatusRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::UpdateStepSuccessConditionStatusResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.procedures.executions.v1.ProcedureExecutionsService/UpdateStepSuccessConditionStatus",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.procedures.executions.v1.ProcedureExecutionsService",
                        "UpdateStepSuccessConditionStatus",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Called by the Temporal workflow to update the completion_action_statuses of a step.
        pub async fn update_step_completion_action_status(
            &mut self,
            request: impl tonic::IntoRequest<
                super::UpdateStepCompletionActionStatusRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::UpdateStepCompletionActionStatusResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.procedures.executions.v1.ProcedureExecutionsService/UpdateStepCompletionActionStatus",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.procedures.executions.v1.ProcedureExecutionsService",
                        "UpdateStepCompletionActionStatus",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Repeat a previously finished step in a procedure execution. This can only be done if the given step
        /// is in state SUCCEEDED, SKIPPED or ERRORED. Other state transitions are managed by the backend.
        pub async fn repeat_step(
            &mut self,
            request: impl tonic::IntoRequest<super::RepeatStepRequest>,
        ) -> std::result::Result<
            tonic::Response<super::RepeatStepResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.procedures.executions.v1.ProcedureExecutionsService/RepeatStep",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.procedures.executions.v1.ProcedureExecutionsService",
                        "RepeatStep",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Search for procedure executions
        pub async fn search_procedure_executions(
            &mut self,
            request: impl tonic::IntoRequest<super::SearchProcedureExecutionsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SearchProcedureExecutionsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.procedures.executions.v1.ProcedureExecutionsService/SearchProcedureExecutions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.procedures.executions.v1.ProcedureExecutionsService",
                        "SearchProcedureExecutions",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Batch get procedure execution metadata
        pub async fn batch_get_procedure_execution_metadata(
            &mut self,
            request: impl tonic::IntoRequest<
                super::BatchGetProcedureExecutionMetadataRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::BatchGetProcedureExecutionMetadataResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.procedures.executions.v1.ProcedureExecutionsService/BatchGetProcedureExecutionMetadata",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.procedures.executions.v1.ProcedureExecutionsService",
                        "BatchGetProcedureExecutionMetadata",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}