#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct TimeSeriesPlotV2 {
    #[serde(rename = "variableName")]
    variable_name: super::super::super::channelvariables::api::ChannelVariableName,
    #[builder(default, into)]
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none", default)]
    enabled: Option<bool>,
    #[serde(rename = "yAxisId")]
    y_axis_id: super::AxisId,
    #[builder(custom(type = super::TimeSeriesPlotConfig, convert = Box::new))]
    #[serde(rename = "type")]
    type_: Box<super::TimeSeriesPlotConfig>,
    #[builder(default, into)]
    #[serde(
        rename = "hideFromTooltip",
        skip_serializing_if = "Option::is_none",
        default
    )]
    hide_from_tooltip: Option<bool>,
}
impl TimeSeriesPlotV2 {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        variable_name: super::super::super::channelvariables::api::ChannelVariableName,
        y_axis_id: super::AxisId,
        type_: super::TimeSeriesPlotConfig,
    ) -> Self {
        Self::builder()
            .variable_name(variable_name)
            .y_axis_id(y_axis_id)
            .type_(type_)
            .build()
    }
    #[inline]
    pub fn variable_name(
        &self,
    ) -> &super::super::super::channelvariables::api::ChannelVariableName {
        &self.variable_name
    }
    #[inline]
    pub fn enabled(&self) -> Option<bool> {
        self.enabled.as_ref().map(|o| *o)
    }
    #[inline]
    pub fn y_axis_id(&self) -> &super::AxisId {
        &self.y_axis_id
    }
    #[inline]
    pub fn type_(&self) -> &super::TimeSeriesPlotConfig {
        &*self.type_
    }
    #[inline]
    pub fn hide_from_tooltip(&self) -> Option<bool> {
        self.hide_from_tooltip.as_ref().map(|o| *o)
    }
}
