/// Combines multiple numeric series together and outputs a single series. By default, points from the inputs are
/// concatenated (SQL {@code UNION ALL}) and duplicate timestamps across inputs are preserved. To aggregate values
/// that share a timestamp, do a separate aggregation step next.
#[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 NumericUnionSeries {
    #[builder(default, list(item(type = super::NumericSeries)))]
    #[serde(rename = "input", skip_serializing_if = "Vec::is_empty", default)]
    input: Vec<super::NumericSeries>,
    #[builder(default, into)]
    #[serde(rename = "operation", skip_serializing_if = "Option::is_none", default)]
    operation: Option<super::NumericUnionOperation>,
}
impl NumericUnionSeries {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    /// Input series to union
    #[inline]
    pub fn input(&self) -> &[super::NumericSeries] {
        &*self.input
    }
    /// The strategy to merge points with duplicate timestamps.
    #[deprecated(
        note = "Apply aggregations as a separate step over the unioned output.\n"
    )]
    #[inline]
    pub fn operation(&self) -> Option<&super::NumericUnionOperation> {
        self.operation.as_ref().map(|o| &*o)
    }
}
