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

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

/// DatatypeAlarmDefinitionType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DatatypeAlarmDefinition {
    /// Name attribute
    #[serde(rename = "@Name", default)]
    pub name: String,
    /// Use attribute
    #[serde(rename = "@Use", default, skip_serializing_if = "Option::is_none")]
    pub r#use: Option<String>,
    /// CustomProperties element
    #[serde(rename = "CustomProperties", default, skip_serializing_if = "Option::is_none")]
    pub custom_properties: Option<CustomPropertiesCollection>,
    /// MemberAlarmDefinition element
    #[serde(rename = "MemberAlarmDefinition", default, skip_serializing_if = "Vec::is_empty")]
    pub member_alarm_definition: Vec<MemberAlarmDefinition>,
}

/// DataLogCollectionType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DataLogCollection {
    /// UId attribute
    #[serde(rename = "@UId", default, skip_serializing_if = "Option::is_none")]
    pub uid: Option<String>,
    /// ParentUId attribute
    #[serde(rename = "@ParentUId", default, skip_serializing_if = "Option::is_none")]
    pub parent_uid: Option<String>,
    /// Use attribute
    #[serde(rename = "@Use", default, skip_serializing_if = "Option::is_none")]
    pub r#use: Option<String>,
    /// CustomProperties element
    #[serde(rename = "CustomProperties", default, skip_serializing_if = "Option::is_none")]
    pub custom_properties: Option<CustomPropertiesCollection>,
    /// DataLog element
    #[serde(rename = "DataLog", default, skip_serializing_if = "Vec::is_empty")]
    pub data_log: Vec<DataLog>,
}

