Skip to main content

nominal_api/conjure/objects/scout/datasource/connection/api/
nominal_scraping_config.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 NominalScrapingConfig {
16    #[builder(default, list(item(type = super::NominalChannelNameComponent)))]
17    #[serde(
18        rename = "channelNameComponents",
19        skip_serializing_if = "Vec::is_empty",
20        default
21    )]
22    channel_name_components: Vec<super::NominalChannelNameComponent>,
23    #[builder(into)]
24    #[serde(rename = "separator")]
25    separator: String,
26}
27impl NominalScrapingConfig {
28    /// Constructs a new instance of the type.
29    #[inline]
30    pub fn new(separator: impl Into<String>) -> Self {
31        Self::builder().separator(separator).build()
32    }
33    /// channelNameComponents will be combined, together with separator, to form
34    /// a fully qualified channel name.
35    #[inline]
36    pub fn channel_name_components(&self) -> &[super::NominalChannelNameComponent] {
37        &*self.channel_name_components
38    }
39    #[inline]
40    pub fn separator(&self) -> &str {
41        &*self.separator
42    }
43}