Skip to main content

nominal_api/conjure/objects/scout/layout/api/
viz_panel_v1.rs

1/// Deprecated - use ChartPanel instead
2#[derive(
3    Debug,
4    Clone,
5    conjure_object::serde::Serialize,
6    conjure_object::serde::Deserialize,
7    PartialEq,
8    Eq,
9    PartialOrd,
10    Ord,
11    Hash
12)]
13#[serde(crate = "conjure_object::serde")]
14#[conjure_object::private::staged_builder::staged_builder]
15#[builder(crate = conjure_object::private::staged_builder, update, inline)]
16pub struct VizPanelV1 {
17    #[serde(rename = "id")]
18    id: super::PanelId,
19    #[serde(rename = "vizId")]
20    viz_id: super::super::super::rids::api::VizId,
21    #[serde(rename = "hideLegend")]
22    hide_legend: bool,
23}
24impl VizPanelV1 {
25    /// Constructs a new instance of the type.
26    #[inline]
27    pub fn new(
28        id: super::PanelId,
29        viz_id: super::super::super::rids::api::VizId,
30        hide_legend: bool,
31    ) -> Self {
32        Self::builder().id(id).viz_id(viz_id).hide_legend(hide_legend).build()
33    }
34    #[inline]
35    pub fn id(&self) -> &super::PanelId {
36        &self.id
37    }
38    #[inline]
39    pub fn viz_id(&self) -> &super::super::super::rids::api::VizId {
40        &self.viz_id
41    }
42    #[inline]
43    pub fn hide_legend(&self) -> bool {
44        self.hide_legend
45    }
46}