#[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 LogPanelDefinitionV1 {
#[builder(default, into)]
#[serde(rename = "title", skip_serializing_if = "Option::is_none", default)]
title: Option<String>,
#[builder(
default,
list(
item(type = super::super::super::channelvariables::api::ChannelVariableName)
)
)]
#[serde(rename = "logChannels", skip_serializing_if = "Vec::is_empty", default)]
log_channels: Vec<super::super::super::channelvariables::api::ChannelVariableName>,
#[builder(default, into)]
#[serde(rename = "logChannelsV2", skip_serializing_if = "Option::is_none", default)]
log_channels_v2: Option<Vec<super::LogChannel>>,
}
impl LogPanelDefinitionV1 {
#[inline]
pub fn new() -> Self {
Self::builder().build()
}
#[inline]
pub fn title(&self) -> Option<&str> {
self.title.as_ref().map(|o| &**o)
}
#[inline]
pub fn log_channels(
&self,
) -> &[super::super::super::channelvariables::api::ChannelVariableName] {
&*self.log_channels
}
#[inline]
pub fn log_channels_v2(&self) -> Option<&[super::LogChannel]> {
self.log_channels_v2.as_ref().map(|o| &**o)
}
}