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