awtrix3 0.0.2

Awtrix3 types and API (mqtt/http), from https://blueforcer.github.io/awtrix3/#/api
Documentation
use serde::{Deserialize, Serialize};
use serde_repr::{Deserialize_repr, Serialize_repr};

use super::{Color, OverlayEffect};

#[derive(Debug, Serialize_repr, Deserialize_repr, PartialEq)]
#[repr(u8)]
pub enum TransitionEffect {
    Random = 0,
    Slide = 1,
    Dim = 2,
    Zoom = 3,
    Rotate = 4,
    Pixelate = 5,
    Curtain = 6,
    Ripple = 7,
    Blink = 8,
    Reload = 9,
    Fade = 10,
}

#[derive(Debug, Serialize, Deserialize, Default)]
pub struct Settings {
    /// Duration an app is displayed in seconds (positive integer)
    #[serde(rename = "ATIME", skip_serializing_if = "Option::is_none")]
    pub app_display_time: Option<u16>,
    /// Choose between app transition effects.
    #[serde(rename = "TEFF", skip_serializing_if = "Option::is_none")]
    pub transition_effect: Option<TransitionEffect>,
    /// Time taken for the transition to the next app in milliseconds.
    #[serde(rename = "TSPEED", skip_serializing_if = "Option::is_none")]
    pub transition_time_ms: Option<u16>,
    /// Global text color.
    #[serde(rename = "TCOL", skip_serializing_if = "Option::is_none")]
    pub text_color: Option<Color>,
    /// Changes the time app style.
    #[serde(rename = "TMODE", skip_serializing_if = "Option::is_none")]
    pub time_mode: Option<u8>,
    /// Calendar header color of the time app.
    #[serde(rename = "CHCOL", skip_serializing_if = "Option::is_none")]
    pub calendar_header_color: Option<Color>,
    /// Calendar body color of the time app.
    #[serde(rename = "CBCOL", skip_serializing_if = "Option::is_none")]
    pub calendar_body_color: Option<Color>,
    /// Calendar text color in the time app.
    #[serde(rename = "CTCOL", skip_serializing_if = "Option::is_none")]
    pub calendar_text_color: Option<Color>,
    /// Enable or disable the weekday display.
    #[serde(rename = "WD", skip_serializing_if = "Option::is_none")]
    pub weekday_display: Option<bool>,
    /// Active weekday color.
    #[serde(rename = "WDCA", skip_serializing_if = "Option::is_none")]
    pub weekday_color_active: Option<Color>,
    /// Inactive weekday color.
    #[serde(rename = "WDCI", skip_serializing_if = "Option::is_none")]
    pub weekday_color_inactive: Option<Color>,
    /// Matrix brightness (0-255).
    #[serde(rename = "BRI", skip_serializing_if = "Option::is_none")]
    pub brightness: Option<u8>,
    /// Automatic brightness control.
    /// 0 = off, 1 = on.
    #[serde(rename = "ABRI", skip_serializing_if = "Option::is_none")]
    pub auto_brightness: Option<bool>,
    /// Automatic switching to the next app.
    #[serde(rename = "ATRANS", skip_serializing_if = "Option::is_none")]
    pub auto_transition: Option<bool>,
    /// Color correction for the matrix.
    #[serde(rename = "CCORRECTION", skip_serializing_if = "Option::is_none")]
    pub color_correction: Option<Vec<u8>>,
    /// Color temperature for the matrix.
    #[serde(rename = "CTEMP", skip_serializing_if = "Option::is_none")]
    pub color_temperature: Option<Vec<u16>>,
    /// Time format for the TimeApp.
    #[serde(rename = "TFORMAT", skip_serializing_if = "Option::is_none")]
    pub time_format: Option<String>,
    /// Date format for the DateApp.
    #[serde(rename = "DFORMAT", skip_serializing_if = "Option::is_none")]
    pub date_format: Option<String>,
    /// Start the week on Monday.
    #[serde(rename = "SOM", skip_serializing_if = "Option::is_none")]
    pub start_of_week_monday: Option<bool>,
    /// Block physical navigation keys (still sends input to MQTT).
    #[serde(rename = "BLOCKN", skip_serializing_if = "Option::is_none")]
    pub block_navigation: Option<bool>,
    /// Display text in uppercase.
    #[serde(rename = "UPPERCASE", skip_serializing_if = "Option::is_none")]
    pub uppercase: Option<bool>,
    /// Text color of the time app. Use 0 for global text color.
    #[serde(rename = "TIME_COL", skip_serializing_if = "Option::is_none")]
    pub time_color: Option<Color>,
    /// Text color of the date app. Use 0 for global text color.
    #[serde(rename = "DATE_COL", skip_serializing_if = "Option::is_none")]
    pub date_color: Option<Color>,
    /// Text color of the temperature app. Use 0 for global text color.
    #[serde(rename = "TEMP_COL", skip_serializing_if = "Option::is_none")]
    pub temperature_color: Option<Color>,
    /// Text color of the humidity app. Use 0 for global text color.
    #[serde(rename = "HUM_COL", skip_serializing_if = "Option::is_none")]
    pub humidity_color: Option<Color>,
    /// Text color of the battery app. Use 0 for global text color.
    #[serde(rename = "BAT_COL", skip_serializing_if = "Option::is_none")]
    pub battery_color: Option<Color>,
    /// Scroll speed modification (percentage of original scroll speed).
    #[serde(rename = "SSPEED", skip_serializing_if = "Option::is_none")]
    pub scroll_speed: Option<u8>,
    /// Enable or disable the native time app (requires reboot).
    /// 0 = off, 1 = on.
    #[serde(rename = "TIM", skip_serializing_if = "Option::is_none")]
    pub native_time: Option<bool>,
    /// Enable or disable the native date app (requires reboot).
    #[serde(rename = "DAT", skip_serializing_if = "Option::is_none")]
    pub native_date: Option<bool>,
    /// Enable or disable the native humidity app (requires reboot).
    #[serde(rename = "HUM", skip_serializing_if = "Option::is_none")]
    pub native_humidity: Option<bool>,
    /// Enable or disable the native temperature app (requires reboot).
    #[serde(rename = "TEMP", skip_serializing_if = "Option::is_none")]
    pub native_temperature: Option<bool>,
    /// Enable or disable the native battery app (requires reboot).
    #[serde(rename = "BAT", skip_serializing_if = "Option::is_none")]
    pub native_battery: Option<bool>,
    /// Enable or disable the matrix. Similar to power Endpoint but without the animation.
    #[serde(rename = "MATP", skip_serializing_if = "Option::is_none")]
    pub matrix_power: Option<bool>,
    /// Allows to set the Volume of the Buzzer and DFplayer (0-30)
    #[serde(rename = "VOL", skip_serializing_if = "Option::is_none")]
    pub volume: Option<u8>,
    /// Sets a global effect overlay (cannot be used with app specific overlays)
    #[serde(rename = "OVERLAY", skip_serializing_if = "Option::is_none")]
    pub overlay: Option<OverlayEffect>,
}