#[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 Conversation {
#[serde(rename = "resourceRid")]
resource_rid: conjure_object::ResourceIdentifier,
#[serde(rename = "resourceType")]
resource_type: super::ResourceType,
#[builder(default, list(item(type = super::ConversationNode)))]
#[serde(rename = "comments", skip_serializing_if = "Vec::is_empty", default)]
comments: Vec<super::ConversationNode>,
}
impl Conversation {
#[inline]
pub fn new(
resource_rid: conjure_object::ResourceIdentifier,
resource_type: super::ResourceType,
) -> Self {
Self::builder().resource_rid(resource_rid).resource_type(resource_type).build()
}
#[inline]
pub fn resource_rid(&self) -> &conjure_object::ResourceIdentifier {
&self.resource_rid
}
#[inline]
pub fn resource_type(&self) -> &super::ResourceType {
&self.resource_type
}
#[inline]
pub fn comments(&self) -> &[super::ConversationNode] {
&*self.comments
}
}