Skip to main content

nominal_api/conjure/objects/scout/compute/api/
cartesian3d_bucket.rs

1#[derive(
2    Debug,
3    Clone,
4    conjure_object::serde::Serialize,
5    conjure_object::serde::Deserialize,
6    conjure_object::private::DeriveWith
7)]
8#[serde(crate = "conjure_object::serde")]
9#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
10#[conjure_object::private::staged_builder::staged_builder]
11#[builder(crate = conjure_object::private::staged_builder, update, inline)]
12pub struct Cartesian3dBucket {
13    #[builder(default, into)]
14    #[serde(rename = "minX", skip_serializing_if = "Option::is_none", default)]
15    #[derive_with(with = conjure_object::private::DoubleWrapper)]
16    min_x: Option<f64>,
17    #[builder(default, into)]
18    #[serde(rename = "maxX", skip_serializing_if = "Option::is_none", default)]
19    #[derive_with(with = conjure_object::private::DoubleWrapper)]
20    max_x: Option<f64>,
21    #[serde(rename = "meanX")]
22    #[derive_with(with = conjure_object::private::DoubleWrapper)]
23    mean_x: f64,
24    #[builder(default, into)]
25    #[serde(rename = "minY", skip_serializing_if = "Option::is_none", default)]
26    #[derive_with(with = conjure_object::private::DoubleWrapper)]
27    min_y: Option<f64>,
28    #[builder(default, into)]
29    #[serde(rename = "maxY", skip_serializing_if = "Option::is_none", default)]
30    #[derive_with(with = conjure_object::private::DoubleWrapper)]
31    max_y: Option<f64>,
32    #[serde(rename = "meanY")]
33    #[derive_with(with = conjure_object::private::DoubleWrapper)]
34    mean_y: f64,
35    #[builder(default, into)]
36    #[serde(rename = "minZ", skip_serializing_if = "Option::is_none", default)]
37    #[derive_with(with = conjure_object::private::DoubleWrapper)]
38    min_z: Option<f64>,
39    #[builder(default, into)]
40    #[serde(rename = "maxZ", skip_serializing_if = "Option::is_none", default)]
41    #[derive_with(with = conjure_object::private::DoubleWrapper)]
42    max_z: Option<f64>,
43    #[serde(rename = "meanZ")]
44    #[derive_with(with = conjure_object::private::DoubleWrapper)]
45    mean_z: f64,
46    #[builder(custom(type = super::Point3d, convert = Box::new))]
47    #[serde(rename = "minXPoint")]
48    min_x_point: Box<super::Point3d>,
49    #[builder(custom(type = super::Point3d, convert = Box::new))]
50    #[serde(rename = "maxXPoint")]
51    max_x_point: Box<super::Point3d>,
52    #[builder(custom(type = super::Point3d, convert = Box::new))]
53    #[serde(rename = "minYPoint")]
54    min_y_point: Box<super::Point3d>,
55    #[builder(custom(type = super::Point3d, convert = Box::new))]
56    #[serde(rename = "maxYPoint")]
57    max_y_point: Box<super::Point3d>,
58    #[builder(custom(type = super::Point3d, convert = Box::new))]
59    #[serde(rename = "minZPoint")]
60    min_z_point: Box<super::Point3d>,
61    #[builder(custom(type = super::Point3d, convert = Box::new))]
62    #[serde(rename = "maxZPoint")]
63    max_z_point: Box<super::Point3d>,
64    #[builder(
65        custom(type = super::super::super::super::api::Timestamp, convert = Box::new)
66    )]
67    #[serde(rename = "minTimestamp")]
68    min_timestamp: Box<super::super::super::super::api::Timestamp>,
69    #[builder(
70        custom(type = super::super::super::super::api::Timestamp, convert = Box::new)
71    )]
72    #[serde(rename = "maxTimestamp")]
73    max_timestamp: Box<super::super::super::super::api::Timestamp>,
74    #[serde(rename = "count")]
75    count: conjure_object::SafeLong,
76}
77impl Cartesian3dBucket {
78    #[deprecated(note = "Switching to point-based min/maxes")]
79    #[inline]
80    pub fn min_x(&self) -> Option<f64> {
81        self.min_x.as_ref().map(|o| *o)
82    }
83    #[deprecated(note = "Switching to point-based min/maxes")]
84    #[inline]
85    pub fn max_x(&self) -> Option<f64> {
86        self.max_x.as_ref().map(|o| *o)
87    }
88    #[inline]
89    pub fn mean_x(&self) -> f64 {
90        self.mean_x
91    }
92    #[deprecated(note = "Switching to point-based min/maxes")]
93    #[inline]
94    pub fn min_y(&self) -> Option<f64> {
95        self.min_y.as_ref().map(|o| *o)
96    }
97    #[deprecated(note = "Switching to point-based min/maxes")]
98    #[inline]
99    pub fn max_y(&self) -> Option<f64> {
100        self.max_y.as_ref().map(|o| *o)
101    }
102    #[inline]
103    pub fn mean_y(&self) -> f64 {
104        self.mean_y
105    }
106    #[deprecated(note = "Switching to point-based min/maxes")]
107    #[inline]
108    pub fn min_z(&self) -> Option<f64> {
109        self.min_z.as_ref().map(|o| *o)
110    }
111    #[deprecated(note = "Switching to point-based min/maxes")]
112    #[inline]
113    pub fn max_z(&self) -> Option<f64> {
114        self.max_z.as_ref().map(|o| *o)
115    }
116    #[inline]
117    pub fn mean_z(&self) -> f64 {
118        self.mean_z
119    }
120    #[inline]
121    pub fn min_x_point(&self) -> &super::Point3d {
122        &*self.min_x_point
123    }
124    #[inline]
125    pub fn max_x_point(&self) -> &super::Point3d {
126        &*self.max_x_point
127    }
128    #[inline]
129    pub fn min_y_point(&self) -> &super::Point3d {
130        &*self.min_y_point
131    }
132    #[inline]
133    pub fn max_y_point(&self) -> &super::Point3d {
134        &*self.max_y_point
135    }
136    #[inline]
137    pub fn min_z_point(&self) -> &super::Point3d {
138        &*self.min_z_point
139    }
140    #[inline]
141    pub fn max_z_point(&self) -> &super::Point3d {
142        &*self.max_z_point
143    }
144    #[inline]
145    pub fn min_timestamp(&self) -> &super::super::super::super::api::Timestamp {
146        &*self.min_timestamp
147    }
148    #[inline]
149    pub fn max_timestamp(&self) -> &super::super::super::super::api::Timestamp {
150        &*self.max_timestamp
151    }
152    #[inline]
153    pub fn count(&self) -> conjure_object::SafeLong {
154        self.count
155    }
156}