#[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 SummarizeCartesian {
    #[builder(custom(type = super::Cartesian, convert = Box::new))]
    #[serde(rename = "input")]
    input: Box<super::Cartesian>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::CartesianBounds>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "bounds", skip_serializing_if = "Option::is_none", default)]
    bounds: Option<Box<super::CartesianBounds>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::ScatterSummarizationStrategy>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(
        rename = "summarizationStrategy",
        skip_serializing_if = "Option::is_none",
        default
    )]
    summarization_strategy: Option<Box<super::ScatterSummarizationStrategy>>,
    #[builder(default, into)]
    #[serde(rename = "maxPoints", skip_serializing_if = "Option::is_none", default)]
    max_points: Option<i32>,
}
impl SummarizeCartesian {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(input: super::Cartesian) -> Self {
        Self::builder().input(input).build()
    }
    #[inline]
    pub fn input(&self) -> &super::Cartesian {
        &*self.input
    }
    #[inline]
    pub fn bounds(&self) -> Option<&super::CartesianBounds> {
        self.bounds.as_ref().map(|o| &**o)
    }
    /// The summarization strategy to use when there are more than `maxPoints`. Defaults to spatial.
    #[inline]
    pub fn summarization_strategy(
        &self,
    ) -> Option<&super::ScatterSummarizationStrategy> {
        self.summarization_strategy.as_ref().map(|o| &**o)
    }
    /// The maximum number of points to return in the response. If more points are found, a BucketedCartesianPlot
    /// will be returned. Maximum is 10,000. Defaults to 2,000 if not specified.
    #[inline]
    pub fn max_points(&self) -> Option<i32> {
        self.max_points.as_ref().map(|o| *o)
    }
}
