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

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

/// DataTypeCollectionType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DataTypeCollection {
    /// 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>,
    /// DataType element
    #[serde(rename = "DataType", default, skip_serializing_if = "Vec::is_empty")]
    pub data_type: Vec<DataType>,
}

/// DataTypeType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DataType {
    /// Name attribute
    #[serde(rename = "@Name", default)]
    pub name: String,
    /// Family attribute
    #[serde(rename = "@Family", default, skip_serializing_if = "Option::is_none")]
    pub family: Option<String>,
    /// Class attribute
    #[serde(rename = "@Class", default, skip_serializing_if = "Option::is_none")]
    pub class: Option<String>,
    /// 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>,
    /// Size attribute
    #[serde(rename = "@Size", default, skip_serializing_if = "Option::is_none")]
    pub size: Option<String>,
    /// Verified attribute
    #[serde(rename = "@Verified", default, skip_serializing_if = "Option::is_none")]
    pub verified: Option<String>,
    /// DeletionProhibited attribute
    #[serde(rename = "@DeletionProhibited", default, skip_serializing_if = "Option::is_none")]
    pub deletion_prohibited: 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>,
    /// EngineeringUnit element
    #[serde(rename = "EngineeringUnit", default, skip_serializing_if = "Option::is_none")]
    pub engineering_unit: Option<EngineeringUnit>,
    /// Members element
    #[serde(rename = "Members", default, skip_serializing_if = "Option::is_none")]
    pub members: Option<TypeMemberCollection>,
    /// Dependencies element
    #[serde(rename = "Dependencies", default, skip_serializing_if = "Vec::is_empty")]
    pub dependencies: Vec<DependenciesWide>,
    /// Text content
    #[serde(rename = "$text", default, skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
}

/// DataTypeMemberType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DataTypeMember {
    /// Name attribute
    #[serde(rename = "@Name", default)]
    pub name: String,
    /// DataType attribute
    #[serde(rename = "@DataType", default)]
    pub data_type: String,
    /// DataTypeUId attribute
    #[serde(rename = "@DataTypeUId", default, skip_serializing_if = "Option::is_none")]
    pub data_type_uid: Option<String>,
    /// Dimension attribute
    #[serde(rename = "@Dimension", default, skip_serializing_if = "Option::is_none")]
    pub dimension: Option<String>,
    /// Radix attribute
    #[serde(rename = "@Radix", default, skip_serializing_if = "Option::is_none")]
    pub radix: Option<String>,
    /// Hidden attribute
    #[serde(rename = "@Hidden", default, skip_serializing_if = "Option::is_none")]
    pub hidden: Option<String>,
    /// Target attribute
    #[serde(rename = "@Target", default, skip_serializing_if = "Option::is_none")]
    pub target: Option<String>,
    /// BitNumber attribute
    #[serde(rename = "@BitNumber", default, skip_serializing_if = "Option::is_none")]
    pub bit_number: Option<String>,
    /// Size attribute
    #[serde(rename = "@Size", default, skip_serializing_if = "Option::is_none")]
    pub size: Option<String>,
    /// Offset attribute
    #[serde(rename = "@Offset", default, skip_serializing_if = "Option::is_none")]
    pub offset: Option<String>,
    /// Max attribute
    #[serde(rename = "@Max", default, skip_serializing_if = "Option::is_none")]
    pub max: Option<String>,
    /// Min attribute
    #[serde(rename = "@Min", default, skip_serializing_if = "Option::is_none")]
    pub min: Option<String>,
    /// DefaultValue attribute
    #[serde(rename = "@DefaultValue", default, skip_serializing_if = "Option::is_none")]
    pub default_value: Option<String>,
    /// EditID attribute
    #[serde(rename = "@EditID", default, skip_serializing_if = "Option::is_none")]
    pub edit_id: Option<String>,
    /// ExternalAccess attribute
    #[serde(rename = "@ExternalAccess", default, skip_serializing_if = "Option::is_none")]
    pub external_access: Option<String>,
    /// UId attribute
    #[serde(rename = "@UId", default, skip_serializing_if = "Option::is_none")]
    pub 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>,
    /// Description element
    #[serde(rename = "Description", default, skip_serializing_if = "Option::is_none")]
    pub description: Option<Description>,
    /// EngineeringUnit element
    #[serde(rename = "EngineeringUnit", default, skip_serializing_if = "Option::is_none")]
    pub engineering_unit: Option<EngineeringUnit>,
    /// State0 element
    #[serde(rename = "State0", default, skip_serializing_if = "Option::is_none")]
    pub state0: Option<State0>,
    /// State1 element
    #[serde(rename = "State1", default, skip_serializing_if = "Option::is_none")]
    pub state1: Option<State1>,
}

