Skip to main content

nominal_api/conjure/objects/scout/chartdefinition/api/
enum_value_channel.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 EnumValueChannel {
16    #[serde(rename = "variableName")]
17    variable_name: super::super::super::channelvariables::api::ChannelVariableName,
18    #[builder(custom(type = super::EnumValueVisualisation, convert = Box::new))]
19    #[serde(rename = "visualisation")]
20    visualisation: Box<super::EnumValueVisualisation>,
21}
22impl EnumValueChannel {
23    /// Constructs a new instance of the type.
24    #[inline]
25    pub fn new(
26        variable_name: super::super::super::channelvariables::api::ChannelVariableName,
27        visualisation: super::EnumValueVisualisation,
28    ) -> Self {
29        Self::builder().variable_name(variable_name).visualisation(visualisation).build()
30    }
31    #[inline]
32    pub fn variable_name(
33        &self,
34    ) -> &super::super::super::channelvariables::api::ChannelVariableName {
35        &self.variable_name
36    }
37    #[inline]
38    pub fn visualisation(&self) -> &super::EnumValueVisualisation {
39        &*self.visualisation
40    }
41}