using MemoryPack;

namespace Insight.Agent.Messages
{
    [MemoryPackUnion(60, typeof(Videocard))]
    [MemoryPackUnion(61, typeof(VideocardList))]
    public partial interface IAgentMessage { }

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

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

        [MemoryPackOrder(2)]
        public ulong Memory { get; set; }

        [MemoryPackOrder(3)]
        public DateTime DriverDate { get; set; }

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

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