Skip to main content

nominal_api/conjure/objects/scout/chartdefinition/api/
log_channel.rs

1/// A field to save additional column names on log panels with support for multiple variables
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 LogChannel {
17    #[serde(rename = "logChannelVariableName")]
18    log_channel_variable_name: super::super::super::channelvariables::api::ChannelVariableName,
19    #[builder(default, list(item(type = super::LogColumnName)))]
20    #[serde(
21        rename = "visibleLogColumnNames",
22        skip_serializing_if = "Vec::is_empty",
23        default
24    )]
25    visible_log_column_names: Vec<super::LogColumnName>,
26    #[builder(default)]
27    #[serde(
28        rename = "tagFilters",
29        skip_serializing_if = "std::collections::BTreeMap::is_empty",
30        default
31    )]
32    tag_filters: super::LogTagFilter,
33}
34impl LogChannel {
35    /// Constructs a new instance of the type.
36    #[inline]
37    pub fn new(
38        log_channel_variable_name: super::super::super::channelvariables::api::ChannelVariableName,
39    ) -> Self {
40        Self::builder().log_channel_variable_name(log_channel_variable_name).build()
41    }
42    #[inline]
43    pub fn log_channel_variable_name(
44        &self,
45    ) -> &super::super::super::channelvariables::api::ChannelVariableName {
46        &self.log_channel_variable_name
47    }
48    #[inline]
49    pub fn visible_log_column_names(&self) -> &[super::LogColumnName] {
50        &*self.visible_log_column_names
51    }
52    #[inline]
53    pub fn tag_filters(&self) -> &super::LogTagFilter {
54        &self.tag_filters
55    }
56}