#[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 ScatterFitOptions {
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::DoubleConstant>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "minX", skip_serializing_if = "Option::is_none", default)]
    min_x: Option<Box<super::DoubleConstant>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::DoubleConstant>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "maxX", skip_serializing_if = "Option::is_none", default)]
    max_x: Option<Box<super::DoubleConstant>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::DoubleConstant>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "minY", skip_serializing_if = "Option::is_none", default)]
    min_y: Option<Box<super::DoubleConstant>>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::DoubleConstant>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "maxY", skip_serializing_if = "Option::is_none", default)]
    max_y: Option<Box<super::DoubleConstant>>,
}
impl ScatterFitOptions {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    /// Inclusive lower bound on the x values to fit to. If omitted, does not set a bound
    /// (equivalent to setting this to the minimum x value among all points in the time range).
    #[inline]
    pub fn min_x(&self) -> Option<&super::DoubleConstant> {
        self.min_x.as_ref().map(|o| &**o)
    }
    /// Inclusive upper bound on the x values to fit to. If omitted, does not set a bound
    /// (equivalent to setting this to the maximum x value among all points in the time range).
    #[inline]
    pub fn max_x(&self) -> Option<&super::DoubleConstant> {
        self.max_x.as_ref().map(|o| &**o)
    }
    /// Inclusive lower bound on the y values to fit to. If omitted, does not set a bound
    /// (equivalent to setting this to the minimum y value among all points in the time range).
    #[inline]
    pub fn min_y(&self) -> Option<&super::DoubleConstant> {
        self.min_y.as_ref().map(|o| &**o)
    }
    /// Inclusive upper bound on the y values to fit to. If omitted, does not set a bound
    /// (equivalent to setting this to the maximum y value among all points in the time range).
    #[inline]
    pub fn max_y(&self) -> Option<&super::DoubleConstant> {
        self.max_y.as_ref().map(|o| &**o)
    }
}
