nominal_api/conjure/objects/scout/compute/api/
range_interval_source.rs1#[derive(
3 Debug,
4 Clone,
5 conjure_object::serde::Serialize,
6 conjure_object::serde::Deserialize,
7 conjure_object::private::DeriveWith
8)]
9#[serde(crate = "conjure_object::serde")]
10#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
11#[conjure_object::private::staged_builder::staged_builder]
12#[builder(crate = conjure_object::private::staged_builder, update, inline)]
13pub struct RangeIntervalSource {
14 #[builder(custom(type = super::RangeSeries, convert = Box::new))]
15 #[serde(rename = "ranges")]
16 ranges: Box<super::RangeSeries>,
17 #[builder(default, list(item(type = super::RangeTagSource)))]
18 #[serde(rename = "tagBy", skip_serializing_if = "Vec::is_empty", default)]
19 tag_by: Vec<super::RangeTagSource>,
20}
21impl RangeIntervalSource {
22 #[inline]
24 pub fn new(ranges: super::RangeSeries) -> Self {
25 Self::builder().ranges(ranges).build()
26 }
27 #[inline]
28 pub fn ranges(&self) -> &super::RangeSeries {
29 &*self.ranges
30 }
31 #[inline]
33 pub fn tag_by(&self) -> &[super::RangeTagSource] {
34 &*self.tag_by
35 }
36}