#[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 TableColumn {
    #[serde(rename = "name")]
    name: super::super::super::channelvariables::api::ChannelVariableName,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::TableColumnTypedConfig>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(rename = "typedConfig", skip_serializing_if = "Option::is_none", default)]
    typed_config: Option<Box<super::TableColumnTypedConfig>>,
    #[builder(default, into)]
    #[serde(rename = "columnWidth", skip_serializing_if = "Option::is_none", default)]
    #[derive_with(with = conjure_object::private::DoubleWrapper)]
    column_width: Option<f64>,
}
impl TableColumn {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        name: super::super::super::channelvariables::api::ChannelVariableName,
    ) -> Self {
        Self::builder().name(name).build()
    }
    #[inline]
    pub fn name(
        &self,
    ) -> &super::super::super::channelvariables::api::ChannelVariableName {
        &self.name
    }
    #[inline]
    pub fn typed_config(&self) -> Option<&super::TableColumnTypedConfig> {
        self.typed_config.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn column_width(&self) -> Option<f64> {
        self.column_width.as_ref().map(|o| *o)
    }
}
