public HttpRequestMessage CreateHttpRequest(Configuration configuration)
{
// verify the required parameter 'document' is set
if (this.Document == null)
{
throw new ApiException(400, "Missing required parameter 'document' when calling SaveAsTiffOnline");
}
// verify the required parameter 'saveOptions' is set
if (this.SaveOptions == null)
{
throw new ApiException(400, "Missing required parameter 'saveOptions' when calling SaveAsTiffOnline");
}
var path = configuration.GetApiRootUrl() + "/words/online/put/saveAs/tiff";
path = Regex
.Replace(path, "\\*", string.Empty)
.Replace("&", "&")
.Replace("/?", "?");
path = UrlHelper.AddQueryParameterToUrl(path, "loadEncoding", this.LoadEncoding);
path = UrlHelper.AddQueryParameterToUrl(path, "password", this.Password);
path = UrlHelper.AddQueryParameterToUrl(path, "useAntiAliasing", this.UseAntiAliasing);
path = UrlHelper.AddQueryParameterToUrl(path, "useHighQualityRendering", this.UseHighQualityRendering);
path = UrlHelper.AddQueryParameterToUrl(path, "imageBrightness", this.ImageBrightness);
path = UrlHelper.AddQueryParameterToUrl(path, "imageColorMode", this.ImageColorMode);
path = UrlHelper.AddQueryParameterToUrl(path, "imageContrast", this.ImageContrast);
path = UrlHelper.AddQueryParameterToUrl(path, "numeralFormat", this.NumeralFormat);
path = UrlHelper.AddQueryParameterToUrl(path, "pageCount", this.PageCount);
path = UrlHelper.AddQueryParameterToUrl(path, "pageIndex", this.PageIndex);
path = UrlHelper.AddQueryParameterToUrl(path, "paperColor", this.PaperColor);
path = UrlHelper.AddQueryParameterToUrl(path, "pixelFormat", this.PixelFormat);
path = UrlHelper.AddQueryParameterToUrl(path, "resolution", this.Resolution);
path = UrlHelper.AddQueryParameterToUrl(path, "scale", this.Scale);
path = UrlHelper.AddQueryParameterToUrl(path, "tiffCompression", this.TiffCompression);
path = UrlHelper.AddQueryParameterToUrl(path, "dmlRenderingMode", this.DmlRenderingMode);
path = UrlHelper.AddQueryParameterToUrl(path, "dmlEffectsRenderingMode", this.DmlEffectsRenderingMode);
path = UrlHelper.AddQueryParameterToUrl(path, "tiffBinarizationMethod", this.TiffBinarizationMethod);
path = UrlHelper.AddQueryParameterToUrl(path, "zipOutput", this.ZipOutput);
path = UrlHelper.AddQueryParameterToUrl(path, "fontsLocation", this.FontsLocation);
var result = new HttpRequestMessage(HttpMethod.Put, path);
var formData = new Dictionary<string, object>();
if (this.Document != null)
{
formData.Add("document", new Aspose.Words.Cloud.Sdk.FileInfo() { Name = "Document", FileContent = StreamHelper.ReadAsBytes(this.Document) });
}
if (this.SaveOptions != null)
{
formData.Add("SaveOptions", this.SaveOptions);
}
if (formData.Count > 0)
{
result.Content = ApiInvoker.GetMultipartFormData(formData);
}
return result;
}