1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
* Windmill API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.684.0
* Contact: contact@windmill.dev
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// FlowNote : A sticky note attached to a flow for documentation and annotation
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FlowNote {
/// Unique identifier for the note
#[serde(rename = "id")]
pub id: String,
/// Content of the note
#[serde(rename = "text")]
pub text: String,
#[serde(rename = "position", skip_serializing_if = "Option::is_none")]
pub position: Option<Box<models::FlowNotePosition>>,
#[serde(rename = "size", skip_serializing_if = "Option::is_none")]
pub size: Option<Box<models::FlowNoteSize>>,
/// Color of the note (e.g., \"yellow\", \"#ffff00\")
#[serde(rename = "color")]
pub color: String,
/// Type of note - 'free' for standalone notes, 'group' for notes that group other nodes
#[serde(rename = "type")]
pub r#type: Type,
/// Whether the note is locked and cannot be edited or moved
#[serde(rename = "locked", skip_serializing_if = "Option::is_none")]
pub locked: Option<bool>,
/// For group notes, the IDs of nodes contained within this group
#[serde(rename = "contained_node_ids", skip_serializing_if = "Option::is_none")]
pub contained_node_ids: Option<Vec<String>>,
}
impl FlowNote {
/// A sticky note attached to a flow for documentation and annotation
pub fn new(id: String, text: String, color: String, r#type: Type) -> FlowNote {
FlowNote {
id,
text,
position: None,
size: None,
color,
r#type,
locked: None,
contained_node_ids: None,
}
}
}
/// Type of note - 'free' for standalone notes, 'group' for notes that group other nodes
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "free")]
Free,
#[serde(rename = "group")]
Group,
}
impl Default for Type {
fn default() -> Type {
Self::Free
}
}