Skip to main content

nominal_api/conjure/objects/scout/chartdefinition/api/
geo_plot3d.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 GeoPlot3d {
13    #[builder(into)]
14    #[serde(rename = "plotId")]
15    plot_id: String,
16    #[builder(default, into)]
17    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none", default)]
18    enabled: Option<bool>,
19    #[builder(default, into)]
20    #[serde(rename = "label", skip_serializing_if = "Option::is_none", default)]
21    label: Option<String>,
22    #[builder(custom(type = super::GeoPlot3dVisualizationOptions, convert = Box::new))]
23    #[serde(rename = "visualizationOptions")]
24    visualization_options: Box<super::GeoPlot3dVisualizationOptions>,
25    #[builder(custom(type = super::Geo3dPosition, convert = Box::new))]
26    #[serde(rename = "position")]
27    position: Box<super::Geo3dPosition>,
28    #[builder(custom(type = super::Geo3dOrientation, convert = Box::new))]
29    #[serde(rename = "orientation")]
30    orientation: Box<super::Geo3dOrientation>,
31    #[builder(default, into)]
32    #[serde(rename = "plotSensors", skip_serializing_if = "Option::is_none", default)]
33    plot_sensors: Option<Vec<super::Geo3dSensor>>,
34    #[builder(default, into)]
35    #[serde(rename = "displayVectors", skip_serializing_if = "Option::is_none", default)]
36    display_vectors: Option<Vec<super::Geo3dDisplayVector>>,
37}
38impl GeoPlot3d {
39    #[inline]
40    pub fn plot_id(&self) -> &str {
41        &*self.plot_id
42    }
43    #[inline]
44    pub fn enabled(&self) -> Option<bool> {
45        self.enabled.as_ref().map(|o| *o)
46    }
47    #[inline]
48    pub fn label(&self) -> Option<&str> {
49        self.label.as_ref().map(|o| &**o)
50    }
51    #[inline]
52    pub fn visualization_options(&self) -> &super::GeoPlot3dVisualizationOptions {
53        &*self.visualization_options
54    }
55    #[inline]
56    pub fn position(&self) -> &super::Geo3dPosition {
57        &*self.position
58    }
59    #[inline]
60    pub fn orientation(&self) -> &super::Geo3dOrientation {
61        &*self.orientation
62    }
63    #[inline]
64    pub fn plot_sensors(&self) -> Option<&[super::Geo3dSensor]> {
65        self.plot_sensors.as_ref().map(|o| &**o)
66    }
67    #[inline]
68    pub fn display_vectors(&self) -> Option<&[super::Geo3dDisplayVector]> {
69        self.display_vectors.as_ref().map(|o| &**o)
70    }
71}