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

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

/// RungCollectionType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct RungCollection {
    /// Use attribute
    #[serde(rename = "@Use", default, skip_serializing_if = "Option::is_none")]
    pub r#use: Option<String>,
    /// Start attribute
    #[serde(rename = "@Start", default, skip_serializing_if = "Option::is_none")]
    pub start: Option<String>,
    /// Count attribute
    #[serde(rename = "@Count", default, skip_serializing_if = "Option::is_none")]
    pub count: Option<String>,
    /// OnlineEditType attribute
    #[serde(rename = "@OnlineEditType", default, skip_serializing_if = "Option::is_none")]
    pub online_edit_type: Option<String>,
    /// CustomProperties element
    #[serde(rename = "CustomProperties", default, skip_serializing_if = "Option::is_none")]
    pub custom_properties: Option<CustomPropertiesCollection>,
    /// Labels element
    #[serde(rename = "Labels", default, skip_serializing_if = "Vec::is_empty")]
    pub labels: Vec<LabelsWide>,
    /// Rung element
    #[serde(rename = "Rung", default, skip_serializing_if = "Vec::is_empty")]
    pub rung: Vec<Rung>,
}

/// RungType element
///
/// Note: Mixed content type with unbounded children
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct Rung {
    /// Number attribute
    #[serde(rename = "@Number", default, skip_serializing_if = "Option::is_none")]
    pub number: Option<String>,
    /// Type attribute
    #[serde(rename = "@Type", default, skip_serializing_if = "Option::is_none")]
    pub r#type: Option<String>,
    /// UId attribute
    #[serde(rename = "@UId", default, skip_serializing_if = "Option::is_none")]
    pub uid: Option<String>,
    /// RungId attribute
    #[serde(rename = "@RungId", default, skip_serializing_if = "Option::is_none")]
    pub rung_id: Option<String>,
    /// Verified attribute
    #[serde(rename = "@Verified", default, skip_serializing_if = "Option::is_none")]
    pub verified: Option<String>,
    /// RegionId attribute
    #[serde(rename = "@RegionId", default, skip_serializing_if = "Option::is_none")]
    pub region_id: 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 = "Vec::is_empty")]
    pub custom_properties: Vec<CustomPropertiesCollection>,
    /// Comment element
    #[serde(rename = "Comment", default, skip_serializing_if = "Vec::is_empty")]
    pub comment: Vec<CommentWide>,
    /// Text element
    #[serde(rename = "Text", default, skip_serializing_if = "Vec::is_empty")]
    pub text: Vec<TextWide>,
    /// TextIOI element
    #[serde(rename = "TextIOI", default, skip_serializing_if = "Vec::is_empty")]
    pub text_ioi: Vec<String>,
    /// TextNTT element
    #[serde(rename = "TextNTT", default, skip_serializing_if = "Vec::is_empty")]
    pub text_ntt: Vec<String>,
}

/// RungCommentType element
///
/// Note: Mixed content type with unbounded children
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct RungComment {
    /// 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>,
    /// LocalizedComment element
    #[serde(rename = "LocalizedComment", default, skip_serializing_if = "Vec::is_empty")]
    pub localized_comment: Vec<LocalizedCommentWide>,
    /// Text content
    #[serde(rename = "$text", default, skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
}

/// RungCommentTextType element
///
/// Note: Mixed content type
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct RungCommentText {
    /// Lang attribute
    #[serde(rename = "@Lang", default, skip_serializing_if = "Option::is_none")]
    pub lang: 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>,
}

