/// Combines named input series into one struct-valued series. Each map key becomes a field name in the
/// resulting struct; a downstream UDF receives the struct as a JSON object keyed by these names and parses
/// it itself. Alignment uses the interpolation configuration before producing row-aligned values.
#[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 CombineStructSeries {
    #[builder(default, map(key(type = String, into), value(type = super::Series)))]
    #[serde(
        rename = "inputs",
        skip_serializing_if = "std::collections::BTreeMap::is_empty",
        default
    )]
    inputs: std::collections::BTreeMap<String, super::Series>,
    #[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 CombineStructSeries {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    /// Input series keyed by struct field name.
    #[inline]
    pub fn inputs(&self) -> &std::collections::BTreeMap<String, super::Series> {
        &self.inputs
    }
    /// Optional interpolation rules used when aligning input series before combining them.
    #[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)
    }
}
