diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Client.sln b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Client.sln index 91fabc0..b2ebb63 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Client.sln +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Client.sln @@ -9,7 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test-Layer", "Test-Layer", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.AuthenticationsMicroservice.Clients", "EasyMicroservices.AuthenticationsMicroservice.Clients\EasyMicroservices.AuthenticationsMicroservice.Clients.csproj", "{EBDC4665-F64A-4F50-B939-3ACCAFB72A3D}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.AuthenticationsMicroservice.Clients.Tests", "EasyMicroservices.AuthenticationsMicroservice.Tests\EasyMicroservices.AuthenticationsMicroservice.Clients.Tests.csproj", "{3969FAB0-9A48-4516-97DD-C1882DDF1E96}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.AuthenticationsMicroservice.Clients.Tests", "EasyMicroservices.AuthenticationsMicroservice.Clients.Tests\EasyMicroservices.AuthenticationsMicroservice.Clients.Tests.csproj", "{447548E2-A5EF-4C33-A486-E2F9D05999EC}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -33,25 +33,25 @@ Global {EBDC4665-F64A-4F50-B939-3ACCAFB72A3D}.Release|x64.Build.0 = Release|x64 {EBDC4665-F64A-4F50-B939-3ACCAFB72A3D}.Release|x86.ActiveCfg = Release|x86 {EBDC4665-F64A-4F50-B939-3ACCAFB72A3D}.Release|x86.Build.0 = Release|x86 - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Debug|x64.ActiveCfg = Debug|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Debug|x64.Build.0 = Debug|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Debug|x86.ActiveCfg = Debug|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Debug|x86.Build.0 = Debug|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Release|Any CPU.Build.0 = Release|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Release|x64.ActiveCfg = Release|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Release|x64.Build.0 = Release|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Release|x86.ActiveCfg = Release|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Release|x86.Build.0 = Release|Any CPU + {447548E2-A5EF-4C33-A486-E2F9D05999EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {447548E2-A5EF-4C33-A486-E2F9D05999EC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {447548E2-A5EF-4C33-A486-E2F9D05999EC}.Debug|x64.ActiveCfg = Debug|Any CPU + {447548E2-A5EF-4C33-A486-E2F9D05999EC}.Debug|x64.Build.0 = Debug|Any CPU + {447548E2-A5EF-4C33-A486-E2F9D05999EC}.Debug|x86.ActiveCfg = Debug|Any CPU + {447548E2-A5EF-4C33-A486-E2F9D05999EC}.Debug|x86.Build.0 = Debug|Any CPU + {447548E2-A5EF-4C33-A486-E2F9D05999EC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {447548E2-A5EF-4C33-A486-E2F9D05999EC}.Release|Any CPU.Build.0 = Release|Any CPU + {447548E2-A5EF-4C33-A486-E2F9D05999EC}.Release|x64.ActiveCfg = Release|Any CPU + {447548E2-A5EF-4C33-A486-E2F9D05999EC}.Release|x64.Build.0 = Release|Any CPU + {447548E2-A5EF-4C33-A486-E2F9D05999EC}.Release|x86.ActiveCfg = Release|Any CPU + {447548E2-A5EF-4C33-A486-E2F9D05999EC}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {EBDC4665-F64A-4F50-B939-3ACCAFB72A3D} = {D2CA37CF-478B-4F54-B119-69AE1B8C525B} - {3969FAB0-9A48-4516-97DD-C1882DDF1E96} = {E9B271A6-185D-4C47-A7BA-61832F628E25} + {447548E2-A5EF-4C33-A486-E2F9D05999EC} = {E9B271A6-185D-4C47-A7BA-61832F628E25} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B8B82934-7EE0-4C86-9065-ADF9092553E1} diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Tests/EasyMicroservices.AuthenticationsMicroservice.Clients.Tests.csproj b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients.Tests/EasyMicroservices.AuthenticationsMicroservice.Clients.Tests.csproj similarity index 100% rename from src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Tests/EasyMicroservices.AuthenticationsMicroservice.Clients.Tests.csproj rename to src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients.Tests/EasyMicroservices.AuthenticationsMicroservice.Clients.Tests.csproj 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 777f80d..191582f 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.cs +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.cs @@ -19,13 +19,13 @@ 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 UsersClient + public partial class RoleClient { private string _baseUrl = ""; private System.Net.Http.HttpClient _httpClient; private System.Lazy _settings; - public UsersClient(string baseUrl, System.Net.Http.HttpClient httpClient) + public RoleClient(string baseUrl, System.Net.Http.HttpClient httpClient) { BaseUrl = baseUrl; _httpClient = httpClient; @@ -55,18 +55,18 @@ public string BaseUrl /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task VerifyUserNameAsync(VerifyEmailAddressContract body) + public virtual System.Threading.Tasks.Task AddAsync(AddRoleRequestContract body) { - return VerifyUserNameAsync(body, System.Threading.CancellationToken.None); + 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 VerifyUserNameAsync(VerifyEmailAddressContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task AddAsync(AddRoleRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/VerifyUserName"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/Add"); var client_ = _httpClient; var disposeClient_ = false; @@ -104,7 +104,7 @@ public virtual async System.Threading.Tasks.Task VerifyU 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); @@ -133,18 +133,18 @@ public virtual async System.Threading.Tasks.Task VerifyU /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task RegisterAsync(AddUserRequestContract body) + public virtual System.Threading.Tasks.Task AddBulkAsync(AddRoleRequestContractCreateBulkRequestContract body) { - return RegisterAsync(body, System.Threading.CancellationToken.None); + 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 RegisterAsync(AddUserRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task AddBulkAsync(AddRoleRequestContractCreateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/Register"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/AddBulk"); var client_ = _httpClient; var disposeClient_ = false; @@ -182,7 +182,7 @@ public virtual async System.Threading.Tasks.Task RegisterA 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); @@ -211,18 +211,18 @@ public virtual async System.Threading.Tasks.Task RegisterA /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task LoginAsync(UserSummaryContract body) + public virtual System.Threading.Tasks.Task UpdateAsync(RoleContract body) { - return LoginAsync(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 LoginAsync(UserSummaryContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateAsync(RoleContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/Login"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/Update"); var client_ = _httpClient; var disposeClient_ = false; @@ -234,7 +234,7 @@ public virtual async System.Threading.Tasks.Task LoginAsyn 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_); @@ -260,7 +260,7 @@ public virtual async System.Threading.Tasks.Task LoginAsyn 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); @@ -289,18 +289,18 @@ public virtual async System.Threading.Tasks.Task LoginAsyn /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GenerateTokenAsync(UserClaimContract body) + public virtual System.Threading.Tasks.Task UpdateBulkAsync(RoleContractUpdateBulkRequestContract body) { - return GenerateTokenAsync(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 GenerateTokenAsync(UserClaimContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateBulkAsync(RoleContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/GenerateToken"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/UpdateBulk"); var client_ = _httpClient; var disposeClient_ = false; @@ -312,7 +312,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); @@ -367,18 +367,18 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task RegenerateTokenAsync(RegenerateTokenContract body) + public virtual System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body) { - return RegenerateTokenAsync(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 RegenerateTokenAsync(RegenerateTokenContract 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/Users/RegenerateToken"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/HardDeleteById"); var client_ = _httpClient; var disposeClient_ = false; @@ -390,7 +390,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); @@ -445,18 +445,18 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task TestAsync() + public virtual System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body) { - return TestAsync(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 TestAsync(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/Users/Test"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/HardDeleteBulkByIds"); var client_ = _httpClient; var disposeClient_ = false; @@ -464,7 +464,11 @@ public virtual async System.Threading.Tasks.Task TestAsync(System.Thread { using (var request_ = new System.Net.Http.HttpRequestMessage()) { - 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("DELETE"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -490,7 +494,7 @@ public virtual async System.Threading.Tasks.Task TestAsync(System.Thread 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); @@ -519,18 +523,18 @@ public virtual async System.Threading.Tasks.Task TestAsync(System.Thread /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task AddAsync(AddUserRequestContract body) + public virtual System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) { - return AddAsync(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 AddAsync(AddUserRequestContract 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/Users/Add"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/SoftDeleteById"); var client_ = _httpClient; var disposeClient_ = false; @@ -542,7 +546,7 @@ public virtual async System.Threading.Tasks.Task AddAsync( 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_); @@ -568,7 +572,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); @@ -597,18 +601,18 @@ public virtual async System.Threading.Tasks.Task AddAsync( /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task AddBulkAsync(AddUserRequestContractCreateBulkRequestContract body) + public virtual System.Threading.Tasks.Task SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body) { - return AddBulkAsync(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 AddBulkAsync(AddUserRequestContractCreateBulkRequestContract 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/Users/AddBulk"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/SoftDeleteBulkByIds"); var client_ = _httpClient; var disposeClient_ = false; @@ -620,7 +624,7 @@ public virtual async System.Threading.Tasks.Task AddBulkAsync(A 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_); @@ -675,18 +679,18 @@ public virtual async System.Threading.Tasks.Task AddBulkAsync(A /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task UpdateAsync(UserContract body) + public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) { - return UpdateAsync(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 UpdateAsync(UserContract 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/Users/Update"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/GetById"); var client_ = _httpClient; var disposeClient_ = false; @@ -698,7 +702,7 @@ public virtual async System.Threading.Tasks.Task Up 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_.Method = new System.Net.Http.HttpMethod("POST"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -724,7 +728,7 @@ public virtual async System.Threading.Tasks.Task Up 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); @@ -753,18 +757,18 @@ public virtual async System.Threading.Tasks.Task Up /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task UpdateBulkAsync(UserContractUpdateBulkRequestContract body) + public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) { - return UpdateBulkAsync(body, 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 UpdateBulkAsync(UserContractUpdateBulkRequestContract body, 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/Users/UpdateBulk"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/GetByUniqueIdentity"); var client_ = _httpClient; var disposeClient_ = false; @@ -776,7 +780,7 @@ public virtual async System.Threading.Tasks.Task UpdateBulkAsyn 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_.Method = new System.Net.Http.HttpMethod("POST"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -802,7 +806,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); @@ -831,18 +835,18 @@ 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 FilterAsync(FilterRequestContract body) { - return HardDeleteByIdAsync(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 HardDeleteByIdAsync(Int64DeleteRequestContract 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/Users/HardDeleteById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/Filter"); var client_ = _httpClient; var disposeClient_ = false; @@ -854,7 +858,7 @@ public virtual async System.Threading.Tasks.Task HardDeleteById 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("POST"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -880,7 +884,7 @@ public virtual async System.Threading.Tasks.Task HardDeleteById 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); @@ -909,18 +913,18 @@ 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 GetAllAsync() { - return HardDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); + 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 HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + 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/Users/HardDeleteBulkByIds"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/GetAll"); var client_ = _httpClient; var disposeClient_ = false; @@ -928,11 +932,7 @@ public virtual async System.Threading.Tasks.Task HardDeleteBulk { using (var request_ = new System.Net.Http.HttpRequestMessage()) { - 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("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -958,7 +958,7 @@ public virtual async System.Threading.Tasks.Task HardDeleteBulk 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); @@ -987,18 +987,18 @@ 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 GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) { - return SoftDeleteByIdAsync(body, System.Threading.CancellationToken.None); + 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 SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + 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/Users/SoftDeleteById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/GetAllByUniqueIdentity"); var client_ = _httpClient; var disposeClient_ = false; @@ -1010,7 +1010,7 @@ public virtual async System.Threading.Tasks.Task SoftDeleteById 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("POST"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -1036,7 +1036,7 @@ public virtual async System.Threading.Tasks.Task SoftDeleteById 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); @@ -1063,98 +1063,158 @@ public virtual async System.Threading.Tasks.Task SoftDeleteById } } - /// Success - /// A server side error occurred. - public virtual System.Threading.Tasks.Task SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body) + protected struct ObjectResponseResult { - return SoftDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); + public ObjectResponseResult(T responseObject, string responseText) + { + this.Object = responseObject; + this.Text = responseText; + } + + public T Object { get; } + + public string Text { get; } } - /// 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 bool ReadResponseAsString { get; set; } + + protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/SoftDeleteBulkByIds"); + if (response == null || response.Content == null) + { + return new ObjectResponseResult(default(T), string.Empty); + } - var client_ = _httpClient; - var disposeClient_ = false; - try + if (ReadResponseAsString) { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + try { - 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_.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 typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); + return new ObjectResponseResult(typedBody, responseText); + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); + } + } + else + { + try + { + using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) + using (var streamReader = new System.IO.StreamReader(responseStream)) + using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) { - 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; - } + var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); + var typedBody = serializer.Deserialize(jsonTextReader); + return new ObjectResponseResult(typedBody, string.Empty); + } + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); + } + } + } - ProcessResponse(client_, response_); + private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) + { + if (value == null) + { + return ""; + } - 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 + if (value is System.Enum) + { + var name = System.Enum.GetName(value.GetType(), value); + if (name != null) + { + var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); + if (field != null) + { + var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) + as System.Runtime.Serialization.EnumMemberAttribute; + if (attribute != null) { - 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); + return attribute.Value != null ? attribute.Value : name; } } - finally - { - if (disposeResponse_) - response_.Dispose(); - } + + var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); + return converted == null ? string.Empty : converted; } } - finally + else if (value is bool) { - if (disposeClient_) - client_.Dispose(); + return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); } - } - - /// Success + else if (value is byte[]) + { + return System.Convert.ToBase64String((byte[]) value); + } + else if (value.GetType().IsArray) + { + var array = System.Linq.Enumerable.OfType((System.Array) value); + return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); + } + + var result = System.Convert.ToString(value, cultureInfo); + return result == null ? "" : result; + } + } + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class RoleServicePermissionClient + { + private string _baseUrl = ""; + private System.Net.Http.HttpClient _httpClient; + private System.Lazy _settings; + + public RoleServicePermissionClient(string baseUrl, System.Net.Http.HttpClient httpClient) + { + BaseUrl = baseUrl; + _httpClient = httpClient; + _settings = new System.Lazy(CreateSerializerSettings); + } + + private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() + { + var settings = new EasyMicroservices.AuthenticationsMicroservice.Clients.MyJsonSerializerSettings(new Newtonsoft.Json.JsonSerializerSettings { }); + UpdateJsonSerializerSettings(settings); + return settings; + } + + public string BaseUrl + { + get { return _baseUrl; } + set { _baseUrl = value; } + } + + public Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } + + partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); + + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); + partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); + + /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) + public virtual System.Threading.Tasks.Task AddAsync(AddRoleServicePermissionRequestContract body) { - return GetByIdAsync(body, System.Threading.CancellationToken.None); + 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 GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task AddAsync(AddRoleServicePermissionRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/GetById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/Add"); var client_ = _httpClient; var disposeClient_ = false; @@ -1192,7 +1252,7 @@ public virtual async System.Threading.Tasks.Task Ge 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); @@ -1221,18 +1281,18 @@ public virtual async System.Threading.Tasks.Task Ge /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task AddBulkAsync(AddRoleServicePermissionRequestContractCreateBulkRequestContract body) { - return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); + 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 GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task AddBulkAsync(AddRoleServicePermissionRequestContractCreateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/GetByUniqueIdentity"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/AddBulk"); var client_ = _httpClient; var disposeClient_ = false; @@ -1270,7 +1330,7 @@ public virtual async System.Threading.Tasks.Task Ge 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); @@ -1299,18 +1359,18 @@ public virtual async System.Threading.Tasks.Task Ge /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task FilterAsync(FilterRequestContract body) + public virtual System.Threading.Tasks.Task UpdateAsync(RoleServicePermissionContract body) { - return FilterAsync(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 FilterAsync(FilterRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateAsync(RoleServicePermissionContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/Filter"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/Update"); var client_ = _httpClient; var disposeClient_ = false; @@ -1322,7 +1382,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); @@ -1377,18 +1437,18 @@ 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 UpdateBulkAsync(RoleServicePermissionContractUpdateBulkRequestContract body) { - return GetAllAsync(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 GetAllAsync(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/Users/GetAll"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/UpdateBulk"); var client_ = _httpClient; var disposeClient_ = false; @@ -1396,7 +1456,11 @@ 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); @@ -1451,18 +1515,18 @@ 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 HardDeleteByIdAsync(Int64DeleteRequestContract body) { - return GetAllByUniqueIdentityAsync(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 GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract 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/Users/GetAllByUniqueIdentity"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/HardDeleteById"); var client_ = _httpClient; var disposeClient_ = false; @@ -1474,7 +1538,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); @@ -1527,140 +1591,5546 @@ public virtual async System.Threading.Tasks.Task + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body) { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } + return HardDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); } - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) + /// 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) { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/HardDeleteBulkByIds"); - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else + var client_ = _httpClient; + var disposeClient_ = false; + try { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) + using (var request_ = new System.Net.Http.HttpRequestMessage()) { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } + 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_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } + PrepareRequest(client_, request_, urlBuilder_); - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) + 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 attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) { - return attribute.Value != null ? attribute.Value : name; + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; } - } - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; + 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(); + } } } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[]) value); - } - else if (value.GetType().IsArray) + finally { - var array = System.Linq.Enumerable.OfType((System.Array) value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); + if (disposeClient_) + client_.Dispose(); } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; } - } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class AddUserRequestContract : System.ComponentModel.INotifyPropertyChanged - { - private string _userName; - private string _password; + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) + { + return SoftDeleteByIdAsync(body, System.Threading.CancellationToken.None); + } - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName + /// 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) { - get { return _userName; } + var urlBuilder_ = new System.Text.StringBuilder(); + 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()) + { + 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_.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 SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body) + { + 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 SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + 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()) + { + 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_.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 GetByIdAsync(Int64GetIdRequestContract body) + { + 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 GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + 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()) + { + 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 GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + { + 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 GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + 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()) + { + 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 FilterAsync(FilterRequestContract body) + { + 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 FilterAsync(FilterRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + 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()) + { + 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 GetAllAsync() + { + 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_ = new System.Net.Http.HttpRequestMessage()) + { + 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_ = new System.Net.Http.HttpRequestMessage()) + { + 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; } + + protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) + { + if (response == null || response.Content == null) + { + return new ObjectResponseResult(default(T), string.Empty); + } + + if (ReadResponseAsString) + { + var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); + return new ObjectResponseResult(typedBody, responseText); + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); + } + } + else + { + try + { + using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) + using (var streamReader = new System.IO.StreamReader(responseStream)) + using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) + { + var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); + var typedBody = serializer.Deserialize(jsonTextReader); + return new ObjectResponseResult(typedBody, string.Empty); + } + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); + } + } + } + + private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) + { + if (value == null) + { + return ""; + } + + if (value is System.Enum) + { + var name = System.Enum.GetName(value.GetType(), value); + if (name != null) + { + var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); + if (field != null) + { + var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) + as System.Runtime.Serialization.EnumMemberAttribute; + if (attribute != null) + { + return attribute.Value != null ? attribute.Value : name; + } + } + + var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); + return converted == null ? string.Empty : converted; + } + } + else if (value is bool) + { + return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); + } + else if (value is byte[]) + { + return System.Convert.ToBase64String((byte[]) value); + } + else if (value.GetType().IsArray) + { + var array = System.Linq.Enumerable.OfType((System.Array) value); + return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); + } + + var result = System.Convert.ToString(value, cultureInfo); + return result == null ? "" : result; + } + } + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ServicePermissionClient + { + private string _baseUrl = ""; + private System.Net.Http.HttpClient _httpClient; + private System.Lazy _settings; + + public ServicePermissionClient(string baseUrl, System.Net.Http.HttpClient httpClient) + { + BaseUrl = baseUrl; + _httpClient = httpClient; + _settings = new System.Lazy(CreateSerializerSettings); + } + + private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() + { + var settings = new EasyMicroservices.AuthenticationsMicroservice.Clients.MyJsonSerializerSettings(new Newtonsoft.Json.JsonSerializerSettings { }); + UpdateJsonSerializerSettings(settings); + return settings; + } + + public string BaseUrl + { + get { return _baseUrl; } + set { _baseUrl = value; } + } + + public Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } + + partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); + + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); + partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task AddAsync(AddServicePermissionRequestContract 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(AddServicePermissionRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/Add"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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(AddServicePermissionRequestContractCreateBulkRequestContract 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(AddServicePermissionRequestContractCreateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/AddBulk"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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(ServicePermissionContract body) + { + 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 UpdateAsync(ServicePermissionContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/Update"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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 UpdateBulkAsync(ServicePermissionContractUpdateBulkRequestContract body) + { + 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 UpdateBulkAsync(ServicePermissionContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/UpdateBulk"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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 HardDeleteByIdAsync(Int64DeleteRequestContract body) + { + 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 HardDeleteByIdAsync(Int64DeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/HardDeleteById"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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_.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 HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body) + { + 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 HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/HardDeleteBulkByIds"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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_.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 SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) + { + 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 SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/SoftDeleteById"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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_.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 SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body) + { + 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 SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/SoftDeleteBulkByIds"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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_.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 GetByIdAsync(Int64GetIdRequestContract body) + { + 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 GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/GetById"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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 GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + { + 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 GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/GetByUniqueIdentity"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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 FilterAsync(FilterRequestContract body) + { + 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 FilterAsync(FilterRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/Filter"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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 GetAllAsync() + { + 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/ServicePermission/GetAll"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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/ServicePermission/GetAllByUniqueIdentity"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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; } + + protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) + { + if (response == null || response.Content == null) + { + return new ObjectResponseResult(default(T), string.Empty); + } + + if (ReadResponseAsString) + { + var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); + return new ObjectResponseResult(typedBody, responseText); + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); + } + } + else + { + try + { + using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) + using (var streamReader = new System.IO.StreamReader(responseStream)) + using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) + { + var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); + var typedBody = serializer.Deserialize(jsonTextReader); + return new ObjectResponseResult(typedBody, string.Empty); + } + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); + } + } + } + + private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) + { + if (value == null) + { + return ""; + } + + if (value is System.Enum) + { + var name = System.Enum.GetName(value.GetType(), value); + if (name != null) + { + var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); + if (field != null) + { + var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) + as System.Runtime.Serialization.EnumMemberAttribute; + if (attribute != null) + { + return attribute.Value != null ? attribute.Value : name; + } + } + + var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); + return converted == null ? string.Empty : converted; + } + } + else if (value is bool) + { + return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); + } + else if (value is byte[]) + { + return System.Convert.ToBase64String((byte[]) value); + } + else if (value.GetType().IsArray) + { + var array = System.Linq.Enumerable.OfType((System.Array) value); + return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); + } + + var result = System.Convert.ToString(value, cultureInfo); + return result == null ? "" : result; + } + } + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class UserRoleClient + { + private string _baseUrl = ""; + private System.Net.Http.HttpClient _httpClient; + private System.Lazy _settings; + + public UserRoleClient(string baseUrl, System.Net.Http.HttpClient httpClient) + { + BaseUrl = baseUrl; + _httpClient = httpClient; + _settings = new System.Lazy(CreateSerializerSettings); + } + + private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() + { + var settings = new EasyMicroservices.AuthenticationsMicroservice.Clients.MyJsonSerializerSettings(new Newtonsoft.Json.JsonSerializerSettings { }); + UpdateJsonSerializerSettings(settings); + return settings; + } + + public string BaseUrl + { + get { return _baseUrl; } + set { _baseUrl = value; } + } + + public Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } + + partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); + + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); + partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); + + /// Success + /// A server side error occurred. + 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_ = new System.Net.Http.HttpRequestMessage()) + { + 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_ = new System.Net.Http.HttpRequestMessage()) + { + 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 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 UpdateAsync(UserRoleContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + 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()) + { + 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 UpdateBulkAsync(UserRoleContractUpdateBulkRequestContract body) + { + 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 UpdateBulkAsync(UserRoleContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + 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()) + { + 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 HardDeleteByIdAsync(Int64DeleteRequestContract body) + { + 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 HardDeleteByIdAsync(Int64DeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/HardDeleteById"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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_.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 HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body) + { + 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 HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/HardDeleteBulkByIds"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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_.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 SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) + { + 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 SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/SoftDeleteById"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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_.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 SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body) + { + 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 SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/SoftDeleteBulkByIds"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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_.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 GetByIdAsync(Int64GetIdRequestContract body) + { + 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 GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/GetById"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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 GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + { + 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 GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/GetByUniqueIdentity"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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 FilterAsync(FilterRequestContract body) + { + 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 FilterAsync(FilterRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/Filter"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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 GetAllAsync() + { + 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/UserRole/GetAll"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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/UserRole/GetAllByUniqueIdentity"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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; } + + protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) + { + if (response == null || response.Content == null) + { + return new ObjectResponseResult(default(T), string.Empty); + } + + if (ReadResponseAsString) + { + var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); + return new ObjectResponseResult(typedBody, responseText); + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); + } + } + else + { + try + { + using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) + using (var streamReader = new System.IO.StreamReader(responseStream)) + using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) + { + var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); + var typedBody = serializer.Deserialize(jsonTextReader); + return new ObjectResponseResult(typedBody, string.Empty); + } + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); + } + } + } + + private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) + { + if (value == null) + { + return ""; + } + + if (value is System.Enum) + { + var name = System.Enum.GetName(value.GetType(), value); + if (name != null) + { + var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); + if (field != null) + { + var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) + as System.Runtime.Serialization.EnumMemberAttribute; + if (attribute != null) + { + return attribute.Value != null ? attribute.Value : name; + } + } + + var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); + return converted == null ? string.Empty : converted; + } + } + else if (value is bool) + { + return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); + } + else if (value is byte[]) + { + return System.Convert.ToBase64String((byte[]) value); + } + else if (value.GetType().IsArray) + { + var array = System.Linq.Enumerable.OfType((System.Array) value); + return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); + } + + var result = System.Convert.ToString(value, cultureInfo); + return result == null ? "" : result; + } + } + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class UsersClient + { + private string _baseUrl = ""; + private System.Net.Http.HttpClient _httpClient; + private System.Lazy _settings; + + public UsersClient(string baseUrl, System.Net.Http.HttpClient httpClient) + { + BaseUrl = baseUrl; + _httpClient = httpClient; + _settings = new System.Lazy(CreateSerializerSettings); + } + + private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() + { + var settings = new EasyMicroservices.AuthenticationsMicroservice.Clients.MyJsonSerializerSettings(new Newtonsoft.Json.JsonSerializerSettings { }); + UpdateJsonSerializerSettings(settings); + return settings; + } + + public string BaseUrl + { + get { return _baseUrl; } + set { _baseUrl = value; } + } + + public Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } + + partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); + + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); + partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task VerifyUserNameAsync(VerifyEmailAddressContract body) + { + return VerifyUserNameAsync(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 VerifyUserNameAsync(VerifyEmailAddressContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/VerifyUserName"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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 RegisterAsync(AddUserRequestContract body) + { + return RegisterAsync(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 RegisterAsync(AddUserRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/Register"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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 LoginAsync(UserSummaryContract body) + { + return LoginAsync(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 LoginAsync(UserSummaryContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/Login"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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 GenerateTokenAsync(UserClaimContract body) + { + return GenerateTokenAsync(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 GenerateTokenAsync(UserClaimContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/GenerateToken"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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 RegenerateTokenAsync(RegenerateTokenContract body) + { + return RegenerateTokenAsync(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 RegenerateTokenAsync(RegenerateTokenContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/RegenerateToken"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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 TestAsync() + { + return TestAsync(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 TestAsync(System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/Test"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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 AddAsync(AddUserRequestContract 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(AddUserRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/Add"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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(AddUserRequestContractCreateBulkRequestContract 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(AddUserRequestContractCreateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/AddBulk"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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(UserContract body) + { + 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 UpdateAsync(UserContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/Update"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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 UpdateBulkAsync(UserContractUpdateBulkRequestContract body) + { + 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 UpdateBulkAsync(UserContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/UpdateBulk"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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 HardDeleteByIdAsync(Int64DeleteRequestContract body) + { + 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 HardDeleteByIdAsync(Int64DeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/HardDeleteById"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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_.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 HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body) + { + 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 HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/HardDeleteBulkByIds"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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_.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 SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) + { + 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 SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/SoftDeleteById"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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_.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 SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body) + { + 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 SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/SoftDeleteBulkByIds"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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_.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 GetByIdAsync(Int64GetIdRequestContract body) + { + 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 GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/GetById"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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 GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + { + 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 GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/GetByUniqueIdentity"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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 FilterAsync(FilterRequestContract body) + { + 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 FilterAsync(FilterRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/Filter"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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 GetAllAsync() + { + 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/Users/GetAll"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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/Users/GetAllByUniqueIdentity"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + 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; } + + protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) + { + if (response == null || response.Content == null) + { + return new ObjectResponseResult(default(T), string.Empty); + } + + if (ReadResponseAsString) + { + var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); + return new ObjectResponseResult(typedBody, responseText); + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); + } + } + else + { + try + { + using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) + using (var streamReader = new System.IO.StreamReader(responseStream)) + using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) + { + var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); + var typedBody = serializer.Deserialize(jsonTextReader); + return new ObjectResponseResult(typedBody, string.Empty); + } + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); + } + } + } + + private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) + { + if (value == null) + { + return ""; + } + + if (value is System.Enum) + { + var name = System.Enum.GetName(value.GetType(), value); + if (name != null) + { + var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); + if (field != null) + { + var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) + as System.Runtime.Serialization.EnumMemberAttribute; + if (attribute != null) + { + return attribute.Value != null ? attribute.Value : name; + } + } + + var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); + return converted == null ? string.Empty : converted; + } + } + else if (value is bool) + { + return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); + } + else if (value is byte[]) + { + return System.Convert.ToBase64String((byte[]) value); + } + else if (value.GetType().IsArray) + { + var array = System.Linq.Enumerable.OfType((System.Array) value); + return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); + } + + var result = System.Convert.ToString(value, cultureInfo); + return result == null ? "" : result; + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class AddRoleRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private string _name; + private long? _parentId; + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name + { + get { return _name; } + + set + { + if (_name != value) + { + _name = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("parentId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? ParentId + { + get { return _parentId; } + + set + { + if (_parentId != value) + { + _parentId = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class AddRoleRequestContractCreateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _items; + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items + { + get { return _items; } + + set + { + if (_items != value) + { + _items = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class AddRoleServicePermissionRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private long _roleId; + private long _servicePermissionId; + + [Newtonsoft.Json.JsonProperty("roleId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long RoleId + { + get { return _roleId; } + + set + { + if (_roleId != value) + { + _roleId = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("servicePermissionId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long ServicePermissionId + { + get { return _servicePermissionId; } + + set + { + if (_servicePermissionId != value) + { + _servicePermissionId = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class AddRoleServicePermissionRequestContractCreateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _items; + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items + { + get { return _items; } + + set + { + if (_items != value) + { + _items = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class AddServicePermissionRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private string _microserviceName; + private string _serviceName; + private string _methodName; + + [Newtonsoft.Json.JsonProperty("microserviceName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string MicroserviceName + { + get { return _microserviceName; } + + set + { + if (_microserviceName != value) + { + _microserviceName = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("serviceName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ServiceName + { + get { return _serviceName; } + + set + { + if (_serviceName != value) + { + _serviceName = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("methodName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string MethodName + { + get { return _methodName; } + + set + { + if (_methodName != value) + { + _methodName = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class AddServicePermissionRequestContractCreateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _items; + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items + { + get { return _items; } + + set + { + if (_items != value) + { + _items = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class AddUserRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private string _userName; + private string _password; + + [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UserName + { + get { return _userName; } + + set + { + if (_userName != value) + { + _userName = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Password + { + get { return _password; } + + set + { + if (_password != value) + { + _password = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class AddUserRequestContractCreateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _items; + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items + { + get { return _items; } + + set + { + if (_items != value) + { + _items = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class AddUserRoleRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private long _roleId; + private long _userId; + + [Newtonsoft.Json.JsonProperty("roleId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long RoleId + { + get { return _roleId; } + + set + { + if (_roleId != value) + { + _roleId = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long UserId + { + get { return _userId; } + + set + { + if (_userId != value) + { + _userId = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class AddUserRoleRequestContractCreateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _items; + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items + { + get { return _items; } + + set + { + if (_items != value) + { + _items = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class BooleanMessageContract : System.ComponentModel.INotifyPropertyChanged + { + private bool _isSuccess; + private ErrorContract _error; + private SuccessContract _success; + private bool _result; + + [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsSuccess + { + get { return _isSuccess; } + + set + { + if (_isSuccess != value) + { + _isSuccess = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ErrorContract Error + { + get { return _error; } + + set + { + if (_error != value) + { + _error = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success + { + get { return _success; } + + set + { + if (_success != value) + { + _success = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Result + { + get { return _result; } + + set + { + if (_result != value) + { + _result = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ClaimContract : System.ComponentModel.INotifyPropertyChanged + { + private string _name; + private string _value; + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name + { + get { return _name; } + + set + { + if (_name != value) + { + _name = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Value + { + get { return _value; } + + set + { + if (_value != value) + { + _value = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ErrorContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _validations; + private FailedReasonType _failedReasonType; + private string _message; + private string _endUserMessage; + private string _details; + private System.Collections.Generic.ICollection _stackTrace; + private System.Collections.Generic.ICollection _children; + private ServiceDetailsContract _serviceDetails; + + [Newtonsoft.Json.JsonProperty("validations", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Validations + { + get { return _validations; } + + set + { + if (_validations != value) + { + _validations = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("failedReasonType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public FailedReasonType FailedReasonType + { + get { return _failedReasonType; } + + set + { + if (_failedReasonType != value) + { + _failedReasonType = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message + { + get { return _message; } + + set + { + if (_message != value) + { + _message = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("endUserMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string EndUserMessage + { + get { return _endUserMessage; } + + set + { + if (_endUserMessage != value) + { + _endUserMessage = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Details + { + get { return _details; } + + set + { + if (_details != value) + { + _details = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("stackTrace", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection StackTrace + { + get { return _stackTrace; } + + set + { + if (_stackTrace != value) + { + _stackTrace = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("children", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Children + { + get { return _children; } + + set + { + if (_children != value) + { + _children = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("serviceDetails", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ServiceDetailsContract ServiceDetails + { + get { return _serviceDetails; } + + set + { + if (_serviceDetails != value) + { + _serviceDetails = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public enum FailedReasonType + { + + None = 0, + + Default = 1, + + All = 2, + + Other = 3, + + Unknown = 4, + + Nothing = 5, + + SessionAccessDenied = 6, + + AccessDenied = 7, + + InternalError = 8, + + Duplicate = 9, + + Empty = 10, + + NotFound = 11, + + ValidationsError = 12, + + StreamError = 13, + + WebServiceNotWorking = 14, + + Incorrect = 15, + + OperationFailed = 16, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class FilterRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private bool? _isDeleted; + private System.DateTimeOffset? _fromDeletedDateTime; + private System.DateTimeOffset? _toDeletedDateTime; + private System.DateTimeOffset? _fromCreationDateTime; + private System.DateTimeOffset? _toCreationDateTime; + private System.DateTimeOffset? _fromModificationDateTime; + private System.DateTimeOffset? _toModificationDateTime; + private string _uniqueIdentity; + private GetUniqueIdentityType _uniqueIdentityType; + private long? _index; + private long? _length; + private string _sortColumnName; + private bool _isDescending; + + [Newtonsoft.Json.JsonProperty("isDeleted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? IsDeleted + { + get { return _isDeleted; } + + set + { + if (_isDeleted != value) + { + _isDeleted = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("fromDeletedDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? FromDeletedDateTime + { + get { return _fromDeletedDateTime; } + + set + { + if (_fromDeletedDateTime != value) + { + _fromDeletedDateTime = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("toDeletedDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ToDeletedDateTime + { + get { return _toDeletedDateTime; } + + set + { + if (_toDeletedDateTime != value) + { + _toDeletedDateTime = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("fromCreationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? FromCreationDateTime + { + get { return _fromCreationDateTime; } + + set + { + if (_fromCreationDateTime != value) + { + _fromCreationDateTime = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("toCreationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ToCreationDateTime + { + get { return _toCreationDateTime; } + + set + { + if (_toCreationDateTime != value) + { + _toCreationDateTime = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("fromModificationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? FromModificationDateTime + { + get { return _fromModificationDateTime; } set { - if (_userName != value) + if (_fromModificationDateTime != value) { - _userName = value; + _fromModificationDateTime = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Password + [Newtonsoft.Json.JsonProperty("toModificationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ToModificationDateTime { - get { return _password; } + get { return _toModificationDateTime; } set { - if (_password != value) + if (_toModificationDateTime != value) { - _password = value; + _toModificationDateTime = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity + { + get { return _uniqueIdentity; } + + set + { + if (_uniqueIdentity != value) + { + _uniqueIdentity = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("uniqueIdentityType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public GetUniqueIdentityType UniqueIdentityType + { + get { return _uniqueIdentityType; } + + set + { + if (_uniqueIdentityType != value) + { + _uniqueIdentityType = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("index", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Index + { + get { return _index; } + + set + { + if (_index != value) + { + _index = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("length", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Length + { + get { return _length; } + + set + { + if (_length != value) + { + _length = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("sortColumnName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string SortColumnName + { + get { return _sortColumnName; } + + set + { + if (_sortColumnName != value) + { + _sortColumnName = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("isDescending", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsDescending + { + get { return _isDescending; } + + set + { + if (_isDescending != value) + { + _isDescending = value; RaisePropertyChanged(); } } @@ -1677,20 +7147,36 @@ 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 AddUserRequestContractCreateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + public partial class GetUniqueIdentityRequestContract : System.ComponentModel.INotifyPropertyChanged { - private System.Collections.Generic.ICollection _items; + private string _uniqueIdentity; + private GetUniqueIdentityType _type; - [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Items + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity { - get { return _items; } + get { return _uniqueIdentity; } set { - if (_items != value) + if (_uniqueIdentity != value) { - _items = value; + _uniqueIdentity = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public GetUniqueIdentityType Type + { + get { return _type; } + + set + { + if (_type != value) + { + _type = value; RaisePropertyChanged(); } } @@ -1707,12 +7193,124 @@ 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 BooleanMessageContract : System.ComponentModel.INotifyPropertyChanged + public enum GetUniqueIdentityType + { + + None = 0, + + Default = 1, + + All = 2, + + Other = 3, + + Unknown = 4, + + Nothing = 5, + + OnlyParent = 6, + + OnlyChilren = 7, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class Int64DeleteBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _ids; + + [Newtonsoft.Json.JsonProperty("ids", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Ids + { + get { return _ids; } + + set + { + if (_ids != value) + { + _ids = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class Int64DeleteRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private long _id; + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id + { + get { return _id; } + + set + { + if (_id != value) + { + _id = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class Int64GetIdRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private long _id; + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id + { + get { return _id; } + + set + { + if (_id != value) + { + _id = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class Int64MessageContract : System.ComponentModel.INotifyPropertyChanged { private bool _isSuccess; private ErrorContract _error; private SuccessContract _success; - private bool _result; + private long _result; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsSuccess @@ -1760,7 +7358,7 @@ public SuccessContract Success } [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool Result + public long Result { get { return _result; } @@ -1785,36 +7383,36 @@ 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 ClaimContract : System.ComponentModel.INotifyPropertyChanged + public partial class Int64SoftDeleteBulkRequestContract : System.ComponentModel.INotifyPropertyChanged { - private string _name; - private string _value; + private System.Collections.Generic.ICollection _ids; + private bool _isDelete; - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name + [Newtonsoft.Json.JsonProperty("ids", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Ids { - get { return _name; } + get { return _ids; } set { - if (_name != value) + if (_ids != value) { - _name = value; + _ids = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value + [Newtonsoft.Json.JsonProperty("isDelete", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsDelete { - get { return _value; } + get { return _isDelete; } set { - if (_value != value) + if (_isDelete != value) { - _value = value; + _isDelete = value; RaisePropertyChanged(); } } @@ -1831,132 +7429,144 @@ 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 ErrorContract : System.ComponentModel.INotifyPropertyChanged + public partial class Int64SoftDeleteRequestContract : System.ComponentModel.INotifyPropertyChanged { - private System.Collections.Generic.ICollection _validations; - private FailedReasonType _failedReasonType; - private string _message; - private string _endUserMessage; - private string _details; - private System.Collections.Generic.ICollection _stackTrace; - private System.Collections.Generic.ICollection _children; - private ServiceDetailsContract _serviceDetails; + private long _id; + private bool _isDelete; - [Newtonsoft.Json.JsonProperty("validations", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Validations + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { - get { return _validations; } + get { return _id; } set { - if (_validations != value) + if (_id != value) { - _validations = value; + _id = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("failedReasonType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public FailedReasonType FailedReasonType + [Newtonsoft.Json.JsonProperty("isDelete", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsDelete { - get { return _failedReasonType; } + get { return _isDelete; } set { - if (_failedReasonType != value) + if (_isDelete != value) { - _failedReasonType = value; + _isDelete = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Message - { - get { return _message; } + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - set - { - if (_message != value) - { - _message = value; - RaisePropertyChanged(); - } - } + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); } + } - [Newtonsoft.Json.JsonProperty("endUserMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EndUserMessage + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class MessageContract : System.ComponentModel.INotifyPropertyChanged + { + private bool _isSuccess; + private ErrorContract _error; + private SuccessContract _success; + + [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsSuccess { - get { return _endUserMessage; } + get { return _isSuccess; } set { - if (_endUserMessage != value) + if (_isSuccess != value) { - _endUserMessage = value; + _isSuccess = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Details + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ErrorContract Error { - get { return _details; } + get { return _error; } set { - if (_details != value) + if (_error != value) { - _details = value; + _error = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("stackTrace", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection StackTrace + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success { - get { return _stackTrace; } + get { return _success; } set { - if (_stackTrace != value) + if (_success != value) { - _stackTrace = value; + _success = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("children", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Children + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) { - get { return _children; } + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class RegenerateTokenContract : System.ComponentModel.INotifyPropertyChanged + { + private long _userId; + private System.Collections.Generic.ICollection _claims; + + [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long UserId + { + get { return _userId; } set { - if (_children != value) + if (_userId != value) { - _children = value; + _userId = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("serviceDetails", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ServiceDetailsContract ServiceDetails + [Newtonsoft.Json.JsonProperty("claims", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Claims { - get { return _serviceDetails; } + get { return _claims; } set { - if (_serviceDetails != value) + if (_claims != value) { - _serviceDetails = value; + _claims = value; RaisePropertyChanged(); } } @@ -1973,252 +7583,304 @@ 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 enum FailedReasonType + public partial class RoleContract : System.ComponentModel.INotifyPropertyChanged { + private System.DateTimeOffset _creationDateTime; + private System.DateTimeOffset? _modificationDateTime; + private bool _isDeleted; + private System.DateTimeOffset? _deletedDateTime; + private string _uniqueIdentity; + private long _id; + private string _name; + private long? _parentId; - None = 0, - - Default = 1, - - All = 2, - - Other = 3, - - Unknown = 4, - - Nothing = 5, - - SessionAccessDenied = 6, - - AccessDenied = 7, - - InternalError = 8, - - Duplicate = 9, - - Empty = 10, - - NotFound = 11, + [Newtonsoft.Json.JsonProperty("creationDateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset CreationDateTime + { + get { return _creationDateTime; } - ValidationsError = 12, + set + { + if (_creationDateTime != value) + { + _creationDateTime = value; + RaisePropertyChanged(); + } + } + } - StreamError = 13, + [Newtonsoft.Json.JsonProperty("modificationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ModificationDateTime + { + get { return _modificationDateTime; } - WebServiceNotWorking = 14, + set + { + if (_modificationDateTime != value) + { + _modificationDateTime = value; + RaisePropertyChanged(); + } + } + } - Incorrect = 15, + [Newtonsoft.Json.JsonProperty("isDeleted", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsDeleted + { + get { return _isDeleted; } - OperationFailed = 16, + set + { + if (_isDeleted != value) + { + _isDeleted = value; + RaisePropertyChanged(); + } + } + } - } + [Newtonsoft.Json.JsonProperty("deletedDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? DeletedDateTime + { + get { return _deletedDateTime; } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class FilterRequestContract : System.ComponentModel.INotifyPropertyChanged - { - private bool? _isDeleted; - private System.DateTimeOffset? _fromDeletedDateTime; - private System.DateTimeOffset? _toDeletedDateTime; - private System.DateTimeOffset? _fromCreationDateTime; - private System.DateTimeOffset? _toCreationDateTime; - private System.DateTimeOffset? _fromModificationDateTime; - private System.DateTimeOffset? _toModificationDateTime; - private string _uniqueIdentity; - private GetUniqueIdentityType _uniqueIdentityType; - private long? _index; - private long? _length; - private string _sortColumnName; - private bool _isDescending; + set + { + if (_deletedDateTime != value) + { + _deletedDateTime = value; + RaisePropertyChanged(); + } + } + } - [Newtonsoft.Json.JsonProperty("isDeleted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsDeleted + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity { - get { return _isDeleted; } + get { return _uniqueIdentity; } set { - if (_isDeleted != value) + if (_uniqueIdentity != value) { - _isDeleted = value; + _uniqueIdentity = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("fromDeletedDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? FromDeletedDateTime + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { - get { return _fromDeletedDateTime; } + get { return _id; } set { - if (_fromDeletedDateTime != value) + if (_id != value) { - _fromDeletedDateTime = value; + _id = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("toDeletedDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ToDeletedDateTime + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { - get { return _toDeletedDateTime; } + get { return _name; } set { - if (_toDeletedDateTime != value) + if (_name != value) { - _toDeletedDateTime = value; + _name = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("fromCreationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? FromCreationDateTime + [Newtonsoft.Json.JsonProperty("parentId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? ParentId { - get { return _fromCreationDateTime; } + get { return _parentId; } set { - if (_fromCreationDateTime != value) + if (_parentId != value) { - _fromCreationDateTime = value; + _parentId = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("toCreationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ToCreationDateTime + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) { - get { return _toCreationDateTime; } + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class RoleContractListMessageContract : System.ComponentModel.INotifyPropertyChanged + { + private bool _isSuccess; + private ErrorContract _error; + private SuccessContract _success; + private System.Collections.Generic.ICollection _result; + private bool _hasItems; + + [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsSuccess + { + get { return _isSuccess; } set { - if (_toCreationDateTime != value) + if (_isSuccess != value) { - _toCreationDateTime = value; + _isSuccess = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("fromModificationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? FromModificationDateTime + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ErrorContract Error { - get { return _fromModificationDateTime; } + get { return _error; } set { - if (_fromModificationDateTime != value) + if (_error != value) { - _fromModificationDateTime = value; + _error = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("toModificationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ToModificationDateTime + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success { - get { return _toModificationDateTime; } + get { return _success; } set { - if (_toModificationDateTime != value) + if (_success != value) { - _toModificationDateTime = value; + _success = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UniqueIdentity + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Result { - get { return _uniqueIdentity; } + get { return _result; } set { - if (_uniqueIdentity != value) + if (_result != value) { - _uniqueIdentity = value; + _result = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("uniqueIdentityType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetUniqueIdentityType UniqueIdentityType + [Newtonsoft.Json.JsonProperty("hasItems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool HasItems { - get { return _uniqueIdentityType; } + get { return _hasItems; } set { - if (_uniqueIdentityType != value) + if (_hasItems != value) { - _uniqueIdentityType = value; + _hasItems = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("index", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long? Index + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) { - get { return _index; } + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class RoleContractMessageContract : System.ComponentModel.INotifyPropertyChanged + { + private bool _isSuccess; + private ErrorContract _error; + private SuccessContract _success; + private RoleContract _result; + + [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsSuccess + { + get { return _isSuccess; } set { - if (_index != value) + if (_isSuccess != value) { - _index = value; + _isSuccess = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("length", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long? Length + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ErrorContract Error { - get { return _length; } + get { return _error; } set { - if (_length != value) + if (_error != value) { - _length = value; + _error = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("sortColumnName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SortColumnName + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success { - get { return _sortColumnName; } + get { return _success; } set { - if (_sortColumnName != value) + if (_success != value) { - _sortColumnName = value; + _success = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("isDescending", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsDescending + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public RoleContract Result { - get { return _isDescending; } + get { return _result; } set { - if (_isDescending != value) + if (_result != value) { - _isDescending = value; + _result = value; RaisePropertyChanged(); } } @@ -2235,36 +7897,66 @@ 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 GetUniqueIdentityRequestContract : System.ComponentModel.INotifyPropertyChanged + public partial class RoleContractUpdateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged { - private string _uniqueIdentity; - private GetUniqueIdentityType _type; + private System.Collections.Generic.ICollection _items; - [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UniqueIdentity + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items { - get { return _uniqueIdentity; } + get { return _items; } set { - if (_uniqueIdentity != value) + if (_items != value) { - _uniqueIdentity = value; + _items = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GetUniqueIdentityType Type + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) { - get { return _type; } + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class RoleServicePermissionContract : System.ComponentModel.INotifyPropertyChanged + { + private long _roleId; + private long _servicePermissionId; + + [Newtonsoft.Json.JsonProperty("roleId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long RoleId + { + get { return _roleId; } set { - if (_type != value) + if (_roleId != value) { - _type = value; + _roleId = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("servicePermissionId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long ServicePermissionId + { + get { return _servicePermissionId; } + + set + { + if (_servicePermissionId != value) + { + _servicePermissionId = value; RaisePropertyChanged(); } } @@ -2281,102 +7973,84 @@ 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 enum GetUniqueIdentityType + public partial class RoleServicePermissionContractListMessageContract : System.ComponentModel.INotifyPropertyChanged { + private bool _isSuccess; + private ErrorContract _error; + private SuccessContract _success; + private System.Collections.Generic.ICollection _result; + private bool _hasItems; - None = 0, - - Default = 1, - - All = 2, - - Other = 3, - - Unknown = 4, - - Nothing = 5, - - OnlyParent = 6, + [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsSuccess + { + get { return _isSuccess; } - OnlyChilren = 7, + set + { + if (_isSuccess != value) + { + _isSuccess = value; + RaisePropertyChanged(); + } + } + } - } + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ErrorContract Error + { + get { return _error; } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class Int64DeleteBulkRequestContract : System.ComponentModel.INotifyPropertyChanged - { - private System.Collections.Generic.ICollection _ids; + set + { + if (_error != value) + { + _error = value; + RaisePropertyChanged(); + } + } + } - [Newtonsoft.Json.JsonProperty("ids", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Ids + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success { - get { return _ids; } + get { return _success; } set { - if (_ids != value) + if (_success != value) { - _ids = value; + _success = value; RaisePropertyChanged(); } } } - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) - { - var handler = PropertyChanged; - if (handler != null) - handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class Int64DeleteRequestContract : System.ComponentModel.INotifyPropertyChanged - { - private long _id; - - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long Id + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Result { - get { return _id; } + get { return _result; } set { - if (_id != value) + if (_result != value) { - _id = value; + _result = value; RaisePropertyChanged(); } } } - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) - { - var handler = PropertyChanged; - if (handler != null) - handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class Int64GetIdRequestContract : System.ComponentModel.INotifyPropertyChanged - { - private long _id; - - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long Id + [Newtonsoft.Json.JsonProperty("hasItems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool HasItems { - get { return _id; } + get { return _hasItems; } set { - if (_id != value) + if (_hasItems != value) { - _id = value; + _hasItems = value; RaisePropertyChanged(); } } @@ -2393,12 +8067,12 @@ 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 Int64MessageContract : System.ComponentModel.INotifyPropertyChanged + public partial class RoleServicePermissionContractMessageContract : System.ComponentModel.INotifyPropertyChanged { private bool _isSuccess; private ErrorContract _error; private SuccessContract _success; - private long _result; + private RoleServicePermissionContract _result; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsSuccess @@ -2446,7 +8120,7 @@ public SuccessContract Success } [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long Result + public RoleServicePermissionContract Result { get { return _result; } @@ -2471,36 +8145,98 @@ 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 Int64SoftDeleteBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + public partial class RoleServicePermissionContractUpdateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged { - private System.Collections.Generic.ICollection _ids; - private bool _isDelete; + private System.Collections.Generic.ICollection _items; - [Newtonsoft.Json.JsonProperty("ids", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Ids + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items { - get { return _ids; } + get { return _items; } set { - if (_ids != value) + if (_items != value) { - _ids = value; + _items = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("isDelete", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsDelete + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) { - get { return _isDelete; } + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [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 _methodName; + private string _path; + private string _porjectName; + + [Newtonsoft.Json.JsonProperty("servieRouteAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ServieRouteAddress + { + get { return _servieRouteAddress; } set { - if (_isDelete != value) + if (_servieRouteAddress != value) { - _isDelete = value; + _servieRouteAddress = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("methodName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string MethodName + { + get { return _methodName; } + + set + { + if (_methodName != value) + { + _methodName = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("path", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Path + { + get { return _path; } + + set + { + if (_path != value) + { + _path = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("porjectName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PorjectName + { + get { return _porjectName; } + + set + { + if (_porjectName != value) + { + _porjectName = value; RaisePropertyChanged(); } } @@ -2517,36 +8253,52 @@ 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 Int64SoftDeleteRequestContract : System.ComponentModel.INotifyPropertyChanged + public partial class ServicePermissionContract : System.ComponentModel.INotifyPropertyChanged { - private long _id; - private bool _isDelete; + private string _microserviceName; + private string _serviceName; + private string _methodName; - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long Id + [Newtonsoft.Json.JsonProperty("microserviceName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string MicroserviceName { - get { return _id; } + get { return _microserviceName; } set { - if (_id != value) + if (_microserviceName != value) { - _id = value; + _microserviceName = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("isDelete", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsDelete + [Newtonsoft.Json.JsonProperty("serviceName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ServiceName { - get { return _isDelete; } + get { return _serviceName; } set { - if (_isDelete != value) + if (_serviceName != value) { - _isDelete = value; + _serviceName = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("methodName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string MethodName + { + get { return _methodName; } + + set + { + if (_methodName != value) + { + _methodName = value; RaisePropertyChanged(); } } @@ -2563,11 +8315,13 @@ 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 MessageContract : System.ComponentModel.INotifyPropertyChanged + public partial class ServicePermissionContractListMessageContract : System.ComponentModel.INotifyPropertyChanged { private bool _isSuccess; private ErrorContract _error; private SuccessContract _success; + private System.Collections.Generic.ICollection _result; + private bool _hasItems; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsSuccess @@ -2614,47 +8368,31 @@ public SuccessContract Success } } - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) - { - var handler = PropertyChanged; - if (handler != null) - handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class RegenerateTokenContract : System.ComponentModel.INotifyPropertyChanged - { - private long _userId; - private System.Collections.Generic.ICollection _claims; - - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long UserId + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Result { - get { return _userId; } + get { return _result; } set { - if (_userId != value) + if (_result != value) { - _userId = value; + _result = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("claims", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Claims + [Newtonsoft.Json.JsonProperty("hasItems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool HasItems { - get { return _claims; } + get { return _hasItems; } set { - if (_claims != value) + if (_hasItems != value) { - _claims = value; + _hasItems = value; RaisePropertyChanged(); } } @@ -2671,68 +8409,98 @@ 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 + public partial class ServicePermissionContractMessageContract : System.ComponentModel.INotifyPropertyChanged { - private string _servieRouteAddress; - private string _methodName; - private string _path; - private string _porjectName; + private bool _isSuccess; + private ErrorContract _error; + private SuccessContract _success; + private ServicePermissionContract _result; - [Newtonsoft.Json.JsonProperty("servieRouteAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServieRouteAddress + [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsSuccess { - get { return _servieRouteAddress; } + get { return _isSuccess; } set { - if (_servieRouteAddress != value) + if (_isSuccess != value) { - _servieRouteAddress = value; + _isSuccess = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("methodName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MethodName + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ErrorContract Error { - get { return _methodName; } + get { return _error; } set { - if (_methodName != value) + if (_error != value) { - _methodName = value; + _error = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("path", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Path + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success { - get { return _path; } + get { return _success; } set { - if (_path != value) + if (_success != value) + { + _success = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ServicePermissionContract Result + { + get { return _result; } + + set + { + if (_result != value) { - _path = value; + _result = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("porjectName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PorjectName + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) { - get { return _porjectName; } + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ServicePermissionContractUpdateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _items; + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items + { + get { return _items; } set { - if (_porjectName != value) + if (_items != value) { - _porjectName = value; + _items = value; RaisePropertyChanged(); } } @@ -3324,6 +9092,254 @@ 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 UserRoleContract : System.ComponentModel.INotifyPropertyChanged + { + private long _roleId; + private long _userId; + + [Newtonsoft.Json.JsonProperty("roleId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long RoleId + { + get { return _roleId; } + + set + { + if (_roleId != value) + { + _roleId = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long UserId + { + get { return _userId; } + + set + { + if (_userId != value) + { + _userId = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class UserRoleContractListMessageContract : System.ComponentModel.INotifyPropertyChanged + { + private bool _isSuccess; + private ErrorContract _error; + private SuccessContract _success; + private System.Collections.Generic.ICollection _result; + private bool _hasItems; + + [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsSuccess + { + get { return _isSuccess; } + + set + { + if (_isSuccess != value) + { + _isSuccess = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ErrorContract Error + { + get { return _error; } + + set + { + if (_error != value) + { + _error = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success + { + get { return _success; } + + set + { + if (_success != value) + { + _success = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Result + { + get { return _result; } + + set + { + if (_result != value) + { + _result = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("hasItems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool HasItems + { + get { return _hasItems; } + + set + { + if (_hasItems != value) + { + _hasItems = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class UserRoleContractMessageContract : System.ComponentModel.INotifyPropertyChanged + { + private bool _isSuccess; + private ErrorContract _error; + private SuccessContract _success; + private UserRoleContract _result; + + [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsSuccess + { + get { return _isSuccess; } + + set + { + if (_isSuccess != value) + { + _isSuccess = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ErrorContract Error + { + get { return _error; } + + set + { + if (_error != value) + { + _error = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success + { + get { return _success; } + + set + { + if (_success != value) + { + _success = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public UserRoleContract Result + { + get { return _result; } + + set + { + if (_result != value) + { + _result = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class UserRoleContractUpdateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _items; + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items + { + get { return _items; } + + set + { + if (_items != value) + { + _items = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] public partial class UserSummaryContract : System.ComponentModel.INotifyPropertyChanged { 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 1d60085..8b5e2ed 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 @@ -5,27 +5,27 @@ "version": "1.0" }, "paths": { - "/api/Users/VerifyUserName": { + "/api/Role/Add": { "post": { "tags": [ - "Users" + "Role" ], - "operationId": "VerifyUserName", + "operationId": "Add", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VerifyEmailAddressContract" + "$ref": "#/components/schemas/AddRoleRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/VerifyEmailAddressContract" + "$ref": "#/components/schemas/AddRoleRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/VerifyEmailAddressContract" + "$ref": "#/components/schemas/AddRoleRequestContract" } } } @@ -36,17 +36,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/BooleanMessageContract" + "$ref": "#/components/schemas/Int64MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/BooleanMessageContract" + "$ref": "#/components/schemas/Int64MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/BooleanMessageContract" + "$ref": "#/components/schemas/Int64MessageContract" } } } @@ -54,27 +54,27 @@ } } }, - "/api/Users/Register": { + "/api/Role/AddBulk": { "post": { "tags": [ - "Users" + "Role" ], - "operationId": "Register", + "operationId": "AddBulk", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddUserRequestContract" + "$ref": "#/components/schemas/AddRoleRequestContractCreateBulkRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddUserRequestContract" + "$ref": "#/components/schemas/AddRoleRequestContractCreateBulkRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddUserRequestContract" + "$ref": "#/components/schemas/AddRoleRequestContractCreateBulkRequestContract" } } } @@ -85,17 +85,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/MessageContract" } } } @@ -103,27 +103,27 @@ } } }, - "/api/Users/Login": { - "post": { + "/api/Role/Update": { + "put": { "tags": [ - "Users" + "Role" ], - "operationId": "Login", + "operationId": "Update", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserSummaryContract" + "$ref": "#/components/schemas/RoleContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UserSummaryContract" + "$ref": "#/components/schemas/RoleContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UserSummaryContract" + "$ref": "#/components/schemas/RoleContract" } } } @@ -134,17 +134,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/RoleContractMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/RoleContractMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/RoleContractMessageContract" } } } @@ -152,27 +152,27 @@ } } }, - "/api/Users/GenerateToken": { - "post": { + "/api/Role/UpdateBulk": { + "put": { "tags": [ - "Users" + "Role" ], - "operationId": "GenerateToken", + "operationId": "UpdateBulk", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserClaimContract" + "$ref": "#/components/schemas/RoleContractUpdateBulkRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UserClaimContract" + "$ref": "#/components/schemas/RoleContractUpdateBulkRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UserClaimContract" + "$ref": "#/components/schemas/RoleContractUpdateBulkRequestContract" } } } @@ -183,17 +183,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/UserResponseContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/UserResponseContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UserResponseContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } } } @@ -201,27 +201,27 @@ } } }, - "/api/Users/RegenerateToken": { - "post": { + "/api/Role/HardDeleteById": { + "delete": { "tags": [ - "Users" + "Role" ], - "operationId": "RegenerateToken", + "operationId": "HardDeleteById", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RegenerateTokenContract" + "$ref": "#/components/schemas/Int64DeleteRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/RegenerateTokenContract" + "$ref": "#/components/schemas/Int64DeleteRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/RegenerateTokenContract" + "$ref": "#/components/schemas/Int64DeleteRequestContract" } } } @@ -232,17 +232,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/UserResponseContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/UserResponseContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UserResponseContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } } } @@ -250,29 +250,48 @@ } } }, - "/api/Users/Test": { - "get": { + "/api/Role/HardDeleteBulkByIds": { + "delete": { "tags": [ - "Users" + "Role" ], - "operationId": "Test", + "operationId": "HardDeleteBulkByIds", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + } + } + }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { - "type": "string" + "$ref": "#/components/schemas/MessageContract" } }, "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/MessageContract" } }, "text/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/MessageContract" } } } @@ -280,27 +299,27 @@ } } }, - "/api/Users/Add": { - "post": { + "/api/Role/SoftDeleteById": { + "delete": { "tags": [ - "Users" + "Role" ], - "operationId": "Add", + "operationId": "SoftDeleteById", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddUserRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddUserRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddUserRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" } } } @@ -311,17 +330,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/MessageContract" } } } @@ -329,27 +348,27 @@ } } }, - "/api/Users/AddBulk": { - "post": { + "/api/Role/SoftDeleteBulkByIds": { + "delete": { "tags": [ - "Users" + "Role" ], - "operationId": "AddBulk", + "operationId": "SoftDeleteBulkByIds", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddUserRequestContractCreateBulkRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddUserRequestContractCreateBulkRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddUserRequestContractCreateBulkRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" } } } @@ -378,27 +397,27 @@ } } }, - "/api/Users/Update": { - "put": { + "/api/Role/GetById": { + "post": { "tags": [ - "Users" + "Role" ], - "operationId": "Update", + "operationId": "GetById", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserContract" + "$ref": "#/components/schemas/Int64GetIdRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UserContract" + "$ref": "#/components/schemas/Int64GetIdRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UserContract" + "$ref": "#/components/schemas/Int64GetIdRequestContract" } } } @@ -409,17 +428,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/UserContractMessageContract" + "$ref": "#/components/schemas/RoleContractMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/UserContractMessageContract" + "$ref": "#/components/schemas/RoleContractMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UserContractMessageContract" + "$ref": "#/components/schemas/RoleContractMessageContract" } } } @@ -427,27 +446,27 @@ } } }, - "/api/Users/UpdateBulk": { - "put": { + "/api/Role/GetByUniqueIdentity": { + "post": { "tags": [ - "Users" + "Role" ], - "operationId": "UpdateBulk", + "operationId": "GetByUniqueIdentity", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserContractUpdateBulkRequestContract" + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UserContractUpdateBulkRequestContract" + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UserContractUpdateBulkRequestContract" + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" } } } @@ -458,17 +477,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/RoleContractMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/RoleContractMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/RoleContractMessageContract" } } } @@ -476,27 +495,27 @@ } } }, - "/api/Users/HardDeleteById": { - "delete": { + "/api/Role/Filter": { + "post": { "tags": [ - "Users" + "Role" ], - "operationId": "HardDeleteById", + "operationId": "Filter", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64DeleteRequestContract" + "$ref": "#/components/schemas/FilterRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64DeleteRequestContract" + "$ref": "#/components/schemas/FilterRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64DeleteRequestContract" + "$ref": "#/components/schemas/FilterRequestContract" } } } @@ -507,17 +526,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/RoleContractListMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/RoleContractListMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/RoleContractListMessageContract" } } } @@ -525,48 +544,29 @@ } } }, - "/api/Users/HardDeleteBulkByIds": { - "delete": { + "/api/Role/GetAll": { + "get": { "tags": [ - "Users" + "Role" ], - "operationId": "HardDeleteBulkByIds", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" - } - } - } - }, + "operationId": "GetAll", "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/RoleContractListMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/RoleContractListMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/RoleContractListMessageContract" } } } @@ -574,27 +574,27 @@ } } }, - "/api/Users/SoftDeleteById": { - "delete": { + "/api/Role/GetAllByUniqueIdentity": { + "post": { "tags": [ - "Users" + "Role" ], - "operationId": "SoftDeleteById", + "operationId": "GetAllByUniqueIdentity", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" } } } @@ -605,17 +605,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/RoleContractListMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/RoleContractListMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/RoleContractListMessageContract" } } } @@ -623,27 +623,27 @@ } } }, - "/api/Users/SoftDeleteBulkByIds": { - "delete": { + "/api/RoleServicePermission/Add": { + "post": { "tags": [ - "Users" + "RoleServicePermission" ], - "operationId": "SoftDeleteBulkByIds", + "operationId": "Add2", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + "$ref": "#/components/schemas/AddRoleServicePermissionRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + "$ref": "#/components/schemas/AddRoleServicePermissionRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + "$ref": "#/components/schemas/AddRoleServicePermissionRequestContract" } } } @@ -654,17 +654,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/Int64MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/Int64MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/Int64MessageContract" } } } @@ -672,27 +672,27 @@ } } }, - "/api/Users/GetById": { + "/api/RoleServicePermission/AddBulk": { "post": { "tags": [ - "Users" + "RoleServicePermission" ], - "operationId": "GetById", + "operationId": "AddBulk2", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/AddRoleServicePermissionRequestContractCreateBulkRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/AddRoleServicePermissionRequestContractCreateBulkRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/AddRoleServicePermissionRequestContractCreateBulkRequestContract" } } } @@ -703,17 +703,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/UserContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/UserContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UserContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } } } @@ -721,27 +721,27 @@ } } }, - "/api/Users/GetByUniqueIdentity": { - "post": { + "/api/RoleServicePermission/Update": { + "put": { "tags": [ - "Users" + "RoleServicePermission" ], - "operationId": "GetByUniqueIdentity", + "operationId": "Update2", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/RoleServicePermissionContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/RoleServicePermissionContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/RoleServicePermissionContract" } } } @@ -752,12 +752,2484 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/UserContractMessageContract" + "$ref": "#/components/schemas/RoleServicePermissionContractMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/UserContractMessageContract" + "$ref": "#/components/schemas/RoleServicePermissionContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/RoleServicePermissionContractMessageContract" + } + } + } + } + } + } + }, + "/api/RoleServicePermission/UpdateBulk": { + "put": { + "tags": [ + "RoleServicePermission" + ], + "operationId": "UpdateBulk2", + "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": [ + "RoleServicePermission" + ], + "operationId": "HardDeleteById2", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + } + } + }, + "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/HardDeleteBulkByIds": { + "delete": { + "tags": [ + "RoleServicePermission" + ], + "operationId": "HardDeleteBulkByIds2", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + } + } + }, + "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/SoftDeleteById": { + "delete": { + "tags": [ + "RoleServicePermission" + ], + "operationId": "SoftDeleteById2", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + } + } + }, + "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/SoftDeleteBulkByIds": { + "delete": { + "tags": [ + "RoleServicePermission" + ], + "operationId": "SoftDeleteBulkByIds2", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + } + } + }, + "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/GetById": { + "post": { + "tags": [ + "RoleServicePermission" + ], + "operationId": "GetById2", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetIdRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetIdRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64GetIdRequestContract" + } + } + } + }, + "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/GetByUniqueIdentity": { + "post": { + "tags": [ + "RoleServicePermission" + ], + "operationId": "GetByUniqueIdentity2", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + } + } + }, + "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/Filter": { + "post": { + "tags": [ + "RoleServicePermission" + ], + "operationId": "Filter2", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FilterRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/FilterRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/FilterRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/RoleServicePermissionContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleServicePermissionContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/RoleServicePermissionContractListMessageContract" + } + } + } + } + } + } + }, + "/api/RoleServicePermission/GetAll": { + "get": { + "tags": [ + "RoleServicePermission" + ], + "operationId": "GetAll2", + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/RoleServicePermissionContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleServicePermissionContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/RoleServicePermissionContractListMessageContract" + } + } + } + } + } + } + }, + "/api/RoleServicePermission/GetAllByUniqueIdentity": { + "post": { + "tags": [ + "RoleServicePermission" + ], + "operationId": "GetAllByUniqueIdentity2", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/RoleServicePermissionContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleServicePermissionContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/RoleServicePermissionContractListMessageContract" + } + } + } + } + } + } + }, + "/api/ServicePermission/Add": { + "post": { + "tags": [ + "ServicePermission" + ], + "operationId": "Add3", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddServicePermissionRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddServicePermissionRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddServicePermissionRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + } + } + } + } + } + }, + "/api/ServicePermission/AddBulk": { + "post": { + "tags": [ + "ServicePermission" + ], + "operationId": "AddBulk3", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddServicePermissionRequestContractCreateBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddServicePermissionRequestContractCreateBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddServicePermissionRequestContractCreateBulkRequestContract" + } + } + } + }, + "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/Update": { + "put": { + "tags": [ + "ServicePermission" + ], + "operationId": "Update3", + "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": [ + "ServicePermission" + ], + "operationId": "UpdateBulk3", + "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": [ + "ServicePermission" + ], + "operationId": "HardDeleteById3", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + } + } + }, + "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/HardDeleteBulkByIds": { + "delete": { + "tags": [ + "ServicePermission" + ], + "operationId": "HardDeleteBulkByIds3", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + } + } + }, + "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/SoftDeleteById": { + "delete": { + "tags": [ + "ServicePermission" + ], + "operationId": "SoftDeleteById3", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + } + } + }, + "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/SoftDeleteBulkByIds": { + "delete": { + "tags": [ + "ServicePermission" + ], + "operationId": "SoftDeleteBulkByIds3", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + } + } + }, + "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/GetById": { + "post": { + "tags": [ + "ServicePermission" + ], + "operationId": "GetById3", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetIdRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetIdRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64GetIdRequestContract" + } + } + } + }, + "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/GetByUniqueIdentity": { + "post": { + "tags": [ + "ServicePermission" + ], + "operationId": "GetByUniqueIdentity3", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + } + } + }, + "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/Filter": { + "post": { + "tags": [ + "ServicePermission" + ], + "operationId": "Filter3", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FilterRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/FilterRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/FilterRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ServicePermissionContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServicePermissionContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ServicePermissionContractListMessageContract" + } + } + } + } + } + } + }, + "/api/ServicePermission/GetAll": { + "get": { + "tags": [ + "ServicePermission" + ], + "operationId": "GetAll3", + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ServicePermissionContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServicePermissionContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ServicePermissionContractListMessageContract" + } + } + } + } + } + } + }, + "/api/ServicePermission/GetAllByUniqueIdentity": { + "post": { + "tags": [ + "ServicePermission" + ], + "operationId": "GetAllByUniqueIdentity3", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ServicePermissionContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServicePermissionContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ServicePermissionContractListMessageContract" + } + } + } + } + } + } + }, + "/api/UserRole/Add": { + "post": { + "tags": [ + "UserRole" + ], + "operationId": "Add4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddUserRoleRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddUserRoleRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddUserRoleRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + } + } + } + } + } + }, + "/api/UserRole/AddBulk": { + "post": { + "tags": [ + "UserRole" + ], + "operationId": "AddBulk4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddUserRoleRequestContractCreateBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddUserRoleRequestContractCreateBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddUserRoleRequestContractCreateBulkRequestContract" + } + } + } + }, + "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/Update": { + "put": { + "tags": [ + "UserRole" + ], + "operationId": "Update4", + "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": [ + "UserRole" + ], + "operationId": "UpdateBulk4", + "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": [ + "UserRole" + ], + "operationId": "HardDeleteById4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + } + } + }, + "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/HardDeleteBulkByIds": { + "delete": { + "tags": [ + "UserRole" + ], + "operationId": "HardDeleteBulkByIds4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + } + } + }, + "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/SoftDeleteById": { + "delete": { + "tags": [ + "UserRole" + ], + "operationId": "SoftDeleteById4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + } + } + }, + "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/SoftDeleteBulkByIds": { + "delete": { + "tags": [ + "UserRole" + ], + "operationId": "SoftDeleteBulkByIds4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + } + } + }, + "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/GetById": { + "post": { + "tags": [ + "UserRole" + ], + "operationId": "GetById4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetIdRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetIdRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64GetIdRequestContract" + } + } + } + }, + "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/GetByUniqueIdentity": { + "post": { + "tags": [ + "UserRole" + ], + "operationId": "GetByUniqueIdentity4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + } + } + }, + "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/Filter": { + "post": { + "tags": [ + "UserRole" + ], + "operationId": "Filter4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FilterRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/FilterRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/FilterRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/UserRoleContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserRoleContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserRoleContractListMessageContract" + } + } + } + } + } + } + }, + "/api/UserRole/GetAll": { + "get": { + "tags": [ + "UserRole" + ], + "operationId": "GetAll4", + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/UserRoleContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserRoleContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserRoleContractListMessageContract" + } + } + } + } + } + } + }, + "/api/UserRole/GetAllByUniqueIdentity": { + "post": { + "tags": [ + "UserRole" + ], + "operationId": "GetAllByUniqueIdentity4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/UserRoleContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserRoleContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserRoleContractListMessageContract" + } + } + } + } + } + } + }, + "/api/Users/VerifyUserName": { + "post": { + "tags": [ + "Users" + ], + "operationId": "VerifyUserName", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VerifyEmailAddressContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/VerifyEmailAddressContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/VerifyEmailAddressContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/BooleanMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/BooleanMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/BooleanMessageContract" + } + } + } + } + } + } + }, + "/api/Users/Register": { + "post": { + "tags": [ + "Users" + ], + "operationId": "Register", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddUserRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddUserRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddUserRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + } + } + } + } + } + }, + "/api/Users/Login": { + "post": { + "tags": [ + "Users" + ], + "operationId": "Login", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserSummaryContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserSummaryContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UserSummaryContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + } + } + } + } + } + }, + "/api/Users/GenerateToken": { + "post": { + "tags": [ + "Users" + ], + "operationId": "GenerateToken", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserClaimContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserClaimContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UserClaimContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/UserResponseContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResponseContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserResponseContractMessageContract" + } + } + } + } + } + } + }, + "/api/Users/RegenerateToken": { + "post": { + "tags": [ + "Users" + ], + "operationId": "RegenerateToken", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegenerateTokenContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/RegenerateTokenContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/RegenerateTokenContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/UserResponseContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResponseContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserResponseContractMessageContract" + } + } + } + } + } + } + }, + "/api/Users/Test": { + "get": { + "tags": [ + "Users" + ], + "operationId": "Test", + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "type": "string" + } + }, + "text/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/api/Users/Add": { + "post": { + "tags": [ + "Users" + ], + "operationId": "Add5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddUserRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddUserRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddUserRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + } + } + } + } + } + }, + "/api/Users/AddBulk": { + "post": { + "tags": [ + "Users" + ], + "operationId": "AddBulk5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddUserRequestContractCreateBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AddUserRequestContractCreateBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AddUserRequestContractCreateBulkRequestContract" + } + } + } + }, + "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/Update": { + "put": { + "tags": [ + "Users" + ], + "operationId": "Update5", + "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": [ + "Users" + ], + "operationId": "UpdateBulk5", + "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": [ + "Users" + ], + "operationId": "HardDeleteById5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + } + } + }, + "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/HardDeleteBulkByIds": { + "delete": { + "tags": [ + "Users" + ], + "operationId": "HardDeleteBulkByIds5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + } + } + }, + "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/SoftDeleteById": { + "delete": { + "tags": [ + "Users" + ], + "operationId": "SoftDeleteById5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + } + } + }, + "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/SoftDeleteBulkByIds": { + "delete": { + "tags": [ + "Users" + ], + "operationId": "SoftDeleteBulkByIds5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + } + } + }, + "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/GetById": { + "post": { + "tags": [ + "Users" + ], + "operationId": "GetById5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetIdRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetIdRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64GetIdRequestContract" + } + } + } + }, + "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/GetByUniqueIdentity": { + "post": { + "tags": [ + "Users" + ], + "operationId": "GetByUniqueIdentity5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/UserContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserContractMessageContract" } }, "text/json": { @@ -775,7 +3247,7 @@ "tags": [ "Users" ], - "operationId": "Filter", + "operationId": "Filter5", "requestBody": { "content": { "application/json": { @@ -824,7 +3296,7 @@ "tags": [ "Users" ], - "operationId": "GetAll", + "operationId": "GetAll5", "responses": { "200": { "description": "Success", @@ -854,7 +3326,7 @@ "tags": [ "Users" ], - "operationId": "GetAllByUniqueIdentity", + "operationId": "GetAllByUniqueIdentity5", "requestBody": { "content": { "application/json": { @@ -901,6 +3373,99 @@ }, "components": { "schemas": { + "AddRoleRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "parentId": { + "title": "Nullable", + "type": "integer", + "format": "int64", + "nullable": true + } + } + }, + "AddRoleRequestContractCreateBulkRequestContract": { + "title": "CreateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/AddRoleRequestContract" + } + } + } + }, + "AddRoleServicePermissionRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "roleId": { + "type": "integer", + "format": "int64" + }, + "servicePermissionId": { + "type": "integer", + "format": "int64" + } + } + }, + "AddRoleServicePermissionRequestContractCreateBulkRequestContract": { + "title": "CreateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/AddRoleServicePermissionRequestContract" + } + } + } + }, + "AddServicePermissionRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "microserviceName": { + "type": "string", + "nullable": true + }, + "serviceName": { + "type": "string", + "nullable": true + }, + "methodName": { + "type": "string", + "nullable": true + } + } + }, + "AddServicePermissionRequestContractCreateBulkRequestContract": { + "title": "CreateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/AddServicePermissionRequestContract" + } + } + } + }, "AddUserRequestContract": { "type": "object", "additionalProperties": false, @@ -930,6 +3495,35 @@ } } }, + "AddUserRoleRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "roleId": { + "type": "integer", + "format": "int64" + }, + "userId": { + "type": "integer", + "format": "int64" + } + } + }, + "AddUserRoleRequestContractCreateBulkRequestContract": { + "title": "CreateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/AddUserRoleRequestContract" + } + } + } + }, "BooleanMessageContract": { "title": "MessageContract", "type": "object", @@ -1163,46 +3757,203 @@ 7 ] }, - "Int64DeleteBulkRequestContract": { - "title": "DeleteBulkRequestContract", + "Int64DeleteBulkRequestContract": { + "title": "DeleteBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "ids": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "type": "integer", + "format": "int64" + } + } + } + }, + "Int64DeleteRequestContract": { + "title": "DeleteRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int64" + } + } + }, + "Int64GetIdRequestContract": { + "title": "GetIdRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int64" + } + } + }, + "Int64MessageContract": { + "title": "MessageContract", + "type": "object", + "additionalProperties": false, + "properties": { + "isSuccess": { + "type": "boolean" + }, + "error": { + "$ref": "#/components/schemas/ErrorContract" + }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, + "result": { + "type": "integer", + "format": "int64" + } + } + }, + "Int64SoftDeleteBulkRequestContract": { + "title": "SoftDeleteBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "ids": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "type": "integer", + "format": "int64" + } + }, + "isDelete": { + "type": "boolean" + } + } + }, + "Int64SoftDeleteRequestContract": { + "title": "SoftDeleteRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "isDelete": { + "type": "boolean" + } + } + }, + "MessageContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "isSuccess": { + "type": "boolean" + }, + "error": { + "$ref": "#/components/schemas/ErrorContract" + }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + } + } + }, + "RegenerateTokenContract": { "type": "object", "additionalProperties": false, "properties": { - "ids": { - "title": "List", + "userId": { + "type": "integer", + "format": "int64" + }, + "claims": { + "title": "List", "type": "array", "nullable": true, "items": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/ClaimContract" } } } }, - "Int64DeleteRequestContract": { - "title": "DeleteRequestContract", + "RoleContract": { "type": "object", "additionalProperties": false, "properties": { + "creationDateTime": { + "type": "string", + "format": "date-time" + }, + "modificationDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "isDeleted": { + "type": "boolean" + }, + "deletedDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "uniqueIdentity": { + "type": "string", + "nullable": true + }, "id": { "type": "integer", "format": "int64" + }, + "name": { + "type": "string", + "nullable": true + }, + "parentId": { + "title": "Nullable", + "type": "integer", + "format": "int64", + "nullable": true } } }, - "Int64GetIdRequestContract": { - "title": "GetIdRequestContract", + "RoleContractListMessageContract": { + "title": "ListMessageContract", "type": "object", "additionalProperties": false, "properties": { - "id": { - "type": "integer", - "format": "int64" + "isSuccess": { + "type": "boolean" + }, + "error": { + "$ref": "#/components/schemas/ErrorContract" + }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, + "result": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/RoleContract" + } + }, + "hasItems": { + "type": "boolean", + "readOnly": true } } }, - "Int64MessageContract": { - "title": "MessageContract", + "RoleContractMessageContract": { + "title": "MessageContract", "type": "object", "additionalProperties": false, "properties": { @@ -1216,45 +3967,41 @@ "$ref": "#/components/schemas/SuccessContract" }, "result": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/RoleContract" } } }, - "Int64SoftDeleteBulkRequestContract": { - "title": "SoftDeleteBulkRequestContract", + "RoleContractUpdateBulkRequestContract": { + "title": "UpdateBulkRequestContract", "type": "object", "additionalProperties": false, "properties": { - "ids": { - "title": "List", + "items": { + "title": "List", "type": "array", "nullable": true, "items": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/RoleContract" } - }, - "isDelete": { - "type": "boolean" } } }, - "Int64SoftDeleteRequestContract": { - "title": "SoftDeleteRequestContract", + "RoleServicePermissionContract": { "type": "object", "additionalProperties": false, "properties": { - "id": { + "roleId": { "type": "integer", "format": "int64" }, - "isDelete": { - "type": "boolean" + "servicePermissionId": { + "type": "integer", + "format": "int64" } } }, - "MessageContract": { + "RoleServicePermissionContractListMessageContract": { + "title": "ListMessageContract", "type": "object", "additionalProperties": false, "properties": { @@ -1266,23 +4013,51 @@ }, "success": { "$ref": "#/components/schemas/SuccessContract" + }, + "result": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/RoleServicePermissionContract" + } + }, + "hasItems": { + "type": "boolean", + "readOnly": true } } }, - "RegenerateTokenContract": { + "RoleServicePermissionContractMessageContract": { + "title": "MessageContract", "type": "object", "additionalProperties": false, "properties": { - "userId": { - "type": "integer", - "format": "int64" + "isSuccess": { + "type": "boolean" }, - "claims": { - "title": "List", + "error": { + "$ref": "#/components/schemas/ErrorContract" + }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, + "result": { + "$ref": "#/components/schemas/RoleServicePermissionContract" + } + } + }, + "RoleServicePermissionContractUpdateBulkRequestContract": { + "title": "UpdateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", "type": "array", "nullable": true, "items": { - "$ref": "#/components/schemas/ClaimContract" + "$ref": "#/components/schemas/RoleServicePermissionContract" } } } @@ -1309,6 +4084,86 @@ } } }, + "ServicePermissionContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "microserviceName": { + "type": "string", + "nullable": true + }, + "serviceName": { + "type": "string", + "nullable": true + }, + "methodName": { + "type": "string", + "nullable": true + } + } + }, + "ServicePermissionContractListMessageContract": { + "title": "ListMessageContract", + "type": "object", + "additionalProperties": false, + "properties": { + "isSuccess": { + "type": "boolean" + }, + "error": { + "$ref": "#/components/schemas/ErrorContract" + }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, + "result": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ServicePermissionContract" + } + }, + "hasItems": { + "type": "boolean", + "readOnly": true + } + } + }, + "ServicePermissionContractMessageContract": { + "title": "MessageContract", + "type": "object", + "additionalProperties": false, + "properties": { + "isSuccess": { + "type": "boolean" + }, + "error": { + "$ref": "#/components/schemas/ErrorContract" + }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, + "result": { + "$ref": "#/components/schemas/ServicePermissionContract" + } + } + }, + "ServicePermissionContractUpdateBulkRequestContract": { + "title": "UpdateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ServicePermissionContract" + } + } + } + }, "SuccessContract": { "type": "object", "additionalProperties": false, @@ -1480,6 +4335,82 @@ } } }, + "UserRoleContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "roleId": { + "type": "integer", + "format": "int64" + }, + "userId": { + "type": "integer", + "format": "int64" + } + } + }, + "UserRoleContractListMessageContract": { + "title": "ListMessageContract", + "type": "object", + "additionalProperties": false, + "properties": { + "isSuccess": { + "type": "boolean" + }, + "error": { + "$ref": "#/components/schemas/ErrorContract" + }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, + "result": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/UserRoleContract" + } + }, + "hasItems": { + "type": "boolean", + "readOnly": true + } + } + }, + "UserRoleContractMessageContract": { + "title": "MessageContract", + "type": "object", + "additionalProperties": false, + "properties": { + "isSuccess": { + "type": "boolean" + }, + "error": { + "$ref": "#/components/schemas/ErrorContract" + }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, + "result": { + "$ref": "#/components/schemas/UserRoleContract" + } + } + }, + "UserRoleContractUpdateBulkRequestContract": { + "title": "UpdateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/UserRoleContract" + } + } + } + }, "UserSummaryContract": { "type": "object", "additionalProperties": false, diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/EasyMicroservices.AuthenticationsMicroservice.Clients.csproj b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/EasyMicroservices.AuthenticationsMicroservice.Clients.csproj index 997431d..e13ab93 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.8 + 0.0.0.9 client generated code. EasyMicroservices@gmail.com microservice,auth,authentication,client diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/EasyMicroservices.AuthenticationsMicroservice.Domain.csproj b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/EasyMicroservices.AuthenticationsMicroservice.Domain.csproj index 095ba76..7a03dbd 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/EasyMicroservices.AuthenticationsMicroservice.Domain.csproj +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/EasyMicroservices.AuthenticationsMicroservice.Domain.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Properties/launchSettings.json b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Properties/launchSettings.json index 12d460c..d5c6d95 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Properties/launchSettings.json +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/Properties/launchSettings.json @@ -18,7 +18,7 @@ "ASPNETCORE_ENVIRONMENT": "Development" }, "dotnetRunMessages": true, - "applicationUrl": "http://localhost:7183" + "applicationUrl": "http://localhost:1044" }, "IIS Express": { "commandName": "IISExpress",