using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace NewRock.Sdk.Events
{
    [XmlRoot("Cdr")]
    public class CdrEvent
    {
        [XmlAttribute("id")]
        public string Id { get; set; }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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