nominal_api/conjure/objects/scout/chartdefinition/api/
table_column_log_config.rs1#[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 TableColumnLogConfig {
16 #[builder(custom(type = super::TableColumnLogAggregation, convert = Box::new))]
17 #[serde(rename = "aggregation")]
18 aggregation: Box<super::TableColumnLogAggregation>,
19 #[builder(default, list(item(type = super::LogColumnName)))]
20 #[serde(rename = "visibleLogFields", skip_serializing_if = "Vec::is_empty", default)]
21 visible_log_fields: Vec<super::LogColumnName>,
22 #[builder(
23 default,
24 custom(
25 type = impl
26 Into<Option<super::LogColumnTagFilters>>,
27 convert = |v|v.into().map(Box::new)
28 )
29 )]
30 #[serde(rename = "tagFilters", skip_serializing_if = "Option::is_none", default)]
31 tag_filters: Option<Box<super::LogColumnTagFilters>>,
32}
33impl TableColumnLogConfig {
34 #[inline]
36 pub fn new(aggregation: super::TableColumnLogAggregation) -> Self {
37 Self::builder().aggregation(aggregation).build()
38 }
39 #[inline]
40 pub fn aggregation(&self) -> &super::TableColumnLogAggregation {
41 &*self.aggregation
42 }
43 #[inline]
44 pub fn visible_log_fields(&self) -> &[super::LogColumnName] {
45 &*self.visible_log_fields
46 }
47 #[inline]
48 pub fn tag_filters(&self) -> Option<&super::LogColumnTagFilters> {
49 self.tag_filters.as_ref().map(|o| &**o)
50 }
51}