/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package scriptbuilder.structures.events;

import scriptbuilder.structures.ELEMENT;
import scriptbuilder.structures.I_XML_Writable;
import scriptbuilder.structures.ScriptEvent;
import scriptbuilder.structures.XMLWriter;

/**
 * Data model for a Unit event. A unit has a status and an ID number, can be
 * active, and can be the primary response unit.
 *
 * @author Bryan McGuffin
 */
public class UnitEvent extends ScriptEvent implements I_XML_Writable
{

    /**
     * Constructor.
     */
    public UnitEvent()
    {
        super(ScriptEventType.UNIT_EVENT);
    }

    public String unitActive = "";

    public String unitPrimary = "";

    public String unitStatus = "";

    public String unitNum = "";
    @Override
    public String toXML()
    {
        return XMLWriter.emptyTag(ELEMENT.UNIT.tag+" UnitNum=\""+unitNum+"\" Status=\""
                +unitStatus+"\" Primary=\""+unitPrimary+"\" Active=\""+unitActive+"\"");
    }

}
