/// <summary> /// Creates the http request based on this request. /// </summary> /// <param name="configuration">SDK configuration.</param> /// <returns>The http request instance.</returns> public HttpRequestMessage CreateHttpRequest(Configuration configuration) { // verify the required parameter 'name' is set if (this.Name == null) { throw new ApiException(400, "Missing required parameter 'name' when calling UpdateDrawingObject"); } // verify the required parameter 'drawingObject' is set if (this.DrawingObject == null) { throw new ApiException(400, "Missing required parameter 'drawingObject' when calling UpdateDrawingObject"); } // verify the required parameter 'imageFile' is set if (this.ImageFile == null) { throw new ApiException(400, "Missing required parameter 'imageFile' when calling UpdateDrawingObject"); } var path = configuration.GetApiRootUrl() + "/words/{name}/{nodePath}/drawingObjects/{index}"; path = Regex .Replace(path, "\\*", string.Empty) .Replace("&", "&") .Replace("/?", "?"); path = UrlHelper.AddPathParameter(path, "name", this.Name); path = UrlHelper.AddPathParameter(path, "index", this.Index); path = UrlHelper.AddPathParameter(path, "nodePath", this.NodePath); path = UrlHelper.AddQueryParameterToUrl(path, "folder", this.Folder); path = UrlHelper.AddQueryParameterToUrl(path, "storage", this.Storage); path = UrlHelper.AddQueryParameterToUrl(path, "loadEncoding", this.LoadEncoding); path = UrlHelper.AddQueryParameterToUrl(path, "password", this.Password); path = UrlHelper.AddQueryParameterToUrl(path, "destFileName", this.DestFileName); path = UrlHelper.AddQueryParameterToUrl(path, "revisionAuthor", this.RevisionAuthor); path = UrlHelper.AddQueryParameterToUrl(path, "revisionDateTime", this.RevisionDateTime); var result = new HttpRequestMessage(HttpMethod.Put, path); var formData = new Dictionary <string, object>(); if (this.DrawingObject != null) { formData.Add("DrawingObject", this.DrawingObject); } if (this.ImageFile != null) { formData.Add("imageFile", new Aspose.Words.Cloud.Sdk.FileInfo() { Name = "ImageFile", FileContent = StreamHelper.ReadAsBytes(this.ImageFile) }); } if (formData.Count > 0) { result.Content = ApiInvoker.GetMultipartFormData(formData); } return(result); }
/// <summary> /// Creates the http request based on this request. /// </summary> /// <param name="configuration">SDK configuration.</param> /// <returns>The http request instance.</returns> 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 GetListsOnline"); } var path = configuration.GetApiRootUrl() + "/words/online/get/lists"; path = Regex .Replace(path, "\\*", string.Empty) .Replace("&", "&") .Replace("/?", "?"); path = UrlHelper.AddQueryParameterToUrl(path, "loadEncoding", this.LoadEncoding); path = UrlHelper.AddQueryParameterToUrl(path, "password", this.Password); 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 (formData.Count > 0) { result.Content = ApiInvoker.GetMultipartFormData(formData); } return(result); }
/// <summary> /// Creates the http request based on this request. /// </summary> /// <param name="configuration">SDK configuration.</param> /// <returns>The http request instance.</returns> 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; }
/// <summary> /// Creates the http request based on this request. /// </summary> /// <param name="configuration">SDK configuration.</param> /// <returns>The http request instance.</returns> 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 UpdateBorderOnline"); } // verify the required parameter 'borderProperties' is set if (this.BorderProperties == null) { throw new ApiException(400, "Missing required parameter 'borderProperties' when calling UpdateBorderOnline"); } // verify the required parameter 'borderType' is set if (this.BorderType == null) { throw new ApiException(400, "Missing required parameter 'borderType' when calling UpdateBorderOnline"); } var path = configuration.GetApiRootUrl() + "/words/online/put/{nodePath}/borders/{borderType}"; path = Regex .Replace(path, "\\*", string.Empty) .Replace("&", "&") .Replace("/?", "?"); path = UrlHelper.AddPathParameter(path, "borderType", this.BorderType); path = UrlHelper.AddPathParameter(path, "nodePath", this.NodePath); path = UrlHelper.AddQueryParameterToUrl(path, "loadEncoding", this.LoadEncoding); path = UrlHelper.AddQueryParameterToUrl(path, "password", this.Password); path = UrlHelper.AddQueryParameterToUrl(path, "destFileName", this.DestFileName); path = UrlHelper.AddQueryParameterToUrl(path, "revisionAuthor", this.RevisionAuthor); path = UrlHelper.AddQueryParameterToUrl(path, "revisionDateTime", this.RevisionDateTime); 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.BorderProperties != null) { formData.Add("BorderProperties", this.BorderProperties); } if (formData.Count > 0) { result.Content = ApiInvoker.GetMultipartFormData(formData); } return(result); }
/// <summary> /// Creates the http request based on this request. /// </summary> /// <param name="configuration">SDK configuration.</param> /// <returns>The http request instance.</returns> public HttpRequestMessage CreateHttpRequest(Configuration configuration) { // verify the required parameter 'template' is set if (this.Template == null) { throw new ApiException(400, "Missing required parameter 'template' when calling BuildReportOnline"); } // verify the required parameter 'data' is set if (this.Data == null) { throw new ApiException(400, "Missing required parameter 'data' when calling BuildReportOnline"); } // verify the required parameter 'reportEngineSettings' is set if (this.ReportEngineSettings == null) { throw new ApiException(400, "Missing required parameter 'reportEngineSettings' when calling BuildReportOnline"); } var path = configuration.GetApiRootUrl() + "/words/buildReport"; path = Regex .Replace(path, "\\*", string.Empty) .Replace("&", "&") .Replace("/?", "?"); path = UrlHelper.AddQueryParameterToUrl(path, "documentFileName", this.DocumentFileName); var result = new HttpRequestMessage(HttpMethod.Put, path); var formData = new Dictionary <string, object>(); if (this.Template != null) { formData.Add("template", new Aspose.Words.Cloud.Sdk.FileInfo() { Name = "Template", FileContent = StreamHelper.ReadAsBytes(this.Template) }); } if (this.Data != null) { formData.Add("Data", this.Data); } if (this.ReportEngineSettings != null) { formData.Add("ReportEngineSettings", this.ReportEngineSettings); } if (formData.Count > 0) { result.Content = ApiInvoker.GetMultipartFormData(formData); } return(result); }
/// <summary> /// Creates the http request based on this request. /// </summary> /// <param name="configuration">SDK configuration.</param> /// <returns>The http request instance.</returns> public HttpRequestMessage CreateHttpRequest(Configuration configuration) { // verify the required parameter 'name' is set if (this.Name == null) { throw new ApiException(400, "Missing required parameter 'name' when calling BuildReport"); } // verify the required parameter 'data' is set if (this.Data == null) { throw new ApiException(400, "Missing required parameter 'data' when calling BuildReport"); } // verify the required parameter 'reportEngineSettings' is set if (this.ReportEngineSettings == null) { throw new ApiException(400, "Missing required parameter 'reportEngineSettings' when calling BuildReport"); } var path = configuration.GetApiRootUrl() + "/words/{name}/buildReport"; path = Regex .Replace(path, "\\*", string.Empty) .Replace("&", "&") .Replace("/?", "?"); path = UrlHelper.AddPathParameter(path, "name", this.Name); path = UrlHelper.AddQueryParameterToUrl(path, "folder", this.Folder); path = UrlHelper.AddQueryParameterToUrl(path, "storage", this.Storage); path = UrlHelper.AddQueryParameterToUrl(path, "loadEncoding", this.LoadEncoding); path = UrlHelper.AddQueryParameterToUrl(path, "password", this.Password); path = UrlHelper.AddQueryParameterToUrl(path, "destFileName", this.DestFileName); var result = new HttpRequestMessage(HttpMethod.Put, path); var formData = new Dictionary <string, object>(); if (this.Data != null) { formData.Add("Data", this.Data); } if (this.ReportEngineSettings != null) { formData.Add("ReportEngineSettings", this.ReportEngineSettings); } if (formData.Count > 0) { result.Content = ApiInvoker.GetMultipartFormData(formData); } return(result); }
/// <summary> /// Creates the http request based on this request. /// </summary> /// <param name="configuration">SDK configuration.</param> /// <returns>The http request instance.</returns> 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 InsertOrUpdateParagraphTabStopOnline"); } // verify the required parameter 'tabStopInsertDto' is set if (this.TabStopInsertDto == null) { throw new ApiException(400, "Missing required parameter 'tabStopInsertDto' when calling InsertOrUpdateParagraphTabStopOnline"); } var path = configuration.GetApiRootUrl() + "/words/online/post/{nodePath}/paragraphs/{index}/tabstops"; path = Regex .Replace(path, "\\*", string.Empty) .Replace("&", "&") .Replace("/?", "?"); path = UrlHelper.AddPathParameter(path, "index", this.Index); path = UrlHelper.AddPathParameter(path, "nodePath", this.NodePath); path = UrlHelper.AddQueryParameterToUrl(path, "loadEncoding", this.LoadEncoding); path = UrlHelper.AddQueryParameterToUrl(path, "password", this.Password); path = UrlHelper.AddQueryParameterToUrl(path, "destFileName", this.DestFileName); 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.TabStopInsertDto != null) { formData.Add("TabStopInsertDto", this.TabStopInsertDto); } if (formData.Count > 0) { result.Content = ApiInvoker.GetMultipartFormData(formData); } return(result); }
/// <summary> /// Creates the http request based on this request. /// </summary> /// <param name="configuration">SDK configuration.</param> /// <returns>The http request instance.</returns> 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 ConvertDocument"); } // verify the required parameter 'format' is set if (this.Format == null) { throw new ApiException(400, "Missing required parameter 'format' when calling ConvertDocument"); } var path = configuration.GetApiRootUrl() + "/words/convert"; path = Regex .Replace(path, "\\*", string.Empty) .Replace("&", "&") .Replace("/?", "?"); path = UrlHelper.AddQueryParameterToUrl(path, "format", this.Format); path = UrlHelper.AddQueryParameterToUrl(path, "outPath", this.OutPath); path = UrlHelper.AddQueryParameterToUrl(path, "fileNameFieldValue", this.FileNameFieldValue); path = UrlHelper.AddQueryParameterToUrl(path, "storage", this.Storage); 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 (formData.Count > 0) { result.Content = ApiInvoker.GetMultipartFormData(formData); } return(result); }
/// <summary> /// Creates the http request based on this request. /// </summary> /// <param name="configuration">SDK configuration.</param> /// <returns>The http request instance.</returns> public HttpRequestMessage CreateHttpRequest(Configuration configuration) { // verify the required parameter 'name' is set if (this.Name == null) { throw new ApiException(400, "Missing required parameter 'name' when calling ExecuteMailMerge"); } var path = configuration.GetApiRootUrl() + "/words/{name}/MailMerge"; path = Regex .Replace(path, "\\*", string.Empty) .Replace("&", "&") .Replace("/?", "?"); path = UrlHelper.AddPathParameter(path, "name", this.Name); path = UrlHelper.AddQueryParameterToUrl(path, "folder", this.Folder); path = UrlHelper.AddQueryParameterToUrl(path, "storage", this.Storage); path = UrlHelper.AddQueryParameterToUrl(path, "loadEncoding", this.LoadEncoding); path = UrlHelper.AddQueryParameterToUrl(path, "password", this.Password); path = UrlHelper.AddQueryParameterToUrl(path, "withRegions", this.WithRegions); path = UrlHelper.AddQueryParameterToUrl(path, "mailMergeDataFile", this.MailMergeDataFile); path = UrlHelper.AddQueryParameterToUrl(path, "cleanup", this.Cleanup); path = UrlHelper.AddQueryParameterToUrl(path, "useWholeParagraphAsRegion", this.UseWholeParagraphAsRegion); path = UrlHelper.AddQueryParameterToUrl(path, "destFileName", this.DestFileName); var result = new HttpRequestMessage(HttpMethod.Put, path); var formData = new Dictionary <string, object>(); if (this.Data != null) { formData.Add("Data", this.Data); } if (formData.Count > 0) { result.Content = ApiInvoker.GetMultipartFormData(formData); } return(result); }