#[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 Lock {
    #[serde(rename = "isLocked")]
    is_locked: bool,
    #[builder(default, into)]
    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none", default)]
    updated_at: Option<conjure_object::DateTime<conjure_object::Utc>>,
    #[builder(default, into)]
    #[serde(rename = "updatedByRid", skip_serializing_if = "Option::is_none", default)]
    updated_by_rid: Option<super::super::super::rids::api::UserRid>,
}
impl Lock {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(is_locked: bool) -> Self {
        Self::builder().is_locked(is_locked).build()
    }
    #[inline]
    pub fn is_locked(&self) -> bool {
        self.is_locked
    }
    #[inline]
    pub fn updated_at(&self) -> Option<conjure_object::DateTime<conjure_object::Utc>> {
        self.updated_at.as_ref().map(|o| *o)
    }
    #[inline]
    pub fn updated_by_rid(&self) -> Option<&super::super::super::rids::api::UserRid> {
        self.updated_by_rid.as_ref().map(|o| &*o)
    }
}
