nominal_api/conjure/objects/scout/chartdefinition/api/
time_series_plot_v2.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 TimeSeriesPlotV2 {
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 #[builder(custom(type = super::TimeSeriesPlotConfig, convert = Box::new))]
24 #[serde(rename = "type")]
25 type_: Box<super::TimeSeriesPlotConfig>,
26}
27impl TimeSeriesPlotV2 {
28 #[inline]
30 pub fn new(
31 variable_name: super::super::super::channelvariables::api::ChannelVariableName,
32 y_axis_id: super::AxisId,
33 type_: super::TimeSeriesPlotConfig,
34 ) -> Self {
35 Self::builder()
36 .variable_name(variable_name)
37 .y_axis_id(y_axis_id)
38 .type_(type_)
39 .build()
40 }
41 #[inline]
42 pub fn variable_name(
43 &self,
44 ) -> &super::super::super::channelvariables::api::ChannelVariableName {
45 &self.variable_name
46 }
47 #[inline]
48 pub fn enabled(&self) -> Option<bool> {
49 self.enabled.as_ref().map(|o| *o)
50 }
51 #[inline]
52 pub fn y_axis_id(&self) -> &super::AxisId {
53 &self.y_axis_id
54 }
55 #[inline]
56 pub fn type_(&self) -> &super::TimeSeriesPlotConfig {
57 &*self.type_
58 }
59}