openapi_github/models/
timeline_reviewed_event.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TimelineReviewedEvent {
17 #[serde(rename = "event")]
18 pub event: String,
19 #[serde(rename = "id")]
21 pub id: i32,
22 #[serde(rename = "node_id")]
23 pub node_id: String,
24 #[serde(rename = "user")]
25 pub user: Box<models::SimpleUser>,
26 #[serde(rename = "body", deserialize_with = "Option::deserialize")]
28 pub body: Option<String>,
29 #[serde(rename = "state")]
30 pub state: String,
31 #[serde(rename = "html_url")]
32 pub html_url: String,
33 #[serde(rename = "pull_request_url")]
34 pub pull_request_url: String,
35 #[serde(rename = "_links")]
36 pub _links: Box<models::TimelineReviewedEventLinks>,
37 #[serde(rename = "submitted_at", skip_serializing_if = "Option::is_none")]
38 pub submitted_at: Option<String>,
39 #[serde(rename = "commit_id")]
41 pub commit_id: String,
42 #[serde(rename = "body_html", skip_serializing_if = "Option::is_none")]
43 pub body_html: Option<String>,
44 #[serde(rename = "body_text", skip_serializing_if = "Option::is_none")]
45 pub body_text: Option<String>,
46 #[serde(rename = "author_association")]
47 pub author_association: models::AuthorAssociation,
48}
49
50impl TimelineReviewedEvent {
51 pub fn new(event: String, id: i32, node_id: String, user: models::SimpleUser, body: Option<String>, state: String, html_url: String, pull_request_url: String, _links: models::TimelineReviewedEventLinks, commit_id: String, author_association: models::AuthorAssociation) -> TimelineReviewedEvent {
53 TimelineReviewedEvent {
54 event,
55 id,
56 node_id,
57 user: Box::new(user),
58 body,
59 state,
60 html_url,
61 pull_request_url,
62 _links: Box::new(_links),
63 submitted_at: None,
64 commit_id,
65 body_html: None,
66 body_text: None,
67 author_association,
68 }
69 }
70}
71