cod_types/api/create_options/
create_label_options.rs

1use serde::Serialize;
2
3#[derive(Serialize)]
4pub struct CreateLabelOption {
5    color: String,
6    description: String,
7    name: String,
8}
9
10impl CreateLabelOption {
11    pub fn new(name: String) -> Self {
12        Self {
13            color: String::from("#000000"),
14            description: String::from("No description"),
15            name,
16        }
17    }
18
19    pub fn with_color(mut self, color: String) -> Self {
20        self.color = color;
21        self
22    }
23
24    pub fn with_description(mut self, description: String) -> Self {
25        self.description = description;
26        self
27    }
28}