using MemoryPack;

namespace Insight.Domain.Network.Agent.Messages;

[MemoryPackable]
public partial class Request : IMessage
{
    [MemoryPackOrder(0)]
    public string? RequestId { get; set; }

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

[MemoryPackable]
public partial class Response : IMessage
{
    [MemoryPackOrder(0)]
    public string? RequestId { get; set; }

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

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

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

    [MemoryPackOrder(4)]
    public bool? ResponseError { get; set; }

    [MemoryPackConstructor]
    public Response() { }

    public Response(Request request)
    {
        RequestId = request.RequestId;
        RequestData = request.RequestData;
    }
}

//[MemoryPackable]
//public partial class ConsoleQueryRequest : IMessage
//{
//    [MemoryPackOrder(0)]
//    public string? Query { get; set; }
//}

//[MemoryPackable]
//public partial class ConsoleQueryResponse : IMessage
//{
//    [MemoryPackOrder(0)]
//    public string? Data { get; set; }

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

//    [MemoryPackOrder(2)]
//    public bool HadErrors { get; set; }
//}