Skip to main content

nominal_api/conjure/objects/scout/video/api/
no_timestamp_manifest.rs

1/// these values will not be updated after ingest time, to allow for resetting. The updated values are stored
2/// implicitly through the segment timestamps.
3#[derive(
4    Debug,
5    Clone,
6    conjure_object::serde::Serialize,
7    conjure_object::serde::Deserialize,
8    conjure_object::private::DeriveWith
9)]
10#[serde(crate = "conjure_object::serde")]
11#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
12#[conjure_object::private::staged_builder::staged_builder]
13#[builder(crate = conjure_object::private::staged_builder, update, inline)]
14pub struct NoTimestampManifest {
15    #[builder(
16        custom(type = super::super::super::super::api::Timestamp, convert = Box::new)
17    )]
18    #[serde(rename = "startingTimestamp")]
19    starting_timestamp: Box<super::super::super::super::api::Timestamp>,
20    #[builder(
21        default,
22        custom(
23            type = impl
24            Into<Option<super::ScaleParameter>>,
25            convert = |v|v.into().map(Box::new)
26        )
27    )]
28    #[serde(rename = "scaleParameter", skip_serializing_if = "Option::is_none", default)]
29    scale_parameter: Option<Box<super::ScaleParameter>>,
30}
31impl NoTimestampManifest {
32    /// Constructs a new instance of the type.
33    #[inline]
34    pub fn new(starting_timestamp: super::super::super::super::api::Timestamp) -> Self {
35        Self::builder().starting_timestamp(starting_timestamp).build()
36    }
37    /// Specifies the original starting timestamp of the video.
38    #[inline]
39    pub fn starting_timestamp(&self) -> &super::super::super::super::api::Timestamp {
40        &*self.starting_timestamp
41    }
42    /// A field that specifies that the frame rate of the video does not match the frame rate of the camera | i.e. a slowed down or sped up video. Can specify either the camera frame rate or the absolute end time.
43    #[inline]
44    pub fn scale_parameter(&self) -> Option<&super::ScaleParameter> {
45        self.scale_parameter.as_ref().map(|o| &**o)
46    }
47}