Skip to main content

nominal_api/proto/
nominal.procedures.executions.v1.rs

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