nominal_api/conjure/objects/scout/chartdefinition/api/
geo3d_definition_v1.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 Geo3dDefinitionV1 {
13 #[builder(default, list(item(type = super::GeoPlot3d)))]
14 #[serde(rename = "plots", skip_serializing_if = "Vec::is_empty", default)]
15 plots: Vec<super::GeoPlot3d>,
16 #[builder(default, into)]
17 #[serde(rename = "title", skip_serializing_if = "Option::is_none", default)]
18 title: Option<String>,
19 #[builder(default, into)]
20 #[serde(rename = "spatialPlots", skip_serializing_if = "Option::is_none", default)]
21 spatial_plots: Option<Vec<super::GeoPlot3dSpatial>>,
22}
23impl Geo3dDefinitionV1 {
24 #[inline]
26 pub fn new() -> Self {
27 Self::builder().build()
28 }
29 #[inline]
30 pub fn plots(&self) -> &[super::GeoPlot3d] {
31 &*self.plots
32 }
33 #[inline]
34 pub fn title(&self) -> Option<&str> {
35 self.title.as_ref().map(|o| &**o)
36 }
37 #[inline]
39 pub fn spatial_plots(&self) -> Option<&[super::GeoPlot3dSpatial]> {
40 self.spatial_plots.as_ref().map(|o| &**o)
41 }
42}