use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Debug)]
pub struct UserLed {
    // Allowed Values: led
    pub dev: String,
    pub circuit: String,
    // minimum: 0 maximum: 1
    pub value: u8,
    // minimum: 0
    pub glob_dev_id: u32,
    pub alias: String,
}

#[derive(Serialize, Deserialize, Debug)]
pub struct UserLedInput {
    // minimum: 0 maximum: 1
    #[serde(skip_serializing_if = "Option::is_none")]
    pub value: Option<u8>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub alias: Option<String>,
}
