reactive_graph/client/instances/flows/args/
create.rs

1use crate::client::types::flows::args::parse_flow_ty;
2use clap::Args;
3use reactive_graph_graph::FlowTypeId;
4use uuid::Uuid;
5
6#[derive(Args, Debug, Clone)]
7pub(crate) struct CreateFlowInstanceArgs {
8    /// The fully qualified namespace of the flow type.
9    #[clap(name = "flow_type", value_parser = parse_flow_ty)]
10    pub flow_ty: FlowTypeId,
11
12    /// The entity instance id.
13    #[clap(short, long)]
14    pub id: Option<Uuid>,
15
16    /// The name of the flow instance.
17    #[clap(short, long)]
18    pub name: Option<String>,
19
20    /// Textual description of the flow instance.
21    #[clap(short, long)]
22    pub description: Option<String>,
23}
24
25impl CreateFlowInstanceArgs {
26    // pub fn properties(&self) -> PropertyInstances {
27    //     match &self.properties {
28    //         None => PropertyInstances::new(),
29    //         Some(properties) => properties.iter().map(|(name, value)| (name.clone(), value.clone())).collect(),
30    //     }
31    // }
32}