/// DataLogType element
///
/// Note: Mixed content type
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DataLog {
    /// Name attribute
    #[serde(rename = "@Name", default)]
    pub name: String,
    /// UId attribute
    #[serde(rename = "@UId", default, skip_serializing_if = "Option::is_none")]
    pub uid: Option<String>,
    /// Period attribute
    #[serde(rename = "@Period", default, skip_serializing_if = "Option::is_none")]
    pub period: Option<String>,
    /// PeriodUnit attribute
    #[serde(rename = "@PeriodUnit", default, skip_serializing_if = "Option::is_none")]
    pub period_unit: Option<String>,
    /// EnableDataLoggingOnDownload attribute
    #[serde(rename = "@EnableDataLoggingOnDownload", default, skip_serializing_if = "Option::is_none")]
    pub enable_data_logging_on_download: Option<String>,
    /// CollectDataOnlyInRunMode attribute
    #[serde(rename = "@CollectDataOnlyInRunMode", default, skip_serializing_if = "Option::is_none")]
    pub collect_data_only_in_run_mode: Option<String>,
    /// DataCollectionType attribute
    #[serde(rename = "@DataCollectionType", default, skip_serializing_if = "Option::is_none")]
    pub data_collection_type: Option<String>,
    /// SampleEvent attribute
    #[serde(rename = "@SampleEvent", default, skip_serializing_if = "Option::is_none")]
    pub sample_event: Option<String>,
    /// StartTriggerCondition attribute
    #[serde(rename = "@StartTriggerCondition", default, skip_serializing_if = "Option::is_none")]
    pub start_trigger_condition: Option<String>,
    /// TriggerCondition attribute
    #[serde(rename = "@TriggerCondition", default, skip_serializing_if = "Option::is_none")]
    pub trigger_condition: Option<String>,
    /// PreSamples attribute
    #[serde(rename = "@PreSamples", default, skip_serializing_if = "Option::is_none")]
    pub pre_samples: Option<String>,
    /// PreSampleUnit attribute
    #[serde(rename = "@PreSampleUnit", default, skip_serializing_if = "Option::is_none")]
    pub pre_sample_unit: Option<String>,
    /// StopTriggerCondition attribute
    #[serde(rename = "@StopTriggerCondition", default, skip_serializing_if = "Option::is_none")]
    pub stop_trigger_condition: Option<String>,
    /// PostSamples attribute
    #[serde(rename = "@PostSamples", default, skip_serializing_if = "Option::is_none")]
    pub post_samples: Option<String>,
    /// PostSampleUnit attribute
    #[serde(rename = "@PostSampleUnit", default, skip_serializing_if = "Option::is_none")]
    pub post_sample_unit: Option<String>,
    /// CaptureSize attribute
    #[serde(rename = "@CaptureSize", default, skip_serializing_if = "Option::is_none")]
    pub capture_size: Option<String>,
    /// CaptureSizeUnit attribute
    #[serde(rename = "@CaptureSizeUnit", default, skip_serializing_if = "Option::is_none")]
    pub capture_size_unit: Option<String>,
    /// CaptureSizeExceeded attribute
    #[serde(rename = "@CaptureSizeExceeded", default, skip_serializing_if = "Option::is_none")]
    pub capture_size_exceeded: Option<String>,
    /// DataCapturesToKeep attribute
    #[serde(rename = "@DataCapturesToKeep", default, skip_serializing_if = "Option::is_none")]
    pub data_captures_to_keep: Option<String>,
    /// DataLogCapturesExceeded attribute
    #[serde(rename = "@DataLogCapturesExceeded", default, skip_serializing_if = "Option::is_none")]
    pub data_log_captures_exceeded: Option<String>,
    /// NumberOfDataLogTags attribute
    #[serde(rename = "@NumberOfDataLogTags", default, skip_serializing_if = "Option::is_none")]
    pub number_of_data_log_tags: Option<String>,
    /// DataLogSize attribute
    #[serde(rename = "@DataLogSize", default, skip_serializing_if = "Option::is_none")]
    pub data_log_size: Option<String>,
    /// DataLogSizeUnit attribute
    #[serde(rename = "@DataLogSizeUnit", default, skip_serializing_if = "Option::is_none")]
    pub data_log_size_unit: Option<String>,
    /// DataLogSizeExceeded attribute
    #[serde(rename = "@DataLogSizeExceeded", default, skip_serializing_if = "Option::is_none")]
    pub data_log_size_exceeded: Option<String>,
    /// Use attribute
    #[serde(rename = "@Use", default, skip_serializing_if = "Option::is_none")]
    pub r#use: Option<String>,
    /// CustomProperties element
    #[serde(rename = "CustomProperties", default, skip_serializing_if = "Option::is_none")]
    pub custom_properties: Option<CustomPropertiesCollection>,
    /// Description element
    #[serde(rename = "Description", default, skip_serializing_if = "Option::is_none")]
    pub description: Option<Description>,
    /// StartTriggerExpression element
    #[serde(rename = "StartTriggerExpression", default, skip_serializing_if = "Option::is_none")]
    pub start_trigger_expression: Option<String>,
    /// TriggerExpression element
    #[serde(rename = "TriggerExpression", default, skip_serializing_if = "Option::is_none")]
    pub trigger_expression: Option<String>,
    /// StopTriggerExpression element
    #[serde(rename = "StopTriggerExpression", default, skip_serializing_if = "Option::is_none")]
    pub stop_trigger_expression: Option<String>,
    /// DataLogTags element
    #[serde(rename = "DataLogTags", default, skip_serializing_if = "Option::is_none")]
    pub data_log_tags: Option<DataLogTagCollection>,
    /// Text content
    #[serde(rename = "$text", default, skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
}

