Skip to main content

nominal_api/conjure/objects/scout/datareview/api/
pass_state.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 PassState {
16    #[builder(into)]
17    #[serde(rename = "comment")]
18    comment: String,
19    #[serde(rename = "closedBy")]
20    closed_by: super::super::super::rids::api::UserRid,
21}
22impl PassState {
23    /// Constructs a new instance of the type.
24    #[inline]
25    pub fn new(
26        comment: impl Into<String>,
27        closed_by: super::super::super::rids::api::UserRid,
28    ) -> Self {
29        Self::builder().comment(comment).closed_by(closed_by).build()
30    }
31    #[inline]
32    pub fn comment(&self) -> &str {
33        &*self.comment
34    }
35    #[inline]
36    pub fn closed_by(&self) -> &super::super::super::rids::api::UserRid {
37        &self.closed_by
38    }
39}