Skip to main content

nominal_api/conjure/objects/timeseries/metadata/api/
time_bounds.rs

1/// Time bounds for the video file. Used to update the series time bounds
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 TimeBounds {
17    #[builder(
18        custom(type = super::super::super::super::api::Timestamp, convert = Box::new)
19    )]
20    #[serde(rename = "start")]
21    start: Box<super::super::super::super::api::Timestamp>,
22    #[builder(
23        custom(type = super::super::super::super::api::Timestamp, convert = Box::new)
24    )]
25    #[serde(rename = "end")]
26    end: Box<super::super::super::super::api::Timestamp>,
27}
28impl TimeBounds {
29    /// Constructs a new instance of the type.
30    #[inline]
31    pub fn new(
32        start: super::super::super::super::api::Timestamp,
33        end: super::super::super::super::api::Timestamp,
34    ) -> Self {
35        Self::builder().start(start).end(end).build()
36    }
37    #[inline]
38    pub fn start(&self) -> &super::super::super::super::api::Timestamp {
39        &*self.start
40    }
41    #[inline]
42    pub fn end(&self) -> &super::super::super::super::api::Timestamp {
43        &*self.end
44    }
45}