// Auto-generated L5X types - tasks category
// DO NOT EDIT - Generated by build script

use serde::{Serialize, Deserialize};
use super::*;

/// TaskCollectionType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct TaskCollection {
    /// UId attribute
    #[serde(rename = "@UId", default)]
    pub uid: Option<String>,
    /// ParentUId attribute
    #[serde(rename = "@ParentUId", default)]
    pub parent_uid: Option<String>,
    /// Use attribute
    #[serde(rename = "@Use", default)]
    pub r#use: Option<String>,
    /// CustomProperties element
    #[serde(rename = "CustomProperties", default)]
    pub custom_properties: Option<CustomPropertiesCollection>,
    /// Task element
    #[serde(rename = "Task", default)]
    pub task: Vec<Task>,
}

/// TaskType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct Task {
    /// Name attribute
    #[serde(rename = "@Name", default)]
    pub name: String,
    /// UId attribute
    #[serde(rename = "@UId", default)]
    pub uid: Option<String>,
    /// ParentUId attribute
    #[serde(rename = "@ParentUId", default)]
    pub parent_uid: Option<String>,
    /// Type attribute
    #[serde(rename = "@Type", default)]
    pub r#type: String,
    /// Watchdog attribute
    #[serde(rename = "@Watchdog", default)]
    pub watchdog: Option<String>,
    /// Priority attribute
    #[serde(rename = "@Priority", default)]
    pub priority: Option<String>,
    /// Rate attribute
    #[serde(rename = "@Rate", default)]
    pub rate: Option<String>,
    /// DisableUpdateOutputs attribute
    #[serde(rename = "@DisableUpdateOutputs", default)]
    pub disable_update_outputs: Option<String>,
    /// InhibitTask attribute
    #[serde(rename = "@InhibitTask", default)]
    pub inhibit_task: Option<String>,
    /// Verified attribute
    #[serde(rename = "@Verified", default)]
    pub verified: Option<String>,
    /// LastScanTime attribute
    #[serde(rename = "@LastScanTime", default)]
    pub last_scan_time: Option<String>,
    /// MaxScanTime attribute
    #[serde(rename = "@MaxScanTime", default)]
    pub max_scan_time: Option<String>,
    /// MaxInterval attribute
    #[serde(rename = "@MaxInterval", default)]
    pub max_interval: Option<String>,
    /// MinInterval attribute
    #[serde(rename = "@MinInterval", default)]
    pub min_interval: Option<String>,
    /// StartTime attribute
    #[serde(rename = "@StartTime", default)]
    pub start_time: Option<String>,
    /// Class attribute
    #[serde(rename = "@Class", default)]
    pub class: Option<String>,
    /// Use attribute
    #[serde(rename = "@Use", default)]
    pub r#use: Option<String>,
    /// CustomProperties element
    #[serde(rename = "CustomProperties", default)]
    pub custom_properties: Option<CustomPropertiesCollection>,
    /// Description element
    #[serde(rename = "Description", default)]
    pub description: Option<Description>,
    /// EventInfo element
    #[serde(rename = "EventInfo", default)]
    pub event_info: Option<TaskEventInfo>,
    /// ScheduledPrograms element
    #[serde(rename = "ScheduledPrograms", default)]
    pub scheduled_programs: Option<ScheduledProgramCollection>,
}

/// TaskEventInfoType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct TaskEventInfo {
    /// EventTrigger attribute
    #[serde(rename = "@EventTrigger", default)]
    pub event_trigger: Option<String>,
    /// EventTag attribute
    #[serde(rename = "@EventTag", default)]
    pub event_tag: Option<String>,
    /// EnableTimeout attribute
    #[serde(rename = "@EnableTimeout", default)]
    pub enable_timeout: Option<String>,
    /// Use attribute
    #[serde(rename = "@Use", default)]
    pub r#use: Option<String>,
    /// CustomProperties element
    #[serde(rename = "CustomProperties", default)]
    pub custom_properties: Option<CustomPropertiesCollection>,
}

/// ScheduledProgramCollectionType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ScheduledProgramCollection {
    /// Use attribute
    #[serde(rename = "@Use", default)]
    pub r#use: Option<String>,
    /// CustomProperties element
    #[serde(rename = "CustomProperties", default)]
    pub custom_properties: Option<CustomPropertiesCollection>,
    /// ScheduledProgram element
    #[serde(rename = "ScheduledProgram", default)]
    pub scheduled_program: Vec<ScheduledProgram>,
}

/// ScheduledProgramType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ScheduledProgram {
    /// Name attribute
    #[serde(rename = "@Name", default)]
    pub name: String,
    /// UId attribute
    #[serde(rename = "@UId", default)]
    pub uid: Option<String>,
    /// Use attribute
    #[serde(rename = "@Use", default)]
    pub r#use: Option<String>,
    /// CustomProperties element
    #[serde(rename = "CustomProperties", default)]
    pub custom_properties: Option<CustomPropertiesCollection>,
}

