Skip to main content

nominal_api/conjure/objects/scout/compute/api/
cartesian_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 CartesianBucket {
13    #[serde(rename = "minX")]
14    #[derive_with(with = conjure_object::private::DoubleWrapper)]
15    min_x: f64,
16    #[serde(rename = "maxX")]
17    #[derive_with(with = conjure_object::private::DoubleWrapper)]
18    max_x: f64,
19    #[serde(rename = "minY")]
20    #[derive_with(with = conjure_object::private::DoubleWrapper)]
21    min_y: f64,
22    #[serde(rename = "maxY")]
23    #[derive_with(with = conjure_object::private::DoubleWrapper)]
24    max_y: f64,
25    #[builder(
26        custom(type = super::super::super::super::api::Timestamp, convert = Box::new)
27    )]
28    #[serde(rename = "minTimestamp")]
29    min_timestamp: Box<super::super::super::super::api::Timestamp>,
30    #[builder(
31        custom(type = super::super::super::super::api::Timestamp, convert = Box::new)
32    )]
33    #[serde(rename = "maxTimestamp")]
34    max_timestamp: Box<super::super::super::super::api::Timestamp>,
35    #[serde(rename = "count")]
36    count: conjure_object::SafeLong,
37}
38impl CartesianBucket {
39    #[inline]
40    pub fn min_x(&self) -> f64 {
41        self.min_x
42    }
43    #[inline]
44    pub fn max_x(&self) -> f64 {
45        self.max_x
46    }
47    #[inline]
48    pub fn min_y(&self) -> f64 {
49        self.min_y
50    }
51    #[inline]
52    pub fn max_y(&self) -> f64 {
53        self.max_y
54    }
55    #[inline]
56    pub fn min_timestamp(&self) -> &super::super::super::super::api::Timestamp {
57        &*self.min_timestamp
58    }
59    #[inline]
60    pub fn max_timestamp(&self) -> &super::super::super::super::api::Timestamp {
61        &*self.max_timestamp
62    }
63    #[inline]
64    pub fn count(&self) -> conjure_object::SafeLong {
65        self.count
66    }
67}