Skip to main content

nominal_api/conjure/objects/scout/compute/api/
data_source_and_channel.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 DataSourceAndChannel {
16    #[serde(rename = "dataSourceRid")]
17    data_source_rid: conjure_object::ResourceIdentifier,
18    #[builder(into)]
19    #[serde(rename = "channel")]
20    channel: String,
21}
22impl DataSourceAndChannel {
23    /// Constructs a new instance of the type.
24    #[inline]
25    pub fn new(
26        data_source_rid: conjure_object::ResourceIdentifier,
27        channel: impl Into<String>,
28    ) -> Self {
29        Self::builder().data_source_rid(data_source_rid).channel(channel).build()
30    }
31    #[inline]
32    pub fn data_source_rid(&self) -> &conjure_object::ResourceIdentifier {
33        &self.data_source_rid
34    }
35    #[inline]
36    pub fn channel(&self) -> &str {
37        &*self.channel
38    }
39}