using MemoryPack;

namespace Insight.Agent.Messages
{
    [MemoryPackUnion(140, typeof(Printer))]
    [MemoryPackUnion(141, typeof(PrinterList))]
    public partial interface IAgentMessage { }

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

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

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

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

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

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