Skip to main content

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, 10")]
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            #[prost(message, tag = "10")]
210            Wait(super::super::WaitStep),
211        }
212    }
213}
214/// AutoStartConfig is a configuration that determines whether a step should be
215/// automatically moved from NOT_STARTED to IN_PROGRESS when some set of criteria are met.
216/// By default this will be `all_parents`
217#[derive(Clone, Copy, PartialEq, ::prost::Message)]
218pub struct AutoStartConfig {
219    #[prost(oneof = "auto_start_config::Config", tags = "1, 2")]
220    pub config: ::core::option::Option<auto_start_config::Config>,
221}
222/// Nested message and enum types in `AutoStartConfig`.
223pub mod auto_start_config {
224    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
225    pub struct AllParents {}
226    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
227    pub struct Disabled {}
228    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
229    pub enum Config {
230        /// The step will start automatically when all parent steps have passed.
231        #[prost(message, tag = "1")]
232        AllParents(AllParents),
233        /// The step will not start automatically.
234        #[prost(message, tag = "2")]
235        Disabled(Disabled),
236    }
237}
238/// AutoProceedConfig is a configuration that determines whether a step should
239/// automatically proceed (submit the contents and check success_conditions)
240/// when some set of criteria are met. By default this will be `disabled`.
241#[derive(Clone, Copy, PartialEq, ::prost::Message)]
242pub struct AutoProceedConfig {
243    #[prost(oneof = "auto_proceed_config::Config", tags = "1, 2")]
244    pub config: ::core::option::Option<auto_proceed_config::Config>,
245}
246/// Nested message and enum types in `AutoProceedConfig`.
247pub mod auto_proceed_config {
248    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
249    pub struct Disabled {}
250    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
251    pub struct Enabled {}
252    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
253    pub enum Config {
254        /// The step will not be automatically completed
255        #[prost(message, tag = "1")]
256        Disabled(Disabled),
257        /// The step will automatically submit the step contents once the requirements are met and
258        /// begin the transition to either PASSED or ERRORED.
259        #[prost(message, tag = "2")]
260        Enabled(Enabled),
261    }
262}
263/// The condition that must be met for a step to succeed after submitting its contents.
264#[derive(Clone, PartialEq, ::prost::Message)]
265pub struct SuccessCondition {
266    #[prost(oneof = "success_condition::Condition", tags = "1, 2, 3, 4, 5")]
267    pub condition: ::core::option::Option<success_condition::Condition>,
268}
269/// Nested message and enum types in `SuccessCondition`.
270pub mod success_condition {
271    #[derive(Clone, PartialEq, ::prost::Oneof)]
272    pub enum Condition {
273        #[prost(message, tag = "1")]
274        And(super::AndSuccessCondition),
275        #[prost(message, tag = "2")]
276        Timer(super::TimerSuccessCondition),
277        #[prost(message, tag = "3")]
278        IngestJob(super::IngestJobSuccessCondition),
279        #[prost(message, tag = "4")]
280        ChannelValidation(super::ChannelValidationSuccessCondition),
281        /// OrSuccessCondition or = 6;
282        #[prost(message, tag = "5")]
283        Webhook(super::WebhookSuccessCondition),
284    }
285}
286/// All conditions within must be met for the step to be succeeded.
287#[derive(Clone, PartialEq, ::prost::Message)]
288pub struct AndSuccessCondition {
289    #[prost(message, repeated, tag = "1")]
290    pub conditions: ::prost::alloc::vec::Vec<SuccessCondition>,
291}
292/// A timer condition that will succeed the step after a specified duration.
293#[derive(Clone, Copy, PartialEq, ::prost::Message)]
294pub struct TimerSuccessCondition {
295    /// Duration in seconds to wait before succeeding the step. This value must be non-negative.
296    /// This duration is a minimum bound; the actual duration may be longer.
297    #[prost(int32, tag = "1")]
298    pub duration_seconds: i32,
299}
300/// The step will succeed when the associated ingest job succeeds.
301/// If the ingest job fails, the step will move to ERRORED.
302#[derive(Clone, PartialEq, ::prost::Message)]
303pub struct IngestJobSuccessCondition {
304    /// The field ID that contains the IngestJobRid of the ingest job to monitor.
305    #[prost(string, tag = "1")]
306    pub field_id: ::prost::alloc::string::String,
307}
308/// Defines a success condition that compares channel data against a threshold value.
309/// The step succeeds when the comparison (channel_value COMPARATOR threshold) evaluates to true
310/// within the timeout period. For example, checking if a channel value is greater than 100.
311#[derive(Clone, PartialEq, ::prost::Message)]
312pub struct ChannelValidationSuccessCondition {
313    /// The channel to validate against the threshold.
314    #[prost(message, optional, tag = "1")]
315    pub channel: ::core::option::Option<
316        channel_validation_success_condition::ChannelLocator,
317    >,
318    /// The comparison operator to use.
319    /// COMPARATOR_UNSPECIFIED should never be used and will be rejected at runtime.
320    #[prost(enumeration = "channel_validation_success_condition::Comparator", tag = "2")]
321    pub comparator: i32,
322    /// The threshold value to compare the channel data against.
323    /// The comparison is: channel_value COMPARATOR threshold
324    /// Using double for better precision. Note: When using COMPARATOR_EQUAL or COMPARATOR_NOT_EQUAL
325    /// with floating-point channel data, be aware of potential precision issues inherent to IEEE 754.
326    #[prost(double, tag = "3")]
327    pub threshold: f64,
328    /// Maximum time in milliseconds to wait for the condition to be satisfied.
329    /// If the timeout expires before the comparison evaluates to true, the step moves to ERRORED.
330    /// Must be greater than zero and at most one hour (3,600,000 milliseconds).
331    #[prost(int32, tag = "4")]
332    pub timeout_millis: i32,
333    /// optionally specify a persistence of individual points
334    #[prost(uint32, optional, tag = "5")]
335    pub point_persistence: ::core::option::Option<u32>,
336    /// optionally specify a persistence duration in milliseconds (max 5 minutes) for which the condition must hold true
337    #[prost(uint32, optional, tag = "6")]
338    pub time_persistence: ::core::option::Option<u32>,
339}
340/// Nested message and enum types in `ChannelValidationSuccessCondition`.
341pub mod channel_validation_success_condition {
342    /// Locates a specific channel within a data source for validation.
343    /// Uses symbolic reference names that are resolved to concrete resources at execution time,
344    /// allowing procedure templates to be defined before the actual data sources exist.
345    /// If the data_source_ref or channel_name cannot be resolved at execution time, the step will
346    /// transition to ERRORED state immediately.
347    #[derive(Clone, PartialEq, ::prost::Message)]
348    pub struct ChannelLocator {
349        /// Symbolic name for the data source (e.g., "main", "test_data").
350        /// This name is resolved to a concrete DataSourceRid at execution time by looking up the name
351        /// in the data scopes (for assets) or data sources (for runs) specified by asset_or_run.
352        /// This is NOT a field reference - it's a literal string that must match a data source ref name.
353        /// Maps to Java type: io.nominal.scout.api.DataSourceRefName
354        #[prost(string, tag = "1")]
355        pub data_source_ref: ::prost::alloc::string::String,
356        /// The name of the channel within the data source to validate.
357        /// Maps to Java type: io.nominal.api.Channel
358        #[prost(string, tag = "2")]
359        pub channel_name: ::prost::alloc::string::String,
360        /// Optional series tags to filter the channel data.
361        /// Used to select specific series when multiple series exist for the same channel name.
362        /// Maps to Java types: io.nominal.api.TagName (key), io.nominal.api.TagValue (value)
363        #[prost(map = "string, string", tag = "3")]
364        pub tags: ::std::collections::HashMap<
365            ::prost::alloc::string::String,
366            ::prost::alloc::string::String,
367        >,
368        /// Specifies the context for evaluating the channel data.
369        /// Must specify exactly one of: asset reference (for asset-scoped data) or run reference (for run-scoped data).
370        #[prost(oneof = "channel_locator::AssetOrRun", tags = "4, 5")]
371        pub asset_or_run: ::core::option::Option<channel_locator::AssetOrRun>,
372    }
373    /// Nested message and enum types in `ChannelLocator`.
374    pub mod channel_locator {
375        /// Specifies the context for evaluating the channel data.
376        /// Must specify exactly one of: asset reference (for asset-scoped data) or run reference (for run-scoped data).
377        #[derive(Clone, PartialEq, ::prost::Oneof)]
378        pub enum AssetOrRun {
379            #[prost(message, tag = "4")]
380            Asset(super::super::AssetReference),
381            #[prost(message, tag = "5")]
382            Run(super::super::RunReference),
383        }
384    }
385    /// Comparison operator to evaluate channel value against threshold.
386    /// The condition is satisfied when: channel_value COMPARATOR threshold
387    /// Example: COMPARATOR_GREATER_THAN with threshold 100.0 means channel_value > 100.0
388    ///
389    /// Evaluation semantics: The most recent channel value within the timeout period is used for comparison.
390    /// If the channel has no data, the condition will continuously retry until timeout_millis expires.
391    #[derive(
392        Clone,
393        Copy,
394        Debug,
395        PartialEq,
396        Eq,
397        Hash,
398        PartialOrd,
399        Ord,
400        ::prost::Enumeration
401    )]
402    #[repr(i32)]
403    pub enum Comparator {
404        /// Unspecified comparator. This is an invalid state and should never be used.
405        /// Required by proto3 convention as the zero value. Will be rejected at runtime.
406        Unspecified = 0,
407        GreaterThan = 1,
408        GreaterThanOrEqual = 2,
409        LessThan = 3,
410        LessThanOrEqual = 4,
411        Equal = 5,
412        NotEqual = 6,
413    }
414    impl Comparator {
415        /// String value of the enum field names used in the ProtoBuf definition.
416        ///
417        /// The values are not transformed in any way and thus are considered stable
418        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
419        pub fn as_str_name(&self) -> &'static str {
420            match self {
421                Self::Unspecified => "COMPARATOR_UNSPECIFIED",
422                Self::GreaterThan => "COMPARATOR_GREATER_THAN",
423                Self::GreaterThanOrEqual => "COMPARATOR_GREATER_THAN_OR_EQUAL",
424                Self::LessThan => "COMPARATOR_LESS_THAN",
425                Self::LessThanOrEqual => "COMPARATOR_LESS_THAN_OR_EQUAL",
426                Self::Equal => "COMPARATOR_EQUAL",
427                Self::NotEqual => "COMPARATOR_NOT_EQUAL",
428            }
429        }
430        /// Creates an enum from field names used in the ProtoBuf definition.
431        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
432            match value {
433                "COMPARATOR_UNSPECIFIED" => Some(Self::Unspecified),
434                "COMPARATOR_GREATER_THAN" => Some(Self::GreaterThan),
435                "COMPARATOR_GREATER_THAN_OR_EQUAL" => Some(Self::GreaterThanOrEqual),
436                "COMPARATOR_LESS_THAN" => Some(Self::LessThan),
437                "COMPARATOR_LESS_THAN_OR_EQUAL" => Some(Self::LessThanOrEqual),
438                "COMPARATOR_EQUAL" => Some(Self::Equal),
439                "COMPARATOR_NOT_EQUAL" => Some(Self::NotEqual),
440                _ => None,
441            }
442        }
443    }
444}
445/// A webhook success condition that waits for external system approval via HTTP webhook.
446/// The step succeeds when the external system responds with 2xx status code.
447///
448/// Failure behavior:
449/// - 4xx responses: Permanent failure, no retry (CLIENT_ERROR)
450/// - 5xx responses: Retry with exponential backoff until max_retries (SERVER_ERROR_MAX_RETRIES_EXCEEDED)
451/// - Network errors: Retry until max_retries (NETWORK_ERROR_MAX_RETRIES_EXCEEDED)
452/// - Timeout: Retry until timeout_seconds exceeded (OVERALL_TIMEOUT_EXCEEDED)
453/// - Redirects: Followed automatically, fails if redirect loop detected (REDIRECT_LOOP)
454#[derive(Clone, PartialEq, ::prost::Message)]
455pub struct WebhookSuccessCondition {
456    /// RID reference to a WebhookIntegration (the advanced integration type with HMAC signing)
457    #[prost(string, tag = "1")]
458    pub integration_rid: ::prost::alloc::string::String,
459    /// Webhook delivery configuration. If not provided, server uses documented defaults.
460    #[prost(message, optional, tag = "2")]
461    pub delivery_config: ::core::option::Option<WebhookDeliveryConfig>,
462    /// Event type to send (e.g., "procedure.step_waiting")
463    #[prost(string, tag = "3")]
464    pub event_type: ::prost::alloc::string::String,
465    /// JSON payload template using Handlebars syntax (<https://handlebarsjs.com/>)
466    /// Supports variable references using {{variable_name}} syntax:
467    /// - {{execution_rid}} - Procedure execution RID
468    /// - {{step_id}} - Current step ID
469    /// - {{step_name}} - Current step name/title
470    /// - {{procedure_name}} - Procedure name
471    /// - {{field_id}} - Any global form field value (e.g., {{environment}}, {{approval_level}})
472    /// - {{asset_rid}} - Asset RID if step has asset context
473    /// - {{asset_name}} - Asset name if step has asset context
474    ///
475    /// Advanced features:
476    /// - Conditionals: {{#if environment}}production mode{{/if}}
477    /// - Loops: {{#each tags}}{{this}}{{/each}}
478    /// - Comparisons: {{#if (eq priority "HIGH")}}urgent{{/if}}
479    /// - Default values: {{default environment "unknown"}}
480    ///
481    /// Example template:
482    /// {
483    ///    "event": "approval_required",
484    ///    "execution_id": "{{execution_rid}}",
485    ///    "step": "{{step_name}}",
486    ///    "environment": "{{environment}}",
487    ///    {{#if asset_name}}
488    ///    "asset": "{{asset_name}}",
489    ///    {{/if}}
490    ///    "is_production": {{#if (eq environment "production")}}true{{else}}false{{/if}}
491    /// }
492    ///
493    /// Variables that cannot be resolved will be replaced with empty string.
494    /// Invalid JSON after template evaluation will cause the condition to fail with PAYLOAD_ERROR reason.
495    #[prost(string, tag = "4")]
496    pub payload_template: ::prost::alloc::string::String,
497}
498/// Configuration for webhook delivery retry logic and timeouts.
499#[derive(Clone, Copy, PartialEq, ::prost::Message)]
500pub struct WebhookDeliveryConfig {
501    /// Maximum delivery attempts (default: 3, max: 10)
502    #[prost(int32, optional, tag = "1")]
503    pub max_retries: ::core::option::Option<i32>,
504    /// Initial retry interval seconds (default: 15, min: 5, max: 300)
505    #[prost(int64, optional, tag = "2")]
506    pub retry_interval_seconds: ::core::option::Option<i64>,
507    /// Use exponential backoff (default: true)
508    #[prost(bool, optional, tag = "3")]
509    pub exponential_backoff: ::core::option::Option<bool>,
510    /// Max retry interval seconds (default: 300, max: 3600)
511    #[prost(int64, optional, tag = "4")]
512    pub max_retry_interval_seconds: ::core::option::Option<i64>,
513    /// Overall timeout seconds (default: 600, max: 86400)
514    #[prost(int64, optional, tag = "5")]
515    pub timeout_seconds: ::core::option::Option<i64>,
516}
517/// An action that will be taken when a step transitions to a completed state
518/// (succeeded, errored, or skipped). These actions are executed after the step
519/// contents are submitted and the PassCondition (if any) is satisfied. These
520/// actions are executed synchronously with the state transition and generally
521/// should be quick to complete.
522/// Almost all actions will be executed only if the step transitions to SUCCEEDED.
523/// The exception is CreateEvent, which will be executed for all terminal states.
524#[derive(Clone, PartialEq, ::prost::Message)]
525pub struct CompletionActionConfig {
526    #[prost(oneof = "completion_action_config::Config", tags = "1, 2, 3, 4, 5")]
527    pub config: ::core::option::Option<completion_action_config::Config>,
528}
529/// Nested message and enum types in `CompletionActionConfig`.
530pub mod completion_action_config {
531    #[derive(Clone, PartialEq, ::prost::Oneof)]
532    pub enum Config {
533        #[prost(message, tag = "1")]
534        CreateEvent(super::CreateEventConfig),
535        #[prost(message, tag = "2")]
536        SendNotification(super::SendNotificationConfig),
537        #[prost(message, tag = "3")]
538        CreateRun(super::CreateRunConfig),
539        #[prost(message, tag = "4")]
540        ApplyWorkbookTemplates(super::ApplyWorkbookTemplatesConfig),
541        /// ...
542        #[prost(message, tag = "5")]
543        ApplyChecklists(super::ApplyChecklistsConfig),
544    }
545}
546/// An action to create an event when a step is completed.
547/// The completion state of the step is mapped to the event's EventType as follows:
548/// - SUCCEEDED -> SUCCESS
549/// - ERRORED -> ERROR
550/// - SKIPPED -> INFO
551#[derive(Clone, PartialEq, ::prost::Message)]
552pub struct CreateEventConfig {
553    #[prost(string, tag = "1")]
554    pub name: ::prost::alloc::string::String,
555    #[prost(string, optional, tag = "2")]
556    pub description: ::core::option::Option<::prost::alloc::string::String>,
557    #[prost(string, repeated, tag = "3")]
558    pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
559    /// Deprecated in favor of property_refs
560    /// Properties will be overridden by any property_refs with the same key.
561    #[prost(map = "string, string", tag = "4")]
562    pub properties: ::std::collections::HashMap<
563        ::prost::alloc::string::String,
564        ::prost::alloc::string::String,
565    >,
566    /// Each asset_field_id will be resolved and added as an AssetRid to the created event
567    /// deprecated in favor of asset_references
568    #[prost(string, repeated, tag = "5")]
569    pub asset_field_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
570    /// The assets to associate the event with. There must be at least one.
571    /// asset_references takes precedence over (deprecated) asset_field_ids if both are set.
572    ///
573    /// TODO(niwong): re-add after client updates \[(buf.validate.field).repeated.min_items = 1\];
574    #[prost(message, repeated, tag = "6")]
575    pub asset_references: ::prost::alloc::vec::Vec<AssetReference>,
576    /// Properties to apply to the event
577    #[prost(message, repeated, tag = "7")]
578    pub property_refs: ::prost::alloc::vec::Vec<PropertyReference>,
579}
580/// An action to send a notification to one or more integrations when a step is completed.
581#[derive(Clone, PartialEq, ::prost::Message)]
582pub struct SendNotificationConfig {
583    /// The integration(s) to use to send the notification.
584    #[prost(message, optional, tag = "1")]
585    pub integrations: ::core::option::Option<MultiIntegrationReference>,
586    /// The optional title of the notification (length constrained to 130 chars by the IntegrationService).
587    #[prost(message, optional, tag = "2")]
588    pub title: ::core::option::Option<StringReference>,
589    /// The message body of the notification.
590    ///
591    /// We are omitting some optional parameters to the IntegrationService#sendMessage endpoint,
592    /// such as tags, priority, and opsGenieAlias. For all current integration types as of 2025-09-15
593    /// (besides OpsGenie), only title and message are used.
594    #[prost(message, optional, tag = "3")]
595    pub message: ::core::option::Option<StringReference>,
596}
597/// An action to create a run when a step is completed.
598#[derive(Clone, PartialEq, ::prost::Message)]
599pub struct CreateRunConfig {
600    /// If present, the run RID for this step will be available in outputs under this field ID.
601    #[prost(string, optional, tag = "1")]
602    pub run_output_field_id: ::core::option::Option<::prost::alloc::string::String>,
603    /// The assets to associate the run with. There must be at least one.
604    #[prost(message, optional, tag = "2")]
605    pub assets: ::core::option::Option<MultiAssetReference>,
606    /// The name of the run.
607    #[prost(message, optional, tag = "3")]
608    pub name: ::core::option::Option<StringReference>,
609    /// Optionally, a description for the run.
610    #[prost(message, optional, tag = "4")]
611    pub description: ::core::option::Option<StringReference>,
612    /// The time range for the run. If unset, the run will be created with a zero-width time range at now().
613    #[prost(message, optional, tag = "5")]
614    pub time_range: ::core::option::Option<TimeRangeReference>,
615    /// Labels to apply on the run.
616    #[prost(message, optional, tag = "6")]
617    pub labels: ::core::option::Option<MultiStringReference>,
618    /// Properties to apply on the run.
619    ///
620    /// repeated UrlReference links;
621    /// repeated AttachmentRidReference attachments; // requires some sort of AttachmentRidField where FE handles upload
622    #[prost(message, repeated, tag = "7")]
623    pub properties: ::prost::alloc::vec::Vec<create_run_config::Property>,
624}
625/// Nested message and enum types in `CreateRunConfig`.
626pub mod create_run_config {
627    #[derive(Clone, PartialEq, ::prost::Message)]
628    pub struct Property {
629        #[prost(message, optional, tag = "1")]
630        pub key: ::core::option::Option<super::StringReference>,
631        #[prost(message, optional, tag = "2")]
632        pub value: ::core::option::Option<super::StringReference>,
633    }
634}
635#[derive(Clone, PartialEq, ::prost::Message)]
636pub struct PropertyReference {
637    #[prost(message, optional, tag = "1")]
638    pub key: ::core::option::Option<StringReference>,
639    #[prost(message, optional, tag = "2")]
640    pub value: ::core::option::Option<StringReference>,
641}
642/// An action to apply one or more workbook templates to one or more runs when a step is completed.
643#[derive(Clone, PartialEq, ::prost::Message)]
644pub struct ApplyWorkbookTemplatesConfig {
645    /// The workbook templates to apply.
646    #[prost(message, optional, tag = "1")]
647    pub workbook_templates: ::core::option::Option<MultiWorkbookTemplateReference>,
648    /// The runs to apply the workbook templates to. There must be at least one.
649    #[prost(message, optional, tag = "2")]
650    pub runs: ::core::option::Option<MultiRunReference>,
651}
652/// An action to apply one or more checklists to one or more runs when a step is completed.
653#[derive(Clone, PartialEq, ::prost::Message)]
654pub struct ApplyChecklistsConfig {
655    /// The checklists to apply.
656    #[prost(message, optional, tag = "1")]
657    pub checklists: ::core::option::Option<MultiChecklistReference>,
658    /// The runs to apply the checklists to. There must be at least one.
659    #[prost(message, optional, tag = "2")]
660    pub runs: ::core::option::Option<MultiRunReference>,
661}
662/// The content of a procedure step. This typically involves some form of user interaction/input.
663#[derive(Clone, PartialEq, ::prost::Message)]
664pub struct ProcedureStepContent {
665    /// This should be kept in sync with NestedProcedureNode.NestedStepNode.content
666    #[prost(oneof = "procedure_step_content::Content", tags = "1, 2, 3, 4")]
667    pub content: ::core::option::Option<procedure_step_content::Content>,
668}
669/// Nested message and enum types in `ProcedureStepContent`.
670pub mod procedure_step_content {
671    /// This should be kept in sync with NestedProcedureNode.NestedStepNode.content
672    #[derive(Clone, PartialEq, ::prost::Oneof)]
673    pub enum Content {
674        #[prost(message, tag = "1")]
675        Form(super::FormStep),
676        #[prost(message, tag = "2")]
677        StartIngest(super::StartIngestStep),
678        #[prost(message, tag = "3")]
679        SelectOrCreateAsset(super::SelectOrCreateAssetStep),
680        /// ...
681        #[prost(message, tag = "4")]
682        Wait(super::WaitStep),
683    }
684}
685#[derive(Clone, Copy, PartialEq, ::prost::Message)]
686pub struct WaitStep {}
687/// A form step consists of a set of fields to be filled out by the user.
688#[derive(Clone, PartialEq, ::prost::Message)]
689pub struct FormStep {
690    #[prost(message, repeated, tag = "1")]
691    pub fields: ::prost::alloc::vec::Vec<FormField>,
692}
693/// The user will be prompted to start an ingest job in the frontend
694/// and the output of the step will be the rid of the created ingest job.
695#[derive(Clone, PartialEq, ::prost::Message)]
696pub struct StartIngestStep {
697    /// The asset to ingest data into.
698    #[prost(message, optional, tag = "1")]
699    pub asset: ::core::option::Option<AssetReference>,
700    /// The data scope within the asset to ingest data into.
701    #[prost(message, optional, tag = "2")]
702    pub ref_name: ::core::option::Option<StringReference>,
703    /// Restrict and pre-configure the type of ingest that can be started.
704    #[prost(message, optional, tag = "3")]
705    pub ingest_type_config: ::core::option::Option<start_ingest_step::IngestTypeConfig>,
706    /// If present, the ingest job RID for this step will be available in outputs under this field ID.
707    #[prost(string, optional, tag = "4")]
708    pub ingest_job_output_field_id: ::core::option::Option<
709        ::prost::alloc::string::String,
710    >,
711}
712/// Nested message and enum types in `StartIngestStep`.
713pub mod start_ingest_step {
714    #[derive(Clone, PartialEq, ::prost::Message)]
715    pub struct IngestTypeConfig {
716        #[prost(oneof = "ingest_type_config::Config", tags = "1, 2, 3, 4")]
717        pub config: ::core::option::Option<ingest_type_config::Config>,
718    }
719    /// Nested message and enum types in `IngestTypeConfig`.
720    pub mod ingest_type_config {
721        #[derive(Clone, PartialEq, ::prost::Message)]
722        pub struct ContainerizedExtractorIngestConfig {
723            /// The ingest job must use this specific containerized extractor.
724            #[prost(string, tag = "1")]
725            pub rid: ::prost::alloc::string::String,
726            /// The step will prompt the user to upload a file for each extractor input that doesn't have a FileInputBinding.
727            #[prost(message, repeated, tag = "2")]
728            pub file_input_bindings: ::prost::alloc::vec::Vec<
729                super::super::FileInputBinding,
730            >,
731        }
732        #[derive(Clone, PartialEq, ::prost::Message)]
733        pub struct DataflashIngestConfig {
734            /// File to ingest into the dataset. Should be a dataflash `.bin` file.
735            /// Uses tags configured on the asset data scope as additional file tags
736            #[prost(message, optional, tag = "1")]
737            pub file_input: ::core::option::Option<super::super::FileReference>,
738        }
739        #[derive(Clone, PartialEq, ::prost::Message)]
740        pub struct CsvIngestConfig {
741            /// header for timestamp column
742            #[prost(message, optional, tag = "1")]
743            pub timestamp_series_name: ::core::option::Option<
744                super::super::StringReference,
745            >,
746            #[prost(message, optional, tag = "2")]
747            pub timestamp_type: ::core::option::Option<
748                super::super::TimestampTypeParameter,
749            >,
750            /// File to ingest into the dataset. Should be a `.csv` or `.csv.gz` file.
751            /// Uses tags configured on the asset data scope as additional file tags
752            #[prost(message, optional, tag = "3")]
753            pub file_input: ::core::option::Option<super::super::FileReference>,
754        }
755        #[derive(Clone, PartialEq, ::prost::Message)]
756        pub struct ParquetIngestConfig {
757            /// header for timestamp column
758            #[prost(message, optional, tag = "1")]
759            pub timestamp_series_name: ::core::option::Option<
760                super::super::StringReference,
761            >,
762            #[prost(message, optional, tag = "2")]
763            pub timestamp_type: ::core::option::Option<
764                super::super::TimestampTypeParameter,
765            >,
766            /// File to ingest into the dataset. Should be a `.parquet` or `.parquet.gz` file or archive file.
767            /// Uses tags configured on the asset data scope as additional file tags
768            #[prost(message, optional, tag = "3")]
769            pub file_input: ::core::option::Option<super::super::FileReference>,
770        }
771        #[derive(Clone, PartialEq, ::prost::Oneof)]
772        pub enum Config {
773            /// The ingest job must be a containerized extractor ingest.
774            #[prost(message, tag = "1")]
775            ContainerizedExtractor(ContainerizedExtractorIngestConfig),
776            #[prost(message, tag = "2")]
777            Dataflash(DataflashIngestConfig),
778            #[prost(message, tag = "3")]
779            Csv(CsvIngestConfig),
780            #[prost(message, tag = "4")]
781            Parquet(ParquetIngestConfig),
782        }
783    }
784}
785#[derive(Clone, PartialEq, ::prost::Message)]
786pub struct FileInputBinding {
787    /// The input key. For containerized extractors, this is the environment variable name.
788    #[prost(string, tag = "1")]
789    pub environment_variable: ::prost::alloc::string::String,
790    /// The specific type of file
791    #[prost(message, optional, tag = "2")]
792    pub file_reference: ::core::option::Option<FileReference>,
793}
794#[derive(Clone, PartialEq, ::prost::Message)]
795pub struct FileReference {
796    #[prost(oneof = "file_reference::Option", tags = "1")]
797    pub option: ::core::option::Option<file_reference::Option>,
798}
799/// Nested message and enum types in `FileReference`.
800pub mod file_reference {
801    #[derive(Clone, PartialEq, ::prost::Oneof)]
802    pub enum Option {
803        /// Reference a field from a prior step
804        #[prost(string, tag = "1")]
805        FieldId(::prost::alloc::string::String),
806    }
807}
808#[derive(Clone, PartialEq, ::prost::Message)]
809pub struct TimestampTypeParameter {
810    #[prost(oneof = "timestamp_type_parameter::Option", tags = "1, 2")]
811    pub option: ::core::option::Option<timestamp_type_parameter::Option>,
812}
813/// Nested message and enum types in `TimestampTypeParameter`.
814pub mod timestamp_type_parameter {
815    /// Can allow for more configuration
816    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
817    pub struct UserInputOptions {}
818    #[derive(Clone, PartialEq, ::prost::Oneof)]
819    pub enum Option {
820        /// Timestamp type to always use for ingest.
821        #[prost(message, tag = "1")]
822        Constant(super::TimestampType),
823        /// If specified, allows user to enter timestamp metadata based on input options.
824        #[prost(message, tag = "2")]
825        UserInput(UserInputOptions),
826    }
827}
828#[derive(Clone, PartialEq, ::prost::Message)]
829pub struct TimestampType {
830    #[prost(oneof = "timestamp_type::Option", tags = "1, 2")]
831    pub option: ::core::option::Option<timestamp_type::Option>,
832}
833/// Nested message and enum types in `TimestampType`.
834pub mod timestamp_type {
835    #[derive(Clone, PartialEq, ::prost::Oneof)]
836    pub enum Option {
837        #[prost(message, tag = "1")]
838        Relative(super::RelativeTimestamp),
839        #[prost(message, tag = "2")]
840        Absolute(super::AbsoluteTimestamp),
841    }
842}
843#[derive(Clone, PartialEq, ::prost::Message)]
844pub struct RelativeTimestamp {
845    #[prost(string, tag = "1")]
846    pub time_unit: ::prost::alloc::string::String,
847    /// Starting timestamp to use when indexing the file.
848    #[prost(message, optional, tag = "2")]
849    pub offset: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
850}
851#[derive(Clone, PartialEq, ::prost::Message)]
852pub struct AbsoluteTimestamp {
853    #[prost(oneof = "absolute_timestamp::Option", tags = "1, 2, 3")]
854    pub option: ::core::option::Option<absolute_timestamp::Option>,
855}
856/// Nested message and enum types in `AbsoluteTimestamp`.
857pub mod absolute_timestamp {
858    #[derive(Clone, PartialEq, ::prost::Oneof)]
859    pub enum Option {
860        #[prost(message, tag = "1")]
861        Iso8601(super::Iso8601Timestamp),
862        #[prost(message, tag = "2")]
863        EpochOfTimeUnit(super::EpochTimestamp),
864        #[prost(message, tag = "3")]
865        CustomFormat(super::CustomTimestamp),
866    }
867}
868#[derive(Clone, Copy, PartialEq, ::prost::Message)]
869pub struct Iso8601Timestamp {}
870#[derive(Clone, PartialEq, ::prost::Message)]
871pub struct EpochTimestamp {
872    #[prost(string, tag = "1")]
873    pub time_unit: ::prost::alloc::string::String,
874}
875#[derive(Clone, PartialEq, ::prost::Message)]
876pub struct CustomTimestamp {
877    /// The format string should be in the format of the `DateTimeFormatter` class in Java.
878    #[prost(string, tag = "1")]
879    pub format: ::prost::alloc::string::String,
880    /// Default year is accepted as an optional field for cases like IRIG time format.
881    /// Will be overridden by year in time format.
882    #[prost(int32, optional, tag = "2")]
883    pub default_year: ::core::option::Option<i32>,
884    /// Default day of year is accepted as an optional field for cases like IRIG time format.
885    /// Will be overridden by day of year in time format.
886    #[prost(int32, optional, tag = "3")]
887    pub default_day_of_year: ::core::option::Option<i32>,
888}
889/// The user will be prompted to select an existing asset or create a new asset.
890#[derive(Clone, PartialEq, ::prost::Message)]
891pub struct SelectOrCreateAssetStep {
892    /// If present, the AssetRid for this step will be available in outputs under this field ID.
893    #[prost(string, optional, tag = "1")]
894    pub asset_output_field_id: ::core::option::Option<::prost::alloc::string::String>,
895    /// If present, the user will be given the option to create a new asset restricted by these parameters.
896    #[prost(message, optional, tag = "2")]
897    pub create_asset_parameters: ::core::option::Option<
898        select_or_create_asset_step::CreateAssetParameters,
899    >,
900    /// The asset selection options for this step.
901    /// This can be omitted, in which case the asset can be chosen freely from all assets.
902    #[prost(oneof = "select_or_create_asset_step::Options", tags = "3")]
903    pub options: ::core::option::Option<select_or_create_asset_step::Options>,
904}
905/// Nested message and enum types in `SelectOrCreateAssetStep`.
906pub mod select_or_create_asset_step {
907    /// When creating an new asset, the title is always provided by the user and the
908    /// frontend should prompt for it. Other parameters for asset creation can be
909    /// specified here as either user-prompted or preset.
910    #[derive(Clone, PartialEq, ::prost::Message)]
911    pub struct CreateAssetParameters {
912        /// If set, the new asset will be created with this description.
913        #[prost(message, optional, tag = "2")]
914        pub description: ::core::option::Option<
915            create_asset_parameters::DescriptionParameter,
916        >,
917        /// If set, the new asset will be created with these labels.
918        #[prost(message, optional, tag = "3")]
919        pub labels: ::core::option::Option<create_asset_parameters::LabelsParameter>,
920        /// If set, the new asset will be created with these properties.
921        #[prost(message, optional, tag = "4")]
922        pub properties: ::core::option::Option<
923            create_asset_parameters::PropertiesParameter,
924        >,
925        /// Data scopes for the new asset. The keys are the ref names of the data scopes.
926        #[prost(map = "string, message", tag = "5")]
927        pub data_scopes: ::std::collections::HashMap<
928            ::prost::alloc::string::String,
929            create_asset_parameters::DataScopeParameter,
930        >,
931    }
932    /// Nested message and enum types in `CreateAssetParameters`.
933    pub mod create_asset_parameters {
934        #[derive(Clone, PartialEq, ::prost::Message)]
935        pub struct DescriptionParameter {
936            #[prost(oneof = "description_parameter::Option", tags = "1")]
937            pub option: ::core::option::Option<description_parameter::Option>,
938        }
939        /// Nested message and enum types in `DescriptionParameter`.
940        pub mod description_parameter {
941            #[derive(Clone, PartialEq, ::prost::Oneof)]
942            pub enum Option {
943                /// The description is always a constant string.
944                ///
945                /// Can allow for free-form / guardrailed (templated?) user input.
946                #[prost(string, tag = "1")]
947                Constant(::prost::alloc::string::String),
948            }
949        }
950        #[derive(Clone, PartialEq, ::prost::Message)]
951        pub struct LabelsParameter {
952            /// Labels to always apply on the new asset.
953            #[prost(string, repeated, tag = "1")]
954            pub constant: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
955            /// If allowing for user input, the frontend should leverage ResourceMetadataService#listPropertiesAndLabels
956            /// to provide the user with existing labels to choose from.
957            #[prost(message, optional, tag = "2")]
958            pub user_input: ::core::option::Option<labels_parameter::UserInputOptions>,
959        }
960        /// Nested message and enum types in `LabelsParameter`.
961        pub mod labels_parameter {
962            /// Can allow for more configuration - e.g. default set of starting labels? (which can be overrideen)
963            #[derive(Clone, Copy, PartialEq, ::prost::Message)]
964            pub struct UserInputOptions {}
965        }
966        #[derive(Clone, PartialEq, ::prost::Message)]
967        pub struct PropertiesParameter {
968            /// Properties to always apply on the new asset.
969            #[prost(map = "string, string", tag = "1")]
970            pub constant: ::std::collections::HashMap<
971                ::prost::alloc::string::String,
972                ::prost::alloc::string::String,
973            >,
974            /// If allowing for user input, the frontend should leverage ResourceMetadataService#listPropertiesAndLabels
975            /// to provide the user with existing property keys/values to choose from.
976            #[prost(message, optional, tag = "2")]
977            pub user_input: ::core::option::Option<
978                properties_parameter::UserInputOptions,
979            >,
980        }
981        /// Nested message and enum types in `PropertiesParameter`.
982        pub mod properties_parameter {
983            #[derive(Clone, PartialEq, ::prost::Message)]
984            pub struct UserInputOptions {
985                /// Each property key here must have a value provided by the user for asset creation.
986                #[prost(string, repeated, tag = "1")]
987                pub required_keys: ::prost::alloc::vec::Vec<
988                    ::prost::alloc::string::String,
989                >,
990                /// Each property key here will be suggested to the user but is not required for asset creation
991                ///
992                /// Can allow for more configuration - e.g. required k-v pairs, default k-v pairs?
993                #[prost(string, repeated, tag = "2")]
994                pub suggested_keys: ::prost::alloc::vec::Vec<
995                    ::prost::alloc::string::String,
996                >,
997            }
998        }
999        #[derive(Clone, PartialEq, ::prost::Message)]
1000        pub struct DataScopeParameter {
1001            #[prost(message, optional, tag = "21")]
1002            pub series_tags: ::core::option::Option<super::super::TagsParameter>,
1003            #[prost(oneof = "data_scope_parameter::DataSource", tags = "1, 2")]
1004            pub data_source: ::core::option::Option<data_scope_parameter::DataSource>,
1005        }
1006        /// Nested message and enum types in `DataScopeParameter`.
1007        pub mod data_scope_parameter {
1008            /// The Dataset will be automatically named "{asset}-{ref_name}".
1009            /// Can later allow for this to be specified.
1010            /// Other CreateDataset options exist but are omitted for now
1011            #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1012            pub struct NewDataset {}
1013            #[derive(Clone, PartialEq, ::prost::Message)]
1014            pub struct ExistingDataset {
1015                /// The dataset options for this field.
1016                /// This can be omitted, in which case the dataset can be chosen freely.
1017                #[prost(oneof = "existing_dataset::Options", tags = "1")]
1018                pub options: ::core::option::Option<existing_dataset::Options>,
1019            }
1020            /// Nested message and enum types in `ExistingDataset`.
1021            pub mod existing_dataset {
1022                /// The dataset options for this field.
1023                /// This can be omitted, in which case the dataset can be chosen freely.
1024                #[derive(Clone, PartialEq, ::prost::Oneof)]
1025                pub enum Options {
1026                    /// The dataset must be chosen from preset options.
1027                    #[prost(message, tag = "1")]
1028                    PresetOptions(super::super::super::super::PresetDatasetFieldOptions),
1029                }
1030            }
1031            #[derive(Clone, PartialEq, ::prost::Oneof)]
1032            pub enum DataSource {
1033                /// Creates a new empty dataset.
1034                #[prost(message, tag = "1")]
1035                NewDataset(NewDataset),
1036                /// Use existing dataset
1037                #[prost(message, tag = "2")]
1038                ExistingDataset(ExistingDataset),
1039            }
1040        }
1041    }
1042    /// The asset selection options for this step.
1043    /// This can be omitted, in which case the asset can be chosen freely from all assets.
1044    #[derive(Clone, PartialEq, ::prost::Oneof)]
1045    pub enum Options {
1046        /// The asset must be chosen from preset options.
1047        ///
1048        /// The asset must be chosen from a saved view.
1049        /// SavedViewRid saved_view = 4;
1050        #[prost(message, tag = "3")]
1051        PresetOptions(super::PresetAssetFieldOptions),
1052    }
1053}
1054/// A limited set of options to choose from, with an optional default option.
1055#[derive(Clone, PartialEq, ::prost::Message)]
1056pub struct PresetDatasetFieldOptions {
1057    /// The list of options to choose from.
1058    #[prost(message, repeated, tag = "1")]
1059    pub options: ::prost::alloc::vec::Vec<DatasetReference>,
1060    /// If set, this option will be selected by default, if it is present in the options.
1061    /// The user can still select a different option.
1062    #[prost(message, optional, tag = "2")]
1063    pub default_option: ::core::option::Option<DatasetReference>,
1064}
1065/// A reference to a single dataset
1066#[derive(Clone, PartialEq, ::prost::Message)]
1067pub struct DatasetReference {
1068    #[prost(oneof = "dataset_reference::Option", tags = "1, 2")]
1069    pub option: ::core::option::Option<dataset_reference::Option>,
1070}
1071/// Nested message and enum types in `DatasetReference`.
1072pub mod dataset_reference {
1073    #[derive(Clone, PartialEq, ::prost::Oneof)]
1074    pub enum Option {
1075        /// a constant DatasetRid
1076        #[prost(string, tag = "1")]
1077        Rid(::prost::alloc::string::String),
1078        /// The field reference that will contain a DatasetRid value. The execution will fail if the field is not set
1079        /// but the value is accessed.
1080        #[prost(string, tag = "2")]
1081        FieldId(::prost::alloc::string::String),
1082    }
1083}
1084#[derive(Clone, PartialEq, ::prost::Message)]
1085pub struct TagsParameter {
1086    /// Tags to always filter to on the dataset or asset data scope.
1087    #[prost(map = "string, string", tag = "1")]
1088    pub constant: ::std::collections::HashMap<
1089        ::prost::alloc::string::String,
1090        ::prost::alloc::string::String,
1091    >,
1092    /// If allowing for user input, the frontend should leverage DataSourceService#getAvailableTagKeys/Values
1093    /// to provide the user with existing series tag keys/values to choose from.
1094    #[prost(message, optional, tag = "2")]
1095    pub user_input: ::core::option::Option<tags_parameter::UserInputOptions>,
1096}
1097/// Nested message and enum types in `TagsParameter`.
1098pub mod tags_parameter {
1099    #[derive(Clone, PartialEq, ::prost::Message)]
1100    pub struct UserInputOptions {
1101        /// Each tag key here must have a value provided by the user
1102        #[prost(string, repeated, tag = "1")]
1103        pub required_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1104        /// Each tag key here will be suggested to the user but is not required
1105        ///
1106        /// Can allow for more configuration - e.g. required k-v pairs, default k-v pairs?
1107        #[prost(string, repeated, tag = "2")]
1108        pub suggested_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1109    }
1110}
1111/// A reference to multiple string values
1112#[derive(Clone, PartialEq, ::prost::Message)]
1113pub struct MultiStringReference {
1114    #[prost(oneof = "multi_string_reference::Option", tags = "1")]
1115    pub option: ::core::option::Option<multi_string_reference::Option>,
1116}
1117/// Nested message and enum types in `MultiStringReference`.
1118pub mod multi_string_reference {
1119    #[derive(Clone, PartialEq, ::prost::Oneof)]
1120    pub enum Option {
1121        /// The value is taken from a field in the current or previous steps.
1122        #[prost(string, tag = "1")]
1123        FieldId(::prost::alloc::string::String),
1124    }
1125}
1126/// A reference to a single string value
1127#[derive(Clone, PartialEq, ::prost::Message)]
1128pub struct StringReference {
1129    #[prost(oneof = "string_reference::Option", tags = "1, 2")]
1130    pub option: ::core::option::Option<string_reference::Option>,
1131}
1132/// Nested message and enum types in `StringReference`.
1133pub mod string_reference {
1134    #[derive(Clone, PartialEq, ::prost::Oneof)]
1135    pub enum Option {
1136        /// The value is a constant string
1137        #[prost(string, tag = "1")]
1138        Constant(::prost::alloc::string::String),
1139        /// The value is taken from a field in the current or previous steps.
1140        ///
1141        /// TODO(WB-1728): support string templating.
1142        /// string template = 3;
1143        #[prost(string, tag = "2")]
1144        FieldId(::prost::alloc::string::String),
1145    }
1146}
1147/// A reference to multiple assets
1148#[derive(Clone, PartialEq, ::prost::Message)]
1149pub struct MultiAssetReference {
1150    #[prost(oneof = "multi_asset_reference::Option", tags = "1")]
1151    pub option: ::core::option::Option<multi_asset_reference::Option>,
1152}
1153/// Nested message and enum types in `MultiAssetReference`.
1154pub mod multi_asset_reference {
1155    #[derive(Clone, PartialEq, ::prost::Message)]
1156    pub struct AssetReferenceList {
1157        #[prost(message, repeated, tag = "1")]
1158        pub references: ::prost::alloc::vec::Vec<super::AssetReference>,
1159    }
1160    #[derive(Clone, PartialEq, ::prost::Oneof)]
1161    pub enum Option {
1162        /// TODO: add support for a field that contains a list of asset RIDs
1163        #[prost(message, tag = "1")]
1164        List(AssetReferenceList),
1165    }
1166}
1167/// A reference to a single asset
1168#[derive(Clone, PartialEq, ::prost::Message)]
1169pub struct AssetReference {
1170    #[prost(oneof = "asset_reference::Option", tags = "1, 2")]
1171    pub option: ::core::option::Option<asset_reference::Option>,
1172}
1173/// Nested message and enum types in `AssetReference`.
1174pub mod asset_reference {
1175    #[derive(Clone, PartialEq, ::prost::Oneof)]
1176    pub enum Option {
1177        /// a constant AssetRid
1178        #[prost(string, tag = "1")]
1179        Rid(::prost::alloc::string::String),
1180        /// The field reference that will contain an AssetRid value. The execution will fail if the field is not set
1181        /// but the value is accessed.
1182        #[prost(string, tag = "2")]
1183        FieldId(::prost::alloc::string::String),
1184    }
1185}
1186/// A reference to a time range
1187#[derive(Clone, PartialEq, ::prost::Message)]
1188pub struct TimeRangeReference {
1189    #[prost(oneof = "time_range_reference::Option", tags = "1")]
1190    pub option: ::core::option::Option<time_range_reference::Option>,
1191}
1192/// Nested message and enum types in `TimeRangeReference`.
1193pub mod time_range_reference {
1194    #[derive(Clone, PartialEq, ::prost::Message)]
1195    pub struct IngestJobList {
1196        /// Field ids that contain IngestJobRids.
1197        #[prost(string, repeated, tag = "1")]
1198        pub field_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1199    }
1200    #[derive(Clone, PartialEq, ::prost::Oneof)]
1201    pub enum Option {
1202        /// The time range is the union of the time ranges ingested by all the specified ingest jobs.
1203        #[prost(message, tag = "1")]
1204        FromIngestJobs(IngestJobList),
1205    }
1206}
1207/// A reference to multiple runs
1208#[derive(Clone, PartialEq, ::prost::Message)]
1209pub struct MultiRunReference {
1210    #[prost(oneof = "multi_run_reference::Option", tags = "1")]
1211    pub option: ::core::option::Option<multi_run_reference::Option>,
1212}
1213/// Nested message and enum types in `MultiRunReference`.
1214pub mod multi_run_reference {
1215    #[derive(Clone, PartialEq, ::prost::Message)]
1216    pub struct RunReferenceList {
1217        #[prost(message, repeated, tag = "1")]
1218        pub references: ::prost::alloc::vec::Vec<super::RunReference>,
1219    }
1220    #[derive(Clone, PartialEq, ::prost::Oneof)]
1221    pub enum Option {
1222        /// TODO: add support for a field that contains a list of run RIDs
1223        #[prost(message, tag = "1")]
1224        List(RunReferenceList),
1225    }
1226}
1227/// A reference to a single run
1228#[derive(Clone, PartialEq, ::prost::Message)]
1229pub struct RunReference {
1230    #[prost(oneof = "run_reference::Option", tags = "1")]
1231    pub option: ::core::option::Option<run_reference::Option>,
1232}
1233/// Nested message and enum types in `RunReference`.
1234pub mod run_reference {
1235    #[derive(Clone, PartialEq, ::prost::Oneof)]
1236    pub enum Option {
1237        /// The field id that will contain a RunRid value. The execution will fail if the field is not set properly.
1238        #[prost(string, tag = "1")]
1239        FieldId(::prost::alloc::string::String),
1240    }
1241}
1242/// A reference to multiple workbook templates
1243#[derive(Clone, PartialEq, ::prost::Message)]
1244pub struct MultiWorkbookTemplateReference {
1245    #[prost(oneof = "multi_workbook_template_reference::Option", tags = "1")]
1246    pub option: ::core::option::Option<multi_workbook_template_reference::Option>,
1247}
1248/// Nested message and enum types in `MultiWorkbookTemplateReference`.
1249pub mod multi_workbook_template_reference {
1250    #[derive(Clone, PartialEq, ::prost::Message)]
1251    pub struct WorkbookTemplateReferenceList {
1252        #[prost(message, repeated, tag = "1")]
1253        pub references: ::prost::alloc::vec::Vec<super::WorkbookTemplateReference>,
1254    }
1255    #[derive(Clone, PartialEq, ::prost::Oneof)]
1256    pub enum Option {
1257        /// TODO: add support for a field that contains a list of workbook template RIDs
1258        #[prost(message, tag = "1")]
1259        List(WorkbookTemplateReferenceList),
1260    }
1261}
1262/// A reference to a single workbook template
1263#[derive(Clone, PartialEq, ::prost::Message)]
1264pub struct WorkbookTemplateReference {
1265    #[prost(oneof = "workbook_template_reference::Option", tags = "1")]
1266    pub option: ::core::option::Option<workbook_template_reference::Option>,
1267}
1268/// Nested message and enum types in `WorkbookTemplateReference`.
1269pub mod workbook_template_reference {
1270    #[derive(Clone, PartialEq, ::prost::Oneof)]
1271    pub enum Option {
1272        /// A constant workbook template RID.
1273        ///
1274        /// string field_id = 2;
1275        #[prost(string, tag = "1")]
1276        Rid(::prost::alloc::string::String),
1277    }
1278}
1279/// A reference to multiple checklists
1280#[derive(Clone, PartialEq, ::prost::Message)]
1281pub struct MultiChecklistReference {
1282    #[prost(oneof = "multi_checklist_reference::Option", tags = "1")]
1283    pub option: ::core::option::Option<multi_checklist_reference::Option>,
1284}
1285/// Nested message and enum types in `MultiChecklistReference`.
1286pub mod multi_checklist_reference {
1287    #[derive(Clone, PartialEq, ::prost::Message)]
1288    pub struct ChecklistReferenceList {
1289        #[prost(message, repeated, tag = "1")]
1290        pub references: ::prost::alloc::vec::Vec<super::ChecklistReference>,
1291    }
1292    #[derive(Clone, PartialEq, ::prost::Oneof)]
1293    pub enum Option {
1294        /// TODO: add support for a field that contains a list of checklist RIDs
1295        #[prost(message, tag = "1")]
1296        List(ChecklistReferenceList),
1297    }
1298}
1299/// A reference to a single checklist
1300#[derive(Clone, PartialEq, ::prost::Message)]
1301pub struct ChecklistReference {
1302    #[prost(oneof = "checklist_reference::Option", tags = "1")]
1303    pub option: ::core::option::Option<checklist_reference::Option>,
1304}
1305/// Nested message and enum types in `ChecklistReference`.
1306pub mod checklist_reference {
1307    #[derive(Clone, PartialEq, ::prost::Oneof)]
1308    pub enum Option {
1309        /// A constant checklist RID.
1310        ///
1311        /// string field_id = 2;
1312        #[prost(string, tag = "1")]
1313        Rid(::prost::alloc::string::String),
1314    }
1315}
1316/// A reference to multiple notification Integrations
1317#[derive(Clone, PartialEq, ::prost::Message)]
1318pub struct MultiIntegrationReference {
1319    #[prost(oneof = "multi_integration_reference::Option", tags = "1")]
1320    pub option: ::core::option::Option<multi_integration_reference::Option>,
1321}
1322/// Nested message and enum types in `MultiIntegrationReference`.
1323pub mod multi_integration_reference {
1324    #[derive(Clone, PartialEq, ::prost::Message)]
1325    pub struct IntegrationReferenceList {
1326        #[prost(message, repeated, tag = "1")]
1327        pub references: ::prost::alloc::vec::Vec<super::IntegrationReference>,
1328    }
1329    #[derive(Clone, PartialEq, ::prost::Oneof)]
1330    pub enum Option {
1331        #[prost(message, tag = "1")]
1332        List(IntegrationReferenceList),
1333    }
1334}
1335/// A reference to a notification Integration
1336#[derive(Clone, PartialEq, ::prost::Message)]
1337pub struct IntegrationReference {
1338    #[prost(oneof = "integration_reference::Option", tags = "1")]
1339    pub option: ::core::option::Option<integration_reference::Option>,
1340}
1341/// Nested message and enum types in `IntegrationReference`.
1342pub mod integration_reference {
1343    #[derive(Clone, PartialEq, ::prost::Oneof)]
1344    pub enum Option {
1345        /// A constant integration RID.
1346        ///
1347        /// string field_id = 2;
1348        #[prost(string, tag = "1")]
1349        Rid(::prost::alloc::string::String),
1350    }
1351}
1352/// A field to be filled out by the user.
1353#[derive(Clone, PartialEq, ::prost::Message)]
1354pub struct FormField {
1355    /// This field's id can be used by downstream steps to refer to the value.
1356    #[prost(string, tag = "1")]
1357    pub id: ::prost::alloc::string::String,
1358    /// UI label for the field component. Overrides any label defined in the specific FormField type.
1359    #[prost(string, optional, tag = "11")]
1360    pub label: ::core::option::Option<::prost::alloc::string::String>,
1361    /// Help text describing how to use this input field.
1362    #[prost(string, optional, tag = "12")]
1363    pub description: ::core::option::Option<::prost::alloc::string::String>,
1364    #[prost(oneof = "form_field::Field", tags = "2, 3, 4, 5, 6, 7, 8, 9, 10")]
1365    pub field: ::core::option::Option<form_field::Field>,
1366}
1367/// Nested message and enum types in `FormField`.
1368pub mod form_field {
1369    #[derive(Clone, PartialEq, ::prost::Oneof)]
1370    pub enum Field {
1371        #[prost(message, tag = "2")]
1372        Asset(super::AssetField),
1373        #[prost(message, tag = "3")]
1374        Checkbox(super::CheckboxField),
1375        #[prost(message, tag = "4")]
1376        Text(super::TextField),
1377        #[prost(message, tag = "5")]
1378        Int(super::IntField),
1379        #[prost(message, tag = "6")]
1380        Double(super::DoubleField),
1381        #[prost(message, tag = "7")]
1382        SingleEnum(super::SingleEnumField),
1383        #[prost(message, tag = "8")]
1384        MultiEnum(super::MultiEnumField),
1385        #[prost(message, tag = "9")]
1386        FileUpload(super::FileUploadField),
1387        #[prost(message, tag = "10")]
1388        MultiFileUpload(super::MultiFileUploadField),
1389    }
1390}
1391/// A limited set of options to choose from, with an optional default option.
1392#[derive(Clone, PartialEq, ::prost::Message)]
1393pub struct PresetAssetFieldOptions {
1394    /// The list of options to choose from.
1395    #[prost(message, repeated, tag = "1")]
1396    pub options: ::prost::alloc::vec::Vec<AssetReference>,
1397    /// If set, this option will be selected by default, if it is present in the options.
1398    /// The user can still select a different option.
1399    #[prost(message, optional, tag = "2")]
1400    pub default_option: ::core::option::Option<AssetReference>,
1401}
1402/// A field to select a single asset.
1403#[derive(Clone, PartialEq, ::prost::Message)]
1404pub struct AssetField {
1405    /// Helper text to guide selection of the asset
1406    /// deprecated in favor of label directly on FormField
1407    #[prost(string, tag = "1")]
1408    pub label: ::prost::alloc::string::String,
1409    /// Whether this field is required to be set complete the step.
1410    #[prost(bool, tag = "2")]
1411    pub is_required: bool,
1412    /// The asset options for this field.
1413    /// This can be omitted, in which case the asset can be chosen freely from all assets.
1414    #[prost(oneof = "asset_field::Options", tags = "3")]
1415    pub options: ::core::option::Option<asset_field::Options>,
1416}
1417/// Nested message and enum types in `AssetField`.
1418pub mod asset_field {
1419    /// The asset options for this field.
1420    /// This can be omitted, in which case the asset can be chosen freely from all assets.
1421    #[derive(Clone, PartialEq, ::prost::Oneof)]
1422    pub enum Options {
1423        /// The asset must be chosen from a saved view.
1424        /// SavedViewRid saved_view = 5;
1425        /// TODO(pchen): do we want to provide single string types from AssetFieldOption to simplify the Nested
1426        /// or do we want to explicitly modify the types Nested spec uses?
1427        #[prost(message, tag = "3")]
1428        PresetOptions(super::PresetAssetFieldOptions),
1429    }
1430}
1431/// A field to capture a boolean value.
1432#[derive(Clone, PartialEq, ::prost::Message)]
1433pub struct CheckboxField {
1434    /// Label to show for this checkbox field
1435    /// deprecated in favor of label directly on FormField
1436    #[prost(string, tag = "1")]
1437    pub label: ::prost::alloc::string::String,
1438    /// If set, the checkbox value must be checked (`true`) to complete the step.
1439    #[prost(bool, tag = "2")]
1440    pub is_required: bool,
1441}
1442#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1443pub struct TextFieldSimpleInputType {}
1444#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1445pub struct TextFieldMarkdownInputType {}
1446/// A field to capture a string value.
1447#[derive(Clone, PartialEq, ::prost::Message)]
1448pub struct TextField {
1449    /// Label to show for this text field
1450    /// deprecated in favor of label directly on FormField
1451    #[prost(string, tag = "1")]
1452    pub label: ::prost::alloc::string::String,
1453    /// if set, validate that input is at least this many characters
1454    /// `is_required` can be achieved by setting `min_length >= 1`
1455    #[prost(uint32, optional, tag = "4")]
1456    pub min_length: ::core::option::Option<u32>,
1457    /// if set, validate that input is at most this many characters
1458    #[prost(uint32, optional, tag = "5")]
1459    pub max_length: ::core::option::Option<u32>,
1460    /// type of form input to render. Defaults to SIMPLE.
1461    #[prost(oneof = "text_field::InputType", tags = "2, 3")]
1462    pub input_type: ::core::option::Option<text_field::InputType>,
1463}
1464/// Nested message and enum types in `TextField`.
1465pub mod text_field {
1466    /// type of form input to render. Defaults to SIMPLE.
1467    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1468    pub enum InputType {
1469        /// renders a simple html text input field
1470        #[prost(message, tag = "2")]
1471        Simple(super::TextFieldSimpleInputType),
1472        /// renders a Markdown editor for longer inputs with formatting capabilities
1473        #[prost(message, tag = "3")]
1474        Markdown(super::TextFieldMarkdownInputType),
1475    }
1476}
1477/// A field to capture an int value.
1478#[derive(Clone, PartialEq, ::prost::Message)]
1479pub struct IntField {
1480    /// Label to show for this int field
1481    /// deprecated in favor of label directly on FormField
1482    #[prost(string, tag = "1")]
1483    pub label: ::prost::alloc::string::String,
1484    /// Whether this field is required to be set complete the step.
1485    #[prost(bool, tag = "2")]
1486    pub is_required: bool,
1487    /// if set, validate that input is at least this value
1488    #[prost(int64, optional, tag = "3")]
1489    pub gte_value: ::core::option::Option<i64>,
1490    /// if set, validate that input is at most this value
1491    #[prost(int64, optional, tag = "4")]
1492    pub lte_value: ::core::option::Option<i64>,
1493}
1494/// A field to capture a double value.
1495#[derive(Clone, PartialEq, ::prost::Message)]
1496pub struct DoubleField {
1497    /// Label to show for this double field
1498    /// deprecated in favor of label directly on FormField
1499    #[prost(string, tag = "1")]
1500    pub label: ::prost::alloc::string::String,
1501    /// Whether this field is required to be set complete the step.
1502    #[prost(bool, tag = "2")]
1503    pub is_required: bool,
1504    /// if set, a validation on the lower bound of the input value
1505    #[prost(oneof = "double_field::LowerBound", tags = "3, 4")]
1506    pub lower_bound: ::core::option::Option<double_field::LowerBound>,
1507    /// if set, a validation on the upper bound of the input value
1508    #[prost(oneof = "double_field::UpperBound", tags = "5, 6")]
1509    pub upper_bound: ::core::option::Option<double_field::UpperBound>,
1510}
1511/// Nested message and enum types in `DoubleField`.
1512pub mod double_field {
1513    /// if set, a validation on the lower bound of the input value
1514    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1515    pub enum LowerBound {
1516        /// greater than
1517        #[prost(double, tag = "3")]
1518        GtValue(f64),
1519        /// greater than or equal to
1520        #[prost(double, tag = "4")]
1521        GteValue(f64),
1522    }
1523    /// if set, a validation on the upper bound of the input value
1524    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1525    pub enum UpperBound {
1526        /// less than
1527        #[prost(double, tag = "5")]
1528        LtValue(f64),
1529        /// less than or equal to
1530        #[prost(double, tag = "6")]
1531        LteValue(f64),
1532    }
1533}
1534#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1535pub struct EnumFieldButtonsInputType {}
1536#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1537pub struct EnumFieldMenuInputType {}
1538/// A field to capture one of several options.
1539#[derive(Clone, PartialEq, ::prost::Message)]
1540pub struct SingleEnumField {
1541    /// Label to show for this options field
1542    /// deprecated in favor of label directly on FormField
1543    #[prost(string, tag = "1")]
1544    pub label: ::prost::alloc::string::String,
1545    /// List of predefined options that can be selected by the user
1546    #[prost(string, repeated, tag = "2")]
1547    pub options: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1548    /// Whether a user can create and specify a new custom option not in the list of options.
1549    #[prost(bool, tag = "5")]
1550    pub allow_custom: bool,
1551    /// Whether a selection is required
1552    #[prost(bool, tag = "6")]
1553    pub is_required: bool,
1554    /// type of form input to render.
1555    #[prost(oneof = "single_enum_field::InputType", tags = "3, 4")]
1556    pub input_type: ::core::option::Option<single_enum_field::InputType>,
1557}
1558/// Nested message and enum types in `SingleEnumField`.
1559pub mod single_enum_field {
1560    /// type of form input to render.
1561    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1562    pub enum InputType {
1563        /// renders a radio button component
1564        #[prost(message, tag = "3")]
1565        Buttons(super::EnumFieldButtonsInputType),
1566        /// renders a typical drop down menu
1567        #[prost(message, tag = "4")]
1568        Dropdown(super::EnumFieldMenuInputType),
1569    }
1570}
1571/// A field to capture one or more of several options.
1572#[derive(Clone, PartialEq, ::prost::Message)]
1573pub struct MultiEnumField {
1574    /// Label to show for this options field
1575    /// deprecated in favor of label directly on FormField
1576    #[prost(string, tag = "1")]
1577    pub label: ::prost::alloc::string::String,
1578    /// List of predefined options that can be selected by the user
1579    #[prost(string, repeated, tag = "2")]
1580    pub options: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1581    /// Whether a user can create and specify a new custom option not in the list of options.
1582    #[prost(bool, tag = "6")]
1583    pub allow_custom: bool,
1584    /// If set, the user must select at least this many options
1585    /// `is_required` behavior can be achieved by setting `min_count` = 1
1586    #[prost(uint32, optional, tag = "7")]
1587    pub min_count: ::core::option::Option<u32>,
1588    /// If set, the user can select at most this many options
1589    #[prost(uint32, optional, tag = "8")]
1590    pub max_count: ::core::option::Option<u32>,
1591    /// type of form input to render.
1592    #[prost(oneof = "multi_enum_field::InputType", tags = "3, 4")]
1593    pub input_type: ::core::option::Option<multi_enum_field::InputType>,
1594}
1595/// Nested message and enum types in `MultiEnumField`.
1596pub mod multi_enum_field {
1597    /// type of form input to render.
1598    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1599    pub enum InputType {
1600        /// renders a collection of checkboxes
1601        #[prost(message, tag = "3")]
1602        Buttons(super::EnumFieldButtonsInputType),
1603        /// renders a typical drop down menu
1604        #[prost(message, tag = "4")]
1605        Dropdown(super::EnumFieldMenuInputType),
1606    }
1607}
1608/// A field to process the uploading of a file
1609#[derive(Clone, PartialEq, ::prost::Message)]
1610pub struct FileUploadField {
1611    /// If a file is required
1612    #[prost(bool, tag = "1")]
1613    pub is_required: bool,
1614    /// Optional list of case insensitive suffixes to filter files. (ie "csv", "parquet", or "json")
1615    #[prost(string, repeated, tag = "2")]
1616    pub suffix_filters: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1617}
1618/// A field to process the uploading of a dynamic set of files
1619#[derive(Clone, PartialEq, ::prost::Message)]
1620pub struct MultiFileUploadField {
1621    /// Count of required files
1622    #[prost(uint32, optional, tag = "1")]
1623    pub min_count: ::core::option::Option<u32>,
1624    /// File count limit
1625    #[prost(uint32, optional, tag = "2")]
1626    pub max_count: ::core::option::Option<u32>,
1627    /// Optional list of case insensitive suffixes to filter files. (ie "csv", "parquet", or "json")
1628    #[prost(string, repeated, tag = "3")]
1629    pub suffix_filters: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1630}
1631/// Metadata about a procedure that is not part of the versioned state.
1632#[derive(Clone, PartialEq, ::prost::Message)]
1633pub struct ProcedureMetadata {
1634    #[prost(string, tag = "1")]
1635    pub rid: ::prost::alloc::string::String,
1636    #[prost(string, tag = "2")]
1637    pub title: ::prost::alloc::string::String,
1638    #[prost(string, optional, tag = "3")]
1639    pub description: ::core::option::Option<::prost::alloc::string::String>,
1640    #[prost(string, repeated, tag = "4")]
1641    pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1642    #[prost(map = "string, string", tag = "5")]
1643    pub properties: ::std::collections::HashMap<
1644        ::prost::alloc::string::String,
1645        ::prost::alloc::string::String,
1646    >,
1647    #[prost(bool, tag = "6")]
1648    pub is_archived: bool,
1649    #[prost(bool, tag = "7")]
1650    pub is_published: bool,
1651    #[prost(message, optional, tag = "8")]
1652    pub created_at: ::core::option::Option<
1653        super::super::super::google::protobuf::Timestamp,
1654    >,
1655    #[prost(string, tag = "9")]
1656    pub created_by: ::prost::alloc::string::String,
1657    #[prost(message, optional, tag = "10")]
1658    pub updated_at: ::core::option::Option<
1659        super::super::super::google::protobuf::Timestamp,
1660    >,
1661    #[prost(string, tag = "11")]
1662    pub updated_by: ::prost::alloc::string::String,
1663    #[prost(string, tag = "12")]
1664    pub workspace: ::prost::alloc::string::String,
1665}
1666/// A procedure describes a series of steps to be performed, typically in a specific order,
1667#[derive(Clone, PartialEq, ::prost::Message)]
1668pub struct Procedure {
1669    /// The RID of the procedure.
1670    #[prost(string, tag = "1")]
1671    pub rid: ::prost::alloc::string::String,
1672    /// The commit ID of this version of the procedure.
1673    #[prost(string, tag = "2")]
1674    pub commit: ::prost::alloc::string::String,
1675    /// Metadata about the procedure.
1676    #[prost(message, optional, tag = "3")]
1677    pub metadata: ::core::option::Option<ProcedureMetadata>,
1678    /// The versioned state of the procedure.
1679    #[prost(message, optional, tag = "4")]
1680    pub state: ::core::option::Option<ProcedureState>,
1681}
1682#[derive(Clone, PartialEq, ::prost::Message)]
1683pub struct CreateProcedureRequest {
1684    #[prost(string, tag = "1")]
1685    pub title: ::prost::alloc::string::String,
1686    #[prost(string, optional, tag = "2")]
1687    pub description: ::core::option::Option<::prost::alloc::string::String>,
1688    #[prost(string, repeated, tag = "3")]
1689    pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1690    #[prost(map = "string, string", tag = "4")]
1691    pub properties: ::std::collections::HashMap<
1692        ::prost::alloc::string::String,
1693        ::prost::alloc::string::String,
1694    >,
1695    #[prost(message, optional, tag = "5")]
1696    pub state: ::core::option::Option<ProcedureState>,
1697    #[prost(bool, optional, tag = "6")]
1698    pub is_published: ::core::option::Option<bool>,
1699    #[prost(string, tag = "7")]
1700    pub workspace: ::prost::alloc::string::String,
1701    #[prost(string, tag = "8")]
1702    pub commit_message: ::prost::alloc::string::String,
1703    #[prost(string, optional, tag = "9")]
1704    pub initial_branch_name: ::core::option::Option<::prost::alloc::string::String>,
1705}
1706#[derive(Clone, PartialEq, ::prost::Message)]
1707pub struct CreateProcedureResponse {
1708    #[prost(message, optional, tag = "1")]
1709    pub procedure: ::core::option::Option<Procedure>,
1710    #[prost(string, optional, tag = "2")]
1711    pub branch_name: ::core::option::Option<::prost::alloc::string::String>,
1712}
1713#[derive(Clone, PartialEq, ::prost::Message)]
1714pub struct GetProcedureRequest {
1715    #[prost(string, tag = "1")]
1716    pub rid: ::prost::alloc::string::String,
1717    #[prost(message, optional, tag = "2")]
1718    pub branch_or_commit: ::core::option::Option<
1719        super::super::versioning::v1::BranchOrCommit,
1720    >,
1721    /// If true, the display graph will be included in the response.
1722    /// Default is false.
1723    #[prost(bool, tag = "3")]
1724    pub include_display_graph: bool,
1725}
1726#[derive(Clone, PartialEq, ::prost::Message)]
1727pub struct GetProcedureResponse {
1728    #[prost(message, optional, tag = "1")]
1729    pub procedure: ::core::option::Option<Procedure>,
1730    /// Included if include_display_graph was set to true
1731    #[prost(message, optional, tag = "2")]
1732    pub display_graph: ::core::option::Option<ProcedureDisplayGraph>,
1733}
1734#[derive(Clone, PartialEq, ::prost::Message)]
1735pub struct BatchGetProcedureMetadataRequest {
1736    #[prost(string, repeated, tag = "1")]
1737    pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1738}
1739#[derive(Clone, PartialEq, ::prost::Message)]
1740pub struct BatchGetProcedureMetadataResponse {
1741    #[prost(message, repeated, tag = "1")]
1742    pub procedure_metadatas: ::prost::alloc::vec::Vec<ProcedureMetadata>,
1743}
1744#[derive(Clone, PartialEq, ::prost::Message)]
1745pub struct UpdateProcedureMetadataRequest {
1746    #[prost(string, tag = "1")]
1747    pub rid: ::prost::alloc::string::String,
1748    #[prost(string, optional, tag = "2")]
1749    pub title: ::core::option::Option<::prost::alloc::string::String>,
1750    #[prost(string, optional, tag = "3")]
1751    pub description: ::core::option::Option<::prost::alloc::string::String>,
1752    #[prost(message, optional, tag = "4")]
1753    pub labels: ::core::option::Option<super::super::types::LabelUpdateWrapper>,
1754    #[prost(message, optional, tag = "5")]
1755    pub properties: ::core::option::Option<super::super::types::PropertyUpdateWrapper>,
1756    #[prost(bool, optional, tag = "6")]
1757    pub is_archived: ::core::option::Option<bool>,
1758    #[prost(bool, optional, tag = "7")]
1759    pub is_published: ::core::option::Option<bool>,
1760}
1761#[derive(Clone, PartialEq, ::prost::Message)]
1762pub struct UpdateProcedureMetadataResponse {
1763    #[prost(message, optional, tag = "1")]
1764    pub procedure_metadata: ::core::option::Option<ProcedureMetadata>,
1765}
1766#[derive(Clone, PartialEq, ::prost::Message)]
1767pub struct ParseNestedProcedureRequest {
1768    #[prost(message, optional, tag = "1")]
1769    pub nested_procedure: ::core::option::Option<NestedProcedure>,
1770    /// If true, the display graph will be included in the response.
1771    /// Default is false.
1772    #[prost(bool, tag = "3")]
1773    pub include_display_graph: bool,
1774}
1775#[derive(Clone, PartialEq, ::prost::Message)]
1776pub struct ParseNestedProcedureResponse {
1777    #[prost(message, optional, tag = "1")]
1778    pub procedure: ::core::option::Option<Procedure>,
1779    /// Included if include_display_graph was set to true
1780    #[prost(message, optional, tag = "2")]
1781    pub display_graph: ::core::option::Option<ProcedureDisplayGraph>,
1782}
1783#[derive(Clone, PartialEq, ::prost::Message)]
1784pub struct GetProcedureAsNestedRequest {
1785    #[prost(string, tag = "1")]
1786    pub rid: ::prost::alloc::string::String,
1787    #[prost(message, optional, tag = "2")]
1788    pub branch_or_commit: ::core::option::Option<
1789        super::super::versioning::v1::BranchOrCommit,
1790    >,
1791}
1792#[derive(Clone, PartialEq, ::prost::Message)]
1793pub struct GetProcedureAsNestedResponse {
1794    #[prost(message, optional, tag = "1")]
1795    pub nested_procedure: ::core::option::Option<NestedProcedure>,
1796}
1797#[derive(Clone, PartialEq, ::prost::Message)]
1798pub struct MergeToMainRequest {
1799    #[prost(string, tag = "1")]
1800    pub rid: ::prost::alloc::string::String,
1801    #[prost(string, tag = "2")]
1802    pub branch: ::prost::alloc::string::String,
1803    /// If present, this commit ID must match the latest commit on main for the merge to succeed.
1804    #[prost(string, optional, tag = "3")]
1805    pub latest_commit_on_main: ::core::option::Option<::prost::alloc::string::String>,
1806    #[prost(string, tag = "4")]
1807    pub message: ::prost::alloc::string::String,
1808}
1809#[derive(Clone, PartialEq, ::prost::Message)]
1810pub struct MergeToMainResponse {
1811    #[prost(message, optional, tag = "1")]
1812    pub procedure: ::core::option::Option<Procedure>,
1813}
1814#[derive(Clone, PartialEq, ::prost::Message)]
1815pub struct SaveWorkingStateRequest {
1816    #[prost(string, tag = "1")]
1817    pub rid: ::prost::alloc::string::String,
1818    #[prost(string, optional, tag = "2")]
1819    pub branch: ::core::option::Option<::prost::alloc::string::String>,
1820    #[prost(string, tag = "3")]
1821    pub message: ::prost::alloc::string::String,
1822    /// If present, this commit ID must match the latest commit on the branch for the save to succeed.
1823    #[prost(string, optional, tag = "4")]
1824    pub latest_commit_on_branch: ::core::option::Option<::prost::alloc::string::String>,
1825    #[prost(message, optional, tag = "5")]
1826    pub state: ::core::option::Option<ProcedureState>,
1827}
1828#[derive(Clone, PartialEq, ::prost::Message)]
1829pub struct SaveWorkingStateResponse {
1830    #[prost(message, optional, tag = "1")]
1831    pub procedure: ::core::option::Option<Procedure>,
1832}
1833#[derive(Clone, PartialEq, ::prost::Message)]
1834pub struct CommitRequest {
1835    #[prost(string, tag = "1")]
1836    pub rid: ::prost::alloc::string::String,
1837    #[prost(string, optional, tag = "2")]
1838    pub branch: ::core::option::Option<::prost::alloc::string::String>,
1839    /// If present, this commit ID must match the latest commit on the branch for the commit to succeed.
1840    #[prost(string, optional, tag = "3")]
1841    pub latest_commit_on_branch: ::core::option::Option<::prost::alloc::string::String>,
1842    #[prost(string, tag = "4")]
1843    pub message: ::prost::alloc::string::String,
1844    #[prost(message, optional, tag = "5")]
1845    pub state: ::core::option::Option<ProcedureState>,
1846}
1847#[derive(Clone, PartialEq, ::prost::Message)]
1848pub struct CommitResponse {
1849    #[prost(message, optional, tag = "1")]
1850    pub procedure: ::core::option::Option<Procedure>,
1851}
1852#[derive(Clone, PartialEq, ::prost::Message)]
1853pub struct ProcedureSearchQuery {
1854    #[prost(oneof = "procedure_search_query::Query", tags = "1, 2, 3, 4, 5, 6, 7, 8")]
1855    pub query: ::core::option::Option<procedure_search_query::Query>,
1856}
1857/// Nested message and enum types in `ProcedureSearchQuery`.
1858pub mod procedure_search_query {
1859    #[derive(Clone, PartialEq, ::prost::Message)]
1860    pub struct ProcedureSearchAndQuery {
1861        #[prost(message, repeated, tag = "1")]
1862        pub queries: ::prost::alloc::vec::Vec<super::ProcedureSearchQuery>,
1863    }
1864    #[derive(Clone, PartialEq, ::prost::Message)]
1865    pub struct ProcedureSearchOrQuery {
1866        #[prost(message, repeated, tag = "1")]
1867        pub queries: ::prost::alloc::vec::Vec<super::ProcedureSearchQuery>,
1868    }
1869    #[derive(Clone, PartialEq, ::prost::Oneof)]
1870    pub enum Query {
1871        #[prost(string, tag = "1")]
1872        SearchText(::prost::alloc::string::String),
1873        #[prost(string, tag = "2")]
1874        Label(::prost::alloc::string::String),
1875        #[prost(message, tag = "3")]
1876        Property(super::super::super::types::Property),
1877        #[prost(message, tag = "4")]
1878        And(ProcedureSearchAndQuery),
1879        #[prost(message, tag = "5")]
1880        Or(ProcedureSearchOrQuery),
1881        #[prost(string, tag = "6")]
1882        Workspace(::prost::alloc::string::String),
1883        #[prost(string, tag = "7")]
1884        CreatedBy(::prost::alloc::string::String),
1885        #[prost(bool, tag = "8")]
1886        IsArchived(bool),
1887    }
1888}
1889#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1890pub struct SearchProceduresSortOptions {
1891    /// Defaults to true (descending)
1892    #[prost(bool, optional, tag = "1")]
1893    pub is_descending: ::core::option::Option<bool>,
1894    /// Defaults to CREATED_AT
1895    #[prost(enumeration = "SearchProceduresSortField", optional, tag = "2")]
1896    pub sort_field: ::core::option::Option<i32>,
1897}
1898#[derive(Clone, PartialEq, ::prost::Message)]
1899pub struct SearchProceduresRequest {
1900    #[prost(message, optional, tag = "1")]
1901    pub query: ::core::option::Option<ProcedureSearchQuery>,
1902    /// If not set, default is to sort by created_at descending
1903    #[prost(message, optional, tag = "2")]
1904    pub sort_options: ::core::option::Option<SearchProceduresSortOptions>,
1905    /// Page sizes greater than 1_000 will be rejected. Default pageSize is 100.
1906    #[prost(int32, optional, tag = "3")]
1907    pub page_size: ::core::option::Option<i32>,
1908    #[prost(string, optional, tag = "4")]
1909    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1910}
1911#[derive(Clone, PartialEq, ::prost::Message)]
1912pub struct SearchProceduresResponse {
1913    #[prost(message, repeated, tag = "1")]
1914    pub procedure_metadata: ::prost::alloc::vec::Vec<ProcedureMetadata>,
1915    #[prost(string, optional, tag = "2")]
1916    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1917}
1918#[derive(Clone, PartialEq, ::prost::Message)]
1919pub struct ArchiveProceduresRequest {
1920    #[prost(string, repeated, tag = "1")]
1921    pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1922}
1923#[derive(Clone, PartialEq, ::prost::Message)]
1924pub struct ArchiveProceduresResponse {
1925    #[prost(string, repeated, tag = "1")]
1926    pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1927}
1928#[derive(Clone, PartialEq, ::prost::Message)]
1929pub struct UnarchiveProceduresRequest {
1930    #[prost(string, repeated, tag = "1")]
1931    pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1932}
1933#[derive(Clone, PartialEq, ::prost::Message)]
1934pub struct UnarchiveProceduresResponse {
1935    #[prost(string, repeated, tag = "1")]
1936    pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1937}
1938#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1939#[repr(i32)]
1940pub enum SearchProceduresSortField {
1941    Unspecified = 0,
1942    Name = 1,
1943    CreatedAt = 2,
1944    UpdatedAt = 3,
1945}
1946impl SearchProceduresSortField {
1947    /// String value of the enum field names used in the ProtoBuf definition.
1948    ///
1949    /// The values are not transformed in any way and thus are considered stable
1950    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1951    pub fn as_str_name(&self) -> &'static str {
1952        match self {
1953            Self::Unspecified => "SEARCH_PROCEDURES_SORT_FIELD_UNSPECIFIED",
1954            Self::Name => "SEARCH_PROCEDURES_SORT_FIELD_NAME",
1955            Self::CreatedAt => "SEARCH_PROCEDURES_SORT_FIELD_CREATED_AT",
1956            Self::UpdatedAt => "SEARCH_PROCEDURES_SORT_FIELD_UPDATED_AT",
1957        }
1958    }
1959    /// Creates an enum from field names used in the ProtoBuf definition.
1960    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1961        match value {
1962            "SEARCH_PROCEDURES_SORT_FIELD_UNSPECIFIED" => Some(Self::Unspecified),
1963            "SEARCH_PROCEDURES_SORT_FIELD_NAME" => Some(Self::Name),
1964            "SEARCH_PROCEDURES_SORT_FIELD_CREATED_AT" => Some(Self::CreatedAt),
1965            "SEARCH_PROCEDURES_SORT_FIELD_UPDATED_AT" => Some(Self::UpdatedAt),
1966            _ => None,
1967        }
1968    }
1969}
1970#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1971#[repr(i32)]
1972pub enum ProceduresServiceError {
1973    Unspecified = 0,
1974    NotFound = 1,
1975    CommitNotFound = 2,
1976    CannotMergeMain = 3,
1977    CannotCommitToArchivedProcedure = 4,
1978    InvalidGraph = 5,
1979    InvalidSearchToken = 6,
1980}
1981impl ProceduresServiceError {
1982    /// String value of the enum field names used in the ProtoBuf definition.
1983    ///
1984    /// The values are not transformed in any way and thus are considered stable
1985    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1986    pub fn as_str_name(&self) -> &'static str {
1987        match self {
1988            Self::Unspecified => "PROCEDURES_SERVICE_ERROR_UNSPECIFIED",
1989            Self::NotFound => "PROCEDURES_SERVICE_ERROR_NOT_FOUND",
1990            Self::CommitNotFound => "PROCEDURES_SERVICE_ERROR_COMMIT_NOT_FOUND",
1991            Self::CannotMergeMain => "PROCEDURES_SERVICE_ERROR_CANNOT_MERGE_MAIN",
1992            Self::CannotCommitToArchivedProcedure => {
1993                "PROCEDURES_SERVICE_ERROR_CANNOT_COMMIT_TO_ARCHIVED_PROCEDURE"
1994            }
1995            Self::InvalidGraph => "PROCEDURES_SERVICE_ERROR_INVALID_GRAPH",
1996            Self::InvalidSearchToken => "PROCEDURES_SERVICE_ERROR_INVALID_SEARCH_TOKEN",
1997        }
1998    }
1999    /// Creates an enum from field names used in the ProtoBuf definition.
2000    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2001        match value {
2002            "PROCEDURES_SERVICE_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
2003            "PROCEDURES_SERVICE_ERROR_NOT_FOUND" => Some(Self::NotFound),
2004            "PROCEDURES_SERVICE_ERROR_COMMIT_NOT_FOUND" => Some(Self::CommitNotFound),
2005            "PROCEDURES_SERVICE_ERROR_CANNOT_MERGE_MAIN" => Some(Self::CannotMergeMain),
2006            "PROCEDURES_SERVICE_ERROR_CANNOT_COMMIT_TO_ARCHIVED_PROCEDURE" => {
2007                Some(Self::CannotCommitToArchivedProcedure)
2008            }
2009            "PROCEDURES_SERVICE_ERROR_INVALID_GRAPH" => Some(Self::InvalidGraph),
2010            "PROCEDURES_SERVICE_ERROR_INVALID_SEARCH_TOKEN" => {
2011                Some(Self::InvalidSearchToken)
2012            }
2013            _ => None,
2014        }
2015    }
2016}
2017/// Generated client implementations.
2018pub mod procedures_service_client {
2019    #![allow(
2020        unused_variables,
2021        dead_code,
2022        missing_docs,
2023        clippy::wildcard_imports,
2024        clippy::let_unit_value,
2025    )]
2026    use tonic::codegen::*;
2027    use tonic::codegen::http::Uri;
2028    /// Service for creating and managing procedure templates, which are versioned collections
2029    /// of steps to be performed, typically in a specific order.
2030    #[derive(Debug, Clone)]
2031    pub struct ProceduresServiceClient<T> {
2032        inner: tonic::client::Grpc<T>,
2033    }
2034    impl ProceduresServiceClient<tonic::transport::Channel> {
2035        /// Attempt to create a new client by connecting to a given endpoint.
2036        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2037        where
2038            D: TryInto<tonic::transport::Endpoint>,
2039            D::Error: Into<StdError>,
2040        {
2041            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2042            Ok(Self::new(conn))
2043        }
2044    }
2045    impl<T> ProceduresServiceClient<T>
2046    where
2047        T: tonic::client::GrpcService<tonic::body::Body>,
2048        T::Error: Into<StdError>,
2049        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2050        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2051    {
2052        pub fn new(inner: T) -> Self {
2053            let inner = tonic::client::Grpc::new(inner);
2054            Self { inner }
2055        }
2056        pub fn with_origin(inner: T, origin: Uri) -> Self {
2057            let inner = tonic::client::Grpc::with_origin(inner, origin);
2058            Self { inner }
2059        }
2060        pub fn with_interceptor<F>(
2061            inner: T,
2062            interceptor: F,
2063        ) -> ProceduresServiceClient<InterceptedService<T, F>>
2064        where
2065            F: tonic::service::Interceptor,
2066            T::ResponseBody: Default,
2067            T: tonic::codegen::Service<
2068                http::Request<tonic::body::Body>,
2069                Response = http::Response<
2070                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2071                >,
2072            >,
2073            <T as tonic::codegen::Service<
2074                http::Request<tonic::body::Body>,
2075            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2076        {
2077            ProceduresServiceClient::new(InterceptedService::new(inner, interceptor))
2078        }
2079        /// Compress requests with the given encoding.
2080        ///
2081        /// This requires the server to support it otherwise it might respond with an
2082        /// error.
2083        #[must_use]
2084        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2085            self.inner = self.inner.send_compressed(encoding);
2086            self
2087        }
2088        /// Enable decompressing responses.
2089        #[must_use]
2090        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2091            self.inner = self.inner.accept_compressed(encoding);
2092            self
2093        }
2094        /// Limits the maximum size of a decoded message.
2095        ///
2096        /// Default: `4MB`
2097        #[must_use]
2098        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2099            self.inner = self.inner.max_decoding_message_size(limit);
2100            self
2101        }
2102        /// Limits the maximum size of an encoded message.
2103        ///
2104        /// Default: `usize::MAX`
2105        #[must_use]
2106        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2107            self.inner = self.inner.max_encoding_message_size(limit);
2108            self
2109        }
2110        /// Create a new procedure
2111        pub async fn create_procedure(
2112            &mut self,
2113            request: impl tonic::IntoRequest<super::CreateProcedureRequest>,
2114        ) -> std::result::Result<
2115            tonic::Response<super::CreateProcedureResponse>,
2116            tonic::Status,
2117        > {
2118            self.inner
2119                .ready()
2120                .await
2121                .map_err(|e| {
2122                    tonic::Status::unknown(
2123                        format!("Service was not ready: {}", e.into()),
2124                    )
2125                })?;
2126            let codec = tonic::codec::ProstCodec::default();
2127            let path = http::uri::PathAndQuery::from_static(
2128                "/nominal.procedures.v1.ProceduresService/CreateProcedure",
2129            );
2130            let mut req = request.into_request();
2131            req.extensions_mut()
2132                .insert(
2133                    GrpcMethod::new(
2134                        "nominal.procedures.v1.ProceduresService",
2135                        "CreateProcedure",
2136                    ),
2137                );
2138            self.inner.unary(req, path, codec).await
2139        }
2140        /// Get a procedure by its RID
2141        pub async fn get_procedure(
2142            &mut self,
2143            request: impl tonic::IntoRequest<super::GetProcedureRequest>,
2144        ) -> std::result::Result<
2145            tonic::Response<super::GetProcedureResponse>,
2146            tonic::Status,
2147        > {
2148            self.inner
2149                .ready()
2150                .await
2151                .map_err(|e| {
2152                    tonic::Status::unknown(
2153                        format!("Service was not ready: {}", e.into()),
2154                    )
2155                })?;
2156            let codec = tonic::codec::ProstCodec::default();
2157            let path = http::uri::PathAndQuery::from_static(
2158                "/nominal.procedures.v1.ProceduresService/GetProcedure",
2159            );
2160            let mut req = request.into_request();
2161            req.extensions_mut()
2162                .insert(
2163                    GrpcMethod::new(
2164                        "nominal.procedures.v1.ProceduresService",
2165                        "GetProcedure",
2166                    ),
2167                );
2168            self.inner.unary(req, path, codec).await
2169        }
2170        /// Get metadata for multiple procedure by RIDs.
2171        /// Unauthorized RIDs will be omitted from the response.
2172        /// Order is not guaranteed to match the request.
2173        pub async fn batch_get_procedure_metadata(
2174            &mut self,
2175            request: impl tonic::IntoRequest<super::BatchGetProcedureMetadataRequest>,
2176        ) -> std::result::Result<
2177            tonic::Response<super::BatchGetProcedureMetadataResponse>,
2178            tonic::Status,
2179        > {
2180            self.inner
2181                .ready()
2182                .await
2183                .map_err(|e| {
2184                    tonic::Status::unknown(
2185                        format!("Service was not ready: {}", e.into()),
2186                    )
2187                })?;
2188            let codec = tonic::codec::ProstCodec::default();
2189            let path = http::uri::PathAndQuery::from_static(
2190                "/nominal.procedures.v1.ProceduresService/BatchGetProcedureMetadata",
2191            );
2192            let mut req = request.into_request();
2193            req.extensions_mut()
2194                .insert(
2195                    GrpcMethod::new(
2196                        "nominal.procedures.v1.ProceduresService",
2197                        "BatchGetProcedureMetadata",
2198                    ),
2199                );
2200            self.inner.unary(req, path, codec).await
2201        }
2202        /// Update the metadata of a procedure
2203        pub async fn update_procedure_metadata(
2204            &mut self,
2205            request: impl tonic::IntoRequest<super::UpdateProcedureMetadataRequest>,
2206        ) -> std::result::Result<
2207            tonic::Response<super::UpdateProcedureMetadataResponse>,
2208            tonic::Status,
2209        > {
2210            self.inner
2211                .ready()
2212                .await
2213                .map_err(|e| {
2214                    tonic::Status::unknown(
2215                        format!("Service was not ready: {}", e.into()),
2216                    )
2217                })?;
2218            let codec = tonic::codec::ProstCodec::default();
2219            let path = http::uri::PathAndQuery::from_static(
2220                "/nominal.procedures.v1.ProceduresService/UpdateProcedureMetadata",
2221            );
2222            let mut req = request.into_request();
2223            req.extensions_mut()
2224                .insert(
2225                    GrpcMethod::new(
2226                        "nominal.procedures.v1.ProceduresService",
2227                        "UpdateProcedureMetadata",
2228                    ),
2229                );
2230            self.inner.unary(req, path, codec).await
2231        }
2232        /// Parse a procedure from a nested procedure structure
2233        pub async fn parse_nested_procedure(
2234            &mut self,
2235            request: impl tonic::IntoRequest<super::ParseNestedProcedureRequest>,
2236        ) -> std::result::Result<
2237            tonic::Response<super::ParseNestedProcedureResponse>,
2238            tonic::Status,
2239        > {
2240            self.inner
2241                .ready()
2242                .await
2243                .map_err(|e| {
2244                    tonic::Status::unknown(
2245                        format!("Service was not ready: {}", e.into()),
2246                    )
2247                })?;
2248            let codec = tonic::codec::ProstCodec::default();
2249            let path = http::uri::PathAndQuery::from_static(
2250                "/nominal.procedures.v1.ProceduresService/ParseNestedProcedure",
2251            );
2252            let mut req = request.into_request();
2253            req.extensions_mut()
2254                .insert(
2255                    GrpcMethod::new(
2256                        "nominal.procedures.v1.ProceduresService",
2257                        "ParseNestedProcedure",
2258                    ),
2259                );
2260            self.inner.unary(req, path, codec).await
2261        }
2262        /// Get procedure as nested procedure
2263        /// TODO(pchen): in the future, not all graphs will be representable as nested procedures
2264        pub async fn get_procedure_as_nested(
2265            &mut self,
2266            request: impl tonic::IntoRequest<super::GetProcedureAsNestedRequest>,
2267        ) -> std::result::Result<
2268            tonic::Response<super::GetProcedureAsNestedResponse>,
2269            tonic::Status,
2270        > {
2271            self.inner
2272                .ready()
2273                .await
2274                .map_err(|e| {
2275                    tonic::Status::unknown(
2276                        format!("Service was not ready: {}", e.into()),
2277                    )
2278                })?;
2279            let codec = tonic::codec::ProstCodec::default();
2280            let path = http::uri::PathAndQuery::from_static(
2281                "/nominal.procedures.v1.ProceduresService/GetProcedureAsNested",
2282            );
2283            let mut req = request.into_request();
2284            req.extensions_mut()
2285                .insert(
2286                    GrpcMethod::new(
2287                        "nominal.procedures.v1.ProceduresService",
2288                        "GetProcedureAsNested",
2289                    ),
2290                );
2291            self.inner.unary(req, path, codec).await
2292        }
2293        /// Merge a branch of a procedure to main
2294        pub async fn merge_to_main(
2295            &mut self,
2296            request: impl tonic::IntoRequest<super::MergeToMainRequest>,
2297        ) -> std::result::Result<
2298            tonic::Response<super::MergeToMainResponse>,
2299            tonic::Status,
2300        > {
2301            self.inner
2302                .ready()
2303                .await
2304                .map_err(|e| {
2305                    tonic::Status::unknown(
2306                        format!("Service was not ready: {}", e.into()),
2307                    )
2308                })?;
2309            let codec = tonic::codec::ProstCodec::default();
2310            let path = http::uri::PathAndQuery::from_static(
2311                "/nominal.procedures.v1.ProceduresService/MergeToMain",
2312            );
2313            let mut req = request.into_request();
2314            req.extensions_mut()
2315                .insert(
2316                    GrpcMethod::new(
2317                        "nominal.procedures.v1.ProceduresService",
2318                        "MergeToMain",
2319                    ),
2320                );
2321            self.inner.unary(req, path, codec).await
2322        }
2323        /// Save the working state of a procedure
2324        pub async fn save_working_state(
2325            &mut self,
2326            request: impl tonic::IntoRequest<super::SaveWorkingStateRequest>,
2327        ) -> std::result::Result<
2328            tonic::Response<super::SaveWorkingStateResponse>,
2329            tonic::Status,
2330        > {
2331            self.inner
2332                .ready()
2333                .await
2334                .map_err(|e| {
2335                    tonic::Status::unknown(
2336                        format!("Service was not ready: {}", e.into()),
2337                    )
2338                })?;
2339            let codec = tonic::codec::ProstCodec::default();
2340            let path = http::uri::PathAndQuery::from_static(
2341                "/nominal.procedures.v1.ProceduresService/SaveWorkingState",
2342            );
2343            let mut req = request.into_request();
2344            req.extensions_mut()
2345                .insert(
2346                    GrpcMethod::new(
2347                        "nominal.procedures.v1.ProceduresService",
2348                        "SaveWorkingState",
2349                    ),
2350                );
2351            self.inner.unary(req, path, codec).await
2352        }
2353        /// Commit a procedure to a branch
2354        pub async fn commit(
2355            &mut self,
2356            request: impl tonic::IntoRequest<super::CommitRequest>,
2357        ) -> std::result::Result<tonic::Response<super::CommitResponse>, tonic::Status> {
2358            self.inner
2359                .ready()
2360                .await
2361                .map_err(|e| {
2362                    tonic::Status::unknown(
2363                        format!("Service was not ready: {}", e.into()),
2364                    )
2365                })?;
2366            let codec = tonic::codec::ProstCodec::default();
2367            let path = http::uri::PathAndQuery::from_static(
2368                "/nominal.procedures.v1.ProceduresService/Commit",
2369            );
2370            let mut req = request.into_request();
2371            req.extensions_mut()
2372                .insert(
2373                    GrpcMethod::new("nominal.procedures.v1.ProceduresService", "Commit"),
2374                );
2375            self.inner.unary(req, path, codec).await
2376        }
2377        /// Searches all procedures, returning paged results
2378        pub async fn search_procedures(
2379            &mut self,
2380            request: impl tonic::IntoRequest<super::SearchProceduresRequest>,
2381        ) -> std::result::Result<
2382            tonic::Response<super::SearchProceduresResponse>,
2383            tonic::Status,
2384        > {
2385            self.inner
2386                .ready()
2387                .await
2388                .map_err(|e| {
2389                    tonic::Status::unknown(
2390                        format!("Service was not ready: {}", e.into()),
2391                    )
2392                })?;
2393            let codec = tonic::codec::ProstCodec::default();
2394            let path = http::uri::PathAndQuery::from_static(
2395                "/nominal.procedures.v1.ProceduresService/SearchProcedures",
2396            );
2397            let mut req = request.into_request();
2398            req.extensions_mut()
2399                .insert(
2400                    GrpcMethod::new(
2401                        "nominal.procedures.v1.ProceduresService",
2402                        "SearchProcedures",
2403                    ),
2404                );
2405            self.inner.unary(req, path, codec).await
2406        }
2407        /// Archive procedures
2408        pub async fn archive_procedures(
2409            &mut self,
2410            request: impl tonic::IntoRequest<super::ArchiveProceduresRequest>,
2411        ) -> std::result::Result<
2412            tonic::Response<super::ArchiveProceduresResponse>,
2413            tonic::Status,
2414        > {
2415            self.inner
2416                .ready()
2417                .await
2418                .map_err(|e| {
2419                    tonic::Status::unknown(
2420                        format!("Service was not ready: {}", e.into()),
2421                    )
2422                })?;
2423            let codec = tonic::codec::ProstCodec::default();
2424            let path = http::uri::PathAndQuery::from_static(
2425                "/nominal.procedures.v1.ProceduresService/ArchiveProcedures",
2426            );
2427            let mut req = request.into_request();
2428            req.extensions_mut()
2429                .insert(
2430                    GrpcMethod::new(
2431                        "nominal.procedures.v1.ProceduresService",
2432                        "ArchiveProcedures",
2433                    ),
2434                );
2435            self.inner.unary(req, path, codec).await
2436        }
2437        /// Unarchive procedures
2438        pub async fn unarchive_procedures(
2439            &mut self,
2440            request: impl tonic::IntoRequest<super::UnarchiveProceduresRequest>,
2441        ) -> std::result::Result<
2442            tonic::Response<super::UnarchiveProceduresResponse>,
2443            tonic::Status,
2444        > {
2445            self.inner
2446                .ready()
2447                .await
2448                .map_err(|e| {
2449                    tonic::Status::unknown(
2450                        format!("Service was not ready: {}", e.into()),
2451                    )
2452                })?;
2453            let codec = tonic::codec::ProstCodec::default();
2454            let path = http::uri::PathAndQuery::from_static(
2455                "/nominal.procedures.v1.ProceduresService/UnarchiveProcedures",
2456            );
2457            let mut req = request.into_request();
2458            req.extensions_mut()
2459                .insert(
2460                    GrpcMethod::new(
2461                        "nominal.procedures.v1.ProceduresService",
2462                        "UnarchiveProcedures",
2463                    ),
2464                );
2465            self.inner.unary(req, path, codec).await
2466        }
2467    }
2468}