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 BatchGetProcedureMetadataRequest {
1228    #[prost(string, repeated, tag = "1")]
1229    pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1230}
1231#[derive(Clone, PartialEq, ::prost::Message)]
1232pub struct BatchGetProcedureMetadataResponse {
1233    #[prost(message, repeated, tag = "1")]
1234    pub procedure_metadatas: ::prost::alloc::vec::Vec<ProcedureMetadata>,
1235}
1236#[derive(Clone, PartialEq, ::prost::Message)]
1237pub struct UpdateProcedureMetadataRequest {
1238    #[prost(string, tag = "1")]
1239    pub rid: ::prost::alloc::string::String,
1240    #[prost(string, optional, tag = "2")]
1241    pub title: ::core::option::Option<::prost::alloc::string::String>,
1242    #[prost(string, optional, tag = "3")]
1243    pub description: ::core::option::Option<::prost::alloc::string::String>,
1244    #[prost(message, optional, tag = "4")]
1245    pub labels: ::core::option::Option<super::super::types::LabelUpdateWrapper>,
1246    #[prost(message, optional, tag = "5")]
1247    pub properties: ::core::option::Option<super::super::types::PropertyUpdateWrapper>,
1248    #[prost(bool, optional, tag = "6")]
1249    pub is_archived: ::core::option::Option<bool>,
1250    #[prost(bool, optional, tag = "7")]
1251    pub is_published: ::core::option::Option<bool>,
1252}
1253#[derive(Clone, PartialEq, ::prost::Message)]
1254pub struct UpdateProcedureMetadataResponse {
1255    #[prost(message, optional, tag = "1")]
1256    pub procedure_metadata: ::core::option::Option<ProcedureMetadata>,
1257}
1258#[derive(Clone, PartialEq, ::prost::Message)]
1259pub struct ParseNestedProcedureRequest {
1260    #[prost(message, optional, tag = "1")]
1261    pub nested_procedure: ::core::option::Option<NestedProcedure>,
1262    /// If true, the display graph will be included in the response.
1263    /// Default is false.
1264    #[prost(bool, tag = "3")]
1265    pub include_display_graph: bool,
1266}
1267#[derive(Clone, PartialEq, ::prost::Message)]
1268pub struct ParseNestedProcedureResponse {
1269    #[prost(message, optional, tag = "1")]
1270    pub procedure: ::core::option::Option<Procedure>,
1271    /// Included if include_display_graph was set to true
1272    #[prost(message, optional, tag = "2")]
1273    pub display_graph: ::core::option::Option<ProcedureDisplayGraph>,
1274}
1275#[derive(Clone, PartialEq, ::prost::Message)]
1276pub struct GetProcedureAsNestedRequest {
1277    #[prost(string, tag = "1")]
1278    pub rid: ::prost::alloc::string::String,
1279    #[prost(message, optional, tag = "2")]
1280    pub branch_or_commit: ::core::option::Option<
1281        super::super::versioning::v1::BranchOrCommit,
1282    >,
1283}
1284#[derive(Clone, PartialEq, ::prost::Message)]
1285pub struct GetProcedureAsNestedResponse {
1286    #[prost(message, optional, tag = "1")]
1287    pub nested_procedure: ::core::option::Option<NestedProcedure>,
1288}
1289#[derive(Clone, PartialEq, ::prost::Message)]
1290pub struct MergeToMainRequest {
1291    #[prost(string, tag = "1")]
1292    pub rid: ::prost::alloc::string::String,
1293    #[prost(string, tag = "2")]
1294    pub branch: ::prost::alloc::string::String,
1295    /// If present, this commit ID must match the latest commit on main for the merge to succeed.
1296    #[prost(string, optional, tag = "3")]
1297    pub latest_commit_on_main: ::core::option::Option<::prost::alloc::string::String>,
1298    #[prost(string, tag = "4")]
1299    pub message: ::prost::alloc::string::String,
1300}
1301#[derive(Clone, PartialEq, ::prost::Message)]
1302pub struct MergeToMainResponse {
1303    #[prost(message, optional, tag = "1")]
1304    pub procedure: ::core::option::Option<Procedure>,
1305}
1306#[derive(Clone, PartialEq, ::prost::Message)]
1307pub struct SaveWorkingStateRequest {
1308    #[prost(string, tag = "1")]
1309    pub rid: ::prost::alloc::string::String,
1310    #[prost(string, optional, tag = "2")]
1311    pub branch: ::core::option::Option<::prost::alloc::string::String>,
1312    #[prost(string, tag = "3")]
1313    pub message: ::prost::alloc::string::String,
1314    /// If present, this commit ID must match the latest commit on the branch for the save to succeed.
1315    #[prost(string, optional, tag = "4")]
1316    pub latest_commit_on_branch: ::core::option::Option<::prost::alloc::string::String>,
1317    #[prost(message, optional, tag = "5")]
1318    pub state: ::core::option::Option<ProcedureState>,
1319}
1320#[derive(Clone, PartialEq, ::prost::Message)]
1321pub struct SaveWorkingStateResponse {
1322    #[prost(message, optional, tag = "1")]
1323    pub procedure: ::core::option::Option<Procedure>,
1324}
1325#[derive(Clone, PartialEq, ::prost::Message)]
1326pub struct CommitRequest {
1327    #[prost(string, tag = "1")]
1328    pub rid: ::prost::alloc::string::String,
1329    #[prost(string, optional, tag = "2")]
1330    pub branch: ::core::option::Option<::prost::alloc::string::String>,
1331    /// If present, this commit ID must match the latest commit on the branch for the commit to succeed.
1332    #[prost(string, optional, tag = "3")]
1333    pub latest_commit_on_branch: ::core::option::Option<::prost::alloc::string::String>,
1334    #[prost(string, tag = "4")]
1335    pub message: ::prost::alloc::string::String,
1336    #[prost(message, optional, tag = "5")]
1337    pub state: ::core::option::Option<ProcedureState>,
1338}
1339#[derive(Clone, PartialEq, ::prost::Message)]
1340pub struct CommitResponse {
1341    #[prost(message, optional, tag = "1")]
1342    pub procedure: ::core::option::Option<Procedure>,
1343}
1344#[derive(Clone, PartialEq, ::prost::Message)]
1345pub struct ProcedureSearchQuery {
1346    #[prost(oneof = "procedure_search_query::Query", tags = "1, 2, 3, 4, 5, 6, 7, 8")]
1347    pub query: ::core::option::Option<procedure_search_query::Query>,
1348}
1349/// Nested message and enum types in `ProcedureSearchQuery`.
1350pub mod procedure_search_query {
1351    #[derive(Clone, PartialEq, ::prost::Message)]
1352    pub struct ProcedureSearchAndQuery {
1353        #[prost(message, repeated, tag = "1")]
1354        pub queries: ::prost::alloc::vec::Vec<super::ProcedureSearchQuery>,
1355    }
1356    #[derive(Clone, PartialEq, ::prost::Message)]
1357    pub struct ProcedureSearchOrQuery {
1358        #[prost(message, repeated, tag = "1")]
1359        pub queries: ::prost::alloc::vec::Vec<super::ProcedureSearchQuery>,
1360    }
1361    #[derive(Clone, PartialEq, ::prost::Oneof)]
1362    pub enum Query {
1363        #[prost(string, tag = "1")]
1364        SearchText(::prost::alloc::string::String),
1365        #[prost(string, tag = "2")]
1366        Label(::prost::alloc::string::String),
1367        #[prost(message, tag = "3")]
1368        Property(super::super::super::types::Property),
1369        #[prost(message, tag = "4")]
1370        And(ProcedureSearchAndQuery),
1371        #[prost(message, tag = "5")]
1372        Or(ProcedureSearchOrQuery),
1373        #[prost(string, tag = "6")]
1374        Workspace(::prost::alloc::string::String),
1375        #[prost(string, tag = "7")]
1376        CreatedBy(::prost::alloc::string::String),
1377        #[prost(bool, tag = "8")]
1378        IsArchived(bool),
1379    }
1380}
1381#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1382pub struct SearchProceduresSortOptions {
1383    /// Defaults to true (descending)
1384    #[prost(bool, optional, tag = "1")]
1385    pub is_descending: ::core::option::Option<bool>,
1386    /// Defaults to CREATED_AT
1387    #[prost(enumeration = "SearchProceduresSortField", optional, tag = "2")]
1388    pub sort_field: ::core::option::Option<i32>,
1389}
1390#[derive(Clone, PartialEq, ::prost::Message)]
1391pub struct SearchProceduresRequest {
1392    #[prost(message, optional, tag = "1")]
1393    pub query: ::core::option::Option<ProcedureSearchQuery>,
1394    /// If not set, default is to sort by created_at descending
1395    #[prost(message, optional, tag = "2")]
1396    pub sort_options: ::core::option::Option<SearchProceduresSortOptions>,
1397    /// Page sizes greater than 1_000 will be rejected. Default pageSize is 100.
1398    #[prost(int32, optional, tag = "3")]
1399    pub page_size: ::core::option::Option<i32>,
1400    #[prost(string, optional, tag = "4")]
1401    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1402}
1403#[derive(Clone, PartialEq, ::prost::Message)]
1404pub struct SearchProceduresResponse {
1405    #[prost(message, repeated, tag = "1")]
1406    pub procedure_metadata: ::prost::alloc::vec::Vec<ProcedureMetadata>,
1407    #[prost(string, optional, tag = "2")]
1408    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1409}
1410#[derive(Clone, PartialEq, ::prost::Message)]
1411pub struct ArchiveProceduresRequest {
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 ArchiveProceduresResponse {
1417    #[prost(string, repeated, tag = "1")]
1418    pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1419}
1420#[derive(Clone, PartialEq, ::prost::Message)]
1421pub struct UnarchiveProceduresRequest {
1422    #[prost(string, repeated, tag = "1")]
1423    pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1424}
1425#[derive(Clone, PartialEq, ::prost::Message)]
1426pub struct UnarchiveProceduresResponse {
1427    #[prost(string, repeated, tag = "1")]
1428    pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1429}
1430#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1431#[repr(i32)]
1432pub enum SearchProceduresSortField {
1433    Unspecified = 0,
1434    Name = 1,
1435    CreatedAt = 2,
1436    UpdatedAt = 3,
1437}
1438impl SearchProceduresSortField {
1439    /// String value of the enum field names used in the ProtoBuf definition.
1440    ///
1441    /// The values are not transformed in any way and thus are considered stable
1442    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1443    pub fn as_str_name(&self) -> &'static str {
1444        match self {
1445            Self::Unspecified => "SEARCH_PROCEDURES_SORT_FIELD_UNSPECIFIED",
1446            Self::Name => "SEARCH_PROCEDURES_SORT_FIELD_NAME",
1447            Self::CreatedAt => "SEARCH_PROCEDURES_SORT_FIELD_CREATED_AT",
1448            Self::UpdatedAt => "SEARCH_PROCEDURES_SORT_FIELD_UPDATED_AT",
1449        }
1450    }
1451    /// Creates an enum from field names used in the ProtoBuf definition.
1452    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1453        match value {
1454            "SEARCH_PROCEDURES_SORT_FIELD_UNSPECIFIED" => Some(Self::Unspecified),
1455            "SEARCH_PROCEDURES_SORT_FIELD_NAME" => Some(Self::Name),
1456            "SEARCH_PROCEDURES_SORT_FIELD_CREATED_AT" => Some(Self::CreatedAt),
1457            "SEARCH_PROCEDURES_SORT_FIELD_UPDATED_AT" => Some(Self::UpdatedAt),
1458            _ => None,
1459        }
1460    }
1461}
1462#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1463#[repr(i32)]
1464pub enum ProceduresServiceError {
1465    Unspecified = 0,
1466    NotFound = 1,
1467    CommitNotFound = 2,
1468    CannotMergeMain = 3,
1469    CannotCommitToArchivedProcedure = 4,
1470    InvalidGraph = 5,
1471    InvalidSearchToken = 6,
1472}
1473impl ProceduresServiceError {
1474    /// String value of the enum field names used in the ProtoBuf definition.
1475    ///
1476    /// The values are not transformed in any way and thus are considered stable
1477    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1478    pub fn as_str_name(&self) -> &'static str {
1479        match self {
1480            Self::Unspecified => "PROCEDURES_SERVICE_ERROR_UNSPECIFIED",
1481            Self::NotFound => "PROCEDURES_SERVICE_ERROR_NOT_FOUND",
1482            Self::CommitNotFound => "PROCEDURES_SERVICE_ERROR_COMMIT_NOT_FOUND",
1483            Self::CannotMergeMain => "PROCEDURES_SERVICE_ERROR_CANNOT_MERGE_MAIN",
1484            Self::CannotCommitToArchivedProcedure => {
1485                "PROCEDURES_SERVICE_ERROR_CANNOT_COMMIT_TO_ARCHIVED_PROCEDURE"
1486            }
1487            Self::InvalidGraph => "PROCEDURES_SERVICE_ERROR_INVALID_GRAPH",
1488            Self::InvalidSearchToken => "PROCEDURES_SERVICE_ERROR_INVALID_SEARCH_TOKEN",
1489        }
1490    }
1491    /// Creates an enum from field names used in the ProtoBuf definition.
1492    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1493        match value {
1494            "PROCEDURES_SERVICE_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
1495            "PROCEDURES_SERVICE_ERROR_NOT_FOUND" => Some(Self::NotFound),
1496            "PROCEDURES_SERVICE_ERROR_COMMIT_NOT_FOUND" => Some(Self::CommitNotFound),
1497            "PROCEDURES_SERVICE_ERROR_CANNOT_MERGE_MAIN" => Some(Self::CannotMergeMain),
1498            "PROCEDURES_SERVICE_ERROR_CANNOT_COMMIT_TO_ARCHIVED_PROCEDURE" => {
1499                Some(Self::CannotCommitToArchivedProcedure)
1500            }
1501            "PROCEDURES_SERVICE_ERROR_INVALID_GRAPH" => Some(Self::InvalidGraph),
1502            "PROCEDURES_SERVICE_ERROR_INVALID_SEARCH_TOKEN" => {
1503                Some(Self::InvalidSearchToken)
1504            }
1505            _ => None,
1506        }
1507    }
1508}
1509/// Generated client implementations.
1510pub mod procedures_service_client {
1511    #![allow(
1512        unused_variables,
1513        dead_code,
1514        missing_docs,
1515        clippy::wildcard_imports,
1516        clippy::let_unit_value,
1517    )]
1518    use tonic::codegen::*;
1519    use tonic::codegen::http::Uri;
1520    /// Service for creating and managing procedure templates, which are versioned collections
1521    /// of steps to be performed, typically in a specific order.
1522    #[derive(Debug, Clone)]
1523    pub struct ProceduresServiceClient<T> {
1524        inner: tonic::client::Grpc<T>,
1525    }
1526    impl ProceduresServiceClient<tonic::transport::Channel> {
1527        /// Attempt to create a new client by connecting to a given endpoint.
1528        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1529        where
1530            D: TryInto<tonic::transport::Endpoint>,
1531            D::Error: Into<StdError>,
1532        {
1533            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1534            Ok(Self::new(conn))
1535        }
1536    }
1537    impl<T> ProceduresServiceClient<T>
1538    where
1539        T: tonic::client::GrpcService<tonic::body::Body>,
1540        T::Error: Into<StdError>,
1541        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1542        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1543    {
1544        pub fn new(inner: T) -> Self {
1545            let inner = tonic::client::Grpc::new(inner);
1546            Self { inner }
1547        }
1548        pub fn with_origin(inner: T, origin: Uri) -> Self {
1549            let inner = tonic::client::Grpc::with_origin(inner, origin);
1550            Self { inner }
1551        }
1552        pub fn with_interceptor<F>(
1553            inner: T,
1554            interceptor: F,
1555        ) -> ProceduresServiceClient<InterceptedService<T, F>>
1556        where
1557            F: tonic::service::Interceptor,
1558            T::ResponseBody: Default,
1559            T: tonic::codegen::Service<
1560                http::Request<tonic::body::Body>,
1561                Response = http::Response<
1562                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1563                >,
1564            >,
1565            <T as tonic::codegen::Service<
1566                http::Request<tonic::body::Body>,
1567            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1568        {
1569            ProceduresServiceClient::new(InterceptedService::new(inner, interceptor))
1570        }
1571        /// Compress requests with the given encoding.
1572        ///
1573        /// This requires the server to support it otherwise it might respond with an
1574        /// error.
1575        #[must_use]
1576        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1577            self.inner = self.inner.send_compressed(encoding);
1578            self
1579        }
1580        /// Enable decompressing responses.
1581        #[must_use]
1582        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1583            self.inner = self.inner.accept_compressed(encoding);
1584            self
1585        }
1586        /// Limits the maximum size of a decoded message.
1587        ///
1588        /// Default: `4MB`
1589        #[must_use]
1590        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1591            self.inner = self.inner.max_decoding_message_size(limit);
1592            self
1593        }
1594        /// Limits the maximum size of an encoded message.
1595        ///
1596        /// Default: `usize::MAX`
1597        #[must_use]
1598        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1599            self.inner = self.inner.max_encoding_message_size(limit);
1600            self
1601        }
1602        /// Create a new procedure
1603        pub async fn create_procedure(
1604            &mut self,
1605            request: impl tonic::IntoRequest<super::CreateProcedureRequest>,
1606        ) -> std::result::Result<
1607            tonic::Response<super::CreateProcedureResponse>,
1608            tonic::Status,
1609        > {
1610            self.inner
1611                .ready()
1612                .await
1613                .map_err(|e| {
1614                    tonic::Status::unknown(
1615                        format!("Service was not ready: {}", e.into()),
1616                    )
1617                })?;
1618            let codec = tonic::codec::ProstCodec::default();
1619            let path = http::uri::PathAndQuery::from_static(
1620                "/nominal.procedures.v1.ProceduresService/CreateProcedure",
1621            );
1622            let mut req = request.into_request();
1623            req.extensions_mut()
1624                .insert(
1625                    GrpcMethod::new(
1626                        "nominal.procedures.v1.ProceduresService",
1627                        "CreateProcedure",
1628                    ),
1629                );
1630            self.inner.unary(req, path, codec).await
1631        }
1632        /// Get a procedure by its RID
1633        pub async fn get_procedure(
1634            &mut self,
1635            request: impl tonic::IntoRequest<super::GetProcedureRequest>,
1636        ) -> std::result::Result<
1637            tonic::Response<super::GetProcedureResponse>,
1638            tonic::Status,
1639        > {
1640            self.inner
1641                .ready()
1642                .await
1643                .map_err(|e| {
1644                    tonic::Status::unknown(
1645                        format!("Service was not ready: {}", e.into()),
1646                    )
1647                })?;
1648            let codec = tonic::codec::ProstCodec::default();
1649            let path = http::uri::PathAndQuery::from_static(
1650                "/nominal.procedures.v1.ProceduresService/GetProcedure",
1651            );
1652            let mut req = request.into_request();
1653            req.extensions_mut()
1654                .insert(
1655                    GrpcMethod::new(
1656                        "nominal.procedures.v1.ProceduresService",
1657                        "GetProcedure",
1658                    ),
1659                );
1660            self.inner.unary(req, path, codec).await
1661        }
1662        /// Get metadata for multiple procedure by RIDs.
1663        /// Unauthorized RIDs will be omitted from the response.
1664        /// Order is not guaranteed to match the request.
1665        pub async fn batch_get_procedure_metadata(
1666            &mut self,
1667            request: impl tonic::IntoRequest<super::BatchGetProcedureMetadataRequest>,
1668        ) -> std::result::Result<
1669            tonic::Response<super::BatchGetProcedureMetadataResponse>,
1670            tonic::Status,
1671        > {
1672            self.inner
1673                .ready()
1674                .await
1675                .map_err(|e| {
1676                    tonic::Status::unknown(
1677                        format!("Service was not ready: {}", e.into()),
1678                    )
1679                })?;
1680            let codec = tonic::codec::ProstCodec::default();
1681            let path = http::uri::PathAndQuery::from_static(
1682                "/nominal.procedures.v1.ProceduresService/BatchGetProcedureMetadata",
1683            );
1684            let mut req = request.into_request();
1685            req.extensions_mut()
1686                .insert(
1687                    GrpcMethod::new(
1688                        "nominal.procedures.v1.ProceduresService",
1689                        "BatchGetProcedureMetadata",
1690                    ),
1691                );
1692            self.inner.unary(req, path, codec).await
1693        }
1694        /// Update the metadata of a procedure
1695        pub async fn update_procedure_metadata(
1696            &mut self,
1697            request: impl tonic::IntoRequest<super::UpdateProcedureMetadataRequest>,
1698        ) -> std::result::Result<
1699            tonic::Response<super::UpdateProcedureMetadataResponse>,
1700            tonic::Status,
1701        > {
1702            self.inner
1703                .ready()
1704                .await
1705                .map_err(|e| {
1706                    tonic::Status::unknown(
1707                        format!("Service was not ready: {}", e.into()),
1708                    )
1709                })?;
1710            let codec = tonic::codec::ProstCodec::default();
1711            let path = http::uri::PathAndQuery::from_static(
1712                "/nominal.procedures.v1.ProceduresService/UpdateProcedureMetadata",
1713            );
1714            let mut req = request.into_request();
1715            req.extensions_mut()
1716                .insert(
1717                    GrpcMethod::new(
1718                        "nominal.procedures.v1.ProceduresService",
1719                        "UpdateProcedureMetadata",
1720                    ),
1721                );
1722            self.inner.unary(req, path, codec).await
1723        }
1724        /// Parse a procedure from a nested procedure structure
1725        pub async fn parse_nested_procedure(
1726            &mut self,
1727            request: impl tonic::IntoRequest<super::ParseNestedProcedureRequest>,
1728        ) -> std::result::Result<
1729            tonic::Response<super::ParseNestedProcedureResponse>,
1730            tonic::Status,
1731        > {
1732            self.inner
1733                .ready()
1734                .await
1735                .map_err(|e| {
1736                    tonic::Status::unknown(
1737                        format!("Service was not ready: {}", e.into()),
1738                    )
1739                })?;
1740            let codec = tonic::codec::ProstCodec::default();
1741            let path = http::uri::PathAndQuery::from_static(
1742                "/nominal.procedures.v1.ProceduresService/ParseNestedProcedure",
1743            );
1744            let mut req = request.into_request();
1745            req.extensions_mut()
1746                .insert(
1747                    GrpcMethod::new(
1748                        "nominal.procedures.v1.ProceduresService",
1749                        "ParseNestedProcedure",
1750                    ),
1751                );
1752            self.inner.unary(req, path, codec).await
1753        }
1754        /// Get procedure as nested procedure
1755        /// TODO(pchen): in the future, not all graphs will be representable as nested procedures
1756        pub async fn get_procedure_as_nested(
1757            &mut self,
1758            request: impl tonic::IntoRequest<super::GetProcedureAsNestedRequest>,
1759        ) -> std::result::Result<
1760            tonic::Response<super::GetProcedureAsNestedResponse>,
1761            tonic::Status,
1762        > {
1763            self.inner
1764                .ready()
1765                .await
1766                .map_err(|e| {
1767                    tonic::Status::unknown(
1768                        format!("Service was not ready: {}", e.into()),
1769                    )
1770                })?;
1771            let codec = tonic::codec::ProstCodec::default();
1772            let path = http::uri::PathAndQuery::from_static(
1773                "/nominal.procedures.v1.ProceduresService/GetProcedureAsNested",
1774            );
1775            let mut req = request.into_request();
1776            req.extensions_mut()
1777                .insert(
1778                    GrpcMethod::new(
1779                        "nominal.procedures.v1.ProceduresService",
1780                        "GetProcedureAsNested",
1781                    ),
1782                );
1783            self.inner.unary(req, path, codec).await
1784        }
1785        /// Merge a branch of a procedure to main
1786        pub async fn merge_to_main(
1787            &mut self,
1788            request: impl tonic::IntoRequest<super::MergeToMainRequest>,
1789        ) -> std::result::Result<
1790            tonic::Response<super::MergeToMainResponse>,
1791            tonic::Status,
1792        > {
1793            self.inner
1794                .ready()
1795                .await
1796                .map_err(|e| {
1797                    tonic::Status::unknown(
1798                        format!("Service was not ready: {}", e.into()),
1799                    )
1800                })?;
1801            let codec = tonic::codec::ProstCodec::default();
1802            let path = http::uri::PathAndQuery::from_static(
1803                "/nominal.procedures.v1.ProceduresService/MergeToMain",
1804            );
1805            let mut req = request.into_request();
1806            req.extensions_mut()
1807                .insert(
1808                    GrpcMethod::new(
1809                        "nominal.procedures.v1.ProceduresService",
1810                        "MergeToMain",
1811                    ),
1812                );
1813            self.inner.unary(req, path, codec).await
1814        }
1815        /// Save the working state of a procedure
1816        pub async fn save_working_state(
1817            &mut self,
1818            request: impl tonic::IntoRequest<super::SaveWorkingStateRequest>,
1819        ) -> std::result::Result<
1820            tonic::Response<super::SaveWorkingStateResponse>,
1821            tonic::Status,
1822        > {
1823            self.inner
1824                .ready()
1825                .await
1826                .map_err(|e| {
1827                    tonic::Status::unknown(
1828                        format!("Service was not ready: {}", e.into()),
1829                    )
1830                })?;
1831            let codec = tonic::codec::ProstCodec::default();
1832            let path = http::uri::PathAndQuery::from_static(
1833                "/nominal.procedures.v1.ProceduresService/SaveWorkingState",
1834            );
1835            let mut req = request.into_request();
1836            req.extensions_mut()
1837                .insert(
1838                    GrpcMethod::new(
1839                        "nominal.procedures.v1.ProceduresService",
1840                        "SaveWorkingState",
1841                    ),
1842                );
1843            self.inner.unary(req, path, codec).await
1844        }
1845        /// Commit a procedure to a branch
1846        pub async fn commit(
1847            &mut self,
1848            request: impl tonic::IntoRequest<super::CommitRequest>,
1849        ) -> std::result::Result<tonic::Response<super::CommitResponse>, tonic::Status> {
1850            self.inner
1851                .ready()
1852                .await
1853                .map_err(|e| {
1854                    tonic::Status::unknown(
1855                        format!("Service was not ready: {}", e.into()),
1856                    )
1857                })?;
1858            let codec = tonic::codec::ProstCodec::default();
1859            let path = http::uri::PathAndQuery::from_static(
1860                "/nominal.procedures.v1.ProceduresService/Commit",
1861            );
1862            let mut req = request.into_request();
1863            req.extensions_mut()
1864                .insert(
1865                    GrpcMethod::new("nominal.procedures.v1.ProceduresService", "Commit"),
1866                );
1867            self.inner.unary(req, path, codec).await
1868        }
1869        /// Searches all procedures, returning paged results
1870        pub async fn search_procedures(
1871            &mut self,
1872            request: impl tonic::IntoRequest<super::SearchProceduresRequest>,
1873        ) -> std::result::Result<
1874            tonic::Response<super::SearchProceduresResponse>,
1875            tonic::Status,
1876        > {
1877            self.inner
1878                .ready()
1879                .await
1880                .map_err(|e| {
1881                    tonic::Status::unknown(
1882                        format!("Service was not ready: {}", e.into()),
1883                    )
1884                })?;
1885            let codec = tonic::codec::ProstCodec::default();
1886            let path = http::uri::PathAndQuery::from_static(
1887                "/nominal.procedures.v1.ProceduresService/SearchProcedures",
1888            );
1889            let mut req = request.into_request();
1890            req.extensions_mut()
1891                .insert(
1892                    GrpcMethod::new(
1893                        "nominal.procedures.v1.ProceduresService",
1894                        "SearchProcedures",
1895                    ),
1896                );
1897            self.inner.unary(req, path, codec).await
1898        }
1899        /// Archive procedures
1900        pub async fn archive_procedures(
1901            &mut self,
1902            request: impl tonic::IntoRequest<super::ArchiveProceduresRequest>,
1903        ) -> std::result::Result<
1904            tonic::Response<super::ArchiveProceduresResponse>,
1905            tonic::Status,
1906        > {
1907            self.inner
1908                .ready()
1909                .await
1910                .map_err(|e| {
1911                    tonic::Status::unknown(
1912                        format!("Service was not ready: {}", e.into()),
1913                    )
1914                })?;
1915            let codec = tonic::codec::ProstCodec::default();
1916            let path = http::uri::PathAndQuery::from_static(
1917                "/nominal.procedures.v1.ProceduresService/ArchiveProcedures",
1918            );
1919            let mut req = request.into_request();
1920            req.extensions_mut()
1921                .insert(
1922                    GrpcMethod::new(
1923                        "nominal.procedures.v1.ProceduresService",
1924                        "ArchiveProcedures",
1925                    ),
1926                );
1927            self.inner.unary(req, path, codec).await
1928        }
1929        /// Unarchive procedures
1930        pub async fn unarchive_procedures(
1931            &mut self,
1932            request: impl tonic::IntoRequest<super::UnarchiveProceduresRequest>,
1933        ) -> std::result::Result<
1934            tonic::Response<super::UnarchiveProceduresResponse>,
1935            tonic::Status,
1936        > {
1937            self.inner
1938                .ready()
1939                .await
1940                .map_err(|e| {
1941                    tonic::Status::unknown(
1942                        format!("Service was not ready: {}", e.into()),
1943                    )
1944                })?;
1945            let codec = tonic::codec::ProstCodec::default();
1946            let path = http::uri::PathAndQuery::from_static(
1947                "/nominal.procedures.v1.ProceduresService/UnarchiveProcedures",
1948            );
1949            let mut req = request.into_request();
1950            req.extensions_mut()
1951                .insert(
1952                    GrpcMethod::new(
1953                        "nominal.procedures.v1.ProceduresService",
1954                        "UnarchiveProcedures",
1955                    ),
1956                );
1957            self.inner.unary(req, path, codec).await
1958        }
1959    }
1960}