#[derive(
Debug,
Clone,
conjure_object::serde::Serialize,
conjure_object::serde::Deserialize,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct ConversationNode {
#[builder(custom(type = super::Comment, convert = Box::new))]
#[serde(rename = "comment")]
comment: Box<super::Comment>,
#[builder(default, list(item(type = super::ConversationNode)))]
#[serde(rename = "replies", skip_serializing_if = "Vec::is_empty", default)]
replies: Vec<super::ConversationNode>,
}
impl ConversationNode {
#[inline]
pub fn new(comment: super::Comment) -> Self {
Self::builder().comment(comment).build()
}
#[inline]
pub fn comment(&self) -> &super::Comment {
&*self.comment
}
#[inline]
pub fn replies(&self) -> &[super::ConversationNode] {
&*self.replies
}
}