Skip to main content

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

1/// Queries events and emits an enum series where each data point corresponds to an event and the enum value is
2/// derived from a single event field (property, label, etc).
3#[derive(
4    Debug,
5    Clone,
6    conjure_object::serde::Serialize,
7    conjure_object::serde::Deserialize,
8    PartialEq,
9    Eq,
10    PartialOrd,
11    Ord,
12    Hash
13)]
14#[serde(crate = "conjure_object::serde")]
15#[conjure_object::private::staged_builder::staged_builder]
16#[builder(crate = conjure_object::private::staged_builder, update, inline)]
17pub struct EventsEnumSeries {
18    #[builder(
19        custom(
20            type = super::super::super::rids::api::ComputeEventQuery,
21            convert = Box::new
22        )
23    )]
24    #[serde(rename = "query")]
25    query: Box<super::super::super::rids::api::ComputeEventQuery>,
26    #[builder(custom(type = super::EventsEnumValueSource, convert = Box::new))]
27    #[serde(rename = "valueSource")]
28    value_source: Box<super::EventsEnumValueSource>,
29}
30impl EventsEnumSeries {
31    /// Constructs a new instance of the type.
32    #[inline]
33    pub fn new(
34        query: super::super::super::rids::api::ComputeEventQuery,
35        value_source: super::EventsEnumValueSource,
36    ) -> Self {
37        Self::builder().query(query).value_source(value_source).build()
38    }
39    #[inline]
40    pub fn query(&self) -> &super::super::super::rids::api::ComputeEventQuery {
41        &*self.query
42    }
43    #[inline]
44    pub fn value_source(&self) -> &super::EventsEnumValueSource {
45        &*self.value_source
46    }
47}