nominal-api 0.1240.0

API bindings for the Nominal platform
Documentation
#[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 UserSettings {
    #[builder(default, into)]
    #[serde(
        rename = "defaultTimeRangeType",
        skip_serializing_if = "Option::is_none",
        default
    )]
    default_time_range_type: Option<super::DefaultTimeRangeTypeSetting>,
    #[builder(default, into)]
    #[serde(rename = "appearance", skip_serializing_if = "Option::is_none", default)]
    appearance: Option<super::AppearanceSetting>,
    #[builder(default, into)]
    #[serde(rename = "timezone", skip_serializing_if = "Option::is_none", default)]
    timezone: Option<super::TimezoneSetting>,
    #[builder(default, into)]
    #[serde(
        rename = "timeSeriesHoverTooltipConcise",
        skip_serializing_if = "Option::is_none",
        default
    )]
    time_series_hover_tooltip_concise: Option<bool>,
    #[builder(default, into)]
    #[serde(
        rename = "chartHoverTooltipMode",
        skip_serializing_if = "Option::is_none",
        default
    )]
    chart_hover_tooltip_mode: Option<super::ChartTooltipModeSetting>,
    #[builder(
        default,
        custom(
            type = impl
            Into<Option<super::DefaultNumberFormatConfigurations>>,
            convert = |v|v.into().map(Box::new)
        )
    )]
    #[serde(
        rename = "defaultNumberFormats",
        skip_serializing_if = "Option::is_none",
        default
    )]
    default_number_formats: Option<Box<super::DefaultNumberFormatConfigurations>>,
    #[builder(default, into)]
    #[serde(rename = "vimModeEnabled", skip_serializing_if = "Option::is_none", default)]
    vim_mode_enabled: Option<bool>,
}
impl UserSettings {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new() -> Self {
        Self::builder().build()
    }
    #[inline]
    pub fn default_time_range_type(
        &self,
    ) -> Option<&super::DefaultTimeRangeTypeSetting> {
        self.default_time_range_type.as_ref().map(|o| &*o)
    }
    #[inline]
    pub fn appearance(&self) -> Option<&super::AppearanceSetting> {
        self.appearance.as_ref().map(|o| &*o)
    }
    #[inline]
    pub fn timezone(&self) -> Option<&super::TimezoneSetting> {
        self.timezone.as_ref().map(|o| &*o)
    }
    #[deprecated(
        note = "Use `chartHoverTooltipMode` instead. If `chartHoverTooltipMode` is not set, this field will be\nused: `true` as `SINGLE` and `false` as `VERBOSE`.\n"
    )]
    #[inline]
    pub fn time_series_hover_tooltip_concise(&self) -> Option<bool> {
        self.time_series_hover_tooltip_concise.as_ref().map(|o| *o)
    }
    #[inline]
    pub fn chart_hover_tooltip_mode(&self) -> Option<&super::ChartTooltipModeSetting> {
        self.chart_hover_tooltip_mode.as_ref().map(|o| &*o)
    }
    #[inline]
    pub fn default_number_formats(
        &self,
    ) -> Option<&super::DefaultNumberFormatConfigurations> {
        self.default_number_formats.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn vim_mode_enabled(&self) -> Option<bool> {
        self.vim_mode_enabled.as_ref().map(|o| *o)
    }
}