Skip to main content

nominal_api_conjure/conjure/objects/api/
in_progress_result.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 InProgressResult {
16    #[builder(
17        default,
18        custom(
19            type = impl
20            Into<Option<super::InProgressDetails>>,
21            convert = |v|v.into().map(Box::new)
22        )
23    )]
24    #[serde(
25        rename = "inProgressDetails",
26        skip_serializing_if = "Option::is_none",
27        default
28    )]
29    in_progress_details: Option<Box<super::InProgressDetails>>,
30}
31impl InProgressResult {
32    /// Constructs a new instance of the type.
33    #[inline]
34    pub fn new() -> Self {
35        Self::builder().build()
36    }
37    #[inline]
38    pub fn in_progress_details(&self) -> Option<&super::InProgressDetails> {
39        self.in_progress_details.as_ref().map(|o| &**o)
40    }
41}