Skip to main content

nominal_api/conjure/objects/comments/api/
reaction.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    PartialEq,
7    Eq,
8    PartialOrd,
9    Ord,
10    Hash
11)]
12#[serde(crate = "conjure_object::serde")]
13#[conjure_object::private::staged_builder::staged_builder]
14#[builder(crate = conjure_object::private::staged_builder, update, inline)]
15pub struct Reaction {
16    #[serde(rename = "rid")]
17    rid: super::ReactionRid,
18    #[serde(rename = "userRid")]
19    user_rid: conjure_object::ResourceIdentifier,
20    #[serde(rename = "createdAt")]
21    created_at: conjure_object::DateTime<conjure_object::Utc>,
22    #[serde(rename = "type")]
23    type_: super::ReactionType,
24}
25impl Reaction {
26    /// Unique resource identifier for the reaction
27    #[inline]
28    pub fn rid(&self) -> &super::ReactionRid {
29        &self.rid
30    }
31    /// The user who authored the reaction
32    #[inline]
33    pub fn user_rid(&self) -> &conjure_object::ResourceIdentifier {
34        &self.user_rid
35    }
36    /// The time the reaction was created
37    #[inline]
38    pub fn created_at(&self) -> conjure_object::DateTime<conjure_object::Utc> {
39        self.created_at
40    }
41    /// The type of reaction
42    #[inline]
43    pub fn type_(&self) -> &super::ReactionType {
44        &self.type_
45    }
46}