Skip to main content

nominal_api/conjure/objects/scout/workbookcommon/api/
event_alignment.rs

1/// An offset that is defined relative to the first target event found by query.
2#[derive(
3    Debug,
4    Clone,
5    conjure_object::serde::Serialize,
6    conjure_object::serde::Deserialize,
7    PartialEq,
8    Eq,
9    PartialOrd,
10    Ord,
11    Hash
12)]
13#[serde(crate = "conjure_object::serde")]
14#[conjure_object::private::staged_builder::staged_builder]
15#[builder(crate = conjure_object::private::staged_builder, update, inline)]
16pub struct EventAlignment {
17    #[serde(rename = "targetRunRid")]
18    target_run_rid: super::super::super::run::api::RunRid,
19    #[serde(rename = "alignTo")]
20    align_to: super::EventAlignTo,
21    #[builder(
22        custom(type = super::super::super::super::event::SearchQuery, convert = Box::new)
23    )]
24    #[serde(rename = "eventQuery")]
25    event_query: Box<super::super::super::super::event::SearchQuery>,
26}
27impl EventAlignment {
28    /// Constructs a new instance of the type.
29    #[inline]
30    pub fn new(
31        target_run_rid: super::super::super::run::api::RunRid,
32        align_to: super::EventAlignTo,
33        event_query: super::super::super::super::event::SearchQuery,
34    ) -> Self {
35        Self::builder()
36            .target_run_rid(target_run_rid)
37            .align_to(align_to)
38            .event_query(event_query)
39            .build()
40    }
41    #[inline]
42    pub fn target_run_rid(&self) -> &super::super::super::run::api::RunRid {
43        &self.target_run_rid
44    }
45    #[inline]
46    pub fn align_to(&self) -> &super::EventAlignTo {
47        &self.align_to
48    }
49    #[inline]
50    pub fn event_query(&self) -> &super::super::super::super::event::SearchQuery {
51        &*self.event_query
52    }
53}