openapi_github/models/
team_discussion.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TeamDiscussion {
17 #[serde(rename = "author", deserialize_with = "Option::deserialize")]
18 pub author: Option<Box<models::NullableSimpleUser>>,
19 #[serde(rename = "body")]
21 pub body: String,
22 #[serde(rename = "body_html")]
23 pub body_html: String,
24 #[serde(rename = "body_version")]
26 pub body_version: String,
27 #[serde(rename = "comments_count")]
28 pub comments_count: i32,
29 #[serde(rename = "comments_url")]
30 pub comments_url: String,
31 #[serde(rename = "created_at")]
32 pub created_at: String,
33 #[serde(rename = "last_edited_at", deserialize_with = "Option::deserialize")]
34 pub last_edited_at: Option<String>,
35 #[serde(rename = "html_url")]
36 pub html_url: String,
37 #[serde(rename = "node_id")]
38 pub node_id: String,
39 #[serde(rename = "number")]
41 pub number: i32,
42 #[serde(rename = "pinned")]
44 pub pinned: bool,
45 #[serde(rename = "private")]
47 pub private: bool,
48 #[serde(rename = "team_url")]
49 pub team_url: String,
50 #[serde(rename = "title")]
52 pub title: String,
53 #[serde(rename = "updated_at")]
54 pub updated_at: String,
55 #[serde(rename = "url")]
56 pub url: String,
57 #[serde(rename = "reactions", skip_serializing_if = "Option::is_none")]
58 pub reactions: Option<Box<models::ReactionRollup>>,
59}
60
61impl TeamDiscussion {
62 pub fn new(author: Option<models::NullableSimpleUser>, body: String, body_html: String, body_version: String, comments_count: i32, comments_url: String, created_at: String, last_edited_at: Option<String>, html_url: String, node_id: String, number: i32, pinned: bool, private: bool, team_url: String, title: String, updated_at: String, url: String) -> TeamDiscussion {
64 TeamDiscussion {
65 author: author.map(Box::new),
66 body,
67 body_html,
68 body_version,
69 comments_count,
70 comments_url,
71 created_at,
72 last_edited_at,
73 html_url,
74 node_id,
75 number,
76 pinned,
77 private,
78 team_url,
79 title,
80 updated_at,
81 url,
82 reactions: None,
83 }
84 }
85}
86