use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DeploymentRequestComment {
#[serde(rename = "id")]
pub id: i64,
#[serde(rename = "parent_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub parent_id: Option<Option<i64>>,
#[serde(rename = "author")]
pub author: String,
#[serde(rename = "author_email")]
pub author_email: String,
#[serde(rename = "body")]
pub body: String,
#[serde(rename = "anchor_kind", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub anchor_kind: Option<Option<String>>,
#[serde(rename = "anchor_path", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub anchor_path: Option<Option<String>>,
#[serde(rename = "obsolete")]
pub obsolete: bool,
#[serde(rename = "created_at")]
pub created_at: String,
}
impl DeploymentRequestComment {
pub fn new(id: i64, author: String, author_email: String, body: String, obsolete: bool, created_at: String) -> DeploymentRequestComment {
DeploymentRequestComment {
id,
parent_id: None,
author,
author_email,
body,
anchor_kind: None,
anchor_path: None,
obsolete,
created_at,
}
}
}