#[derive(
Debug,
Clone,
conjure_object::serde::Serialize,
conjure_object::serde::Deserialize,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct MetricColumnMetadata {
#[builder(into)]
#[serde(rename = "title")]
title: String,
#[builder(default, into)]
#[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
description: Option<String>,
#[builder(
default,
custom(
type = impl
Into<Option<super::super::super::api::Symbol>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(rename = "symbol", skip_serializing_if = "Option::is_none", default)]
symbol: Option<Box<super::super::super::api::Symbol>>,
}
impl MetricColumnMetadata {
#[inline]
pub fn new(title: impl Into<String>) -> Self {
Self::builder().title(title).build()
}
#[inline]
pub fn title(&self) -> &str {
&*self.title
}
#[inline]
pub fn description(&self) -> Option<&str> {
self.description.as_ref().map(|o| &**o)
}
#[inline]
pub fn symbol(&self) -> Option<&super::super::super::api::Symbol> {
self.symbol.as_ref().map(|o| &**o)
}
}