#[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 NumericPoint {
#[builder(
custom(type = super::super::super::super::api::Timestamp, convert = Box::new)
)]
#[serde(rename = "timestamp")]
timestamp: Box<super::super::super::super::api::Timestamp>,
#[serde(rename = "value")]
#[derive_with(with = conjure_object::private::DoubleWrapper)]
value: f64,
}
impl NumericPoint {
#[inline]
pub fn new(
timestamp: super::super::super::super::api::Timestamp,
value: f64,
) -> Self {
Self::builder().timestamp(timestamp).value(value).build()
}
#[inline]
pub fn timestamp(&self) -> &super::super::super::super::api::Timestamp {
&*self.timestamp
}
#[inline]
pub fn value(&self) -> f64 {
self.value
}
}