#[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 NumericPropertyPredicate {
#[serde(rename = "name")]
name: super::PropertyName,
#[serde(rename = "value")]
#[derive_with(with = conjure_object::private::DoubleWrapper)]
value: f64,
#[serde(rename = "operator")]
operator: super::PropertyComparisonOperator,
}
impl NumericPropertyPredicate {
#[inline]
pub fn new(
name: super::PropertyName,
value: f64,
operator: super::PropertyComparisonOperator,
) -> Self {
Self::builder().name(name).value(value).operator(operator).build()
}
#[inline]
pub fn name(&self) -> &super::PropertyName {
&self.name
}
#[inline]
pub fn value(&self) -> f64 {
self.value
}
#[inline]
pub fn operator(&self) -> &super::PropertyComparisonOperator {
&self.operator
}
}