gitea_rs/models/
create_label_option.rs

1/*
2 * Gitea API.
3 *
4 * This documentation describes the Gitea API.
5 *
6 * The version of the OpenAPI document: 1.19.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// CreateLabelOption : CreateLabelOption options for creating a label
12
13
14
15#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
16pub struct CreateLabelOption {
17    #[serde(rename = "color")]
18    pub color: String,
19    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
20    pub description: Option<String>,
21    #[serde(rename = "exclusive", skip_serializing_if = "Option::is_none")]
22    pub exclusive: Option<bool>,
23    #[serde(rename = "name")]
24    pub name: String,
25}
26
27impl CreateLabelOption {
28    /// CreateLabelOption options for creating a label
29    pub fn new(color: String, name: String) -> CreateLabelOption {
30        CreateLabelOption {
31            color,
32            description: None,
33            exclusive: None,
34            name,
35        }
36    }
37}
38
39