Skip to main content

nominal_api/conjure/objects/scout/layout/api/
chart_panel_v1.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 ChartPanelV1 {
16    #[serde(rename = "id")]
17    id: super::PanelId,
18    #[builder(
19        custom(type = super::super::super::rids::api::VersionedVizId, convert = Box::new)
20    )]
21    #[serde(rename = "chartRid")]
22    chart_rid: Box<super::super::super::rids::api::VersionedVizId>,
23    #[serde(rename = "hideLegend")]
24    hide_legend: bool,
25}
26impl ChartPanelV1 {
27    /// Constructs a new instance of the type.
28    #[inline]
29    pub fn new(
30        id: super::PanelId,
31        chart_rid: super::super::super::rids::api::VersionedVizId,
32        hide_legend: bool,
33    ) -> Self {
34        Self::builder().id(id).chart_rid(chart_rid).hide_legend(hide_legend).build()
35    }
36    #[inline]
37    pub fn id(&self) -> &super::PanelId {
38        &self.id
39    }
40    #[inline]
41    pub fn chart_rid(&self) -> &super::super::super::rids::api::VersionedVizId {
42        &*self.chart_rid
43    }
44    #[inline]
45    pub fn hide_legend(&self) -> bool {
46        self.hide_legend
47    }
48}