Skip to main content

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

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