Skip to main content

nominal_api/conjure/objects/scout/compute/resolved/api/
scatter_fit_options.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    conjure_object::private::DeriveWith,
7    Copy
8)]
9#[serde(crate = "conjure_object::serde")]
10#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
11#[conjure_object::private::staged_builder::staged_builder]
12#[builder(crate = conjure_object::private::staged_builder, update, inline)]
13pub struct ScatterFitOptions {
14    #[builder(default, into)]
15    #[serde(rename = "minX", skip_serializing_if = "Option::is_none", default)]
16    #[derive_with(with = conjure_object::private::DoubleWrapper)]
17    min_x: Option<f64>,
18    #[builder(default, into)]
19    #[serde(rename = "maxX", skip_serializing_if = "Option::is_none", default)]
20    #[derive_with(with = conjure_object::private::DoubleWrapper)]
21    max_x: Option<f64>,
22    #[builder(default, into)]
23    #[serde(rename = "minY", skip_serializing_if = "Option::is_none", default)]
24    #[derive_with(with = conjure_object::private::DoubleWrapper)]
25    min_y: Option<f64>,
26    #[builder(default, into)]
27    #[serde(rename = "maxY", skip_serializing_if = "Option::is_none", default)]
28    #[derive_with(with = conjure_object::private::DoubleWrapper)]
29    max_y: Option<f64>,
30}
31impl ScatterFitOptions {
32    /// Constructs a new instance of the type.
33    #[inline]
34    pub fn new() -> Self {
35        Self::builder().build()
36    }
37    #[inline]
38    pub fn min_x(&self) -> Option<f64> {
39        self.min_x.as_ref().map(|o| *o)
40    }
41    #[inline]
42    pub fn max_x(&self) -> Option<f64> {
43        self.max_x.as_ref().map(|o| *o)
44    }
45    #[inline]
46    pub fn min_y(&self) -> Option<f64> {
47        self.min_y.as_ref().map(|o| *o)
48    }
49    #[inline]
50    pub fn max_y(&self) -> Option<f64> {
51        self.max_y.as_ref().map(|o| *o)
52    }
53}