#[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 TimestampAndId {
#[builder(
custom(type = super::super::super::super::api::Timestamp, convert = Box::new)
)]
#[serde(rename = "timestamp")]
timestamp: Box<super::super::super::super::api::Timestamp>,
#[builder(default, into)]
#[serde(rename = "id", skip_serializing_if = "Option::is_none", default)]
id: Option<conjure_object::Uuid>,
}
impl TimestampAndId {
#[inline]
pub fn new(timestamp: super::super::super::super::api::Timestamp) -> Self {
Self::builder().timestamp(timestamp).build()
}
#[inline]
pub fn timestamp(&self) -> &super::super::super::super::api::Timestamp {
&*self.timestamp
}
#[inline]
pub fn id(&self) -> Option<conjure_object::Uuid> {
self.id.as_ref().map(|o| *o)
}
}