Skip to main content

nominal_api/conjure/objects/scout/compute/api/deprecated/
summarize_ranges_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 SummarizeRangesNode {
13    #[builder(custom(type = super::RangesNode, convert = Box::new))]
14    #[serde(rename = "input")]
15    input: Box<super::RangesNode>,
16    #[builder(default, into)]
17    #[serde(rename = "maxRanges", skip_serializing_if = "Option::is_none", default)]
18    max_ranges: Option<i32>,
19}
20impl SummarizeRangesNode {
21    /// Constructs a new instance of the type.
22    #[inline]
23    pub fn new(input: super::RangesNode) -> Self {
24        Self::builder().input(input).build()
25    }
26    #[inline]
27    pub fn input(&self) -> &super::RangesNode {
28        &*self.input
29    }
30    #[inline]
31    pub fn max_ranges(&self) -> Option<i32> {
32        self.max_ranges.as_ref().map(|o| *o)
33    }
34}