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