/// AFBD_BlockType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct AFBD_Block {
    /// Type attribute
    #[serde(rename = "@Type", default)]
    pub r#type: String,
    /// ID attribute
    #[serde(rename = "@ID", default)]
    pub id: String,
    /// X attribute
    #[serde(rename = "@X", default)]
    pub x: String,
    /// Y attribute
    #[serde(rename = "@Y", default)]
    pub y: String,
    /// Operand attribute
    #[serde(rename = "@Operand", default, skip_serializing_if = "Option::is_none")]
    pub operand: Option<String>,
    /// OperandIOI attribute
    #[serde(rename = "@OperandIOI", default, skip_serializing_if = "Option::is_none")]
    pub operand_ioi: Option<String>,
    /// OperandIOINTT attribute
    #[serde(rename = "@OperandIOINTT", default, skip_serializing_if = "Option::is_none")]
    pub operand_iointt: Option<String>,
    /// VisiblePins attribute
    #[serde(rename = "@VisiblePins", default, skip_serializing_if = "Option::is_none")]
    pub visible_pins: Option<String>,
    /// HideDesc attribute
    #[serde(rename = "@HideDesc", default, skip_serializing_if = "Option::is_none")]
    pub hide_desc: Option<String>,
    /// AutotuneTag attribute
    #[serde(rename = "@AutotuneTag", default, skip_serializing_if = "Option::is_none")]
    pub autotune_tag: Option<String>,
    /// AutotuneTagIOI attribute
    #[serde(rename = "@AutotuneTagIOI", default, skip_serializing_if = "Option::is_none")]
    pub autotune_tag_ioi: Option<String>,
    /// AutotuneTagIOINTT attribute
    #[serde(rename = "@AutotuneTagIOINTT", default, skip_serializing_if = "Option::is_none")]
    pub autotune_tag_iointt: Option<String>,
    /// Verified attribute
    #[serde(rename = "@Verified", default, skip_serializing_if = "Option::is_none")]
    pub verified: Option<String>,
    /// UId attribute
    #[serde(rename = "@UId", default, skip_serializing_if = "Option::is_none")]
    pub uid: Option<String>,
    /// MetadataId attribute
    #[serde(rename = "@MetadataId", default, skip_serializing_if = "Option::is_none")]
    pub metadata_id: Option<String>,
    /// RegionId attribute
    #[serde(rename = "@RegionId", default, skip_serializing_if = "Option::is_none")]
    pub region_id: 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>,
    /// Array element
    #[serde(rename = "Array", default, skip_serializing_if = "Vec::is_empty")]
    pub array: Vec<FBD_SpecialArray>,
}

/// AFBD_FunctionType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct AFBD_Function {
    /// Type attribute
    #[serde(rename = "@Type", default)]
    pub r#type: String,
    /// ID attribute
    #[serde(rename = "@ID", default)]
    pub id: String,
    /// X attribute
    #[serde(rename = "@X", default)]
    pub x: String,
    /// Y attribute
    #[serde(rename = "@Y", default)]
    pub y: String,
    /// OutputTagIOI attribute
    #[serde(rename = "@OutputTagIOI", default, skip_serializing_if = "Option::is_none")]
    pub output_tag_ioi: Option<String>,
    /// OutputTagIOINTT attribute
    #[serde(rename = "@OutputTagIOINTT", default, skip_serializing_if = "Option::is_none")]
    pub output_tag_iointt: Option<String>,
    /// RegionId attribute
    #[serde(rename = "@RegionId", default, skip_serializing_if = "Option::is_none")]
    pub region_id: Option<String>,
    /// OutputTagArrayIndex attribute
    #[serde(rename = "@OutputTagArrayIndex", default, skip_serializing_if = "Option::is_none")]
    pub output_tag_array_index: Option<String>,
    /// UId attribute
    #[serde(rename = "@UId", default, skip_serializing_if = "Option::is_none")]
    pub uid: Option<String>,
    /// MetadataId attribute
    #[serde(rename = "@MetadataId", default, skip_serializing_if = "Option::is_none")]
    pub metadata_id: 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>,
}

