#[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 Template {
#[serde(rename = "rid")]
rid: super::super::super::rids::api::TemplateRid,
#[builder(custom(type = super::TemplateMetadata, convert = Box::new))]
#[serde(rename = "metadata")]
metadata: Box<super::TemplateMetadata>,
#[builder(
custom(type = super::super::super::versioning::api::Commit, convert = Box::new)
)]
#[serde(rename = "commit")]
commit: Box<super::super::super::versioning::api::Commit>,
#[builder(
default,
list(item(type = super::super::super::rids::api::VersionedVizId))
)]
#[serde(rename = "charts", skip_serializing_if = "Vec::is_empty", default)]
charts: Vec<super::super::super::rids::api::VersionedVizId>,
#[builder(
custom(
type = super::super::super::layout::api::WorkbookLayout,
convert = Box::new
)
)]
#[serde(rename = "layout")]
layout: Box<super::super::super::layout::api::WorkbookLayout>,
#[builder(
custom(
type = super::super::super::workbookcommon::api::WorkbookContent,
convert = Box::new
)
)]
#[serde(rename = "content")]
content: Box<super::super::super::workbookcommon::api::WorkbookContent>,
}
impl Template {
#[inline]
pub fn rid(&self) -> &super::super::super::rids::api::TemplateRid {
&self.rid
}
#[inline]
pub fn metadata(&self) -> &super::TemplateMetadata {
&*self.metadata
}
#[inline]
pub fn commit(&self) -> &super::super::super::versioning::api::Commit {
&*self.commit
}
#[deprecated(
note = "charts are no longer versioned resources. They are stored in workbook content."
)]
#[inline]
pub fn charts(&self) -> &[super::super::super::rids::api::VersionedVizId] {
&*self.charts
}
#[inline]
pub fn layout(&self) -> &super::super::super::layout::api::WorkbookLayout {
&*self.layout
}
#[inline]
pub fn content(&self) -> &super::super::super::workbookcommon::api::WorkbookContent {
&*self.content
}
}