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