use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Debug)]
pub struct DigitalInputInput {
    // minimum: 0, maximum: 65535
    #[serde(skip_serializing_if = "Option::is_none")]
    pub debounce: Option<u16>,
    // Allowed Values: Simple, DirectSwitch
    #[serde(skip_serializing_if = "Option::is_none")]
    pub mode: Option<String>,
    // minimum: 0, maximum: 65535
    #[serde(skip_serializing_if = "Option::is_none")]
    pub counter: Option<u16>,
    // Allowed Values: Enabled, Disabled, rising, falling, disabled
    #[serde(skip_serializing_if = "Option::is_none")]
    pub counter_mode: Option<Vec<String>>,
    // Allowed Values: Simple, Inverted, Toggle
    #[serde(skip_serializing_if = "Option::is_none")]
    pub ds_mode: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub alias: Option<String>,
}
