#[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 SummarizeMultivariate {
    #[builder(default, list(item(type = super::MultivariateInput)))]
    #[serde(rename = "inputs", skip_serializing_if = "Vec::is_empty", default)]
    inputs: Vec<super::MultivariateInput>,
    #[builder(default, into)]
    #[serde(rename = "outputFormat", skip_serializing_if = "Option::is_none", default)]
    output_format: Option<super::OutputFormat>,
    #[builder(default, into)]
    #[serde(rename = "bucketCount", skip_serializing_if = "Option::is_none", default)]
    bucket_count: Option<i32>,
    #[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 SummarizeMultivariate {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    /// List of input series to temporally align at the raw point level, then bucket the aligned
    /// tuples together. The series with the largest tag group acts as the "driver" that determines
    /// which raw timestamps are included in the alignment. All subsequent series are aligned to the
    /// driver's raw timestamps using the interpolation configuration. After alignment, the resulting
    /// (x, y, z, ...) tuples are bucketed into time windows and aggregated.
    #[inline]
    pub fn inputs(&self) -> &[super::MultivariateInput] {
        &*self.inputs
    }
    /// The output format of the response. Defaults to LEGACY (JSON).
    #[inline]
    pub fn output_format(&self) -> Option<&super::OutputFormat> {
        self.output_format.as_ref().map(|o| &*o)
    }
    /// The number of buckets to return in the response. Maximum is 10,000. Defaults to 1,000 if not specified.
    #[inline]
    pub fn bucket_count(&self) -> Option<i32> {
        self.bucket_count.as_ref().map(|o| *o)
    }
    /// Controls how the N input series are aligned at the raw point level when producing multivariate buckets.
    ///
    /// When present, the server may fill forward a series value from the most recent prior raw point
    /// (bounded by the interpolation radius). This alignment happens BEFORE bucketing,
    /// ensuring that aggregated values in each bucket are computed from temporally aligned raw tuples.
    ///
    /// When absent, the default interpolation configuration is used.
    #[inline]
    pub fn interpolation_configuration(
        &self,
    ) -> Option<&super::InterpolationConfiguration> {
        self.interpolation_configuration.as_ref().map(|o| &**o)
    }
}
