namespace Pilz.Net.Api;

public class ApiRequestContext
{
    public bool Canceled { get; internal set; }
    public string Route { get; set; }
    public HttpMethod Method { get; set; }
    public ApiMessage? Message { get; set; }
    public ApiParameterCollection? Params { get; }
    public IApiMessageSerializer? Serializer { get; set; }
    public Type? ResponseMessageType { get; }
    public HttpResponseMessage? HttpResponse { get; internal set; }
    public object? ApiResponse { get; internal set; }

    public ApiRequestContext(string route, HttpMethod method, ApiMessage? message, ApiParameterCollection? @params, IApiMessageSerializer? serializer, Type? responseMessageType)
    {
        Route = route;
        Method = method;
        Message = message;
        Params = @params;
        Serializer = serializer;
        ResponseMessageType = responseMessageType;
    }
}
