/// Represents a time duration with a unit for user-facing display
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct UserDuration {
    #[serde(rename = "duration")]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    duration: f64,
    #[serde(rename = "unit")]
    unit: super::super::super::super::api::TimeUnit,
}
impl UserDuration {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(duration: f64, unit: super::super::super::super::api::TimeUnit) -> Self {
        Self::builder().duration(duration).unit(unit).build()
    }
    #[inline]
    pub fn duration(&self) -> f64 {
        self.duration
    }
    #[inline]
    pub fn unit(&self) -> &super::super::super::super::api::TimeUnit {
        &self.unit
    }
}
