/// Applies IIR-based signal filtering to input series. Includes low-pass, high-pass, band-pass, and band-stop
/// filters. Currently supports variable-order bidirectional Butterworth filters, with fixed-size padding based
/// on SciPy output.
#[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 SignalFilterSeriesNode {
    #[builder(custom(type = super::NumericSeriesNode, convert = Box::new))]
    #[serde(rename = "input")]
    input: Box<super::NumericSeriesNode>,
    #[builder(custom(type = super::SignalFilterConfiguration, convert = Box::new))]
    #[serde(rename = "signalFilterConfiguration")]
    signal_filter_configuration: Box<super::SignalFilterConfiguration>,
    #[serde(rename = "order")]
    order: i32,
    #[builder(default, into)]
    #[serde(
        rename = "samplingFrequency",
        skip_serializing_if = "Option::is_none",
        default
    )]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    sampling_frequency: Option<f64>,
}
impl SignalFilterSeriesNode {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        input: super::NumericSeriesNode,
        signal_filter_configuration: super::SignalFilterConfiguration,
        order: i32,
    ) -> Self {
        Self::builder()
            .input(input)
            .signal_filter_configuration(signal_filter_configuration)
            .order(order)
            .build()
    }
    #[inline]
    pub fn input(&self) -> &super::NumericSeriesNode {
        &*self.input
    }
    /// Configuration for the signal filter, including filter type, cutoff frequency, and order.
    #[inline]
    pub fn signal_filter_configuration(&self) -> &super::SignalFilterConfiguration {
        &*self.signal_filter_configuration
    }
    /// Order of filter. Must be a positive integer, and is effectively doubled for bidirectional filters.
    #[inline]
    pub fn order(&self) -> i32 {
        self.order
    }
    /// The sampling frequency of the input series. Used to calculate normalized frequency for cutoff frequencies.
    /// Defaults to number of points divided by timespan of series.
    #[inline]
    pub fn sampling_frequency(&self) -> Option<f64> {
        self.sampling_frequency.as_ref().map(|o| *o)
    }
}
