/// Applies a point-wise transformation to a pair of series.
#[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 BinaryArithmeticSeries {
    #[builder(custom(type = super::NumericSeries, convert = Box::new))]
    #[serde(rename = "input1")]
    input1: Box<super::NumericSeries>,
    #[builder(custom(type = super::NumericSeries, convert = Box::new))]
    #[serde(rename = "input2")]
    input2: Box<super::NumericSeries>,
    #[serde(rename = "operation")]
    operation: super::BinaryArithmeticOperation,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::InterpolationConfiguration>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(
        rename = "interpolationConfiguration",
        skip_serializing_if = "Option::is_none",
        default
    )]
    interpolation_configuration: Option<Box<super::InterpolationConfiguration>>,
}
impl BinaryArithmeticSeries {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        input1: super::NumericSeries,
        input2: super::NumericSeries,
        operation: super::BinaryArithmeticOperation,
    ) -> Self {
        Self::builder().input1(input1).input2(input2).operation(operation).build()
    }
    #[inline]
    pub fn input1(&self) -> &super::NumericSeries {
        &*self.input1
    }
    #[inline]
    pub fn input2(&self) -> &super::NumericSeries {
        &*self.input2
    }
    #[inline]
    pub fn operation(&self) -> &super::BinaryArithmeticOperation {
        &self.operation
    }
    /// Defaults to forward fill interpolation with a 1s interpolation radius
    #[deprecated(note = "Setting interpolation on this node is deprecated.\n")]
    #[inline]
    pub fn interpolation_configuration(
        &self,
    ) -> Option<&super::InterpolationConfiguration> {
        self.interpolation_configuration.as_ref().map(|o| &**o)
    }
}
