Skip to main content

nominal_api/conjure/objects/scout/chartdefinition/api/
time_series_plot.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 TimeSeriesPlot {
16    #[serde(rename = "variableName")]
17    variable_name: super::super::super::channelvariables::api::ChannelVariableName,
18    #[builder(default, into)]
19    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none", default)]
20    enabled: Option<bool>,
21    #[serde(rename = "yAxisId")]
22    y_axis_id: super::AxisId,
23    #[serde(rename = "color")]
24    color: super::super::super::api::HexColor,
25    #[builder(custom(type = super::LineStyle, convert = Box::new))]
26    #[serde(rename = "lineStyle")]
27    line_style: Box<super::LineStyle>,
28}
29impl TimeSeriesPlot {
30    #[inline]
31    pub fn variable_name(
32        &self,
33    ) -> &super::super::super::channelvariables::api::ChannelVariableName {
34        &self.variable_name
35    }
36    #[inline]
37    pub fn enabled(&self) -> Option<bool> {
38        self.enabled.as_ref().map(|o| *o)
39    }
40    #[inline]
41    pub fn y_axis_id(&self) -> &super::AxisId {
42        &self.y_axis_id
43    }
44    #[inline]
45    pub fn color(&self) -> &super::super::super::api::HexColor {
46        &self.color
47    }
48    #[inline]
49    pub fn line_style(&self) -> &super::LineStyle {
50        &*self.line_style
51    }
52}