#[derive(
Debug,
Clone,
conjure_object::serde::Serialize,
conjure_object::serde::Deserialize,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct CloseWithFurtherAction {
#[builder(into)]
#[serde(rename = "comment")]
comment: String,
#[builder(
default,
custom(
type = impl
Into<Option<super::CloseStrategy>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(rename = "strategy", skip_serializing_if = "Option::is_none", default)]
strategy: Option<Box<super::CloseStrategy>>,
}
impl CloseWithFurtherAction {
#[inline]
pub fn new(comment: impl Into<String>) -> Self {
Self::builder().comment(comment).build()
}
#[inline]
pub fn comment(&self) -> &str {
&*self.comment
}
#[inline]
pub fn strategy(&self) -> Option<&super::CloseStrategy> {
self.strategy.as_ref().map(|o| &**o)
}
}