From b368df56f7c638171d40324c588e1fceaf8e720c Mon Sep 17 00:00:00 2001 From: Mahdiyar Ghannad Date: Wed, 11 Oct 2023 20:18:25 +0330 Subject: [PATCH] Update client --- .../OpenAPI.cs | 1418 ++++++++++++++--- .../OpenAPI.nswag.json | 553 ++++++- ...AuthenticationsMicroservice.Clients.csproj | 2 +- 3 files changed, 1745 insertions(+), 228 deletions(-) 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 dfe5f46..777f80d 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.cs +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.cs @@ -519,18 +519,18 @@ public virtual async System.Threading.Tasks.Task TestAsync(System.Thread /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) + public virtual System.Threading.Tasks.Task AddAsync(AddUserRequestContract 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(AddUserRequestContract 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/Users/Add"); var client_ = _httpClient; var disposeClient_ = false; @@ -568,7 +568,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); @@ -597,18 +597,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(AddUserRequestContractCreateBulkRequestContract 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(AddUserRequestContractCreateBulkRequestContract 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/Users/AddBulk"); var client_ = _httpClient; var disposeClient_ = false; @@ -646,7 +646,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); @@ -675,18 +675,18 @@ public virtual async System.Threading.Tasks.Task Ge /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task AddAsync(AddUserRequestContract body) + public virtual System.Threading.Tasks.Task UpdateAsync(UserContract body) { - return AddAsync(body, System.Threading.CancellationToken.None); + return UpdateAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task AddAsync(AddUserRequestContract body, System.Threading.CancellationToken cancellationToken) + 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/Add"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/Update"); var client_ = _httpClient; var disposeClient_ = false; @@ -698,7 +698,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("PUT"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -724,7 +724,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); @@ -753,18 +753,18 @@ public virtual async System.Threading.Tasks.Task AddAsync( /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task UpdateAsync(UserContract body) + public virtual System.Threading.Tasks.Task UpdateBulkAsync(UserContractUpdateBulkRequestContract body) { - return UpdateAsync(body, System.Threading.CancellationToken.None); + return UpdateBulkAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task UpdateAsync(UserContract body, System.Threading.CancellationToken cancellationToken) + 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/Update"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/UpdateBulk"); var client_ = _httpClient; var disposeClient_ = false; @@ -802,7 +802,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); @@ -909,18 +909,18 @@ public virtual async System.Threading.Tasks.Task HardDeleteById /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) + public virtual System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body) { - return SoftDeleteByIdAsync(body, System.Threading.CancellationToken.None); + return HardDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/SoftDeleteById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/HardDeleteBulkByIds"); var client_ = _httpClient; var disposeClient_ = false; @@ -987,18 +987,18 @@ public virtual async System.Threading.Tasks.Task SoftDeleteById /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetAllAsync() + public virtual System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) { - return GetAllAsync(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 GetAllAsync(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/GetAll"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/SoftDeleteById"); var client_ = _httpClient; var disposeClient_ = false; @@ -1006,7 +1006,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); @@ -1061,18 +1065,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 SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body) { - return GetAllByUniqueIdentityAsync(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 GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/GetAllByUniqueIdentity"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/SoftDeleteBulkByIds"); var client_ = _httpClient; var disposeClient_ = false; @@ -1084,7 +1088,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); @@ -1137,148 +1141,564 @@ public virtual async System.Threading.Tasks.Task + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } + return GetByIdAsync(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 GetByIdAsync(Int64GetIdRequestContract 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/Users/GetById"); - 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("POST"); + 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; - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) { - get { return _userName; } - - set - { - if (_userName != value) - { - _userName = value; - RaisePropertyChanged(); - } - } + return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); } - [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Password + /// 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) { - get { return _password; } + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/GetByUniqueIdentity"); - set + var client_ = _httpClient; + var disposeClient_ = false; + try { - if (_password != value) + using (var request_ = new System.Net.Http.HttpRequestMessage()) { - _password = value; - RaisePropertyChanged(); - } - } - } + 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")); - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + PrepareRequest(client_, request_, urlBuilder_); - protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = 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 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 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) @@ -1291,6 +1711,7 @@ public partial class BooleanMessageContract : System.ComponentModel.INotifyPrope { 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)] @@ -1323,6 +1744,21 @@ public ErrorContract Error } } + [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 { @@ -1402,7 +1838,9 @@ public partial class ErrorContract : System.ComponentModel.INotifyPropertyChange private string _message; private string _endUserMessage; private string _details; - private string _stackTrace; + 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 @@ -1464,31 +1902,369 @@ public string EndUserMessage } } - [Newtonsoft.Json.JsonProperty("details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Details + [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 (_fromModificationDateTime != value) + { + _fromModificationDateTime = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("toModificationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ToModificationDateTime + { + get { return _toModificationDateTime; } + + set + { + if (_toModificationDateTime != 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(); + } + } + } + + 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 GetUniqueIdentityRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private string _uniqueIdentity; + private GetUniqueIdentityType _type; + + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity { - get { return _details; } + get { return _uniqueIdentity; } set { - if (_details != value) + if (_uniqueIdentity != value) { - _details = value; + _uniqueIdentity = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("stackTrace", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string StackTrace + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public GetUniqueIdentityType Type { - get { return _stackTrace; } + get { return _type; } set { - if (_stackTrace != value) + if (_type != value) { - _stackTrace = value; + _type = value; RaisePropertyChanged(); } } @@ -1505,7 +2281,7 @@ 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 enum GetUniqueIdentityType { None = 0, @@ -1520,45 +2296,27 @@ public enum FailedReasonType Nothing = 5, - SessionAccessDenied = 6, - - AccessDenied = 7, - - InternalError = 8, - - Dupplicate = 9, + OnlyParent = 6, - Empty = 10, - - NotFound = 11, - - ValidationsError = 12, - - StreamError = 13, - - WebServiceNotWorking = 14, - - Incorrect = 15, - - OperationFailed = 16, + 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 GetUniqueIdentityRequestContract : System.ComponentModel.INotifyPropertyChanged + public partial class Int64DeleteBulkRequestContract : System.ComponentModel.INotifyPropertyChanged { - private string _uniqueIdentity; + private System.Collections.Generic.ICollection _ids; - [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UniqueIdentity + [Newtonsoft.Json.JsonProperty("ids", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Ids { - get { return _uniqueIdentity; } + get { return _ids; } set { - if (_uniqueIdentity != value) + if (_ids != value) { - _uniqueIdentity = value; + _ids = value; RaisePropertyChanged(); } } @@ -1639,6 +2397,7 @@ public partial class Int64MessageContract : System.ComponentModel.INotifyPropert { private bool _isSuccess; private ErrorContract _error; + private SuccessContract _success; private long _result; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -1671,6 +2430,21 @@ public ErrorContract Error } } + [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 long Result { @@ -1696,6 +2470,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 Int64SoftDeleteBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _ids; + private bool _isDelete; + + [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(); + } + } + } + + [Newtonsoft.Json.JsonProperty("isDelete", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsDelete + { + get { return _isDelete; } + + set + { + if (_isDelete != value) + { + _isDelete = 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 Int64SoftDeleteRequestContract : System.ComponentModel.INotifyPropertyChanged { @@ -1747,6 +2567,7 @@ public partial class MessageContract : System.ComponentModel.INotifyPropertyChan { 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 @@ -1778,6 +2599,21 @@ public ErrorContract Error } } + [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(); + } + } + } + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) @@ -1834,6 +2670,114 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ServiceDetailsContract : System.ComponentModel.INotifyPropertyChanged + { + private string _servieRouteAddress; + private string _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 (_servieRouteAddress != 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(); + } + } + } + + 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 SuccessContract : System.ComponentModel.INotifyPropertyChanged + { + private string _endUserMessage; + + [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(); + } + } + } + + 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 UserClaimContract : System.ComponentModel.INotifyPropertyChanged { @@ -2059,7 +3003,9 @@ public partial class UserContractListMessageContract : System.ComponentModel.INo { 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 @@ -2091,6 +3037,21 @@ public ErrorContract Error } } + [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 { @@ -2106,6 +3067,21 @@ public System.Collections.Generic.ICollection Result } } + [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) @@ -2121,6 +3097,7 @@ public partial class UserContractMessageContract : System.ComponentModel.INotify { private bool _isSuccess; private ErrorContract _error; + private SuccessContract _success; private UserContract _result; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -2153,6 +3130,21 @@ public ErrorContract Error } } + [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 UserContract Result { @@ -2178,6 +3170,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 UserContractUpdateBulkRequestContract : 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 UserResponseContract : System.ComponentModel.INotifyPropertyChanged { @@ -2229,6 +3251,7 @@ public partial class UserResponseContractMessageContract : System.ComponentModel { private bool _isSuccess; private ErrorContract _error; + private SuccessContract _success; private UserResponseContract _result; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -2261,6 +3284,21 @@ public ErrorContract Error } } + [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 UserResponseContract Result { 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 92cf71d..1d60085 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 @@ -280,27 +280,27 @@ } } }, - "/api/Users/GetById": { + "/api/Users/Add": { "post": { "tags": [ "Users" ], - "operationId": "GetById", + "operationId": "Add", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/AddUserRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/AddUserRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/AddUserRequestContract" } } } @@ -311,17 +311,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/UserContractMessageContract" + "$ref": "#/components/schemas/Int64MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/UserContractMessageContract" + "$ref": "#/components/schemas/Int64MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UserContractMessageContract" + "$ref": "#/components/schemas/Int64MessageContract" } } } @@ -329,27 +329,27 @@ } } }, - "/api/Users/GetByUniqueIdentity": { + "/api/Users/AddBulk": { "post": { "tags": [ "Users" ], - "operationId": "GetByUniqueIdentity", + "operationId": "AddBulk", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/AddUserRequestContractCreateBulkRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/AddUserRequestContractCreateBulkRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/AddUserRequestContractCreateBulkRequestContract" } } } @@ -360,17 +360,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" } } } @@ -378,27 +378,27 @@ } } }, - "/api/Users/Add": { - "post": { + "/api/Users/Update": { + "put": { "tags": [ "Users" ], - "operationId": "Add", + "operationId": "Update", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddUserRequestContract" + "$ref": "#/components/schemas/UserContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddUserRequestContract" + "$ref": "#/components/schemas/UserContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddUserRequestContract" + "$ref": "#/components/schemas/UserContract" } } } @@ -409,17 +409,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/UserContractMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/UserContractMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/UserContractMessageContract" } } } @@ -427,27 +427,27 @@ } } }, - "/api/Users/Update": { + "/api/Users/UpdateBulk": { "put": { "tags": [ "Users" ], - "operationId": "Update", + "operationId": "UpdateBulk", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserContract" + "$ref": "#/components/schemas/UserContractUpdateBulkRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UserContract" + "$ref": "#/components/schemas/UserContractUpdateBulkRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UserContract" + "$ref": "#/components/schemas/UserContractUpdateBulkRequestContract" } } } @@ -458,17 +458,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" } } } @@ -525,6 +525,55 @@ } } }, + "/api/Users/HardDeleteBulkByIds": { + "delete": { + "tags": [ + "Users" + ], + "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": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, "/api/Users/SoftDeleteById": { "delete": { "tags": [ @@ -574,6 +623,202 @@ } } }, + "/api/Users/SoftDeleteBulkByIds": { + "delete": { + "tags": [ + "Users" + ], + "operationId": "SoftDeleteBulkByIds", + "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": "GetById", + "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": "GetByUniqueIdentity", + "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": { + "schema": { + "$ref": "#/components/schemas/UserContractMessageContract" + } + } + } + } + } + } + }, + "/api/Users/Filter": { + "post": { + "tags": [ + "Users" + ], + "operationId": "Filter", + "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/UserContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserContractListMessageContract" + } + } + } + } + } + } + }, "/api/Users/GetAll": { "get": { "tags": [ @@ -670,6 +915,21 @@ } } }, + "AddUserRequestContractCreateBulkRequestContract": { + "title": "CreateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/AddUserRequestContract" + } + } + } + }, "BooleanMessageContract": { "title": "MessageContract", "type": "object", @@ -681,6 +941,9 @@ "error": { "$ref": "#/components/schemas/ErrorContract" }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, "result": { "type": "boolean" } @@ -728,8 +991,23 @@ "nullable": true }, "stackTrace": { - "type": "string", - "nullable": true + "title": "List", + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "children": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ErrorContract" + } + }, + "serviceDetails": { + "$ref": "#/components/schemas/ServiceDetailsContract" } } }, @@ -746,7 +1024,7 @@ "SessionAccessDenied", "AccessDenied", "InternalError", - "Dupplicate", + "Duplicate", "Empty", "NotFound", "ValidationsError", @@ -775,6 +1053,79 @@ 16 ] }, + "FilterRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "isDeleted": { + "title": "Nullable", + "type": "boolean", + "nullable": true + }, + "fromDeletedDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "toDeletedDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "fromCreationDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "toCreationDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "fromModificationDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "toModificationDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "uniqueIdentity": { + "type": "string", + "nullable": true + }, + "uniqueIdentityType": { + "$ref": "#/components/schemas/GetUniqueIdentityType" + }, + "index": { + "title": "Nullable", + "type": "integer", + "format": "int64", + "nullable": true + }, + "length": { + "title": "Nullable", + "type": "integer", + "format": "int64", + "nullable": true + }, + "sortColumnName": { + "type": "string", + "nullable": true + }, + "isDescending": { + "type": "boolean" + } + } + }, "GetUniqueIdentityRequestContract": { "type": "object", "additionalProperties": false, @@ -782,6 +1133,49 @@ "uniqueIdentity": { "type": "string", "nullable": true + }, + "type": { + "$ref": "#/components/schemas/GetUniqueIdentityType" + } + } + }, + "GetUniqueIdentityType": { + "type": "integer", + "format": "int32", + "x-enumNames": [ + "None", + "Default", + "All", + "Other", + "Unknown", + "Nothing", + "OnlyParent", + "OnlyChilren" + ], + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ] + }, + "Int64DeleteBulkRequestContract": { + "title": "DeleteBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "ids": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "type": "integer", + "format": "int64" + } } } }, @@ -818,12 +1212,34 @@ "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", @@ -847,6 +1263,9 @@ }, "error": { "$ref": "#/components/schemas/ErrorContract" + }, + "success": { + "$ref": "#/components/schemas/SuccessContract" } } }, @@ -868,6 +1287,38 @@ } } }, + "ServiceDetailsContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "servieRouteAddress": { + "type": "string", + "nullable": true + }, + "methodName": { + "type": "string", + "nullable": true + }, + "path": { + "type": "string", + "nullable": true + }, + "porjectName": { + "type": "string", + "nullable": true + } + } + }, + "SuccessContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "endUserMessage": { + "type": "string", + "nullable": true + } + } + }, "UserClaimContract": { "type": "object", "additionalProperties": false, @@ -935,7 +1386,7 @@ } }, "UserContractListMessageContract": { - "title": "MessageContract", + "title": "ListMessageContract", "type": "object", "additionalProperties": false, "properties": { @@ -945,6 +1396,9 @@ "error": { "$ref": "#/components/schemas/ErrorContract" }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, "result": { "title": "List", "type": "array", @@ -952,6 +1406,10 @@ "items": { "$ref": "#/components/schemas/UserContract" } + }, + "hasItems": { + "type": "boolean", + "readOnly": true } } }, @@ -966,11 +1424,29 @@ "error": { "$ref": "#/components/schemas/ErrorContract" }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, "result": { "$ref": "#/components/schemas/UserContract" } } }, + "UserContractUpdateBulkRequestContract": { + "title": "UpdateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/UserContract" + } + } + } + }, "UserResponseContract": { "type": "object", "additionalProperties": false, @@ -996,6 +1472,9 @@ "error": { "$ref": "#/components/schemas/ErrorContract" }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, "result": { "$ref": "#/components/schemas/UserResponseContract" } diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/EasyMicroservices.AuthenticationsMicroservice.Clients.csproj b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/EasyMicroservices.AuthenticationsMicroservice.Clients.csproj index 277704e..997431d 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.7 + 0.0.0.8 client generated code. EasyMicroservices@gmail.com microservice,auth,authentication,client