#[derive(
Debug,
Clone,
conjure_object::serde::Serialize,
conjure_object::serde::Deserialize,
conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct TimeSeriesRow {
#[builder(default, into)]
#[serde(rename = "title", skip_serializing_if = "Option::is_none", default)]
title: Option<String>,
#[builder(default, list(item(type = super::TimeSeriesPlot)))]
#[serde(rename = "plots", skip_serializing_if = "Vec::is_empty", default)]
plots: Vec<super::TimeSeriesPlot>,
#[builder(default, into)]
#[serde(rename = "plotsV2", skip_serializing_if = "Option::is_none", default)]
plots_v2: Option<Vec<super::TimeSeriesPlotV2>>,
#[serde(rename = "rowFlexSize")]
#[derive_with(with = conjure_object::private::DoubleWrapper)]
row_flex_size: f64,
#[builder(default, into)]
#[serde(rename = "enabled", skip_serializing_if = "Option::is_none", default)]
enabled: Option<bool>,
}
impl TimeSeriesRow {
#[inline]
pub fn new(row_flex_size: f64) -> Self {
Self::builder().row_flex_size(row_flex_size).build()
}
#[inline]
pub fn title(&self) -> Option<&str> {
self.title.as_ref().map(|o| &**o)
}
#[inline]
pub fn plots(&self) -> &[super::TimeSeriesPlot] {
&*self.plots
}
#[inline]
pub fn plots_v2(&self) -> Option<&[super::TimeSeriesPlotV2]> {
self.plots_v2.as_ref().map(|o| &**o)
}
#[inline]
pub fn row_flex_size(&self) -> f64 {
self.row_flex_size
}
#[inline]
pub fn enabled(&self) -> Option<bool> {
self.enabled.as_ref().map(|o| *o)
}
}