nominal_api/proto/
nominal.procedures.v1.rs

1// This file is @generated by prost-build.
2/// ProcedureState is the versioned state of a procedure template.
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct ProcedureState {
5    /// Global fields are set at the beginning of the procedure execution.
6    /// These fields can be referenced by any step in the procedure by using {field_id}.
7    #[prost(map = "string, message", tag = "1")]
8    pub global_fields: ::std::collections::HashMap<
9        ::prost::alloc::string::String,
10        FormField,
11    >,
12    /// A map from node ID to the node.
13    #[prost(map = "string, message", tag = "2")]
14    pub nodes: ::std::collections::HashMap<
15        ::prost::alloc::string::String,
16        ProcedureNode,
17    >,
18    /// Section edges represent the visual grouping of sections and steps.
19    /// All keys are IDs for section nodes, and all values are lists of IDs for section or step nodes.
20    /// { A, \[B, C\] } means that section A visually groups nodes B and C together.
21    #[prost(map = "string, message", tag = "3")]
22    pub section_edges: ::std::collections::HashMap<
23        ::prost::alloc::string::String,
24        NodeList,
25    >,
26    /// Step edges represent the dependencies between steps.
27    /// All keys and values are IDs for step nodes.
28    /// { A, \[B, C\] } means that steps B and C depend on step A to complete to be started
29    #[prost(map = "string, message", tag = "4")]
30    pub step_edges: ::std::collections::HashMap<
31        ::prost::alloc::string::String,
32        NodeList,
33    >,
34}
35/// A simpler representation of the procedure graph that is used for display in a UI.
36#[derive(Clone, PartialEq, ::prost::Message)]
37pub struct ProcedureDisplayGraph {
38    /// Sections or steps that do not belong to any parent sections.
39    /// This is ordered in a topological ordering of steps.
40    #[prost(string, repeated, tag = "1")]
41    pub top_level_nodes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
42    /// Map of section node IDs to their topologically sorted children
43    #[prost(map = "string, message", tag = "2")]
44    pub section_to_sorted_children: ::std::collections::HashMap<
45        ::prost::alloc::string::String,
46        NodeList,
47    >,
48}
49/// A simplified version of procedure state that is currently used for procedure authoring.
50/// In this form, the graph is a completely linear structure where each step depends solely
51/// on the preceding step.
52#[derive(Clone, PartialEq, ::prost::Message)]
53pub struct NestedProcedure {
54    /// Title of the procedure
55    #[prost(string, tag = "1")]
56    pub title: ::prost::alloc::string::String,
57    /// Optional long-form description for the procedure
58    #[prost(string, optional, tag = "2")]
59    pub description: ::core::option::Option<::prost::alloc::string::String>,
60    /// Steps in the procedure
61    #[prost(message, repeated, tag = "3")]
62    pub steps: ::prost::alloc::vec::Vec<NestedProcedureNode>,
63    /// Global fields are set at the beginning of the procedure execution.
64    /// These fields can be referenced by any step in the procedure by using {field_id}.
65    #[prost(map = "string, message", tag = "4")]
66    pub global_fields: ::std::collections::HashMap<
67        ::prost::alloc::string::String,
68        FormField,
69    >,
70}
71/// A list of node IDs.
72#[derive(Clone, PartialEq, ::prost::Message)]
73pub struct NodeList {
74    #[prost(string, repeated, tag = "1")]
75    pub node_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
76}
77/// A procedure node is either a section or a step.
78#[derive(Clone, PartialEq, ::prost::Message)]
79pub struct ProcedureNode {
80    #[prost(oneof = "procedure_node::Node", tags = "1, 2")]
81    pub node: ::core::option::Option<procedure_node::Node>,
82}
83/// Nested message and enum types in `ProcedureNode`.
84pub mod procedure_node {
85    #[derive(Clone, PartialEq, ::prost::Oneof)]
86    pub enum Node {
87        /// A section node provides a visual grouping of other sections and steps.
88        #[prost(message, tag = "1")]
89        Section(super::ProcedureSectionNode),
90        /// A step node represents a step in the procedure.
91        /// It serves as a "template" for the ExecutionStep that will be created during procedure execution.
92        #[prost(message, tag = "2")]
93        Step(super::ProcedureStepNode),
94    }
95}
96/// A procedure section node visually groups other sections and steps.
97#[derive(Clone, PartialEq, ::prost::Message)]
98pub struct ProcedureSectionNode {
99    /// Unique identifier for this node in the procedure graph.
100    #[prost(string, tag = "1")]
101    pub id: ::prost::alloc::string::String,
102    /// Title of this section
103    #[prost(string, tag = "2")]
104    pub title: ::prost::alloc::string::String,
105    /// Optional long-form description for this section
106    #[prost(string, optional, tag = "3")]
107    pub description: ::core::option::Option<::prost::alloc::string::String>,
108}
109/// A procedure step node represents a step in the procedure.
110#[derive(Clone, PartialEq, ::prost::Message)]
111pub struct ProcedureStepNode {
112    /// Unique identifier for this node in the procedure graph.
113    #[prost(string, tag = "1")]
114    pub id: ::prost::alloc::string::String,
115    /// Title of this step
116    #[prost(string, tag = "2")]
117    pub title: ::prost::alloc::string::String,
118    /// The content of this step.
119    #[prost(message, optional, tag = "3")]
120    pub content: ::core::option::Option<ProcedureStepContent>,
121    /// If set, other steps can reference this step's outputs using "{output_id}.{field_id}".
122    /// Output_id must be globally unique across all steps in the procedure.
123    /// During execution, we also enforce that the output_id is unique across all non-outdated steps.
124    #[prost(string, optional, tag = "4")]
125    pub output_id: ::core::option::Option<::prost::alloc::string::String>,
126    /// Optional long-form description for this step
127    #[prost(string, optional, tag = "5")]
128    pub description: ::core::option::Option<::prost::alloc::string::String>,
129    /// is_required defaults to false, meaning that the step may be skipped
130    #[prost(bool, optional, tag = "6")]
131    pub is_required: ::core::option::Option<bool>,
132    /// Configuration for if and how the step should automatically transition from NOT_STARTED to IN_PROGRESS
133    /// By default, this will be `all_parents`.
134    #[prost(message, optional, tag = "7")]
135    pub auto_start: ::core::option::Option<AutoStartConfig>,
136    /// Configuration for if and how the step should automatically submit the step contents when requirements are met.
137    /// By default, this will be `disabled`.
138    #[prost(message, optional, tag = "8")]
139    pub initial_auto_proceed_config: ::core::option::Option<AutoProceedConfig>,
140    /// Configuration for whether the step will require a condition to be met for the step to be completed
141    /// By default, this is not set, meaning that the step will not wait on any conditions before completing.
142    #[prost(message, optional, tag = "9")]
143    pub success_condition: ::core::option::Option<SuccessCondition>,
144    /// Configuration for the actions to take when the step transitions to a completed state (SUCCEEDED, ERRORED, SKIPPED)
145    /// By default, there are no actions.
146    #[prost(message, repeated, tag = "10")]
147    pub completion_action_configs: ::prost::alloc::vec::Vec<CompletionActionConfig>,
148}
149/// A section or a step in a NestedProcedure.
150#[derive(Clone, PartialEq, ::prost::Message)]
151pub struct NestedProcedureNode {
152    /// TODO(pchen): used for nested procedure parsing
153    #[prost(string, optional, tag = "5")]
154    pub id: ::core::option::Option<::prost::alloc::string::String>,
155    /// Title of this section or step.
156    #[prost(string, tag = "1")]
157    pub title: ::prost::alloc::string::String,
158    /// Optional long-form description for this section or step.
159    #[prost(string, optional, tag = "2")]
160    pub description: ::core::option::Option<::prost::alloc::string::String>,
161    /// If this node is a section, then it can contain other sections and steps.
162    #[prost(message, repeated, tag = "3")]
163    pub steps: ::prost::alloc::vec::Vec<NestedProcedureNode>,
164    /// If this node is a step, then this field contains the step definition.
165    #[prost(message, optional, tag = "4")]
166    pub step: ::core::option::Option<nested_procedure_node::NestedStepNode>,
167}
168/// Nested message and enum types in `NestedProcedureNode`.
169pub mod nested_procedure_node {
170    /// These fields' docs are identical to those of ProcedureStepNode.
171    #[derive(Clone, PartialEq, ::prost::Message)]
172    pub struct NestedStepNode {
173        #[prost(string, optional, tag = "1")]
174        pub output_id: ::core::option::Option<::prost::alloc::string::String>,
175        #[prost(bool, optional, tag = "2")]
176        pub is_required: ::core::option::Option<bool>,
177        #[prost(message, optional, tag = "3")]
178        pub auto_start: ::core::option::Option<super::AutoStartConfig>,
179        #[prost(message, optional, tag = "4")]
180        pub initial_auto_proceed_config: ::core::option::Option<
181            super::AutoProceedConfig,
182        >,
183        #[prost(message, optional, tag = "5")]
184        pub success_condition: ::core::option::Option<super::SuccessCondition>,
185        #[prost(message, repeated, tag = "6")]
186        pub completion_action_configs: ::prost::alloc::vec::Vec<
187            super::CompletionActionConfig,
188        >,
189        #[prost(oneof = "nested_step_node::Content", tags = "7")]
190        pub content: ::core::option::Option<nested_step_node::Content>,
191    }
192    /// Nested message and enum types in `NestedStepNode`.
193    pub mod nested_step_node {
194        #[derive(Clone, PartialEq, ::prost::Oneof)]
195        pub enum Content {
196            #[prost(message, tag = "7")]
197            Form(super::super::FormStep),
198        }
199    }
200}
201/// AutoStartConfig is a configuration that determines whether a step should be
202/// automatically moved from NOT_STARTED to IN_PROGRESS when some set of criteria are met.
203/// By default this will be `all_parents`
204#[derive(Clone, Copy, PartialEq, ::prost::Message)]
205pub struct AutoStartConfig {
206    #[prost(oneof = "auto_start_config::Config", tags = "1, 2")]
207    pub config: ::core::option::Option<auto_start_config::Config>,
208}
209/// Nested message and enum types in `AutoStartConfig`.
210pub mod auto_start_config {
211    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
212    pub struct AllParents {}
213    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
214    pub struct Disabled {}
215    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
216    pub enum Config {
217        /// The step will start automatically when all parent steps have passed.
218        #[prost(message, tag = "1")]
219        AllParents(AllParents),
220        /// The step will not start automatically.
221        #[prost(message, tag = "2")]
222        Disabled(Disabled),
223    }
224}
225/// AutoProceedConfig is a configuration that determines whether a step should
226/// automatically proceed (submit the contents and check success_conditions)
227/// when some set of criteria are met. By default this will be `disabled`.
228#[derive(Clone, Copy, PartialEq, ::prost::Message)]
229pub struct AutoProceedConfig {
230    #[prost(oneof = "auto_proceed_config::Config", tags = "1, 2")]
231    pub config: ::core::option::Option<auto_proceed_config::Config>,
232}
233/// Nested message and enum types in `AutoProceedConfig`.
234pub mod auto_proceed_config {
235    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
236    pub struct Disabled {}
237    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
238    pub struct Enabled {}
239    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
240    pub enum Config {
241        /// The step will not be automatically completed
242        #[prost(message, tag = "1")]
243        Disabled(Disabled),
244        /// The step will automatically submit the step contents once the requirements are met and
245        /// begin the transition to either PASSED or ERRORED.
246        #[prost(message, tag = "2")]
247        Enabled(Enabled),
248    }
249}
250/// The condition that must be met for a step to succeed after submitting its contents.
251#[derive(Clone, PartialEq, ::prost::Message)]
252pub struct SuccessCondition {
253    #[prost(oneof = "success_condition::Condition", tags = "1, 2")]
254    pub condition: ::core::option::Option<success_condition::Condition>,
255}
256/// Nested message and enum types in `SuccessCondition`.
257pub mod success_condition {
258    #[derive(Clone, PartialEq, ::prost::Oneof)]
259    pub enum Condition {
260        #[prost(message, tag = "1")]
261        And(super::AndSuccessCondition),
262        /// DataIngestCompletionCondition = 3;
263        /// ChannelValidationCompletionCondition = 4;
264        /// OrCompletionCondition or = 5;
265        #[prost(message, tag = "2")]
266        Timer(super::TimerSuccessCondition),
267    }
268}
269/// All conditions within must be met for the step to be succeeded.
270#[derive(Clone, PartialEq, ::prost::Message)]
271pub struct AndSuccessCondition {
272    #[prost(message, repeated, tag = "1")]
273    pub conditions: ::prost::alloc::vec::Vec<SuccessCondition>,
274}
275/// A timer condition that will succeed the step after a specified duration.
276#[derive(Clone, Copy, PartialEq, ::prost::Message)]
277pub struct TimerSuccessCondition {
278    /// Duration in seconds to wait before succeeding the step. This value must be non-negative.
279    /// This duration is a minimum bound; the actual duration may be longer.
280    #[prost(int32, tag = "1")]
281    pub duration_seconds: i32,
282}
283/// An action that will be taken when a step transitions to a completed state
284/// (succeeded, errored, or skipped). These actions are executed after the step
285/// contents are submitted and the PassCondition (if any) is satisfied. These
286/// actions are executed synchronously with the state transition and generally
287/// should be quick to complete.
288#[derive(Clone, PartialEq, ::prost::Message)]
289pub struct CompletionActionConfig {
290    #[prost(oneof = "completion_action_config::Config", tags = "1")]
291    pub config: ::core::option::Option<completion_action_config::Config>,
292}
293/// Nested message and enum types in `CompletionActionConfig`.
294pub mod completion_action_config {
295    #[derive(Clone, PartialEq, ::prost::Oneof)]
296    pub enum Config {
297        /// SendNotificationConfig send_notification = 2;
298        /// CreateRun create_run = 3;
299        /// ...
300        #[prost(message, tag = "1")]
301        CreateEvent(super::CreateEventConfig),
302    }
303}
304/// An action to create an event when a step is completed.
305#[derive(Clone, PartialEq, ::prost::Message)]
306pub struct CreateEventConfig {
307    #[prost(string, tag = "1")]
308    pub name: ::prost::alloc::string::String,
309    #[prost(string, optional, tag = "2")]
310    pub description: ::core::option::Option<::prost::alloc::string::String>,
311    #[prost(string, repeated, tag = "3")]
312    pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
313    #[prost(map = "string, string", tag = "4")]
314    pub properties: ::std::collections::HashMap<
315        ::prost::alloc::string::String,
316        ::prost::alloc::string::String,
317    >,
318    /// TODO(pchen): do we want to change this to use AssetFieldOption?
319    /// Each asset_field_id will be resolved and added as an AssetRid to the created event
320    #[prost(string, repeated, tag = "5")]
321    pub asset_field_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
322}
323/// The content of a procedure step. This typically involves some form of user interaction/input.
324#[derive(Clone, PartialEq, ::prost::Message)]
325pub struct ProcedureStepContent {
326    #[prost(oneof = "procedure_step_content::Content", tags = "1")]
327    pub content: ::core::option::Option<procedure_step_content::Content>,
328}
329/// Nested message and enum types in `ProcedureStepContent`.
330pub mod procedure_step_content {
331    #[derive(Clone, PartialEq, ::prost::Oneof)]
332    pub enum Content {
333        /// InitiateIngest initiate_ingest = 2;
334        /// ...
335        #[prost(message, tag = "1")]
336        Form(super::FormStep),
337    }
338}
339/// A form step consists of a set of fields to be filled out by the user.
340#[derive(Clone, PartialEq, ::prost::Message)]
341pub struct FormStep {
342    #[prost(message, repeated, tag = "1")]
343    pub fields: ::prost::alloc::vec::Vec<FormField>,
344}
345/// A field to be filled out by the user.
346#[derive(Clone, PartialEq, ::prost::Message)]
347pub struct FormField {
348    /// If id is set, it can be used during the procedure execution by descendant steps.
349    #[prost(string, optional, tag = "1")]
350    pub id: ::core::option::Option<::prost::alloc::string::String>,
351    #[prost(oneof = "form_field::Field", tags = "2, 3, 4, 5, 6, 7, 8")]
352    pub field: ::core::option::Option<form_field::Field>,
353}
354/// Nested message and enum types in `FormField`.
355pub mod form_field {
356    #[derive(Clone, PartialEq, ::prost::Oneof)]
357    pub enum Field {
358        #[prost(message, tag = "2")]
359        Asset(super::AssetField),
360        #[prost(message, tag = "3")]
361        Checkbox(super::CheckboxField),
362        #[prost(message, tag = "4")]
363        Text(super::TextField),
364        #[prost(message, tag = "5")]
365        Int(super::IntField),
366        #[prost(message, tag = "6")]
367        Double(super::DoubleField),
368        #[prost(message, tag = "7")]
369        SingleEnum(super::SingleEnumField),
370        #[prost(message, tag = "8")]
371        MultiEnum(super::MultiEnumField),
372    }
373}
374/// A reference to an asset, either by rid or by a field in the current or previous steps.
375#[derive(Clone, PartialEq, ::prost::Message)]
376pub struct AssetReference {
377    #[prost(oneof = "asset_reference::Option", tags = "1, 2")]
378    pub option: ::core::option::Option<asset_reference::Option>,
379}
380/// Nested message and enum types in `AssetReference`.
381pub mod asset_reference {
382    #[derive(Clone, PartialEq, ::prost::Oneof)]
383    pub enum Option {
384        /// The rid of the asset
385        #[prost(string, tag = "1")]
386        Rid(::prost::alloc::string::String),
387        /// The field id that will contain the selected asset. The execution will fail if the field is not set properly.
388        #[prost(string, tag = "2")]
389        FieldId(::prost::alloc::string::String),
390    }
391}
392/// A limited set of options to choose from, with an optional default option.
393#[derive(Clone, PartialEq, ::prost::Message)]
394pub struct PresetAssetFieldOptions {
395    /// The list of options to choose from.
396    #[prost(message, repeated, tag = "1")]
397    pub options: ::prost::alloc::vec::Vec<AssetReference>,
398    /// If set, this option will be selected by default, if it is present in the options.
399    /// The user can still select a different option.
400    #[prost(message, optional, tag = "2")]
401    pub default_option: ::core::option::Option<AssetReference>,
402}
403/// A field to select a single asset.
404#[derive(Clone, PartialEq, ::prost::Message)]
405pub struct AssetField {
406    /// Helper text to guide selection of the asset
407    #[prost(string, tag = "1")]
408    pub label: ::prost::alloc::string::String,
409    /// Whether this field is required to be set complete the step.
410    #[prost(bool, tag = "2")]
411    pub is_required: bool,
412    /// The asset options for this field.
413    /// This can be omitted, in which case the asset can be chosen freely from all assets.
414    #[prost(oneof = "asset_field::Options", tags = "3")]
415    pub options: ::core::option::Option<asset_field::Options>,
416}
417/// Nested message and enum types in `AssetField`.
418pub mod asset_field {
419    /// The asset options for this field.
420    /// This can be omitted, in which case the asset can be chosen freely from all assets.
421    #[derive(Clone, PartialEq, ::prost::Oneof)]
422    pub enum Options {
423        /// The asset must be chosen from a saved view.
424        /// SavedViewRid saved_view = 5;
425        /// TODO(pchen): do we want to provide single string types from AssetFieldOption to simplify the Nested
426        /// or do we want to explicitly modify the types Nested spec uses?
427        #[prost(message, tag = "3")]
428        PresetOptions(super::PresetAssetFieldOptions),
429    }
430}
431/// A field to capture a boolean value.
432#[derive(Clone, PartialEq, ::prost::Message)]
433pub struct CheckboxField {
434    /// Label to show for this checkbox field
435    #[prost(string, tag = "1")]
436    pub label: ::prost::alloc::string::String,
437    /// If set, the checkbox value must be checked (`true`) to complete the step.
438    #[prost(bool, tag = "2")]
439    pub is_required: bool,
440}
441#[derive(Clone, Copy, PartialEq, ::prost::Message)]
442pub struct TextFieldSimpleInputType {}
443#[derive(Clone, Copy, PartialEq, ::prost::Message)]
444pub struct TextFieldMarkdownInputType {}
445/// A field to capture a string value.
446#[derive(Clone, PartialEq, ::prost::Message)]
447pub struct TextField {
448    /// Label to show for this text field
449    #[prost(string, tag = "1")]
450    pub label: ::prost::alloc::string::String,
451    /// if set, validate that input is at least this many characters
452    /// `is_required` can be achieved by setting `min_length >= 1`
453    #[prost(uint32, optional, tag = "4")]
454    pub min_length: ::core::option::Option<u32>,
455    /// if set, validate that input is at most this many characters
456    #[prost(uint32, optional, tag = "5")]
457    pub max_length: ::core::option::Option<u32>,
458    /// type of form input to render. Defaults to SIMPLE.
459    #[prost(oneof = "text_field::InputType", tags = "2, 3")]
460    pub input_type: ::core::option::Option<text_field::InputType>,
461}
462/// Nested message and enum types in `TextField`.
463pub mod text_field {
464    /// type of form input to render. Defaults to SIMPLE.
465    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
466    pub enum InputType {
467        /// renders a simple html text input field
468        #[prost(message, tag = "2")]
469        Simple(super::TextFieldSimpleInputType),
470        /// renders a Markdown editor for longer inputs with formatting capabilities
471        #[prost(message, tag = "3")]
472        Markdown(super::TextFieldMarkdownInputType),
473    }
474}
475/// A field to capture an int value.
476#[derive(Clone, PartialEq, ::prost::Message)]
477pub struct IntField {
478    /// Label to show for this int field
479    #[prost(string, tag = "1")]
480    pub label: ::prost::alloc::string::String,
481    /// Whether this field is required to be set complete the step.
482    #[prost(bool, tag = "2")]
483    pub is_required: bool,
484    /// if set, validate that input is at least this value
485    #[prost(int64, optional, tag = "3")]
486    pub gte_value: ::core::option::Option<i64>,
487    /// if set, validate that input is at most this value
488    #[prost(int64, optional, tag = "4")]
489    pub lte_value: ::core::option::Option<i64>,
490}
491/// A field to capture a double value.
492#[derive(Clone, PartialEq, ::prost::Message)]
493pub struct DoubleField {
494    /// Label to show for this double field
495    #[prost(string, tag = "1")]
496    pub label: ::prost::alloc::string::String,
497    /// Whether this field is required to be set complete the step.
498    #[prost(bool, tag = "2")]
499    pub is_required: bool,
500    /// if set, a validation on the lower bound of the input value
501    #[prost(oneof = "double_field::LowerBound", tags = "3, 4")]
502    pub lower_bound: ::core::option::Option<double_field::LowerBound>,
503    /// if set, a validation on the upper bound of the input value
504    #[prost(oneof = "double_field::UpperBound", tags = "5, 6")]
505    pub upper_bound: ::core::option::Option<double_field::UpperBound>,
506}
507/// Nested message and enum types in `DoubleField`.
508pub mod double_field {
509    /// if set, a validation on the lower bound of the input value
510    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
511    pub enum LowerBound {
512        /// greater than
513        #[prost(double, tag = "3")]
514        GtValue(f64),
515        /// greater than or equal to
516        #[prost(double, tag = "4")]
517        GteValue(f64),
518    }
519    /// if set, a validation on the upper bound of the input value
520    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
521    pub enum UpperBound {
522        /// less than
523        #[prost(double, tag = "5")]
524        LtValue(f64),
525        /// less than or equal to
526        #[prost(double, tag = "6")]
527        LteValue(f64),
528    }
529}
530#[derive(Clone, Copy, PartialEq, ::prost::Message)]
531pub struct EnumFieldButtonsInputType {}
532#[derive(Clone, Copy, PartialEq, ::prost::Message)]
533pub struct EnumFieldMenuInputType {}
534/// A field to capture one of several options.
535#[derive(Clone, PartialEq, ::prost::Message)]
536pub struct SingleEnumField {
537    /// Label to show for this options field
538    #[prost(string, tag = "1")]
539    pub label: ::prost::alloc::string::String,
540    /// List of predefined options that can be selected by the user
541    #[prost(string, repeated, tag = "2")]
542    pub options: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
543    /// Whether a user can create and specify a new custom option not in the list of options.
544    #[prost(bool, tag = "5")]
545    pub allow_custom: bool,
546    /// Whether a selection is required
547    #[prost(bool, tag = "6")]
548    pub is_required: bool,
549    /// type of form input to render.
550    #[prost(oneof = "single_enum_field::InputType", tags = "3, 4")]
551    pub input_type: ::core::option::Option<single_enum_field::InputType>,
552}
553/// Nested message and enum types in `SingleEnumField`.
554pub mod single_enum_field {
555    /// type of form input to render.
556    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
557    pub enum InputType {
558        /// renders a radio button component
559        #[prost(message, tag = "3")]
560        Buttons(super::EnumFieldButtonsInputType),
561        /// renders a typical drop down menu
562        #[prost(message, tag = "4")]
563        Dropdown(super::EnumFieldMenuInputType),
564    }
565}
566/// A field to capture one or more of several options.
567#[derive(Clone, PartialEq, ::prost::Message)]
568pub struct MultiEnumField {
569    /// Label to show for this options field
570    #[prost(string, tag = "1")]
571    pub label: ::prost::alloc::string::String,
572    /// List of predefined options that can be selected by the user
573    #[prost(string, repeated, tag = "2")]
574    pub options: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
575    /// Whether a user can create and specify a new custom option not in the list of options.
576    #[prost(bool, tag = "6")]
577    pub allow_custom: bool,
578    /// If set, the user must select at least this many options
579    /// `is_required` behavior can be achieved by setting `min_count` = 1
580    #[prost(uint32, optional, tag = "7")]
581    pub min_count: ::core::option::Option<u32>,
582    /// If set, the user can select at most this many options
583    #[prost(uint32, optional, tag = "8")]
584    pub max_count: ::core::option::Option<u32>,
585    /// type of form input to render.
586    #[prost(oneof = "multi_enum_field::InputType", tags = "3, 4")]
587    pub input_type: ::core::option::Option<multi_enum_field::InputType>,
588}
589/// Nested message and enum types in `MultiEnumField`.
590pub mod multi_enum_field {
591    /// type of form input to render.
592    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
593    pub enum InputType {
594        /// renders a collection of checkboxes
595        #[prost(message, tag = "3")]
596        Buttons(super::EnumFieldButtonsInputType),
597        /// renders a typical drop down menu
598        #[prost(message, tag = "4")]
599        Dropdown(super::EnumFieldMenuInputType),
600    }
601}
602/// Metadata about a procedure that is not part of the versioned state.
603#[derive(Clone, PartialEq, ::prost::Message)]
604pub struct ProcedureMetadata {
605    #[prost(string, tag = "1")]
606    pub rid: ::prost::alloc::string::String,
607    #[prost(string, tag = "2")]
608    pub title: ::prost::alloc::string::String,
609    #[prost(string, optional, tag = "3")]
610    pub description: ::core::option::Option<::prost::alloc::string::String>,
611    #[prost(string, repeated, tag = "4")]
612    pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
613    #[prost(map = "string, string", tag = "5")]
614    pub properties: ::std::collections::HashMap<
615        ::prost::alloc::string::String,
616        ::prost::alloc::string::String,
617    >,
618    #[prost(bool, tag = "6")]
619    pub is_archived: bool,
620    #[prost(bool, tag = "7")]
621    pub is_published: bool,
622    #[prost(message, optional, tag = "8")]
623    pub created_at: ::core::option::Option<
624        super::super::super::google::protobuf::Timestamp,
625    >,
626    #[prost(string, tag = "9")]
627    pub created_by: ::prost::alloc::string::String,
628    #[prost(message, optional, tag = "10")]
629    pub updated_at: ::core::option::Option<
630        super::super::super::google::protobuf::Timestamp,
631    >,
632    #[prost(string, tag = "11")]
633    pub updated_by: ::prost::alloc::string::String,
634    #[prost(string, tag = "12")]
635    pub workspace: ::prost::alloc::string::String,
636}
637/// A procedure describes a series of steps to be performed, typically in a specific order,
638#[derive(Clone, PartialEq, ::prost::Message)]
639pub struct Procedure {
640    /// The RID of the procedure.
641    #[prost(string, tag = "1")]
642    pub rid: ::prost::alloc::string::String,
643    /// The commit ID of this version of the procedure.
644    #[prost(string, tag = "2")]
645    pub commit: ::prost::alloc::string::String,
646    /// Metadata about the procedure.
647    #[prost(message, optional, tag = "3")]
648    pub metadata: ::core::option::Option<ProcedureMetadata>,
649    /// The versioned state of the procedure.
650    #[prost(message, optional, tag = "4")]
651    pub state: ::core::option::Option<ProcedureState>,
652}
653#[derive(Clone, PartialEq, ::prost::Message)]
654pub struct CreateProcedureRequest {
655    #[prost(string, tag = "1")]
656    pub title: ::prost::alloc::string::String,
657    #[prost(string, optional, tag = "2")]
658    pub description: ::core::option::Option<::prost::alloc::string::String>,
659    #[prost(string, repeated, tag = "3")]
660    pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
661    #[prost(map = "string, string", tag = "4")]
662    pub properties: ::std::collections::HashMap<
663        ::prost::alloc::string::String,
664        ::prost::alloc::string::String,
665    >,
666    #[prost(message, optional, tag = "5")]
667    pub state: ::core::option::Option<ProcedureState>,
668    #[prost(bool, optional, tag = "6")]
669    pub is_published: ::core::option::Option<bool>,
670    #[prost(string, tag = "7")]
671    pub workspace: ::prost::alloc::string::String,
672    #[prost(string, tag = "8")]
673    pub commit_message: ::prost::alloc::string::String,
674    #[prost(string, optional, tag = "9")]
675    pub initial_branch_name: ::core::option::Option<::prost::alloc::string::String>,
676}
677#[derive(Clone, PartialEq, ::prost::Message)]
678pub struct CreateProcedureResponse {
679    #[prost(message, optional, tag = "1")]
680    pub procedure: ::core::option::Option<Procedure>,
681    #[prost(string, optional, tag = "2")]
682    pub branch_name: ::core::option::Option<::prost::alloc::string::String>,
683}
684#[derive(Clone, PartialEq, ::prost::Message)]
685pub struct GetProcedureRequest {
686    #[prost(string, tag = "1")]
687    pub rid: ::prost::alloc::string::String,
688    #[prost(message, optional, tag = "2")]
689    pub branch_or_commit: ::core::option::Option<
690        super::super::versioning::v1::BranchOrCommit,
691    >,
692    /// If true, the display graph will be included in the response.
693    /// Default is false.
694    #[prost(bool, tag = "3")]
695    pub include_display_graph: bool,
696}
697#[derive(Clone, PartialEq, ::prost::Message)]
698pub struct GetProcedureResponse {
699    #[prost(message, optional, tag = "1")]
700    pub procedure: ::core::option::Option<Procedure>,
701    /// Included if include_display_graph was set to true
702    #[prost(message, optional, tag = "2")]
703    pub display_graph: ::core::option::Option<ProcedureDisplayGraph>,
704}
705#[derive(Clone, PartialEq, ::prost::Message)]
706pub struct UpdateProcedureMetadataRequest {
707    #[prost(string, tag = "1")]
708    pub rid: ::prost::alloc::string::String,
709    #[prost(string, optional, tag = "2")]
710    pub title: ::core::option::Option<::prost::alloc::string::String>,
711    #[prost(string, optional, tag = "3")]
712    pub description: ::core::option::Option<::prost::alloc::string::String>,
713    #[prost(message, optional, tag = "4")]
714    pub labels: ::core::option::Option<super::super::types::LabelUpdateWrapper>,
715    #[prost(message, optional, tag = "5")]
716    pub properties: ::core::option::Option<super::super::types::PropertyUpdateWrapper>,
717    #[prost(bool, optional, tag = "6")]
718    pub is_archived: ::core::option::Option<bool>,
719    #[prost(bool, optional, tag = "7")]
720    pub is_published: ::core::option::Option<bool>,
721}
722#[derive(Clone, PartialEq, ::prost::Message)]
723pub struct UpdateProcedureMetadataResponse {
724    #[prost(message, optional, tag = "1")]
725    pub procedure_metadata: ::core::option::Option<ProcedureMetadata>,
726}
727#[derive(Clone, PartialEq, ::prost::Message)]
728pub struct ParseNestedProcedureRequest {
729    #[prost(message, optional, tag = "1")]
730    pub nested_procedure: ::core::option::Option<NestedProcedure>,
731    /// If true, the display graph will be included in the response.
732    /// Default is false.
733    #[prost(bool, tag = "3")]
734    pub include_display_graph: bool,
735}
736#[derive(Clone, PartialEq, ::prost::Message)]
737pub struct ParseNestedProcedureResponse {
738    #[prost(message, optional, tag = "1")]
739    pub procedure: ::core::option::Option<Procedure>,
740    /// Included if include_display_graph was set to true
741    #[prost(message, optional, tag = "2")]
742    pub display_graph: ::core::option::Option<ProcedureDisplayGraph>,
743}
744#[derive(Clone, PartialEq, ::prost::Message)]
745pub struct GetProcedureAsNestedRequest {
746    #[prost(string, tag = "1")]
747    pub rid: ::prost::alloc::string::String,
748    #[prost(message, optional, tag = "2")]
749    pub branch_or_commit: ::core::option::Option<
750        super::super::versioning::v1::BranchOrCommit,
751    >,
752}
753#[derive(Clone, PartialEq, ::prost::Message)]
754pub struct GetProcedureAsNestedResponse {
755    #[prost(message, optional, tag = "1")]
756    pub nested_procedure: ::core::option::Option<NestedProcedure>,
757}
758#[derive(Clone, PartialEq, ::prost::Message)]
759pub struct MergeToMainRequest {
760    #[prost(string, tag = "1")]
761    pub rid: ::prost::alloc::string::String,
762    #[prost(string, tag = "2")]
763    pub branch: ::prost::alloc::string::String,
764    /// If present, this commit ID must match the latest commit on main for the merge to succeed.
765    #[prost(string, optional, tag = "3")]
766    pub latest_commit_on_main: ::core::option::Option<::prost::alloc::string::String>,
767    #[prost(string, tag = "4")]
768    pub message: ::prost::alloc::string::String,
769}
770#[derive(Clone, PartialEq, ::prost::Message)]
771pub struct MergeToMainResponse {
772    #[prost(message, optional, tag = "1")]
773    pub procedure: ::core::option::Option<Procedure>,
774}
775#[derive(Clone, PartialEq, ::prost::Message)]
776pub struct SaveWorkingStateRequest {
777    #[prost(string, tag = "1")]
778    pub rid: ::prost::alloc::string::String,
779    #[prost(string, optional, tag = "2")]
780    pub branch: ::core::option::Option<::prost::alloc::string::String>,
781    #[prost(string, tag = "3")]
782    pub message: ::prost::alloc::string::String,
783    /// If present, this commit ID must match the latest commit on the branch for the save to succeed.
784    #[prost(string, optional, tag = "4")]
785    pub latest_commit_on_branch: ::core::option::Option<::prost::alloc::string::String>,
786    #[prost(message, optional, tag = "5")]
787    pub state: ::core::option::Option<ProcedureState>,
788}
789#[derive(Clone, PartialEq, ::prost::Message)]
790pub struct SaveWorkingStateResponse {
791    #[prost(message, optional, tag = "1")]
792    pub procedure: ::core::option::Option<Procedure>,
793}
794#[derive(Clone, PartialEq, ::prost::Message)]
795pub struct CommitRequest {
796    #[prost(string, tag = "1")]
797    pub rid: ::prost::alloc::string::String,
798    #[prost(string, optional, tag = "2")]
799    pub branch: ::core::option::Option<::prost::alloc::string::String>,
800    /// If present, this commit ID must match the latest commit on the branch for the commit to succeed.
801    #[prost(string, optional, tag = "3")]
802    pub latest_commit_on_branch: ::core::option::Option<::prost::alloc::string::String>,
803    #[prost(string, tag = "4")]
804    pub message: ::prost::alloc::string::String,
805    #[prost(message, optional, tag = "5")]
806    pub state: ::core::option::Option<ProcedureState>,
807}
808#[derive(Clone, PartialEq, ::prost::Message)]
809pub struct CommitResponse {
810    #[prost(message, optional, tag = "1")]
811    pub procedure: ::core::option::Option<Procedure>,
812}
813#[derive(Clone, PartialEq, ::prost::Message)]
814pub struct ProcedureSearchQuery {
815    #[prost(oneof = "procedure_search_query::Query", tags = "1, 2, 3, 4, 5, 6, 7, 8")]
816    pub query: ::core::option::Option<procedure_search_query::Query>,
817}
818/// Nested message and enum types in `ProcedureSearchQuery`.
819pub mod procedure_search_query {
820    #[derive(Clone, PartialEq, ::prost::Message)]
821    pub struct ProcedureSearchAndQuery {
822        #[prost(message, repeated, tag = "1")]
823        pub queries: ::prost::alloc::vec::Vec<super::ProcedureSearchQuery>,
824    }
825    #[derive(Clone, PartialEq, ::prost::Message)]
826    pub struct ProcedureSearchOrQuery {
827        #[prost(message, repeated, tag = "1")]
828        pub queries: ::prost::alloc::vec::Vec<super::ProcedureSearchQuery>,
829    }
830    #[derive(Clone, PartialEq, ::prost::Oneof)]
831    pub enum Query {
832        #[prost(string, tag = "1")]
833        SearchText(::prost::alloc::string::String),
834        #[prost(string, tag = "2")]
835        Label(::prost::alloc::string::String),
836        #[prost(message, tag = "3")]
837        Property(super::super::super::types::Property),
838        #[prost(message, tag = "4")]
839        And(ProcedureSearchAndQuery),
840        #[prost(message, tag = "5")]
841        Or(ProcedureSearchOrQuery),
842        #[prost(string, tag = "6")]
843        Workspace(::prost::alloc::string::String),
844        #[prost(string, tag = "7")]
845        CreatedBy(::prost::alloc::string::String),
846        #[prost(bool, tag = "8")]
847        IsArchived(bool),
848    }
849}
850#[derive(Clone, Copy, PartialEq, ::prost::Message)]
851pub struct SearchProceduresSortOptions {
852    /// Defaults to true (descending)
853    #[prost(bool, optional, tag = "1")]
854    pub is_descending: ::core::option::Option<bool>,
855    /// Defaults to CREATED_AT
856    #[prost(enumeration = "SearchProceduresSortField", optional, tag = "2")]
857    pub sort_field: ::core::option::Option<i32>,
858}
859#[derive(Clone, PartialEq, ::prost::Message)]
860pub struct SearchProceduresRequest {
861    #[prost(message, optional, tag = "1")]
862    pub query: ::core::option::Option<ProcedureSearchQuery>,
863    /// If not set, default is to sort by created_at descending
864    #[prost(message, optional, tag = "2")]
865    pub sort_options: ::core::option::Option<SearchProceduresSortOptions>,
866    /// Page sizes greater than 1_000 will be rejected. Default pageSize is 100.
867    #[prost(int32, optional, tag = "3")]
868    pub page_size: ::core::option::Option<i32>,
869    #[prost(string, optional, tag = "4")]
870    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
871}
872#[derive(Clone, PartialEq, ::prost::Message)]
873pub struct SearchProceduresResponse {
874    #[prost(message, repeated, tag = "1")]
875    pub procedure_metadata: ::prost::alloc::vec::Vec<ProcedureMetadata>,
876    #[prost(string, optional, tag = "2")]
877    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
878}
879#[derive(Clone, PartialEq, ::prost::Message)]
880pub struct ArchiveProceduresRequest {
881    #[prost(string, repeated, tag = "1")]
882    pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
883}
884#[derive(Clone, PartialEq, ::prost::Message)]
885pub struct ArchiveProceduresResponse {
886    #[prost(string, repeated, tag = "1")]
887    pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
888}
889#[derive(Clone, PartialEq, ::prost::Message)]
890pub struct UnarchiveProceduresRequest {
891    #[prost(string, repeated, tag = "1")]
892    pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
893}
894#[derive(Clone, PartialEq, ::prost::Message)]
895pub struct UnarchiveProceduresResponse {
896    #[prost(string, repeated, tag = "1")]
897    pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
898}
899#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
900#[repr(i32)]
901pub enum SearchProceduresSortField {
902    Unspecified = 0,
903    Name = 1,
904    CreatedAt = 2,
905    UpdatedAt = 3,
906}
907impl SearchProceduresSortField {
908    /// String value of the enum field names used in the ProtoBuf definition.
909    ///
910    /// The values are not transformed in any way and thus are considered stable
911    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
912    pub fn as_str_name(&self) -> &'static str {
913        match self {
914            Self::Unspecified => "SEARCH_PROCEDURES_SORT_FIELD_UNSPECIFIED",
915            Self::Name => "SEARCH_PROCEDURES_SORT_FIELD_NAME",
916            Self::CreatedAt => "SEARCH_PROCEDURES_SORT_FIELD_CREATED_AT",
917            Self::UpdatedAt => "SEARCH_PROCEDURES_SORT_FIELD_UPDATED_AT",
918        }
919    }
920    /// Creates an enum from field names used in the ProtoBuf definition.
921    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
922        match value {
923            "SEARCH_PROCEDURES_SORT_FIELD_UNSPECIFIED" => Some(Self::Unspecified),
924            "SEARCH_PROCEDURES_SORT_FIELD_NAME" => Some(Self::Name),
925            "SEARCH_PROCEDURES_SORT_FIELD_CREATED_AT" => Some(Self::CreatedAt),
926            "SEARCH_PROCEDURES_SORT_FIELD_UPDATED_AT" => Some(Self::UpdatedAt),
927            _ => None,
928        }
929    }
930}
931#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
932#[repr(i32)]
933pub enum ProceduresServiceError {
934    Unspecified = 0,
935    NotFound = 1,
936    CommitNotFound = 2,
937    CannotMergeMain = 3,
938    CannotCommitToArchivedProcedure = 4,
939    InvalidGraph = 5,
940    InvalidSearchToken = 6,
941}
942impl ProceduresServiceError {
943    /// String value of the enum field names used in the ProtoBuf definition.
944    ///
945    /// The values are not transformed in any way and thus are considered stable
946    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
947    pub fn as_str_name(&self) -> &'static str {
948        match self {
949            Self::Unspecified => "PROCEDURES_SERVICE_ERROR_UNSPECIFIED",
950            Self::NotFound => "PROCEDURES_SERVICE_ERROR_NOT_FOUND",
951            Self::CommitNotFound => "PROCEDURES_SERVICE_ERROR_COMMIT_NOT_FOUND",
952            Self::CannotMergeMain => "PROCEDURES_SERVICE_ERROR_CANNOT_MERGE_MAIN",
953            Self::CannotCommitToArchivedProcedure => {
954                "PROCEDURES_SERVICE_ERROR_CANNOT_COMMIT_TO_ARCHIVED_PROCEDURE"
955            }
956            Self::InvalidGraph => "PROCEDURES_SERVICE_ERROR_INVALID_GRAPH",
957            Self::InvalidSearchToken => "PROCEDURES_SERVICE_ERROR_INVALID_SEARCH_TOKEN",
958        }
959    }
960    /// Creates an enum from field names used in the ProtoBuf definition.
961    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
962        match value {
963            "PROCEDURES_SERVICE_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
964            "PROCEDURES_SERVICE_ERROR_NOT_FOUND" => Some(Self::NotFound),
965            "PROCEDURES_SERVICE_ERROR_COMMIT_NOT_FOUND" => Some(Self::CommitNotFound),
966            "PROCEDURES_SERVICE_ERROR_CANNOT_MERGE_MAIN" => Some(Self::CannotMergeMain),
967            "PROCEDURES_SERVICE_ERROR_CANNOT_COMMIT_TO_ARCHIVED_PROCEDURE" => {
968                Some(Self::CannotCommitToArchivedProcedure)
969            }
970            "PROCEDURES_SERVICE_ERROR_INVALID_GRAPH" => Some(Self::InvalidGraph),
971            "PROCEDURES_SERVICE_ERROR_INVALID_SEARCH_TOKEN" => {
972                Some(Self::InvalidSearchToken)
973            }
974            _ => None,
975        }
976    }
977}
978/// Generated client implementations.
979pub mod procedures_service_client {
980    #![allow(
981        unused_variables,
982        dead_code,
983        missing_docs,
984        clippy::wildcard_imports,
985        clippy::let_unit_value,
986    )]
987    use tonic::codegen::*;
988    use tonic::codegen::http::Uri;
989    /// Service for creating and managing procedure templates, which are versioned collections
990    /// of steps to be performed, typically in a specific order.
991    #[derive(Debug, Clone)]
992    pub struct ProceduresServiceClient<T> {
993        inner: tonic::client::Grpc<T>,
994    }
995    impl ProceduresServiceClient<tonic::transport::Channel> {
996        /// Attempt to create a new client by connecting to a given endpoint.
997        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
998        where
999            D: TryInto<tonic::transport::Endpoint>,
1000            D::Error: Into<StdError>,
1001        {
1002            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1003            Ok(Self::new(conn))
1004        }
1005    }
1006    impl<T> ProceduresServiceClient<T>
1007    where
1008        T: tonic::client::GrpcService<tonic::body::Body>,
1009        T::Error: Into<StdError>,
1010        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1011        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1012    {
1013        pub fn new(inner: T) -> Self {
1014            let inner = tonic::client::Grpc::new(inner);
1015            Self { inner }
1016        }
1017        pub fn with_origin(inner: T, origin: Uri) -> Self {
1018            let inner = tonic::client::Grpc::with_origin(inner, origin);
1019            Self { inner }
1020        }
1021        pub fn with_interceptor<F>(
1022            inner: T,
1023            interceptor: F,
1024        ) -> ProceduresServiceClient<InterceptedService<T, F>>
1025        where
1026            F: tonic::service::Interceptor,
1027            T::ResponseBody: Default,
1028            T: tonic::codegen::Service<
1029                http::Request<tonic::body::Body>,
1030                Response = http::Response<
1031                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1032                >,
1033            >,
1034            <T as tonic::codegen::Service<
1035                http::Request<tonic::body::Body>,
1036            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1037        {
1038            ProceduresServiceClient::new(InterceptedService::new(inner, interceptor))
1039        }
1040        /// Compress requests with the given encoding.
1041        ///
1042        /// This requires the server to support it otherwise it might respond with an
1043        /// error.
1044        #[must_use]
1045        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1046            self.inner = self.inner.send_compressed(encoding);
1047            self
1048        }
1049        /// Enable decompressing responses.
1050        #[must_use]
1051        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1052            self.inner = self.inner.accept_compressed(encoding);
1053            self
1054        }
1055        /// Limits the maximum size of a decoded message.
1056        ///
1057        /// Default: `4MB`
1058        #[must_use]
1059        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1060            self.inner = self.inner.max_decoding_message_size(limit);
1061            self
1062        }
1063        /// Limits the maximum size of an encoded message.
1064        ///
1065        /// Default: `usize::MAX`
1066        #[must_use]
1067        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1068            self.inner = self.inner.max_encoding_message_size(limit);
1069            self
1070        }
1071        /// Create a new procedure
1072        pub async fn create_procedure(
1073            &mut self,
1074            request: impl tonic::IntoRequest<super::CreateProcedureRequest>,
1075        ) -> std::result::Result<
1076            tonic::Response<super::CreateProcedureResponse>,
1077            tonic::Status,
1078        > {
1079            self.inner
1080                .ready()
1081                .await
1082                .map_err(|e| {
1083                    tonic::Status::unknown(
1084                        format!("Service was not ready: {}", e.into()),
1085                    )
1086                })?;
1087            let codec = tonic::codec::ProstCodec::default();
1088            let path = http::uri::PathAndQuery::from_static(
1089                "/nominal.procedures.v1.ProceduresService/CreateProcedure",
1090            );
1091            let mut req = request.into_request();
1092            req.extensions_mut()
1093                .insert(
1094                    GrpcMethod::new(
1095                        "nominal.procedures.v1.ProceduresService",
1096                        "CreateProcedure",
1097                    ),
1098                );
1099            self.inner.unary(req, path, codec).await
1100        }
1101        /// Get a procedure by its RID
1102        pub async fn get_procedure(
1103            &mut self,
1104            request: impl tonic::IntoRequest<super::GetProcedureRequest>,
1105        ) -> std::result::Result<
1106            tonic::Response<super::GetProcedureResponse>,
1107            tonic::Status,
1108        > {
1109            self.inner
1110                .ready()
1111                .await
1112                .map_err(|e| {
1113                    tonic::Status::unknown(
1114                        format!("Service was not ready: {}", e.into()),
1115                    )
1116                })?;
1117            let codec = tonic::codec::ProstCodec::default();
1118            let path = http::uri::PathAndQuery::from_static(
1119                "/nominal.procedures.v1.ProceduresService/GetProcedure",
1120            );
1121            let mut req = request.into_request();
1122            req.extensions_mut()
1123                .insert(
1124                    GrpcMethod::new(
1125                        "nominal.procedures.v1.ProceduresService",
1126                        "GetProcedure",
1127                    ),
1128                );
1129            self.inner.unary(req, path, codec).await
1130        }
1131        /// Update the metadata of a procedure
1132        pub async fn update_procedure_metadata(
1133            &mut self,
1134            request: impl tonic::IntoRequest<super::UpdateProcedureMetadataRequest>,
1135        ) -> std::result::Result<
1136            tonic::Response<super::UpdateProcedureMetadataResponse>,
1137            tonic::Status,
1138        > {
1139            self.inner
1140                .ready()
1141                .await
1142                .map_err(|e| {
1143                    tonic::Status::unknown(
1144                        format!("Service was not ready: {}", e.into()),
1145                    )
1146                })?;
1147            let codec = tonic::codec::ProstCodec::default();
1148            let path = http::uri::PathAndQuery::from_static(
1149                "/nominal.procedures.v1.ProceduresService/UpdateProcedureMetadata",
1150            );
1151            let mut req = request.into_request();
1152            req.extensions_mut()
1153                .insert(
1154                    GrpcMethod::new(
1155                        "nominal.procedures.v1.ProceduresService",
1156                        "UpdateProcedureMetadata",
1157                    ),
1158                );
1159            self.inner.unary(req, path, codec).await
1160        }
1161        /// Parse a procedure from a nested procedure structure
1162        pub async fn parse_nested_procedure(
1163            &mut self,
1164            request: impl tonic::IntoRequest<super::ParseNestedProcedureRequest>,
1165        ) -> std::result::Result<
1166            tonic::Response<super::ParseNestedProcedureResponse>,
1167            tonic::Status,
1168        > {
1169            self.inner
1170                .ready()
1171                .await
1172                .map_err(|e| {
1173                    tonic::Status::unknown(
1174                        format!("Service was not ready: {}", e.into()),
1175                    )
1176                })?;
1177            let codec = tonic::codec::ProstCodec::default();
1178            let path = http::uri::PathAndQuery::from_static(
1179                "/nominal.procedures.v1.ProceduresService/ParseNestedProcedure",
1180            );
1181            let mut req = request.into_request();
1182            req.extensions_mut()
1183                .insert(
1184                    GrpcMethod::new(
1185                        "nominal.procedures.v1.ProceduresService",
1186                        "ParseNestedProcedure",
1187                    ),
1188                );
1189            self.inner.unary(req, path, codec).await
1190        }
1191        /// Get procedure as nested procedure
1192        /// TODO(pchen): in the future, not all graphs will be representable as nested procedures
1193        pub async fn get_procedure_as_nested(
1194            &mut self,
1195            request: impl tonic::IntoRequest<super::GetProcedureAsNestedRequest>,
1196        ) -> std::result::Result<
1197            tonic::Response<super::GetProcedureAsNestedResponse>,
1198            tonic::Status,
1199        > {
1200            self.inner
1201                .ready()
1202                .await
1203                .map_err(|e| {
1204                    tonic::Status::unknown(
1205                        format!("Service was not ready: {}", e.into()),
1206                    )
1207                })?;
1208            let codec = tonic::codec::ProstCodec::default();
1209            let path = http::uri::PathAndQuery::from_static(
1210                "/nominal.procedures.v1.ProceduresService/GetProcedureAsNested",
1211            );
1212            let mut req = request.into_request();
1213            req.extensions_mut()
1214                .insert(
1215                    GrpcMethod::new(
1216                        "nominal.procedures.v1.ProceduresService",
1217                        "GetProcedureAsNested",
1218                    ),
1219                );
1220            self.inner.unary(req, path, codec).await
1221        }
1222        /// Merge a branch of a procedure to main
1223        pub async fn merge_to_main(
1224            &mut self,
1225            request: impl tonic::IntoRequest<super::MergeToMainRequest>,
1226        ) -> std::result::Result<
1227            tonic::Response<super::MergeToMainResponse>,
1228            tonic::Status,
1229        > {
1230            self.inner
1231                .ready()
1232                .await
1233                .map_err(|e| {
1234                    tonic::Status::unknown(
1235                        format!("Service was not ready: {}", e.into()),
1236                    )
1237                })?;
1238            let codec = tonic::codec::ProstCodec::default();
1239            let path = http::uri::PathAndQuery::from_static(
1240                "/nominal.procedures.v1.ProceduresService/MergeToMain",
1241            );
1242            let mut req = request.into_request();
1243            req.extensions_mut()
1244                .insert(
1245                    GrpcMethod::new(
1246                        "nominal.procedures.v1.ProceduresService",
1247                        "MergeToMain",
1248                    ),
1249                );
1250            self.inner.unary(req, path, codec).await
1251        }
1252        /// Save the working state of a procedure
1253        pub async fn save_working_state(
1254            &mut self,
1255            request: impl tonic::IntoRequest<super::SaveWorkingStateRequest>,
1256        ) -> std::result::Result<
1257            tonic::Response<super::SaveWorkingStateResponse>,
1258            tonic::Status,
1259        > {
1260            self.inner
1261                .ready()
1262                .await
1263                .map_err(|e| {
1264                    tonic::Status::unknown(
1265                        format!("Service was not ready: {}", e.into()),
1266                    )
1267                })?;
1268            let codec = tonic::codec::ProstCodec::default();
1269            let path = http::uri::PathAndQuery::from_static(
1270                "/nominal.procedures.v1.ProceduresService/SaveWorkingState",
1271            );
1272            let mut req = request.into_request();
1273            req.extensions_mut()
1274                .insert(
1275                    GrpcMethod::new(
1276                        "nominal.procedures.v1.ProceduresService",
1277                        "SaveWorkingState",
1278                    ),
1279                );
1280            self.inner.unary(req, path, codec).await
1281        }
1282        /// Commit a procedure to a branch
1283        pub async fn commit(
1284            &mut self,
1285            request: impl tonic::IntoRequest<super::CommitRequest>,
1286        ) -> std::result::Result<tonic::Response<super::CommitResponse>, tonic::Status> {
1287            self.inner
1288                .ready()
1289                .await
1290                .map_err(|e| {
1291                    tonic::Status::unknown(
1292                        format!("Service was not ready: {}", e.into()),
1293                    )
1294                })?;
1295            let codec = tonic::codec::ProstCodec::default();
1296            let path = http::uri::PathAndQuery::from_static(
1297                "/nominal.procedures.v1.ProceduresService/Commit",
1298            );
1299            let mut req = request.into_request();
1300            req.extensions_mut()
1301                .insert(
1302                    GrpcMethod::new("nominal.procedures.v1.ProceduresService", "Commit"),
1303                );
1304            self.inner.unary(req, path, codec).await
1305        }
1306        /// Searches all procedures, returning paged results
1307        pub async fn search_procedures(
1308            &mut self,
1309            request: impl tonic::IntoRequest<super::SearchProceduresRequest>,
1310        ) -> std::result::Result<
1311            tonic::Response<super::SearchProceduresResponse>,
1312            tonic::Status,
1313        > {
1314            self.inner
1315                .ready()
1316                .await
1317                .map_err(|e| {
1318                    tonic::Status::unknown(
1319                        format!("Service was not ready: {}", e.into()),
1320                    )
1321                })?;
1322            let codec = tonic::codec::ProstCodec::default();
1323            let path = http::uri::PathAndQuery::from_static(
1324                "/nominal.procedures.v1.ProceduresService/SearchProcedures",
1325            );
1326            let mut req = request.into_request();
1327            req.extensions_mut()
1328                .insert(
1329                    GrpcMethod::new(
1330                        "nominal.procedures.v1.ProceduresService",
1331                        "SearchProcedures",
1332                    ),
1333                );
1334            self.inner.unary(req, path, codec).await
1335        }
1336        /// Archive procedures
1337        pub async fn archive_procedures(
1338            &mut self,
1339            request: impl tonic::IntoRequest<super::ArchiveProceduresRequest>,
1340        ) -> std::result::Result<
1341            tonic::Response<super::ArchiveProceduresResponse>,
1342            tonic::Status,
1343        > {
1344            self.inner
1345                .ready()
1346                .await
1347                .map_err(|e| {
1348                    tonic::Status::unknown(
1349                        format!("Service was not ready: {}", e.into()),
1350                    )
1351                })?;
1352            let codec = tonic::codec::ProstCodec::default();
1353            let path = http::uri::PathAndQuery::from_static(
1354                "/nominal.procedures.v1.ProceduresService/ArchiveProcedures",
1355            );
1356            let mut req = request.into_request();
1357            req.extensions_mut()
1358                .insert(
1359                    GrpcMethod::new(
1360                        "nominal.procedures.v1.ProceduresService",
1361                        "ArchiveProcedures",
1362                    ),
1363                );
1364            self.inner.unary(req, path, codec).await
1365        }
1366        /// Unarchive procedures
1367        pub async fn unarchive_procedures(
1368            &mut self,
1369            request: impl tonic::IntoRequest<super::UnarchiveProceduresRequest>,
1370        ) -> std::result::Result<
1371            tonic::Response<super::UnarchiveProceduresResponse>,
1372            tonic::Status,
1373        > {
1374            self.inner
1375                .ready()
1376                .await
1377                .map_err(|e| {
1378                    tonic::Status::unknown(
1379                        format!("Service was not ready: {}", e.into()),
1380                    )
1381                })?;
1382            let codec = tonic::codec::ProstCodec::default();
1383            let path = http::uri::PathAndQuery::from_static(
1384                "/nominal.procedures.v1.ProceduresService/UnarchiveProcedures",
1385            );
1386            let mut req = request.into_request();
1387            req.extensions_mut()
1388                .insert(
1389                    GrpcMethod::new(
1390                        "nominal.procedures.v1.ProceduresService",
1391                        "UnarchiveProcedures",
1392                    ),
1393                );
1394            self.inner.unary(req, path, codec).await
1395        }
1396    }
1397}