#[derive(
Debug,
Clone,
conjure_object::serde::Serialize,
conjure_object::serde::Deserialize,
conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct VideoFileMetadata {
#[builder(
custom(
type = super::super::scout::video::api::VideoFileTimestampManifest,
convert = Box::new
)
)]
#[serde(rename = "timestampManifest")]
timestamp_manifest: Box<super::super::scout::video::api::VideoFileTimestampManifest>,
#[builder(
default,
custom(
type = impl
Into<Option<super::VideoSegmentsMetadata>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(
rename = "segmentMetadata",
skip_serializing_if = "Option::is_none",
default
)]
segment_metadata: Option<Box<super::VideoSegmentsMetadata>>,
}
impl VideoFileMetadata {
#[inline]
pub fn new(
timestamp_manifest: super::super::scout::video::api::VideoFileTimestampManifest,
) -> Self {
Self::builder().timestamp_manifest(timestamp_manifest).build()
}
#[inline]
pub fn timestamp_manifest(
&self,
) -> &super::super::scout::video::api::VideoFileTimestampManifest {
&*self.timestamp_manifest
}
#[inline]
pub fn segment_metadata(&self) -> Option<&super::VideoSegmentsMetadata> {
self.segment_metadata.as_ref().map(|o| &**o)
}
}