nominal_api/conjure/objects/scout/datareview/api/
reopen.rs1#[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 Reopen {
16 #[builder(into)]
17 #[serde(rename = "comment")]
18 comment: String,
19 #[builder(
20 default,
21 custom(
22 type = impl
23 Into<Option<super::ReopenStrategy>>,
24 convert = |v|v.into().map(Box::new)
25 )
26 )]
27 #[serde(rename = "strategy", skip_serializing_if = "Option::is_none", default)]
28 strategy: Option<Box<super::ReopenStrategy>>,
29}
30impl Reopen {
31 #[inline]
33 pub fn new(comment: impl Into<String>) -> Self {
34 Self::builder().comment(comment).build()
35 }
36 #[inline]
37 pub fn comment(&self) -> &str {
38 &*self.comment
39 }
40 #[inline]
43 pub fn strategy(&self) -> Option<&super::ReopenStrategy> {
44 self.strategy.as_ref().map(|o| &**o)
45 }
46}