windmill_api/models/flow_group.rs
1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.664.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// FlowGroup : A semantic group of flow modules for organizational purposes. Does not affect execution — modules remain in their original position in the flow. Groups provide naming and collapsibility in the editor. Members are computed dynamically from all nodes on paths between start_id and end_id.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FlowGroup {
17 /// Display name for this group
18 #[serde(rename = "summary", skip_serializing_if = "Option::is_none")]
19 pub summary: Option<String>,
20 /// Markdown note shown below the group header
21 #[serde(rename = "note", skip_serializing_if = "Option::is_none")]
22 pub note: Option<String>,
23 /// If true, this group is collapsed by default in the flow editor. UI hint only.
24 #[serde(rename = "autocollapse", skip_serializing_if = "Option::is_none")]
25 pub autocollapse: Option<bool>,
26 /// ID of the first flow module in this group (topological entry point)
27 #[serde(rename = "start_id")]
28 pub start_id: String,
29 /// ID of the last flow module in this group (topological exit point)
30 #[serde(rename = "end_id")]
31 pub end_id: String,
32 /// Color for the group in the flow editor
33 #[serde(rename = "color", skip_serializing_if = "Option::is_none")]
34 pub color: Option<String>,
35}
36
37impl FlowGroup {
38 /// A semantic group of flow modules for organizational purposes. Does not affect execution — modules remain in their original position in the flow. Groups provide naming and collapsibility in the editor. Members are computed dynamically from all nodes on paths between start_id and end_id.
39 pub fn new(start_id: String, end_id: String) -> FlowGroup {
40 FlowGroup {
41 summary: None,
42 note: None,
43 autocollapse: None,
44 start_id,
45 end_id,
46 color: None,
47 }
48 }
49}
50