use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TimelineReviewedEvent {
#[serde(rename = "event")]
pub event: String,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "node_id")]
pub node_id: String,
#[serde(rename = "user")]
pub user: Box<models::SimpleUser>,
#[serde(rename = "body", deserialize_with = "Option::deserialize")]
pub body: Option<String>,
#[serde(rename = "state")]
pub state: String,
#[serde(rename = "html_url")]
pub html_url: String,
#[serde(rename = "pull_request_url")]
pub pull_request_url: String,
#[serde(rename = "_links")]
pub _links: Box<models::TimelineReviewedEventLinks>,
#[serde(rename = "submitted_at", skip_serializing_if = "Option::is_none")]
pub submitted_at: Option<String>,
#[serde(rename = "commit_id")]
pub commit_id: String,
#[serde(rename = "body_html", skip_serializing_if = "Option::is_none")]
pub body_html: Option<String>,
#[serde(rename = "body_text", skip_serializing_if = "Option::is_none")]
pub body_text: Option<String>,
#[serde(rename = "author_association")]
pub author_association: models::AuthorAssociation,
}
impl TimelineReviewedEvent {
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 {
TimelineReviewedEvent {
event,
id,
node_id,
user: Box::new(user),
body,
state,
html_url,
pull_request_url,
_links: Box::new(_links),
submitted_at: None,
commit_id,
body_html: None,
body_text: None,
author_association,
}
}
}