/// DataWideType element
///
/// Note: Mixed content type with unbounded children
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DataWide {
    /// Format attribute
    #[serde(rename = "@Format", default, skip_serializing_if = "Option::is_none")]
    pub format: Option<String>,
    /// Length attribute
    #[serde(rename = "@Length", default, skip_serializing_if = "Option::is_none")]
    pub length: Option<String>,
    /// Value element
    #[serde(rename = "Value", default, skip_serializing_if = "Vec::is_empty")]
    pub value: Vec<DataWideType_Value_Inline>,
    /// MessageParameters element
    #[serde(rename = "MessageParameters", default, skip_serializing_if = "Vec::is_empty")]
    pub message_parameters: Vec<Msg>,
    /// MotionGroupParameters element
    #[serde(rename = "MotionGroupParameters", default, skip_serializing_if = "Vec::is_empty")]
    pub motion_group_parameters: Vec<MotionGroup>,
    /// HMIBCParameters element
    #[serde(rename = "HMIBCParameters", default, skip_serializing_if = "Vec::is_empty")]
    pub hmibcparameters: Vec<HMIBC>,
    /// BEOParameters element
    #[serde(rename = "BEOParameters", default, skip_serializing_if = "Vec::is_empty")]
    pub beoparameters: Vec<BEO>,
    /// EEOParameters element
    #[serde(rename = "EEOParameters", default, skip_serializing_if = "Vec::is_empty")]
    pub eeoparameters: Vec<EEO>,
    /// CoordinateSystemParameters element
    #[serde(rename = "CoordinateSystemParameters", default, skip_serializing_if = "Vec::is_empty")]
    pub coordinate_system_parameters: Vec<CoordinateSystem>,
    /// AxisParameters element
    #[serde(rename = "AxisParameters", default, skip_serializing_if = "Vec::is_empty")]
    pub axis_parameters: Vec<Axis>,
    /// AlarmAnalogParameters element
    #[serde(rename = "AlarmAnalogParameters", default, skip_serializing_if = "Vec::is_empty")]
    pub alarm_analog_parameters: Vec<AlarmAnalog>,
    /// AlarmDigitalParameters element
    #[serde(rename = "AlarmDigitalParameters", default, skip_serializing_if = "Vec::is_empty")]
    pub alarm_digital_parameters: Vec<AlarmDigital>,
    /// AlarmConfig element
    #[serde(rename = "AlarmConfig", default, skip_serializing_if = "Vec::is_empty")]
    pub alarm_config: Vec<AlarmConfig>,
    /// DataValue element
    #[serde(rename = "DataValue", default, skip_serializing_if = "Vec::is_empty")]
    pub data_value: Vec<DataValue>,
    /// Array element
    #[serde(rename = "Array", default, skip_serializing_if = "Vec::is_empty")]
    pub array: Vec<Box<DataArray>>,
    /// Structure element
    #[serde(rename = "Structure", default, skip_serializing_if = "Vec::is_empty")]
    pub structure: Vec<Box<DataStructure>>,
    /// Text content
    #[serde(rename = "$text", default, skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
}

/// DataWideType_Value_InlineType element
///
/// Note: Mixed content type
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DataWideType_Value_Inline {
    /// Text content
    #[serde(rename = "$text", default, skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
    /// Arbitrary child elements (xs:any) - skipped during deserialization
    #[serde(skip)]
    pub children: Vec<AnyElement>,
}

/// DataValue element
///
/// Note: Mixed content type
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DataValue {
    /// Name attribute
    #[serde(rename = "@Name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// DataType attribute
    #[serde(rename = "@DataType", default, skip_serializing_if = "Option::is_none")]
    pub data_type: Option<String>,
    /// Radix attribute
    #[serde(rename = "@Radix", default, skip_serializing_if = "Option::is_none")]
    pub radix: Option<String>,
    /// Value attribute
    #[serde(rename = "@Value", default, skip_serializing_if = "Option::is_none")]
    pub value: Option<String>,
    /// ForceValue attribute
    #[serde(rename = "@ForceValue", default, skip_serializing_if = "Option::is_none")]
    pub force_value: Option<String>,
    /// Text content
    #[serde(rename = "$text", default, skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
}

/// DataArray element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DataArray {
    /// Name attribute
    #[serde(rename = "@Name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// DataType attribute
    #[serde(rename = "@DataType", default, skip_serializing_if = "Option::is_none")]
    pub data_type: Option<String>,
    /// Dimensions attribute
    #[serde(rename = "@Dimensions", default, skip_serializing_if = "Option::is_none")]
    pub dimensions: Option<String>,
    /// Radix attribute
    #[serde(rename = "@Radix", default, skip_serializing_if = "Option::is_none")]
    pub radix: Option<String>,
    /// Element element
    #[serde(rename = "Element", default, skip_serializing_if = "Vec::is_empty")]
    pub element: Vec<Box<DataArrayElement>>,
}

/// DataStructure element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DataStructure {
    /// Name attribute
    #[serde(rename = "@Name", default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// DataType attribute
    #[serde(rename = "@DataType", default, skip_serializing_if = "Option::is_none")]
    pub data_type: Option<String>,
    /// DataValueMember element
    #[serde(rename = "DataValueMember", default, skip_serializing_if = "Vec::is_empty")]
    pub data_value_member: Vec<DataValue>,
    /// StructureMember element
    #[serde(rename = "StructureMember", default, skip_serializing_if = "Vec::is_empty")]
    pub structure_member: Vec<Box<DataStructure>>,
    /// ArrayMember element
    #[serde(rename = "ArrayMember", default, skip_serializing_if = "Vec::is_empty")]
    pub array_member: Vec<Box<DataArray>>,
}

