nominal_api_conjure/conjure/objects/scout/chartdefinition/api/
geo_plot3d.rs1#[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(
32 default,
33 custom(
34 type = impl
35 Into<Option<super::Geo3dModelLocalOrientation>>,
36 convert = |v|v.into().map(Box::new)
37 )
38 )]
39 #[serde(
40 rename = "modelLocalOrientation",
41 skip_serializing_if = "Option::is_none",
42 default
43 )]
44 model_local_orientation: Option<Box<super::Geo3dModelLocalOrientation>>,
45 #[builder(default, into)]
46 #[serde(rename = "plotSensors", skip_serializing_if = "Option::is_none", default)]
47 plot_sensors: Option<Vec<super::Geo3dSensor>>,
48 #[builder(default, into)]
49 #[serde(rename = "displayVectors", skip_serializing_if = "Option::is_none", default)]
50 display_vectors: Option<Vec<super::Geo3dDisplayVector>>,
51}
52impl GeoPlot3d {
53 #[inline]
54 pub fn plot_id(&self) -> &str {
55 &*self.plot_id
56 }
57 #[inline]
58 pub fn enabled(&self) -> Option<bool> {
59 self.enabled.as_ref().map(|o| *o)
60 }
61 #[inline]
62 pub fn label(&self) -> Option<&str> {
63 self.label.as_ref().map(|o| &**o)
64 }
65 #[inline]
66 pub fn visualization_options(&self) -> &super::GeoPlot3dVisualizationOptions {
67 &*self.visualization_options
68 }
69 #[inline]
70 pub fn position(&self) -> &super::Geo3dPosition {
71 &*self.position
72 }
73 #[inline]
74 pub fn orientation(&self) -> &super::Geo3dOrientation {
75 &*self.orientation
76 }
77 #[inline]
78 pub fn model_local_orientation(&self) -> Option<&super::Geo3dModelLocalOrientation> {
79 self.model_local_orientation.as_ref().map(|o| &**o)
80 }
81 #[inline]
82 pub fn plot_sensors(&self) -> Option<&[super::Geo3dSensor]> {
83 self.plot_sensors.as_ref().map(|o| &**o)
84 }
85 #[inline]
86 pub fn display_vectors(&self) -> Option<&[super::Geo3dDisplayVector]> {
87 self.display_vectors.as_ref().map(|o| &**o)
88 }
89}