nominal_api/conjure/objects/scout/datareview/api/
close_with_further_action.rs1#[derive(
4 Debug,
5 Clone,
6 conjure_object::serde::Serialize,
7 conjure_object::serde::Deserialize,
8 PartialEq,
9 Eq,
10 PartialOrd,
11 Ord,
12 Hash
13)]
14#[serde(crate = "conjure_object::serde")]
15#[conjure_object::private::staged_builder::staged_builder]
16#[builder(crate = conjure_object::private::staged_builder, update, inline)]
17pub struct CloseWithFurtherAction {
18 #[builder(into)]
19 #[serde(rename = "comment")]
20 comment: String,
21 #[builder(
22 default,
23 custom(
24 type = impl
25 Into<Option<super::CloseStrategy>>,
26 convert = |v|v.into().map(Box::new)
27 )
28 )]
29 #[serde(rename = "strategy", skip_serializing_if = "Option::is_none", default)]
30 strategy: Option<Box<super::CloseStrategy>>,
31}
32impl CloseWithFurtherAction {
33 #[inline]
35 pub fn new(comment: impl Into<String>) -> Self {
36 Self::builder().comment(comment).build()
37 }
38 #[inline]
39 pub fn comment(&self) -> &str {
40 &*self.comment
41 }
42 #[inline]
45 pub fn strategy(&self) -> Option<&super::CloseStrategy> {
46 self.strategy.as_ref().map(|o| &**o)
47 }
48}