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 CreateCommentRequest {
    #[builder(custom(type = super::CommentParent, convert = Box::new))]
    #[serde(rename = "parent")]
    parent: Box<super::CommentParent>,
    #[builder(into)]
    #[serde(rename = "content")]
    content: String,
    #[builder(default, set(item(type = super::super::super::api::rids::AttachmentRid)))]
    #[serde(
        rename = "attachments",
        skip_serializing_if = "std::collections::BTreeSet::is_empty",
        default
    )]
    attachments: std::collections::BTreeSet<
        super::super::super::api::rids::AttachmentRid,
    >,
}
impl CreateCommentRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(parent: super::CommentParent, content: impl Into<String>) -> Self {
        Self::builder().parent(parent).content(content).build()
    }
    #[inline]
    pub fn parent(&self) -> &super::CommentParent {
        &*self.parent
    }
    /// The content of the comment. Markdown supported.
    #[inline]
    pub fn content(&self) -> &str {
        &*self.content
    }
    /// Attachments to the comment.
    #[inline]
    pub fn attachments(
        &self,
    ) -> &std::collections::BTreeSet<super::super::super::api::rids::AttachmentRid> {
        &self.attachments
    }
}