openapi_github/models/
label.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Label {
16 #[serde(rename = "color")]
18 pub color: String,
19 #[serde(rename = "default")]
20 pub default: bool,
21 #[serde(rename = "description", deserialize_with = "Option::deserialize")]
22 pub description: Option<String>,
23 #[serde(rename = "id")]
24 pub id: i32,
25 #[serde(rename = "name")]
27 pub name: String,
28 #[serde(rename = "node_id")]
29 pub node_id: String,
30 #[serde(rename = "url")]
32 pub url: String,
33}
34
35impl Label {
36 pub fn new(color: String, default: bool, description: Option<String>, id: i32, name: String, node_id: String, url: String) -> Label {
37 Label {
38 color,
39 default,
40 description,
41 id,
42 name,
43 node_id,
44 url,
45 }
46 }
47}
48