Skip to main content

nominal_api/conjure/objects/scout/compute/api/
ranges_summary.rs

1/// A summary of the ranges returned from a SummarizeRanges request. Returned when the number of ranges
2/// found is above a threshold.
3#[derive(
4    Debug,
5    Clone,
6    conjure_object::serde::Serialize,
7    conjure_object::serde::Deserialize,
8    conjure_object::private::DeriveWith
9)]
10#[serde(crate = "conjure_object::serde")]
11#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
12#[conjure_object::private::staged_builder::staged_builder]
13#[builder(crate = conjure_object::private::staged_builder, update, inline)]
14pub struct RangesSummary {
15    #[builder(default, list(item(type = super::RangeSummary)))]
16    #[serde(rename = "rangesSummary", skip_serializing_if = "Vec::is_empty", default)]
17    ranges_summary: Vec<super::RangeSummary>,
18}
19impl RangesSummary {
20    /// Constructs a new instance of the type.
21    #[inline]
22    pub fn new() -> Self {
23        Self::builder().build()
24    }
25    #[inline]
26    pub fn ranges_summary(&self) -> &[super::RangeSummary] {
27        &*self.ranges_summary
28    }
29}