Skip to main content

nominal_api/conjure/objects/timeseries/channelmetadata/api/
channel_identifier.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    PartialEq,
7    Eq,
8    PartialOrd,
9    Ord,
10    Hash
11)]
12#[serde(crate = "conjure_object::serde")]
13#[conjure_object::private::staged_builder::staged_builder]
14#[builder(crate = conjure_object::private::staged_builder, update, inline)]
15pub struct ChannelIdentifier {
16    #[builder(into)]
17    #[serde(rename = "channelName")]
18    channel_name: String,
19    #[serde(rename = "dataSourceRid")]
20    data_source_rid: conjure_object::ResourceIdentifier,
21}
22impl ChannelIdentifier {
23    /// Constructs a new instance of the type.
24    #[inline]
25    pub fn new(
26        channel_name: impl Into<String>,
27        data_source_rid: conjure_object::ResourceIdentifier,
28    ) -> Self {
29        Self::builder()
30            .channel_name(channel_name)
31            .data_source_rid(data_source_rid)
32            .build()
33    }
34    #[inline]
35    pub fn channel_name(&self) -> &str {
36        &*self.channel_name
37    }
38    #[inline]
39    pub fn data_source_rid(&self) -> &conjure_object::ResourceIdentifier {
40        &self.data_source_rid
41    }
42}