nominal-api-conjure 0.1343.0

Conjure HTTP API bindings for the Nominal platform
Documentation
/// Aggregate view of the streaming sessions sharing a single (source, dataset) pair.
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct StreamingSource {
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::StreamingSessionSource>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "source", skip_serializing_if = "Option::is_none", default)]
    source: Option<Box<super::StreamingSessionSource>>,
    #[serde(rename = "datasetRid")]
    dataset_rid: super::super::super::api::rids::DatasetRid,
    #[serde(rename = "sessionCount")]
    session_count: conjure_object::SafeLong,
    #[serde(rename = "totalPointsCount")]
    total_points_count: conjure_object::SafeLong,
    #[builder(custom(type = super::super::super::api::Timestamp, convert = Box::new))]
    #[serde(rename = "earliestCreatedAt")]
    earliest_created_at: Box<super::super::super::api::Timestamp>,
    #[builder(custom(type = super::super::super::api::Timestamp, convert = Box::new))]
    #[serde(rename = "latestLastSeenAt")]
    latest_last_seen_at: Box<super::super::super::api::Timestamp>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::super::super::api::Range>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "mergedBounds", skip_serializing_if = "Option::is_none", default)]
    merged_bounds: Option<Box<super::super::super::api::Range>>,
    #[serde(rename = "anyInProgress")]
    any_in_progress: bool,
}
impl StreamingSource {
    /// The source attribution shared by the aggregated sessions. Absent for unattributed sessions.
    #[inline]
    pub fn source(&self) -> Option<&super::StreamingSessionSource> {
        self.source.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn dataset_rid(&self) -> &super::super::super::api::rids::DatasetRid {
        &self.dataset_rid
    }
    /// Number of sessions aggregated into this group.
    #[inline]
    pub fn session_count(&self) -> conjure_object::SafeLong {
        self.session_count
    }
    /// Sum of the points counts across the aggregated sessions.
    #[inline]
    pub fn total_points_count(&self) -> conjure_object::SafeLong {
        self.total_points_count
    }
    /// Creation time of the oldest aggregated session.
    #[inline]
    pub fn earliest_created_at(&self) -> &super::super::super::api::Timestamp {
        &*self.earliest_created_at
    }
    /// Most recent heartbeat time across the aggregated sessions.
    #[inline]
    pub fn latest_last_seen_at(&self) -> &super::super::super::api::Timestamp {
        &*self.latest_last_seen_at
    }
    /// Union of the data bounds across the aggregated sessions, if any session has bounds.
    #[inline]
    pub fn merged_bounds(&self) -> Option<&super::super::super::api::Range> {
        self.merged_bounds.as_ref().map(|o| &**o)
    }
    /// True if at least one aggregated session is in progress.
    #[inline]
    pub fn any_in_progress(&self) -> bool {
        self.any_in_progress
    }
}