Skip to main content

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

1/// Reference a video channel directly from a datasource/dataset
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 VideoDataSourceChannel {
17    #[builder(into)]
18    #[serde(rename = "dataSourceRid")]
19    data_source_rid: String,
20    #[builder(into)]
21    #[serde(rename = "channel")]
22    channel: String,
23    #[builder(default, map(key(type = String, into), value(type = String, into)))]
24    #[serde(
25        rename = "tags",
26        skip_serializing_if = "std::collections::BTreeMap::is_empty",
27        default
28    )]
29    tags: std::collections::BTreeMap<String, String>,
30}
31impl VideoDataSourceChannel {
32    /// Constructs a new instance of the type.
33    #[inline]
34    pub fn new(data_source_rid: impl Into<String>, channel: impl Into<String>) -> Self {
35        Self::builder().data_source_rid(data_source_rid).channel(channel).build()
36    }
37    #[inline]
38    pub fn data_source_rid(&self) -> &str {
39        &*self.data_source_rid
40    }
41    #[inline]
42    pub fn channel(&self) -> &str {
43        &*self.channel
44    }
45    #[inline]
46    pub fn tags(&self) -> &std::collections::BTreeMap<String, String> {
47        &self.tags
48    }
49}