nominal_api/proto/
nominal.procedures.v1.rs

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