Skip to main content

nominal_api/conjure/objects/scout/compute/api/
summarize_ranges.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 SummarizeRanges {
13    #[builder(custom(type = super::RangeSeries, convert = Box::new))]
14    #[serde(rename = "input")]
15    input: Box<super::RangeSeries>,
16    #[builder(default, into)]
17    #[serde(rename = "maxRanges", skip_serializing_if = "Option::is_none", default)]
18    max_ranges: Option<i32>,
19}
20impl SummarizeRanges {
21    /// Constructs a new instance of the type.
22    #[inline]
23    pub fn new(input: super::RangeSeries) -> Self {
24        Self::builder().input(input).build()
25    }
26    #[inline]
27    pub fn input(&self) -> &super::RangeSeries {
28        &*self.input
29    }
30    /// The maximum number of ranges to return in the response. If more ranges are found, a RangesSummary
31    /// will be returned. Defaults to 2000 if not specified.
32    #[inline]
33    pub fn max_ranges(&self) -> Option<i32> {
34        self.max_ranges.as_ref().map(|o| *o)
35    }
36}