#[derive(
Debug,
Clone,
conjure_object::serde::Serialize,
conjure_object::serde::Deserialize,
conjure_object::private::DeriveWith
)]
#[serde(crate = "conjure_object::serde")]
#[derive_with(PartialEq, Eq, PartialOrd, Ord, Hash)]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct WorkbookContent {
#[builder(default)]
#[serde(
rename = "channelVariables",
skip_serializing_if = "std::collections::BTreeMap::is_empty",
default
)]
channel_variables: super::super::super::channelvariables::api::WorkbookChannelVariableMap,
#[builder(
default,
custom(
type = impl
Into<Option<super::WorkbookInputs>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(rename = "inputs", skip_serializing_if = "Option::is_none", default)]
inputs: Option<Box<super::WorkbookInputs>>,
#[builder(default)]
#[serde(
rename = "charts",
skip_serializing_if = "std::collections::BTreeMap::is_empty",
default
)]
charts: super::super::super::chartdefinition::api::WorkbookVizDefinitionMap,
#[builder(
default,
custom(
type = impl
Into<Option<super::WorkbookSettings>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(rename = "settings", skip_serializing_if = "Option::is_none", default)]
settings: Option<Box<super::WorkbookSettings>>,
#[builder(
default,
custom(
type = impl
Into<Option<super::WorkbookDataScopeInputs>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(
rename = "dataScopeInputs",
skip_serializing_if = "Option::is_none",
default
)]
data_scope_inputs: Option<Box<super::WorkbookDataScopeInputs>>,
}
impl WorkbookContent {
#[inline]
pub fn new() -> Self {
Self::builder().build()
}
#[inline]
pub fn channel_variables(
&self,
) -> &super::super::super::channelvariables::api::WorkbookChannelVariableMap {
&self.channel_variables
}
#[inline]
pub fn inputs(&self) -> Option<&super::WorkbookInputs> {
self.inputs.as_ref().map(|o| &**o)
}
#[inline]
pub fn charts(
&self,
) -> &super::super::super::chartdefinition::api::WorkbookVizDefinitionMap {
&self.charts
}
#[inline]
pub fn settings(&self) -> Option<&super::WorkbookSettings> {
self.settings.as_ref().map(|o| &**o)
}
#[inline]
pub fn data_scope_inputs(&self) -> Option<&super::WorkbookDataScopeInputs> {
self.data_scope_inputs.as_ref().map(|o| &**o)
}
}