nominal_api/conjure/objects/scout/chartdefinition/api/
geo_plot3d_visualization_options.rs1#[derive(
2 Debug,
3 Clone,
4 conjure_object::serde::Serialize,
5 conjure_object::serde::Deserialize,
6 PartialEq,
7 Eq,
8 PartialOrd,
9 Ord,
10 Hash
11)]
12#[serde(crate = "conjure_object::serde")]
13#[conjure_object::private::staged_builder::staged_builder]
14#[builder(crate = conjure_object::private::staged_builder, update, inline)]
15pub struct GeoPlot3dVisualizationOptions {
16 #[serde(rename = "color")]
17 color: super::super::super::api::HexColor,
18 #[serde(rename = "lineStyle")]
19 line_style: super::GeoLine3dStyle,
20 #[builder(
21 default,
22 custom(
23 type = impl
24 Into<Option<super::Geo3dModel>>,
25 convert = |v|v.into().map(Box::new)
26 )
27 )]
28 #[serde(rename = "model", skip_serializing_if = "Option::is_none", default)]
29 model: Option<Box<super::Geo3dModel>>,
30}
31impl GeoPlot3dVisualizationOptions {
32 #[inline]
34 pub fn new(
35 color: super::super::super::api::HexColor,
36 line_style: super::GeoLine3dStyle,
37 ) -> Self {
38 Self::builder().color(color).line_style(line_style).build()
39 }
40 #[inline]
41 pub fn color(&self) -> &super::super::super::api::HexColor {
42 &self.color
43 }
44 #[inline]
45 pub fn line_style(&self) -> &super::GeoLine3dStyle {
46 &self.line_style
47 }
48 #[inline]
49 pub fn model(&self) -> Option<&super::Geo3dModel> {
50 self.model.as_ref().map(|o| &**o)
51 }
52}