#[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 EnumToNumericSeriesNode {
    #[builder(custom(type = super::EnumSeriesNode, convert = Box::new))]
    #[serde(rename = "input")]
    input: Box<super::EnumSeriesNode>,
    #[builder(default, map(key(type = String, into), value(type = f64)))]
    #[serde(
        rename = "mapping",
        skip_serializing_if = "std::collections::BTreeMap::is_empty",
        default
    )]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    mapping: std::collections::BTreeMap<String, f64>,
    #[builder(default, into)]
    #[serde(rename = "defaultValue", skip_serializing_if = "Option::is_none", default)]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    default_value: Option<f64>,
}
impl EnumToNumericSeriesNode {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(input: super::EnumSeriesNode) -> Self {
        Self::builder().input(input).build()
    }
    #[inline]
    pub fn input(&self) -> &super::EnumSeriesNode {
        &*self.input
    }
    #[inline]
    pub fn mapping(&self) -> &std::collections::BTreeMap<String, f64> {
        &self.mapping
    }
    #[inline]
    pub fn default_value(&self) -> Option<f64> {
        self.default_value.as_ref().map(|o| *o)
    }
}
