Skip to main content

nominal_api/conjure/objects/ingest/api/
channel_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 ChannelConfig {
16    #[builder(default, into)]
17    #[serde(
18        rename = "prefixTreeDelimiter",
19        skip_serializing_if = "Option::is_none",
20        default
21    )]
22    prefix_tree_delimiter: Option<String>,
23}
24impl ChannelConfig {
25    /// Constructs a new instance of the type.
26    #[inline]
27    pub fn new() -> Self {
28        Self::builder().build()
29    }
30    /// If set, will construct a prefix tree for channels of the dataset using the given delimiter.
31    #[inline]
32    pub fn prefix_tree_delimiter(&self) -> Option<&str> {
33        self.prefix_tree_delimiter.as_ref().map(|o| &**o)
34    }
35}