Skip to main content

nominal_api/conjure/objects/ingest/api/
video_opts_v2.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    conjure_object::private::DeriveWith
7)]
8#[serde(crate = "conjure_object::serde")]
9#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
10#[conjure_object::private::staged_builder::staged_builder]
11#[builder(crate = conjure_object::private::staged_builder, update, inline)]
12pub struct VideoOptsV2 {
13    #[builder(custom(type = super::IngestSource, convert = Box::new))]
14    #[serde(rename = "source")]
15    source: Box<super::IngestSource>,
16    #[builder(custom(type = super::DatasetIngestTarget, convert = Box::new))]
17    #[serde(rename = "target")]
18    target: Box<super::DatasetIngestTarget>,
19    #[builder(
20        custom(
21            type = super::super::super::scout::video::api::VideoFileTimestampManifest,
22            convert = Box::new
23        )
24    )]
25    #[serde(rename = "timestampManifest")]
26    timestamp_manifest: Box<
27        super::super::super::scout::video::api::VideoFileTimestampManifest,
28    >,
29    #[builder(into)]
30    #[serde(rename = "channel")]
31    channel: String,
32    #[builder(default, map(key(type = String, into), value(type = String, into)))]
33    #[serde(
34        rename = "tags",
35        skip_serializing_if = "std::collections::BTreeMap::is_empty",
36        default
37    )]
38    tags: std::collections::BTreeMap<String, String>,
39    #[builder(default, into)]
40    #[serde(
41        rename = "overWriteSegments",
42        skip_serializing_if = "Option::is_none",
43        default
44    )]
45    over_write_segments: Option<bool>,
46}
47impl VideoOptsV2 {
48    #[inline]
49    pub fn source(&self) -> &super::IngestSource {
50        &*self.source
51    }
52    #[inline]
53    pub fn target(&self) -> &super::DatasetIngestTarget {
54        &*self.target
55    }
56    #[inline]
57    pub fn timestamp_manifest(
58        &self,
59    ) -> &super::super::super::scout::video::api::VideoFileTimestampManifest {
60        &*self.timestamp_manifest
61    }
62    #[inline]
63    pub fn channel(&self) -> &str {
64        &*self.channel
65    }
66    #[inline]
67    pub fn tags(&self) -> &std::collections::BTreeMap<String, String> {
68        &self.tags
69    }
70    /// If true, overlapping segments from other dataset files within the same series will be deleted
71    /// before inserting new segments. The cached segment metadata for affected files will be recomputed.
72    #[inline]
73    pub fn over_write_segments(&self) -> Option<bool> {
74        self.over_write_segments.as_ref().map(|o| *o)
75    }
76}