/// ASFC_StepElementType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ASFC_StepElement {
    /// ID attribute
    #[serde(rename = "@ID", default)]
    pub id: String,
    /// X attribute
    #[serde(rename = "@X", default)]
    pub x: String,
    /// Y attribute
    #[serde(rename = "@Y", default)]
    pub y: String,
    /// Operand attribute
    #[serde(rename = "@Operand", default, skip_serializing_if = "Option::is_none")]
    pub operand: Option<String>,
    /// OperandIOI attribute
    #[serde(rename = "@OperandIOI", default, skip_serializing_if = "Option::is_none")]
    pub operand_ioi: Option<String>,
    /// ComponentIOI attribute
    #[serde(rename = "@ComponentIOI", default, skip_serializing_if = "Option::is_none")]
    pub component_ioi: Option<String>,
    /// HideDesc attribute
    #[serde(rename = "@HideDesc", default, skip_serializing_if = "Option::is_none")]
    pub hide_desc: Option<String>,
    /// DescX attribute
    #[serde(rename = "@DescX", default, skip_serializing_if = "Option::is_none")]
    pub desc_x: Option<String>,
    /// DescY attribute
    #[serde(rename = "@DescY", default, skip_serializing_if = "Option::is_none")]
    pub desc_y: Option<String>,
    /// DescWidth attribute
    #[serde(rename = "@DescWidth", default, skip_serializing_if = "Option::is_none")]
    pub desc_width: Option<String>,
    /// InitialStep attribute
    #[serde(rename = "@InitialStep", default, skip_serializing_if = "Option::is_none")]
    pub initial_step: Option<String>,
    /// PresetUsesExpr attribute
    #[serde(rename = "@PresetUsesExpr", default, skip_serializing_if = "Option::is_none")]
    pub preset_uses_expr: Option<String>,
    /// LimitHighUsesExpr attribute
    #[serde(rename = "@LimitHighUsesExpr", default, skip_serializing_if = "Option::is_none")]
    pub limit_high_uses_expr: Option<String>,
    /// LimitLowUsesExpr attribute
    #[serde(rename = "@LimitLowUsesExpr", default, skip_serializing_if = "Option::is_none")]
    pub limit_low_uses_expr: Option<String>,
    /// ShowActions attribute
    #[serde(rename = "@ShowActions", default, skip_serializing_if = "Option::is_none")]
    pub show_actions: Option<String>,
    /// NoPhaseStep attribute
    #[serde(rename = "@NoPhaseStep", default, skip_serializing_if = "Option::is_none")]
    pub no_phase_step: Option<String>,
    /// PhaseName attribute
    #[serde(rename = "@PhaseName", default, skip_serializing_if = "Option::is_none")]
    pub phase_name: Option<String>,
    /// PhaseIOI attribute
    #[serde(rename = "@PhaseIOI", default, skip_serializing_if = "Option::is_none")]
    pub phase_ioi: Option<String>,
    /// TransferOfControlSource attribute
    #[serde(rename = "@TransferOfControlSource", default, skip_serializing_if = "Option::is_none")]
    pub transfer_of_control_source: Option<String>,
    /// TransferOfControlTarget attribute
    #[serde(rename = "@TransferOfControlTarget", default, skip_serializing_if = "Option::is_none")]
    pub transfer_of_control_target: Option<String>,
    /// UId attribute
    #[serde(rename = "@UId", default, skip_serializing_if = "Option::is_none")]
    pub uid: Option<String>,
    /// MetadataId attribute
    #[serde(rename = "@MetadataId", default, skip_serializing_if = "Option::is_none")]
    pub metadata_id: 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>,
    /// Preset element
    #[serde(rename = "Preset", default, skip_serializing_if = "Option::is_none")]
    pub preset: Option<EmbeddedLanguageBlock>,
    /// LimitHigh element
    #[serde(rename = "LimitHigh", default, skip_serializing_if = "Option::is_none")]
    pub limit_high: Option<EmbeddedLanguageBlock>,
    /// LimitLow element
    #[serde(rename = "LimitLow", default, skip_serializing_if = "Option::is_none")]
    pub limit_low: Option<EmbeddedLanguageBlock>,
    /// Action element
    #[serde(rename = "Action", default, skip_serializing_if = "Vec::is_empty")]
    pub action: Vec<SFC_ActionElement>,
}

/// ASFC_TransitionElementType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ASFC_TransitionElement {
    /// ID attribute
    #[serde(rename = "@ID", default)]
    pub id: String,
    /// X attribute
    #[serde(rename = "@X", default)]
    pub x: String,
    /// Y attribute
    #[serde(rename = "@Y", default)]
    pub y: String,
    /// Operand attribute
    #[serde(rename = "@Operand", default, skip_serializing_if = "Option::is_none")]
    pub operand: Option<String>,
    /// OperandIOI attribute
    #[serde(rename = "@OperandIOI", default, skip_serializing_if = "Option::is_none")]
    pub operand_ioi: Option<String>,
    /// ComponentIOI attribute
    #[serde(rename = "@ComponentIOI", default, skip_serializing_if = "Option::is_none")]
    pub component_ioi: Option<String>,
    /// HideDesc attribute
    #[serde(rename = "@HideDesc", default, skip_serializing_if = "Option::is_none")]
    pub hide_desc: Option<String>,
    /// DescX attribute
    #[serde(rename = "@DescX", default, skip_serializing_if = "Option::is_none")]
    pub desc_x: Option<String>,
    /// DescY attribute
    #[serde(rename = "@DescY", default, skip_serializing_if = "Option::is_none")]
    pub desc_y: Option<String>,
    /// DescWidth attribute
    #[serde(rename = "@DescWidth", default, skip_serializing_if = "Option::is_none")]
    pub desc_width: Option<String>,
    /// Force attribute
    #[serde(rename = "@Force", default, skip_serializing_if = "Option::is_none")]
    pub force: Option<String>,
    /// UId attribute
    #[serde(rename = "@UId", default, skip_serializing_if = "Option::is_none")]
    pub uid: Option<String>,
    /// MetadataId attribute
    #[serde(rename = "@MetadataId", default, skip_serializing_if = "Option::is_none")]
    pub metadata_id: 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>,
    /// Condition element
    #[serde(rename = "Condition", default, skip_serializing_if = "Option::is_none")]
    pub condition: Option<EmbeddedLanguageBlock>,
}

