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 1bd8700..05bf7e5 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.cs +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/Connected Services/AuthenticationsGeneratedServices/OpenAPI.cs @@ -989,6 +989,84 @@ public virtual async System.Threading.Tasks.TaskSuccess + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetByAsync(Int64GetByRequestContract body) + { + return GetByAsync(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 GetByAsync(Int64GetByRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/PersonalAccessToken/GetBy"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + /// Success /// A server side error occurred. public virtual System.Threading.Tasks.Task FilterAsync(FilterRequestContract body) @@ -2371,6 +2449,84 @@ public virtual async System.Threading.Tasks.Task Ge } } + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetByAsync(Int64GetByRequestContract body) + { + return GetByAsync(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 GetByAsync(Int64GetByRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Role/GetBy"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + /// Success /// A server side error occurred. public virtual System.Threading.Tasks.Task FilterAsync(FilterRequestContract body) @@ -3675,6 +3831,84 @@ public virtual async System.Threading.Tasks.TaskSuccess + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetByAsync(Int64GetByRequestContract body) + { + return GetByAsync(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 GetByAsync(Int64GetByRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/RoleServicePermission/GetBy"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + /// Success /// A server side error occurred. public virtual System.Threading.Tasks.Task FilterAsync(FilterRequestContract body) @@ -4905,16 +5139,94 @@ public virtual async System.Threading.Tasks.Task SoftDeleteBulk /// A server side error occurred. public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetByIdRequestContract body) { - return GetByIdAsync(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 GetByIdAsync(Int64GetByIdRequestContract 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_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetByUniqueIdentityRequestContract 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 GetByIdAsync(Int64GetByIdRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/GetById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/GetByUniqueIdentity"); var client_ = _httpClient; var disposeClient_ = false; @@ -4981,18 +5293,18 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetByUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task GetByAsync(Int64GetByRequestContract body) { - return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); + return GetByAsync(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(GetByUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByAsync(Int64GetByRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/GetByUniqueIdentity"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServicePermission/GetBy"); var client_ = _httpClient; var disposeClient_ = false; @@ -5427,18 +5739,18 @@ public string BaseUrl /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetUserByUserNameAsync(GetUserByUserNameRequestContract body) + public virtual System.Threading.Tasks.Task AddAsync(AddUserRequestContract body) { - return GetUserByUserNameAsync(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 GetUserByUserNameAsync(GetUserByUserNameRequestContract 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/User/GetUserByUserName"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/User/Add"); var client_ = _httpClient; var disposeClient_ = false; @@ -5476,7 +5788,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); @@ -5505,18 +5817,18 @@ public virtual async System.Threading.Tasks.Task Ge /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task VerifyUserIdentityAsync(UserSummaryContract body) + public virtual System.Threading.Tasks.Task GetUserByUserNameAsync(GetUserByUserNameRequestContract body) { - return VerifyUserIdentityAsync(body, System.Threading.CancellationToken.None); + return GetUserByUserNameAsync(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 VerifyUserIdentityAsync(UserSummaryContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetUserByUserNameAsync(GetUserByUserNameRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/User/VerifyUserIdentity"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/User/GetUserByUserName"); var client_ = _httpClient; var disposeClient_ = false; @@ -5583,18 +5895,18 @@ public virtual async System.Threading.Tasks.Task Ve /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetUserByPersonalAccessTokenAsync(PersonalAccessTokenRequestContract body) + public virtual System.Threading.Tasks.Task VerifyUserIdentityAsync(UserSummaryContract body) { - return GetUserByPersonalAccessTokenAsync(body, System.Threading.CancellationToken.None); + return VerifyUserIdentityAsync(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 GetUserByPersonalAccessTokenAsync(PersonalAccessTokenRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task VerifyUserIdentityAsync(UserSummaryContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/User/GetUserByPersonalAccessToken"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/User/VerifyUserIdentity"); var client_ = _httpClient; var disposeClient_ = false; @@ -5661,18 +5973,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 GetUserByPersonalAccessTokenAsync(PersonalAccessTokenRequestContract body) { - return AddAsync(body, System.Threading.CancellationToken.None); + return GetUserByPersonalAccessTokenAsync(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 GetUserByPersonalAccessTokenAsync(PersonalAccessTokenRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/User/Add"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/User/GetUserByPersonalAccessToken"); var client_ = _httpClient; var disposeClient_ = false; @@ -5710,7 +6022,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); @@ -6595,6 +6907,84 @@ public virtual async System.Threading.Tasks.Task Ge } } + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetByAsync(Int64GetByRequestContract body) + { + return GetByAsync(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 GetByAsync(Int64GetByRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/User/GetBy"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + /// Success /// A server side error occurred. public virtual System.Threading.Tasks.Task FilterAsync(FilterRequestContract body) @@ -7899,6 +8289,84 @@ public virtual async System.Threading.Tasks.TaskSuccess + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetByAsync(Int64GetByRequestContract body) + { + return GetByAsync(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 GetByAsync(Int64GetByRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/UserRole/GetBy"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + /// Success /// A server side error occurred. public virtual System.Threading.Tasks.Task FilterAsync(FilterRequestContract body) @@ -9428,6 +9896,68 @@ 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 Int64GetByRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private long _id; + private string _uniqueIdentity; + private GetUniqueIdentityType _uniqueIdentityType; + + [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(); + } + } + } + + [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(); + } + } + } + + 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 { 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 70d62ba..3433f98 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 @@ -593,6 +593,55 @@ } } }, + "/api/PersonalAccessToken/GetBy": { + "post": { + "tags": [ + "PersonalAccessToken" + ], + "operationId": "GetBy", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/PersonalAccessTokenContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PersonalAccessTokenContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PersonalAccessTokenContractMessageContract" + } + } + } + } + } + } + }, "/api/PersonalAccessToken/Filter": { "post": { "tags": [ @@ -1358,6 +1407,55 @@ } } }, + "/api/Role/GetBy": { + "post": { + "tags": [ + "Role" + ], + "operationId": "GetBy2", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/RoleContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/RoleContractMessageContract" + } + } + } + } + } + } + }, "/api/Role/Filter": { "post": { "tags": [ @@ -2074,6 +2172,55 @@ } } }, + "/api/RoleServicePermission/GetBy": { + "post": { + "tags": [ + "RoleServicePermission" + ], + "operationId": "GetBy3", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + } + } + }, + "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": [ @@ -2839,6 +2986,55 @@ } } }, + "/api/ServicePermission/GetBy": { + "post": { + "tags": [ + "ServicePermission" + ], + "operationId": "GetBy4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + } + } + }, + "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": [ @@ -2967,27 +3163,27 @@ } } }, - "/api/User/GetUserByUserName": { + "/api/User/Add": { "post": { "tags": [ "User" ], - "operationId": "GetUserByUserName", + "operationId": "Add5", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUserByUserNameRequestContract" + "$ref": "#/components/schemas/AddUserRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUserByUserNameRequestContract" + "$ref": "#/components/schemas/AddUserRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUserByUserNameRequestContract" + "$ref": "#/components/schemas/AddUserRequestContract" } } } @@ -2998,17 +3194,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" } } } @@ -3016,27 +3212,27 @@ } } }, - "/api/User/VerifyUserIdentity": { + "/api/User/GetUserByUserName": { "post": { "tags": [ "User" ], - "operationId": "VerifyUserIdentity", + "operationId": "GetUserByUserName", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserSummaryContract" + "$ref": "#/components/schemas/GetUserByUserNameRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/UserSummaryContract" + "$ref": "#/components/schemas/GetUserByUserNameRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/UserSummaryContract" + "$ref": "#/components/schemas/GetUserByUserNameRequestContract" } } } @@ -3065,27 +3261,27 @@ } } }, - "/api/User/GetUserByPersonalAccessToken": { + "/api/User/VerifyUserIdentity": { "post": { "tags": [ "User" ], - "operationId": "GetUserByPersonalAccessToken", + "operationId": "VerifyUserIdentity", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PersonalAccessTokenRequestContract" + "$ref": "#/components/schemas/UserSummaryContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/PersonalAccessTokenRequestContract" + "$ref": "#/components/schemas/UserSummaryContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/PersonalAccessTokenRequestContract" + "$ref": "#/components/schemas/UserSummaryContract" } } } @@ -3114,27 +3310,27 @@ } } }, - "/api/User/Add": { + "/api/User/GetUserByPersonalAccessToken": { "post": { "tags": [ "User" ], - "operationId": "Add5", + "operationId": "GetUserByPersonalAccessToken", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddUserRequestContract" + "$ref": "#/components/schemas/PersonalAccessTokenRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/AddUserRequestContract" + "$ref": "#/components/schemas/PersonalAccessTokenRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/AddUserRequestContract" + "$ref": "#/components/schemas/PersonalAccessTokenRequestContract" } } } @@ -3145,17 +3341,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" } } } @@ -3702,6 +3898,55 @@ } } }, + "/api/User/GetBy": { + "post": { + "tags": [ + "User" + ], + "operationId": "GetBy5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + } + } + }, + "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/User/Filter": { "post": { "tags": [ @@ -4418,6 +4663,55 @@ } } }, + "/api/UserRole/GetBy": { + "post": { + "tags": [ + "UserRole" + ], + "operationId": "GetBy6", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64GetByRequestContract" + } + } + } + }, + "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": [ @@ -5035,6 +5329,24 @@ } } }, + "Int64GetByRequestContract": { + "title": "GetByRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "uniqueIdentity": { + "type": "string", + "nullable": true + }, + "uniqueIdentityType": { + "$ref": "#/components/schemas/GetUniqueIdentityType" + } + } + }, "Int64MessageContract": { "title": "MessageContract", "type": "object", diff --git a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/EasyMicroservices.AuthenticationsMicroservice.Clients.csproj b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Clients/EasyMicroservices.AuthenticationsMicroservice.Clients.csproj index a549ea9..88d8f9e 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.19 + 0.0.0.20 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 73b0aba..562a180 100644 --- a/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/EasyMicroservices.AuthenticationsMicroservice.Domain.csproj +++ b/src/CSharp/EasyMicroservices.AuthenticationsMicroservice.Domain/EasyMicroservices.AuthenticationsMicroservice.Domain.csproj @@ -10,7 +10,7 @@ - +