Skip to main content

nominal_api/conjure/objects/scout/compute/api/deprecated/
summarize_cartesian_node.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    conjure_object::private::DeriveWith
7)]
8#[serde(crate = "conjure_object::serde")]
9#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
10#[conjure_object::private::staged_builder::staged_builder]
11#[builder(crate = conjure_object::private::staged_builder, update, inline)]
12pub struct SummarizeCartesianNode {
13    #[builder(custom(type = super::CartesianNode, convert = Box::new))]
14    #[serde(rename = "input")]
15    input: Box<super::CartesianNode>,
16    #[builder(
17        default,
18        custom(
19            type = impl
20            Into<Option<super::CartesianBounds>>,
21            convert = |v|v.into().map(Box::new)
22        )
23    )]
24    #[serde(rename = "bounds", skip_serializing_if = "Option::is_none", default)]
25    bounds: Option<Box<super::CartesianBounds>>,
26    #[builder(default, into)]
27    #[serde(rename = "maxPoints", skip_serializing_if = "Option::is_none", default)]
28    max_points: Option<i32>,
29}
30impl SummarizeCartesianNode {
31    /// Constructs a new instance of the type.
32    #[inline]
33    pub fn new(input: super::CartesianNode) -> Self {
34        Self::builder().input(input).build()
35    }
36    #[inline]
37    pub fn input(&self) -> &super::CartesianNode {
38        &*self.input
39    }
40    #[inline]
41    pub fn bounds(&self) -> Option<&super::CartesianBounds> {
42        self.bounds.as_ref().map(|o| &**o)
43    }
44    #[inline]
45    pub fn max_points(&self) -> Option<i32> {
46        self.max_points.as_ref().map(|o| *o)
47    }
48}