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    /// Optional because a step can reach ERRORED without having been 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, 6")]
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        #[prost(message, tag = "5")]
498        ApplyChecklists(super::ApplyChecklistsResult),
499        /// ...
500        #[prost(message, tag = "6")]
501        UpdateRun(super::UpdateRunResult),
502    }
503}
504/// A CreateEvent action results in an EventRid if successful.
505#[derive(Clone, PartialEq, ::prost::Message)]
506pub struct CreateEventResult {
507    #[prost(string, tag = "1")]
508    pub event_rid: ::prost::alloc::string::String,
509}
510/// A CreateRun action results in a RunRid if successful.
511#[derive(Clone, PartialEq, ::prost::Message)]
512pub struct CreateRunResult {
513    #[prost(string, tag = "1")]
514    pub run_rid: ::prost::alloc::string::String,
515}
516/// An ApplyWorkbookTemplates action results in a list of workbook RIDs if successful.
517#[derive(Clone, PartialEq, ::prost::Message)]
518pub struct ApplyWorkbookTemplatesResult {
519    #[prost(string, repeated, tag = "1")]
520    pub workbook_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
521}
522/// An ApplyChecklists action results in a list of DataReviewRids if successful.
523#[derive(Clone, PartialEq, ::prost::Message)]
524pub struct ApplyChecklistsResult {
525    #[prost(string, repeated, tag = "1")]
526    pub data_review_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
527}
528/// An UpdateRun action results in the list of RunRids that were updated.
529#[derive(Clone, PartialEq, ::prost::Message)]
530pub struct UpdateRunResult {
531    #[prost(string, repeated, tag = "1")]
532    pub run_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
533}
534#[derive(Clone, PartialEq, ::prost::Message)]
535pub struct CompletionActionState {
536    #[prost(oneof = "completion_action_state::State", tags = "1, 2, 3")]
537    pub state: ::core::option::Option<completion_action_state::State>,
538}
539/// Nested message and enum types in `CompletionActionState`.
540pub mod completion_action_state {
541    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
542    pub struct NotRun {}
543    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
544    pub struct Succeeded {}
545    #[derive(Clone, PartialEq, ::prost::Oneof)]
546    pub enum State {
547        /// The action was not run
548        #[prost(message, tag = "1")]
549        NotRun(NotRun),
550        /// The action was run and succeeded. The result is available in CompletionActionStatus.result
551        #[prost(message, tag = "2")]
552        Succeeded(Succeeded),
553        /// The action was run and errored. This field contains the error message.
554        #[prost(string, tag = "3")]
555        Error(::prost::alloc::string::String),
556    }
557}
558/// The value for a step's content. Should match the ProcedureStepNode type.
559#[derive(Clone, PartialEq, ::prost::Message)]
560pub struct StepContentValue {
561    #[prost(oneof = "step_content_value::Value", tags = "1, 2, 3, 4")]
562    pub value: ::core::option::Option<step_content_value::Value>,
563}
564/// Nested message and enum types in `StepContentValue`.
565pub mod step_content_value {
566    #[derive(Clone, PartialEq, ::prost::Oneof)]
567    pub enum Value {
568        #[prost(message, tag = "1")]
569        Form(super::FormStepValue),
570        #[prost(message, tag = "2")]
571        StartIngest(super::StartIngestStepValue),
572        #[prost(message, tag = "3")]
573        SelectOrCreateAsset(super::SelectOrCreateAssetStepValue),
574        /// ...
575        #[prost(message, tag = "4")]
576        Wait(super::WaitStepValue),
577    }
578}
579#[derive(Clone, Copy, PartialEq, ::prost::Message)]
580pub struct WaitStepValue {}
581#[derive(Clone, PartialEq, ::prost::Message)]
582pub struct FormStepValue {
583    #[prost(message, repeated, tag = "1")]
584    pub fields: ::prost::alloc::vec::Vec<FormFieldValue>,
585}
586#[derive(Clone, PartialEq, ::prost::Message)]
587pub struct StartIngestStepValue {
588    /// The RID of the ingest job that was started by the client.
589    /// This must be populated for the step to be submitted.
590    #[prost(string, optional, tag = "1")]
591    pub ingest_job_rid: ::core::option::Option<::prost::alloc::string::String>,
592}
593#[derive(Clone, PartialEq, ::prost::Message)]
594pub struct SelectOrCreateAssetStepValue {
595    /// The asset that was selected / created by the client.
596    /// This must be populated for the step to be submitted.
597    #[prost(message, optional, tag = "1")]
598    pub asset_reference: ::core::option::Option<super::super::v1::AssetReference>,
599}
600/// The value chosen for a form field.
601/// This differs from FieldOutput in that this should map 1:1 with FormField types,
602/// while FieldOutput contains the resolved values after the execution step is complete.
603#[derive(Clone, PartialEq, ::prost::Message)]
604pub struct FormFieldValue {
605    #[prost(oneof = "form_field_value::Field", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9")]
606    pub field: ::core::option::Option<form_field_value::Field>,
607}
608/// Nested message and enum types in `FormFieldValue`.
609pub mod form_field_value {
610    #[derive(Clone, PartialEq, ::prost::Oneof)]
611    pub enum Field {
612        #[prost(message, tag = "1")]
613        Asset(super::AssetFieldValue),
614        #[prost(message, tag = "2")]
615        Checkbox(super::CheckboxFieldValue),
616        #[prost(message, tag = "3")]
617        Text(super::TextFieldValue),
618        #[prost(message, tag = "4")]
619        Int(super::IntFieldValue),
620        #[prost(message, tag = "5")]
621        Double(super::DoubleFieldValue),
622        #[prost(message, tag = "6")]
623        SingleEnum(super::SingleEnumFieldValue),
624        #[prost(message, tag = "7")]
625        MultiEnum(super::MultiEnumFieldValue),
626        #[prost(message, tag = "8")]
627        FileUpload(super::FileUploadFieldValue),
628        #[prost(message, tag = "9")]
629        MultiFileUpload(super::MultiFileUploadFieldValue),
630    }
631}
632#[derive(Clone, PartialEq, ::prost::Message)]
633pub struct AssetFieldValue {
634    /// This oneof will be unset if no asset is set on the field.
635    #[prost(oneof = "asset_field_value::Asset", tags = "1")]
636    pub asset: ::core::option::Option<asset_field_value::Asset>,
637}
638/// Nested message and enum types in `AssetFieldValue`.
639pub mod asset_field_value {
640    /// This oneof will be unset if no asset is set on the field.
641    #[derive(Clone, PartialEq, ::prost::Oneof)]
642    pub enum Asset {
643        #[prost(message, tag = "1")]
644        AssetReference(super::super::super::v1::AssetReference),
645    }
646}
647#[derive(Clone, Copy, PartialEq, ::prost::Message)]
648pub struct CheckboxFieldValue {
649    /// Default to false if not set
650    #[prost(bool, tag = "1")]
651    pub value: bool,
652}
653#[derive(Clone, PartialEq, ::prost::Message)]
654pub struct TextFieldValue {
655    /// Default to empty string if not set
656    #[prost(string, optional, tag = "1")]
657    pub value: ::core::option::Option<::prost::alloc::string::String>,
658}
659#[derive(Clone, Copy, PartialEq, ::prost::Message)]
660pub struct IntFieldValue {
661    #[prost(int64, optional, tag = "1")]
662    pub value: ::core::option::Option<i64>,
663}
664#[derive(Clone, Copy, PartialEq, ::prost::Message)]
665pub struct DoubleFieldValue {
666    #[prost(double, optional, tag = "1")]
667    pub value: ::core::option::Option<f64>,
668}
669#[derive(Clone, PartialEq, ::prost::Message)]
670pub struct SingleEnumFieldValue {
671    /// Default to empty string if not set
672    #[prost(string, optional, tag = "1")]
673    pub value: ::core::option::Option<::prost::alloc::string::String>,
674}
675#[derive(Clone, PartialEq, ::prost::Message)]
676pub struct MultiEnumFieldValue {
677    /// Default to empty list if not set
678    #[prost(string, repeated, tag = "1")]
679    pub value: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
680}
681/// Corresponds to usage of the upload api
682#[derive(Clone, PartialEq, ::prost::Message)]
683pub struct FileUploadFieldValue {
684    #[prost(oneof = "file_upload_field_value::UploadType", tags = "1")]
685    pub upload_type: ::core::option::Option<file_upload_field_value::UploadType>,
686}
687/// Nested message and enum types in `FileUploadFieldValue`.
688pub mod file_upload_field_value {
689    #[derive(Clone, PartialEq, ::prost::Oneof)]
690    pub enum UploadType {
691        #[prost(message, tag = "1")]
692        S3Upload(super::S3UploadFileValue),
693    }
694}
695#[derive(Clone, PartialEq, ::prost::Message)]
696pub struct S3UploadFileValue {
697    /// The S3 path where the uploaded file is stored
698    #[prost(string, tag = "1")]
699    pub s3_path: ::prost::alloc::string::String,
700    /// The original filename of the uploaded file
701    #[prost(string, tag = "2")]
702    pub file_name: ::prost::alloc::string::String,
703    /// The MIME type of the uploaded file
704    /// 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)
705    #[prost(string, optional, tag = "3")]
706    pub file_type: ::core::option::Option<::prost::alloc::string::String>,
707}
708#[derive(Clone, PartialEq, ::prost::Message)]
709pub struct MultiFileUploadFieldValue {
710    /// The list of uploads
711    #[prost(message, repeated, tag = "1")]
712    pub uploads: ::prost::alloc::vec::Vec<FileUploadFieldValue>,
713}
714#[derive(Clone, PartialEq, ::prost::Message)]
715pub struct ProcedureExecution {
716    #[prost(string, tag = "1")]
717    pub rid: ::prost::alloc::string::String,
718    #[prost(message, optional, tag = "2")]
719    pub metadata: ::core::option::Option<ProcedureExecutionMetadata>,
720    #[prost(message, optional, tag = "3")]
721    pub state: ::core::option::Option<ProcedureExecutionState>,
722}
723#[derive(Clone, PartialEq, ::prost::Message)]
724pub struct ProcedureExecutionMetadata {
725    #[prost(string, tag = "1")]
726    pub rid: ::prost::alloc::string::String,
727    /// The procedure template rid this execution is based on.
728    #[prost(string, tag = "2")]
729    pub procedure_rid: ::prost::alloc::string::String,
730    /// The commit ID of the procedure template this execution is based on.
731    /// This can be overridden at the node level for individual nodes.
732    #[prost(string, tag = "3")]
733    pub procedure_commit_id: ::prost::alloc::string::String,
734    #[prost(string, tag = "4")]
735    pub title: ::prost::alloc::string::String,
736    #[prost(string, optional, tag = "5")]
737    pub description: ::core::option::Option<::prost::alloc::string::String>,
738    #[prost(string, repeated, tag = "6")]
739    pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
740    #[prost(map = "string, string", tag = "7")]
741    pub properties: ::std::collections::HashMap<
742        ::prost::alloc::string::String,
743        ::prost::alloc::string::String,
744    >,
745    #[prost(string, tag = "8")]
746    pub created_by: ::prost::alloc::string::String,
747    #[prost(message, optional, tag = "9")]
748    pub created_at: ::core::option::Option<
749        super::super::super::super::google::protobuf::Timestamp,
750    >,
751    #[prost(string, tag = "10")]
752    pub updated_by: ::prost::alloc::string::String,
753    #[prost(message, optional, tag = "11")]
754    pub updated_at: ::core::option::Option<
755        super::super::super::super::google::protobuf::Timestamp,
756    >,
757    /// Will be unset until the execution transitions from NOT_STARTED to IN_PROGRESS.
758    #[prost(message, optional, tag = "12")]
759    pub started_at: ::core::option::Option<
760        super::super::super::super::google::protobuf::Timestamp,
761    >,
762    #[prost(string, optional, tag = "13")]
763    pub started_by: ::core::option::Option<::prost::alloc::string::String>,
764    /// Will be unset until the execution transitions from IN_PROGRESS to a terminal state.
765    #[prost(message, optional, tag = "14")]
766    pub finished_at: ::core::option::Option<
767        super::super::super::super::google::protobuf::Timestamp,
768    >,
769    #[prost(string, optional, tag = "15")]
770    pub finished_by: ::core::option::Option<::prost::alloc::string::String>,
771    /// Will be true/set if the execution is the ABORTED terminal state.
772    #[prost(message, optional, tag = "16")]
773    pub aborted_at: ::core::option::Option<
774        super::super::super::super::google::protobuf::Timestamp,
775    >,
776    #[prost(string, optional, tag = "17")]
777    pub aborted_by: ::core::option::Option<::prost::alloc::string::String>,
778    /// Will be set if the execution is in the ERRORED terminal state.
779    #[prost(message, optional, tag = "18")]
780    pub failed_at: ::core::option::Option<
781        super::super::super::super::google::protobuf::Timestamp,
782    >,
783    #[prost(string, optional, tag = "19")]
784    pub failed_by: ::core::option::Option<::prost::alloc::string::String>,
785    #[prost(string, optional, tag = "20")]
786    pub failed_reason: ::core::option::Option<::prost::alloc::string::String>,
787}
788/// ProcedureExecutionState is the state of an executing procedure.
789#[derive(Clone, PartialEq, ::prost::Message)]
790pub struct ProcedureExecutionState {
791    /// The current values for the global fields in the procedure.
792    #[prost(map = "string, message", tag = "1")]
793    pub global_fields: ::std::collections::HashMap<
794        ::prost::alloc::string::String,
795        FieldOutput,
796    >,
797    /// A map from execution node ID to the execution node.
798    #[prost(map = "string, message", tag = "2")]
799    pub nodes: ::std::collections::HashMap<
800        ::prost::alloc::string::String,
801        ProcedureExecutionNode,
802    >,
803    /// Section edges represent the visual grouping of sections and steps.
804    /// All keys are IDs for section nodes, and all values are lists of IDs for section or step nodes.
805    /// { A, \[B, C\] } means that section A visually groups nodes B and C together.
806    #[prost(map = "string, message", tag = "3")]
807    pub section_edges: ::std::collections::HashMap<
808        ::prost::alloc::string::String,
809        super::super::v1::NodeList,
810    >,
811    /// Step edges represent the dependencies between steps.
812    /// All keys and values are IDs for step nodes.
813    /// { A, \[B, C\] } means that steps B and C depend on step A to complete to be started
814    #[prost(map = "string, message", tag = "4")]
815    pub step_edges: ::std::collections::HashMap<
816        ::prost::alloc::string::String,
817        super::super::v1::NodeList,
818    >,
819}
820#[derive(Clone, PartialEq, ::prost::Message)]
821pub struct Strings {
822    #[prost(string, repeated, tag = "1")]
823    pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
824}
825/// TODO(pchen): how to handle the value typing here
826/// The outputs of a field in a step.
827/// This is different from FormFieldValue in that this represents the resolved value after the step has
828/// been completed. Eg, this would contain an AssetRid while the FormFieldValue could contain an AssetReference
829#[derive(Clone, PartialEq, ::prost::Message)]
830pub struct FieldOutput {
831    /// The oneof can be unset if the field has not been set yet.
832    #[prost(oneof = "field_output::Output", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10")]
833    pub output: ::core::option::Option<field_output::Output>,
834}
835/// Nested message and enum types in `FieldOutput`.
836pub mod field_output {
837    /// The oneof can be unset if the field has not been set yet.
838    #[derive(Clone, PartialEq, ::prost::Oneof)]
839    pub enum Output {
840        /// TODO(niwong): I think this could actually be buf validated to be required. If a global field is
841        /// not yet defined, I think it's just not present in the global_fields map
842        /// option (buf.validate.oneof) = {required: true};
843        #[prost(string, tag = "1")]
844        AssetRid(::prost::alloc::string::String),
845        #[prost(string, tag = "2")]
846        StringValue(::prost::alloc::string::String),
847        #[prost(double, tag = "3")]
848        DoubleValue(f64),
849        #[prost(bool, tag = "4")]
850        BooleanValue(bool),
851        #[prost(int64, tag = "5")]
852        IntValue(i64),
853        #[prost(message, tag = "6")]
854        StringsValue(super::Strings),
855        #[prost(string, tag = "7")]
856        IngestJobRid(::prost::alloc::string::String),
857        #[prost(string, tag = "8")]
858        RunRid(::prost::alloc::string::String),
859        #[prost(message, tag = "9")]
860        FileUploadValue(super::FileUploadFieldValue),
861        #[prost(message, tag = "10")]
862        MultiFileUploadValue(super::MultiFileUploadFieldValue),
863    }
864}
865#[derive(Clone, PartialEq, ::prost::Message)]
866pub struct CreateProcedureExecutionRequest {
867    #[prost(string, tag = "1")]
868    pub procedure_rid: ::prost::alloc::string::String,
869    #[prost(string, tag = "2")]
870    pub procedure_commit_id: ::prost::alloc::string::String,
871    #[prost(string, tag = "3")]
872    pub title: ::prost::alloc::string::String,
873    #[prost(string, optional, tag = "4")]
874    pub description: ::core::option::Option<::prost::alloc::string::String>,
875    #[prost(bool, optional, tag = "5")]
876    pub start_immediately: ::core::option::Option<bool>,
877}
878#[derive(Clone, PartialEq, ::prost::Message)]
879pub struct CreateProcedureExecutionResponse {
880    #[prost(message, optional, tag = "1")]
881    pub procedure_execution: ::core::option::Option<ProcedureExecution>,
882}
883#[derive(Clone, PartialEq, ::prost::Message)]
884pub struct GetProcedureExecutionRequest {
885    #[prost(string, tag = "1")]
886    pub procedure_execution_rid: ::prost::alloc::string::String,
887    /// If true, the display graph will be included in the response.
888    /// Default is false.
889    #[prost(bool, tag = "2")]
890    pub include_display_graph: bool,
891}
892#[derive(Clone, PartialEq, ::prost::Message)]
893pub struct GetProcedureExecutionResponse {
894    #[prost(message, optional, tag = "1")]
895    pub procedure_execution: ::core::option::Option<ProcedureExecution>,
896    /// Included if include_display_graph was set to true. Note that this is the
897    /// procedure template's display graph, not the execution graph.
898    #[prost(message, optional, tag = "2")]
899    pub display_graph: ::core::option::Option<super::super::v1::ProcedureDisplayGraph>,
900}
901#[derive(Clone, PartialEq, ::prost::Message)]
902pub struct UpdateProcedureExecutionMetadataRequest {
903    #[prost(string, tag = "1")]
904    pub procedure_execution_rid: ::prost::alloc::string::String,
905    #[prost(string, optional, tag = "2")]
906    pub title: ::core::option::Option<::prost::alloc::string::String>,
907    #[prost(string, optional, tag = "3")]
908    pub description: ::core::option::Option<::prost::alloc::string::String>,
909    #[prost(string, optional, tag = "4")]
910    pub commit_id: ::core::option::Option<::prost::alloc::string::String>,
911    #[prost(message, optional, tag = "5")]
912    pub labels: ::core::option::Option<super::super::super::types::LabelUpdateWrapper>,
913    #[prost(message, optional, tag = "6")]
914    pub properties: ::core::option::Option<
915        super::super::super::types::PropertyUpdateWrapper,
916    >,
917}
918#[derive(Clone, PartialEq, ::prost::Message)]
919pub struct UpdateProcedureExecutionMetadataResponse {
920    #[prost(message, optional, tag = "1")]
921    pub metadata: ::core::option::Option<ProcedureExecutionMetadata>,
922}
923/// TODO(niwong to pchen): I made an "update metadata" endpoint separately above,
924/// I think it'd be nice to turn this into a dedicated endpoint for changing the state of
925/// the overall execution (start, succeed, abort, fail)
926/// I also think in general we shouldn't be updating the entire ProcedureExecutionState
927/// but rather leveraging updateStep.
928/// TODO(WB-1879): allow to just update the global fields within the ProcExecState.
929#[derive(Clone, PartialEq, ::prost::Message)]
930pub struct UpdateProcedureExecutionRequest {
931    #[prost(string, tag = "1")]
932    pub procedure_execution_rid: ::prost::alloc::string::String,
933    #[prost(string, optional, tag = "2")]
934    pub title: ::core::option::Option<::prost::alloc::string::String>,
935    #[prost(string, optional, tag = "3")]
936    pub description: ::core::option::Option<::prost::alloc::string::String>,
937    #[prost(string, optional, tag = "4")]
938    pub commit_id: ::core::option::Option<::prost::alloc::string::String>,
939    #[prost(message, optional, tag = "5")]
940    pub labels: ::core::option::Option<super::super::super::types::LabelUpdateWrapper>,
941    #[prost(message, optional, tag = "6")]
942    pub properties: ::core::option::Option<
943        super::super::super::types::PropertyUpdateWrapper,
944    >,
945    #[prost(message, optional, tag = "7")]
946    pub state: ::core::option::Option<ProcedureExecutionState>,
947    #[prost(bool, optional, tag = "8")]
948    pub is_aborted: ::core::option::Option<bool>,
949    #[prost(message, optional, tag = "9")]
950    pub started_at: ::core::option::Option<
951        super::super::super::super::google::protobuf::Timestamp,
952    >,
953    #[prost(message, optional, tag = "10")]
954    pub finished_at: ::core::option::Option<
955        super::super::super::super::google::protobuf::Timestamp,
956    >,
957}
958#[derive(Clone, PartialEq, ::prost::Message)]
959pub struct UpdateProcedureExecutionResponse {
960    #[prost(message, optional, tag = "1")]
961    pub procedure_execution: ::core::option::Option<ProcedureExecution>,
962}
963#[derive(Clone, PartialEq, ::prost::Message)]
964pub struct UpdateStepRequest {
965    #[prost(string, tag = "1")]
966    pub procedure_execution_rid: ::prost::alloc::string::String,
967    /// The unique identifier of the execution step to update.
968    #[prost(string, tag = "2")]
969    pub step_id: ::prost::alloc::string::String,
970    /// Setting the value of the step's content. This is only allowed if the step is NOT_STARTED
971    /// or IN_PROGRESS.
972    #[prost(message, optional, tag = "3")]
973    pub value: ::core::option::Option<StepContentValue>,
974    /// Set whether the step has auto-proceed enabled. This is only allowed if the step is NOT_STARTED.
975    /// or IN_PROGRESS.
976    #[prost(message, optional, tag = "4")]
977    pub auto_proceed_config: ::core::option::Option<super::super::v1::AutoProceedConfig>,
978    /// Setting the state of the step. This will occur after the other updates in this request.
979    #[prost(message, optional, tag = "5")]
980    pub target_state: ::core::option::Option<TargetStepStateRequest>,
981}
982#[derive(Clone, PartialEq, ::prost::Message)]
983pub struct UpdateStepResponse {
984    #[prost(message, optional, tag = "1")]
985    pub procedure_execution: ::core::option::Option<ProcedureExecution>,
986}
987#[derive(Clone, PartialEq, ::prost::Message)]
988pub struct UpdateStepSuccessConditionStatusRequest {
989    #[prost(string, tag = "1")]
990    pub procedure_execution_rid: ::prost::alloc::string::String,
991    /// The unique identifier of the execution step to update.
992    #[prost(string, tag = "2")]
993    pub step_id: ::prost::alloc::string::String,
994    /// Setting the success_condition_status is only allowed if the step is SUBMITTED
995    /// and should only be done by the backend while monitoring the condition.
996    /// If the step is SKIPPED, the success_condition_status will still be set but
997    /// no completion actions will be run and the step's state will not be updated.
998    #[prost(message, optional, tag = "3")]
999    pub success_condition_status: ::core::option::Option<SuccessConditionStatus>,
1000}
1001#[derive(Clone, PartialEq, ::prost::Message)]
1002pub struct UpdateStepSuccessConditionStatusResponse {
1003    #[prost(message, optional, tag = "1")]
1004    pub procedure_execution: ::core::option::Option<ProcedureExecution>,
1005}
1006#[derive(Clone, PartialEq, ::prost::Message)]
1007pub struct RepeatStepRequest {
1008    #[prost(string, tag = "1")]
1009    pub procedure_execution_rid: ::prost::alloc::string::String,
1010    /// The unique identifier of the execution step to repeat/duplicate.
1011    #[prost(string, tag = "2")]
1012    pub step_id: ::prost::alloc::string::String,
1013    /// Behavior for how repeating the step will affect dependants.
1014    #[prost(enumeration = "RepeatStepBehavior", tag = "6")]
1015    pub behavior: i32,
1016    /// Setting the value of the step's content.
1017    #[prost(message, optional, tag = "3")]
1018    pub value: ::core::option::Option<StepContentValue>,
1019    /// Set whether the step has auto-proceed enabled.
1020    #[prost(message, optional, tag = "4")]
1021    pub auto_proceed_config: ::core::option::Option<super::super::v1::AutoProceedConfig>,
1022    /// Setting the state of the step. This will occur after the other updates in this request.
1023    #[prost(message, optional, tag = "5")]
1024    pub target_state: ::core::option::Option<TargetStepStateRequest>,
1025}
1026#[derive(Clone, PartialEq, ::prost::Message)]
1027pub struct RepeatStepResponse {
1028    #[prost(message, optional, tag = "1")]
1029    pub procedure_execution: ::core::option::Option<ProcedureExecution>,
1030}
1031#[derive(Clone, PartialEq, ::prost::Message)]
1032pub struct ProcedureExecutionSearchQuery {
1033    #[prost(
1034        oneof = "procedure_execution_search_query::Query",
1035        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9"
1036    )]
1037    pub query: ::core::option::Option<procedure_execution_search_query::Query>,
1038}
1039/// Nested message and enum types in `ProcedureExecutionSearchQuery`.
1040pub mod procedure_execution_search_query {
1041    #[derive(Clone, PartialEq, ::prost::Message)]
1042    pub struct ProcedureExecutionSearchAndQuery {
1043        #[prost(message, repeated, tag = "1")]
1044        pub queries: ::prost::alloc::vec::Vec<super::ProcedureExecutionSearchQuery>,
1045    }
1046    #[derive(Clone, PartialEq, ::prost::Message)]
1047    pub struct ProcedureExecutionSearchOrQuery {
1048        #[prost(message, repeated, tag = "1")]
1049        pub queries: ::prost::alloc::vec::Vec<super::ProcedureExecutionSearchQuery>,
1050    }
1051    #[derive(Clone, PartialEq, ::prost::Oneof)]
1052    pub enum Query {
1053        #[prost(string, tag = "1")]
1054        SearchText(::prost::alloc::string::String),
1055        #[prost(string, tag = "2")]
1056        Label(::prost::alloc::string::String),
1057        #[prost(message, tag = "3")]
1058        Property(super::super::super::super::types::Property),
1059        #[prost(message, tag = "4")]
1060        And(ProcedureExecutionSearchAndQuery),
1061        #[prost(message, tag = "5")]
1062        Or(ProcedureExecutionSearchOrQuery),
1063        #[prost(string, tag = "6")]
1064        Workspace(::prost::alloc::string::String),
1065        #[prost(string, tag = "7")]
1066        ProcedureRid(::prost::alloc::string::String),
1067        #[prost(string, tag = "8")]
1068        CommitId(::prost::alloc::string::String),
1069        #[prost(string, tag = "9")]
1070        CreatedBy(::prost::alloc::string::String),
1071    }
1072}
1073#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1074pub struct ProcedureExecutionSortOptions {
1075    #[prost(bool, tag = "1")]
1076    pub is_descending: bool,
1077    #[prost(enumeration = "SearchProcedureExecutionsSortField", tag = "2")]
1078    pub sort_field: i32,
1079}
1080#[derive(Clone, PartialEq, ::prost::Message)]
1081pub struct SearchProcedureExecutionsRequest {
1082    #[prost(message, optional, tag = "1")]
1083    pub query: ::core::option::Option<ProcedureExecutionSearchQuery>,
1084    #[prost(message, optional, tag = "2")]
1085    pub sort_options: ::core::option::Option<ProcedureExecutionSortOptions>,
1086    /// Page sizes greater than 1_000 will be rejected. Default pageSize is 100.
1087    #[prost(int32, optional, tag = "3")]
1088    pub page_size: ::core::option::Option<i32>,
1089    #[prost(string, optional, tag = "4")]
1090    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1091}
1092#[derive(Clone, PartialEq, ::prost::Message)]
1093pub struct SearchProcedureExecutionsResponse {
1094    #[prost(message, repeated, tag = "1")]
1095    pub procedure_executions: ::prost::alloc::vec::Vec<ProcedureExecutionMetadata>,
1096    #[prost(string, optional, tag = "2")]
1097    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1098}
1099#[derive(Clone, PartialEq, ::prost::Message)]
1100pub struct BatchGetProcedureExecutionMetadataRequest {
1101    #[prost(string, repeated, tag = "1")]
1102    pub procedure_execution_rids: ::prost::alloc::vec::Vec<
1103        ::prost::alloc::string::String,
1104    >,
1105}
1106#[derive(Clone, PartialEq, ::prost::Message)]
1107pub struct BatchGetProcedureExecutionMetadataResponse {
1108    #[prost(message, repeated, tag = "1")]
1109    pub procedure_executions: ::prost::alloc::vec::Vec<ProcedureExecutionMetadata>,
1110}
1111/// Categorizes why a webhook success condition failed.
1112/// This enum represents terminal failure states - failures that caused the condition to permanently fail.
1113#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1114#[repr(i32)]
1115pub enum WebhookFailureReason {
1116    /// Unspecified/unknown failure reason. Should not be used in normal operation.
1117    Unspecified = 0,
1118    /// External system returned 4XX client error (permanent failure, no retry attempted).
1119    /// Indicates misconfiguration or invalid request that won't succeed on retry.
1120    /// Common causes: 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found.
1121    ClientError = 1,
1122    /// External system returned 5XX server error and max retries were exhausted.
1123    /// Server errors are typically transient and retries were attempted.
1124    /// Common causes: 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable.
1125    ServerErrorMaxRetriesExceeded = 2,
1126    /// Individual HTTP request timed out and max retries were exhausted.
1127    /// The external system didn't respond within the per-request timeout window.
1128    TimeoutMaxRetriesExceeded = 3,
1129    /// Overall condition timeout exceeded before receiving successful 2xx response.
1130    /// The webhook delivery config's timeout_seconds was reached.
1131    /// This can occur even if individual requests completed (returned responses)
1132    /// but took too long cumulatively between retry delays, without receiving 2xx.
1133    OverallTimeoutExceeded = 4,
1134    /// Network-level failure prevented request delivery and max retries were exhausted.
1135    /// Common causes: DNS resolution failure, connection refused, TLS handshake failure.
1136    NetworkErrorMaxRetriesExceeded = 5,
1137    /// Template rendering or payload serialization failed (permanent failure).
1138    /// The payload_template could not be rendered to valid JSON.
1139    /// Common causes: Invalid Handlebars syntax, circular references, invalid JSON after rendering.
1140    PayloadError = 6,
1141    /// Too many redirects encountered (typically indicates redirect loop).
1142    /// Follows HTTP standard - most clients limit to 20 redirects.
1143    RedirectLoop = 7,
1144    /// Integration configuration is invalid or missing required fields.
1145    /// Common causes: Integration RID not found, missing URL, invalid HMAC config.
1146    IntegrationConfigError = 8,
1147}
1148impl WebhookFailureReason {
1149    /// String value of the enum field names used in the ProtoBuf definition.
1150    ///
1151    /// The values are not transformed in any way and thus are considered stable
1152    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1153    pub fn as_str_name(&self) -> &'static str {
1154        match self {
1155            Self::Unspecified => "WEBHOOK_FAILURE_REASON_UNSPECIFIED",
1156            Self::ClientError => "WEBHOOK_FAILURE_REASON_CLIENT_ERROR",
1157            Self::ServerErrorMaxRetriesExceeded => {
1158                "WEBHOOK_FAILURE_REASON_SERVER_ERROR_MAX_RETRIES_EXCEEDED"
1159            }
1160            Self::TimeoutMaxRetriesExceeded => {
1161                "WEBHOOK_FAILURE_REASON_TIMEOUT_MAX_RETRIES_EXCEEDED"
1162            }
1163            Self::OverallTimeoutExceeded => {
1164                "WEBHOOK_FAILURE_REASON_OVERALL_TIMEOUT_EXCEEDED"
1165            }
1166            Self::NetworkErrorMaxRetriesExceeded => {
1167                "WEBHOOK_FAILURE_REASON_NETWORK_ERROR_MAX_RETRIES_EXCEEDED"
1168            }
1169            Self::PayloadError => "WEBHOOK_FAILURE_REASON_PAYLOAD_ERROR",
1170            Self::RedirectLoop => "WEBHOOK_FAILURE_REASON_REDIRECT_LOOP",
1171            Self::IntegrationConfigError => {
1172                "WEBHOOK_FAILURE_REASON_INTEGRATION_CONFIG_ERROR"
1173            }
1174        }
1175    }
1176    /// Creates an enum from field names used in the ProtoBuf definition.
1177    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1178        match value {
1179            "WEBHOOK_FAILURE_REASON_UNSPECIFIED" => Some(Self::Unspecified),
1180            "WEBHOOK_FAILURE_REASON_CLIENT_ERROR" => Some(Self::ClientError),
1181            "WEBHOOK_FAILURE_REASON_SERVER_ERROR_MAX_RETRIES_EXCEEDED" => {
1182                Some(Self::ServerErrorMaxRetriesExceeded)
1183            }
1184            "WEBHOOK_FAILURE_REASON_TIMEOUT_MAX_RETRIES_EXCEEDED" => {
1185                Some(Self::TimeoutMaxRetriesExceeded)
1186            }
1187            "WEBHOOK_FAILURE_REASON_OVERALL_TIMEOUT_EXCEEDED" => {
1188                Some(Self::OverallTimeoutExceeded)
1189            }
1190            "WEBHOOK_FAILURE_REASON_NETWORK_ERROR_MAX_RETRIES_EXCEEDED" => {
1191                Some(Self::NetworkErrorMaxRetriesExceeded)
1192            }
1193            "WEBHOOK_FAILURE_REASON_PAYLOAD_ERROR" => Some(Self::PayloadError),
1194            "WEBHOOK_FAILURE_REASON_REDIRECT_LOOP" => Some(Self::RedirectLoop),
1195            "WEBHOOK_FAILURE_REASON_INTEGRATION_CONFIG_ERROR" => {
1196                Some(Self::IntegrationConfigError)
1197            }
1198            _ => None,
1199        }
1200    }
1201}
1202#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1203#[repr(i32)]
1204pub enum RepeatStepBehavior {
1205    Unspecified = 0,
1206    /// The targeted step will be repeated, but the original graph will be preserved
1207    /// and only direct children will be checked for state updates
1208    Isolated = 1,
1209}
1210impl RepeatStepBehavior {
1211    /// String value of the enum field names used in the ProtoBuf definition.
1212    ///
1213    /// The values are not transformed in any way and thus are considered stable
1214    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1215    pub fn as_str_name(&self) -> &'static str {
1216        match self {
1217            Self::Unspecified => "REPEAT_STEP_BEHAVIOR_UNSPECIFIED",
1218            Self::Isolated => "REPEAT_STEP_BEHAVIOR_ISOLATED",
1219        }
1220    }
1221    /// Creates an enum from field names used in the ProtoBuf definition.
1222    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1223        match value {
1224            "REPEAT_STEP_BEHAVIOR_UNSPECIFIED" => Some(Self::Unspecified),
1225            "REPEAT_STEP_BEHAVIOR_ISOLATED" => Some(Self::Isolated),
1226            _ => None,
1227        }
1228    }
1229}
1230#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1231#[repr(i32)]
1232pub enum SearchProcedureExecutionsSortField {
1233    Unspecified = 0,
1234    CreatedAt = 1,
1235    StartedAt = 2,
1236    FinishedAt = 3,
1237    UpdatedAt = 4,
1238}
1239impl SearchProcedureExecutionsSortField {
1240    /// String value of the enum field names used in the ProtoBuf definition.
1241    ///
1242    /// The values are not transformed in any way and thus are considered stable
1243    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1244    pub fn as_str_name(&self) -> &'static str {
1245        match self {
1246            Self::Unspecified => "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_UNSPECIFIED",
1247            Self::CreatedAt => "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_CREATED_AT",
1248            Self::StartedAt => "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_STARTED_AT",
1249            Self::FinishedAt => "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_FINISHED_AT",
1250            Self::UpdatedAt => "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_UPDATED_AT",
1251        }
1252    }
1253    /// Creates an enum from field names used in the ProtoBuf definition.
1254    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1255        match value {
1256            "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_UNSPECIFIED" => {
1257                Some(Self::Unspecified)
1258            }
1259            "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_CREATED_AT" => Some(Self::CreatedAt),
1260            "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_STARTED_AT" => Some(Self::StartedAt),
1261            "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_FINISHED_AT" => {
1262                Some(Self::FinishedAt)
1263            }
1264            "SEARCH_PROCEDURE_EXECUTIONS_SORT_FIELD_UPDATED_AT" => Some(Self::UpdatedAt),
1265            _ => None,
1266        }
1267    }
1268}
1269#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1270#[repr(i32)]
1271pub enum ProcedureExecutionsServiceError {
1272    Unspecified = 0,
1273    NotFound = 1,
1274    ProcNotFound = 2,
1275    NodeNotFound = 3,
1276    InvalidNode = 4,
1277    InvalidGraph = 5,
1278    InvalidStepTransition = 6,
1279    InvalidSearchToken = 7,
1280    InvalidStepUpdate = 8,
1281}
1282impl ProcedureExecutionsServiceError {
1283    /// String value of the enum field names used in the ProtoBuf definition.
1284    ///
1285    /// The values are not transformed in any way and thus are considered stable
1286    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1287    pub fn as_str_name(&self) -> &'static str {
1288        match self {
1289            Self::Unspecified => "PROCEDURE_EXECUTIONS_SERVICE_ERROR_UNSPECIFIED",
1290            Self::NotFound => "PROCEDURE_EXECUTIONS_SERVICE_ERROR_NOT_FOUND",
1291            Self::ProcNotFound => "PROCEDURE_EXECUTIONS_SERVICE_ERROR_PROC_NOT_FOUND",
1292            Self::NodeNotFound => "PROCEDURE_EXECUTIONS_SERVICE_ERROR_NODE_NOT_FOUND",
1293            Self::InvalidNode => "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_NODE",
1294            Self::InvalidGraph => "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_GRAPH",
1295            Self::InvalidStepTransition => {
1296                "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_STEP_TRANSITION"
1297            }
1298            Self::InvalidSearchToken => {
1299                "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_SEARCH_TOKEN"
1300            }
1301            Self::InvalidStepUpdate => {
1302                "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_STEP_UPDATE"
1303            }
1304        }
1305    }
1306    /// Creates an enum from field names used in the ProtoBuf definition.
1307    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1308        match value {
1309            "PROCEDURE_EXECUTIONS_SERVICE_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
1310            "PROCEDURE_EXECUTIONS_SERVICE_ERROR_NOT_FOUND" => Some(Self::NotFound),
1311            "PROCEDURE_EXECUTIONS_SERVICE_ERROR_PROC_NOT_FOUND" => {
1312                Some(Self::ProcNotFound)
1313            }
1314            "PROCEDURE_EXECUTIONS_SERVICE_ERROR_NODE_NOT_FOUND" => {
1315                Some(Self::NodeNotFound)
1316            }
1317            "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_NODE" => Some(Self::InvalidNode),
1318            "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_GRAPH" => {
1319                Some(Self::InvalidGraph)
1320            }
1321            "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_STEP_TRANSITION" => {
1322                Some(Self::InvalidStepTransition)
1323            }
1324            "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_SEARCH_TOKEN" => {
1325                Some(Self::InvalidSearchToken)
1326            }
1327            "PROCEDURE_EXECUTIONS_SERVICE_ERROR_INVALID_STEP_UPDATE" => {
1328                Some(Self::InvalidStepUpdate)
1329            }
1330            _ => None,
1331        }
1332    }
1333}
1334/// Generated client implementations.
1335pub mod procedure_executions_service_client {
1336    #![allow(
1337        unused_variables,
1338        dead_code,
1339        missing_docs,
1340        clippy::wildcard_imports,
1341        clippy::let_unit_value,
1342    )]
1343    use tonic::codegen::*;
1344    use tonic::codegen::http::Uri;
1345    /// Service for creating and managing procedure executions.
1346    #[derive(Debug, Clone)]
1347    pub struct ProcedureExecutionsServiceClient<T> {
1348        inner: tonic::client::Grpc<T>,
1349    }
1350    impl ProcedureExecutionsServiceClient<tonic::transport::Channel> {
1351        /// Attempt to create a new client by connecting to a given endpoint.
1352        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1353        where
1354            D: TryInto<tonic::transport::Endpoint>,
1355            D::Error: Into<StdError>,
1356        {
1357            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1358            Ok(Self::new(conn))
1359        }
1360    }
1361    impl<T> ProcedureExecutionsServiceClient<T>
1362    where
1363        T: tonic::client::GrpcService<tonic::body::Body>,
1364        T::Error: Into<StdError>,
1365        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1366        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1367    {
1368        pub fn new(inner: T) -> Self {
1369            let inner = tonic::client::Grpc::new(inner);
1370            Self { inner }
1371        }
1372        pub fn with_origin(inner: T, origin: Uri) -> Self {
1373            let inner = tonic::client::Grpc::with_origin(inner, origin);
1374            Self { inner }
1375        }
1376        pub fn with_interceptor<F>(
1377            inner: T,
1378            interceptor: F,
1379        ) -> ProcedureExecutionsServiceClient<InterceptedService<T, F>>
1380        where
1381            F: tonic::service::Interceptor,
1382            T::ResponseBody: Default,
1383            T: tonic::codegen::Service<
1384                http::Request<tonic::body::Body>,
1385                Response = http::Response<
1386                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1387                >,
1388            >,
1389            <T as tonic::codegen::Service<
1390                http::Request<tonic::body::Body>,
1391            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1392        {
1393            ProcedureExecutionsServiceClient::new(
1394                InterceptedService::new(inner, interceptor),
1395            )
1396        }
1397        /// Compress requests with the given encoding.
1398        ///
1399        /// This requires the server to support it otherwise it might respond with an
1400        /// error.
1401        #[must_use]
1402        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1403            self.inner = self.inner.send_compressed(encoding);
1404            self
1405        }
1406        /// Enable decompressing responses.
1407        #[must_use]
1408        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1409            self.inner = self.inner.accept_compressed(encoding);
1410            self
1411        }
1412        /// Limits the maximum size of a decoded message.
1413        ///
1414        /// Default: `4MB`
1415        #[must_use]
1416        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1417            self.inner = self.inner.max_decoding_message_size(limit);
1418            self
1419        }
1420        /// Limits the maximum size of an encoded message.
1421        ///
1422        /// Default: `usize::MAX`
1423        #[must_use]
1424        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1425            self.inner = self.inner.max_encoding_message_size(limit);
1426            self
1427        }
1428        /// Create a new procedure execution from a procedure
1429        pub async fn create_procedure_execution(
1430            &mut self,
1431            request: impl tonic::IntoRequest<super::CreateProcedureExecutionRequest>,
1432        ) -> std::result::Result<
1433            tonic::Response<super::CreateProcedureExecutionResponse>,
1434            tonic::Status,
1435        > {
1436            self.inner
1437                .ready()
1438                .await
1439                .map_err(|e| {
1440                    tonic::Status::unknown(
1441                        format!("Service was not ready: {}", e.into()),
1442                    )
1443                })?;
1444            let codec = tonic::codec::ProstCodec::default();
1445            let path = http::uri::PathAndQuery::from_static(
1446                "/nominal.procedures.executions.v1.ProcedureExecutionsService/CreateProcedureExecution",
1447            );
1448            let mut req = request.into_request();
1449            req.extensions_mut()
1450                .insert(
1451                    GrpcMethod::new(
1452                        "nominal.procedures.executions.v1.ProcedureExecutionsService",
1453                        "CreateProcedureExecution",
1454                    ),
1455                );
1456            self.inner.unary(req, path, codec).await
1457        }
1458        /// Get a procedure execution by its RID
1459        pub async fn get_procedure_execution(
1460            &mut self,
1461            request: impl tonic::IntoRequest<super::GetProcedureExecutionRequest>,
1462        ) -> std::result::Result<
1463            tonic::Response<super::GetProcedureExecutionResponse>,
1464            tonic::Status,
1465        > {
1466            self.inner
1467                .ready()
1468                .await
1469                .map_err(|e| {
1470                    tonic::Status::unknown(
1471                        format!("Service was not ready: {}", e.into()),
1472                    )
1473                })?;
1474            let codec = tonic::codec::ProstCodec::default();
1475            let path = http::uri::PathAndQuery::from_static(
1476                "/nominal.procedures.executions.v1.ProcedureExecutionsService/GetProcedureExecution",
1477            );
1478            let mut req = request.into_request();
1479            req.extensions_mut()
1480                .insert(
1481                    GrpcMethod::new(
1482                        "nominal.procedures.executions.v1.ProcedureExecutionsService",
1483                        "GetProcedureExecution",
1484                    ),
1485                );
1486            self.inner.unary(req, path, codec).await
1487        }
1488        /// Update the metadata of a procedure execution
1489        pub async fn update_procedure_execution_metadata(
1490            &mut self,
1491            request: impl tonic::IntoRequest<
1492                super::UpdateProcedureExecutionMetadataRequest,
1493            >,
1494        ) -> std::result::Result<
1495            tonic::Response<super::UpdateProcedureExecutionMetadataResponse>,
1496            tonic::Status,
1497        > {
1498            self.inner
1499                .ready()
1500                .await
1501                .map_err(|e| {
1502                    tonic::Status::unknown(
1503                        format!("Service was not ready: {}", e.into()),
1504                    )
1505                })?;
1506            let codec = tonic::codec::ProstCodec::default();
1507            let path = http::uri::PathAndQuery::from_static(
1508                "/nominal.procedures.executions.v1.ProcedureExecutionsService/UpdateProcedureExecutionMetadata",
1509            );
1510            let mut req = request.into_request();
1511            req.extensions_mut()
1512                .insert(
1513                    GrpcMethod::new(
1514                        "nominal.procedures.executions.v1.ProcedureExecutionsService",
1515                        "UpdateProcedureExecutionMetadata",
1516                    ),
1517                );
1518            self.inner.unary(req, path, codec).await
1519        }
1520        /// Heavy-handed update method for procedure execution
1521        /// TODO(pchen): This isn't the expected final endpoint, this is just for editing the graph while we iterate
1522        /// There likely be additional fine-grained methods for editing the procedure
1523        pub async fn update_procedure_execution(
1524            &mut self,
1525            request: impl tonic::IntoRequest<super::UpdateProcedureExecutionRequest>,
1526        ) -> std::result::Result<
1527            tonic::Response<super::UpdateProcedureExecutionResponse>,
1528            tonic::Status,
1529        > {
1530            self.inner
1531                .ready()
1532                .await
1533                .map_err(|e| {
1534                    tonic::Status::unknown(
1535                        format!("Service was not ready: {}", e.into()),
1536                    )
1537                })?;
1538            let codec = tonic::codec::ProstCodec::default();
1539            let path = http::uri::PathAndQuery::from_static(
1540                "/nominal.procedures.executions.v1.ProcedureExecutionsService/UpdateProcedureExecution",
1541            );
1542            let mut req = request.into_request();
1543            req.extensions_mut()
1544                .insert(
1545                    GrpcMethod::new(
1546                        "nominal.procedures.executions.v1.ProcedureExecutionsService",
1547                        "UpdateProcedureExecution",
1548                    ),
1549                );
1550            self.inner.unary(req, path, codec).await
1551        }
1552        /// Update the status of a step in a procedure execution. This can only be done if the step is NOT_STARTED,
1553        /// IN_PROGRESS, or SUBMITTED. Other state transitions are managed by the backend.
1554        pub async fn update_step(
1555            &mut self,
1556            request: impl tonic::IntoRequest<super::UpdateStepRequest>,
1557        ) -> std::result::Result<
1558            tonic::Response<super::UpdateStepResponse>,
1559            tonic::Status,
1560        > {
1561            self.inner
1562                .ready()
1563                .await
1564                .map_err(|e| {
1565                    tonic::Status::unknown(
1566                        format!("Service was not ready: {}", e.into()),
1567                    )
1568                })?;
1569            let codec = tonic::codec::ProstCodec::default();
1570            let path = http::uri::PathAndQuery::from_static(
1571                "/nominal.procedures.executions.v1.ProcedureExecutionsService/UpdateStep",
1572            );
1573            let mut req = request.into_request();
1574            req.extensions_mut()
1575                .insert(
1576                    GrpcMethod::new(
1577                        "nominal.procedures.executions.v1.ProcedureExecutionsService",
1578                        "UpdateStep",
1579                    ),
1580                );
1581            self.inner.unary(req, path, codec).await
1582        }
1583        /// This should only be called by the backend to update the success_condition_status of a step.
1584        /// This can only be done if the step is SUBMITTED.
1585        pub async fn update_step_success_condition_status(
1586            &mut self,
1587            request: impl tonic::IntoRequest<
1588                super::UpdateStepSuccessConditionStatusRequest,
1589            >,
1590        ) -> std::result::Result<
1591            tonic::Response<super::UpdateStepSuccessConditionStatusResponse>,
1592            tonic::Status,
1593        > {
1594            self.inner
1595                .ready()
1596                .await
1597                .map_err(|e| {
1598                    tonic::Status::unknown(
1599                        format!("Service was not ready: {}", e.into()),
1600                    )
1601                })?;
1602            let codec = tonic::codec::ProstCodec::default();
1603            let path = http::uri::PathAndQuery::from_static(
1604                "/nominal.procedures.executions.v1.ProcedureExecutionsService/UpdateStepSuccessConditionStatus",
1605            );
1606            let mut req = request.into_request();
1607            req.extensions_mut()
1608                .insert(
1609                    GrpcMethod::new(
1610                        "nominal.procedures.executions.v1.ProcedureExecutionsService",
1611                        "UpdateStepSuccessConditionStatus",
1612                    ),
1613                );
1614            self.inner.unary(req, path, codec).await
1615        }
1616        /// Repeat a previously finished step in a procedure execution. This can only be done if the given step
1617        /// is in state SUCCEEDED, SKIPPED or ERRORED. Other state transitions are managed by the backend.
1618        pub async fn repeat_step(
1619            &mut self,
1620            request: impl tonic::IntoRequest<super::RepeatStepRequest>,
1621        ) -> std::result::Result<
1622            tonic::Response<super::RepeatStepResponse>,
1623            tonic::Status,
1624        > {
1625            self.inner
1626                .ready()
1627                .await
1628                .map_err(|e| {
1629                    tonic::Status::unknown(
1630                        format!("Service was not ready: {}", e.into()),
1631                    )
1632                })?;
1633            let codec = tonic::codec::ProstCodec::default();
1634            let path = http::uri::PathAndQuery::from_static(
1635                "/nominal.procedures.executions.v1.ProcedureExecutionsService/RepeatStep",
1636            );
1637            let mut req = request.into_request();
1638            req.extensions_mut()
1639                .insert(
1640                    GrpcMethod::new(
1641                        "nominal.procedures.executions.v1.ProcedureExecutionsService",
1642                        "RepeatStep",
1643                    ),
1644                );
1645            self.inner.unary(req, path, codec).await
1646        }
1647        /// Search for procedure executions
1648        pub async fn search_procedure_executions(
1649            &mut self,
1650            request: impl tonic::IntoRequest<super::SearchProcedureExecutionsRequest>,
1651        ) -> std::result::Result<
1652            tonic::Response<super::SearchProcedureExecutionsResponse>,
1653            tonic::Status,
1654        > {
1655            self.inner
1656                .ready()
1657                .await
1658                .map_err(|e| {
1659                    tonic::Status::unknown(
1660                        format!("Service was not ready: {}", e.into()),
1661                    )
1662                })?;
1663            let codec = tonic::codec::ProstCodec::default();
1664            let path = http::uri::PathAndQuery::from_static(
1665                "/nominal.procedures.executions.v1.ProcedureExecutionsService/SearchProcedureExecutions",
1666            );
1667            let mut req = request.into_request();
1668            req.extensions_mut()
1669                .insert(
1670                    GrpcMethod::new(
1671                        "nominal.procedures.executions.v1.ProcedureExecutionsService",
1672                        "SearchProcedureExecutions",
1673                    ),
1674                );
1675            self.inner.unary(req, path, codec).await
1676        }
1677        /// Batch get procedure execution metadata
1678        pub async fn batch_get_procedure_execution_metadata(
1679            &mut self,
1680            request: impl tonic::IntoRequest<
1681                super::BatchGetProcedureExecutionMetadataRequest,
1682            >,
1683        ) -> std::result::Result<
1684            tonic::Response<super::BatchGetProcedureExecutionMetadataResponse>,
1685            tonic::Status,
1686        > {
1687            self.inner
1688                .ready()
1689                .await
1690                .map_err(|e| {
1691                    tonic::Status::unknown(
1692                        format!("Service was not ready: {}", e.into()),
1693                    )
1694                })?;
1695            let codec = tonic::codec::ProstCodec::default();
1696            let path = http::uri::PathAndQuery::from_static(
1697                "/nominal.procedures.executions.v1.ProcedureExecutionsService/BatchGetProcedureExecutionMetadata",
1698            );
1699            let mut req = request.into_request();
1700            req.extensions_mut()
1701                .insert(
1702                    GrpcMethod::new(
1703                        "nominal.procedures.executions.v1.ProcedureExecutionsService",
1704                        "BatchGetProcedureExecutionMetadata",
1705                    ),
1706                );
1707            self.inner.unary(req, path, codec).await
1708        }
1709    }
1710}