#[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 LineThresholdGroup {
#[serde(rename = "shadingConfig")]
shading_config: super::ThresholdShadingConfig,
#[builder(default, list(item(type = super::LineThreshold)))]
#[serde(rename = "lines", skip_serializing_if = "Vec::is_empty", default)]
lines: Vec<super::LineThreshold>,
#[builder(
default,
custom(
type = impl
Into<Option<super::DefaultFill>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(rename = "defaultFill", skip_serializing_if = "Option::is_none", default)]
default_fill: Option<Box<super::DefaultFill>>,
}
impl LineThresholdGroup {
#[inline]
pub fn new(shading_config: super::ThresholdShadingConfig) -> Self {
Self::builder().shading_config(shading_config).build()
}
#[inline]
pub fn shading_config(&self) -> &super::ThresholdShadingConfig {
&self.shading_config
}
#[inline]
pub fn lines(&self) -> &[super::LineThreshold] {
&*self.lines
}
#[inline]
pub fn default_fill(&self) -> Option<&super::DefaultFill> {
self.default_fill.as_ref().map(|o| &**o)
}
}