nominal_api/conjure/objects/datasource/
video_file_metadata.rs1#[derive(
3 Debug,
4 Clone,
5 conjure_object::serde::Serialize,
6 conjure_object::serde::Deserialize,
7 conjure_object::private::DeriveWith
8)]
9#[serde(crate = "conjure_object::serde")]
10#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
11#[conjure_object::private::staged_builder::staged_builder]
12#[builder(crate = conjure_object::private::staged_builder, update, inline)]
13pub struct VideoFileMetadata {
14 #[builder(
15 custom(
16 type = super::super::scout::video::api::VideoFileTimestampManifest,
17 convert = Box::new
18 )
19 )]
20 #[serde(rename = "timestampManifest")]
21 timestamp_manifest: Box<super::super::scout::video::api::VideoFileTimestampManifest>,
22 #[builder(
23 default,
24 custom(
25 type = impl
26 Into<Option<super::VideoSegmentsMetadata>>,
27 convert = |v|v.into().map(Box::new)
28 )
29 )]
30 #[serde(
31 rename = "segmentMetadata",
32 skip_serializing_if = "Option::is_none",
33 default
34 )]
35 segment_metadata: Option<Box<super::VideoSegmentsMetadata>>,
36}
37impl VideoFileMetadata {
38 #[inline]
40 pub fn new(
41 timestamp_manifest: super::super::scout::video::api::VideoFileTimestampManifest,
42 ) -> Self {
43 Self::builder().timestamp_manifest(timestamp_manifest).build()
44 }
45 #[inline]
49 pub fn timestamp_manifest(
50 &self,
51 ) -> &super::super::scout::video::api::VideoFileTimestampManifest {
52 &*self.timestamp_manifest
53 }
54 #[inline]
60 pub fn segment_metadata(&self) -> Option<&super::VideoSegmentsMetadata> {
61 self.segment_metadata.as_ref().map(|o| &**o)
62 }
63}