nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
#[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 {
    /// Constructs a new instance of the type.
    #[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()
    }
    /// RID for the resource that the conversation is associated with.
    #[inline]
    pub fn resource_rid(&self) -> &conjure_object::ResourceIdentifier {
        &self.resource_rid
    }
    /// The type of the resource that the conversation is associated with.
    #[inline]
    pub fn resource_type(&self) -> &super::ResourceType {
        &self.resource_type
    }
    /// The comments on the conversation ordered by creation time.
    /// Empty if the comment has no replies.
    #[inline]
    pub fn comments(&self) -> &[super::ConversationNode] {
        &*self.comments
    }
}