/* * FHT.Core.API 1.0 * * ̨group.apiVersion:1.0 * * OpenAPI spec version: v1 * Contact: fht@fht360.com * Generated by: https://github.com/swagger-api/swagger-codegen.git */ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Net.Http; using IO.Swagger.Client; using IO.Swagger.Model; namespace IO.Swagger.Api { /// /// Represents a collection of functions to interact with the API endpoints /// public interface ITopicTypeApiApi : IApiAccessor { #region Synchronous Operations /// /// /// /// /// /// /// Thrown when fails to make API call /// /// /// /// /// /// /// /// /// /// /// void TopicTypeApiChangeTopicType (int? topicTypeId, string title, string englishTitle, string pinyin, string description, string publishIconUrl, string webIconUrl, string businessOpportunityIconUrl, int? order, bool? isActive); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// /// /// /// /// /// /// /// /// /// ApiResponse of Object(void) ApiResponse TopicTypeApiChangeTopicTypeWithHttpInfo (int? topicTypeId, string title, string englishTitle, string pinyin, string description, string publishIconUrl, string webIconUrl, string businessOpportunityIconUrl, int? order, bool? isActive); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// /// /// /// /// /// /// /// /// void TopicTypeApiCreateTopicType (string title, string englishTitle, string pinyin, string description, string publishIconUrl, string webIconUrl, string businessOpportunityIconUrl, int? order, bool? isActive); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// /// /// /// /// /// /// /// /// ApiResponse of Object(void) ApiResponse TopicTypeApiCreateTopicTypeWithHttpInfo (string title, string englishTitle, string pinyin, string description, string publishIconUrl, string webIconUrl, string businessOpportunityIconUrl, int? order, bool? isActive); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// void TopicTypeApiDisabled (int? topicTypeId); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// ApiResponse of Object(void) ApiResponse TopicTypeApiDisabledWithHttpInfo (int? topicTypeId); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// void TopicTypeApiEnabled (int? topicTypeId); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// ApiResponse of Object(void) ApiResponse TopicTypeApiEnabledWithHttpInfo (int? topicTypeId); /// /// /// /// /// /// /// Thrown when fails to make API call /// List<TopicTypeViewModel> List TopicTypeApiGetTopicTypes (); /// /// /// /// /// /// /// Thrown when fails to make API call /// ApiResponse of List<TopicTypeViewModel> ApiResponse> TopicTypeApiGetTopicTypesWithHttpInfo (); #endregion Synchronous Operations #region Asynchronous Operations /// /// /// /// /// /// /// Thrown when fails to make API call /// /// /// /// /// /// /// /// /// /// /// Task of void System.Threading.Tasks.Task TopicTypeApiChangeTopicTypeAsync (int? topicTypeId, string title, string englishTitle, string pinyin, string description, string publishIconUrl, string webIconUrl, string businessOpportunityIconUrl, int? order, bool? isActive); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// /// /// /// /// /// /// /// /// /// Task of ApiResponse System.Threading.Tasks.Task> TopicTypeApiChangeTopicTypeAsyncWithHttpInfo (int? topicTypeId, string title, string englishTitle, string pinyin, string description, string publishIconUrl, string webIconUrl, string businessOpportunityIconUrl, int? order, bool? isActive); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// /// /// /// /// /// /// /// /// Task of void System.Threading.Tasks.Task TopicTypeApiCreateTopicTypeAsync (string title, string englishTitle, string pinyin, string description, string publishIconUrl, string webIconUrl, string businessOpportunityIconUrl, int? order, bool? isActive); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// /// /// /// /// /// /// /// /// Task of ApiResponse System.Threading.Tasks.Task> TopicTypeApiCreateTopicTypeAsyncWithHttpInfo (string title, string englishTitle, string pinyin, string description, string publishIconUrl, string webIconUrl, string businessOpportunityIconUrl, int? order, bool? isActive); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// Task of void System.Threading.Tasks.Task TopicTypeApiDisabledAsync (int? topicTypeId); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// Task of ApiResponse System.Threading.Tasks.Task> TopicTypeApiDisabledAsyncWithHttpInfo (int? topicTypeId); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// Task of void System.Threading.Tasks.Task TopicTypeApiEnabledAsync (int? topicTypeId); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// Task of ApiResponse System.Threading.Tasks.Task> TopicTypeApiEnabledAsyncWithHttpInfo (int? topicTypeId); /// /// /// /// /// /// /// Thrown when fails to make API call /// Task of List<TopicTypeViewModel> System.Threading.Tasks.Task> TopicTypeApiGetTopicTypesAsync (); /// /// /// /// /// /// /// Thrown when fails to make API call /// Task of ApiResponse (List<TopicTypeViewModel>) System.Threading.Tasks.Task>> TopicTypeApiGetTopicTypesAsyncWithHttpInfo (); #endregion Asynchronous Operations } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class TopicTypeApiApi : ITopicTypeApiApi { private IO.Swagger.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class /// using Configuration object /// /// An instance of Configuration /// public TopicTypeApiApi(Configuration configuration) { this.Configuration = configuration; ExceptionFactory = IO.Swagger.Client.Configuration.DefaultExceptionFactory; // ensure API client has configuration ready if (Configuration.ApiClient.Configuration == null) { this.Configuration.ApiClient.Configuration = this.Configuration; } } /// /// Gets or sets the configuration object /// /// An instance of the Configuration public Configuration Configuration {get; set;} /// /// Provides a factory method hook for the creation of exceptions. /// public IO.Swagger.Client.ExceptionFactory ExceptionFactory { get { if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) { throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); } return _exceptionFactory; } set { _exceptionFactory = value; } } /// /// /// /// Thrown when fails to make API call /// /// /// /// /// /// /// /// /// /// /// public void TopicTypeApiChangeTopicType (int? topicTypeId, string title, string englishTitle, string pinyin, string description, string publishIconUrl, string webIconUrl, string businessOpportunityIconUrl, int? order, bool? isActive) { TopicTypeApiChangeTopicTypeWithHttpInfo(topicTypeId, title, englishTitle, pinyin, description, publishIconUrl, webIconUrl, businessOpportunityIconUrl, order, isActive); } /// /// /// /// Thrown when fails to make API call /// /// /// /// /// /// /// /// /// /// /// ApiResponse of Object(void) public ApiResponse TopicTypeApiChangeTopicTypeWithHttpInfo (int? topicTypeId, string title, string englishTitle, string pinyin, string description, string publishIconUrl, string webIconUrl, string businessOpportunityIconUrl, int? order, bool? isActive) { // verify the required parameter 'topicTypeId' is set if (topicTypeId == null) throw new ApiException(400, "Missing required parameter 'topicTypeId' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); // verify the required parameter 'title' is set if (title == null) throw new ApiException(400, "Missing required parameter 'title' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); // verify the required parameter 'englishTitle' is set if (englishTitle == null) throw new ApiException(400, "Missing required parameter 'englishTitle' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); // verify the required parameter 'pinyin' is set if (pinyin == null) throw new ApiException(400, "Missing required parameter 'pinyin' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); // verify the required parameter 'description' is set if (description == null) throw new ApiException(400, "Missing required parameter 'description' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); // verify the required parameter 'publishIconUrl' is set if (publishIconUrl == null) throw new ApiException(400, "Missing required parameter 'publishIconUrl' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); // verify the required parameter 'webIconUrl' is set if (webIconUrl == null) throw new ApiException(400, "Missing required parameter 'webIconUrl' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); // verify the required parameter 'businessOpportunityIconUrl' is set if (businessOpportunityIconUrl == null) throw new ApiException(400, "Missing required parameter 'businessOpportunityIconUrl' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); // verify the required parameter 'order' is set if (order == null) throw new ApiException(400, "Missing required parameter 'order' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); // verify the required parameter 'isActive' is set if (isActive == null) throw new ApiException(400, "Missing required parameter 'isActive' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); string localVarPath = "/v1/topictypes/{topicTypeId}/_modify"; Dictionary localVarQueryParams = new Dictionary(); Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); Dictionary localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header string[] localVarHttpContentTypes = new string[] { }; string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header string[] localVarHttpHeaderAccepts = new string[] { }; string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (title != null) localVarQueryParams.Add("title", Configuration.ApiClient.ParameterToString(title)); // query parameter if (englishTitle != null) localVarQueryParams.Add("englishTitle", Configuration.ApiClient.ParameterToString(englishTitle)); // query parameter if (pinyin != null) localVarQueryParams.Add("pinyin", Configuration.ApiClient.ParameterToString(pinyin)); // query parameter if (description != null) localVarQueryParams.Add("description", Configuration.ApiClient.ParameterToString(description)); // query parameter if (publishIconUrl != null) localVarQueryParams.Add("publishIconUrl", Configuration.ApiClient.ParameterToString(publishIconUrl)); // query parameter if (webIconUrl != null) localVarQueryParams.Add("webIconUrl", Configuration.ApiClient.ParameterToString(webIconUrl)); // query parameter if (businessOpportunityIconUrl != null) localVarQueryParams.Add("businessOpportunityIconUrl", Configuration.ApiClient.ParameterToString(businessOpportunityIconUrl)); // query parameter if (order != null) localVarQueryParams.Add("order", Configuration.ApiClient.ParameterToString(order)); // query parameter if (isActive != null) localVarQueryParams.Add("isActive", Configuration.ApiClient.ParameterToString(isActive)); // query parameter // make the HTTP request HttpResponseMessage localVarResponse = Configuration.ApiClient.CallApi(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("TopicTypeApiChangeTopicType", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// /// /// Thrown when fails to make API call /// /// /// /// /// /// /// /// /// /// /// Task of void public async System.Threading.Tasks.Task TopicTypeApiChangeTopicTypeAsync (int? topicTypeId, string title, string englishTitle, string pinyin, string description, string publishIconUrl, string webIconUrl, string businessOpportunityIconUrl, int? order, bool? isActive) { await TopicTypeApiChangeTopicTypeAsyncWithHttpInfo(topicTypeId, title, englishTitle, pinyin, description, publishIconUrl, webIconUrl, businessOpportunityIconUrl, order, isActive); } /// /// /// /// Thrown when fails to make API call /// /// /// /// /// /// /// /// /// /// /// Task of ApiResponse public async System.Threading.Tasks.Task> TopicTypeApiChangeTopicTypeAsyncWithHttpInfo (int? topicTypeId, string title, string englishTitle, string pinyin, string description, string publishIconUrl, string webIconUrl, string businessOpportunityIconUrl, int? order, bool? isActive) { // verify the required parameter 'topicTypeId' is set if (topicTypeId == null) throw new ApiException(400, "Missing required parameter 'topicTypeId' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); // verify the required parameter 'title' is set if (title == null) throw new ApiException(400, "Missing required parameter 'title' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); // verify the required parameter 'englishTitle' is set if (englishTitle == null) throw new ApiException(400, "Missing required parameter 'englishTitle' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); // verify the required parameter 'pinyin' is set if (pinyin == null) throw new ApiException(400, "Missing required parameter 'pinyin' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); // verify the required parameter 'description' is set if (description == null) throw new ApiException(400, "Missing required parameter 'description' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); // verify the required parameter 'publishIconUrl' is set if (publishIconUrl == null) throw new ApiException(400, "Missing required parameter 'publishIconUrl' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); // verify the required parameter 'webIconUrl' is set if (webIconUrl == null) throw new ApiException(400, "Missing required parameter 'webIconUrl' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); // verify the required parameter 'businessOpportunityIconUrl' is set if (businessOpportunityIconUrl == null) throw new ApiException(400, "Missing required parameter 'businessOpportunityIconUrl' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); // verify the required parameter 'order' is set if (order == null) throw new ApiException(400, "Missing required parameter 'order' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); // verify the required parameter 'isActive' is set if (isActive == null) throw new ApiException(400, "Missing required parameter 'isActive' when calling TopicTypeApiApi->TopicTypeApiChangeTopicType"); string localVarPath = "/v1/topictypes/{topicTypeId}/_modify"; Dictionary localVarQueryParams = new Dictionary(); Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); Dictionary localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header string[] localVarHttpContentTypes = new string[] { }; string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header string[] localVarHttpHeaderAccepts = new string[] { }; string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (title != null) localVarQueryParams.Add("title", Configuration.ApiClient.ParameterToString(title)); // query parameter if (englishTitle != null) localVarQueryParams.Add("englishTitle", Configuration.ApiClient.ParameterToString(englishTitle)); // query parameter if (pinyin != null) localVarQueryParams.Add("pinyin", Configuration.ApiClient.ParameterToString(pinyin)); // query parameter if (description != null) localVarQueryParams.Add("description", Configuration.ApiClient.ParameterToString(description)); // query parameter if (publishIconUrl != null) localVarQueryParams.Add("publishIconUrl", Configuration.ApiClient.ParameterToString(publishIconUrl)); // query parameter if (webIconUrl != null) localVarQueryParams.Add("webIconUrl", Configuration.ApiClient.ParameterToString(webIconUrl)); // query parameter if (businessOpportunityIconUrl != null) localVarQueryParams.Add("businessOpportunityIconUrl", Configuration.ApiClient.ParameterToString(businessOpportunityIconUrl)); // query parameter if (order != null) localVarQueryParams.Add("order", Configuration.ApiClient.ParameterToString(order)); // query parameter if (isActive != null) localVarQueryParams.Add("isActive", Configuration.ApiClient.ParameterToString(isActive)); // query parameter // make the HTTP request HttpResponseMessage localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("TopicTypeApiChangeTopicType", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// /// /// Thrown when fails to make API call /// /// /// /// /// /// /// /// /// /// public void TopicTypeApiCreateTopicType (string title, string englishTitle, string pinyin, string description, string publishIconUrl, string webIconUrl, string businessOpportunityIconUrl, int? order, bool? isActive) { TopicTypeApiCreateTopicTypeWithHttpInfo(title, englishTitle, pinyin, description, publishIconUrl, webIconUrl, businessOpportunityIconUrl, order, isActive); } /// /// /// /// Thrown when fails to make API call /// /// /// /// /// /// /// /// /// /// ApiResponse of Object(void) public ApiResponse TopicTypeApiCreateTopicTypeWithHttpInfo (string title, string englishTitle, string pinyin, string description, string publishIconUrl, string webIconUrl, string businessOpportunityIconUrl, int? order, bool? isActive) { // verify the required parameter 'title' is set if (title == null) throw new ApiException(400, "Missing required parameter 'title' when calling TopicTypeApiApi->TopicTypeApiCreateTopicType"); // verify the required parameter 'englishTitle' is set if (englishTitle == null) throw new ApiException(400, "Missing required parameter 'englishTitle' when calling TopicTypeApiApi->TopicTypeApiCreateTopicType"); // verify the required parameter 'pinyin' is set if (pinyin == null) throw new ApiException(400, "Missing required parameter 'pinyin' when calling TopicTypeApiApi->TopicTypeApiCreateTopicType"); // verify the required parameter 'description' is set if (description == null) throw new ApiException(400, "Missing required parameter 'description' when calling TopicTypeApiApi->TopicTypeApiCreateTopicType"); // verify the required parameter 'publishIconUrl' is set if (publishIconUrl == null) throw new ApiException(400, "Missing required parameter 'publishIconUrl' when calling TopicTypeApiApi->TopicTypeApiCreateTopicType"); // verify the required parameter 'webIconUrl' is set if (webIconUrl == null) throw new ApiException(400, "Missing required parameter 'webIconUrl' when calling TopicTypeApiApi->TopicTypeApiCreateTopicType"); // verify the required parameter 'businessOpportunityIconUrl' is set if (businessOpportunityIconUrl == null) throw new ApiException(400, "Missing required parameter 'businessOpportunityIconUrl' when calling TopicTypeApiApi->TopicTypeApiCreateTopicType"); // verify the required parameter 'order' is set if (order == null) throw new ApiException(400, "Missing required parameter 'order' when calling TopicTypeApiApi->TopicTypeApiCreateTopicType"); // verify the required parameter 'isActive' is set if (isActive == null) throw new ApiException(400, "Missing required parameter 'isActive' when calling TopicTypeApiApi->TopicTypeApiCreateTopicType"); string localVarPath = "/v1/topictypes"; Dictionary localVarQueryParams = new Dictionary(); Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); Dictionary localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header string[] localVarHttpContentTypes = new string[] { }; string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header string[] localVarHttpHeaderAccepts = new string[] { }; string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (title != null) localVarQueryParams.Add("title", Configuration.ApiClient.ParameterToString(title)); // query parameter if (englishTitle != null) localVarQueryParams.Add("englishTitle", Configuration.ApiClient.ParameterToString(englishTitle)); // query parameter if (pinyin != null) localVarQueryParams.Add("pinyin", Configuration.ApiClient.ParameterToString(pinyin)); // query parameter if (description != null) localVarQueryParams.Add("description", Configuration.ApiClient.ParameterToString(description)); // query parameter if (publishIconUrl != null) localVarQueryParams.Add("publishIconUrl", Configuration.ApiClient.ParameterToString(publishIconUrl)); // query parameter if (webIconUrl != null) localVarQueryParams.Add("webIconUrl", Configuration.ApiClient.ParameterToString(webIconUrl)); // query parameter if (businessOpportunityIconUrl != null) localVarQueryParams.Add("businessOpportunityIconUrl", Configuration.ApiClient.ParameterToString(businessOpportunityIconUrl)); // query parameter if (order != null) localVarQueryParams.Add("order", Configuration.ApiClient.ParameterToString(order)); // query parameter if (isActive != null) localVarQueryParams.Add("isActive", Configuration.ApiClient.ParameterToString(isActive)); // query parameter // make the HTTP request HttpResponseMessage localVarResponse = Configuration.ApiClient.CallApi(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("TopicTypeApiCreateTopicType", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// /// /// Thrown when fails to make API call /// /// /// /// /// /// /// /// /// /// Task of void public async System.Threading.Tasks.Task TopicTypeApiCreateTopicTypeAsync (string title, string englishTitle, string pinyin, string description, string publishIconUrl, string webIconUrl, string businessOpportunityIconUrl, int? order, bool? isActive) { await TopicTypeApiCreateTopicTypeAsyncWithHttpInfo(title, englishTitle, pinyin, description, publishIconUrl, webIconUrl, businessOpportunityIconUrl, order, isActive); } /// /// /// /// Thrown when fails to make API call /// /// /// /// /// /// /// /// /// /// Task of ApiResponse public async System.Threading.Tasks.Task> TopicTypeApiCreateTopicTypeAsyncWithHttpInfo (string title, string englishTitle, string pinyin, string description, string publishIconUrl, string webIconUrl, string businessOpportunityIconUrl, int? order, bool? isActive) { // verify the required parameter 'title' is set if (title == null) throw new ApiException(400, "Missing required parameter 'title' when calling TopicTypeApiApi->TopicTypeApiCreateTopicType"); // verify the required parameter 'englishTitle' is set if (englishTitle == null) throw new ApiException(400, "Missing required parameter 'englishTitle' when calling TopicTypeApiApi->TopicTypeApiCreateTopicType"); // verify the required parameter 'pinyin' is set if (pinyin == null) throw new ApiException(400, "Missing required parameter 'pinyin' when calling TopicTypeApiApi->TopicTypeApiCreateTopicType"); // verify the required parameter 'description' is set if (description == null) throw new ApiException(400, "Missing required parameter 'description' when calling TopicTypeApiApi->TopicTypeApiCreateTopicType"); // verify the required parameter 'publishIconUrl' is set if (publishIconUrl == null) throw new ApiException(400, "Missing required parameter 'publishIconUrl' when calling TopicTypeApiApi->TopicTypeApiCreateTopicType"); // verify the required parameter 'webIconUrl' is set if (webIconUrl == null) throw new ApiException(400, "Missing required parameter 'webIconUrl' when calling TopicTypeApiApi->TopicTypeApiCreateTopicType"); // verify the required parameter 'businessOpportunityIconUrl' is set if (businessOpportunityIconUrl == null) throw new ApiException(400, "Missing required parameter 'businessOpportunityIconUrl' when calling TopicTypeApiApi->TopicTypeApiCreateTopicType"); // verify the required parameter 'order' is set if (order == null) throw new ApiException(400, "Missing required parameter 'order' when calling TopicTypeApiApi->TopicTypeApiCreateTopicType"); // verify the required parameter 'isActive' is set if (isActive == null) throw new ApiException(400, "Missing required parameter 'isActive' when calling TopicTypeApiApi->TopicTypeApiCreateTopicType"); string localVarPath = "/v1/topictypes"; Dictionary localVarQueryParams = new Dictionary(); Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); Dictionary localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header string[] localVarHttpContentTypes = new string[] { }; string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header string[] localVarHttpHeaderAccepts = new string[] { }; string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (title != null) localVarQueryParams.Add("title", Configuration.ApiClient.ParameterToString(title)); // query parameter if (englishTitle != null) localVarQueryParams.Add("englishTitle", Configuration.ApiClient.ParameterToString(englishTitle)); // query parameter if (pinyin != null) localVarQueryParams.Add("pinyin", Configuration.ApiClient.ParameterToString(pinyin)); // query parameter if (description != null) localVarQueryParams.Add("description", Configuration.ApiClient.ParameterToString(description)); // query parameter if (publishIconUrl != null) localVarQueryParams.Add("publishIconUrl", Configuration.ApiClient.ParameterToString(publishIconUrl)); // query parameter if (webIconUrl != null) localVarQueryParams.Add("webIconUrl", Configuration.ApiClient.ParameterToString(webIconUrl)); // query parameter if (businessOpportunityIconUrl != null) localVarQueryParams.Add("businessOpportunityIconUrl", Configuration.ApiClient.ParameterToString(businessOpportunityIconUrl)); // query parameter if (order != null) localVarQueryParams.Add("order", Configuration.ApiClient.ParameterToString(order)); // query parameter if (isActive != null) localVarQueryParams.Add("isActive", Configuration.ApiClient.ParameterToString(isActive)); // query parameter // make the HTTP request HttpResponseMessage localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("TopicTypeApiCreateTopicType", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// /// /// Thrown when fails to make API call /// /// public void TopicTypeApiDisabled (int? topicTypeId) { TopicTypeApiDisabledWithHttpInfo(topicTypeId); } /// /// /// /// Thrown when fails to make API call /// /// ApiResponse of Object(void) public ApiResponse TopicTypeApiDisabledWithHttpInfo (int? topicTypeId) { // verify the required parameter 'topicTypeId' is set if (topicTypeId == null) throw new ApiException(400, "Missing required parameter 'topicTypeId' when calling TopicTypeApiApi->TopicTypeApiDisabled"); string localVarPath = "/v1/topictypes/{topicTypeId}/_disabled"; Dictionary localVarQueryParams = new Dictionary(); Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); Dictionary localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header string[] localVarHttpContentTypes = new string[] { }; string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header string[] localVarHttpHeaderAccepts = new string[] { }; string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // make the HTTP request HttpResponseMessage localVarResponse = Configuration.ApiClient.CallApi(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("TopicTypeApiDisabled", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// /// /// Thrown when fails to make API call /// /// Task of void public async System.Threading.Tasks.Task TopicTypeApiDisabledAsync (int? topicTypeId) { await TopicTypeApiDisabledAsyncWithHttpInfo(topicTypeId); } /// /// /// /// Thrown when fails to make API call /// /// Task of ApiResponse public async System.Threading.Tasks.Task> TopicTypeApiDisabledAsyncWithHttpInfo (int? topicTypeId) { // verify the required parameter 'topicTypeId' is set if (topicTypeId == null) throw new ApiException(400, "Missing required parameter 'topicTypeId' when calling TopicTypeApiApi->TopicTypeApiDisabled"); string localVarPath = "/v1/topictypes/{topicTypeId}/_disabled"; Dictionary localVarQueryParams = new Dictionary(); Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); Dictionary localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header string[] localVarHttpContentTypes = new string[] { }; string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header string[] localVarHttpHeaderAccepts = new string[] { }; string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // make the HTTP request HttpResponseMessage localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("TopicTypeApiDisabled", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// /// /// Thrown when fails to make API call /// /// public void TopicTypeApiEnabled (int? topicTypeId) { TopicTypeApiEnabledWithHttpInfo(topicTypeId); } /// /// /// /// Thrown when fails to make API call /// /// ApiResponse of Object(void) public ApiResponse TopicTypeApiEnabledWithHttpInfo (int? topicTypeId) { // verify the required parameter 'topicTypeId' is set if (topicTypeId == null) throw new ApiException(400, "Missing required parameter 'topicTypeId' when calling TopicTypeApiApi->TopicTypeApiEnabled"); string localVarPath = "/v1/topictypes/{topicTypeId}/_enabled"; Dictionary localVarQueryParams = new Dictionary(); Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); Dictionary localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header string[] localVarHttpContentTypes = new string[] { }; string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header string[] localVarHttpHeaderAccepts = new string[] { }; string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // make the HTTP request HttpResponseMessage localVarResponse = Configuration.ApiClient.CallApi(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("TopicTypeApiEnabled", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// /// /// Thrown when fails to make API call /// /// Task of void public async System.Threading.Tasks.Task TopicTypeApiEnabledAsync (int? topicTypeId) { await TopicTypeApiEnabledAsyncWithHttpInfo(topicTypeId); } /// /// /// /// Thrown when fails to make API call /// /// Task of ApiResponse public async System.Threading.Tasks.Task> TopicTypeApiEnabledAsyncWithHttpInfo (int? topicTypeId) { // verify the required parameter 'topicTypeId' is set if (topicTypeId == null) throw new ApiException(400, "Missing required parameter 'topicTypeId' when calling TopicTypeApiApi->TopicTypeApiEnabled"); string localVarPath = "/v1/topictypes/{topicTypeId}/_enabled"; Dictionary localVarQueryParams = new Dictionary(); Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); Dictionary localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header string[] localVarHttpContentTypes = new string[] { }; string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header string[] localVarHttpHeaderAccepts = new string[] { }; string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // make the HTTP request HttpResponseMessage localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("TopicTypeApiEnabled", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } /// /// /// /// Thrown when fails to make API call /// List<TopicTypeViewModel> public List TopicTypeApiGetTopicTypes () { ApiResponse> localVarResponse = TopicTypeApiGetTopicTypesWithHttpInfo(); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// ApiResponse of List<TopicTypeViewModel> public ApiResponse< List > TopicTypeApiGetTopicTypesWithHttpInfo () { string localVarPath = "/v1/topictypes"; Dictionary localVarQueryParams = new Dictionary(); Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); Dictionary localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header string[] localVarHttpContentTypes = new string[] { }; string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header string[] localVarHttpHeaderAccepts = new string[] { "application/vnd.fht360.enumAsString+json", "application/vnd.fht360.preserveCircularReference+json", "application/json", "text/json", "application/xml", "text/xml" }; string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // make the HTTP request HttpResponseMessage localVarResponse = Configuration.ApiClient.CallApi(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("TopicTypeApiGetTopicTypes", localVarResponse); if (exception != null) throw exception; } return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (List) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(List))); } /// /// /// /// Thrown when fails to make API call /// Task of List<TopicTypeViewModel> public async System.Threading.Tasks.Task> TopicTypeApiGetTopicTypesAsync () { ApiResponse> localVarResponse = await TopicTypeApiGetTopicTypesAsyncWithHttpInfo(); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// Task of ApiResponse (List<TopicTypeViewModel>) public async System.Threading.Tasks.Task>> TopicTypeApiGetTopicTypesAsyncWithHttpInfo () { string localVarPath = "/v1/topictypes"; Dictionary localVarQueryParams = new Dictionary(); Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); Dictionary localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header string[] localVarHttpContentTypes = new string[] { }; string localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header string[] localVarHttpHeaderAccepts = new string[] { "application/vnd.fht360.enumAsString+json", "application/vnd.fht360.preserveCircularReference+json", "application/json", "text/json", "application/xml", "text/xml" }; string localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); // make the HTTP request HttpResponseMessage localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("TopicTypeApiGetTopicTypes", localVarResponse); if (exception != null) throw exception; } return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (List) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(List))); } } }