/// DataTypeDependencyCollectionType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DataTypeDependencyCollection {
    /// 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>,
    /// Dependency element
    #[serde(rename = "Dependency", default, skip_serializing_if = "Vec::is_empty")]
    pub dependency: Vec<DependencyWide>,
}

/// DataTypeDependencyType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DataTypeDependency {
    /// Type attribute
    #[serde(rename = "@Type", default, skip_serializing_if = "Option::is_none")]
    pub r#type: Option<String>,
    /// Name attribute
    #[serde(rename = "@Name", default, skip_serializing_if = "Option::is_none")]
    pub name: 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>,
}

/// ConfigDataType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ConfigData {
    /// UId attribute
    #[serde(rename = "@UId", default, skip_serializing_if = "Option::is_none")]
    pub uid: Option<String>,
    /// ConfigSize attribute
    #[serde(rename = "@ConfigSize", default, skip_serializing_if = "Option::is_none")]
    pub config_size: Option<String>,
    /// DataType attribute
    #[serde(rename = "@DataType", default, skip_serializing_if = "Option::is_none")]
    pub data_type: Option<String>,
    /// Dimension attribute
    #[serde(rename = "@Dimension", default, skip_serializing_if = "Option::is_none")]
    pub dimension: 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>,
    /// Data element
    #[serde(rename = "Data", default, skip_serializing_if = "Vec::is_empty")]
    pub data: Vec<DataWide>,
}

/// InputDataType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct InputData {
    /// UId attribute
    #[serde(rename = "@UId", default, skip_serializing_if = "Option::is_none")]
    pub uid: Option<String>,
    /// DataType attribute
    #[serde(rename = "@DataType", default, skip_serializing_if = "Option::is_none")]
    pub data_type: Option<String>,
    /// Dimension attribute
    #[serde(rename = "@Dimension", default, skip_serializing_if = "Option::is_none")]
    pub dimension: 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>,
    /// Data element
    #[serde(rename = "Data", default, skip_serializing_if = "Vec::is_empty")]
    pub data: Vec<DataWide>,
}

/// OutputDataType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct OutputData {
    /// UId attribute
    #[serde(rename = "@UId", default, skip_serializing_if = "Option::is_none")]
    pub uid: Option<String>,
    /// DataType attribute
    #[serde(rename = "@DataType", default, skip_serializing_if = "Option::is_none")]
    pub data_type: Option<String>,
    /// Dimension attribute
    #[serde(rename = "@Dimension", default, skip_serializing_if = "Option::is_none")]
    pub dimension: 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>,
    /// Data element
    #[serde(rename = "Data", default, skip_serializing_if = "Vec::is_empty")]
    pub data: Vec<DataWide>,
}

/// RawDefaultDataType element
///
/// Note: Mixed content type
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct RawDefaultData {
    /// Format attribute
    #[serde(rename = "@Format", default, skip_serializing_if = "Option::is_none")]
    pub format: 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>,
    /// Text content
    #[serde(rename = "$text", default, skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
}

/// L5KDefaultDataType element
///
/// Note: Mixed content type
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct L5KDefaultData {
    /// Format attribute
    #[serde(rename = "@Format", default)]
    pub format: 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>,
    /// Text content
    #[serde(rename = "$text", default, skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
}

/// StringDefaultDataType element
///
/// Note: Mixed content type
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct StringDefaultData {
    /// Format attribute
    #[serde(rename = "@Format", default)]
    pub format: String,
    /// Length attribute
    #[serde(rename = "@Length", default)]
    pub length: 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>,
    /// Text content
    #[serde(rename = "$text", default, skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
}

/// DecoratedDefaultDataType element
///
/// Note: Mixed content type
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DecoratedDefaultData {
    /// 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>,
}

/// StringDataType element
///
/// Note: Mixed content type
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct StringData {
    /// Format attribute
    #[serde(rename = "@Format", default)]
    pub format: String,
    /// Length attribute
    #[serde(rename = "@Length", default)]
    pub length: 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>,
    /// Text content
    #[serde(rename = "$text", default, skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
}

