Skip to main content

nominal_api/conjure/objects/scout/chartdefinition/api/
geo3d_position_wgs84.rs

1#[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 Geo3dPositionWgs84 {
16    #[serde(rename = "latitudeVariableName")]
17    latitude_variable_name: super::super::super::channelvariables::api::ChannelVariableName,
18    #[serde(rename = "longitudeVariableName")]
19    longitude_variable_name: super::super::super::channelvariables::api::ChannelVariableName,
20    #[builder(default, into)]
21    #[serde(
22        rename = "heightVariableName",
23        skip_serializing_if = "Option::is_none",
24        default
25    )]
26    height_variable_name: Option<
27        super::super::super::channelvariables::api::ChannelVariableName,
28    >,
29}
30impl Geo3dPositionWgs84 {
31    /// Constructs a new instance of the type.
32    #[inline]
33    pub fn new(
34        latitude_variable_name: super::super::super::channelvariables::api::ChannelVariableName,
35        longitude_variable_name: super::super::super::channelvariables::api::ChannelVariableName,
36    ) -> Self {
37        Self::builder()
38            .latitude_variable_name(latitude_variable_name)
39            .longitude_variable_name(longitude_variable_name)
40            .build()
41    }
42    #[inline]
43    pub fn latitude_variable_name(
44        &self,
45    ) -> &super::super::super::channelvariables::api::ChannelVariableName {
46        &self.latitude_variable_name
47    }
48    #[inline]
49    pub fn longitude_variable_name(
50        &self,
51    ) -> &super::super::super::channelvariables::api::ChannelVariableName {
52        &self.longitude_variable_name
53    }
54    #[inline]
55    pub fn height_variable_name(
56        &self,
57    ) -> Option<&super::super::super::channelvariables::api::ChannelVariableName> {
58        self.height_variable_name.as_ref().map(|o| &*o)
59    }
60}