#[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 ValueAxis {
    #[builder(into)]
    #[serde(rename = "id")]
    id: String,
    #[builder(into)]
    #[serde(rename = "title")]
    title: String,
    #[builder(custom(type = super::AxisDisplayOptions, convert = Box::new))]
    #[serde(rename = "displayOptions")]
    display_options: Box<super::AxisDisplayOptions>,
    #[builder(custom(type = super::AxisRange, convert = Box::new))]
    #[serde(rename = "range")]
    range: Box<super::AxisRange>,
    #[builder(custom(type = super::AxisRange, convert = Box::new))]
    #[serde(rename = "limit")]
    limit: Box<super::AxisRange>,
    #[serde(rename = "position")]
    position: super::AxisPosition,
    #[serde(rename = "domainType")]
    domain_type: super::AxisDomainType,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::NumberFormat>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(
        rename = "tickNumberFormat",
        skip_serializing_if = "Option::is_none",
        default
    )]
    tick_number_format: Option<Box<super::NumberFormat>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::NumberFormat>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(
        rename = "tooltipNumberFormat",
        skip_serializing_if = "Option::is_none",
        default
    )]
    tooltip_number_format: Option<Box<super::NumberFormat>>,
    #[builder(default, into)]
    #[serde(rename = "reversed", skip_serializing_if = "Option::is_none", default)]
    reversed: Option<bool>,
}
impl ValueAxis {
    #[inline]
    pub fn id(&self) -> &str {
        &*self.id
    }
    #[inline]
    pub fn title(&self) -> &str {
        &*self.title
    }
    #[inline]
    pub fn display_options(&self) -> &super::AxisDisplayOptions {
        &*self.display_options
    }
    #[inline]
    pub fn range(&self) -> &super::AxisRange {
        &*self.range
    }
    #[inline]
    pub fn limit(&self) -> &super::AxisRange {
        &*self.limit
    }
    #[inline]
    pub fn position(&self) -> &super::AxisPosition {
        &self.position
    }
    #[inline]
    pub fn domain_type(&self) -> &super::AxisDomainType {
        &self.domain_type
    }
    #[inline]
    pub fn tick_number_format(&self) -> Option<&super::NumberFormat> {
        self.tick_number_format.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn tooltip_number_format(&self) -> Option<&super::NumberFormat> {
        self.tooltip_number_format.as_ref().map(|o| &**o)
    }
    /// Whether the axis direction is reversed. When true, larger values appear on the
    /// opposite side (left for X axis, bottom for Y axis). Defaults to false.
    #[inline]
    pub fn reversed(&self) -> Option<bool> {
        self.reversed.as_ref().map(|o| *o)
    }
}
