using System.IO;
using ServiceStack;
using ServiceStack.Web;

namespace WebService.ServiceModel
{
    [Route("/flexquery", "POST", Summary = "Any query for all types of request")]
    [Route("/flexquery/{Profile}", "POST", Summary = "Any query for all types of request with profile name")]
    [Route("/flexquery/{Profile}/{Method}", "POST", Summary = "Any query for all types of request with profile name")]
    public class FlexibleQueryRequest : IRequiresRequestStream
    {
        /*
         * Profile name, ex: duck-creek
         */
        public string Profile { get; set; }

        public string Method { get; set; }
        /*
         * Stream of data, ex: JSON, XML, SOAP
         */
        public Stream RequestStream { get; set; }
    }


    [Route("/flexquery", "GET", Summary = "Any query for all types of request")]
    [Route("/flexquery/{Profile}", "GET", Summary = "Any query for all types of request with profile name")]
    [Route("/flexquery/{Profile}/{FileResponse}/{Format}", "GET", Summary = "Get request data")]
    public class FlexibleQueryGetRequest : IRequiresRequestStream
    {
        public string Profile { get; set; }

        public string FileResponse { get; set; }

        public string Format { get; set; }

        public Stream RequestStream { get; set; }
    }
}
