/// <summary> /// /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="idrule"></param> /// <param name="id"></param> /// <param name="body"> (optional)</param> /// <returns>Task of string</returns> public async System.Threading.Tasks.Task <string> PutSentenceV1UpdateIdruleIdAsync(string idrule, string id, Model15 body = null) { ApiResponse <string> localVarResponse = await PutSentenceV1UpdateIdruleIdAsyncWithHttpInfo(idrule, id, body); return(localVarResponse.Data); }
/// <summary> /// /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="idrule"></param> /// <param name="id"></param> /// <param name="body"> (optional)</param> /// <returns>Task of ApiResponse (string)</returns> public async System.Threading.Tasks.Task <ApiResponse <string> > PutSentenceV1UpdateIdruleIdAsyncWithHttpInfo(string idrule, string id, Model15 body = null) { // verify the required parameter 'idrule' is set if (idrule == null) { throw new ApiException(400, "Missing required parameter 'idrule' when calling SentenceApi->PutSentenceV1UpdateIdruleId"); } // verify the required parameter 'id' is set if (id == null) { throw new ApiException(400, "Missing required parameter 'id' when calling SentenceApi->PutSentenceV1UpdateIdruleId"); } var localVarPath = "/sentence/v1/update/{idrule}/{id}"; var localVarPathParams = new Dictionary <String, String>(); var localVarQueryParams = new List <KeyValuePair <String, String> >(); var localVarHeaderParams = new Dictionary <String, String>(this.Configuration.DefaultHeader); var localVarFormParams = new Dictionary <String, String>(); var localVarFileParams = new Dictionary <String, FileParameter>(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } if (idrule != null) { localVarPathParams.Add("idrule", this.Configuration.ApiClient.ParameterToString(idrule)); // path parameter } if (id != null) { localVarPathParams.Add("id", this.Configuration.ApiClient.ParameterToString(id)); // path parameter } if (body != null && body.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter } else { localVarPostBody = body; // byte array } // make the HTTP request IRestResponse localVarResponse = (IRestResponse)await this.Configuration.ApiClient.CallApiAsync(localVarPath, Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("PutSentenceV1UpdateIdruleId", localVarResponse); if (exception != null) { throw exception; } } return(new ApiResponse <string>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (string)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)))); }
/// <summary> /// /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="idrule"></param> /// <param name="id"></param> /// <param name="body"> (optional)</param> /// <returns>string</returns> public string PutSentenceV1UpdateIdruleId(string idrule, string id, Model15 body = null) { ApiResponse <string> localVarResponse = PutSentenceV1UpdateIdruleIdWithHttpInfo(idrule, id, body); return(localVarResponse.Data); }