#[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 UpdateDispositionRequest {
    #[serde(rename = "rid")]
    rid: conjure_object::ResourceIdentifier,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::EventDisposition>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "disposition", skip_serializing_if = "Option::is_none", default)]
    disposition: Option<Box<super::EventDisposition>>,
}
impl UpdateDispositionRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(rid: conjure_object::ResourceIdentifier) -> Self {
        Self::builder().rid(rid).build()
    }
    #[inline]
    pub fn rid(&self) -> &conjure_object::ResourceIdentifier {
        &self.rid
    }
    /// The new disposition for the event.
    /// If empty, will remove the disposition from the event.
    #[inline]
    pub fn disposition(&self) -> Option<&super::EventDisposition> {
        self.disposition.as_ref().map(|o| &**o)
    }
}
