/// Intervals come from a range series. Must resolve to literal ranges.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct RangeIntervalSource {
    #[builder(custom(type = super::RangeSeries, convert = Box::new))]
    #[serde(rename = "ranges")]
    ranges: Box<super::RangeSeries>,
    #[builder(default, list(item(type = super::RangeTagSource)))]
    #[serde(rename = "tagBy", skip_serializing_if = "Vec::is_empty", default)]
    tag_by: Vec<super::RangeTagSource>,
}
impl RangeIntervalSource {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(ranges: super::RangeSeries) -> Self {
        Self::builder().ranges(ranges).build()
    }
    #[inline]
    pub fn ranges(&self) -> &super::RangeSeries {
        &*self.ranges
    }
    /// Non-empty ordered list of tag sources. Each contributes a tag key-value pair per range interval.
    #[inline]
    pub fn tag_by(&self) -> &[super::RangeTagSource] {
        &*self.tag_by
    }
}