/// ASFC_BranchElementType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ASFC_BranchElement {
    /// ID attribute
    #[serde(rename = "@ID", default)]
    pub id: String,
    /// X attribute
    #[serde(rename = "@X", default, skip_serializing_if = "Option::is_none")]
    pub x: Option<String>,
    /// Y attribute
    #[serde(rename = "@Y", default)]
    pub y: String,
    /// BranchType attribute
    #[serde(rename = "@BranchType", default)]
    pub branch_type: String,
    /// BranchFlow attribute
    #[serde(rename = "@BranchFlow", default)]
    pub branch_flow: String,
    /// Priority attribute
    #[serde(rename = "@Priority", default, skip_serializing_if = "Option::is_none")]
    pub priority: Option<String>,
    /// UId attribute
    #[serde(rename = "@UId", default, skip_serializing_if = "Option::is_none")]
    pub uid: Option<String>,
    /// MetadataId attribute
    #[serde(rename = "@MetadataId", default, skip_serializing_if = "Option::is_none")]
    pub metadata_id: 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>,
    /// Leg element
    #[serde(rename = "Leg", default, skip_serializing_if = "Vec::is_empty")]
    pub leg: Vec<ASFC_LegElement>,
}

/// ASFC_LegElementType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ASFC_LegElement {
    /// ID attribute
    #[serde(rename = "@ID", default)]
    pub id: String,
    /// Force attribute
    #[serde(rename = "@Force", default, skip_serializing_if = "Option::is_none")]
    pub force: Option<String>,
    /// ComponentIOI attribute
    #[serde(rename = "@ComponentIOI", default, skip_serializing_if = "Option::is_none")]
    pub component_ioi: Option<String>,
    /// UId attribute
    #[serde(rename = "@UId", default, skip_serializing_if = "Option::is_none")]
    pub uid: Option<String>,
    /// MetadataId attribute
    #[serde(rename = "@MetadataId", default, skip_serializing_if = "Option::is_none")]
    pub metadata_id: 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>,
}

/// ASFC_StopElementType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ASFC_StopElement {
    /// ID attribute
    #[serde(rename = "@ID", default)]
    pub id: String,
    /// X attribute
    #[serde(rename = "@X", default)]
    pub x: String,
    /// Y attribute
    #[serde(rename = "@Y", default)]
    pub y: String,
    /// Operand attribute
    #[serde(rename = "@Operand", default, skip_serializing_if = "Option::is_none")]
    pub operand: Option<String>,
    /// OperandIOI attribute
    #[serde(rename = "@OperandIOI", default, skip_serializing_if = "Option::is_none")]
    pub operand_ioi: Option<String>,
    /// ComponentIOI attribute
    #[serde(rename = "@ComponentIOI", default, skip_serializing_if = "Option::is_none")]
    pub component_ioi: Option<String>,
    /// HideDesc attribute
    #[serde(rename = "@HideDesc", default, skip_serializing_if = "Option::is_none")]
    pub hide_desc: Option<String>,
    /// DescX attribute
    #[serde(rename = "@DescX", default, skip_serializing_if = "Option::is_none")]
    pub desc_x: Option<String>,
    /// DescY attribute
    #[serde(rename = "@DescY", default, skip_serializing_if = "Option::is_none")]
    pub desc_y: Option<String>,
    /// DescWidth attribute
    #[serde(rename = "@DescWidth", default, skip_serializing_if = "Option::is_none")]
    pub desc_width: Option<String>,
    /// UId attribute
    #[serde(rename = "@UId", default, skip_serializing_if = "Option::is_none")]
    pub uid: Option<String>,
    /// MetadataId attribute
    #[serde(rename = "@MetadataId", default, skip_serializing_if = "Option::is_none")]
    pub metadata_id: 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>,
}

/// ASFC_LangElemWireType element
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct ASFC_LangElemWire {
    /// FromID attribute
    #[serde(rename = "@FromID", default)]
    pub from_id: String,
    /// ToID attribute
    #[serde(rename = "@ToID", default)]
    pub to_id: String,
    /// Show attribute
    #[serde(rename = "@Show", default)]
    pub show: String,
    /// Verified attribute
    #[serde(rename = "@Verified", default, skip_serializing_if = "Option::is_none")]
    pub verified: Option<String>,
    /// UId attribute
    #[serde(rename = "@UId", default, skip_serializing_if = "Option::is_none")]
    pub uid: Option<String>,
    /// MetadataId attribute
    #[serde(rename = "@MetadataId", default, skip_serializing_if = "Option::is_none")]
    pub metadata_id: 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>,
}

