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    /// TODO(niwong): global_fields is deprecated, remove in a future version.
6    #[prost(map = "string, message", tag = "1")]
7    pub global_fields: ::std::collections::HashMap<
8        ::prost::alloc::string::String,
9        FormField,
10    >,
11    /// Global fields are set at the beginning of the procedure execution.
12    /// These fields can be referenced by any step in the procedure by using {field_id}.
13    #[prost(message, repeated, tag = "5")]
14    pub new_global_fields: ::prost::alloc::vec::Vec<FormField>,
15    /// A map from node ID to the node.
16    #[prost(map = "string, message", tag = "2")]
17    pub nodes: ::std::collections::HashMap<
18        ::prost::alloc::string::String,
19        ProcedureNode,
20    >,
21    /// Section edges represent the visual grouping of sections and steps.
22    /// All keys are IDs for section nodes, and all values are lists of IDs for section or step nodes.
23    /// { A, \[B, C\] } means that section A visually groups nodes B and C together.
24    #[prost(map = "string, message", tag = "3")]
25    pub section_edges: ::std::collections::HashMap<
26        ::prost::alloc::string::String,
27        NodeList,
28    >,
29    /// Step edges represent the dependencies between steps.
30    /// All keys and values are IDs for step nodes.
31    /// { A, \[B, C\] } means that steps B and C depend on step A to complete to be started
32    #[prost(map = "string, message", tag = "4")]
33    pub step_edges: ::std::collections::HashMap<
34        ::prost::alloc::string::String,
35        NodeList,
36    >,
37}
38/// A simpler representation of the procedure graph that is used for display in a UI.
39#[derive(Clone, PartialEq, ::prost::Message)]
40pub struct ProcedureDisplayGraph {
41    /// Sections or steps that do not belong to any parent sections.
42    /// This is ordered in a topological ordering of steps.
43    #[prost(string, repeated, tag = "1")]
44    pub top_level_nodes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
45    /// Map of section node IDs to their topologically sorted children
46    #[prost(map = "string, message", tag = "2")]
47    pub section_to_sorted_children: ::std::collections::HashMap<
48        ::prost::alloc::string::String,
49        NodeList,
50    >,
51}
52/// A simplified version of procedure state that is currently used for procedure authoring.
53/// In this form, the graph is a completely linear structure where each step depends solely
54/// on the preceding step.
55#[derive(Clone, PartialEq, ::prost::Message)]
56pub struct NestedProcedure {
57    /// Title of the procedure
58    #[prost(string, tag = "1")]
59    pub title: ::prost::alloc::string::String,
60    /// Optional long-form description for the procedure
61    #[prost(string, optional, tag = "2")]
62    pub description: ::core::option::Option<::prost::alloc::string::String>,
63    /// Steps in the procedure
64    #[prost(message, repeated, tag = "3")]
65    pub steps: ::prost::alloc::vec::Vec<NestedProcedureNode>,
66    /// TODO(niwong): global_fields is deprecated, remove in a future version.
67    #[prost(map = "string, message", tag = "4")]
68    pub global_fields: ::std::collections::HashMap<
69        ::prost::alloc::string::String,
70        FormField,
71    >,
72    /// Global fields are set at the beginning of the procedure execution.
73    /// These fields can be referenced by any step in the procedure by using {field_id}.
74    #[prost(message, repeated, tag = "5")]
75    pub new_global_fields: ::prost::alloc::vec::Vec<FormField>,
76}
77/// A list of node IDs.
78#[derive(Clone, PartialEq, ::prost::Message)]
79pub struct NodeList {
80    #[prost(string, repeated, tag = "1")]
81    pub node_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
82}
83/// A procedure node is either a section or a step.
84#[derive(Clone, PartialEq, ::prost::Message)]
85pub struct ProcedureNode {
86    #[prost(oneof = "procedure_node::Node", tags = "1, 2")]
87    pub node: ::core::option::Option<procedure_node::Node>,
88}
89/// Nested message and enum types in `ProcedureNode`.
90pub mod procedure_node {
91    #[derive(Clone, PartialEq, ::prost::Oneof)]
92    pub enum Node {
93        /// A section node provides a visual grouping of other sections and steps.
94        #[prost(message, tag = "1")]
95        Section(super::ProcedureSectionNode),
96        /// A step node represents a step in the procedure.
97        /// It serves as a "template" for the ExecutionStep that will be created during procedure execution.
98        #[prost(message, tag = "2")]
99        Step(super::ProcedureStepNode),
100    }
101}
102/// A procedure section node visually groups other sections and steps.
103#[derive(Clone, PartialEq, ::prost::Message)]
104pub struct ProcedureSectionNode {
105    /// Unique identifier for this node in the procedure graph.
106    #[prost(string, tag = "1")]
107    pub id: ::prost::alloc::string::String,
108    /// Title of this section
109    #[prost(string, tag = "2")]
110    pub title: ::prost::alloc::string::String,
111    /// Optional long-form description for this section
112    #[prost(string, optional, tag = "3")]
113    pub description: ::core::option::Option<::prost::alloc::string::String>,
114}
115/// A procedure step node represents a step in the procedure.
116#[derive(Clone, PartialEq, ::prost::Message)]
117pub struct ProcedureStepNode {
118    /// Unique identifier for this node in the procedure graph.
119    #[prost(string, tag = "1")]
120    pub id: ::prost::alloc::string::String,
121    /// Title of this step
122    #[prost(string, tag = "2")]
123    pub title: ::prost::alloc::string::String,
124    /// The content of this step.
125    #[prost(message, optional, tag = "3")]
126    pub content: ::core::option::Option<ProcedureStepContent>,
127    /// Optional long-form description for this step
128    #[prost(string, optional, tag = "5")]
129    pub description: ::core::option::Option<::prost::alloc::string::String>,
130    /// is_required defaults to false, meaning that the step may be skipped
131    #[prost(bool, optional, tag = "6")]
132    pub is_required: ::core::option::Option<bool>,
133    /// Configuration for if and how the step should automatically transition from NOT_STARTED to IN_PROGRESS
134    /// By default, this will be `all_parents`.
135    #[prost(message, optional, tag = "7")]
136    pub auto_start: ::core::option::Option<AutoStartConfig>,
137    /// Configuration for if and how the step should automatically submit the step contents when requirements are met.
138    /// By default, this will be `disabled`.
139    #[prost(message, optional, tag = "8")]
140    pub initial_auto_proceed_config: ::core::option::Option<AutoProceedConfig>,
141    /// Configuration for whether the step will require a condition to be met for the step to be completed
142    /// By default, this is not set, meaning that the step will not wait on any conditions before completing.
143    #[prost(message, optional, tag = "9")]
144    pub success_condition: ::core::option::Option<SuccessCondition>,
145    /// Configuration for the actions to take when the step transitions to a completed state (SUCCEEDED, ERRORED, SKIPPED)
146    /// By default, there are no actions.
147    #[prost(message, repeated, tag = "10")]
148    pub completion_action_configs: ::prost::alloc::vec::Vec<CompletionActionConfig>,
149    /// Optional attachments for the step description
150    #[prost(string, repeated, tag = "11")]
151    pub attachments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
152}
153/// A section or a step in a NestedProcedure.
154#[derive(Clone, PartialEq, ::prost::Message)]
155pub struct NestedProcedureNode {
156    /// The unique identifier for this step or section
157    #[prost(string, tag = "5")]
158    pub id: ::prost::alloc::string::String,
159    /// Title of this section or step.
160    #[prost(string, tag = "1")]
161    pub title: ::prost::alloc::string::String,
162    /// Optional long-form description for this section or step.
163    #[prost(string, optional, tag = "2")]
164    pub description: ::core::option::Option<::prost::alloc::string::String>,
165    /// If this node is a section, then it can contain other sections and steps.
166    #[prost(message, repeated, tag = "3")]
167    pub steps: ::prost::alloc::vec::Vec<NestedProcedureNode>,
168    /// If this node is a step, then this field contains the step definition.
169    #[prost(message, optional, tag = "4")]
170    pub step: ::core::option::Option<nested_procedure_node::NestedStepNode>,
171}
172/// Nested message and enum types in `NestedProcedureNode`.
173pub mod nested_procedure_node {
174    /// These fields' docs are identical to those of ProcedureStepNode.
175    #[derive(Clone, PartialEq, ::prost::Message)]
176    pub struct NestedStepNode {
177        #[prost(bool, optional, tag = "2")]
178        pub is_required: ::core::option::Option<bool>,
179        #[prost(message, optional, tag = "3")]
180        pub auto_start: ::core::option::Option<super::AutoStartConfig>,
181        #[prost(message, optional, tag = "4")]
182        pub initial_auto_proceed_config: ::core::option::Option<
183            super::AutoProceedConfig,
184        >,
185        #[prost(message, optional, tag = "5")]
186        pub success_condition: ::core::option::Option<super::SuccessCondition>,
187        #[prost(message, repeated, tag = "6")]
188        pub completion_action_configs: ::prost::alloc::vec::Vec<
189            super::CompletionActionConfig,
190        >,
191        /// Optional attachments for the step description
192        #[prost(string, repeated, tag = "51")]
193        pub attachments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
194        /// This should be kept in sync with ProcedureStepContent.content
195        #[prost(oneof = "nested_step_node::Content", tags = "7, 8, 9")]
196        pub content: ::core::option::Option<nested_step_node::Content>,
197    }
198    /// Nested message and enum types in `NestedStepNode`.
199    pub mod nested_step_node {
200        /// This should be kept in sync with ProcedureStepContent.content
201        #[derive(Clone, PartialEq, ::prost::Oneof)]
202        pub enum Content {
203            #[prost(message, tag = "7")]
204            Form(super::super::FormStep),
205            #[prost(message, tag = "8")]
206            StartIngest(super::super::StartIngestStep),
207            #[prost(message, tag = "9")]
208            SelectOrCreateAsset(super::super::SelectOrCreateAssetStep),
209        }
210    }
211}
212/// AutoStartConfig is a configuration that determines whether a step should be
213/// automatically moved from NOT_STARTED to IN_PROGRESS when some set of criteria are met.
214/// By default this will be `all_parents`
215#[derive(Clone, Copy, PartialEq, ::prost::Message)]
216pub struct AutoStartConfig {
217    #[prost(oneof = "auto_start_config::Config", tags = "1, 2")]
218    pub config: ::core::option::Option<auto_start_config::Config>,
219}
220/// Nested message and enum types in `AutoStartConfig`.
221pub mod auto_start_config {
222    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
223    pub struct AllParents {}
224    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
225    pub struct Disabled {}
226    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
227    pub enum Config {
228        /// The step will start automatically when all parent steps have passed.
229        #[prost(message, tag = "1")]
230        AllParents(AllParents),
231        /// The step will not start automatically.
232        #[prost(message, tag = "2")]
233        Disabled(Disabled),
234    }
235}
236/// AutoProceedConfig is a configuration that determines whether a step should
237/// automatically proceed (submit the contents and check success_conditions)
238/// when some set of criteria are met. By default this will be `disabled`.
239#[derive(Clone, Copy, PartialEq, ::prost::Message)]
240pub struct AutoProceedConfig {
241    #[prost(oneof = "auto_proceed_config::Config", tags = "1, 2")]
242    pub config: ::core::option::Option<auto_proceed_config::Config>,
243}
244/// Nested message and enum types in `AutoProceedConfig`.
245pub mod auto_proceed_config {
246    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
247    pub struct Disabled {}
248    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
249    pub struct Enabled {}
250    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
251    pub enum Config {
252        /// The step will not be automatically completed
253        #[prost(message, tag = "1")]
254        Disabled(Disabled),
255        /// The step will automatically submit the step contents once the requirements are met and
256        /// begin the transition to either PASSED or ERRORED.
257        #[prost(message, tag = "2")]
258        Enabled(Enabled),
259    }
260}
261/// The condition that must be met for a step to succeed after submitting its contents.
262#[derive(Clone, PartialEq, ::prost::Message)]
263pub struct SuccessCondition {
264    #[prost(oneof = "success_condition::Condition", tags = "1, 2, 3")]
265    pub condition: ::core::option::Option<success_condition::Condition>,
266}
267/// Nested message and enum types in `SuccessCondition`.
268pub mod success_condition {
269    #[derive(Clone, PartialEq, ::prost::Oneof)]
270    pub enum Condition {
271        #[prost(message, tag = "1")]
272        And(super::AndSuccessCondition),
273        #[prost(message, tag = "2")]
274        Timer(super::TimerSuccessCondition),
275        /// ChannelValidationSuccessCondition = 4;
276        /// OrSuccessCondition or = 5;
277        #[prost(message, tag = "3")]
278        IngestJob(super::IngestJobSuccessCondition),
279    }
280}
281/// All conditions within must be met for the step to be succeeded.
282#[derive(Clone, PartialEq, ::prost::Message)]
283pub struct AndSuccessCondition {
284    #[prost(message, repeated, tag = "1")]
285    pub conditions: ::prost::alloc::vec::Vec<SuccessCondition>,
286}
287/// A timer condition that will succeed the step after a specified duration.
288#[derive(Clone, Copy, PartialEq, ::prost::Message)]
289pub struct TimerSuccessCondition {
290    /// Duration in seconds to wait before succeeding the step. This value must be non-negative.
291    /// This duration is a minimum bound; the actual duration may be longer.
292    #[prost(int32, tag = "1")]
293    pub duration_seconds: i32,
294}
295/// The step will succeed when the associated ingest job succeeds.
296/// If the ingest job fails, the step will move to ERRORED.
297#[derive(Clone, PartialEq, ::prost::Message)]
298pub struct IngestJobSuccessCondition {
299    /// The field ID that contains the IngestJobRid of the ingest job to monitor.
300    #[prost(string, tag = "1")]
301    pub field_id: ::prost::alloc::string::String,
302}
303/// An action that will be taken when a step transitions to a completed state
304/// (succeeded, errored, or skipped). These actions are executed after the step
305/// contents are submitted and the PassCondition (if any) is satisfied. These
306/// actions are executed synchronously with the state transition and generally
307/// should be quick to complete.
308/// Almost all actions will be executed only if the step transitions to SUCCEEDED.
309/// The exception is CreateEvent, which will be executed for all terminal states.
310#[derive(Clone, PartialEq, ::prost::Message)]
311pub struct CompletionActionConfig {
312    #[prost(oneof = "completion_action_config::Config", tags = "1, 2, 3, 4, 5")]
313    pub config: ::core::option::Option<completion_action_config::Config>,
314}
315/// Nested message and enum types in `CompletionActionConfig`.
316pub mod completion_action_config {
317    #[derive(Clone, PartialEq, ::prost::Oneof)]
318    pub enum Config {
319        #[prost(message, tag = "1")]
320        CreateEvent(super::CreateEventConfig),
321        #[prost(message, tag = "2")]
322        SendNotification(super::SendNotificationConfig),
323        #[prost(message, tag = "3")]
324        CreateRun(super::CreateRunConfig),
325        #[prost(message, tag = "4")]
326        ApplyWorkbookTemplates(super::ApplyWorkbookTemplatesConfig),
327        /// ...
328        #[prost(message, tag = "5")]
329        ApplyChecklists(super::ApplyChecklistsConfig),
330    }
331}
332/// An action to create an event when a step is completed.
333/// The completion state of the step is mapped to the event's EventType as follows:
334/// - SUCCEEDED -> SUCCESS
335/// - ERRORED -> ERROR
336/// - SKIPPED -> INFO
337#[derive(Clone, PartialEq, ::prost::Message)]
338pub struct CreateEventConfig {
339    #[prost(string, tag = "1")]
340    pub name: ::prost::alloc::string::String,
341    #[prost(string, optional, tag = "2")]
342    pub description: ::core::option::Option<::prost::alloc::string::String>,
343    #[prost(string, repeated, tag = "3")]
344    pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
345    #[prost(map = "string, string", tag = "4")]
346    pub properties: ::std::collections::HashMap<
347        ::prost::alloc::string::String,
348        ::prost::alloc::string::String,
349    >,
350    /// Each asset_field_id will be resolved and added as an AssetRid to the created event
351    /// deprecated in favor of asset_references
352    #[prost(string, repeated, tag = "5")]
353    pub asset_field_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
354    /// The assets to associate the event with. There must be at least one.
355    /// asset_references takes precedence over (deprecated) asset_field_ids if both are set.
356    ///
357    /// TODO(niwong): re-add after client updates \[(buf.validate.field).repeated.min_items = 1\];
358    #[prost(message, repeated, tag = "6")]
359    pub asset_references: ::prost::alloc::vec::Vec<AssetReference>,
360}
361/// An action to send a notification to one or more integrations when a step is completed.
362#[derive(Clone, PartialEq, ::prost::Message)]
363pub struct SendNotificationConfig {
364    /// The integration(s) to use to send the notification.
365    #[prost(message, optional, tag = "1")]
366    pub integrations: ::core::option::Option<MultiIntegrationReference>,
367    /// The optional title of the notification (length constrained to 130 chars by the IntegrationService).
368    #[prost(message, optional, tag = "2")]
369    pub title: ::core::option::Option<StringReference>,
370    /// The message body of the notification.
371    ///
372    /// We are omitting some optional parameters to the IntegrationService#sendMessage endpoint,
373    /// such as tags, priority, and opsGenieAlias. For all current integration types as of 2025-09-15
374    /// (besides OpsGenie), only title and message are used.
375    #[prost(message, optional, tag = "3")]
376    pub message: ::core::option::Option<StringReference>,
377}
378/// An action to create a run when a step is completed.
379#[derive(Clone, PartialEq, ::prost::Message)]
380pub struct CreateRunConfig {
381    /// If present, the run RID for this step will be available in outputs under this field ID.
382    #[prost(string, optional, tag = "1")]
383    pub run_output_field_id: ::core::option::Option<::prost::alloc::string::String>,
384    /// The assets to associate the run with. There must be at least one.
385    #[prost(message, optional, tag = "2")]
386    pub assets: ::core::option::Option<MultiAssetReference>,
387    /// The name of the run.
388    #[prost(message, optional, tag = "3")]
389    pub name: ::core::option::Option<StringReference>,
390    /// Optionally, a description for the run.
391    #[prost(message, optional, tag = "4")]
392    pub description: ::core::option::Option<StringReference>,
393    /// The time range for the run. If unset, the run will be created with a zero-width time range at now().
394    #[prost(message, optional, tag = "5")]
395    pub time_range: ::core::option::Option<TimeRangeReference>,
396    /// Labels to apply on the run.
397    #[prost(message, optional, tag = "6")]
398    pub labels: ::core::option::Option<MultiStringReference>,
399    /// Properties to apply on the run.
400    ///
401    /// repeated UrlReference links;
402    /// repeated AttachmentRidReference attachments; // requires some sort of AttachmentRidField where FE handles upload
403    #[prost(message, repeated, tag = "7")]
404    pub properties: ::prost::alloc::vec::Vec<create_run_config::Property>,
405}
406/// Nested message and enum types in `CreateRunConfig`.
407pub mod create_run_config {
408    #[derive(Clone, PartialEq, ::prost::Message)]
409    pub struct Property {
410        #[prost(message, optional, tag = "1")]
411        pub key: ::core::option::Option<super::StringReference>,
412        #[prost(message, optional, tag = "2")]
413        pub value: ::core::option::Option<super::StringReference>,
414    }
415}
416/// An action to apply one or more workbook templates to one or more runs when a step is completed.
417#[derive(Clone, PartialEq, ::prost::Message)]
418pub struct ApplyWorkbookTemplatesConfig {
419    /// The workbook templates to apply.
420    #[prost(message, optional, tag = "1")]
421    pub workbook_templates: ::core::option::Option<MultiWorkbookTemplateReference>,
422    /// The runs to apply the workbook templates to. There must be at least one.
423    #[prost(message, optional, tag = "2")]
424    pub runs: ::core::option::Option<MultiRunReference>,
425}
426/// An action to apply one or more checklists to one or more runs when a step is completed.
427#[derive(Clone, PartialEq, ::prost::Message)]
428pub struct ApplyChecklistsConfig {
429    /// The checklists to apply.
430    #[prost(message, optional, tag = "1")]
431    pub checklists: ::core::option::Option<MultiChecklistReference>,
432    /// The runs to apply the checklists to. There must be at least one.
433    #[prost(message, optional, tag = "2")]
434    pub runs: ::core::option::Option<MultiRunReference>,
435}
436/// The content of a procedure step. This typically involves some form of user interaction/input.
437#[derive(Clone, PartialEq, ::prost::Message)]
438pub struct ProcedureStepContent {
439    /// This should be kept in sync with NestedProcedureNode.NestedStepNode.content
440    #[prost(oneof = "procedure_step_content::Content", tags = "1, 2, 3")]
441    pub content: ::core::option::Option<procedure_step_content::Content>,
442}
443/// Nested message and enum types in `ProcedureStepContent`.
444pub mod procedure_step_content {
445    /// This should be kept in sync with NestedProcedureNode.NestedStepNode.content
446    #[derive(Clone, PartialEq, ::prost::Oneof)]
447    pub enum Content {
448        #[prost(message, tag = "1")]
449        Form(super::FormStep),
450        #[prost(message, tag = "2")]
451        StartIngest(super::StartIngestStep),
452        /// ...
453        #[prost(message, tag = "3")]
454        SelectOrCreateAsset(super::SelectOrCreateAssetStep),
455    }
456}
457/// A form step consists of a set of fields to be filled out by the user.
458#[derive(Clone, PartialEq, ::prost::Message)]
459pub struct FormStep {
460    #[prost(message, repeated, tag = "1")]
461    pub fields: ::prost::alloc::vec::Vec<FormField>,
462}
463/// The user will be prompted to start an ingest job in the frontend
464/// and the output of the step will be the rid of the created ingest job.
465#[derive(Clone, PartialEq, ::prost::Message)]
466pub struct StartIngestStep {
467    /// The asset to ingest data into.
468    #[prost(message, optional, tag = "1")]
469    pub asset: ::core::option::Option<AssetReference>,
470    /// The data scope within the asset to ingest data into.
471    #[prost(message, optional, tag = "2")]
472    pub ref_name: ::core::option::Option<StringReference>,
473    /// Restrict and pre-configure the type of ingest that can be started.
474    #[prost(message, optional, tag = "3")]
475    pub ingest_type_config: ::core::option::Option<start_ingest_step::IngestTypeConfig>,
476    /// If present, the ingest job RID for this step will be available in outputs under this field ID.
477    #[prost(string, optional, tag = "4")]
478    pub ingest_job_output_field_id: ::core::option::Option<
479        ::prost::alloc::string::String,
480    >,
481}
482/// Nested message and enum types in `StartIngestStep`.
483pub mod start_ingest_step {
484    #[derive(Clone, PartialEq, ::prost::Message)]
485    pub struct IngestTypeConfig {
486        #[prost(oneof = "ingest_type_config::Config", tags = "1")]
487        pub config: ::core::option::Option<ingest_type_config::Config>,
488    }
489    /// Nested message and enum types in `IngestTypeConfig`.
490    pub mod ingest_type_config {
491        #[derive(Clone, PartialEq, ::prost::Message)]
492        pub struct ContainerizedExtractorIngestConfig {
493            /// The ingest job must use this specific containerized extractor.
494            #[prost(string, tag = "1")]
495            pub rid: ::prost::alloc::string::String,
496            /// The step will prompt the user to upload a file for each extractor input that doesn't have a FileInputBinding.
497            #[prost(message, repeated, tag = "2")]
498            pub file_input_bindings: ::prost::alloc::vec::Vec<
499                super::super::FileInputBinding,
500            >,
501        }
502        #[derive(Clone, PartialEq, ::prost::Oneof)]
503        pub enum Config {
504            /// The ingest job must be a containerized extractor ingest.
505            #[prost(message, tag = "1")]
506            ContainerizedExtractor(ContainerizedExtractorIngestConfig),
507        }
508    }
509}
510#[derive(Clone, PartialEq, ::prost::Message)]
511pub struct FileInputBinding {
512    /// The input key. For containerized extractors, this is the environment variable name.
513    #[prost(string, tag = "1")]
514    pub environment_variable: ::prost::alloc::string::String,
515    /// The specific type of file
516    #[prost(message, optional, tag = "2")]
517    pub file_reference: ::core::option::Option<FileReference>,
518}
519#[derive(Clone, PartialEq, ::prost::Message)]
520pub struct FileReference {
521    #[prost(oneof = "file_reference::Option", tags = "1")]
522    pub option: ::core::option::Option<file_reference::Option>,
523}
524/// Nested message and enum types in `FileReference`.
525pub mod file_reference {
526    #[derive(Clone, PartialEq, ::prost::Oneof)]
527    pub enum Option {
528        /// Reference a field from a prior step
529        #[prost(string, tag = "1")]
530        FieldId(::prost::alloc::string::String),
531    }
532}
533/// The user will be prompted to select an existing asset or create a new asset.
534#[derive(Clone, PartialEq, ::prost::Message)]
535pub struct SelectOrCreateAssetStep {
536    /// If present, the AssetRid for this step will be available in outputs under this field ID.
537    #[prost(string, optional, tag = "1")]
538    pub asset_output_field_id: ::core::option::Option<::prost::alloc::string::String>,
539    /// If present, the user will be given the option to create a new asset restricted by these parameters.
540    #[prost(message, optional, tag = "2")]
541    pub create_asset_parameters: ::core::option::Option<
542        select_or_create_asset_step::CreateAssetParameters,
543    >,
544    /// The asset selection options for this step.
545    /// This can be omitted, in which case the asset can be chosen freely from all assets.
546    #[prost(oneof = "select_or_create_asset_step::Options", tags = "3")]
547    pub options: ::core::option::Option<select_or_create_asset_step::Options>,
548}
549/// Nested message and enum types in `SelectOrCreateAssetStep`.
550pub mod select_or_create_asset_step {
551    /// When creating an new asset, the title is always provided by the user and the
552    /// frontend should prompt for it. Other parameters for asset creation can be
553    /// specified here as either user-prompted or preset.
554    #[derive(Clone, PartialEq, ::prost::Message)]
555    pub struct CreateAssetParameters {
556        /// If set, the new asset will be created with this description.
557        #[prost(message, optional, tag = "2")]
558        pub description: ::core::option::Option<
559            create_asset_parameters::DescriptionParameter,
560        >,
561        /// If set, the new asset will be created with these labels.
562        #[prost(message, optional, tag = "3")]
563        pub labels: ::core::option::Option<create_asset_parameters::LabelsParameter>,
564        /// If set, the new asset will be created with these properties.
565        #[prost(message, optional, tag = "4")]
566        pub properties: ::core::option::Option<
567            create_asset_parameters::PropertiesParameter,
568        >,
569        /// Data scopes for the new asset. The keys are the ref names of the data scopes.
570        #[prost(map = "string, message", tag = "5")]
571        pub data_scopes: ::std::collections::HashMap<
572            ::prost::alloc::string::String,
573            create_asset_parameters::DataScopeParameter,
574        >,
575    }
576    /// Nested message and enum types in `CreateAssetParameters`.
577    pub mod create_asset_parameters {
578        #[derive(Clone, PartialEq, ::prost::Message)]
579        pub struct DescriptionParameter {
580            #[prost(oneof = "description_parameter::Option", tags = "1")]
581            pub option: ::core::option::Option<description_parameter::Option>,
582        }
583        /// Nested message and enum types in `DescriptionParameter`.
584        pub mod description_parameter {
585            #[derive(Clone, PartialEq, ::prost::Oneof)]
586            pub enum Option {
587                /// The description is always a constant string.
588                ///
589                /// Can allow for free-form / guardrailed (templated?) user input.
590                #[prost(string, tag = "1")]
591                Constant(::prost::alloc::string::String),
592            }
593        }
594        #[derive(Clone, PartialEq, ::prost::Message)]
595        pub struct LabelsParameter {
596            /// Labels to always apply on the new asset.
597            #[prost(string, repeated, tag = "1")]
598            pub constant: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
599            /// If allowing for user input, he frontend should leverage ResourceMetadataService#listPropertiesAndLabels
600            /// to provide the user with existing labels to choose from.
601            #[prost(message, optional, tag = "2")]
602            pub user_input: ::core::option::Option<labels_parameter::UserInputOptions>,
603        }
604        /// Nested message and enum types in `LabelsParameter`.
605        pub mod labels_parameter {
606            /// Can allow for more configuration - e.g. default set of starting labels? (which can be overrideen)
607            #[derive(Clone, Copy, PartialEq, ::prost::Message)]
608            pub struct UserInputOptions {}
609        }
610        #[derive(Clone, PartialEq, ::prost::Message)]
611        pub struct PropertiesParameter {
612            /// Properties to always apply on the new asset.
613            #[prost(map = "string, string", tag = "1")]
614            pub constant: ::std::collections::HashMap<
615                ::prost::alloc::string::String,
616                ::prost::alloc::string::String,
617            >,
618            /// If allowing for user input, he frontend should leverage ResourceMetadataService#listPropertiesAndLabels
619            /// to provide the user with existing property keys/values to choose from.
620            #[prost(message, optional, tag = "2")]
621            pub user_input: ::core::option::Option<
622                properties_parameter::UserInputOptions,
623            >,
624        }
625        /// Nested message and enum types in `PropertiesParameter`.
626        pub mod properties_parameter {
627            #[derive(Clone, PartialEq, ::prost::Message)]
628            pub struct UserInputOptions {
629                /// Each property key here must have a value provided by the user for asset creation.
630                #[prost(string, repeated, tag = "1")]
631                pub required_keys: ::prost::alloc::vec::Vec<
632                    ::prost::alloc::string::String,
633                >,
634                /// Each property key here will be suggested to the user but is not required for asset creation
635                ///
636                /// Can allow for more configuration - e.g. required k-v pairs, default k-v pairs?
637                #[prost(string, repeated, tag = "2")]
638                pub suggested_keys: ::prost::alloc::vec::Vec<
639                    ::prost::alloc::string::String,
640                >,
641            }
642        }
643        #[derive(Clone, Copy, PartialEq, ::prost::Message)]
644        pub struct DataScopeParameter {
645            #[prost(oneof = "data_scope_parameter::DataSource", tags = "1")]
646            pub data_source: ::core::option::Option<data_scope_parameter::DataSource>,
647        }
648        /// Nested message and enum types in `DataScopeParameter`.
649        pub mod data_scope_parameter {
650            /// The Dataset will be automatically named "{asset}-{ref_name}".
651            /// Can later allow for this to be specified.
652            /// Other CreateDataset options exist but are omitted for now
653            #[derive(Clone, Copy, PartialEq, ::prost::Message)]
654            pub struct NewDataset {}
655            #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
656            pub enum DataSource {
657                /// The data scope should be a newly created dataset.
658                ///
659                /// Can allow for ExistingDataset
660                #[prost(message, tag = "1")]
661                NewDataset(NewDataset),
662            }
663        }
664    }
665    /// The asset selection options for this step.
666    /// This can be omitted, in which case the asset can be chosen freely from all assets.
667    #[derive(Clone, PartialEq, ::prost::Oneof)]
668    pub enum Options {
669        /// The asset must be chosen from preset options.
670        ///
671        /// The asset must be chosen from a saved view.
672        /// SavedViewRid saved_view = 4;
673        #[prost(message, tag = "3")]
674        PresetOptions(super::PresetAssetFieldOptions),
675    }
676}
677/// A reference to multiple string values
678#[derive(Clone, PartialEq, ::prost::Message)]
679pub struct MultiStringReference {
680    #[prost(oneof = "multi_string_reference::Option", tags = "1")]
681    pub option: ::core::option::Option<multi_string_reference::Option>,
682}
683/// Nested message and enum types in `MultiStringReference`.
684pub mod multi_string_reference {
685    #[derive(Clone, PartialEq, ::prost::Oneof)]
686    pub enum Option {
687        /// The value is taken from a field in the current or previous steps.
688        #[prost(string, tag = "1")]
689        FieldId(::prost::alloc::string::String),
690    }
691}
692/// A reference to a single string value
693#[derive(Clone, PartialEq, ::prost::Message)]
694pub struct StringReference {
695    #[prost(oneof = "string_reference::Option", tags = "1, 2")]
696    pub option: ::core::option::Option<string_reference::Option>,
697}
698/// Nested message and enum types in `StringReference`.
699pub mod string_reference {
700    #[derive(Clone, PartialEq, ::prost::Oneof)]
701    pub enum Option {
702        /// The value is a constant string
703        #[prost(string, tag = "1")]
704        Constant(::prost::alloc::string::String),
705        /// The value is taken from a field in the current or previous steps.
706        ///
707        /// TODO(WB-1728): support string templating.
708        /// string template = 3;
709        #[prost(string, tag = "2")]
710        FieldId(::prost::alloc::string::String),
711    }
712}
713/// A reference to multiple assets
714#[derive(Clone, PartialEq, ::prost::Message)]
715pub struct MultiAssetReference {
716    #[prost(oneof = "multi_asset_reference::Option", tags = "1")]
717    pub option: ::core::option::Option<multi_asset_reference::Option>,
718}
719/// Nested message and enum types in `MultiAssetReference`.
720pub mod multi_asset_reference {
721    #[derive(Clone, PartialEq, ::prost::Message)]
722    pub struct AssetReferenceList {
723        #[prost(message, repeated, tag = "1")]
724        pub references: ::prost::alloc::vec::Vec<super::AssetReference>,
725    }
726    #[derive(Clone, PartialEq, ::prost::Oneof)]
727    pub enum Option {
728        /// TODO: add support for a field that contains a list of asset RIDs
729        #[prost(message, tag = "1")]
730        List(AssetReferenceList),
731    }
732}
733/// A reference to a single asset
734#[derive(Clone, PartialEq, ::prost::Message)]
735pub struct AssetReference {
736    #[prost(oneof = "asset_reference::Option", tags = "1, 2")]
737    pub option: ::core::option::Option<asset_reference::Option>,
738}
739/// Nested message and enum types in `AssetReference`.
740pub mod asset_reference {
741    #[derive(Clone, PartialEq, ::prost::Oneof)]
742    pub enum Option {
743        /// a constant AssetRid
744        #[prost(string, tag = "1")]
745        Rid(::prost::alloc::string::String),
746        /// The field reference that will contain an AssetRid value. The execution will fail if the field is not set
747        /// but the value is accessed.
748        #[prost(string, tag = "2")]
749        FieldId(::prost::alloc::string::String),
750    }
751}
752/// A reference to a time range
753#[derive(Clone, PartialEq, ::prost::Message)]
754pub struct TimeRangeReference {
755    #[prost(oneof = "time_range_reference::Option", tags = "1")]
756    pub option: ::core::option::Option<time_range_reference::Option>,
757}
758/// Nested message and enum types in `TimeRangeReference`.
759pub mod time_range_reference {
760    #[derive(Clone, PartialEq, ::prost::Message)]
761    pub struct IngestJobList {
762        /// Field ids that contain IngestJobRids.
763        #[prost(string, repeated, tag = "1")]
764        pub field_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
765    }
766    #[derive(Clone, PartialEq, ::prost::Oneof)]
767    pub enum Option {
768        /// The time range is the union of the time ranges ingested by all the specified ingest jobs.
769        #[prost(message, tag = "1")]
770        FromIngestJobs(IngestJobList),
771    }
772}
773/// A reference to multiple runs
774#[derive(Clone, PartialEq, ::prost::Message)]
775pub struct MultiRunReference {
776    #[prost(oneof = "multi_run_reference::Option", tags = "1")]
777    pub option: ::core::option::Option<multi_run_reference::Option>,
778}
779/// Nested message and enum types in `MultiRunReference`.
780pub mod multi_run_reference {
781    #[derive(Clone, PartialEq, ::prost::Message)]
782    pub struct RunReferenceList {
783        #[prost(message, repeated, tag = "1")]
784        pub references: ::prost::alloc::vec::Vec<super::RunReference>,
785    }
786    #[derive(Clone, PartialEq, ::prost::Oneof)]
787    pub enum Option {
788        /// TODO: add support for a field that contains a list of run RIDs
789        #[prost(message, tag = "1")]
790        List(RunReferenceList),
791    }
792}
793/// A reference to a single run
794#[derive(Clone, PartialEq, ::prost::Message)]
795pub struct RunReference {
796    #[prost(oneof = "run_reference::Option", tags = "1")]
797    pub option: ::core::option::Option<run_reference::Option>,
798}
799/// Nested message and enum types in `RunReference`.
800pub mod run_reference {
801    #[derive(Clone, PartialEq, ::prost::Oneof)]
802    pub enum Option {
803        /// The field id that will contain a RunRid value. The execution will fail if the field is not set properly.
804        #[prost(string, tag = "1")]
805        FieldId(::prost::alloc::string::String),
806    }
807}
808/// A reference to multiple workbook templates
809#[derive(Clone, PartialEq, ::prost::Message)]
810pub struct MultiWorkbookTemplateReference {
811    #[prost(oneof = "multi_workbook_template_reference::Option", tags = "1")]
812    pub option: ::core::option::Option<multi_workbook_template_reference::Option>,
813}
814/// Nested message and enum types in `MultiWorkbookTemplateReference`.
815pub mod multi_workbook_template_reference {
816    #[derive(Clone, PartialEq, ::prost::Message)]
817    pub struct WorkbookTemplateReferenceList {
818        #[prost(message, repeated, tag = "1")]
819        pub references: ::prost::alloc::vec::Vec<super::WorkbookTemplateReference>,
820    }
821    #[derive(Clone, PartialEq, ::prost::Oneof)]
822    pub enum Option {
823        /// TODO: add support for a field that contains a list of workbook template RIDs
824        #[prost(message, tag = "1")]
825        List(WorkbookTemplateReferenceList),
826    }
827}
828/// A reference to a single workbook template
829#[derive(Clone, PartialEq, ::prost::Message)]
830pub struct WorkbookTemplateReference {
831    #[prost(oneof = "workbook_template_reference::Option", tags = "1")]
832    pub option: ::core::option::Option<workbook_template_reference::Option>,
833}
834/// Nested message and enum types in `WorkbookTemplateReference`.
835pub mod workbook_template_reference {
836    #[derive(Clone, PartialEq, ::prost::Oneof)]
837    pub enum Option {
838        /// A constant workbook template RID.
839        ///
840        /// string field_id = 2;
841        #[prost(string, tag = "1")]
842        Rid(::prost::alloc::string::String),
843    }
844}
845/// A reference to multiple checklists
846#[derive(Clone, PartialEq, ::prost::Message)]
847pub struct MultiChecklistReference {
848    #[prost(oneof = "multi_checklist_reference::Option", tags = "1")]
849    pub option: ::core::option::Option<multi_checklist_reference::Option>,
850}
851/// Nested message and enum types in `MultiChecklistReference`.
852pub mod multi_checklist_reference {
853    #[derive(Clone, PartialEq, ::prost::Message)]
854    pub struct ChecklistReferenceList {
855        #[prost(message, repeated, tag = "1")]
856        pub references: ::prost::alloc::vec::Vec<super::ChecklistReference>,
857    }
858    #[derive(Clone, PartialEq, ::prost::Oneof)]
859    pub enum Option {
860        /// TODO: add support for a field that contains a list of checklist RIDs
861        #[prost(message, tag = "1")]
862        List(ChecklistReferenceList),
863    }
864}
865/// A reference to a single checklist
866#[derive(Clone, PartialEq, ::prost::Message)]
867pub struct ChecklistReference {
868    #[prost(oneof = "checklist_reference::Option", tags = "1")]
869    pub option: ::core::option::Option<checklist_reference::Option>,
870}
871/// Nested message and enum types in `ChecklistReference`.
872pub mod checklist_reference {
873    #[derive(Clone, PartialEq, ::prost::Oneof)]
874    pub enum Option {
875        /// A constant checklist RID.
876        ///
877        /// string field_id = 2;
878        #[prost(string, tag = "1")]
879        Rid(::prost::alloc::string::String),
880    }
881}
882/// A reference to multiple notification Integrations
883#[derive(Clone, PartialEq, ::prost::Message)]
884pub struct MultiIntegrationReference {
885    #[prost(oneof = "multi_integration_reference::Option", tags = "1")]
886    pub option: ::core::option::Option<multi_integration_reference::Option>,
887}
888/// Nested message and enum types in `MultiIntegrationReference`.
889pub mod multi_integration_reference {
890    #[derive(Clone, PartialEq, ::prost::Message)]
891    pub struct IntegrationReferenceList {
892        #[prost(message, repeated, tag = "1")]
893        pub references: ::prost::alloc::vec::Vec<super::IntegrationReference>,
894    }
895    #[derive(Clone, PartialEq, ::prost::Oneof)]
896    pub enum Option {
897        #[prost(message, tag = "1")]
898        List(IntegrationReferenceList),
899    }
900}
901/// A reference to a notification Integration
902#[derive(Clone, PartialEq, ::prost::Message)]
903pub struct IntegrationReference {
904    #[prost(oneof = "integration_reference::Option", tags = "1")]
905    pub option: ::core::option::Option<integration_reference::Option>,
906}
907/// Nested message and enum types in `IntegrationReference`.
908pub mod integration_reference {
909    #[derive(Clone, PartialEq, ::prost::Oneof)]
910    pub enum Option {
911        /// A constant integration RID.
912        ///
913        /// string field_id = 2;
914        #[prost(string, tag = "1")]
915        Rid(::prost::alloc::string::String),
916    }
917}
918/// A field to be filled out by the user.
919#[derive(Clone, PartialEq, ::prost::Message)]
920pub struct FormField {
921    /// This field's id can be used by downstream steps to refer to the value.
922    #[prost(string, tag = "1")]
923    pub id: ::prost::alloc::string::String,
924    /// UI label for the field component. Overrides any label defined in the specific FormField type.
925    #[prost(string, optional, tag = "11")]
926    pub label: ::core::option::Option<::prost::alloc::string::String>,
927    /// Help text describing how to use this input field.
928    #[prost(string, optional, tag = "12")]
929    pub description: ::core::option::Option<::prost::alloc::string::String>,
930    #[prost(oneof = "form_field::Field", tags = "2, 3, 4, 5, 6, 7, 8, 9, 10")]
931    pub field: ::core::option::Option<form_field::Field>,
932}
933/// Nested message and enum types in `FormField`.
934pub mod form_field {
935    #[derive(Clone, PartialEq, ::prost::Oneof)]
936    pub enum Field {
937        #[prost(message, tag = "2")]
938        Asset(super::AssetField),
939        #[prost(message, tag = "3")]
940        Checkbox(super::CheckboxField),
941        #[prost(message, tag = "4")]
942        Text(super::TextField),
943        #[prost(message, tag = "5")]
944        Int(super::IntField),
945        #[prost(message, tag = "6")]
946        Double(super::DoubleField),
947        #[prost(message, tag = "7")]
948        SingleEnum(super::SingleEnumField),
949        #[prost(message, tag = "8")]
950        MultiEnum(super::MultiEnumField),
951        #[prost(message, tag = "9")]
952        FileUpload(super::FileUploadField),
953        #[prost(message, tag = "10")]
954        MultiFileUpload(super::MultiFileUploadField),
955    }
956}
957/// A limited set of options to choose from, with an optional default option.
958#[derive(Clone, PartialEq, ::prost::Message)]
959pub struct PresetAssetFieldOptions {
960    /// The list of options to choose from.
961    #[prost(message, repeated, tag = "1")]
962    pub options: ::prost::alloc::vec::Vec<AssetReference>,
963    /// If set, this option will be selected by default, if it is present in the options.
964    /// The user can still select a different option.
965    #[prost(message, optional, tag = "2")]
966    pub default_option: ::core::option::Option<AssetReference>,
967}
968/// A field to select a single asset.
969#[derive(Clone, PartialEq, ::prost::Message)]
970pub struct AssetField {
971    /// Helper text to guide selection of the asset
972    /// deprecated in favor of label directly on FormField
973    #[prost(string, tag = "1")]
974    pub label: ::prost::alloc::string::String,
975    /// Whether this field is required to be set complete the step.
976    #[prost(bool, tag = "2")]
977    pub is_required: bool,
978    /// The asset options for this field.
979    /// This can be omitted, in which case the asset can be chosen freely from all assets.
980    #[prost(oneof = "asset_field::Options", tags = "3")]
981    pub options: ::core::option::Option<asset_field::Options>,
982}
983/// Nested message and enum types in `AssetField`.
984pub mod asset_field {
985    /// The asset options for this field.
986    /// This can be omitted, in which case the asset can be chosen freely from all assets.
987    #[derive(Clone, PartialEq, ::prost::Oneof)]
988    pub enum Options {
989        /// The asset must be chosen from a saved view.
990        /// SavedViewRid saved_view = 5;
991        /// TODO(pchen): do we want to provide single string types from AssetFieldOption to simplify the Nested
992        /// or do we want to explicitly modify the types Nested spec uses?
993        #[prost(message, tag = "3")]
994        PresetOptions(super::PresetAssetFieldOptions),
995    }
996}
997/// A field to capture a boolean value.
998#[derive(Clone, PartialEq, ::prost::Message)]
999pub struct CheckboxField {
1000    /// Label to show for this checkbox field
1001    /// deprecated in favor of label directly on FormField
1002    #[prost(string, tag = "1")]
1003    pub label: ::prost::alloc::string::String,
1004    /// If set, the checkbox value must be checked (`true`) to complete the step.
1005    #[prost(bool, tag = "2")]
1006    pub is_required: bool,
1007}
1008#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1009pub struct TextFieldSimpleInputType {}
1010#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1011pub struct TextFieldMarkdownInputType {}
1012/// A field to capture a string value.
1013#[derive(Clone, PartialEq, ::prost::Message)]
1014pub struct TextField {
1015    /// Label to show for this text field
1016    /// deprecated in favor of label directly on FormField
1017    #[prost(string, tag = "1")]
1018    pub label: ::prost::alloc::string::String,
1019    /// if set, validate that input is at least this many characters
1020    /// `is_required` can be achieved by setting `min_length >= 1`
1021    #[prost(uint32, optional, tag = "4")]
1022    pub min_length: ::core::option::Option<u32>,
1023    /// if set, validate that input is at most this many characters
1024    #[prost(uint32, optional, tag = "5")]
1025    pub max_length: ::core::option::Option<u32>,
1026    /// type of form input to render. Defaults to SIMPLE.
1027    #[prost(oneof = "text_field::InputType", tags = "2, 3")]
1028    pub input_type: ::core::option::Option<text_field::InputType>,
1029}
1030/// Nested message and enum types in `TextField`.
1031pub mod text_field {
1032    /// type of form input to render. Defaults to SIMPLE.
1033    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1034    pub enum InputType {
1035        /// renders a simple html text input field
1036        #[prost(message, tag = "2")]
1037        Simple(super::TextFieldSimpleInputType),
1038        /// renders a Markdown editor for longer inputs with formatting capabilities
1039        #[prost(message, tag = "3")]
1040        Markdown(super::TextFieldMarkdownInputType),
1041    }
1042}
1043/// A field to capture an int value.
1044#[derive(Clone, PartialEq, ::prost::Message)]
1045pub struct IntField {
1046    /// Label to show for this int field
1047    /// deprecated in favor of label directly on FormField
1048    #[prost(string, tag = "1")]
1049    pub label: ::prost::alloc::string::String,
1050    /// Whether this field is required to be set complete the step.
1051    #[prost(bool, tag = "2")]
1052    pub is_required: bool,
1053    /// if set, validate that input is at least this value
1054    #[prost(int64, optional, tag = "3")]
1055    pub gte_value: ::core::option::Option<i64>,
1056    /// if set, validate that input is at most this value
1057    #[prost(int64, optional, tag = "4")]
1058    pub lte_value: ::core::option::Option<i64>,
1059}
1060/// A field to capture a double value.
1061#[derive(Clone, PartialEq, ::prost::Message)]
1062pub struct DoubleField {
1063    /// Label to show for this double field
1064    /// deprecated in favor of label directly on FormField
1065    #[prost(string, tag = "1")]
1066    pub label: ::prost::alloc::string::String,
1067    /// Whether this field is required to be set complete the step.
1068    #[prost(bool, tag = "2")]
1069    pub is_required: bool,
1070    /// if set, a validation on the lower bound of the input value
1071    #[prost(oneof = "double_field::LowerBound", tags = "3, 4")]
1072    pub lower_bound: ::core::option::Option<double_field::LowerBound>,
1073    /// if set, a validation on the upper bound of the input value
1074    #[prost(oneof = "double_field::UpperBound", tags = "5, 6")]
1075    pub upper_bound: ::core::option::Option<double_field::UpperBound>,
1076}
1077/// Nested message and enum types in `DoubleField`.
1078pub mod double_field {
1079    /// if set, a validation on the lower bound of the input value
1080    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1081    pub enum LowerBound {
1082        /// greater than
1083        #[prost(double, tag = "3")]
1084        GtValue(f64),
1085        /// greater than or equal to
1086        #[prost(double, tag = "4")]
1087        GteValue(f64),
1088    }
1089    /// if set, a validation on the upper bound of the input value
1090    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1091    pub enum UpperBound {
1092        /// less than
1093        #[prost(double, tag = "5")]
1094        LtValue(f64),
1095        /// less than or equal to
1096        #[prost(double, tag = "6")]
1097        LteValue(f64),
1098    }
1099}
1100#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1101pub struct EnumFieldButtonsInputType {}
1102#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1103pub struct EnumFieldMenuInputType {}
1104/// A field to capture one of several options.
1105#[derive(Clone, PartialEq, ::prost::Message)]
1106pub struct SingleEnumField {
1107    /// Label to show for this options field
1108    /// deprecated in favor of label directly on FormField
1109    #[prost(string, tag = "1")]
1110    pub label: ::prost::alloc::string::String,
1111    /// List of predefined options that can be selected by the user
1112    #[prost(string, repeated, tag = "2")]
1113    pub options: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1114    /// Whether a user can create and specify a new custom option not in the list of options.
1115    #[prost(bool, tag = "5")]
1116    pub allow_custom: bool,
1117    /// Whether a selection is required
1118    #[prost(bool, tag = "6")]
1119    pub is_required: bool,
1120    /// type of form input to render.
1121    #[prost(oneof = "single_enum_field::InputType", tags = "3, 4")]
1122    pub input_type: ::core::option::Option<single_enum_field::InputType>,
1123}
1124/// Nested message and enum types in `SingleEnumField`.
1125pub mod single_enum_field {
1126    /// type of form input to render.
1127    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1128    pub enum InputType {
1129        /// renders a radio button component
1130        #[prost(message, tag = "3")]
1131        Buttons(super::EnumFieldButtonsInputType),
1132        /// renders a typical drop down menu
1133        #[prost(message, tag = "4")]
1134        Dropdown(super::EnumFieldMenuInputType),
1135    }
1136}
1137/// A field to capture one or more of several options.
1138#[derive(Clone, PartialEq, ::prost::Message)]
1139pub struct MultiEnumField {
1140    /// Label to show for this options field
1141    /// deprecated in favor of label directly on FormField
1142    #[prost(string, tag = "1")]
1143    pub label: ::prost::alloc::string::String,
1144    /// List of predefined options that can be selected by the user
1145    #[prost(string, repeated, tag = "2")]
1146    pub options: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1147    /// Whether a user can create and specify a new custom option not in the list of options.
1148    #[prost(bool, tag = "6")]
1149    pub allow_custom: bool,
1150    /// If set, the user must select at least this many options
1151    /// `is_required` behavior can be achieved by setting `min_count` = 1
1152    #[prost(uint32, optional, tag = "7")]
1153    pub min_count: ::core::option::Option<u32>,
1154    /// If set, the user can select at most this many options
1155    #[prost(uint32, optional, tag = "8")]
1156    pub max_count: ::core::option::Option<u32>,
1157    /// type of form input to render.
1158    #[prost(oneof = "multi_enum_field::InputType", tags = "3, 4")]
1159    pub input_type: ::core::option::Option<multi_enum_field::InputType>,
1160}
1161/// Nested message and enum types in `MultiEnumField`.
1162pub mod multi_enum_field {
1163    /// type of form input to render.
1164    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1165    pub enum InputType {
1166        /// renders a collection of checkboxes
1167        #[prost(message, tag = "3")]
1168        Buttons(super::EnumFieldButtonsInputType),
1169        /// renders a typical drop down menu
1170        #[prost(message, tag = "4")]
1171        Dropdown(super::EnumFieldMenuInputType),
1172    }
1173}
1174/// A field to process the uploading of a file
1175#[derive(Clone, PartialEq, ::prost::Message)]
1176pub struct FileUploadField {
1177    /// If a file is required
1178    #[prost(bool, tag = "1")]
1179    pub is_required: bool,
1180    /// Optional list of case insensitive suffixes to filter files. (ie "csv", "parquet", or "json")
1181    #[prost(string, repeated, tag = "2")]
1182    pub suffix_filters: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1183}
1184/// A field to process the uploading of a dynamic set of files
1185#[derive(Clone, PartialEq, ::prost::Message)]
1186pub struct MultiFileUploadField {
1187    /// Count of required files
1188    #[prost(uint32, optional, tag = "1")]
1189    pub min_count: ::core::option::Option<u32>,
1190    /// File count limit
1191    #[prost(uint32, optional, tag = "2")]
1192    pub max_count: ::core::option::Option<u32>,
1193    /// Optional list of case insensitive suffixes to filter files. (ie "csv", "parquet", or "json")
1194    #[prost(string, repeated, tag = "3")]
1195    pub suffix_filters: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1196}
1197/// Metadata about a procedure that is not part of the versioned state.
1198#[derive(Clone, PartialEq, ::prost::Message)]
1199pub struct ProcedureMetadata {
1200    #[prost(string, tag = "1")]
1201    pub rid: ::prost::alloc::string::String,
1202    #[prost(string, tag = "2")]
1203    pub title: ::prost::alloc::string::String,
1204    #[prost(string, optional, tag = "3")]
1205    pub description: ::core::option::Option<::prost::alloc::string::String>,
1206    #[prost(string, repeated, tag = "4")]
1207    pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1208    #[prost(map = "string, string", tag = "5")]
1209    pub properties: ::std::collections::HashMap<
1210        ::prost::alloc::string::String,
1211        ::prost::alloc::string::String,
1212    >,
1213    #[prost(bool, tag = "6")]
1214    pub is_archived: bool,
1215    #[prost(bool, tag = "7")]
1216    pub is_published: bool,
1217    #[prost(message, optional, tag = "8")]
1218    pub created_at: ::core::option::Option<
1219        super::super::super::google::protobuf::Timestamp,
1220    >,
1221    #[prost(string, tag = "9")]
1222    pub created_by: ::prost::alloc::string::String,
1223    #[prost(message, optional, tag = "10")]
1224    pub updated_at: ::core::option::Option<
1225        super::super::super::google::protobuf::Timestamp,
1226    >,
1227    #[prost(string, tag = "11")]
1228    pub updated_by: ::prost::alloc::string::String,
1229    #[prost(string, tag = "12")]
1230    pub workspace: ::prost::alloc::string::String,
1231}
1232/// A procedure describes a series of steps to be performed, typically in a specific order,
1233#[derive(Clone, PartialEq, ::prost::Message)]
1234pub struct Procedure {
1235    /// The RID of the procedure.
1236    #[prost(string, tag = "1")]
1237    pub rid: ::prost::alloc::string::String,
1238    /// The commit ID of this version of the procedure.
1239    #[prost(string, tag = "2")]
1240    pub commit: ::prost::alloc::string::String,
1241    /// Metadata about the procedure.
1242    #[prost(message, optional, tag = "3")]
1243    pub metadata: ::core::option::Option<ProcedureMetadata>,
1244    /// The versioned state of the procedure.
1245    #[prost(message, optional, tag = "4")]
1246    pub state: ::core::option::Option<ProcedureState>,
1247}
1248#[derive(Clone, PartialEq, ::prost::Message)]
1249pub struct CreateProcedureRequest {
1250    #[prost(string, tag = "1")]
1251    pub title: ::prost::alloc::string::String,
1252    #[prost(string, optional, tag = "2")]
1253    pub description: ::core::option::Option<::prost::alloc::string::String>,
1254    #[prost(string, repeated, tag = "3")]
1255    pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1256    #[prost(map = "string, string", tag = "4")]
1257    pub properties: ::std::collections::HashMap<
1258        ::prost::alloc::string::String,
1259        ::prost::alloc::string::String,
1260    >,
1261    #[prost(message, optional, tag = "5")]
1262    pub state: ::core::option::Option<ProcedureState>,
1263    #[prost(bool, optional, tag = "6")]
1264    pub is_published: ::core::option::Option<bool>,
1265    #[prost(string, tag = "7")]
1266    pub workspace: ::prost::alloc::string::String,
1267    #[prost(string, tag = "8")]
1268    pub commit_message: ::prost::alloc::string::String,
1269    #[prost(string, optional, tag = "9")]
1270    pub initial_branch_name: ::core::option::Option<::prost::alloc::string::String>,
1271}
1272#[derive(Clone, PartialEq, ::prost::Message)]
1273pub struct CreateProcedureResponse {
1274    #[prost(message, optional, tag = "1")]
1275    pub procedure: ::core::option::Option<Procedure>,
1276    #[prost(string, optional, tag = "2")]
1277    pub branch_name: ::core::option::Option<::prost::alloc::string::String>,
1278}
1279#[derive(Clone, PartialEq, ::prost::Message)]
1280pub struct GetProcedureRequest {
1281    #[prost(string, tag = "1")]
1282    pub rid: ::prost::alloc::string::String,
1283    #[prost(message, optional, tag = "2")]
1284    pub branch_or_commit: ::core::option::Option<
1285        super::super::versioning::v1::BranchOrCommit,
1286    >,
1287    /// If true, the display graph will be included in the response.
1288    /// Default is false.
1289    #[prost(bool, tag = "3")]
1290    pub include_display_graph: bool,
1291}
1292#[derive(Clone, PartialEq, ::prost::Message)]
1293pub struct GetProcedureResponse {
1294    #[prost(message, optional, tag = "1")]
1295    pub procedure: ::core::option::Option<Procedure>,
1296    /// Included if include_display_graph was set to true
1297    #[prost(message, optional, tag = "2")]
1298    pub display_graph: ::core::option::Option<ProcedureDisplayGraph>,
1299}
1300#[derive(Clone, PartialEq, ::prost::Message)]
1301pub struct BatchGetProcedureMetadataRequest {
1302    #[prost(string, repeated, tag = "1")]
1303    pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1304}
1305#[derive(Clone, PartialEq, ::prost::Message)]
1306pub struct BatchGetProcedureMetadataResponse {
1307    #[prost(message, repeated, tag = "1")]
1308    pub procedure_metadatas: ::prost::alloc::vec::Vec<ProcedureMetadata>,
1309}
1310#[derive(Clone, PartialEq, ::prost::Message)]
1311pub struct UpdateProcedureMetadataRequest {
1312    #[prost(string, tag = "1")]
1313    pub rid: ::prost::alloc::string::String,
1314    #[prost(string, optional, tag = "2")]
1315    pub title: ::core::option::Option<::prost::alloc::string::String>,
1316    #[prost(string, optional, tag = "3")]
1317    pub description: ::core::option::Option<::prost::alloc::string::String>,
1318    #[prost(message, optional, tag = "4")]
1319    pub labels: ::core::option::Option<super::super::types::LabelUpdateWrapper>,
1320    #[prost(message, optional, tag = "5")]
1321    pub properties: ::core::option::Option<super::super::types::PropertyUpdateWrapper>,
1322    #[prost(bool, optional, tag = "6")]
1323    pub is_archived: ::core::option::Option<bool>,
1324    #[prost(bool, optional, tag = "7")]
1325    pub is_published: ::core::option::Option<bool>,
1326}
1327#[derive(Clone, PartialEq, ::prost::Message)]
1328pub struct UpdateProcedureMetadataResponse {
1329    #[prost(message, optional, tag = "1")]
1330    pub procedure_metadata: ::core::option::Option<ProcedureMetadata>,
1331}
1332#[derive(Clone, PartialEq, ::prost::Message)]
1333pub struct ParseNestedProcedureRequest {
1334    #[prost(message, optional, tag = "1")]
1335    pub nested_procedure: ::core::option::Option<NestedProcedure>,
1336    /// If true, the display graph will be included in the response.
1337    /// Default is false.
1338    #[prost(bool, tag = "3")]
1339    pub include_display_graph: bool,
1340}
1341#[derive(Clone, PartialEq, ::prost::Message)]
1342pub struct ParseNestedProcedureResponse {
1343    #[prost(message, optional, tag = "1")]
1344    pub procedure: ::core::option::Option<Procedure>,
1345    /// Included if include_display_graph was set to true
1346    #[prost(message, optional, tag = "2")]
1347    pub display_graph: ::core::option::Option<ProcedureDisplayGraph>,
1348}
1349#[derive(Clone, PartialEq, ::prost::Message)]
1350pub struct GetProcedureAsNestedRequest {
1351    #[prost(string, tag = "1")]
1352    pub rid: ::prost::alloc::string::String,
1353    #[prost(message, optional, tag = "2")]
1354    pub branch_or_commit: ::core::option::Option<
1355        super::super::versioning::v1::BranchOrCommit,
1356    >,
1357}
1358#[derive(Clone, PartialEq, ::prost::Message)]
1359pub struct GetProcedureAsNestedResponse {
1360    #[prost(message, optional, tag = "1")]
1361    pub nested_procedure: ::core::option::Option<NestedProcedure>,
1362}
1363#[derive(Clone, PartialEq, ::prost::Message)]
1364pub struct MergeToMainRequest {
1365    #[prost(string, tag = "1")]
1366    pub rid: ::prost::alloc::string::String,
1367    #[prost(string, tag = "2")]
1368    pub branch: ::prost::alloc::string::String,
1369    /// If present, this commit ID must match the latest commit on main for the merge to succeed.
1370    #[prost(string, optional, tag = "3")]
1371    pub latest_commit_on_main: ::core::option::Option<::prost::alloc::string::String>,
1372    #[prost(string, tag = "4")]
1373    pub message: ::prost::alloc::string::String,
1374}
1375#[derive(Clone, PartialEq, ::prost::Message)]
1376pub struct MergeToMainResponse {
1377    #[prost(message, optional, tag = "1")]
1378    pub procedure: ::core::option::Option<Procedure>,
1379}
1380#[derive(Clone, PartialEq, ::prost::Message)]
1381pub struct SaveWorkingStateRequest {
1382    #[prost(string, tag = "1")]
1383    pub rid: ::prost::alloc::string::String,
1384    #[prost(string, optional, tag = "2")]
1385    pub branch: ::core::option::Option<::prost::alloc::string::String>,
1386    #[prost(string, tag = "3")]
1387    pub message: ::prost::alloc::string::String,
1388    /// If present, this commit ID must match the latest commit on the branch for the save to succeed.
1389    #[prost(string, optional, tag = "4")]
1390    pub latest_commit_on_branch: ::core::option::Option<::prost::alloc::string::String>,
1391    #[prost(message, optional, tag = "5")]
1392    pub state: ::core::option::Option<ProcedureState>,
1393}
1394#[derive(Clone, PartialEq, ::prost::Message)]
1395pub struct SaveWorkingStateResponse {
1396    #[prost(message, optional, tag = "1")]
1397    pub procedure: ::core::option::Option<Procedure>,
1398}
1399#[derive(Clone, PartialEq, ::prost::Message)]
1400pub struct CommitRequest {
1401    #[prost(string, tag = "1")]
1402    pub rid: ::prost::alloc::string::String,
1403    #[prost(string, optional, tag = "2")]
1404    pub branch: ::core::option::Option<::prost::alloc::string::String>,
1405    /// If present, this commit ID must match the latest commit on the branch for the commit to succeed.
1406    #[prost(string, optional, tag = "3")]
1407    pub latest_commit_on_branch: ::core::option::Option<::prost::alloc::string::String>,
1408    #[prost(string, tag = "4")]
1409    pub message: ::prost::alloc::string::String,
1410    #[prost(message, optional, tag = "5")]
1411    pub state: ::core::option::Option<ProcedureState>,
1412}
1413#[derive(Clone, PartialEq, ::prost::Message)]
1414pub struct CommitResponse {
1415    #[prost(message, optional, tag = "1")]
1416    pub procedure: ::core::option::Option<Procedure>,
1417}
1418#[derive(Clone, PartialEq, ::prost::Message)]
1419pub struct ProcedureSearchQuery {
1420    #[prost(oneof = "procedure_search_query::Query", tags = "1, 2, 3, 4, 5, 6, 7, 8")]
1421    pub query: ::core::option::Option<procedure_search_query::Query>,
1422}
1423/// Nested message and enum types in `ProcedureSearchQuery`.
1424pub mod procedure_search_query {
1425    #[derive(Clone, PartialEq, ::prost::Message)]
1426    pub struct ProcedureSearchAndQuery {
1427        #[prost(message, repeated, tag = "1")]
1428        pub queries: ::prost::alloc::vec::Vec<super::ProcedureSearchQuery>,
1429    }
1430    #[derive(Clone, PartialEq, ::prost::Message)]
1431    pub struct ProcedureSearchOrQuery {
1432        #[prost(message, repeated, tag = "1")]
1433        pub queries: ::prost::alloc::vec::Vec<super::ProcedureSearchQuery>,
1434    }
1435    #[derive(Clone, PartialEq, ::prost::Oneof)]
1436    pub enum Query {
1437        #[prost(string, tag = "1")]
1438        SearchText(::prost::alloc::string::String),
1439        #[prost(string, tag = "2")]
1440        Label(::prost::alloc::string::String),
1441        #[prost(message, tag = "3")]
1442        Property(super::super::super::types::Property),
1443        #[prost(message, tag = "4")]
1444        And(ProcedureSearchAndQuery),
1445        #[prost(message, tag = "5")]
1446        Or(ProcedureSearchOrQuery),
1447        #[prost(string, tag = "6")]
1448        Workspace(::prost::alloc::string::String),
1449        #[prost(string, tag = "7")]
1450        CreatedBy(::prost::alloc::string::String),
1451        #[prost(bool, tag = "8")]
1452        IsArchived(bool),
1453    }
1454}
1455#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1456pub struct SearchProceduresSortOptions {
1457    /// Defaults to true (descending)
1458    #[prost(bool, optional, tag = "1")]
1459    pub is_descending: ::core::option::Option<bool>,
1460    /// Defaults to CREATED_AT
1461    #[prost(enumeration = "SearchProceduresSortField", optional, tag = "2")]
1462    pub sort_field: ::core::option::Option<i32>,
1463}
1464#[derive(Clone, PartialEq, ::prost::Message)]
1465pub struct SearchProceduresRequest {
1466    #[prost(message, optional, tag = "1")]
1467    pub query: ::core::option::Option<ProcedureSearchQuery>,
1468    /// If not set, default is to sort by created_at descending
1469    #[prost(message, optional, tag = "2")]
1470    pub sort_options: ::core::option::Option<SearchProceduresSortOptions>,
1471    /// Page sizes greater than 1_000 will be rejected. Default pageSize is 100.
1472    #[prost(int32, optional, tag = "3")]
1473    pub page_size: ::core::option::Option<i32>,
1474    #[prost(string, optional, tag = "4")]
1475    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1476}
1477#[derive(Clone, PartialEq, ::prost::Message)]
1478pub struct SearchProceduresResponse {
1479    #[prost(message, repeated, tag = "1")]
1480    pub procedure_metadata: ::prost::alloc::vec::Vec<ProcedureMetadata>,
1481    #[prost(string, optional, tag = "2")]
1482    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1483}
1484#[derive(Clone, PartialEq, ::prost::Message)]
1485pub struct ArchiveProceduresRequest {
1486    #[prost(string, repeated, tag = "1")]
1487    pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1488}
1489#[derive(Clone, PartialEq, ::prost::Message)]
1490pub struct ArchiveProceduresResponse {
1491    #[prost(string, repeated, tag = "1")]
1492    pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1493}
1494#[derive(Clone, PartialEq, ::prost::Message)]
1495pub struct UnarchiveProceduresRequest {
1496    #[prost(string, repeated, tag = "1")]
1497    pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1498}
1499#[derive(Clone, PartialEq, ::prost::Message)]
1500pub struct UnarchiveProceduresResponse {
1501    #[prost(string, repeated, tag = "1")]
1502    pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1503}
1504#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1505#[repr(i32)]
1506pub enum SearchProceduresSortField {
1507    Unspecified = 0,
1508    Name = 1,
1509    CreatedAt = 2,
1510    UpdatedAt = 3,
1511}
1512impl SearchProceduresSortField {
1513    /// String value of the enum field names used in the ProtoBuf definition.
1514    ///
1515    /// The values are not transformed in any way and thus are considered stable
1516    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1517    pub fn as_str_name(&self) -> &'static str {
1518        match self {
1519            Self::Unspecified => "SEARCH_PROCEDURES_SORT_FIELD_UNSPECIFIED",
1520            Self::Name => "SEARCH_PROCEDURES_SORT_FIELD_NAME",
1521            Self::CreatedAt => "SEARCH_PROCEDURES_SORT_FIELD_CREATED_AT",
1522            Self::UpdatedAt => "SEARCH_PROCEDURES_SORT_FIELD_UPDATED_AT",
1523        }
1524    }
1525    /// Creates an enum from field names used in the ProtoBuf definition.
1526    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1527        match value {
1528            "SEARCH_PROCEDURES_SORT_FIELD_UNSPECIFIED" => Some(Self::Unspecified),
1529            "SEARCH_PROCEDURES_SORT_FIELD_NAME" => Some(Self::Name),
1530            "SEARCH_PROCEDURES_SORT_FIELD_CREATED_AT" => Some(Self::CreatedAt),
1531            "SEARCH_PROCEDURES_SORT_FIELD_UPDATED_AT" => Some(Self::UpdatedAt),
1532            _ => None,
1533        }
1534    }
1535}
1536#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1537#[repr(i32)]
1538pub enum ProceduresServiceError {
1539    Unspecified = 0,
1540    NotFound = 1,
1541    CommitNotFound = 2,
1542    CannotMergeMain = 3,
1543    CannotCommitToArchivedProcedure = 4,
1544    InvalidGraph = 5,
1545    InvalidSearchToken = 6,
1546}
1547impl ProceduresServiceError {
1548    /// String value of the enum field names used in the ProtoBuf definition.
1549    ///
1550    /// The values are not transformed in any way and thus are considered stable
1551    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1552    pub fn as_str_name(&self) -> &'static str {
1553        match self {
1554            Self::Unspecified => "PROCEDURES_SERVICE_ERROR_UNSPECIFIED",
1555            Self::NotFound => "PROCEDURES_SERVICE_ERROR_NOT_FOUND",
1556            Self::CommitNotFound => "PROCEDURES_SERVICE_ERROR_COMMIT_NOT_FOUND",
1557            Self::CannotMergeMain => "PROCEDURES_SERVICE_ERROR_CANNOT_MERGE_MAIN",
1558            Self::CannotCommitToArchivedProcedure => {
1559                "PROCEDURES_SERVICE_ERROR_CANNOT_COMMIT_TO_ARCHIVED_PROCEDURE"
1560            }
1561            Self::InvalidGraph => "PROCEDURES_SERVICE_ERROR_INVALID_GRAPH",
1562            Self::InvalidSearchToken => "PROCEDURES_SERVICE_ERROR_INVALID_SEARCH_TOKEN",
1563        }
1564    }
1565    /// Creates an enum from field names used in the ProtoBuf definition.
1566    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1567        match value {
1568            "PROCEDURES_SERVICE_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
1569            "PROCEDURES_SERVICE_ERROR_NOT_FOUND" => Some(Self::NotFound),
1570            "PROCEDURES_SERVICE_ERROR_COMMIT_NOT_FOUND" => Some(Self::CommitNotFound),
1571            "PROCEDURES_SERVICE_ERROR_CANNOT_MERGE_MAIN" => Some(Self::CannotMergeMain),
1572            "PROCEDURES_SERVICE_ERROR_CANNOT_COMMIT_TO_ARCHIVED_PROCEDURE" => {
1573                Some(Self::CannotCommitToArchivedProcedure)
1574            }
1575            "PROCEDURES_SERVICE_ERROR_INVALID_GRAPH" => Some(Self::InvalidGraph),
1576            "PROCEDURES_SERVICE_ERROR_INVALID_SEARCH_TOKEN" => {
1577                Some(Self::InvalidSearchToken)
1578            }
1579            _ => None,
1580        }
1581    }
1582}
1583/// Generated client implementations.
1584pub mod procedures_service_client {
1585    #![allow(
1586        unused_variables,
1587        dead_code,
1588        missing_docs,
1589        clippy::wildcard_imports,
1590        clippy::let_unit_value,
1591    )]
1592    use tonic::codegen::*;
1593    use tonic::codegen::http::Uri;
1594    /// Service for creating and managing procedure templates, which are versioned collections
1595    /// of steps to be performed, typically in a specific order.
1596    #[derive(Debug, Clone)]
1597    pub struct ProceduresServiceClient<T> {
1598        inner: tonic::client::Grpc<T>,
1599    }
1600    impl ProceduresServiceClient<tonic::transport::Channel> {
1601        /// Attempt to create a new client by connecting to a given endpoint.
1602        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1603        where
1604            D: TryInto<tonic::transport::Endpoint>,
1605            D::Error: Into<StdError>,
1606        {
1607            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1608            Ok(Self::new(conn))
1609        }
1610    }
1611    impl<T> ProceduresServiceClient<T>
1612    where
1613        T: tonic::client::GrpcService<tonic::body::Body>,
1614        T::Error: Into<StdError>,
1615        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1616        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1617    {
1618        pub fn new(inner: T) -> Self {
1619            let inner = tonic::client::Grpc::new(inner);
1620            Self { inner }
1621        }
1622        pub fn with_origin(inner: T, origin: Uri) -> Self {
1623            let inner = tonic::client::Grpc::with_origin(inner, origin);
1624            Self { inner }
1625        }
1626        pub fn with_interceptor<F>(
1627            inner: T,
1628            interceptor: F,
1629        ) -> ProceduresServiceClient<InterceptedService<T, F>>
1630        where
1631            F: tonic::service::Interceptor,
1632            T::ResponseBody: Default,
1633            T: tonic::codegen::Service<
1634                http::Request<tonic::body::Body>,
1635                Response = http::Response<
1636                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1637                >,
1638            >,
1639            <T as tonic::codegen::Service<
1640                http::Request<tonic::body::Body>,
1641            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1642        {
1643            ProceduresServiceClient::new(InterceptedService::new(inner, interceptor))
1644        }
1645        /// Compress requests with the given encoding.
1646        ///
1647        /// This requires the server to support it otherwise it might respond with an
1648        /// error.
1649        #[must_use]
1650        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1651            self.inner = self.inner.send_compressed(encoding);
1652            self
1653        }
1654        /// Enable decompressing responses.
1655        #[must_use]
1656        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1657            self.inner = self.inner.accept_compressed(encoding);
1658            self
1659        }
1660        /// Limits the maximum size of a decoded message.
1661        ///
1662        /// Default: `4MB`
1663        #[must_use]
1664        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1665            self.inner = self.inner.max_decoding_message_size(limit);
1666            self
1667        }
1668        /// Limits the maximum size of an encoded message.
1669        ///
1670        /// Default: `usize::MAX`
1671        #[must_use]
1672        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1673            self.inner = self.inner.max_encoding_message_size(limit);
1674            self
1675        }
1676        /// Create a new procedure
1677        pub async fn create_procedure(
1678            &mut self,
1679            request: impl tonic::IntoRequest<super::CreateProcedureRequest>,
1680        ) -> std::result::Result<
1681            tonic::Response<super::CreateProcedureResponse>,
1682            tonic::Status,
1683        > {
1684            self.inner
1685                .ready()
1686                .await
1687                .map_err(|e| {
1688                    tonic::Status::unknown(
1689                        format!("Service was not ready: {}", e.into()),
1690                    )
1691                })?;
1692            let codec = tonic::codec::ProstCodec::default();
1693            let path = http::uri::PathAndQuery::from_static(
1694                "/nominal.procedures.v1.ProceduresService/CreateProcedure",
1695            );
1696            let mut req = request.into_request();
1697            req.extensions_mut()
1698                .insert(
1699                    GrpcMethod::new(
1700                        "nominal.procedures.v1.ProceduresService",
1701                        "CreateProcedure",
1702                    ),
1703                );
1704            self.inner.unary(req, path, codec).await
1705        }
1706        /// Get a procedure by its RID
1707        pub async fn get_procedure(
1708            &mut self,
1709            request: impl tonic::IntoRequest<super::GetProcedureRequest>,
1710        ) -> std::result::Result<
1711            tonic::Response<super::GetProcedureResponse>,
1712            tonic::Status,
1713        > {
1714            self.inner
1715                .ready()
1716                .await
1717                .map_err(|e| {
1718                    tonic::Status::unknown(
1719                        format!("Service was not ready: {}", e.into()),
1720                    )
1721                })?;
1722            let codec = tonic::codec::ProstCodec::default();
1723            let path = http::uri::PathAndQuery::from_static(
1724                "/nominal.procedures.v1.ProceduresService/GetProcedure",
1725            );
1726            let mut req = request.into_request();
1727            req.extensions_mut()
1728                .insert(
1729                    GrpcMethod::new(
1730                        "nominal.procedures.v1.ProceduresService",
1731                        "GetProcedure",
1732                    ),
1733                );
1734            self.inner.unary(req, path, codec).await
1735        }
1736        /// Get metadata for multiple procedure by RIDs.
1737        /// Unauthorized RIDs will be omitted from the response.
1738        /// Order is not guaranteed to match the request.
1739        pub async fn batch_get_procedure_metadata(
1740            &mut self,
1741            request: impl tonic::IntoRequest<super::BatchGetProcedureMetadataRequest>,
1742        ) -> std::result::Result<
1743            tonic::Response<super::BatchGetProcedureMetadataResponse>,
1744            tonic::Status,
1745        > {
1746            self.inner
1747                .ready()
1748                .await
1749                .map_err(|e| {
1750                    tonic::Status::unknown(
1751                        format!("Service was not ready: {}", e.into()),
1752                    )
1753                })?;
1754            let codec = tonic::codec::ProstCodec::default();
1755            let path = http::uri::PathAndQuery::from_static(
1756                "/nominal.procedures.v1.ProceduresService/BatchGetProcedureMetadata",
1757            );
1758            let mut req = request.into_request();
1759            req.extensions_mut()
1760                .insert(
1761                    GrpcMethod::new(
1762                        "nominal.procedures.v1.ProceduresService",
1763                        "BatchGetProcedureMetadata",
1764                    ),
1765                );
1766            self.inner.unary(req, path, codec).await
1767        }
1768        /// Update the metadata of a procedure
1769        pub async fn update_procedure_metadata(
1770            &mut self,
1771            request: impl tonic::IntoRequest<super::UpdateProcedureMetadataRequest>,
1772        ) -> std::result::Result<
1773            tonic::Response<super::UpdateProcedureMetadataResponse>,
1774            tonic::Status,
1775        > {
1776            self.inner
1777                .ready()
1778                .await
1779                .map_err(|e| {
1780                    tonic::Status::unknown(
1781                        format!("Service was not ready: {}", e.into()),
1782                    )
1783                })?;
1784            let codec = tonic::codec::ProstCodec::default();
1785            let path = http::uri::PathAndQuery::from_static(
1786                "/nominal.procedures.v1.ProceduresService/UpdateProcedureMetadata",
1787            );
1788            let mut req = request.into_request();
1789            req.extensions_mut()
1790                .insert(
1791                    GrpcMethod::new(
1792                        "nominal.procedures.v1.ProceduresService",
1793                        "UpdateProcedureMetadata",
1794                    ),
1795                );
1796            self.inner.unary(req, path, codec).await
1797        }
1798        /// Parse a procedure from a nested procedure structure
1799        pub async fn parse_nested_procedure(
1800            &mut self,
1801            request: impl tonic::IntoRequest<super::ParseNestedProcedureRequest>,
1802        ) -> std::result::Result<
1803            tonic::Response<super::ParseNestedProcedureResponse>,
1804            tonic::Status,
1805        > {
1806            self.inner
1807                .ready()
1808                .await
1809                .map_err(|e| {
1810                    tonic::Status::unknown(
1811                        format!("Service was not ready: {}", e.into()),
1812                    )
1813                })?;
1814            let codec = tonic::codec::ProstCodec::default();
1815            let path = http::uri::PathAndQuery::from_static(
1816                "/nominal.procedures.v1.ProceduresService/ParseNestedProcedure",
1817            );
1818            let mut req = request.into_request();
1819            req.extensions_mut()
1820                .insert(
1821                    GrpcMethod::new(
1822                        "nominal.procedures.v1.ProceduresService",
1823                        "ParseNestedProcedure",
1824                    ),
1825                );
1826            self.inner.unary(req, path, codec).await
1827        }
1828        /// Get procedure as nested procedure
1829        /// TODO(pchen): in the future, not all graphs will be representable as nested procedures
1830        pub async fn get_procedure_as_nested(
1831            &mut self,
1832            request: impl tonic::IntoRequest<super::GetProcedureAsNestedRequest>,
1833        ) -> std::result::Result<
1834            tonic::Response<super::GetProcedureAsNestedResponse>,
1835            tonic::Status,
1836        > {
1837            self.inner
1838                .ready()
1839                .await
1840                .map_err(|e| {
1841                    tonic::Status::unknown(
1842                        format!("Service was not ready: {}", e.into()),
1843                    )
1844                })?;
1845            let codec = tonic::codec::ProstCodec::default();
1846            let path = http::uri::PathAndQuery::from_static(
1847                "/nominal.procedures.v1.ProceduresService/GetProcedureAsNested",
1848            );
1849            let mut req = request.into_request();
1850            req.extensions_mut()
1851                .insert(
1852                    GrpcMethod::new(
1853                        "nominal.procedures.v1.ProceduresService",
1854                        "GetProcedureAsNested",
1855                    ),
1856                );
1857            self.inner.unary(req, path, codec).await
1858        }
1859        /// Merge a branch of a procedure to main
1860        pub async fn merge_to_main(
1861            &mut self,
1862            request: impl tonic::IntoRequest<super::MergeToMainRequest>,
1863        ) -> std::result::Result<
1864            tonic::Response<super::MergeToMainResponse>,
1865            tonic::Status,
1866        > {
1867            self.inner
1868                .ready()
1869                .await
1870                .map_err(|e| {
1871                    tonic::Status::unknown(
1872                        format!("Service was not ready: {}", e.into()),
1873                    )
1874                })?;
1875            let codec = tonic::codec::ProstCodec::default();
1876            let path = http::uri::PathAndQuery::from_static(
1877                "/nominal.procedures.v1.ProceduresService/MergeToMain",
1878            );
1879            let mut req = request.into_request();
1880            req.extensions_mut()
1881                .insert(
1882                    GrpcMethod::new(
1883                        "nominal.procedures.v1.ProceduresService",
1884                        "MergeToMain",
1885                    ),
1886                );
1887            self.inner.unary(req, path, codec).await
1888        }
1889        /// Save the working state of a procedure
1890        pub async fn save_working_state(
1891            &mut self,
1892            request: impl tonic::IntoRequest<super::SaveWorkingStateRequest>,
1893        ) -> std::result::Result<
1894            tonic::Response<super::SaveWorkingStateResponse>,
1895            tonic::Status,
1896        > {
1897            self.inner
1898                .ready()
1899                .await
1900                .map_err(|e| {
1901                    tonic::Status::unknown(
1902                        format!("Service was not ready: {}", e.into()),
1903                    )
1904                })?;
1905            let codec = tonic::codec::ProstCodec::default();
1906            let path = http::uri::PathAndQuery::from_static(
1907                "/nominal.procedures.v1.ProceduresService/SaveWorkingState",
1908            );
1909            let mut req = request.into_request();
1910            req.extensions_mut()
1911                .insert(
1912                    GrpcMethod::new(
1913                        "nominal.procedures.v1.ProceduresService",
1914                        "SaveWorkingState",
1915                    ),
1916                );
1917            self.inner.unary(req, path, codec).await
1918        }
1919        /// Commit a procedure to a branch
1920        pub async fn commit(
1921            &mut self,
1922            request: impl tonic::IntoRequest<super::CommitRequest>,
1923        ) -> std::result::Result<tonic::Response<super::CommitResponse>, tonic::Status> {
1924            self.inner
1925                .ready()
1926                .await
1927                .map_err(|e| {
1928                    tonic::Status::unknown(
1929                        format!("Service was not ready: {}", e.into()),
1930                    )
1931                })?;
1932            let codec = tonic::codec::ProstCodec::default();
1933            let path = http::uri::PathAndQuery::from_static(
1934                "/nominal.procedures.v1.ProceduresService/Commit",
1935            );
1936            let mut req = request.into_request();
1937            req.extensions_mut()
1938                .insert(
1939                    GrpcMethod::new("nominal.procedures.v1.ProceduresService", "Commit"),
1940                );
1941            self.inner.unary(req, path, codec).await
1942        }
1943        /// Searches all procedures, returning paged results
1944        pub async fn search_procedures(
1945            &mut self,
1946            request: impl tonic::IntoRequest<super::SearchProceduresRequest>,
1947        ) -> std::result::Result<
1948            tonic::Response<super::SearchProceduresResponse>,
1949            tonic::Status,
1950        > {
1951            self.inner
1952                .ready()
1953                .await
1954                .map_err(|e| {
1955                    tonic::Status::unknown(
1956                        format!("Service was not ready: {}", e.into()),
1957                    )
1958                })?;
1959            let codec = tonic::codec::ProstCodec::default();
1960            let path = http::uri::PathAndQuery::from_static(
1961                "/nominal.procedures.v1.ProceduresService/SearchProcedures",
1962            );
1963            let mut req = request.into_request();
1964            req.extensions_mut()
1965                .insert(
1966                    GrpcMethod::new(
1967                        "nominal.procedures.v1.ProceduresService",
1968                        "SearchProcedures",
1969                    ),
1970                );
1971            self.inner.unary(req, path, codec).await
1972        }
1973        /// Archive procedures
1974        pub async fn archive_procedures(
1975            &mut self,
1976            request: impl tonic::IntoRequest<super::ArchiveProceduresRequest>,
1977        ) -> std::result::Result<
1978            tonic::Response<super::ArchiveProceduresResponse>,
1979            tonic::Status,
1980        > {
1981            self.inner
1982                .ready()
1983                .await
1984                .map_err(|e| {
1985                    tonic::Status::unknown(
1986                        format!("Service was not ready: {}", e.into()),
1987                    )
1988                })?;
1989            let codec = tonic::codec::ProstCodec::default();
1990            let path = http::uri::PathAndQuery::from_static(
1991                "/nominal.procedures.v1.ProceduresService/ArchiveProcedures",
1992            );
1993            let mut req = request.into_request();
1994            req.extensions_mut()
1995                .insert(
1996                    GrpcMethod::new(
1997                        "nominal.procedures.v1.ProceduresService",
1998                        "ArchiveProcedures",
1999                    ),
2000                );
2001            self.inner.unary(req, path, codec).await
2002        }
2003        /// Unarchive procedures
2004        pub async fn unarchive_procedures(
2005            &mut self,
2006            request: impl tonic::IntoRequest<super::UnarchiveProceduresRequest>,
2007        ) -> std::result::Result<
2008            tonic::Response<super::UnarchiveProceduresResponse>,
2009            tonic::Status,
2010        > {
2011            self.inner
2012                .ready()
2013                .await
2014                .map_err(|e| {
2015                    tonic::Status::unknown(
2016                        format!("Service was not ready: {}", e.into()),
2017                    )
2018                })?;
2019            let codec = tonic::codec::ProstCodec::default();
2020            let path = http::uri::PathAndQuery::from_static(
2021                "/nominal.procedures.v1.ProceduresService/UnarchiveProcedures",
2022            );
2023            let mut req = request.into_request();
2024            req.extensions_mut()
2025                .insert(
2026                    GrpcMethod::new(
2027                        "nominal.procedures.v1.ProceduresService",
2028                        "UnarchiveProcedures",
2029                    ),
2030                );
2031            self.inner.unary(req, path, codec).await
2032        }
2033    }
2034}