diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/ConnectedService.json b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/ConnectedService.json index aa5e76b..e2877ec 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/ConnectedService.json +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/ConnectedService.json @@ -14,7 +14,7 @@ "GenerateTypeScriptClient": false, "GenerateCSharpController": false, "OpenApiToCSharpClientCommand": { - "ClientBaseClass": null, + "ClientBaseClass": "EasyMicroservices.Cores.Clients.CoreSwaggerClientBase", "ConfigurationClass": null, "GenerateClientClasses": true, "GenerateClientInterfaces": false, @@ -27,7 +27,7 @@ "WrapDtoExceptions": true, "UseHttpClientCreationMethod": false, "HttpClientType": "System.Net.Http.HttpClient", - "UseHttpRequestMessageCreationMethod": false, + "UseHttpRequestMessageCreationMethod": true, "UseBaseUrl": true, "GenerateBaseUrlProperty": true, "GenerateSyncMethods": false, @@ -82,7 +82,7 @@ "HandleReferences": false, "GenerateImmutableArrayProperties": false, "GenerateImmutableDictionaryProperties": false, - "JsonSerializerSettingsTransformationMethod": "new EasyMicroservices.AuthenticationsMicroservice.Clients.MyJsonSerializerSettings", + "JsonSerializerSettingsTransformationMethod": "new EasyMicroservices.Cores.Clients.CoreSerializerSettings", "InlineNamedArrays": false, "InlineNamedDictionaries": false, "InlineNamedTuples": true, diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.cs index a62af31..44c89ed 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.cs +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.cs @@ -19,7 +19,7 @@ namespace Authentications.GeneratedServices using System = global::System; [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class RoleClient + public partial class RoleClient : EasyMicroservices.Cores.Clients.CoreSwaggerClientBase { private string _baseUrl = ""; private System.Net.Http.HttpClient _httpClient; @@ -34,7 +34,7 @@ public RoleClient(string baseUrl, System.Net.Http.HttpClient httpClient) private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() { - var settings = new EasyMicroservices.AuthenticationsMicroservice.Clients.MyJsonSerializerSettings(new Newtonsoft.Json.JsonSerializerSettings { }); + var settings = new EasyMicroservices.Cores.Clients.CoreSerializerSettings(new Newtonsoft.Json.JsonSerializerSettings { }); UpdateJsonSerializerSettings(settings); return settings; } @@ -72,7 +72,7 @@ public virtual async System.Threading.Tasks.Task AddAsync( var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -150,7 +150,7 @@ public virtual async System.Threading.Tasks.Task AddBulkAsync(A var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -228,7 +228,85 @@ public virtual async System.Threading.Tasks.Task Up var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task UpdateChangedValuesOnlyAsync(RoleContract body) + { + return UpdateChangedValuesOnlyAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task UpdateChangedValuesOnlyAsync(RoleContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/UpdateChangedValuesOnly"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -306,7 +384,85 @@ public virtual async System.Threading.Tasks.Task UpdateBulkAsyn var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task UpdateBulkChangedValuesOnlyAsync(RoleContractUpdateBulkRequestContract body) + { + return UpdateBulkChangedValuesOnlyAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task UpdateBulkChangedValuesOnlyAsync(RoleContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/UpdateBulkChangedValuesOnly"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -384,7 +540,7 @@ public virtual async System.Threading.Tasks.Task HardDeleteById var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -462,7 +618,7 @@ public virtual async System.Threading.Tasks.Task HardDeleteBulk var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -540,7 +696,7 @@ public virtual async System.Threading.Tasks.Task SoftDeleteById var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -618,7 +774,7 @@ public virtual async System.Threading.Tasks.Task SoftDeleteBulk var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -696,7 +852,7 @@ public virtual async System.Threading.Tasks.Task Ge var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -774,7 +930,7 @@ public virtual async System.Threading.Tasks.Task Ge var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -852,7 +1008,7 @@ public virtual async System.Threading.Tasks.Task AddAsync( var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -1298,7 +1454,7 @@ public virtual async System.Threading.Tasks.Task AddBulkAsync(A var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -1376,7 +1532,7 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task UpdateBulkAsync(RoleServicePermissionContractUpdateBulkRequestContract body) + public virtual System.Threading.Tasks.Task UpdateChangedValuesOnlyAsync(RoleServicePermissionContract body) { - return UpdateBulkAsync(body, System.Threading.CancellationToken.None); + return UpdateChangedValuesOnlyAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task UpdateBulkAsync(RoleServicePermissionContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateChangedValuesOnlyAsync(RoleServicePermissionContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/UpdateBulk"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/UpdateChangedValuesOnly"); var client_ = _httpClient; var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -1486,7 +1642,7 @@ public virtual async System.Threading.Tasks.Task UpdateBulkAsyn var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -1515,30 +1671,30 @@ public virtual async System.Threading.Tasks.Task UpdateBulkAsyn /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body) + public virtual System.Threading.Tasks.Task UpdateBulkAsync(RoleServicePermissionContractUpdateBulkRequestContract body) { - return HardDeleteByIdAsync(body, System.Threading.CancellationToken.None); + return UpdateBulkAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateBulkAsync(RoleServicePermissionContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/HardDeleteById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/UpdateBulk"); var client_ = _httpClient; var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Method = new System.Net.Http.HttpMethod("PUT"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -1593,30 +1749,30 @@ public virtual async System.Threading.Tasks.Task HardDeleteById /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body) + public virtual System.Threading.Tasks.Task UpdateBulkChangedValuesOnlyAsync(RoleServicePermissionContractUpdateBulkRequestContract body) { - return HardDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); + return UpdateBulkChangedValuesOnlyAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateBulkChangedValuesOnlyAsync(RoleServicePermissionContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/HardDeleteBulkByIds"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/UpdateBulkChangedValuesOnly"); var client_ = _httpClient; var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Method = new System.Net.Http.HttpMethod("PUT"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -1671,24 +1827,24 @@ public virtual async System.Threading.Tasks.Task HardDeleteBulk /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) + public virtual System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body) { - return SoftDeleteByIdAsync(body, System.Threading.CancellationToken.None); + return HardDeleteByIdAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/SoftDeleteById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/HardDeleteById"); var client_ = _httpClient; var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -1749,24 +1905,24 @@ public virtual async System.Threading.Tasks.Task SoftDeleteById /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body) + public virtual System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body) { - return SoftDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); + return HardDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/SoftDeleteBulkByIds"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/HardDeleteBulkByIds"); var client_ = _httpClient; var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -1827,30 +1983,30 @@ public virtual async System.Threading.Tasks.Task SoftDeleteBulk /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) + public virtual System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) { - return GetByIdAsync(body, System.Threading.CancellationToken.None); + return SoftDeleteByIdAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/GetById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/SoftDeleteById"); var client_ = _httpClient; var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Method = new System.Net.Http.HttpMethod("DELETE"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -1876,7 +2032,7 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -1905,30 +2061,30 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body) { - return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); + return SoftDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/GetByUniqueIdentity"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/SoftDeleteBulkByIds"); var client_ = _httpClient; var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Method = new System.Net.Http.HttpMethod("DELETE"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -1954,7 +2110,7 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -1983,24 +2139,24 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task FilterAsync(FilterRequestContract body) + public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) { - return FilterAsync(body, System.Threading.CancellationToken.None); + return GetByIdAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task FilterAsync(FilterRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/Filter"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/GetById"); var client_ = _httpClient; var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -2032,7 +2188,7 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -2061,26 +2217,30 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetAllAsync() + public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) { - return GetAllAsync(System.Threading.CancellationToken.None); + return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetAllAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/GetAll"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/GetByUniqueIdentity"); var client_ = _httpClient; var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -2106,7 +2266,7 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -2135,24 +2295,24 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task FilterAsync(FilterRequestContract body) { - return GetAllByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); + return FilterAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task FilterAsync(FilterRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/GetAllByUniqueIdentity"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/Filter"); var client_ = _httpClient; var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -2211,17 +2371,169 @@ public virtual async System.Threading.Tasks.Task + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetAllAsync() { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } + return GetAllAsync(System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetAllAsync(System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/GetAll"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + { + return GetAllByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/GetAllByUniqueIdentity"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + protected struct ObjectResponseResult + { + public ObjectResponseResult(T responseObject, string responseText) + { + this.Object = responseObject; + this.Text = responseText; + } + + public T Object { get; } + + public string Text { get; } } public bool ReadResponseAsString { get; set; } @@ -2315,7 +2627,7 @@ private string ConvertToString(object value, System.Globalization.CultureInfo cu } [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ServicePermissionClient + public partial class ServicePermissionClient : EasyMicroservices.Cores.Clients.CoreSwaggerClientBase { private string _baseUrl = ""; private System.Net.Http.HttpClient _httpClient; @@ -2330,7 +2642,7 @@ public ServicePermissionClient(string baseUrl, System.Net.Http.HttpClient httpCl private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() { - var settings = new EasyMicroservices.AuthenticationsMicroservice.Clients.MyJsonSerializerSettings(new Newtonsoft.Json.JsonSerializerSettings { }); + var settings = new EasyMicroservices.Cores.Clients.CoreSerializerSettings(new Newtonsoft.Json.JsonSerializerSettings { }); UpdateJsonSerializerSettings(settings); return settings; } @@ -2368,7 +2680,7 @@ public virtual async System.Threading.Tasks.Task AddAsync( var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -2524,7 +2836,7 @@ public virtual async System.Threading.Tasks.Task AddBulkAsync(A var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -2602,7 +2914,85 @@ public virtual async System.Threading.Tasks.Task h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task UpdateChangedValuesOnlyAsync(ServicePermissionContract body) + { + return UpdateChangedValuesOnlyAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task UpdateChangedValuesOnlyAsync(ServicePermissionContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/UpdateChangedValuesOnly"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -2680,7 +3070,85 @@ public virtual async System.Threading.Tasks.Task UpdateBulkAsyn var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task UpdateBulkChangedValuesOnlyAsync(ServicePermissionContractUpdateBulkRequestContract body) + { + return UpdateBulkChangedValuesOnlyAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task UpdateBulkChangedValuesOnlyAsync(ServicePermissionContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/UpdateBulkChangedValuesOnly"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -2758,7 +3226,7 @@ public virtual async System.Threading.Tasks.Task HardDeleteById var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -2836,7 +3304,7 @@ public virtual async System.Threading.Tasks.Task HardDeleteBulk var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -2914,7 +3382,7 @@ public virtual async System.Threading.Tasks.Task SoftDeleteById var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -2992,7 +3460,7 @@ public virtual async System.Threading.Tasks.Task SoftDeleteBulk var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -3070,7 +3538,7 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task AddAsync(AddUserRoleRequestContract body) + public virtual System.Threading.Tasks.Task AddAsync(AddUserRoleRequestContract body) + { + return AddAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task AddAsync(AddUserRoleRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/Add"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task AddBulkAsync(AddUserRoleRequestContractCreateBulkRequestContract body) + { + return AddBulkAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task AddBulkAsync(AddUserRoleRequestContractCreateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/AddBulk"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task UpdateAsync(UserRoleContract body) { - return AddAsync(body, System.Threading.CancellationToken.None); + return UpdateAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task AddAsync(AddUserRoleRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateAsync(UserRoleContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/Add"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/Update"); var client_ = _httpClient; var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Method = new System.Net.Http.HttpMethod("PUT"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -3626,7 +4250,7 @@ public virtual async System.Threading.Tasks.Task AddAsync( var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -3655,30 +4279,30 @@ public virtual async System.Threading.Tasks.Task AddAsync( /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task AddBulkAsync(AddUserRoleRequestContractCreateBulkRequestContract body) + public virtual System.Threading.Tasks.Task UpdateChangedValuesOnlyAsync(UserRoleContract body) { - return AddBulkAsync(body, System.Threading.CancellationToken.None); + return UpdateChangedValuesOnlyAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task AddBulkAsync(AddUserRoleRequestContractCreateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateChangedValuesOnlyAsync(UserRoleContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/AddBulk"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/UpdateChangedValuesOnly"); var client_ = _httpClient; var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Method = new System.Net.Http.HttpMethod("PUT"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -3704,7 +4328,7 @@ public virtual async System.Threading.Tasks.Task AddBulkAsync(A var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -3733,24 +4357,24 @@ public virtual async System.Threading.Tasks.Task AddBulkAsync(A /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task UpdateAsync(UserRoleContract body) + public virtual System.Threading.Tasks.Task UpdateBulkAsync(UserRoleContractUpdateBulkRequestContract body) { - return UpdateAsync(body, System.Threading.CancellationToken.None); + return UpdateBulkAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task UpdateAsync(UserRoleContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateBulkAsync(UserRoleContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/Update"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/UpdateBulk"); var client_ = _httpClient; var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -3782,7 +4406,7 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -3811,24 +4435,24 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task UpdateBulkAsync(UserRoleContractUpdateBulkRequestContract body) + public virtual System.Threading.Tasks.Task UpdateBulkChangedValuesOnlyAsync(UserRoleContractUpdateBulkRequestContract body) { - return UpdateBulkAsync(body, System.Threading.CancellationToken.None); + return UpdateBulkChangedValuesOnlyAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task UpdateBulkAsync(UserRoleContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateBulkChangedValuesOnlyAsync(UserRoleContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/UpdateBulk"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/UpdateBulkChangedValuesOnly"); var client_ = _httpClient; var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -3906,7 +4530,7 @@ public virtual async System.Threading.Tasks.Task HardDeleteById var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -3984,7 +4608,7 @@ public virtual async System.Threading.Tasks.Task HardDeleteBulk var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -4062,7 +4686,7 @@ public virtual async System.Threading.Tasks.Task SoftDeleteById var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -4140,7 +4764,7 @@ public virtual async System.Threading.Tasks.Task SoftDeleteBulk var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -4218,7 +4842,7 @@ public virtual async System.Threading.Tasks.Task Ge var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -4820,7 +5444,7 @@ public virtual async System.Threading.Tasks.Task Ve var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -4898,7 +5522,7 @@ public virtual async System.Threading.Tasks.Task AddAsync( var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -4976,7 +5600,7 @@ public virtual async System.Threading.Tasks.Task AddBulkAsync(A var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -5054,7 +5678,85 @@ public virtual async System.Threading.Tasks.Task Up var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task UpdateChangedValuesOnlyAsync(UserContract body) + { + return UpdateChangedValuesOnlyAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task UpdateChangedValuesOnlyAsync(UserContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/UpdateChangedValuesOnly"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -5132,7 +5834,85 @@ public virtual async System.Threading.Tasks.Task UpdateBulkAsyn var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task UpdateBulkChangedValuesOnlyAsync(UserContractUpdateBulkRequestContract body) + { + return UpdateBulkChangedValuesOnlyAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task UpdateBulkChangedValuesOnlyAsync(UserContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/UpdateBulkChangedValuesOnly"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -5210,7 +5990,7 @@ public virtual async System.Threading.Tasks.Task HardDeleteById var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -5288,7 +6068,7 @@ public virtual async System.Threading.Tasks.Task HardDeleteBulk var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -5366,7 +6146,7 @@ public virtual async System.Threading.Tasks.Task SoftDeleteById var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -5444,7 +6224,7 @@ public virtual async System.Threading.Tasks.Task SoftDeleteBulk var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -5522,7 +6302,7 @@ public virtual async System.Threading.Tasks.Task Ge var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -5600,7 +6380,7 @@ public virtual async System.Threading.Tasks.Task Ge var disposeClient_ = false; try { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); var content_ = new System.Net.Http.StringContent(json_); @@ -5678,7 +6458,7 @@ public virtual async System.Threading.Tasks.Task _result; + private long _totalCount; private bool _hasItems; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -7461,6 +8274,21 @@ public System.Collections.Generic.ICollection Result } } + [Newtonsoft.Json.JsonProperty("totalCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long TotalCount + { + get { return _totalCount; } + + set + { + if (_totalCount != value) + { + _totalCount = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("hasItems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool HasItems { @@ -7647,6 +8475,7 @@ public partial class RoleServicePermissionContractListMessageContract : System.C private ErrorContract _error; private SuccessContract _success; private System.Collections.Generic.ICollection _result; + private long _totalCount; private bool _hasItems; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -7709,6 +8538,21 @@ public System.Collections.Generic.ICollection Res } } + [Newtonsoft.Json.JsonProperty("totalCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long TotalCount + { + get { return _totalCount; } + + set + { + if (_totalCount != value) + { + _totalCount = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("hasItems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool HasItems { @@ -7845,21 +8689,21 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] public partial class ServiceDetailsContract : System.ComponentModel.INotifyPropertyChanged { - private string _servieRouteAddress; + private string _serviceRouteAddress; private string _methodName; private string _path; - private string _porjectName; + private string _projectName; - [Newtonsoft.Json.JsonProperty("servieRouteAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServieRouteAddress + [Newtonsoft.Json.JsonProperty("serviceRouteAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ServiceRouteAddress { - get { return _servieRouteAddress; } + get { return _serviceRouteAddress; } set { - if (_servieRouteAddress != value) + if (_serviceRouteAddress != value) { - _servieRouteAddress = value; + _serviceRouteAddress = value; RaisePropertyChanged(); } } @@ -7895,16 +8739,16 @@ public string Path } } - [Newtonsoft.Json.JsonProperty("porjectName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PorjectName + [Newtonsoft.Json.JsonProperty("projectName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ProjectName { - get { return _porjectName; } + get { return _projectName; } set { - if (_porjectName != value) + if (_projectName != value) { - _porjectName = value; + _projectName = value; RaisePropertyChanged(); } } @@ -8005,6 +8849,7 @@ public partial class ServicePermissionContractListMessageContract : System.Compo private ErrorContract _error; private SuccessContract _success; private System.Collections.Generic.ICollection _result; + private long _totalCount; private bool _hasItems; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -8067,6 +8912,21 @@ public System.Collections.Generic.ICollection Result } } + [Newtonsoft.Json.JsonProperty("totalCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long TotalCount + { + get { return _totalCount; } + + set + { + if (_totalCount != value) + { + _totalCount = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("hasItems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool HasItems { @@ -8441,6 +9301,7 @@ public partial class UserContractListMessageContract : System.ComponentModel.INo private ErrorContract _error; private SuccessContract _success; private System.Collections.Generic.ICollection _result; + private long _totalCount; private bool _hasItems; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -8503,6 +9364,21 @@ public System.Collections.Generic.ICollection Result } } + [Newtonsoft.Json.JsonProperty("totalCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long TotalCount + { + get { return _totalCount; } + + set + { + if (_totalCount != value) + { + _totalCount = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("hasItems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool HasItems { @@ -8689,6 +9565,7 @@ public partial class UserRoleContractListMessageContract : System.ComponentModel private ErrorContract _error; private SuccessContract _success; private System.Collections.Generic.ICollection _result; + private long _totalCount; private bool _hasItems; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -8751,6 +9628,21 @@ public System.Collections.Generic.ICollection Result } } + [Newtonsoft.Json.JsonProperty("totalCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long TotalCount + { + get { return _totalCount; } + + set + { + if (_totalCount != value) + { + _totalCount = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("hasItems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool HasItems { diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.nswag b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.nswag index 5843fbf..573a782 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.nswag +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.nswag @@ -10,7 +10,7 @@ }, "codeGenerators": { "openApiToCSharpClient": { - "clientBaseClass": null, + "clientBaseClass": "EasyMicroservices.Cores.Clients.CoreSwaggerClientBase", "configurationClass": null, "generateClientClasses": true, "generateClientInterfaces": false, @@ -23,7 +23,7 @@ "wrapDtoExceptions": true, "useHttpClientCreationMethod": false, "httpClientType": "System.Net.Http.HttpClient", - "useHttpRequestMessageCreationMethod": false, + "useHttpRequestMessageCreationMethod": true, "useBaseUrl": true, "generateBaseUrlProperty": true, "generateSyncMethods": false, @@ -78,7 +78,7 @@ "handleReferences": false, "generateImmutableArrayProperties": false, "generateImmutableDictionaryProperties": false, - "jsonSerializerSettingsTransformationMethod": "new EasyMicroservices.AuthenticationsMicroservice.Clients.MyJsonSerializerSettings", + "jsonSerializerSettingsTransformationMethod": "new EasyMicroservices.Cores.Clients.CoreSerializerSettings", "inlineNamedArrays": false, "inlineNamedDictionaries": false, "inlineNamedTuples": true, diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.nswag.json b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.nswag.json index 1e9bae0..ac03ca0 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.nswag.json +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.nswag.json @@ -152,6 +152,55 @@ } } }, + "/api/Role/UpdateChangedValuesOnly": { + "put": { + "tags": [ + "Role" + ], + "operationId": "UpdateChangedValuesOnly", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/RoleContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/RoleContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/RoleContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/RoleContractMessageContract" + } + } + } + } + } + } + }, "/api/Role/UpdateBulk": { "put": { "tags": [ @@ -201,6 +250,55 @@ } } }, + "/api/Role/UpdateBulkChangedValuesOnly": { + "put": { + "tags": [ + "Role" + ], + "operationId": "UpdateBulkChangedValuesOnly", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleContractUpdateBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/RoleContractUpdateBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/RoleContractUpdateBulkRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, "/api/Role/HardDeleteById": { "delete": { "tags": [ @@ -770,6 +868,55 @@ } } }, + "/api/RoleServicePermission/UpdateChangedValuesOnly": { + "put": { + "tags": [ + "RoleServicePermission" + ], + "operationId": "UpdateChangedValuesOnly2", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleServicePermissionContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/RoleServicePermissionContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/RoleServicePermissionContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/RoleServicePermissionContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleServicePermissionContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/RoleServicePermissionContractMessageContract" + } + } + } + } + } + } + }, "/api/RoleServicePermission/UpdateBulk": { "put": { "tags": [ @@ -819,6 +966,55 @@ } } }, + "/api/RoleServicePermission/UpdateBulkChangedValuesOnly": { + "put": { + "tags": [ + "RoleServicePermission" + ], + "operationId": "UpdateBulkChangedValuesOnly2", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleServicePermissionContractUpdateBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/RoleServicePermissionContractUpdateBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/RoleServicePermissionContractUpdateBulkRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, "/api/RoleServicePermission/HardDeleteById": { "delete": { "tags": [ @@ -1437,6 +1633,55 @@ } } }, + "/api/ServicePermission/UpdateChangedValuesOnly": { + "put": { + "tags": [ + "ServicePermission" + ], + "operationId": "UpdateChangedValuesOnly3", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServicePermissionContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ServicePermissionContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/ServicePermissionContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ServicePermissionContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServicePermissionContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ServicePermissionContractMessageContract" + } + } + } + } + } + } + }, "/api/ServicePermission/UpdateBulk": { "put": { "tags": [ @@ -1486,6 +1731,55 @@ } } }, + "/api/ServicePermission/UpdateBulkChangedValuesOnly": { + "put": { + "tags": [ + "ServicePermission" + ], + "operationId": "UpdateBulkChangedValuesOnly3", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServicePermissionContractUpdateBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ServicePermissionContractUpdateBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/ServicePermissionContractUpdateBulkRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, "/api/ServicePermission/HardDeleteById": { "delete": { "tags": [ @@ -2055,6 +2349,55 @@ } } }, + "/api/UserRole/UpdateChangedValuesOnly": { + "put": { + "tags": [ + "UserRole" + ], + "operationId": "UpdateChangedValuesOnly4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserRoleContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserRoleContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UserRoleContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/UserRoleContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserRoleContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserRoleContractMessageContract" + } + } + } + } + } + } + }, "/api/UserRole/UpdateBulk": { "put": { "tags": [ @@ -2104,6 +2447,55 @@ } } }, + "/api/UserRole/UpdateBulkChangedValuesOnly": { + "put": { + "tags": [ + "UserRole" + ], + "operationId": "UpdateBulkChangedValuesOnly4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserRoleContractUpdateBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserRoleContractUpdateBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UserRoleContractUpdateBulkRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, "/api/UserRole/HardDeleteById": { "delete": { "tags": [ @@ -2771,6 +3163,55 @@ } } }, + "/api/Users/UpdateChangedValuesOnly": { + "put": { + "tags": [ + "Users" + ], + "operationId": "UpdateChangedValuesOnly5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UserContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/UserContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserContractMessageContract" + } + } + } + } + } + } + }, "/api/Users/UpdateBulk": { "put": { "tags": [ @@ -2820,6 +3261,55 @@ } } }, + "/api/Users/UpdateBulkChangedValuesOnly": { + "put": { + "tags": [ + "Users" + ], + "operationId": "UpdateBulkChangedValuesOnly5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserContractUpdateBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserContractUpdateBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UserContractUpdateBulkRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, "/api/Users/HardDeleteById": { "delete": { "tags": [ @@ -3577,12 +4067,20 @@ "format": "int64", "nullable": true }, - "sortColumnName": { + "sortColumnNames": { "type": "string", "nullable": true }, "isDescending": { "type": "boolean" + }, + "text": { + "type": "string", + "nullable": true + }, + "language": { + "type": "string", + "nullable": true } } }, @@ -3804,6 +4302,10 @@ "$ref": "#/components/schemas/RoleContract" } }, + "totalCount": { + "type": "integer", + "format": "int64" + }, "hasItems": { "type": "boolean", "readOnly": true @@ -3880,6 +4382,10 @@ "$ref": "#/components/schemas/RoleServicePermissionContract" } }, + "totalCount": { + "type": "integer", + "format": "int64" + }, "hasItems": { "type": "boolean", "readOnly": true @@ -3924,7 +4430,7 @@ "type": "object", "additionalProperties": false, "properties": { - "servieRouteAddress": { + "serviceRouteAddress": { "type": "string", "nullable": true }, @@ -3936,7 +4442,7 @@ "type": "string", "nullable": true }, - "porjectName": { + "projectName": { "type": "string", "nullable": true } @@ -3985,6 +4491,10 @@ "$ref": "#/components/schemas/ServicePermissionContract" } }, + "totalCount": { + "type": "integer", + "format": "int64" + }, "hasItems": { "type": "boolean", "readOnly": true @@ -4115,6 +4625,10 @@ "$ref": "#/components/schemas/UserContract" } }, + "totalCount": { + "type": "integer", + "format": "int64" + }, "hasItems": { "type": "boolean", "readOnly": true @@ -4191,6 +4705,10 @@ "$ref": "#/components/schemas/UserRoleContract" } }, + "totalCount": { + "type": "integer", + "format": "int64" + }, "hasItems": { "type": "boolean", "readOnly": true diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/EasyMicroservices.AuthenticationsMicroservice.Clients.csproj b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/EasyMicroservices.AuthenticationsMicroservice.Clients.csproj index d71b1b8..22f6c38 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/EasyMicroservices.AuthenticationsMicroservice.Clients.csproj +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/EasyMicroservices.AuthenticationsMicroservice.Clients.csproj @@ -5,7 +5,7 @@ AnyCPU;x64;x86 EasyMicroservices true - 0.0.0.13 + 0.0.0.14 client generated code. EasyMicroservices@gmail.com microservice,auth,authentication,client @@ -16,6 +16,7 @@ + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/SafeContractResolver.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/SafeContractResolver.cs deleted file mode 100644 index ff55148..0000000 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/SafeContractResolver.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; -using System.Reflection; - -namespace EasyMicroservices.AuthenticationsMicroservice.Clients -{ - internal class SafeContractResolver : DefaultContractResolver - { - protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization) - { - var jsonProp = base.CreateProperty(member, memberSerialization); - jsonProp.Required = Required.Default; - return jsonProp; - } - } - - internal class MyJsonSerializerSettings : JsonSerializerSettings - { - public MyJsonSerializerSettings(JsonSerializerSettings settings) - { - this.ContractResolver = new SafeContractResolver(); - } - } -} diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/EasyMicroservices.AuthenticationsMicroservice.Database.csproj b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/EasyMicroservices.AuthenticationsMicroservice.Database.csproj index 68b18cc..0f33493 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/EasyMicroservices.AuthenticationsMicroservice.Database.csproj +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Database/EasyMicroservices.AuthenticationsMicroservice.Database.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/EasyMicroservices.AuthenticationsMicroservice.Domain.csproj b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/EasyMicroservices.AuthenticationsMicroservice.Domain.csproj index 07a235d..0c91af9 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/EasyMicroservices.AuthenticationsMicroservice.Domain.csproj +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/EasyMicroservices.AuthenticationsMicroservice.Domain.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Services/EasyMicroservices.AuthenticationsMicroservice.Services.csproj b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Services/EasyMicroservices.AuthenticationsMicroservice.Services.csproj index c47f8f0..6a0f8ae 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Services/EasyMicroservices.AuthenticationsMicroservice.Services.csproj +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Services/EasyMicroservices.AuthenticationsMicroservice.Services.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.StartUp/EasyMicroservices.AuthenticationsMicroservice.StartUp.csproj b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.StartUp/EasyMicroservices.AuthenticationsMicroservice.StartUp.csproj index 8b8e123..4fbe88f 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.StartUp/EasyMicroservices.AuthenticationsMicroservice.StartUp.csproj +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.StartUp/EasyMicroservices.AuthenticationsMicroservice.StartUp.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Controllers/RoleController.cs b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Controllers/RoleController.cs index 7b20ca4..74b245f 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Controllers/RoleController.cs +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Controllers/RoleController.cs @@ -12,4 +12,4 @@ public RoleController(IBaseUnitOfWork unitOfWork) : base(unitOfWork) { } } -} +} \ No newline at end of file diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/EasyMicroservices.AuthenticationsMicroservice.WebApi.csproj b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/EasyMicroservices.AuthenticationsMicroservice.WebApi.csproj index 6db93b4..f1e1c49 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/EasyMicroservices.AuthenticationsMicroservice.WebApi.csproj +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/EasyMicroservices.AuthenticationsMicroservice.WebApi.csproj @@ -6,9 +6,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/appsettings.json b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/appsettings.json index c86d716..c8fff97 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/appsettings.json +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/appsettings.json @@ -20,7 +20,6 @@ "Audience": "easymicroservices", "TokenExpireTimeInSeconds": 86400 - } - - //"Urls": "http://*:1044" + }, + "Urls": "http://*:1044" }