nominal_api/proto/
nominal.procedures.v1.rs

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