use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
use std::fmt;
use std::str::FromStr;
#[derive(Debug, PartialOrd, PartialEq, Copy, Clone)]
pub enum DivoomChannelType {
Clock,
CloudChannel,
Visualizer,
CustomPage,
Raw(i32),
}
impl_divoom_dto_enum_traits!(DivoomChannelType, Clock: "clock", CloudChannel: "cloud", Visualizer: "visualizer", CustomPage: "customPage");
#[derive(Debug, PartialOrd, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct DivoomClockInfoPage {
pub total_num: i32,
pub dial_list: Vec<DivoomClockInfo>,
}
#[derive(Debug, PartialOrd, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct DivoomClockInfo {
pub clock_id: i32,
pub name: String,
}
#[derive(Debug, PartialOrd, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct DivoomSelectedClockInfo {
pub clock_id: i32,
pub brightness: i32,
}
#[derive(Debug, PartialOrd, PartialEq, Copy, Clone)]
pub enum DivoomCloudChannelType {
Gallery,
Fav,
Artist,
Raw(i32),
}
impl_divoom_dto_enum_traits!(DivoomCloudChannelType, Gallery: "gallery", Fav: "fav", Artist: "artist");