public Response.Export Export(string path, string [] queries, string exportType, string [] productTypes, string mailFormat, string naming, string caseId, string token)
 {
     string service = "http://" + url + ":" + port + "/nuix-restful-service/svc/v1/cases/" + caseId + "/export?token=" + token;
     string method = "PUT";
     Request.Export export = new Request.Export();
     export.path = path;
     export.queries = queries;
     export.exportType = exportType;
     export.productTypes = productTypes;
     Request.ExportOptions exportOptions = new Request.ExportOptions();
     Request.ProductOptions productOptions = new Request.ProductOptions();
     productOptions.mailFormat = mailFormat;
     productOptions.naming = naming;
     exportOptions.productOptions = productOptions;
     export.exportOptions = exportOptions;
     string data = JsonConvert.SerializeObject(export);
     Console.WriteLine("Invoking Export Endpoint (" + method + ") with the following payload: " + service);
     Console.WriteLine(data);
     string response = Call(service, method, data, true);
     return JsonConvert.DeserializeObject<Response.Export>(response);
 }
        public Response.Export Export(string path, string [] queries, string exportType, string [] productTypes, string mailFormat, string naming, string caseId, string token)
        {
            string service = "http://" + url + ":" + port + "/nuix-restful-service/svc/v1/cases/" + caseId + "/export?token=" + token;
            string method  = "PUT";

            Request.Export export = new Request.Export();
            export.path         = path;
            export.queries      = queries;
            export.exportType   = exportType;
            export.productTypes = productTypes;
            Request.ExportOptions  exportOptions  = new Request.ExportOptions();
            Request.ProductOptions productOptions = new Request.ProductOptions();
            productOptions.mailFormat    = mailFormat;
            productOptions.naming        = naming;
            exportOptions.productOptions = productOptions;
            export.exportOptions         = exportOptions;
            string data = JsonConvert.SerializeObject(export);

            Console.WriteLine("Invoking Export Endpoint (" + method + ") with the following payload: " + service);
            Console.WriteLine(data);
            string response = Call(service, method, data, true);

            return(JsonConvert.DeserializeObject <Response.Export>(response));
        }