using System.Xml.Serialization;

namespace NewRock.Sdk.Control.Response
{
    [XmlRoot(ElementName = "Status")]
    public class QueryExtResponse: NewRockResponse
    {
        [XmlElement("ext")]
        public QueryExt Ext { get; set; }
    }

    public class QueryExt
    {
        [XmlAttribute("id")]
        public string Id { get; set; }

        [XmlElement("lineid")]
        public string LineId { get; set; }

        [XmlElement("staffid")]
        public string Staffid { get; set; }

        [XmlElement("group")]
        public List<QueryExtGroup> Group { get; set; }

        [XmlElement("voicefile")]
        public string Voicefile { get; set; }

        [XmlElement("email")]
        public string Email { get; set; }

        [XmlElement("Call_Restriction")]
        public string Call_Restriction { get; set; }

        [XmlElement("Call_Pickup")]
        public string Call_Pickup { get; set; }

        [XmlElement("No_Disturb")]
        public string No_Disturb { get; set; }

        [XmlElement("Fwd_Type")]
        public string Fwd_Type { get; set; }

        [XmlElement("Fwd_Number")]
        public string Fwd_Number { get; set; }

        [XmlElement("fork'")]
        public string Fork { get; set; }

        [XmlElement("mobile")]
        public string Mobile { get; set; }

        [XmlElement("record'")]
        public string Record { get; set; }

        [XmlElement("api")]
        public string Api { get; set; }

        [XmlElement("state")]
        public string State { get; set; }

        [XmlElement("Off_Line_Num")]
        public string Off_Line_Num { get; set; }


        [XmlElement("outer")]
        public QueryExtOuter Outer { get; set; }

        [XmlElement("visitor")]
        public QueryExtVisitor Visitor { get; set; }

        [XmlElement("ext")]
        public QueryExtExt Ext { get; set; }
    }

    public class QueryExtGroup
    {
        [XmlAttribute("id")]
        public string Id { get; set; }
    }


    public class QueryExtVisitor
    {
        [XmlAttribute("id")]
        public string Id { get; set; }

        [XmlAttribute("from")]
        public string From { get; set; }

        [XmlAttribute("to")]
        public string To { get; set; }

        [XmlAttribute("callid")]
        public string CallId { get; set; }

        [XmlElement("state")]
        public string State { get; set; }
    }


    public class QueryExtOuter
    {
        [XmlAttribute("id")]
        public string Id { get; set; }

        [XmlAttribute("from")]
        public string From { get; set; }

        [XmlAttribute("to")]
        public string To { get; set; }

        [XmlAttribute("trunk")]
        public string Trunk { get; set; }

        [XmlAttribute("callid")]
        public string CallId { get; set; }

        [XmlElement("state")]
        public string State { get; set; }
    }

    public class QueryExtExt
    {
        [XmlAttribute("id")]
        public string Id { get; set; }

        [XmlElement("state")]
        public string State { get; set; }
    }

}
