/// Combines multiple enum series into one. If {@code operation} is present, duplicate
/// timestamps within a tag group are merged by the given operation. If {@code operation} is
/// absent, the inputs are concatenated (SQL {@code UNION ALL}) and duplicate timestamps are
/// preserved; callers that need aggregation should wrap the output downstream.
#[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 EnumUnionSeriesNode {
    #[builder(default, list(item(type = super::EnumSeriesNode)))]
    #[serde(rename = "input", skip_serializing_if = "Vec::is_empty", default)]
    input: Vec<super::EnumSeriesNode>,
    #[builder(default, into)]
    #[serde(rename = "operation", skip_serializing_if = "Option::is_none", default)]
    operation: Option<super::super::super::api::EnumUnionOperation>,
}
impl EnumUnionSeriesNode {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    #[inline]
    pub fn input(&self) -> &[super::EnumSeriesNode] {
        &*self.input
    }
    #[inline]
    pub fn operation(&self) -> Option<&super::super::super::api::EnumUnionOperation> {
        self.operation.as_ref().map(|o| &*o)
    }
}
