Skip to main content

nominal_api/conjure/objects/comments/api/
comment_parent_resource.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 CommentParentResource {
16    #[serde(rename = "resourceType")]
17    resource_type: super::ResourceType,
18    #[serde(rename = "resourceRid")]
19    resource_rid: conjure_object::ResourceIdentifier,
20}
21impl CommentParentResource {
22    /// Constructs a new instance of the type.
23    #[inline]
24    pub fn new(
25        resource_type: super::ResourceType,
26        resource_rid: conjure_object::ResourceIdentifier,
27    ) -> Self {
28        Self::builder().resource_type(resource_type).resource_rid(resource_rid).build()
29    }
30    /// The type of resource that the comment is associated with
31    #[inline]
32    pub fn resource_type(&self) -> &super::ResourceType {
33        &self.resource_type
34    }
35    /// The resource identifier for the resource that the comment is associated with. For example, a run or a workbook.
36    #[inline]
37    pub fn resource_rid(&self) -> &conjure_object::ResourceIdentifier {
38        &self.resource_rid
39    }
40}