/// RawDataType element
///
/// Note: Mixed content type
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct RawData {
    /// Format attribute
    #[serde(rename = "@Format", default, skip_serializing_if = "Option::is_none")]
    pub format: 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>,
    /// Text content
    #[serde(rename = "$text", default, skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
}

/// L5KDataType element
///
/// Note: Mixed content type
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct L5KData {
    /// Format attribute
    #[serde(rename = "@Format", default)]
    pub format: 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>,
    /// Text content
    #[serde(rename = "$text", default, skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
}

/// DecoratedDataType element
///
/// Note: Mixed content type
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DecoratedData {
    /// 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>,
}

/// RawForceDataType element
///
/// Note: Mixed content type
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct RawForceData {
    /// Format attribute
    #[serde(rename = "@Format", default, skip_serializing_if = "Option::is_none")]
    pub format: 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>,
    /// Text content
    #[serde(rename = "$text", default, skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
}

/// L5KForceDataType element
///
/// Note: Mixed content type
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct L5KForceData {
    /// Format attribute
    #[serde(rename = "@Format", default)]
    pub format: 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>,
    /// Text content
    #[serde(rename = "$text", default, skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
}

/// MessageDataType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct MessageData {
    /// Format attribute
    #[serde(rename = "@Format", default)]
    pub format: 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>,
    /// MessageParameters element
    #[serde(rename = "MessageParameters", default, skip_serializing_if = "Option::is_none")]
    pub message_parameters: Option<Msg>,
}

/// MotionGroupDataType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct MotionGroupData {
    /// Format attribute
    #[serde(rename = "@Format", default)]
    pub format: 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>,
    /// MotionGroupParameters element
    #[serde(rename = "MotionGroupParameters", default, skip_serializing_if = "Option::is_none")]
    pub motion_group_parameters: Option<MotionGroup>,
}

/// CoordinateSystemDataType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CoordinateSystemData {
    /// Format attribute
    #[serde(rename = "@Format", default)]
    pub format: 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>,
    /// CoordinateSystemParameters element
    #[serde(rename = "CoordinateSystemParameters", default, skip_serializing_if = "Option::is_none")]
    pub coordinate_system_parameters: Option<CoordinateSystem>,
}

/// AxisDataType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct AxisData {
    /// Format attribute
    #[serde(rename = "@Format", default)]
    pub format: 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>,
    /// AxisParameters element
    #[serde(rename = "AxisParameters", default, skip_serializing_if = "Option::is_none")]
    pub axis_parameters: Option<Axis>,
}

/// AlarmDataType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct AlarmData {
    /// Format attribute
    #[serde(rename = "@Format", default)]
    pub format: 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>,
    /// AlarmAnalogParameters element
    #[serde(rename = "AlarmAnalogParameters", default, skip_serializing_if = "Option::is_none")]
    pub alarm_analog_parameters: Option<AlarmAnalog>,
    /// AlarmDigitalParameters element
    #[serde(rename = "AlarmDigitalParameters", default, skip_serializing_if = "Option::is_none")]
    pub alarm_digital_parameters: Option<AlarmDigital>,
    /// AlarmConfig element
    #[serde(rename = "AlarmConfig", default, skip_serializing_if = "Option::is_none")]
    pub alarm_config: Option<AlarmConfig>,
}

/// HMIBCDataType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct HMIBCData {
    /// Format attribute
    #[serde(rename = "@Format", default)]
    pub format: 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>,
    /// HMIBCParameters element
    #[serde(rename = "HMIBCParameters", default, skip_serializing_if = "Option::is_none")]
    pub hmibcparameters: Option<HMIBC>,
}

/// BEODataType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct BEOData {
    /// Format attribute
    #[serde(rename = "@Format", default)]
    pub format: 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>,
    /// BEOParameters element
    #[serde(rename = "BEOParameters", default, skip_serializing_if = "Option::is_none")]
    pub beoparameters: Option<BEO>,
}

/// EEODataType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct EEOData {
    /// Format attribute
    #[serde(rename = "@Format", default)]
    pub format: 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>,
    /// EEOParameters element
    #[serde(rename = "EEOParameters", default, skip_serializing_if = "Option::is_none")]
    pub eeoparameters: Option<EEO>,
}

