/// Returns in relative time to the supplied timestamp.
#[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 RelativeTimestampFormat {
    #[builder(
        custom(type = super::super::super::super::api::Timestamp, convert = Box::new)
    )]
    #[serde(rename = "relativeTo")]
    relative_to: Box<super::super::super::super::api::Timestamp>,
    #[serde(rename = "timeUnit")]
    time_unit: super::super::super::super::api::TimeUnit,
}
impl RelativeTimestampFormat {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        relative_to: super::super::super::super::api::Timestamp,
        time_unit: super::super::super::super::api::TimeUnit,
    ) -> Self {
        Self::builder().relative_to(relative_to).time_unit(time_unit).build()
    }
    #[inline]
    pub fn relative_to(&self) -> &super::super::super::super::api::Timestamp {
        &*self.relative_to
    }
    #[inline]
    pub fn time_unit(&self) -> &super::super::super::super::api::TimeUnit {
        &self.time_unit
    }
}
