using MemoryPack;

namespace Insight.Agent.Messages
{
    [MemoryPackUnion(110, typeof(Session))]
    [MemoryPackUnion(111, typeof(SessionList))]
    public partial interface IAgentMessage { }

    [MemoryPackable]
    public partial class Session : IAgentMessage
    {
        [MemoryPackOrder(0)]
        public string? Sid { get; set; }

        [MemoryPackOrder(1)]
        public string? User { get; set; }

        [MemoryPackOrder(2)]
        public string? Type { get; set; }

        [MemoryPackOrder(3)]
        public string? Status { get; set; }

        [MemoryPackOrder(4)]
        public string? Remote { get; set; }
    }

    [MemoryPackable(GenerateType.Collection)]
    public partial class SessionList : List<Session>, IAgentMessage { }
}