reactive_graph/client/types/flows/
commands.rs

1use crate::client::types::flows::args::add_entity_instance::FlowTypeAddEntityInstanceArgs;
2use crate::client::types::flows::args::add_extension::FlowTypeAddExtensionArgs;
3use crate::client::types::flows::args::add_variable::FlowTypeAddVariableArgs;
4use crate::client::types::flows::args::create::CreateFlowTypeArgs;
5use crate::client::types::flows::args::flow_extension_type::FlowExtensionTypeIdArgs;
6use crate::client::types::flows::args::flow_type_variable::FlowTypeVariableArgs;
7use crate::client::types::flows::args::parse_flow_ty;
8use crate::client::types::flows::args::remove_entity_instance::FlowTypeRemoveEntityInstanceArgs;
9use crate::client::types::flows::args::update_description::FlowTypeUpdateDescriptionArgs;
10use clap::Subcommand;
11use reactive_graph_graph::FlowTypeId;
12
13#[derive(Subcommand, Debug, Clone)]
14pub(crate) enum FlowTypesCommands {
15    /// List all flow types.
16    #[non_exhaustive]
17    List,
18    /// Prints a single flow type.
19    #[non_exhaustive]
20    Get {
21        #[arg(name = "flow_type", value_parser = parse_flow_ty)]
22        flow_ty: FlowTypeId,
23    },
24    /// List the variables of a flow type.
25    #[non_exhaustive]
26    ListVariables {
27        #[arg(name = "flow_type", value_parser = parse_flow_ty)]
28        flow_ty: FlowTypeId,
29    },
30    /// List the extensions of a flow type.
31    #[non_exhaustive]
32    ListExtensions {
33        #[arg(name = "flow_type", value_parser = parse_flow_ty)]
34        flow_ty: FlowTypeId,
35    },
36    /// Prints the JSON Schema of a flow type.
37    #[non_exhaustive]
38    GetJsonSchema {
39        #[arg(name = "flow_type", value_parser = parse_flow_ty)]
40        flow_ty: FlowTypeId,
41    },
42    /// Creates a new flow type.
43    #[non_exhaustive]
44    Create(CreateFlowTypeArgs),
45    /// Deletes a flow type.
46    #[non_exhaustive]
47    Delete {
48        #[arg(name = "flow_type", value_parser = parse_flow_ty)]
49        flow_ty: FlowTypeId,
50    },
51    /// Adds a property to a flow type.
52    #[non_exhaustive]
53    AddVariable(FlowTypeAddVariableArgs),
54    /// Removes a property from a flow type.
55    #[non_exhaustive]
56    RemoveVariable(FlowTypeVariableArgs),
57    /// Adds an extension to a flow type.
58    #[non_exhaustive]
59    AddExtension(FlowTypeAddExtensionArgs),
60    /// Removes an extension from a flow type.
61    #[non_exhaustive]
62    RemoveExtension(FlowExtensionTypeIdArgs),
63    /// Updates the description of a flow type.
64    #[non_exhaustive]
65    UpdateDescription(FlowTypeUpdateDescriptionArgs),
66    /// Adds a new entity instance to a flow type.
67    #[non_exhaustive]
68    AddEntityInstance(FlowTypeAddEntityInstanceArgs),
69    /// Removes an entity instance to a flow type.
70    #[non_exhaustive]
71    RemoveEntityInstance(FlowTypeRemoveEntityInstanceArgs),
72    /// Prints the JSON Schema of flow types.
73    #[non_exhaustive]
74    JsonSchema,
75}