From bd4da7bf79f07f3c3091f7111274e9c87b48dfa1 Mon Sep 17 00:00:00 2001 From: "sushi.at" Date: Thu, 23 Nov 2023 19:02:16 +0000 Subject: [PATCH 1/3] Passing along aircraft type being upgraded to enhanced add type method in the API --- .editorconfig | 2 +- OpenSky.Agent.Simulator/OpenAPIs/swagger.cs | 10590 ++++++++++------ OpenSky.Agent.Simulator/OpenAPIs/swagger.json | 336 +- .../OpenSky.Agent.Simulator.csproj | 3 + .../Views/Models/AircraftTypesViewModel.cs | 387 +- 5 files changed, 7272 insertions(+), 4046 deletions(-) diff --git a/.editorconfig b/.editorconfig index 81a6f6b..db96db1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -18,7 +18,7 @@ insert_final_newline = false # Organize usings dotnet_separate_import_directive_groups = true -file_header_template = --------------------------------------------------------------------------------------------------------------------\n\nOpenSky project 2021-2022\n\n-------------------------------------------------------------------------------------------------------------------- +file_header_template = --------------------------------------------------------------------------------------------------------------------\n\nOpenSky project 2021-2023\n\n-------------------------------------------------------------------------------------------------------------------- # this. and Me. preferences dotnet_style_qualification_for_event = true:suggestion diff --git a/OpenSky.Agent.Simulator/OpenAPIs/swagger.cs b/OpenSky.Agent.Simulator/OpenAPIs/swagger.cs index c0052d6..d301eaf 100644 --- a/OpenSky.Agent.Simulator/OpenAPIs/swagger.cs +++ b/OpenSky.Agent.Simulator/OpenAPIs/swagger.cs @@ -1,6 +1,6 @@ //---------------------- // -// Generated using the NSwag toolchain v13.8.2.0 (NJsonSchema v10.2.1.0 (Newtonsoft.Json v11.0.0.0)) (http://NSwag.org) +// Generated using the NSwag toolchain v13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0)) (http://NSwag.org) // //---------------------- @@ -9,62 +9,76 @@ #pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' #pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... #pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." +#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" +#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" +#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" namespace OpenSkyApi { using System = global::System; - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.8.2.0 (NJsonSchema v10.2.1.0 (Newtonsoft.Json v11.0.0.0))")] + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class OpenSkyService : OpenSkyServiceBase { private string _baseUrl = ""; private System.Net.Http.HttpClient _httpClient; private System.Lazy _settings; - + public OpenSkyService(string baseUrl, System.Net.Http.HttpClient httpClient) { - BaseUrl = baseUrl; - _httpClient = httpClient; + BaseUrl = baseUrl; + _httpClient = httpClient; _settings = new System.Lazy(CreateSerializerSettings); } - + private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() { var settings = new Newtonsoft.Json.JsonSerializerSettings(); UpdateJsonSerializerSettings(settings); return settings; } - - public string BaseUrl + + public string BaseUrl { get { return _baseUrl; } set { _baseUrl = value; } } - + protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - + partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - - /// Gets the user's account overview including profile image. + + /// + /// Gets the user's account overview including profile image. + /// + /// + /// sushi.at, 11/07/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAccountOverviewAsync() + public virtual System.Threading.Tasks.Task GetAccountOverviewAsync() { return GetAccountOverviewAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets the user's account overview including profile image. + /// + /// Gets the user's account overview including profile image. + /// + /// + /// sushi.at, 11/07/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAccountOverviewAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAccountOverviewAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Account/accountOverview"); - + var client_ = _httpClient; var disposeClient_ = false; try @@ -73,12 +87,14 @@ public async System.Threading.Tasks.Task GetAccountO { 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 @@ -89,13 +105,13 @@ public async System.Threading.Tasks.Task GetAccountO 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_).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); @@ -104,7 +120,7 @@ public async System.Threading.Tasks.Task GetAccountO } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -121,24 +137,34 @@ public async System.Threading.Tasks.Task GetAccountO client_.Dispose(); } } - - /// Gets the user's linked accounts. + + /// + /// Gets the user's linked accounts. + /// + /// + /// sushi.at, 11/07/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetLinkedAccountsAsync() + public virtual System.Threading.Tasks.Task GetLinkedAccountsAsync() { return GetLinkedAccountsAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets the user's linked accounts. + /// + /// Gets the user's linked accounts. + /// + /// + /// sushi.at, 11/07/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetLinkedAccountsAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetLinkedAccountsAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Account/linkedAccounts"); - + var client_ = _httpClient; var disposeClient_ = false; try @@ -147,12 +173,14 @@ public async System.Threading.Tasks.Task GetLinkedAcc { 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 @@ -163,13 +191,13 @@ public async System.Threading.Tasks.Task GetLinkedAcc 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_).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); @@ -178,7 +206,7 @@ public async System.Threading.Tasks.Task GetLinkedAcc } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -195,43 +223,56 @@ public async System.Threading.Tasks.Task GetLinkedAcc client_.Dispose(); } } - - /// Updates user's linked accounts. + + /// + /// Updates user's linked accounts. + /// + /// + /// sushi.at, 11/07/2021. + /// /// The linked accounts. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task UpdateLinkedAccountsAsync(LinkedAccounts body) + public virtual System.Threading.Tasks.Task UpdateLinkedAccountsAsync(LinkedAccounts body) { return UpdateLinkedAccountsAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Updates user's linked accounts. + /// + /// Updates user's linked accounts. + /// + /// + /// sushi.at, 11/07/2021. + /// /// The linked accounts. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateLinkedAccountsAsync(LinkedAccounts body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateLinkedAccountsAsync(LinkedAccounts body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Account/linkedAccounts"); - + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; request_.Method = new System.Net.Http.HttpMethod("PUT"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + PrepareRequest(client_, request_, url_); - + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try @@ -242,13 +283,13 @@ public async System.Threading.Tasks.Task UpdateLinkedAccounts 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_).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); @@ -257,7 +298,7 @@ public async System.Threading.Tasks.Task UpdateLinkedAccounts } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -274,45 +315,56 @@ public async System.Threading.Tasks.Task UpdateLinkedAccounts client_.Dispose(); } } - - /// Sets the token renewal country verification. - /// True to enable, false to disable the verification. + + /// + /// Get profile image for the specified user ID. + /// + /// + /// sushi.at, 23/11/2023. + /// + /// The ID of the OpenSky user. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task SetTokenRenewalCountryVerificationAsync(bool enableVerification) + public virtual System.Threading.Tasks.Task GetProfileImageAsync(System.Guid userId) { - return SetTokenRenewalCountryVerificationAsync(enableVerification, System.Threading.CancellationToken.None); + return GetProfileImageAsync(userId, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Sets the token renewal country verification. - /// True to enable, false to disable the verification. + /// + /// Get profile image for the specified user ID. + /// + /// + /// sushi.at, 23/11/2023. + /// + /// The ID of the OpenSky user. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task SetTokenRenewalCountryVerificationAsync(bool enableVerification, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetProfileImageAsync(System.Guid userId, System.Threading.CancellationToken cancellationToken) { - if (enableVerification == null) - throw new System.ArgumentNullException("enableVerification"); - + if (userId == null) + throw new System.ArgumentNullException("userId"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Account/tokenRenewalCountryVerification/{enableVerification}"); - urlBuilder_.Replace("{enableVerification}", System.Uri.EscapeDataString(ConvertToString(enableVerification, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Account/profileImage/{userId}"); + urlBuilder_.Replace("{userId}", System.Uri.EscapeDataString(ConvertToString(userId, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); - request_.Method = new System.Net.Http.HttpMethod("PUT"); + 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 @@ -323,13 +375,13 @@ public async System.Threading.Tasks.Task SetTokenRenewalCount 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_).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); @@ -338,7 +390,7 @@ public async System.Threading.Tasks.Task SetTokenRenewalCount } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -355,52 +407,50 @@ public async System.Threading.Tasks.Task SetTokenRenewalCount client_.Dispose(); } } - - /// Upload profile image. + + /// + /// Get the list of all OpenSky users. + /// + /// + /// sushi.at, 22/11/2023. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task UploadProfileImageAsync(FileParameter fileUpload) + public virtual System.Threading.Tasks.Task GetUsersAsync() { - return UploadProfileImageAsync(fileUpload, System.Threading.CancellationToken.None); + return GetUsersAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Upload profile image. + /// + /// Get the list of all OpenSky users. + /// + /// + /// sushi.at, 22/11/2023. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task UploadProfileImageAsync(FileParameter fileUpload, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetUsersAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Account/profileImage"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Account/users"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var boundary_ = System.Guid.NewGuid().ToString(); - var content_ = new System.Net.Http.MultipartFormDataContent(boundary_); - content_.Headers.Remove("Content-Type"); - content_.Headers.TryAddWithoutValidation("Content-Type", "multipart/form-data; boundary=" + boundary_); - if (fileUpload == null) - throw new System.ArgumentNullException("fileUpload"); - else - { - var content_fileUpload_ = new System.Net.Http.StreamContent(fileUpload.Data); - if (!string.IsNullOrEmpty(fileUpload.ContentType)) - content_fileUpload_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse(fileUpload.ContentType); - content_.Add(content_fileUpload_, "fileUpload", fileUpload.FileName ?? "fileUpload"); - } - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); + 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 @@ -411,13 +461,13 @@ public async System.Threading.Tasks.Task UploadProfileImageAs 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_).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); @@ -426,7 +476,7 @@ public async System.Threading.Tasks.Task UploadProfileImageAs } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -443,44 +493,56 @@ public async System.Threading.Tasks.Task UploadProfileImageAs client_.Dispose(); } } - - /// Get the aircraft record for the specified registry. - /// The registry. + + /// + /// Adds or removes the moderator role from the specified user. + /// + /// + /// sushi.at, 21/11/2023. + /// + /// The moderator role model. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAircraftAsync(string registry) + public virtual System.Threading.Tasks.Task SetModeratorRoleAsync(ModeratorRole body) { - return GetAircraftAsync(registry, System.Threading.CancellationToken.None); + return SetModeratorRoleAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get the aircraft record for the specified registry. - /// The registry. + /// + /// Adds or removes the moderator role from the specified user. + /// + /// + /// sushi.at, 21/11/2023. + /// + /// The moderator role model. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAircraftAsync(string registry, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task SetModeratorRoleAsync(ModeratorRole body, System.Threading.CancellationToken cancellationToken) { - if (registry == null) - throw new System.ArgumentNullException("registry"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft/{registry}"); - urlBuilder_.Replace("{registry}", System.Uri.EscapeDataString(ConvertToString(registry, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Account/moderatorRole"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + 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 @@ -491,13 +553,13 @@ public async System.Threading.Tasks.Task GetAircraftAsync(s 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_).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); @@ -506,7 +568,7 @@ public async System.Threading.Tasks.Task GetAircraftAsync(s } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -523,44 +585,57 @@ public async System.Threading.Tasks.Task GetAircraftAsync(s client_.Dispose(); } } - - /// Get the aircraft at a given airport. - /// The icao of the airport. + + /// + /// Sets the token renewal country verification. + /// + /// + /// sushi.at, 30/11/2021. + /// + /// True to enable, false to disable the verification. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAircraftAtAirportAsync(string icao) + public virtual System.Threading.Tasks.Task SetTokenRenewalCountryVerificationAsync(bool enableVerification) { - return GetAircraftAtAirportAsync(icao, System.Threading.CancellationToken.None); + return SetTokenRenewalCountryVerificationAsync(enableVerification, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get the aircraft at a given airport. - /// The icao of the airport. + /// + /// Sets the token renewal country verification. + /// + /// + /// sushi.at, 30/11/2021. + /// + /// True to enable, false to disable the verification. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAircraftAtAirportAsync(string icao, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task SetTokenRenewalCountryVerificationAsync(bool enableVerification, System.Threading.CancellationToken cancellationToken) { - if (icao == null) - throw new System.ArgumentNullException("icao"); - + if (enableVerification == null) + throw new System.ArgumentNullException("enableVerification"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft/atAirport/{icao}"); - urlBuilder_.Replace("{icao}", System.Uri.EscapeDataString(ConvertToString(icao, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Account/tokenRenewalCountryVerification/{enableVerification}"); + urlBuilder_.Replace("{enableVerification}", System.Uri.EscapeDataString(ConvertToString(enableVerification, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); + request_.Method = new System.Net.Http.HttpMethod("PUT"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + PrepareRequest(client_, request_, url_); - + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try @@ -571,13 +646,13 @@ public async System.Threading.Tasks.Task GetAirc 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_).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); @@ -586,7 +661,7 @@ public async System.Threading.Tasks.Task GetAirc } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -603,38 +678,65 @@ public async System.Threading.Tasks.Task GetAirc client_.Dispose(); } } - - /// Get the player owned aircraft. + + /// + /// Upload profile image. + /// + /// + /// sushi.at, 12/07/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetMyAircraftAsync() + public virtual System.Threading.Tasks.Task UploadProfileImageAsync(FileParameter fileUpload) { - return GetMyAircraftAsync(System.Threading.CancellationToken.None); + return UploadProfileImageAsync(fileUpload, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get the player owned aircraft. + /// + /// Upload profile image. + /// + /// + /// sushi.at, 12/07/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetMyAircraftAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UploadProfileImageAsync(FileParameter fileUpload, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft/myAircraft"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Account/profileImage"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + var boundary_ = System.Guid.NewGuid().ToString(); + var content_ = new System.Net.Http.MultipartFormDataContent(boundary_); + content_.Headers.Remove("Content-Type"); + content_.Headers.TryAddWithoutValidation("Content-Type", "multipart/form-data; boundary=" + boundary_); + + if (fileUpload == null) + throw new System.ArgumentNullException("fileUpload"); + else + { + var content_fileUpload_ = new System.Net.Http.StreamContent(fileUpload.Data); + if (!string.IsNullOrEmpty(fileUpload.ContentType)) + content_fileUpload_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse(fileUpload.ContentType); + content_.Add(content_fileUpload_, "fileUpload", fileUpload.FileName ?? "fileUpload"); + } + 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 @@ -645,13 +747,13 @@ public async System.Threading.Tasks.Task GetMyAi 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_).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); @@ -660,7 +762,7 @@ public async System.Threading.Tasks.Task GetMyAi } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -677,43 +779,56 @@ public async System.Threading.Tasks.Task GetMyAi client_.Dispose(); } } - - /// Perform ground operations for the specified aircraft. - /// The operations to be performed (fuel and payload loading). + + /// + /// Get the aircraft record for the specified registry. + /// + /// + /// sushi.at, 19/07/2021. + /// + /// The registry. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task PerformGroundOperationsAsync(GroundOperations body) + public virtual System.Threading.Tasks.Task GetAircraftAsync(string registry) { - return PerformGroundOperationsAsync(body, System.Threading.CancellationToken.None); + return GetAircraftAsync(registry, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Perform ground operations for the specified aircraft. - /// The operations to be performed (fuel and payload loading). + /// + /// Get the aircraft record for the specified registry. + /// + /// + /// sushi.at, 19/07/2021. + /// + /// The registry. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task PerformGroundOperationsAsync(GroundOperations body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAircraftAsync(string registry, System.Threading.CancellationToken cancellationToken) { + if (registry == null) + throw new System.ArgumentNullException("registry"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft/groundOperations"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft/{registry}"); + urlBuilder_.Replace("{registry}", System.Uri.EscapeDataString(ConvertToString(registry, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Method = new System.Net.Http.HttpMethod("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 @@ -724,13 +839,13 @@ public async System.Threading.Tasks.Task PerformGroundOperati 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_).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); @@ -739,7 +854,7 @@ public async System.Threading.Tasks.Task PerformGroundOperati } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -756,43 +871,56 @@ public async System.Threading.Tasks.Task PerformGroundOperati client_.Dispose(); } } - - /// Purchase specified aircraft. - /// The purchase aircraft model. + + /// + /// Get the aircraft at a given airport. + /// + /// + /// sushi.at, 19/07/2021. + /// + /// The icao of the airport. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task PurchaseAircraftAsync(PurchaseAircraft body) + public virtual System.Threading.Tasks.Task GetAircraftAtAirportAsync(string icao) { - return PurchaseAircraftAsync(body, System.Threading.CancellationToken.None); + return GetAircraftAtAirportAsync(icao, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Purchase specified aircraft. - /// The purchase aircraft model. + /// + /// Get the aircraft at a given airport. + /// + /// + /// sushi.at, 19/07/2021. + /// + /// The icao of the airport. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task PurchaseAircraftAsync(PurchaseAircraft body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAircraftAtAirportAsync(string icao, System.Threading.CancellationToken cancellationToken) { + if (icao == null) + throw new System.ArgumentNullException("icao"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft/purchase"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft/atAirport/{icao}"); + urlBuilder_.Replace("{icao}", System.Uri.EscapeDataString(ConvertToString(icao, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); - 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("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 @@ -803,13 +931,13 @@ public async System.Threading.Tasks.Task PurchaseAircraftAsyn 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_).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); @@ -818,7 +946,7 @@ public async System.Threading.Tasks.Task PurchaseAircraftAsyn } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -835,43 +963,50 @@ public async System.Threading.Tasks.Task PurchaseAircraftAsyn client_.Dispose(); } } - - /// Purchase new aircraft. - /// The purchase new aircraft model. + + /// + /// Get the player owned aircraft. + /// + /// + /// sushi.at, 19/07/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task PurchaseNewAircraftAsync(PurchaseNewAircraft body) + public virtual System.Threading.Tasks.Task GetMyAircraftAsync() { - return PurchaseNewAircraftAsync(body, System.Threading.CancellationToken.None); + return GetMyAircraftAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Purchase new aircraft. - /// The purchase new aircraft model. + /// + /// Get the player owned aircraft. + /// + /// + /// sushi.at, 19/07/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task PurchaseNewAircraftAsync(PurchaseNewAircraft body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetMyAircraftAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft/purchaseNew"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft/myAircraft"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); - 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("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 @@ -882,13 +1017,13 @@ public async System.Threading.Tasks.Task PurchaseNewAircraftA 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_).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); @@ -897,7 +1032,7 @@ public async System.Threading.Tasks.Task PurchaseNewAircraftA } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -914,41 +1049,56 @@ public async System.Threading.Tasks.Task PurchaseNewAircraftA client_.Dispose(); } } - - /// Searches for aircraft around a given airport. + + /// + /// Perform ground operations for the specified aircraft. + /// + /// + /// sushi.at, 20/12/2021. + /// + /// The operations to be performed (fuel and payload loading). /// Success /// A server side error occurred. - public System.Threading.Tasks.Task SearchAircraftAroundAirportAsync(AircraftSearchAroundAirport body) + public virtual System.Threading.Tasks.Task PerformGroundOperationsAsync(GroundOperations body) { - return SearchAircraftAroundAirportAsync(body, System.Threading.CancellationToken.None); + return PerformGroundOperationsAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Searches for aircraft around a given airport. + /// + /// Perform ground operations for the specified aircraft. + /// + /// + /// sushi.at, 20/12/2021. + /// + /// The operations to be performed (fuel and payload loading). /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task SearchAircraftAroundAirportAsync(AircraftSearchAroundAirport body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task PerformGroundOperationsAsync(GroundOperations body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft/searchAroundAirport"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft/groundOperations"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Method = new System.Net.Http.HttpMethod("PUT"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + 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 @@ -959,13 +1109,13 @@ public async System.Threading.Tasks.Task SearchA 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_).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); @@ -974,7 +1124,7 @@ public async System.Threading.Tasks.Task SearchA } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -991,43 +1141,56 @@ public async System.Threading.Tasks.Task SearchA client_.Dispose(); } } - - /// Searches for aircraft matching the criteria in the specified country. - /// The search. + + /// + /// Purchase specified aircraft. + /// + /// + /// sushi.at, 19/07/2021. + /// + /// The purchase aircraft model. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task SearchAircraftInCountryAsync(AircraftSearchInCountry body) + public virtual System.Threading.Tasks.Task PurchaseAircraftAsync(PurchaseAircraft body) { - return SearchAircraftInCountryAsync(body, System.Threading.CancellationToken.None); + return PurchaseAircraftAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Searches for aircraft matching the criteria in the specified country. - /// The search. + /// + /// Purchase specified aircraft. + /// + /// + /// sushi.at, 19/07/2021. + /// + /// The purchase aircraft model. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task SearchAircraftInCountryAsync(AircraftSearchInCountry body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task PurchaseAircraftAsync(PurchaseAircraft body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft/searchInCountry"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft/purchase"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + 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 @@ -1038,13 +1201,13 @@ public async System.Threading.Tasks.Task SearchA 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_).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); @@ -1053,7 +1216,7 @@ public async System.Threading.Tasks.Task SearchA } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -1070,45 +1233,56 @@ public async System.Threading.Tasks.Task SearchA client_.Dispose(); } } - - /// Sell aircraft back to system. - /// The registry of the aircraft to sell. + + /// + /// Purchase new aircraft. + /// + /// + /// sushi.at, 14/02/2022. + /// + /// The purchase new aircraft model. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task SellAircraftToSystemAsync(string registry) + public virtual System.Threading.Tasks.Task PurchaseNewAircraftAsync(PurchaseNewAircraft body) { - return SellAircraftToSystemAsync(registry, System.Threading.CancellationToken.None); + return PurchaseNewAircraftAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Sell aircraft back to system. - /// The registry of the aircraft to sell. + /// + /// Purchase new aircraft. + /// + /// + /// sushi.at, 14/02/2022. + /// + /// The purchase new aircraft model. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task SellAircraftToSystemAsync(string registry, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task PurchaseNewAircraftAsync(PurchaseNewAircraft body, System.Threading.CancellationToken cancellationToken) { - if (registry == null) - throw new System.ArgumentNullException("registry"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft/sellToSystem/{registry}"); - urlBuilder_.Replace("{registry}", System.Uri.EscapeDataString(ConvertToString(registry, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft/purchaseNew"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); + 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 @@ -1119,13 +1293,13 @@ public async System.Threading.Tasks.Task SellAircraftToSystem 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_).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); @@ -1134,7 +1308,7 @@ public async System.Threading.Tasks.Task SellAircraftToSystem } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -1151,43 +1325,54 @@ public async System.Threading.Tasks.Task SellAircraftToSystem client_.Dispose(); } } - - /// Updates the specified aircraft (user editable properties only) - /// The update aircraft. + + /// + /// Searches for aircraft around a given airport. + /// + /// + /// sushi.at, 24/02/2022. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task UpdateAircraftAsync(UpdateAircraft body) + public virtual System.Threading.Tasks.Task SearchAircraftAroundAirportAsync(AircraftSearchAroundAirport body) { - return UpdateAircraftAsync(body, System.Threading.CancellationToken.None); + return SearchAircraftAroundAirportAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Updates the specified aircraft (user editable properties only) - /// The update aircraft. + /// + /// Searches for aircraft around a given airport. + /// + /// + /// sushi.at, 24/02/2022. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateAircraftAsync(UpdateAircraft body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task SearchAircraftAroundAirportAsync(AircraftSearchAroundAirport body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft/searchAroundAirport"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.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 @@ -1198,13 +1383,13 @@ public async System.Threading.Tasks.Task UpdateAircraftAsync( 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_).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); @@ -1213,7 +1398,7 @@ public async System.Threading.Tasks.Task UpdateAircraftAsync( } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -1230,43 +1415,56 @@ public async System.Threading.Tasks.Task UpdateAircraftAsync( client_.Dispose(); } } - - /// Adds a new aircraft type. - /// The new aircraft type to add. + + /// + /// Searches for aircraft matching the criteria in the specified country. + /// + /// + /// sushi.at, 27/07/2021. + /// + /// The search. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task AddAircraftTypeAsync(AircraftType body) + public virtual System.Threading.Tasks.Task SearchAircraftInCountryAsync(AircraftSearchInCountry body) { - return AddAircraftTypeAsync(body, System.Threading.CancellationToken.None); + return SearchAircraftInCountryAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Adds a new aircraft type. - /// The new aircraft type to add. + /// + /// Searches for aircraft matching the criteria in the specified country. + /// + /// + /// sushi.at, 27/07/2021. + /// + /// The search. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task AddAircraftTypeAsync(AircraftType body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task SearchAircraftInCountryAsync(AircraftSearchInCountry body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft/searchInCountry"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + 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 @@ -1277,13 +1475,13 @@ public async System.Threading.Tasks.Task AddAircraftTypeAsync 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_).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); @@ -1292,7 +1490,7 @@ public async System.Threading.Tasks.Task AddAircraftTypeAsync } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -1309,38 +1507,57 @@ public async System.Threading.Tasks.Task AddAircraftTypeAsync client_.Dispose(); } } - - /// Gets all enabled and current aircraft types. + + /// + /// Sell aircraft back to system. + /// + /// + /// sushi.at, 23/12/2021. + /// + /// The registry of the aircraft to sell. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAircraftTypesAsync() + public virtual System.Threading.Tasks.Task SellAircraftToSystemAsync(string registry) { - return GetAircraftTypesAsync(System.Threading.CancellationToken.None); + return SellAircraftToSystemAsync(registry, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets all enabled and current aircraft types. + /// + /// Sell aircraft back to system. + /// + /// + /// sushi.at, 23/12/2021. + /// + /// The registry of the aircraft to sell. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAircraftTypesAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task SellAircraftToSystemAsync(string registry, System.Threading.CancellationToken cancellationToken) { + if (registry == null) + throw new System.ArgumentNullException("registry"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft/sellToSystem/{registry}"); + urlBuilder_.Replace("{registry}", System.Uri.EscapeDataString(ConvertToString(registry, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); + 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 @@ -1351,13 +1568,13 @@ public async System.Threading.Tasks.Task Get 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_).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); @@ -1366,7 +1583,7 @@ public async System.Threading.Tasks.Task Get } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -1383,43 +1600,56 @@ public async System.Threading.Tasks.Task Get client_.Dispose(); } } - - /// Updates an existing aircraft type. - /// The aircraft type to update. + + /// + /// Updates the specified aircraft (user editable properties only) + /// + /// + /// sushi.at, 17/09/2021. + /// + /// The update aircraft. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task UpdateAircraftTypeAsync(AircraftType body) + public virtual System.Threading.Tasks.Task UpdateAircraftAsync(UpdateAircraft body) { - return UpdateAircraftTypeAsync(body, System.Threading.CancellationToken.None); + return UpdateAircraftAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Updates an existing aircraft type. - /// The aircraft type to update. + /// + /// Updates the specified aircraft (user editable properties only) + /// + /// + /// sushi.at, 17/09/2021. + /// + /// The update aircraft. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateAircraftTypeAsync(AircraftType body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateAircraftAsync(UpdateAircraft body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Aircraft"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; request_.Method = new System.Net.Http.HttpMethod("PUT"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + PrepareRequest(client_, request_, url_); - + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try @@ -1430,13 +1660,13 @@ public async System.Threading.Tasks.Task UpdateAircraftTypeAs 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_).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); @@ -1445,7 +1675,7 @@ public async System.Threading.Tasks.Task UpdateAircraftTypeAs } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -1462,44 +1692,63 @@ public async System.Threading.Tasks.Task UpdateAircraftTypeAs client_.Dispose(); } } - - /// Deletes the specified aircraft type. - /// Identifier for the type. + + /// + /// Adds a new aircraft type. + /// + /// + /// sushi.at, 02/06/2021. + /// + /// The ID of the aircraft type this one is an update for (auto adjusts next version and variants). + /// The new aircraft type to add. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task DeleteAircraftTypeAsync(System.Guid typeID) + public virtual System.Threading.Tasks.Task AddAircraftTypeAsync(System.Guid? upgradeForType, AircraftType body) { - return DeleteAircraftTypeAsync(typeID, System.Threading.CancellationToken.None); + return AddAircraftTypeAsync(upgradeForType, body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Deletes the specified aircraft type. - /// Identifier for the type. + /// + /// Adds a new aircraft type. + /// + /// + /// sushi.at, 02/06/2021. + /// + /// The ID of the aircraft type this one is an update for (auto adjusts next version and variants). + /// The new aircraft type to add. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteAircraftTypeAsync(System.Guid typeID, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task AddAircraftTypeAsync(System.Guid? upgradeForType, AircraftType body, System.Threading.CancellationToken cancellationToken) { - if (typeID == null) - throw new System.ArgumentNullException("typeID"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/{typeID}"); - urlBuilder_.Replace("{typeID}", System.Uri.EscapeDataString(ConvertToString(typeID, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType?"); + if (upgradeForType != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("upgradeForType") + "=").Append(System.Uri.EscapeDataString(ConvertToString(upgradeForType, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + urlBuilder_.Length--; + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); + 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 @@ -1510,13 +1759,13 @@ public async System.Threading.Tasks.Task DeleteAircraftTypeAs 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_).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); @@ -1525,7 +1774,7 @@ public async System.Threading.Tasks.Task DeleteAircraftTypeAs } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -1542,45 +1791,50 @@ public async System.Threading.Tasks.Task DeleteAircraftTypeAs client_.Dispose(); } } - - /// Disables the specified aircraft type. - /// Identifier for the type. + + /// + /// Gets all enabled and current aircraft types. + /// + /// + /// sushi.at, 02/06/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task DisableAircraftTypeAsync(System.Guid typeID) + public virtual System.Threading.Tasks.Task GetAircraftTypesAsync() { - return DisableAircraftTypeAsync(typeID, System.Threading.CancellationToken.None); + return GetAircraftTypesAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Disables the specified aircraft type. - /// Identifier for the type. + /// + /// Gets all enabled and current aircraft types. + /// + /// + /// sushi.at, 02/06/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task DisableAircraftTypeAsync(System.Guid typeID, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAircraftTypesAsync(System.Threading.CancellationToken cancellationToken) { - if (typeID == null) - throw new System.ArgumentNullException("typeID"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/disable/{typeID}"); - urlBuilder_.Replace("{typeID}", System.Uri.EscapeDataString(ConvertToString(typeID, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); - request_.Method = new System.Net.Http.HttpMethod("PUT"); + 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 @@ -1591,13 +1845,13 @@ public async System.Threading.Tasks.Task DisableAircraftTypeA 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_).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); @@ -1606,7 +1860,7 @@ public async System.Threading.Tasks.Task DisableAircraftTypeA } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -1623,45 +1877,56 @@ public async System.Threading.Tasks.Task DisableAircraftTypeA client_.Dispose(); } } - - /// Disables the specified aircraft type's detailed checks (only to be used on patch days until a new aircraft type version can be created!). - /// Identifier for the type. + + /// + /// Updates an existing aircraft type. + /// + /// + /// sushi.at, 11/06/2021. + /// + /// The aircraft type to update. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task DisableAircraftTypeDetailedChecksAsync(System.Guid typeID) + public virtual System.Threading.Tasks.Task UpdateAircraftTypeAsync(AircraftType body) { - return DisableAircraftTypeDetailedChecksAsync(typeID, System.Threading.CancellationToken.None); + return UpdateAircraftTypeAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Disables the specified aircraft type's detailed checks (only to be used on patch days until a new aircraft type version can be created!). - /// Identifier for the type. + /// + /// Updates an existing aircraft type. + /// + /// + /// sushi.at, 11/06/2021. + /// + /// The aircraft type to update. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task DisableAircraftTypeDetailedChecksAsync(System.Guid typeID, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateAircraftTypeAsync(AircraftType body, System.Threading.CancellationToken cancellationToken) { - if (typeID == null) - throw new System.ArgumentNullException("typeID"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/disableDetailedChecks/{typeID}"); - urlBuilder_.Replace("{typeID}", System.Uri.EscapeDataString(ConvertToString(typeID, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; request_.Method = new System.Net.Http.HttpMethod("PUT"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + PrepareRequest(client_, request_, url_); - + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try @@ -1672,13 +1937,13 @@ public async System.Threading.Tasks.Task DisableAircraftTypeD 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_).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); @@ -1687,7 +1952,7 @@ public async System.Threading.Tasks.Task DisableAircraftTypeD } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -1704,45 +1969,56 @@ public async System.Threading.Tasks.Task DisableAircraftTypeD client_.Dispose(); } } - - /// Enables the specified aircraft type. + + /// + /// Deletes the specified aircraft type. + /// + /// + /// sushi.at, 11/06/2021. + /// /// Identifier for the type. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task EnableAircraftTypeAsync(System.Guid typeID) + public virtual System.Threading.Tasks.Task DeleteAircraftTypeAsync(System.Guid typeID) { - return EnableAircraftTypeAsync(typeID, System.Threading.CancellationToken.None); + return DeleteAircraftTypeAsync(typeID, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Enables the specified aircraft type. + /// + /// Deletes the specified aircraft type. + /// + /// + /// sushi.at, 11/06/2021. + /// /// Identifier for the type. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task EnableAircraftTypeAsync(System.Guid typeID, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task DeleteAircraftTypeAsync(System.Guid typeID, System.Threading.CancellationToken cancellationToken) { if (typeID == null) throw new System.ArgumentNullException("typeID"); - + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/enable/{typeID}"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/{typeID}"); urlBuilder_.Replace("{typeID}", System.Uri.EscapeDataString(ConvertToString(typeID, System.Globalization.CultureInfo.InvariantCulture))); - + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); - request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Method = new System.Net.Http.HttpMethod("DELETE"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + PrepareRequest(client_, request_, url_); - + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try @@ -1753,13 +2029,13 @@ public async System.Threading.Tasks.Task EnableAircraftTypeAs 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_).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); @@ -1768,7 +2044,7 @@ public async System.Threading.Tasks.Task EnableAircraftTypeAs } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -1785,30 +2061,40 @@ public async System.Threading.Tasks.Task EnableAircraftTypeAs client_.Dispose(); } } - - /// Enables the specified aircraft type's detailed checks (only to be used on patch days until a new aircraft type version can be created!). + + /// + /// Disables the specified aircraft type. + /// + /// + /// sushi.at, 09/06/2021. + /// /// Identifier for the type. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task EnableAircraftTypeDetailedChecksAsync(System.Guid typeID) + public virtual System.Threading.Tasks.Task DisableAircraftTypeAsync(System.Guid typeID) { - return EnableAircraftTypeDetailedChecksAsync(typeID, System.Threading.CancellationToken.None); + return DisableAircraftTypeAsync(typeID, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Enables the specified aircraft type's detailed checks (only to be used on patch days until a new aircraft type version can be created!). + /// + /// Disables the specified aircraft type. + /// + /// + /// sushi.at, 09/06/2021. + /// /// Identifier for the type. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task EnableAircraftTypeDetailedChecksAsync(System.Guid typeID, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task DisableAircraftTypeAsync(System.Guid typeID, System.Threading.CancellationToken cancellationToken) { if (typeID == null) throw new System.ArgumentNullException("typeID"); - + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/enableDetailedChecks/{typeID}"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/disable/{typeID}"); urlBuilder_.Replace("{typeID}", System.Uri.EscapeDataString(ConvertToString(typeID, System.Globalization.CultureInfo.InvariantCulture))); - + var client_ = _httpClient; var disposeClient_ = false; try @@ -1818,12 +2104,14 @@ public async System.Threading.Tasks.Task EnableAircraftTypeDe request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); request_.Method = new System.Net.Http.HttpMethod("PUT"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + PrepareRequest(client_, request_, url_); - + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try @@ -1834,13 +2122,13 @@ public async System.Threading.Tasks.Task EnableAircraftTypeDe 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_).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); @@ -1849,7 +2137,7 @@ public async System.Threading.Tasks.Task EnableAircraftTypeDe } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -1866,38 +2154,57 @@ public async System.Threading.Tasks.Task EnableAircraftTypeDe client_.Dispose(); } } - - /// Get the list aircraft manufacturers. + + /// + /// Disables the specified aircraft type's detailed checks (only to be used on patch days until a new aircraft type version can be created!). + /// + /// + /// sushi.at, 09/06/2021. + /// + /// Identifier for the type. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAircraftManufacturersAsync() + public virtual System.Threading.Tasks.Task DisableAircraftTypeDetailedChecksAsync(System.Guid typeID) { - return GetAircraftManufacturersAsync(System.Threading.CancellationToken.None); + return DisableAircraftTypeDetailedChecksAsync(typeID, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get the list aircraft manufacturers. + /// + /// Disables the specified aircraft type's detailed checks (only to be used on patch days until a new aircraft type version can be created!). + /// + /// + /// sushi.at, 09/06/2021. + /// + /// Identifier for the type. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAircraftManufacturersAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task DisableAircraftTypeDetailedChecksAsync(System.Guid typeID, System.Threading.CancellationToken cancellationToken) { + if (typeID == null) + throw new System.ArgumentNullException("typeID"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/manufacturers"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/disableDetailedChecks/{typeID}"); + urlBuilder_.Replace("{typeID}", System.Uri.EscapeDataString(ConvertToString(typeID, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); + request_.Method = new System.Net.Http.HttpMethod("PUT"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + PrepareRequest(client_, request_, url_); - + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try @@ -1908,13 +2215,13 @@ public async System.Threading.Tasks.Task(response_, headers_).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); @@ -1923,7 +2230,7 @@ public async System.Threading.Tasks.TaskGet image for the specified aircraft type. + + /// + /// Enables the specified aircraft type. + /// + /// + /// sushi.at, 09/06/2021. + /// /// Identifier for the type. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAircraftTypeImageAsync(System.Guid typeID) + public virtual System.Threading.Tasks.Task EnableAircraftTypeAsync(System.Guid typeID) { - return GetAircraftTypeImageAsync(typeID, System.Threading.CancellationToken.None); + return EnableAircraftTypeAsync(typeID, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get image for the specified aircraft type. + /// + /// Enables the specified aircraft type. + /// + /// + /// sushi.at, 09/06/2021. + /// /// Identifier for the type. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAircraftTypeImageAsync(System.Guid typeID, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task EnableAircraftTypeAsync(System.Guid typeID, System.Threading.CancellationToken cancellationToken) { if (typeID == null) throw new System.ArgumentNullException("typeID"); - + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/image/{typeID}"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/enable/{typeID}"); urlBuilder_.Replace("{typeID}", System.Uri.EscapeDataString(ConvertToString(typeID, System.Globalization.CultureInfo.InvariantCulture))); - + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); + request_.Method = new System.Net.Http.HttpMethod("PUT"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + PrepareRequest(client_, request_, url_); - + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try @@ -1988,13 +2308,13 @@ public async System.Threading.Tasks.Task GetAircraftTypeIm 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_).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); @@ -2003,7 +2323,7 @@ public async System.Threading.Tasks.Task GetAircraftTypeIm } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -2020,58 +2340,57 @@ public async System.Threading.Tasks.Task GetAircraftTypeIm client_.Dispose(); } } - - /// Update the image of the specified aircraft type. - /// Identifier for the aircraft type. + + /// + /// Enables the specified aircraft type's detailed checks (only to be used on patch days until a new aircraft type version can be created!). + /// + /// + /// sushi.at, 09/06/2021. + /// + /// Identifier for the type. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task UpdateAircraftTypeImageAsync(System.Guid typeID, FileParameter fileUpload) + public virtual System.Threading.Tasks.Task EnableAircraftTypeDetailedChecksAsync(System.Guid typeID) { - return UpdateAircraftTypeImageAsync(typeID, fileUpload, System.Threading.CancellationToken.None); + return EnableAircraftTypeDetailedChecksAsync(typeID, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update the image of the specified aircraft type. - /// Identifier for the aircraft type. + /// + /// Enables the specified aircraft type's detailed checks (only to be used on patch days until a new aircraft type version can be created!). + /// + /// + /// sushi.at, 09/06/2021. + /// + /// Identifier for the type. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateAircraftTypeImageAsync(System.Guid typeID, FileParameter fileUpload, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task EnableAircraftTypeDetailedChecksAsync(System.Guid typeID, System.Threading.CancellationToken cancellationToken) { if (typeID == null) throw new System.ArgumentNullException("typeID"); - + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/image/{typeID}"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/enableDetailedChecks/{typeID}"); urlBuilder_.Replace("{typeID}", System.Uri.EscapeDataString(ConvertToString(typeID, System.Globalization.CultureInfo.InvariantCulture))); - + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var boundary_ = System.Guid.NewGuid().ToString(); - var content_ = new System.Net.Http.MultipartFormDataContent(boundary_); - content_.Headers.Remove("Content-Type"); - content_.Headers.TryAddWithoutValidation("Content-Type", "multipart/form-data; boundary=" + boundary_); - if (fileUpload == null) - throw new System.ArgumentNullException("fileUpload"); - else - { - var content_fileUpload_ = new System.Net.Http.StreamContent(fileUpload.Data); - if (!string.IsNullOrEmpty(fileUpload.ContentType)) - content_fileUpload_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse(fileUpload.ContentType); - content_.Add(content_fileUpload_, "fileUpload", fileUpload.FileName ?? "fileUpload"); - } - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); + request_.Method = new System.Net.Http.HttpMethod("PUT"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + PrepareRequest(client_, request_, url_); - + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try @@ -2082,13 +2401,13 @@ public async System.Threading.Tasks.Task UpdateAircraftTypeIm 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_).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); @@ -2097,7 +2416,7 @@ public async System.Threading.Tasks.Task UpdateAircraftTypeIm } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -2114,24 +2433,34 @@ public async System.Threading.Tasks.Task UpdateAircraftTypeIm client_.Dispose(); } } - - /// Get available aircraft upgrades. + + /// + /// Get the list aircraft manufacturers. + /// + /// + /// sushi.at, 20/02/2022. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAircraftTypeUpgradesAsync() + public virtual System.Threading.Tasks.Task GetAircraftManufacturersAsync() { - return GetAircraftTypeUpgradesAsync(System.Threading.CancellationToken.None); + return GetAircraftManufacturersAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get available aircraft upgrades. + /// + /// Get the list aircraft manufacturers. + /// + /// + /// sushi.at, 20/02/2022. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAircraftTypeUpgradesAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAircraftManufacturersAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/upgrades"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/manufacturers"); + var client_ = _httpClient; var disposeClient_ = false; try @@ -2140,12 +2469,14 @@ public async System.Threading.Tasks.Task(response_, headers_).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); @@ -2171,7 +2502,7 @@ public async System.Threading.Tasks.TaskGets all aircraft types (including disabled and previous versions). + + /// + /// Get image for the specified aircraft type. + /// + /// + /// sushi.at, 19/02/2022. + /// + /// Identifier for the type. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAllAircraftTypesAsync() + public virtual System.Threading.Tasks.Task GetAircraftTypeImageAsync(System.Guid typeID) { - return GetAllAircraftTypesAsync(System.Threading.CancellationToken.None); + return GetAircraftTypeImageAsync(typeID, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets all aircraft types (including disabled and previous versions). + /// + /// Get image for the specified aircraft type. + /// + /// + /// sushi.at, 19/02/2022. + /// + /// Identifier for the type. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAllAircraftTypesAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAircraftTypeImageAsync(System.Guid typeID, System.Threading.CancellationToken cancellationToken) { + if (typeID == null) + throw new System.ArgumentNullException("typeID"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/all"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/image/{typeID}"); + urlBuilder_.Replace("{typeID}", System.Uri.EscapeDataString(ConvertToString(typeID, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try @@ -2214,12 +2561,14 @@ public async System.Threading.Tasks.Task Get { 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 @@ -2230,13 +2579,13 @@ public async System.Threading.Tasks.Task Get 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_).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); @@ -2245,7 +2594,7 @@ public async System.Threading.Tasks.Task Get } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -2262,46 +2611,71 @@ public async System.Threading.Tasks.Task Get client_.Dispose(); } } - - /// Gets all aircraft types for the specified simulator (including disabled and previous). - /// versions). - /// The simulator. 0 = MSFS, 1 = XPlane11 + + /// + /// Update the image of the specified aircraft type. + /// + /// + /// sushi.at, 19/02/2022. + /// + /// Identifier for the aircraft type. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetSimulatorAircraftTypesAsync(Simulator simulator) + public virtual System.Threading.Tasks.Task UpdateAircraftTypeImageAsync(System.Guid typeID, FileParameter fileUpload) { - return GetSimulatorAircraftTypesAsync(simulator, System.Threading.CancellationToken.None); + return UpdateAircraftTypeImageAsync(typeID, fileUpload, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets all aircraft types for the specified simulator (including disabled and previous). - /// versions). - /// The simulator. 0 = MSFS, 1 = XPlane11 + /// + /// Update the image of the specified aircraft type. + /// + /// + /// sushi.at, 19/02/2022. + /// + /// Identifier for the aircraft type. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetSimulatorAircraftTypesAsync(Simulator simulator, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateAircraftTypeImageAsync(System.Guid typeID, FileParameter fileUpload, System.Threading.CancellationToken cancellationToken) { - if (simulator == null) - throw new System.ArgumentNullException("simulator"); - + if (typeID == null) + throw new System.ArgumentNullException("typeID"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/simulator/{simulator}"); - urlBuilder_.Replace("{simulator}", System.Uri.EscapeDataString(ConvertToString(simulator, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/image/{typeID}"); + urlBuilder_.Replace("{typeID}", System.Uri.EscapeDataString(ConvertToString(typeID, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + var boundary_ = System.Guid.NewGuid().ToString(); + var content_ = new System.Net.Http.MultipartFormDataContent(boundary_); + content_.Headers.Remove("Content-Type"); + content_.Headers.TryAddWithoutValidation("Content-Type", "multipart/form-data; boundary=" + boundary_); + + if (fileUpload == null) + throw new System.ArgumentNullException("fileUpload"); + else + { + var content_fileUpload_ = new System.Net.Http.StreamContent(fileUpload.Data); + if (!string.IsNullOrEmpty(fileUpload.ContentType)) + content_fileUpload_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse(fileUpload.ContentType); + content_.Add(content_fileUpload_, "fileUpload", fileUpload.FileName ?? "fileUpload"); + } + 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 @@ -2312,13 +2686,13 @@ public async System.Threading.Tasks.Task Get 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_).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); @@ -2327,7 +2701,7 @@ public async System.Threading.Tasks.Task Get } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -2344,30 +2718,34 @@ public async System.Threading.Tasks.Task Get client_.Dispose(); } } - - /// Gets the variants of this type (can be called with base or one of the variant sub-types) - /// Identifier for the type. + + /// + /// Get available aircraft upgrades. + /// + /// + /// sushi.at, 29/11/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetVariantsOfTypeAsync(System.Guid typeID) + public virtual System.Threading.Tasks.Task GetAircraftTypeUpgradesAsync() { - return GetVariantsOfTypeAsync(typeID, System.Threading.CancellationToken.None); + return GetAircraftTypeUpgradesAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets the variants of this type (can be called with base or one of the variant sub-types) - /// Identifier for the type. + /// + /// Get available aircraft upgrades. + /// + /// + /// sushi.at, 29/11/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetVariantsOfTypeAsync(System.Guid typeID, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAircraftTypeUpgradesAsync(System.Threading.CancellationToken cancellationToken) { - if (typeID == null) - throw new System.ArgumentNullException("typeID"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/variants/{typeID}"); - urlBuilder_.Replace("{typeID}", System.Uri.EscapeDataString(ConvertToString(typeID, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/upgrades"); + var client_ = _httpClient; var disposeClient_ = false; try @@ -2376,12 +2754,14 @@ public async System.Threading.Tasks.Task Get { 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 @@ -2392,13 +2772,13 @@ public async System.Threading.Tasks.Task Get 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_).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); @@ -2407,7 +2787,7 @@ public async System.Threading.Tasks.Task Get } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -2424,43 +2804,50 @@ public async System.Threading.Tasks.Task Get client_.Dispose(); } } - - /// Performs the specified aircraft type upgrade. - /// The upgrade to perform (from/to type). + + /// + /// Gets all aircraft types (including disabled and previous versions). + /// + /// + /// sushi.at, 02/06/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task UpgradeAircraftTypeAsync(AircraftTypeUpgrade body) + public virtual System.Threading.Tasks.Task GetAllAircraftTypesAsync() { - return UpgradeAircraftTypeAsync(body, System.Threading.CancellationToken.None); + return GetAllAircraftTypesAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Performs the specified aircraft type upgrade. - /// The upgrade to perform (from/to type). + /// + /// Gets all aircraft types (including disabled and previous versions). + /// + /// + /// sushi.at, 02/06/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task UpgradeAircraftTypeAsync(AircraftTypeUpgrade body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAllAircraftTypesAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/upgrade"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/all"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); - 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("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 @@ -2471,13 +2858,13 @@ public async System.Threading.Tasks.Task UpgradeAircraftTypeA 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_).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); @@ -2486,7 +2873,7 @@ public async System.Threading.Tasks.Task UpgradeAircraftTypeA } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -2503,24 +2890,42 @@ public async System.Threading.Tasks.Task UpgradeAircraftTypeA client_.Dispose(); } } - - /// Get user airline. + + /// + /// Gets all aircraft types for the specified simulator (including disabled and previous). + ///
versions). + ///
+ /// + /// sushi.at, 29/11/2021. + /// + /// The simulator. 0 = MSFS, 1 = XPlane11 /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAirlineAsync() + public virtual System.Threading.Tasks.Task GetSimulatorAircraftTypesAsync(Simulator simulator) { - return GetAirlineAsync(System.Threading.CancellationToken.None); + return GetSimulatorAircraftTypesAsync(simulator, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get user airline. + /// + /// Gets all aircraft types for the specified simulator (including disabled and previous). + ///
versions). + ///
+ /// + /// sushi.at, 29/11/2021. + /// + /// The simulator. 0 = MSFS, 1 = XPlane11 /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAirlineAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetSimulatorAircraftTypesAsync(Simulator simulator, System.Threading.CancellationToken cancellationToken) { + if (simulator == null) + throw new System.ArgumentNullException("simulator"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airline"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/simulator/{simulator}"); + urlBuilder_.Replace("{simulator}", System.Uri.EscapeDataString(ConvertToString(simulator, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try @@ -2529,12 +2934,14 @@ public async System.Threading.Tasks.Task GetAirlineAsync { 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 @@ -2545,13 +2952,13 @@ public async System.Threading.Tasks.Task GetAirlineAsync 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_).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); @@ -2560,7 +2967,7 @@ public async System.Threading.Tasks.Task GetAirlineAsync } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -2577,24 +2984,40 @@ public async System.Threading.Tasks.Task GetAirlineAsync client_.Dispose(); } } - - /// Gets the airline permissions for the current user. + + /// + /// Gets the variants of this type (can be called with base or one of the variant sub-types) + /// + /// + /// sushi.at, 23/11/2021. + /// + /// Identifier for the type. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAirlinePermissionsAsync() + public virtual System.Threading.Tasks.Task GetVariantsOfTypeAsync(System.Guid typeID) { - return GetAirlinePermissionsAsync(System.Threading.CancellationToken.None); + return GetVariantsOfTypeAsync(typeID, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets the airline permissions for the current user. + /// + /// Gets the variants of this type (can be called with base or one of the variant sub-types) + /// + /// + /// sushi.at, 23/11/2021. + /// + /// Identifier for the type. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAirlinePermissionsAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetVariantsOfTypeAsync(System.Guid typeID, System.Threading.CancellationToken cancellationToken) { + if (typeID == null) + throw new System.ArgumentNullException("typeID"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airline/permissions"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/variants/{typeID}"); + urlBuilder_.Replace("{typeID}", System.Uri.EscapeDataString(ConvertToString(typeID, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try @@ -2603,12 +3026,14 @@ public async System.Threading.Tasks.Task GetAi { 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 @@ -2619,13 +3044,13 @@ public async System.Threading.Tasks.Task GetAi 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_).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); @@ -2634,7 +3059,7 @@ public async System.Threading.Tasks.Task GetAi } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -2651,38 +3076,56 @@ public async System.Threading.Tasks.Task GetAi client_.Dispose(); } } - - /// Gets all airline permissions (for all members, requires ChangePermission) + + /// + /// Performs the specified aircraft type upgrade. + /// + /// + /// sushi.at, 29/11/2021. + /// + /// The upgrade to perform (from/to type). /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAllAirlinePermissionsAsync() + public virtual System.Threading.Tasks.Task UpgradeAircraftTypeAsync(AircraftTypeUpgrade body) { - return GetAllAirlinePermissionsAsync(System.Threading.CancellationToken.None); + return UpgradeAircraftTypeAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets all airline permissions (for all members, requires ChangePermission) + /// + /// Performs the specified aircraft type upgrade. + /// + /// + /// sushi.at, 29/11/2021. + /// + /// The upgrade to perform (from/to type). /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAllAirlinePermissionsAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpgradeAircraftTypeAsync(AircraftTypeUpgrade body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airline/permissions/all"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/AircraftType/upgrade"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + 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 @@ -2693,13 +3136,13 @@ public async System.Threading.Tasks.Task(response_, headers_).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); @@ -2708,7 +3151,7 @@ public async System.Threading.Tasks.TaskCreates a new airport client package. + + /// + /// Get user airline. + /// + /// + /// sushi.at, 01/11/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task CreateAirportClientPackageAsync() + public virtual System.Threading.Tasks.Task GetAirlineAsync() { - return CreateAirportClientPackageAsync(System.Threading.CancellationToken.None); + return GetAirlineAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Creates a new airport client package. + /// + /// Get user airline. + /// + /// + /// sushi.at, 01/11/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task CreateAirportClientPackageAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAirlineAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airport/clientPackage"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airline"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); - request_.Method = new System.Net.Http.HttpMethod("POST"); + 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 @@ -2768,13 +3222,13 @@ public async System.Threading.Tasks.Task CreateAirportClientP 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_).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); @@ -2783,7 +3237,7 @@ public async System.Threading.Tasks.Task CreateAirportClientP } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -2800,24 +3254,34 @@ public async System.Threading.Tasks.Task CreateAirportClientP client_.Dispose(); } } - - /// Gets the latest airport client package. + + /// + /// Gets the airline permissions for the current user. + /// + /// + /// sushi.at, 26/10/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAirportClientPackageAsync() + public virtual System.Threading.Tasks.Task GetAirlinePermissionsAsync() { - return GetAirportClientPackageAsync(System.Threading.CancellationToken.None); + return GetAirlinePermissionsAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets the latest airport client package. + /// + /// Gets the airline permissions for the current user. + /// + /// + /// sushi.at, 26/10/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAirportClientPackageAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAirlinePermissionsAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airport/clientPackage"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airline/permissions"); + var client_ = _httpClient; var disposeClient_ = false; try @@ -2826,12 +3290,14 @@ public async System.Threading.Tasks.Task GetAir { 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 @@ -2842,13 +3308,13 @@ public async System.Threading.Tasks.Task GetAir 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_).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); @@ -2857,7 +3323,7 @@ public async System.Threading.Tasks.Task GetAir } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -2874,30 +3340,34 @@ public async System.Threading.Tasks.Task GetAir client_.Dispose(); } } - - /// Gets one specific airport. - /// The ICAO identifier of the airport. + + /// + /// Gets all airline permissions (for all members, requires ChangePermission) + /// + /// + /// sushi.at, 26/10/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAirportAsync(string icao) + public virtual System.Threading.Tasks.Task GetAllAirlinePermissionsAsync() { - return GetAirportAsync(icao, System.Threading.CancellationToken.None); + return GetAllAirlinePermissionsAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets one specific airport. - /// The ICAO identifier of the airport. + /// + /// Gets all airline permissions (for all members, requires ChangePermission) + /// + /// + /// sushi.at, 26/10/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAirportAsync(string icao, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAllAirlinePermissionsAsync(System.Threading.CancellationToken cancellationToken) { - if (icao == null) - throw new System.ArgumentNullException("icao"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airport/{icao}"); - urlBuilder_.Replace("{icao}", System.Uri.EscapeDataString(ConvertToString(icao, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airline/permissions/all"); + var client_ = _httpClient; var disposeClient_ = false; try @@ -2906,12 +3376,14 @@ public async System.Threading.Tasks.Task GetAirportAsync(str { 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 @@ -2922,13 +3394,13 @@ public async System.Threading.Tasks.Task GetAirportAsync(str 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_).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); @@ -2937,7 +3409,7 @@ public async System.Threading.Tasks.Task GetAirportAsync(str } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -2954,38 +3426,51 @@ public async System.Threading.Tasks.Task GetAirportAsync(str client_.Dispose(); } } - - /// Gets the latest airport client package hash. + + /// + /// Creates a new airport client package. + /// + /// + /// sushi.at, 21/09/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAirportClientPackageHashAsync() + public virtual System.Threading.Tasks.Task CreateAirportClientPackageAsync() { - return GetAirportClientPackageHashAsync(System.Threading.CancellationToken.None); + return CreateAirportClientPackageAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets the latest airport client package hash. + /// + /// Creates a new airport client package. + /// + /// + /// sushi.at, 21/09/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAirportClientPackageHashAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task CreateAirportClientPackageAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airport/clientPackageHash"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airport/clientPackage"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); + 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 @@ -2996,13 +3481,13 @@ public async System.Threading.Tasks.Task GetAirportClientPack 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_).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); @@ -3011,7 +3496,7 @@ public async System.Threading.Tasks.Task GetAirportClientPack } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -3028,24 +3513,34 @@ public async System.Threading.Tasks.Task GetAirportClientPack client_.Dispose(); } } - - /// Gets all available airports (ICAO code only). + + /// + /// Gets the latest airport client package. + /// + /// + /// sushi.at, 21/09/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAirportsAsync() + public virtual System.Threading.Tasks.Task GetAirportClientPackageAsync() { - return GetAirportsAsync(System.Threading.CancellationToken.None); + return GetAirportClientPackageAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets all available airports (ICAO code only). + /// + /// Gets the latest airport client package. + /// + /// + /// sushi.at, 21/09/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAirportsAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAirportClientPackageAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airport"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airport/clientPackage"); + var client_ = _httpClient; var disposeClient_ = false; try @@ -3054,12 +3549,14 @@ public async System.Threading.Tasks.Task GetAirpor { 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 @@ -3070,13 +3567,13 @@ public async System.Threading.Tasks.Task GetAirpor 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_).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); @@ -3085,7 +3582,7 @@ public async System.Threading.Tasks.Task GetAirpor } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -3102,36 +3599,40 @@ public async System.Threading.Tasks.Task GetAirpor client_.Dispose(); } } - - /// Gets airports with the specified population status up to the specified max result count. - /// The status. 0 = NeedsHandling, 1 = Queued, 2 = Finished, 3 = Failed - /// (Optional) The maximum results (default 50). + + /// + /// Gets one specific airport. + /// + /// + /// sushi.at, 03/05/2021. + /// + /// The ICAO identifier of the airport. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAirportsWithPopulationStatusAsync(ProcessingStatus status, int maxResults) + public virtual System.Threading.Tasks.Task GetAirportAsync(string icao) { - return GetAirportsWithPopulationStatusAsync(status, maxResults, System.Threading.CancellationToken.None); + return GetAirportAsync(icao, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets airports with the specified population status up to the specified max result count. - /// The status. 0 = NeedsHandling, 1 = Queued, 2 = Finished, 3 = Failed - /// (Optional) The maximum results (default 50). + /// + /// Gets one specific airport. + /// + /// + /// sushi.at, 03/05/2021. + /// + /// The ICAO identifier of the airport. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAirportsWithPopulationStatusAsync(ProcessingStatus status, int maxResults, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAirportAsync(string icao, System.Threading.CancellationToken cancellationToken) { - if (status == null) - throw new System.ArgumentNullException("status"); - - if (maxResults == null) - throw new System.ArgumentNullException("maxResults"); - + if (icao == null) + throw new System.ArgumentNullException("icao"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airport/{status}/{maxResults}"); - urlBuilder_.Replace("{status}", System.Uri.EscapeDataString(ConvertToString(status, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{maxResults}", System.Uri.EscapeDataString(ConvertToString(maxResults, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airport/{icao}"); + urlBuilder_.Replace("{icao}", System.Uri.EscapeDataString(ConvertToString(icao, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try @@ -3140,12 +3641,14 @@ public async System.Threading.Tasks.Task GetAirpo { 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 @@ -3156,13 +3659,13 @@ public async System.Threading.Tasks.Task GetAirpo 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_).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); @@ -3171,7 +3674,7 @@ public async System.Threading.Tasks.Task GetAirpo } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -3188,30 +3691,34 @@ public async System.Threading.Tasks.Task GetAirpo client_.Dispose(); } } - - /// Searches for airports using ICAO, name or city and return the first 50 results. - /// The search string. + + /// + /// Gets the latest airport client package hash. + /// + /// + /// sushi.at, 21/09/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task SearchAirportAsync(string searchString) + public virtual System.Threading.Tasks.Task GetAirportClientPackageHashAsync() { - return SearchAirportAsync(searchString, System.Threading.CancellationToken.None); + return GetAirportClientPackageHashAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Searches for airports using ICAO, name or city and return the first 50 results. - /// The search string. + /// + /// Gets the latest airport client package hash. + /// + /// + /// sushi.at, 21/09/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task SearchAirportAsync(string searchString, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAirportClientPackageHashAsync(System.Threading.CancellationToken cancellationToken) { - if (searchString == null) - throw new System.ArgumentNullException("searchString"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airport/search/{searchString}"); - urlBuilder_.Replace("{searchString}", System.Uri.EscapeDataString(ConvertToString(searchString, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airport/clientPackageHash"); + var client_ = _httpClient; var disposeClient_ = false; try @@ -3220,12 +3727,14 @@ public async System.Threading.Tasks.Task SearchAi { 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 @@ -3236,13 +3745,13 @@ public async System.Threading.Tasks.Task SearchAi 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_).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); @@ -3251,7 +3760,7 @@ public async System.Threading.Tasks.Task SearchAi } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -3268,24 +3777,34 @@ public async System.Threading.Tasks.Task SearchAi client_.Dispose(); } } - - /// Get the current OpenSky tokens. + + /// + /// Gets all available airports (ICAO code only). + /// + /// + /// sushi.at, 02/05/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetTokensAsync() + public virtual System.Threading.Tasks.Task GetAirportsAsync() { - return GetTokensAsync(System.Threading.CancellationToken.None); + return GetAirportsAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get the current OpenSky tokens. + /// + /// Gets all available airports (ICAO code only). + /// + /// + /// sushi.at, 02/05/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetTokensAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAirportsAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/tokens"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airport"); + var client_ = _httpClient; var disposeClient_ = false; try @@ -3294,12 +3813,14 @@ public async System.Threading.Tasks.Task GetTokensA { 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 @@ -3310,13 +3831,13 @@ public async System.Threading.Tasks.Task GetTokensA 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_).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); @@ -3325,7 +3846,7 @@ public async System.Threading.Tasks.Task GetTokensA } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -3342,43 +3863,62 @@ public async System.Threading.Tasks.Task GetTokensA client_.Dispose(); } } - - /// Change OpenSky user password. - /// The change password model. + + /// + /// Gets airports with the specified population status up to the specified max result count. + /// + /// + /// sushi.at, 05/07/2021. + /// + /// The status. 0 = NeedsHandling, 1 = Queued, 2 = Finished, 3 = Failed + /// (Optional) The maximum results (default 50). /// Success /// A server side error occurred. - public System.Threading.Tasks.Task ChangePasswordAsync(ChangePassword body) + public virtual System.Threading.Tasks.Task GetAirportsWithPopulationStatusAsync(ProcessingStatus status, int maxResults) { - return ChangePasswordAsync(body, System.Threading.CancellationToken.None); + return GetAirportsWithPopulationStatusAsync(status, maxResults, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Change OpenSky user password. - /// The change password model. + /// + /// Gets airports with the specified population status up to the specified max result count. + /// + /// + /// sushi.at, 05/07/2021. + /// + /// The status. 0 = NeedsHandling, 1 = Queued, 2 = Finished, 3 = Failed + /// (Optional) The maximum results (default 50). /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task ChangePasswordAsync(ChangePassword body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAirportsWithPopulationStatusAsync(ProcessingStatus status, int maxResults, System.Threading.CancellationToken cancellationToken) { + if (status == null) + throw new System.ArgumentNullException("status"); + + if (maxResults == null) + throw new System.ArgumentNullException("maxResults"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/changePassword"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airport/{status}/{maxResults}"); + urlBuilder_.Replace("{status}", System.Uri.EscapeDataString(ConvertToString(status, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{maxResults}", System.Uri.EscapeDataString(ConvertToString(maxResults, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); - 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("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 @@ -3389,13 +3929,13 @@ public async System.Threading.Tasks.Task ChangePasswordAsync( 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_).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); @@ -3404,7 +3944,7 @@ public async System.Threading.Tasks.Task ChangePasswordAsync( } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -3421,43 +3961,56 @@ public async System.Threading.Tasks.Task ChangePasswordAsync( client_.Dispose(); } } - - /// Forgot password request from OpenSky user. - /// The forgot password model. + + /// + /// Searches for airports using ICAO, name or city and return the first 50 results. + /// + /// + /// sushi.at, 21/09/2021. + /// + /// The search string. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task ForgotPasswordAsync(ForgotPassword body) + public virtual System.Threading.Tasks.Task SearchAirportAsync(string searchString) { - return ForgotPasswordAsync(body, System.Threading.CancellationToken.None); + return SearchAirportAsync(searchString, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Forgot password request from OpenSky user. - /// The forgot password model. + /// + /// Searches for airports using ICAO, name or city and return the first 50 results. + /// + /// + /// sushi.at, 21/09/2021. + /// + /// The search string. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task ForgotPasswordAsync(ForgotPassword body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task SearchAirportAsync(string searchString, System.Threading.CancellationToken cancellationToken) { + if (searchString == null) + throw new System.ArgumentNullException("searchString"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/forgotPassword"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Airport/search/{searchString}"); + urlBuilder_.Replace("{searchString}", System.Uri.EscapeDataString(ConvertToString(searchString, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); - 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("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 @@ -3468,13 +4021,13 @@ public async System.Threading.Tasks.Task ForgotPasswordAsync( 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_).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); @@ -3483,7 +4036,7 @@ public async System.Threading.Tasks.Task ForgotPasswordAsync( } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -3500,43 +4053,50 @@ public async System.Threading.Tasks.Task ForgotPasswordAsync( client_.Dispose(); } } - - /// Get a new application API access token. - /// The application token model. + + /// + /// Get the current OpenSky tokens. + /// + /// + /// sushi.at, 12/07/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task ApplicationTokenAsync(ApplicationToken body) + public virtual System.Threading.Tasks.Task GetTokensAsync() { - return ApplicationTokenAsync(body, System.Threading.CancellationToken.None); + return GetTokensAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a new application API access token. - /// The application token model. + /// + /// Get the current OpenSky tokens. + /// + /// + /// sushi.at, 12/07/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task ApplicationTokenAsync(ApplicationToken body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetTokensAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/applicationToken"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/tokens"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); - 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("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 @@ -3547,13 +4107,13 @@ public async System.Threading.Tasks.Task ApplicationTo 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_).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); @@ -3562,7 +4122,7 @@ public async System.Threading.Tasks.Task ApplicationTo } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -3579,38 +4139,56 @@ public async System.Threading.Tasks.Task ApplicationTo client_.Dispose(); } } - - /// Gets the roles of the current OpenSky user. + + /// + /// Change OpenSky user password. + /// + /// + /// sushi.at, 08/05/2021. + /// + /// The change password model. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetUserRolesAsync() + public virtual System.Threading.Tasks.Task ChangePasswordAsync(ChangePassword body) { - return GetUserRolesAsync(System.Threading.CancellationToken.None); + return ChangePasswordAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets the roles of the current OpenSky user. + /// + /// Change OpenSky user password. + /// + /// + /// sushi.at, 08/05/2021. + /// + /// The change password model. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetUserRolesAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task ChangePasswordAsync(ChangePassword body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/userRoles"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/changePassword"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + 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 @@ -3621,13 +4199,13 @@ public async System.Threading.Tasks.Task GetUserRo 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_).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); @@ -3636,7 +4214,7 @@ public async System.Threading.Tasks.Task GetUserRo } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -3653,43 +4231,56 @@ public async System.Threading.Tasks.Task GetUserRo client_.Dispose(); } } - - /// Login to OpenSky API. - /// The login model. + + /// + /// Forgot password request from OpenSky user. + /// + /// + /// sushi.at, 08/05/2021. + /// + /// The forgot password model. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task LoginAsync(Login body) + public virtual System.Threading.Tasks.Task ForgotPasswordAsync(ForgotPassword body) { - return LoginAsync(body, System.Threading.CancellationToken.None); + return ForgotPasswordAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Login to OpenSky API. - /// The login model. + /// + /// Forgot password request from OpenSky user. + /// + /// + /// sushi.at, 08/05/2021. + /// + /// The forgot password model. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task LoginAsync(Login body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task ForgotPasswordAsync(ForgotPassword body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/login"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/forgotPassword"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + 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 @@ -3700,13 +4291,13 @@ public async System.Threading.Tasks.Task LoginAsync(Lo 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_).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); @@ -3715,7 +4306,7 @@ public async System.Threading.Tasks.Task LoginAsync(Lo } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -3732,43 +4323,56 @@ public async System.Threading.Tasks.Task LoginAsync(Lo client_.Dispose(); } } - - /// Refresh OpenSky API JWT token using a single-use refresh token. - /// The refresh token request model. + + /// + /// Get a new application API access token. + /// + /// + /// sushi.at, 01/06/2021. + /// + /// The application token model. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task RefreshTokenAsync(RefreshToken body) + public virtual System.Threading.Tasks.Task ApplicationTokenAsync(ApplicationToken body) { - return RefreshTokenAsync(body, System.Threading.CancellationToken.None); + return ApplicationTokenAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Refresh OpenSky API JWT token using a single-use refresh token. - /// The refresh token request model. + /// + /// Get a new application API access token. + /// + /// + /// sushi.at, 01/06/2021. + /// + /// The application token model. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task RefreshTokenAsync(RefreshToken body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task ApplicationTokenAsync(ApplicationToken body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/refreshToken"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/applicationToken"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + 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 @@ -3779,13 +4383,13 @@ public async System.Threading.Tasks.Task Refres 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_).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); @@ -3794,7 +4398,7 @@ public async System.Threading.Tasks.Task Refres } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -3811,43 +4415,50 @@ public async System.Threading.Tasks.Task Refres client_.Dispose(); } } - - /// Register new OpenSky user. - /// The register user model. + + /// + /// Gets the roles of the current OpenSky user. + /// + /// + /// sushi.at, 04/06/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task RegisterAsync(RegisterUser body) + public virtual System.Threading.Tasks.Task GetUserRolesAsync() { - return RegisterAsync(body, System.Threading.CancellationToken.None); + return GetUserRolesAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Register new OpenSky user. - /// The register user model. + /// + /// Gets the roles of the current OpenSky user. + /// + /// + /// sushi.at, 04/06/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task RegisterAsync(RegisterUser body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetUserRolesAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/register"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/userRoles"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); - 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("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 @@ -3858,13 +4469,13 @@ public async System.Threading.Tasks.Task RegisterAsync(Regist 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_).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); @@ -3873,7 +4484,7 @@ public async System.Threading.Tasks.Task RegisterAsync(Regist } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -3890,43 +4501,56 @@ public async System.Threading.Tasks.Task RegisterAsync(Regist client_.Dispose(); } } - - /// Re-send the email validation. - /// The resend validation email model. + + /// + /// Login to OpenSky API. + /// + /// + /// sushi.at, 08/05/2021. + /// + /// The login model. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task ResendValidationEmailAsync(ResendValidationEmail body) + public virtual System.Threading.Tasks.Task LoginAsync(Login body) { - return ResendValidationEmailAsync(body, System.Threading.CancellationToken.None); + return LoginAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Re-send the email validation. - /// The resend validation email model. + /// + /// Login to OpenSky API. + /// + /// + /// sushi.at, 08/05/2021. + /// + /// The login model. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task ResendValidationEmailAsync(ResendValidationEmail body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task LoginAsync(Login body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/resendValidationEmail"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/login"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + 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 @@ -3937,13 +4561,13 @@ public async System.Threading.Tasks.Task ResendValidationEmai 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_).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); @@ -3952,7 +4576,7 @@ public async System.Threading.Tasks.Task ResendValidationEmai } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -3969,43 +4593,56 @@ public async System.Threading.Tasks.Task ResendValidationEmai client_.Dispose(); } } - - /// Reset OpenSky user password. - /// The reset password model. + + /// + /// Refresh OpenSky API JWT token using a single-use refresh token. + /// + /// + /// sushi.at, 30/05/2021. + /// + /// The refresh token request model. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task ResetPasswordAsync(ResetPassword body) + public virtual System.Threading.Tasks.Task RefreshTokenAsync(RefreshToken body) { - return ResetPasswordAsync(body, System.Threading.CancellationToken.None); + return RefreshTokenAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Reset OpenSky user password. - /// The reset password model. + /// + /// Refresh OpenSky API JWT token using a single-use refresh token. + /// + /// + /// sushi.at, 30/05/2021. + /// + /// The refresh token request model. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task ResetPasswordAsync(ResetPassword body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task RefreshTokenAsync(RefreshToken body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/resetPassword"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/refreshToken"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + 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 @@ -4016,13 +4653,13 @@ public async System.Threading.Tasks.Task ResetPassword 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_).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); @@ -4031,7 +4668,7 @@ public async System.Threading.Tasks.Task ResetPassword } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -4048,38 +4685,56 @@ public async System.Threading.Tasks.Task ResetPassword client_.Dispose(); } } - - /// Revoke all OpenSky refresh tokens. + + /// + /// Register new OpenSky user. + /// + /// + /// sushi.at, 06/05/2021. + /// + /// The register user model. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task RevokeAllTokensAsync() + public virtual System.Threading.Tasks.Task RegisterAsync(RegisterUser body) { - return RevokeAllTokensAsync(System.Threading.CancellationToken.None); + return RegisterAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Revoke all OpenSky refresh tokens. + /// + /// Register new OpenSky user. + /// + /// + /// sushi.at, 06/05/2021. + /// + /// The register user model. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task RevokeAllTokensAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task RegisterAsync(RegisterUser body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/revokeAllTokens"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/register"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + 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 @@ -4090,13 +4745,13 @@ public async System.Threading.Tasks.Task RevokeAllTokensAsync 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_).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); @@ -4105,7 +4760,7 @@ public async System.Threading.Tasks.Task RevokeAllTokensAsync } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -4122,43 +4777,56 @@ public async System.Threading.Tasks.Task RevokeAllTokensAsync client_.Dispose(); } } - - /// Revoke specified OpenSky refresh token. - /// The revoke token model. + + /// + /// Re-send the email validation. + /// + /// + /// sushi.at, 08/05/2021. + /// + /// The resend validation email model. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task RevokeTokenAsync(RevokeToken body) + public virtual System.Threading.Tasks.Task ResendValidationEmailAsync(ResendValidationEmail body) { - return RevokeTokenAsync(body, System.Threading.CancellationToken.None); + return ResendValidationEmailAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Revoke specified OpenSky refresh token. - /// The revoke token model. + /// + /// Re-send the email validation. + /// + /// + /// sushi.at, 08/05/2021. + /// + /// The resend validation email model. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task RevokeTokenAsync(RevokeToken body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task ResendValidationEmailAsync(ResendValidationEmail body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/revokeToken"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/resendValidationEmail"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Method = new System.Net.Http.HttpMethod("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 @@ -4169,13 +4837,13 @@ public async System.Threading.Tasks.Task RevokeTokenAsync(Rev 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_).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); @@ -4184,7 +4852,7 @@ public async System.Threading.Tasks.Task RevokeTokenAsync(Rev } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -4201,43 +4869,56 @@ public async System.Threading.Tasks.Task RevokeTokenAsync(Rev client_.Dispose(); } } - - /// Revoke specified OpenSky refresh token using name and expiry. - /// The revoke token by name model. + + /// + /// Reset OpenSky user password. + /// + /// + /// sushi.at, 08/05/2021. + /// + /// The reset password model. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task RevokeTokenByNameAsync(RevokeTokenByName body) + public virtual System.Threading.Tasks.Task ResetPasswordAsync(ResetPassword body) { - return RevokeTokenByNameAsync(body, System.Threading.CancellationToken.None); + return ResetPasswordAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Revoke specified OpenSky refresh token using name and expiry. - /// The revoke token by name model. + /// + /// Reset OpenSky user password. + /// + /// + /// sushi.at, 08/05/2021. + /// + /// The reset password model. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task RevokeTokenByNameAsync(RevokeTokenByName body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task ResetPasswordAsync(ResetPassword body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/revokeTokenByName"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/resetPassword"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Method = new System.Net.Http.HttpMethod("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 @@ -4248,13 +4929,13 @@ public async System.Threading.Tasks.Task RevokeTokenByNameAsy 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_).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); @@ -4263,7 +4944,7 @@ public async System.Threading.Tasks.Task RevokeTokenByNameAsy } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -4280,43 +4961,50 @@ public async System.Threading.Tasks.Task RevokeTokenByNameAsy client_.Dispose(); } } - - /// Validate email address of previously registered OpenSky user. - /// The validate email model. + + /// + /// Revoke all OpenSky refresh tokens. + /// + /// + /// sushi.at, 31/05/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task ValidateEmailAsync(ValidateEmail body) + public virtual System.Threading.Tasks.Task RevokeAllTokensAsync() { - return ValidateEmailAsync(body, System.Threading.CancellationToken.None); + return RevokeAllTokensAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Validate email address of previously registered OpenSky user. - /// The validate email model. + /// + /// Revoke all OpenSky refresh tokens. + /// + /// + /// sushi.at, 31/05/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task ValidateEmailAsync(ValidateEmail body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task RevokeAllTokensAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/validateEmail"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/revokeAllTokens"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Method = new System.Net.Http.HttpMethod("DELETE"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + 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 @@ -4327,13 +5015,13 @@ public async System.Threading.Tasks.Task ValidateEmailAsync(V 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_).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); @@ -4342,7 +5030,7 @@ public async System.Threading.Tasks.Task ValidateEmailAsync(V } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -4359,38 +5047,56 @@ public async System.Threading.Tasks.Task ValidateEmailAsync(V client_.Dispose(); } } - - /// Get data imports. + + /// + /// Revoke specified OpenSky refresh token. + /// + /// + /// sushi.at, 31/05/2021. + /// + /// The revoke token model. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetDataImportsAsync() + public virtual System.Threading.Tasks.Task RevokeTokenAsync(RevokeToken body) { - return GetDataImportsAsync(System.Threading.CancellationToken.None); + return RevokeTokenAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get data imports. + /// + /// Revoke specified OpenSky refresh token. + /// + /// + /// sushi.at, 31/05/2021. + /// + /// The revoke token model. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetDataImportsAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task RevokeTokenAsync(RevokeToken body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/DataImport"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/revokeToken"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("DELETE"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + PrepareRequest(client_, request_, url_); - + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try @@ -4401,13 +5107,13 @@ public async System.Threading.Tasks.Task GetDa 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_).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); @@ -4416,7 +5122,7 @@ public async System.Threading.Tasks.Task GetDa } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -4433,44 +5139,56 @@ public async System.Threading.Tasks.Task GetDa client_.Dispose(); } } - - /// Get data import status. - /// Identifier for the import. + + /// + /// Revoke specified OpenSky refresh token using name and expiry. + /// + /// + /// sushi.at, 12/07/2021. + /// + /// The revoke token by name model. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetImportStatusAsync(System.Guid importID) + public virtual System.Threading.Tasks.Task RevokeTokenByNameAsync(RevokeTokenByName body) { - return GetImportStatusAsync(importID, System.Threading.CancellationToken.None); + return RevokeTokenByNameAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get data import status. - /// Identifier for the import. + /// + /// Revoke specified OpenSky refresh token using name and expiry. + /// + /// + /// sushi.at, 12/07/2021. + /// + /// The revoke token by name model. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetImportStatusAsync(System.Guid importID, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task RevokeTokenByNameAsync(RevokeTokenByName body, System.Threading.CancellationToken cancellationToken) { - if (importID == null) - throw new System.ArgumentNullException("importID"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/DataImport/status/{importID}"); - urlBuilder_.Replace("{importID}", System.Uri.EscapeDataString(ConvertToString(importID, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/revokeTokenByName"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("DELETE"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + PrepareRequest(client_, request_, url_); - + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try @@ -4481,13 +5199,13 @@ public async System.Threading.Tasks.Task GetImportS 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_).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); @@ -4496,7 +5214,7 @@ public async System.Threading.Tasks.Task GetImportS } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -4513,52 +5231,56 @@ public async System.Threading.Tasks.Task GetImportS client_.Dispose(); } } - - /// Post LittleNavmap MSFS sqlite database for import. + + /// + /// Validate email address of previously registered OpenSky user. + /// + /// + /// sushi.at, 08/05/2021. + /// + /// The validate email model. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task LittleNavmapMSFSAsync(FileParameter fileUpload) + public virtual System.Threading.Tasks.Task ValidateEmailAsync(ValidateEmail body) { - return LittleNavmapMSFSAsync(fileUpload, System.Threading.CancellationToken.None); + return ValidateEmailAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Post LittleNavmap MSFS sqlite database for import. + /// + /// Validate email address of previously registered OpenSky user. + /// + /// + /// sushi.at, 08/05/2021. + /// + /// The validate email model. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task LittleNavmapMSFSAsync(FileParameter fileUpload, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task ValidateEmailAsync(ValidateEmail body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/DataImport/littleNavmapMSFS"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Authentication/validateEmail"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var boundary_ = System.Guid.NewGuid().ToString(); - var content_ = new System.Net.Http.MultipartFormDataContent(boundary_); - content_.Headers.Remove("Content-Type"); - content_.Headers.TryAddWithoutValidation("Content-Type", "multipart/form-data; boundary=" + boundary_); - if (fileUpload == null) - throw new System.ArgumentNullException("fileUpload"); - else - { - var content_fileUpload_ = new System.Net.Http.StreamContent(fileUpload.Data); - if (!string.IsNullOrEmpty(fileUpload.ContentType)) - content_fileUpload_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse(fileUpload.ContentType); - content_.Add(content_fileUpload_, "fileUpload", fileUpload.FileName ?? "fileUpload"); - } + 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 @@ -4569,13 +5291,13 @@ public async System.Threading.Tasks.Task LittleNavmapMS 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_).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); @@ -4584,7 +5306,7 @@ public async System.Threading.Tasks.Task LittleNavmapMS } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -4601,52 +5323,50 @@ public async System.Threading.Tasks.Task LittleNavmapMS client_.Dispose(); } } - - /// Post LittleNavmap XPlane11 sqlite database for import. + + /// + /// Get data imports. + /// + /// + /// sushi.at, 02/07/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task LittleNavmapXP11Async(FileParameter fileUpload) + public virtual System.Threading.Tasks.Task GetDataImportsAsync() { - return LittleNavmapXP11Async(fileUpload, System.Threading.CancellationToken.None); + return GetDataImportsAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Post LittleNavmap XPlane11 sqlite database for import. + /// + /// Get data imports. + /// + /// + /// sushi.at, 02/07/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task LittleNavmapXP11Async(FileParameter fileUpload, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetDataImportsAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/DataImport/littleNavmapXP11"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/DataImport"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var boundary_ = System.Guid.NewGuid().ToString(); - var content_ = new System.Net.Http.MultipartFormDataContent(boundary_); - content_.Headers.Remove("Content-Type"); - content_.Headers.TryAddWithoutValidation("Content-Type", "multipart/form-data; boundary=" + boundary_); - if (fileUpload == null) - throw new System.ArgumentNullException("fileUpload"); - else - { - var content_fileUpload_ = new System.Net.Http.StreamContent(fileUpload.Data); - if (!string.IsNullOrEmpty(fileUpload.ContentType)) - content_fileUpload_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse(fileUpload.ContentType); - content_.Add(content_fileUpload_, "fileUpload", fileUpload.FileName ?? "fileUpload"); - } - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); + 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 @@ -4657,13 +5377,13 @@ public async System.Threading.Tasks.Task LittleNavmapXP 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_).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); @@ -4672,7 +5392,7 @@ public async System.Threading.Tasks.Task LittleNavmapXP } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -4689,39 +5409,56 @@ public async System.Threading.Tasks.Task LittleNavmapXP client_.Dispose(); } } - - /// Free money :) + + /// + /// Get data import status. + /// + /// + /// sushi.at, 12/05/2021. + /// + /// Identifier for the import. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task BobsYourUncleAsync() + public virtual System.Threading.Tasks.Task GetImportStatusAsync(System.Guid importID) { - return BobsYourUncleAsync(System.Threading.CancellationToken.None); + return GetImportStatusAsync(importID, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Free money :) + /// + /// Get data import status. + /// + /// + /// sushi.at, 12/05/2021. + /// + /// Identifier for the import. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task BobsYourUncleAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetImportStatusAsync(System.Guid importID, System.Threading.CancellationToken cancellationToken) { + if (importID == null) + throw new System.ArgumentNullException("importID"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/bobsYourUncle"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/DataImport/status/{importID}"); + urlBuilder_.Replace("{importID}", System.Uri.EscapeDataString(ConvertToString(importID, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); - request_.Method = new System.Net.Http.HttpMethod("POST"); + 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 @@ -4732,13 +5469,13 @@ public async System.Threading.Tasks.Task BobsYourUncleAsync(S 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_).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); @@ -4747,7 +5484,7 @@ public async System.Threading.Tasks.Task BobsYourUncleAsync(S } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -4764,38 +5501,65 @@ public async System.Threading.Tasks.Task BobsYourUncleAsync(S client_.Dispose(); } } - - /// Get the current account balances. + + /// + /// Post LittleNavmap MSFS sqlite database for import. + /// + /// + /// sushi.at, 04/05/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetAccountBalancesAsync() + public virtual System.Threading.Tasks.Task LittleNavmapMSFSAsync(FileParameter fileUpload) { - return GetAccountBalancesAsync(System.Threading.CancellationToken.None); + return LittleNavmapMSFSAsync(fileUpload, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get the current account balances. + /// + /// Post LittleNavmap MSFS sqlite database for import. + /// + /// + /// sushi.at, 04/05/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetAccountBalancesAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task LittleNavmapMSFSAsync(FileParameter fileUpload, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/balances"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/DataImport/littleNavmapMSFS"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + var boundary_ = System.Guid.NewGuid().ToString(); + var content_ = new System.Net.Http.MultipartFormDataContent(boundary_); + content_.Headers.Remove("Content-Type"); + content_.Headers.TryAddWithoutValidation("Content-Type", "multipart/form-data; boundary=" + boundary_); + + if (fileUpload == null) + throw new System.ArgumentNullException("fileUpload"); + else + { + var content_fileUpload_ = new System.Net.Http.StreamContent(fileUpload.Data); + if (!string.IsNullOrEmpty(fileUpload.ContentType)) + content_fileUpload_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse(fileUpload.ContentType); + content_.Add(content_fileUpload_, "fileUpload", fileUpload.FileName ?? "fileUpload"); + } + 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 @@ -4806,13 +5570,13 @@ public async System.Threading.Tasks.Task GetAccountB 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_).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); @@ -4821,7 +5585,7 @@ public async System.Threading.Tasks.Task GetAccountB } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -4838,38 +5602,65 @@ public async System.Threading.Tasks.Task GetAccountB client_.Dispose(); } } - - /// Get financial overview (with transactions of the last 30 days) + + /// + /// Post LittleNavmap XPlane11 sqlite database for import. + /// + /// + /// sushi.at, 04/05/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetFinancialOverviewAsync() + public virtual System.Threading.Tasks.Task LittleNavmapXP11Async(FileParameter fileUpload) { - return GetFinancialOverviewAsync(System.Threading.CancellationToken.None); + return LittleNavmapXP11Async(fileUpload, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get financial overview (with transactions of the last 30 days) + /// + /// Post LittleNavmap XPlane11 sqlite database for import. + /// + /// + /// sushi.at, 04/05/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetFinancialOverviewAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task LittleNavmapXP11Async(FileParameter fileUpload, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/overview"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/DataImport/littleNavmapXP11"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + var boundary_ = System.Guid.NewGuid().ToString(); + var content_ = new System.Net.Http.MultipartFormDataContent(boundary_); + content_.Headers.Remove("Content-Type"); + content_.Headers.TryAddWithoutValidation("Content-Type", "multipart/form-data; boundary=" + boundary_); + + if (fileUpload == null) + throw new System.ArgumentNullException("fileUpload"); + else + { + var content_fileUpload_ = new System.Net.Http.StreamContent(fileUpload.Data); + if (!string.IsNullOrEmpty(fileUpload.ContentType)) + content_fileUpload_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse(fileUpload.ContentType); + content_.Add(content_fileUpload_, "fileUpload", fileUpload.FileName ?? "fileUpload"); + } + 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 @@ -4880,13 +5671,13 @@ public async System.Threading.Tasks.Task GetFinanc 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_).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); @@ -4895,7 +5686,7 @@ public async System.Threading.Tasks.Task GetFinanc } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -4912,32 +5703,34 @@ public async System.Threading.Tasks.Task GetFinanc client_.Dispose(); } } - - /// Abort flight, return to planning stage (with potential penalties depending on flight phase - /// and location) - /// Identifier for the flight (plan). + + /// + /// Free money :) + /// + /// + /// sushi.at, 25/01/2022. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task AbortFlightAsync(System.Guid flightID) + public virtual System.Threading.Tasks.Task BobsYourUncleAsync() { - return AbortFlightAsync(flightID, System.Threading.CancellationToken.None); + return BobsYourUncleAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Abort flight, return to planning stage (with potential penalties depending on flight phase - /// and location) - /// Identifier for the flight (plan). + /// + /// Free money :) + /// + /// + /// sushi.at, 25/01/2022. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task AbortFlightAsync(System.Guid flightID, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task BobsYourUncleAsync(System.Threading.CancellationToken cancellationToken) { - if (flightID == null) - throw new System.ArgumentNullException("flightID"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/abort/{flightID}"); - urlBuilder_.Replace("{flightID}", System.Uri.EscapeDataString(ConvertToString(flightID, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/bobsYourUncle"); + var client_ = _httpClient; var disposeClient_ = false; try @@ -4947,12 +5740,14 @@ public async System.Threading.Tasks.Task AbortFlightAsync(Sys request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); 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 @@ -4963,13 +5758,13 @@ public async System.Threading.Tasks.Task AbortFlightAsync(Sys 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_).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); @@ -4978,7 +5773,7 @@ public async System.Threading.Tasks.Task AbortFlightAsync(Sys } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -4995,43 +5790,50 @@ public async System.Threading.Tasks.Task AbortFlightAsync(Sys client_.Dispose(); } } - - /// Upload final save and complete flight. - /// The final report. + + /// + /// Get the current account balances. + /// + /// + /// sushi.at, 25/01/2022. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task CompleteFlightAsync(FinalReport body) + public virtual System.Threading.Tasks.Task GetAccountBalancesAsync() { - return CompleteFlightAsync(body, System.Threading.CancellationToken.None); + return GetAccountBalancesAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Upload final save and complete flight. - /// The final report. + /// + /// Get the current account balances. + /// + /// + /// sushi.at, 25/01/2022. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task CompleteFlightAsync(FinalReport body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAccountBalancesAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/complete"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/balances"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); - 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("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 @@ -5042,13 +5844,13 @@ public async System.Threading.Tasks.Task CompleteFlightAsync( 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_).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); @@ -5057,7 +5859,7 @@ public async System.Threading.Tasks.Task CompleteFlightAsync( } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -5074,44 +5876,50 @@ public async System.Threading.Tasks.Task CompleteFlightAsync( client_.Dispose(); } } - - /// Delete the specified flight plan. - /// Identifier for the flight (plan). + + /// + /// Get financial overview (with transactions of the last 30 days) + /// + /// + /// sushi.at, 24/01/2022. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task DeleteFlightPlanAsync(System.Guid flightID) + public virtual System.Threading.Tasks.Task GetFinancialOverviewAsync() { - return DeleteFlightPlanAsync(flightID, System.Threading.CancellationToken.None); + return GetFinancialOverviewAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete the specified flight plan. - /// Identifier for the flight (plan). + /// + /// Get financial overview (with transactions of the last 30 days) + /// + /// + /// sushi.at, 24/01/2022. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteFlightPlanAsync(System.Guid flightID, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetFinancialOverviewAsync(System.Threading.CancellationToken cancellationToken) { - if (flightID == null) - throw new System.ArgumentNullException("flightID"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/flightPlan/{flightID}"); - urlBuilder_.Replace("{flightID}", System.Uri.EscapeDataString(ConvertToString(flightID, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/overview"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + 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 @@ -5122,13 +5930,13 @@ public async System.Threading.Tasks.Task DeleteFlightPlanAsyn 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_).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); @@ -5137,7 +5945,7 @@ public async System.Threading.Tasks.Task DeleteFlightPlanAsyn } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -5154,44 +5962,59 @@ public async System.Threading.Tasks.Task DeleteFlightPlanAsyn client_.Dispose(); } } - - /// Download flight auto-save. + + /// + /// Abort flight, return to planning stage (with potential penalties depending on flight phase + ///
and location) + ///
+ /// + /// sushi.at, 13/11/2021. + /// /// Identifier for the flight (plan). /// Success /// A server side error occurred. - public System.Threading.Tasks.Task DownloadFlightAutoSaveAsync(System.Guid flightID) + public virtual System.Threading.Tasks.Task AbortFlightAsync(System.Guid flightID) { - return DownloadFlightAutoSaveAsync(flightID, System.Threading.CancellationToken.None); + return AbortFlightAsync(flightID, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Download flight auto-save. + /// + /// Abort flight, return to planning stage (with potential penalties depending on flight phase + ///
and location) + ///
+ /// + /// sushi.at, 13/11/2021. + /// /// Identifier for the flight (plan). /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task DownloadFlightAutoSaveAsync(System.Guid flightID, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task AbortFlightAsync(System.Guid flightID, System.Threading.CancellationToken cancellationToken) { if (flightID == null) throw new System.ArgumentNullException("flightID"); - + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/autoSave/{flightID}"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/abort/{flightID}"); urlBuilder_.Replace("{flightID}", System.Uri.EscapeDataString(ConvertToString(flightID, System.Globalization.CultureInfo.InvariantCulture))); - + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); + 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 @@ -5202,13 +6025,13 @@ public async System.Threading.Tasks.Task DownloadFlightAutoSa 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_).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); @@ -5217,7 +6040,7 @@ public async System.Threading.Tasks.Task DownloadFlightAutoSa } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -5234,49 +6057,56 @@ public async System.Threading.Tasks.Task DownloadFlightAutoSa client_.Dispose(); } } - - /// Upload auto-save flight log for the specified flight. - /// Identifier for the flight. - /// The auto-save (base64 encoded). + + /// + /// Upload final save and complete flight. + /// + /// + /// sushi.at, 14/11/2021. + /// + /// The final report. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task UploadFlightAutoSaveAsync(System.Guid flightID, string body) + public virtual System.Threading.Tasks.Task CompleteFlightAsync(FinalReport body) { - return UploadFlightAutoSaveAsync(flightID, body, System.Threading.CancellationToken.None); + return CompleteFlightAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Upload auto-save flight log for the specified flight. - /// Identifier for the flight. - /// The auto-save (base64 encoded). + /// + /// Upload final save and complete flight. + /// + /// + /// sushi.at, 14/11/2021. + /// + /// The final report. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task UploadFlightAutoSaveAsync(System.Guid flightID, string body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task CompleteFlightAsync(FinalReport body, System.Threading.CancellationToken cancellationToken) { - if (flightID == null) - throw new System.ArgumentNullException("flightID"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/autoSave/{flightID}"); - urlBuilder_.Replace("{flightID}", System.Uri.EscapeDataString(ConvertToString(flightID, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/complete"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + 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 @@ -5287,13 +6117,13 @@ public async System.Threading.Tasks.Task UploadFlightAutoSave 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_).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); @@ -5302,7 +6132,7 @@ public async System.Threading.Tasks.Task UploadFlightAutoSave } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -5319,38 +6149,56 @@ public async System.Threading.Tasks.Task UploadFlightAutoSave client_.Dispose(); } } - - /// Get currently active flight for tracking. + + /// + /// Delete the specified flight plan. + /// + /// + /// sushi.at, 03/10/2021. + /// + /// Identifier for the flight (plan). /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetFlightAsync() + public virtual System.Threading.Tasks.Task DeleteFlightPlanAsync(System.Guid flightID) { - return GetFlightAsync(System.Threading.CancellationToken.None); + return DeleteFlightPlanAsync(flightID, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get currently active flight for tracking. + /// + /// Delete the specified flight plan. + /// + /// + /// sushi.at, 03/10/2021. + /// + /// Identifier for the flight (plan). /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetFlightAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task DeleteFlightPlanAsync(System.Guid flightID, System.Threading.CancellationToken cancellationToken) { + if (flightID == null) + throw new System.ArgumentNullException("flightID"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/flightPlan/{flightID}"); + urlBuilder_.Replace("{flightID}", System.Uri.EscapeDataString(ConvertToString(flightID, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Method = new System.Net.Http.HttpMethod("DELETE"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + PrepareRequest(client_, request_, url_); - + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try @@ -5361,13 +6209,13 @@ public async System.Threading.Tasks.Task GetFlightAsync(Syste 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_).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); @@ -5376,7 +6224,7 @@ public async System.Threading.Tasks.Task GetFlightAsync(Syste } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -5393,30 +6241,40 @@ public async System.Threading.Tasks.Task GetFlightAsync(Syste client_.Dispose(); } } - - /// Gets the flight log details (final log xml file and ofp) - /// Identifier for the flight. + + /// + /// Download flight auto-save. + /// + /// + /// sushi.at, 14/11/2021. + /// + /// Identifier for the flight (plan). /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetFlightLogDetailsAsync(System.Guid flightID) + public virtual System.Threading.Tasks.Task DownloadFlightAutoSaveAsync(System.Guid flightID) { - return GetFlightLogDetailsAsync(flightID, System.Threading.CancellationToken.None); + return DownloadFlightAutoSaveAsync(flightID, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets the flight log details (final log xml file and ofp) - /// Identifier for the flight. + /// + /// Download flight auto-save. + /// + /// + /// sushi.at, 14/11/2021. + /// + /// Identifier for the flight (plan). /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetFlightLogDetailsAsync(System.Guid flightID, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task DownloadFlightAutoSaveAsync(System.Guid flightID, System.Threading.CancellationToken cancellationToken) { if (flightID == null) throw new System.ArgumentNullException("flightID"); - + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/flightLogDetails/{flightID}"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/autoSave/{flightID}"); urlBuilder_.Replace("{flightID}", System.Uri.EscapeDataString(ConvertToString(flightID, System.Globalization.CultureInfo.InvariantCulture))); - + var client_ = _httpClient; var disposeClient_ = false; try @@ -5425,12 +6283,14 @@ public async System.Threading.Tasks.Task GetFlightL { 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 @@ -5441,13 +6301,13 @@ public async System.Threading.Tasks.Task GetFlightL 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_).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); @@ -5456,7 +6316,7 @@ public async System.Threading.Tasks.Task GetFlightL } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -5473,38 +6333,62 @@ public async System.Threading.Tasks.Task GetFlightL client_.Dispose(); } } - - /// Get flight plans. + + /// + /// Upload auto-save flight log for the specified flight. + /// + /// + /// sushi.at, 13/11/2021. + /// + /// Identifier for the flight. + /// The auto-save (base64 encoded). /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetFlightPlansAsync() + public virtual System.Threading.Tasks.Task UploadFlightAutoSaveAsync(System.Guid flightID, string body) { - return GetFlightPlansAsync(System.Threading.CancellationToken.None); + return UploadFlightAutoSaveAsync(flightID, body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get flight plans. + /// + /// Upload auto-save flight log for the specified flight. + /// + /// + /// sushi.at, 13/11/2021. + /// + /// Identifier for the flight. + /// The auto-save (base64 encoded). /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetFlightPlansAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UploadFlightAutoSaveAsync(System.Guid flightID, string body, System.Threading.CancellationToken cancellationToken) { + if (flightID == null) + throw new System.ArgumentNullException("flightID"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/flightPlans"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/autoSave/{flightID}"); + urlBuilder_.Replace("{flightID}", System.Uri.EscapeDataString(ConvertToString(flightID, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + 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 @@ -5515,13 +6399,13 @@ public async System.Threading.Tasks.Task GetFl 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_).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); @@ -5530,7 +6414,7 @@ public async System.Threading.Tasks.Task GetFl } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -5547,24 +6431,34 @@ public async System.Threading.Tasks.Task GetFl client_.Dispose(); } } - - /// Get flight logs (completed flights) + + /// + /// Get currently active flight for tracking. + /// + /// + /// sushi.at, 11/11/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetMyFlightLogsAsync() + public virtual System.Threading.Tasks.Task GetFlightAsync() { - return GetMyFlightLogsAsync(System.Threading.CancellationToken.None); + return GetFlightAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get flight logs (completed flights) + /// + /// Get currently active flight for tracking. + /// + /// + /// sushi.at, 11/11/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetMyFlightLogsAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetFlightAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/myFlightLogs"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight"); + var client_ = _httpClient; var disposeClient_ = false; try @@ -5573,12 +6467,14 @@ public async System.Threading.Tasks.Task GetMyF { 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 @@ -5589,13 +6485,13 @@ public async System.Threading.Tasks.Task GetMyF 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_).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); @@ -5604,7 +6500,7 @@ public async System.Threading.Tasks.Task GetMyF } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -5621,24 +6517,40 @@ public async System.Threading.Tasks.Task GetMyF client_.Dispose(); } } - - /// Get "my" active flights (up to one currently flying and possibly multiple paused). + + /// + /// Gets the flight log details (final log xml file and ofp) + /// + /// + /// sushi.at, 17/11/2021. + /// + /// Identifier for the flight. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetMyFlightsAsync() + public virtual System.Threading.Tasks.Task GetFlightLogDetailsAsync(System.Guid flightID) { - return GetMyFlightsAsync(System.Threading.CancellationToken.None); + return GetFlightLogDetailsAsync(flightID, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get "my" active flights (up to one currently flying and possibly multiple paused). + /// + /// Gets the flight log details (final log xml file and ofp) + /// + /// + /// sushi.at, 17/11/2021. + /// + /// Identifier for the flight. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetMyFlightsAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetFlightLogDetailsAsync(System.Guid flightID, System.Threading.CancellationToken cancellationToken) { + if (flightID == null) + throw new System.ArgumentNullException("flightID"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/myFlights"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/flightLogDetails/{flightID}"); + urlBuilder_.Replace("{flightID}", System.Uri.EscapeDataString(ConvertToString(flightID, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try @@ -5647,12 +6559,14 @@ public async System.Threading.Tasks.Task GetMyFlig { 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 @@ -5663,13 +6577,13 @@ public async System.Threading.Tasks.Task GetMyFlig 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_).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); @@ -5678,7 +6592,7 @@ public async System.Threading.Tasks.Task GetMyFlig } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -5695,24 +6609,34 @@ public async System.Threading.Tasks.Task GetMyFlig client_.Dispose(); } } - - /// Get flights for the world map. + + /// + /// Get flight plans. + /// + /// + /// sushi.at, 03/10/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetWorldMapFlightsAsync() + public virtual System.Threading.Tasks.Task GetFlightPlansAsync() { - return GetWorldMapFlightsAsync(System.Threading.CancellationToken.None); + return GetFlightPlansAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get flights for the world map. + /// + /// Get flight plans. + /// + /// + /// sushi.at, 03/10/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetWorldMapFlightsAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetFlightPlansAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/worldMap"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/flightPlans"); + var client_ = _httpClient; var disposeClient_ = false; try @@ -5721,12 +6645,14 @@ public async System.Threading.Tasks.Task G { 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 @@ -5737,13 +6663,13 @@ public async System.Threading.Tasks.Task G 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_).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); @@ -5752,7 +6678,7 @@ public async System.Threading.Tasks.Task G } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -5769,47 +6695,50 @@ public async System.Threading.Tasks.Task G client_.Dispose(); } } - - /// Pause the flight with the specified ID, does not save position or save file - upload these - /// before calling pause if they should be preserved. - /// Identifier for the flight. + + /// + /// Get flight logs (completed flights) + /// + /// + /// sushi.at, 15/11/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task PauseFlightAsync(System.Guid flightID) + public virtual System.Threading.Tasks.Task GetMyFlightLogsAsync() { - return PauseFlightAsync(flightID, System.Threading.CancellationToken.None); + return GetMyFlightLogsAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Pause the flight with the specified ID, does not save position or save file - upload these - /// before calling pause if they should be preserved. - /// Identifier for the flight. + /// + /// Get flight logs (completed flights) + /// + /// + /// sushi.at, 15/11/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task PauseFlightAsync(System.Guid flightID, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetMyFlightLogsAsync(System.Threading.CancellationToken cancellationToken) { - if (flightID == null) - throw new System.ArgumentNullException("flightID"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/pause/{flightID}"); - urlBuilder_.Replace("{flightID}", System.Uri.EscapeDataString(ConvertToString(flightID, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/myFlightLogs"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); - request_.Method = new System.Net.Http.HttpMethod("POST"); + 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 @@ -5820,13 +6749,13 @@ public async System.Threading.Tasks.Task PauseFlightAsync(Sys 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_).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); @@ -5835,7 +6764,7 @@ public async System.Threading.Tasks.Task PauseFlightAsync(Sys } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -5852,43 +6781,50 @@ public async System.Threading.Tasks.Task PauseFlightAsync(Sys client_.Dispose(); } } - - /// Flight position report. - /// The position report. + + /// + /// Get "my" active flights (up to one currently flying and possibly multiple paused). + /// + /// + /// sushi.at, 10/11/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task PositionReportAsync(PositionReport body) + public virtual System.Threading.Tasks.Task GetMyFlightsAsync() { - return PositionReportAsync(body, System.Threading.CancellationToken.None); + return GetMyFlightsAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Flight position report. - /// The position report. + /// + /// Get "my" active flights (up to one currently flying and possibly multiple paused). + /// + /// + /// sushi.at, 10/11/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task PositionReportAsync(PositionReport body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetMyFlightsAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/posReport"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/myFlights"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); - 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("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 @@ -5899,13 +6835,13 @@ public async System.Threading.Tasks.Task PositionReportAsync( 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_).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); @@ -5914,7 +6850,7 @@ public async System.Threading.Tasks.Task PositionReportAsync( } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -5931,45 +6867,50 @@ public async System.Threading.Tasks.Task PositionReportAsync( client_.Dispose(); } } - - /// Resume the flight with the specified ID, only works if there is no other active flight. - /// Identifier for the flight. + + /// + /// Get flights for the world map. + /// + /// + /// sushi.at, 18/11/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task ResumeFlightAsync(System.Guid flightID) + public virtual System.Threading.Tasks.Task GetWorldMapFlightsAsync() { - return ResumeFlightAsync(flightID, System.Threading.CancellationToken.None); + return GetWorldMapFlightsAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Resume the flight with the specified ID, only works if there is no other active flight. - /// Identifier for the flight. + /// + /// Get flights for the world map. + /// + /// + /// sushi.at, 18/11/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task ResumeFlightAsync(System.Guid flightID, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetWorldMapFlightsAsync(System.Threading.CancellationToken cancellationToken) { - if (flightID == null) - throw new System.ArgumentNullException("flightID"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/resume/{flightID}"); - urlBuilder_.Replace("{flightID}", System.Uri.EscapeDataString(ConvertToString(flightID, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/worldMap"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); - request_.Method = new System.Net.Http.HttpMethod("POST"); + 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 @@ -5980,13 +6921,13 @@ public async System.Threading.Tasks.Task ResumeFlightAsync(Sy 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_).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); @@ -5995,7 +6936,7 @@ public async System.Threading.Tasks.Task ResumeFlightAsync(Sy } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -6012,43 +6953,59 @@ public async System.Threading.Tasks.Task ResumeFlightAsync(Sy client_.Dispose(); } } - - /// Save a new or existing flight plan. - /// The flight plan. + + /// + /// Pause the flight with the specified ID, does not save position or save file - upload these + ///
before calling pause if they should be preserved. + ///
+ /// + /// sushi.at, 13/11/2021. + /// + /// Identifier for the flight. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task SaveFlightPlanAsync(FlightPlan body) + public virtual System.Threading.Tasks.Task PauseFlightAsync(System.Guid flightID) { - return SaveFlightPlanAsync(body, System.Threading.CancellationToken.None); + return PauseFlightAsync(flightID, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Save a new or existing flight plan. - /// The flight plan. + /// + /// Pause the flight with the specified ID, does not save position or save file - upload these + ///
before calling pause if they should be preserved. + ///
+ /// + /// sushi.at, 13/11/2021. + /// + /// Identifier for the flight. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task SaveFlightPlanAsync(FlightPlan body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task PauseFlightAsync(System.Guid flightID, System.Threading.CancellationToken cancellationToken) { + if (flightID == null) + throw new System.ArgumentNullException("flightID"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/flightPlan"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/pause/{flightID}"); + urlBuilder_.Replace("{flightID}", System.Uri.EscapeDataString(ConvertToString(flightID, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; + request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); 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 @@ -6059,13 +7016,13 @@ public async System.Threading.Tasks.Task SaveFlightPlanAsync( 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_).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); @@ -6074,7 +7031,7 @@ public async System.Threading.Tasks.Task SaveFlightPlanAsync( } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -6091,43 +7048,56 @@ public async System.Threading.Tasks.Task SaveFlightPlanAsync( client_.Dispose(); } } - - /// Start flight. - /// The start flight model. + + /// + /// Flight position report. + /// + /// + /// sushi.at, 13/11/2021. + /// + /// The position report. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task StartFlightAsync(StartFlight body) + public virtual System.Threading.Tasks.Task PositionReportAsync(PositionReport body) { - return StartFlightAsync(body, System.Threading.CancellationToken.None); + return PositionReportAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Start flight. - /// The start flight model. + /// + /// Flight position report. + /// + /// + /// sushi.at, 13/11/2021. + /// + /// The position report. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task StartFlightAsync(StartFlight body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task PositionReportAsync(PositionReport body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/start"); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/posReport"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value)); + 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 @@ -6138,13 +7108,13 @@ public async System.Threading.Tasks.Task StartFlig 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_).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); @@ -6153,7 +7123,7 @@ public async System.Threading.Tasks.Task StartFlig } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -6170,44 +7140,57 @@ public async System.Threading.Tasks.Task StartFlig client_.Dispose(); } } - - /// Aborts the specified job. - /// Identifier for the job. + + /// + /// Resume the flight with the specified ID, only works if there is no other active flight. + /// + /// + /// sushi.at, 13/11/2021. + /// + /// Identifier for the flight. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task AbortJobAsync(System.Guid jobID) + public virtual System.Threading.Tasks.Task ResumeFlightAsync(System.Guid flightID) { - return AbortJobAsync(jobID, System.Threading.CancellationToken.None); + return ResumeFlightAsync(flightID, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Aborts the specified job. - /// Identifier for the job. + /// + /// Resume the flight with the specified ID, only works if there is no other active flight. + /// + /// + /// sushi.at, 13/11/2021. + /// + /// Identifier for the flight. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task AbortJobAsync(System.Guid jobID, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task ResumeFlightAsync(System.Guid flightID, System.Threading.CancellationToken cancellationToken) { - if (jobID == null) - throw new System.ArgumentNullException("jobID"); - + if (flightID == null) + throw new System.ArgumentNullException("flightID"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Job/abort/{jobID}"); - urlBuilder_.Replace("{jobID}", System.Uri.EscapeDataString(ConvertToString(jobID, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/resume/{flightID}"); + urlBuilder_.Replace("{flightID}", System.Uri.EscapeDataString(ConvertToString(flightID, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); + 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 @@ -6218,13 +7201,13 @@ public async System.Threading.Tasks.Task AbortJobAsync(System 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_).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); @@ -6233,7 +7216,7 @@ public async System.Threading.Tasks.Task AbortJobAsync(System } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -6250,51 +7233,56 @@ public async System.Threading.Tasks.Task AbortJobAsync(System client_.Dispose(); } } - - /// Accept the specified job. - /// Identifier for the job. - /// True to accept the job for the airline, false for private job. + + /// + /// Save a new or existing flight plan. + /// + /// + /// sushi.at, 03/10/2021. + /// + /// The flight plan. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task AcceptJobAsync(System.Guid jobID, bool forAirline) + public virtual System.Threading.Tasks.Task SaveFlightPlanAsync(FlightPlan body) { - return AcceptJobAsync(jobID, forAirline, System.Threading.CancellationToken.None); + return SaveFlightPlanAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Accept the specified job. - /// Identifier for the job. - /// True to accept the job for the airline, false for private job. + /// + /// Save a new or existing flight plan. + /// + /// + /// sushi.at, 03/10/2021. + /// + /// The flight plan. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task AcceptJobAsync(System.Guid jobID, bool forAirline, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task SaveFlightPlanAsync(FlightPlan body, System.Threading.CancellationToken cancellationToken) { - if (jobID == null) - throw new System.ArgumentNullException("jobID"); - - if (forAirline == null) - throw new System.ArgumentNullException("forAirline"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Job/accept/{jobID}/{forAirline}"); - urlBuilder_.Replace("{jobID}", System.Uri.EscapeDataString(ConvertToString(jobID, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{forAirline}", System.Uri.EscapeDataString(ConvertToString(forAirline, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/flightPlan"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); + 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 @@ -6305,13 +7293,13 @@ public async System.Threading.Tasks.Task AcceptJobAsync(Syste 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_).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); @@ -6320,7 +7308,7 @@ public async System.Threading.Tasks.Task AcceptJobAsync(Syste } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -6337,56 +7325,56 @@ public async System.Threading.Tasks.Task AcceptJobAsync(Syste client_.Dispose(); } } - - /// Gets the available jobs at the specified airport and simulator. - /// The ICAO code of the airport. - /// The direction of the jobs to return. 0 = From, 1 = To, 2 = RoundTrip - /// The simulator (or NULL for all simulators). 0 = MSFS, 1 = XPlane11 + + /// + /// Start flight. + /// + /// + /// sushi.at, 10/11/2021. + /// + /// The start flight model. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetJobsAtAirportForSimulatorAsync(string icao, JobDirection direction, Simulator simulator) + public virtual System.Threading.Tasks.Task StartFlightAsync(StartFlight body) { - return GetJobsAtAirportForSimulatorAsync(icao, direction, simulator, System.Threading.CancellationToken.None); + return StartFlightAsync(body, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets the available jobs at the specified airport and simulator. - /// The ICAO code of the airport. - /// The direction of the jobs to return. 0 = From, 1 = To, 2 = RoundTrip - /// The simulator (or NULL for all simulators). 0 = MSFS, 1 = XPlane11 + /// + /// Start flight. + /// + /// + /// sushi.at, 10/11/2021. + /// + /// The start flight model. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetJobsAtAirportForSimulatorAsync(string icao, JobDirection direction, Simulator simulator, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task StartFlightAsync(StartFlight body, System.Threading.CancellationToken cancellationToken) { - if (icao == null) - throw new System.ArgumentNullException("icao"); - - if (direction == null) - throw new System.ArgumentNullException("direction"); - - if (simulator == null) - throw new System.ArgumentNullException("simulator"); - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Job/atAirportForSim/{icao}/{direction}/{simulator}"); - urlBuilder_.Replace("{icao}", System.Uri.EscapeDataString(ConvertToString(icao, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{direction}", System.Uri.EscapeDataString(ConvertToString(direction, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{simulator}", System.Uri.EscapeDataString(ConvertToString(simulator, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Flight/start"); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + 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 @@ -6397,13 +7385,13 @@ public async System.Threading.Tasks.Task GetJobsAtAir 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_).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); @@ -6412,7 +7400,7 @@ public async System.Threading.Tasks.Task GetJobsAtAir } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -6429,50 +7417,56 @@ public async System.Threading.Tasks.Task GetJobsAtAir client_.Dispose(); } } - - /// Gets the available jobs at the specified airport. - /// The ICAO code of the airport. - /// The direction of the jobs to return. 0 = From, 1 = To, 2 = RoundTrip + + /// + /// Aborts the specified job. + /// + /// + /// sushi.at, 18/12/2021. + /// + /// Identifier for the job. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetJobsAtAirportAsync(string icao, JobDirection direction) + public virtual System.Threading.Tasks.Task AbortJobAsync(System.Guid jobID) { - return GetJobsAtAirportAsync(icao, direction, System.Threading.CancellationToken.None); + return AbortJobAsync(jobID, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets the available jobs at the specified airport. - /// The ICAO code of the airport. - /// The direction of the jobs to return. 0 = From, 1 = To, 2 = RoundTrip + /// + /// Aborts the specified job. + /// + /// + /// sushi.at, 18/12/2021. + /// + /// Identifier for the job. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetJobsAtAirportAsync(string icao, JobDirection direction, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task AbortJobAsync(System.Guid jobID, System.Threading.CancellationToken cancellationToken) { - if (icao == null) - throw new System.ArgumentNullException("icao"); - - if (direction == null) - throw new System.ArgumentNullException("direction"); - + if (jobID == null) + throw new System.ArgumentNullException("jobID"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Job/atAirport/{icao}/{direction}"); - urlBuilder_.Replace("{icao}", System.Uri.EscapeDataString(ConvertToString(icao, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{direction}", System.Uri.EscapeDataString(ConvertToString(direction, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Job/abort/{jobID}"); + urlBuilder_.Replace("{jobID}", System.Uri.EscapeDataString(ConvertToString(jobID, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Method = new System.Net.Http.HttpMethod("DELETE"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + PrepareRequest(client_, request_, url_); - + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try @@ -6483,13 +7477,13 @@ public async System.Threading.Tasks.Task GetJobsAtAir 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_).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); @@ -6498,7 +7492,7 @@ public async System.Threading.Tasks.Task GetJobsAtAir } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -6515,62 +7509,63 @@ public async System.Threading.Tasks.Task GetJobsAtAir client_.Dispose(); } } - - /// Gets the available jobs at the specified airport for the specified aircraft type category and simulator. - /// The ICAO code of the airport. - /// The direction of the jobs to return. 0 = From, 1 = To, 2 = RoundTrip - /// The aircraft type category to return jobs for (recommended category). 0 = SEP, 1 = MEP, 2 = SET, 3 = MET, 4 = JET, 5 = REG, 6 = NBA, 7 = WBA, 8 = HEL - /// The simulator (or NULL for all simulators). 0 = MSFS, 1 = XPlane11 + + /// + /// Accept the specified job. + /// + /// + /// sushi.at, 18/12/2021. + /// + /// Identifier for the job. + /// True to accept the job for the airline, false for private job. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetJobsAtAirportForCategoryAndSimulatorAsync(string icao, JobDirection direction, AircraftTypeCategory category, Simulator simulator) + public virtual System.Threading.Tasks.Task AcceptJobAsync(System.Guid jobID, bool forAirline) { - return GetJobsAtAirportForCategoryAndSimulatorAsync(icao, direction, category, simulator, System.Threading.CancellationToken.None); + return AcceptJobAsync(jobID, forAirline, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets the available jobs at the specified airport for the specified aircraft type category and simulator. - /// The ICAO code of the airport. - /// The direction of the jobs to return. 0 = From, 1 = To, 2 = RoundTrip - /// The aircraft type category to return jobs for (recommended category). 0 = SEP, 1 = MEP, 2 = SET, 3 = MET, 4 = JET, 5 = REG, 6 = NBA, 7 = WBA, 8 = HEL - /// The simulator (or NULL for all simulators). 0 = MSFS, 1 = XPlane11 + /// + /// Accept the specified job. + /// + /// + /// sushi.at, 18/12/2021. + /// + /// Identifier for the job. + /// True to accept the job for the airline, false for private job. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetJobsAtAirportForCategoryAndSimulatorAsync(string icao, JobDirection direction, AircraftTypeCategory category, Simulator simulator, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task AcceptJobAsync(System.Guid jobID, bool forAirline, System.Threading.CancellationToken cancellationToken) { - if (icao == null) - throw new System.ArgumentNullException("icao"); - - if (direction == null) - throw new System.ArgumentNullException("direction"); - - if (category == null) - throw new System.ArgumentNullException("category"); - - if (simulator == null) - throw new System.ArgumentNullException("simulator"); - + if (jobID == null) + throw new System.ArgumentNullException("jobID"); + + if (forAirline == null) + throw new System.ArgumentNullException("forAirline"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Job/atAirportForCategoryAndSim/{icao}/{direction}/{category}/{simulator}"); - urlBuilder_.Replace("{icao}", System.Uri.EscapeDataString(ConvertToString(icao, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{direction}", System.Uri.EscapeDataString(ConvertToString(direction, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{category}", System.Uri.EscapeDataString(ConvertToString(category, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{simulator}", System.Uri.EscapeDataString(ConvertToString(simulator, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Job/accept/{jobID}/{forAirline}"); + urlBuilder_.Replace("{jobID}", System.Uri.EscapeDataString(ConvertToString(jobID, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{forAirline}", System.Uri.EscapeDataString(ConvertToString(forAirline, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { - request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); + 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 @@ -6581,13 +7576,13 @@ public async System.Threading.Tasks.Task GetJobsAtAir 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_).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); @@ -6596,7 +7591,7 @@ public async System.Threading.Tasks.Task GetJobsAtAir } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -6613,42 +7608,52 @@ public async System.Threading.Tasks.Task GetJobsAtAir client_.Dispose(); } } - - /// Gets the available jobs at the specified airport for the specified aircraft type category. + + /// + /// Gets the available jobs at the specified airport and simulator. + /// + /// + /// sushi.at, 10/12/2021. + /// /// The ICAO code of the airport. /// The direction of the jobs to return. 0 = From, 1 = To, 2 = RoundTrip - /// The aircraft type category to return jobs for (recommended category). 0 = SEP, 1 = MEP, 2 = SET, 3 = MET, 4 = JET, 5 = REG, 6 = NBA, 7 = WBA, 8 = HEL + /// The simulator (or NULL for all simulators). 0 = MSFS, 1 = XPlane11 /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetJobsAtAirportForCategoryAsync(string icao, JobDirection direction, AircraftTypeCategory category) + public virtual System.Threading.Tasks.Task GetJobsAtAirportForSimulatorAsync(string icao, JobDirection direction, Simulator simulator) { - return GetJobsAtAirportForCategoryAsync(icao, direction, category, System.Threading.CancellationToken.None); + return GetJobsAtAirportForSimulatorAsync(icao, direction, simulator, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets the available jobs at the specified airport for the specified aircraft type category. + /// + /// Gets the available jobs at the specified airport and simulator. + /// + /// + /// sushi.at, 10/12/2021. + /// /// The ICAO code of the airport. /// The direction of the jobs to return. 0 = From, 1 = To, 2 = RoundTrip - /// The aircraft type category to return jobs for (recommended category). 0 = SEP, 1 = MEP, 2 = SET, 3 = MET, 4 = JET, 5 = REG, 6 = NBA, 7 = WBA, 8 = HEL + /// The simulator (or NULL for all simulators). 0 = MSFS, 1 = XPlane11 /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetJobsAtAirportForCategoryAsync(string icao, JobDirection direction, AircraftTypeCategory category, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetJobsAtAirportForSimulatorAsync(string icao, JobDirection direction, Simulator simulator, System.Threading.CancellationToken cancellationToken) { if (icao == null) throw new System.ArgumentNullException("icao"); - + if (direction == null) throw new System.ArgumentNullException("direction"); - - if (category == null) - throw new System.ArgumentNullException("category"); - + + if (simulator == null) + throw new System.ArgumentNullException("simulator"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Job/atAirportForCategory/{icao}/{direction}/{category}"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Job/atAirportForSim/{icao}/{direction}/{simulator}"); urlBuilder_.Replace("{icao}", System.Uri.EscapeDataString(ConvertToString(icao, System.Globalization.CultureInfo.InvariantCulture))); urlBuilder_.Replace("{direction}", System.Uri.EscapeDataString(ConvertToString(direction, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{category}", System.Uri.EscapeDataString(ConvertToString(category, System.Globalization.CultureInfo.InvariantCulture))); - + urlBuilder_.Replace("{simulator}", System.Uri.EscapeDataString(ConvertToString(simulator, System.Globalization.CultureInfo.InvariantCulture))); + var client_ = _httpClient; var disposeClient_ = false; try @@ -6657,12 +7662,14 @@ public async System.Threading.Tasks.Task GetJobsAtAir { 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 @@ -6673,13 +7680,13 @@ public async System.Threading.Tasks.Task GetJobsAtAir 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_).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); @@ -6688,7 +7695,7 @@ public async System.Threading.Tasks.Task GetJobsAtAir } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -6705,38 +7712,276 @@ public async System.Threading.Tasks.Task GetJobsAtAir client_.Dispose(); } } - - /// Get "my" jobs, both personal and airline (active only) + + /// + /// Gets the available jobs at the specified airport. + /// + /// + /// sushi.at, 10/12/2021. + /// + /// The ICAO code of the airport. + /// The direction of the jobs to return. 0 = From, 1 = To, 2 = RoundTrip /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetMyJobsAsync() + public virtual System.Threading.Tasks.Task GetJobsAtAirportAsync(string icao, JobDirection direction) { - return GetMyJobsAsync(System.Threading.CancellationToken.None); + return GetJobsAtAirportAsync(icao, direction, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get "my" jobs, both personal and airline (active only) + /// + /// Gets the available jobs at the specified airport. + /// + /// + /// sushi.at, 10/12/2021. + /// + /// The ICAO code of the airport. + /// The direction of the jobs to return. 0 = From, 1 = To, 2 = RoundTrip /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetMyJobsAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetJobsAtAirportAsync(string icao, JobDirection direction, System.Threading.CancellationToken cancellationToken) { + if (icao == null) + throw new System.ArgumentNullException("icao"); + + if (direction == null) + throw new System.ArgumentNullException("direction"); + var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Job/myJobs"); - - var client_ = _httpClient; - var disposeClient_ = false; + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Job/atAirport/{icao}/{direction}"); + urlBuilder_.Replace("{icao}", System.Uri.EscapeDataString(ConvertToString(icao, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{direction}", System.Uri.EscapeDataString(ConvertToString(direction, System.Globalization.CultureInfo.InvariantCulture))); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Gets the available jobs at the specified airport for the specified aircraft type category and simulator. + /// + /// + /// sushi.at, 10/12/2021. + /// + /// The ICAO code of the airport. + /// The direction of the jobs to return. 0 = From, 1 = To, 2 = RoundTrip + /// The aircraft type category to return jobs for (recommended category). 0 = SEP, 1 = MEP, 2 = SET, 3 = MET, 4 = JET, 5 = REG, 6 = NBA, 7 = WBA, 8 = HEL + /// The simulator (or NULL for all simulators). 0 = MSFS, 1 = XPlane11 + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetJobsAtAirportForCategoryAndSimulatorAsync(string icao, JobDirection direction, AircraftTypeCategory category, Simulator simulator) + { + return GetJobsAtAirportForCategoryAndSimulatorAsync(icao, direction, category, simulator, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets the available jobs at the specified airport for the specified aircraft type category and simulator. + /// + /// + /// sushi.at, 10/12/2021. + /// + /// The ICAO code of the airport. + /// The direction of the jobs to return. 0 = From, 1 = To, 2 = RoundTrip + /// The aircraft type category to return jobs for (recommended category). 0 = SEP, 1 = MEP, 2 = SET, 3 = MET, 4 = JET, 5 = REG, 6 = NBA, 7 = WBA, 8 = HEL + /// The simulator (or NULL for all simulators). 0 = MSFS, 1 = XPlane11 + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetJobsAtAirportForCategoryAndSimulatorAsync(string icao, JobDirection direction, AircraftTypeCategory category, Simulator simulator, System.Threading.CancellationToken cancellationToken) + { + if (icao == null) + throw new System.ArgumentNullException("icao"); + + if (direction == null) + throw new System.ArgumentNullException("direction"); + + if (category == null) + throw new System.ArgumentNullException("category"); + + if (simulator == null) + throw new System.ArgumentNullException("simulator"); + + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Job/atAirportForCategoryAndSim/{icao}/{direction}/{category}/{simulator}"); + urlBuilder_.Replace("{icao}", System.Uri.EscapeDataString(ConvertToString(icao, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{direction}", System.Uri.EscapeDataString(ConvertToString(direction, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{category}", System.Uri.EscapeDataString(ConvertToString(category, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{simulator}", System.Uri.EscapeDataString(ConvertToString(simulator, System.Globalization.CultureInfo.InvariantCulture))); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Gets the available jobs at the specified airport for the specified aircraft type category. + /// + /// + /// sushi.at, 10/12/2021. + /// + /// The ICAO code of the airport. + /// The direction of the jobs to return. 0 = From, 1 = To, 2 = RoundTrip + /// The aircraft type category to return jobs for (recommended category). 0 = SEP, 1 = MEP, 2 = SET, 3 = MET, 4 = JET, 5 = REG, 6 = NBA, 7 = WBA, 8 = HEL + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetJobsAtAirportForCategoryAsync(string icao, JobDirection direction, AircraftTypeCategory category) + { + return GetJobsAtAirportForCategoryAsync(icao, direction, category, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets the available jobs at the specified airport for the specified aircraft type category. + /// + /// + /// sushi.at, 10/12/2021. + /// + /// The ICAO code of the airport. + /// The direction of the jobs to return. 0 = From, 1 = To, 2 = RoundTrip + /// The aircraft type category to return jobs for (recommended category). 0 = SEP, 1 = MEP, 2 = SET, 3 = MET, 4 = JET, 5 = REG, 6 = NBA, 7 = WBA, 8 = HEL + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetJobsAtAirportForCategoryAsync(string icao, JobDirection direction, AircraftTypeCategory category, System.Threading.CancellationToken cancellationToken) + { + if (icao == null) + throw new System.ArgumentNullException("icao"); + + if (direction == null) + throw new System.ArgumentNullException("direction"); + + if (category == null) + throw new System.ArgumentNullException("category"); + + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Job/atAirportForCategory/{icao}/{direction}/{category}"); + urlBuilder_.Replace("{icao}", System.Uri.EscapeDataString(ConvertToString(icao, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{direction}", System.Uri.EscapeDataString(ConvertToString(direction, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Replace("{category}", System.Uri.EscapeDataString(ConvertToString(category, System.Globalization.CultureInfo.InvariantCulture))); + + var client_ = _httpClient; + var disposeClient_ = false; try { using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) { request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - + PrepareRequest(client_, request_, urlBuilder_); + var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + PrepareRequest(client_, request_, url_); - + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try @@ -6747,13 +7992,13 @@ public async System.Threading.Tasks.Task GetMyJobsAsy 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_).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); @@ -6762,7 +8007,7 @@ public async System.Threading.Tasks.Task GetMyJobsAsy } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -6779,24 +8024,120 @@ public async System.Threading.Tasks.Task GetMyJobsAsy client_.Dispose(); } } - - /// Get plannable payloads plus basic information about flights they are already planned for. + + /// + /// Get "my" jobs, both personal and airline (active only) + /// + /// + /// sushi.at, 18/12/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetPlannablePayloadsAsync() + public virtual System.Threading.Tasks.Task GetMyJobsAsync() + { + return GetMyJobsAsync(System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get "my" jobs, both personal and airline (active only) + /// + /// + /// sushi.at, 18/12/2021. + /// + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetMyJobsAsync(System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Job/myJobs"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// + /// Get plannable payloads plus basic information about flights they are already planned for. + /// + /// + /// sushi.at, 19/12/2021. + /// + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetPlannablePayloadsAsync() { return GetPlannablePayloadsAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get plannable payloads plus basic information about flights they are already planned for. + /// + /// Get plannable payloads plus basic information about flights they are already planned for. + /// + /// + /// sushi.at, 19/12/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetPlannablePayloadsAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetPlannablePayloadsAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/Job/plannablePayloads"); - + var client_ = _httpClient; var disposeClient_ = false; try @@ -6805,12 +8146,14 @@ public async System.Threading.Tasks.Task { 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 @@ -6821,13 +8164,13 @@ public async System.Threading.Tasks.Task 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_).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); @@ -6836,7 +8179,7 @@ public async System.Threading.Tasks.Task } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -6853,24 +8196,34 @@ public async System.Threading.Tasks.Task client_.Dispose(); } } - - /// Get world statistics overview. + + /// + /// Get world statistics overview. + /// + /// + /// sushi.at, 02/07/2021. + /// /// Success /// A server side error occurred. - public System.Threading.Tasks.Task GetWorldStatisticsOverviewAsync() + public virtual System.Threading.Tasks.Task GetWorldStatisticsOverviewAsync() { return GetWorldStatisticsOverviewAsync(System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get world statistics overview. + /// + /// Get world statistics overview. + /// + /// + /// sushi.at, 02/07/2021. + /// /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task GetWorldStatisticsOverviewAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetWorldStatisticsOverviewAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/WorldStatistics"); - + var client_ = _httpClient; var disposeClient_ = false; try @@ -6879,12 +8232,14 @@ public async System.Threading.Tasks.Task Get { 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 @@ -6895,13 +8250,13 @@ public async System.Threading.Tasks.Task Get 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_).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); @@ -6910,7 +8265,7 @@ public async System.Threading.Tasks.Task Get } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -6927,30 +8282,40 @@ public async System.Threading.Tasks.Task Get client_.Dispose(); } } - - /// Manually request to populate an airport and return info text results. + + /// + /// Manually request to populate an airport and return info text results. + /// + /// + /// sushi.at, 05/07/2021. + /// /// The icao of the airport to populate. /// Success /// A server side error occurred. - public System.Threading.Tasks.Task PopulateAirportWithAircraftAsync(string icao) + public virtual System.Threading.Tasks.Task PopulateAirportWithAircraftAsync(string icao) { return PopulateAirportWithAircraftAsync(icao, System.Threading.CancellationToken.None); } - + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Manually request to populate an airport and return info text results. + /// + /// Manually request to populate an airport and return info text results. + /// + /// + /// sushi.at, 05/07/2021. + /// /// The icao of the airport to populate. /// Success /// A server side error occurred. - public async System.Threading.Tasks.Task PopulateAirportWithAircraftAsync(string icao, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task PopulateAirportWithAircraftAsync(string icao, System.Threading.CancellationToken cancellationToken) { if (icao == null) throw new System.ArgumentNullException("icao"); - + var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/WorldStatistics/populateAircraft/{icao}"); urlBuilder_.Replace("{icao}", System.Uri.EscapeDataString(ConvertToString(icao, System.Globalization.CultureInfo.InvariantCulture))); - + var client_ = _httpClient; var disposeClient_ = false; try @@ -6960,12 +8325,14 @@ public async System.Threading.Tasks.Task PopulateAirportWithA request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "text/plain"); 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 @@ -6976,13 +8343,13 @@ public async System.Threading.Tasks.Task PopulateAirportWithA 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_).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); @@ -6991,7 +8358,7 @@ public async System.Threading.Tasks.Task PopulateAirportWithA } else { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + 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); } } @@ -7008,7 +8375,7 @@ public async System.Threading.Tasks.Task PopulateAirportWithA client_.Dispose(); } } - + protected struct ObjectResponseResult { public ObjectResponseResult(T responseObject, string responseText) @@ -7016,21 +8383,21 @@ 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) + + 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); @@ -7065,14 +8432,14 @@ protected virtual async System.Threading.Tasks.Task> Rea } } } - + private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) { if (value == null) { - return null; + return ""; } - + if (value is System.Enum) { var name = System.Enum.GetName(value.GetType(), value); @@ -7088,8 +8455,9 @@ private string ConvertToString(object value, System.Globalization.CultureInfo cu return attribute.Value != null ? attribute.Value : name; } } - - return System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); + + 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) @@ -7105,4035 +8473,5543 @@ private string ConvertToString(object value, System.Globalization.CultureInfo cu 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 is null) ? string.Empty : result; + return result == null ? "" : result; } } - /// Account balances model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AccountBalances + /// + /// Account balances model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AccountBalances { - /// Gets or sets the account balance (of the user). + /// + /// Gets or sets the account balance (of the user). + /// [Newtonsoft.Json.JsonProperty("accountBalance", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public long AccountBalance { get; set; } - - /// Gets or sets the airline account balance (if user has the permission). + + /// + /// Gets or sets the airline account balance (if user has the permission). + /// [Newtonsoft.Json.JsonProperty("airlineAccountBalance", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public long? AirlineAccountBalance { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AccountBalancesApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AccountBalancesApiResponse { [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public AccountBalances Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Account overview model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AccountOverview + + /// + /// Account overview model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AccountOverview { - /// Gets or sets the name of the airline (if the user is a member of one). + /// + /// Gets or sets the name of the airline (if the user is a member of one). + /// [Newtonsoft.Json.JsonProperty("airlineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string AirlineName { get; set; } - - /// Gets or sets the Date/Time of when the user joined. + + /// + /// Gets or sets the Date/Time of when the user joined. + /// [Newtonsoft.Json.JsonProperty("joined", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset Joined { get; set; } - - /// Gets or sets the account name. + + /// + /// Gets or sets the account name. + /// [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Name { get; set; } - - /// Gets or sets the profile image. + + /// + /// Gets or sets the profile image. + /// [Newtonsoft.Json.JsonProperty("profileImage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public byte[] ProfileImage { get; set; } - - /// Gets or sets a value indicating whether the token renewal country verification is enabled. + + /// + /// Gets or sets a value indicating whether the token renewal country verification is enabled. + /// [Newtonsoft.Json.JsonProperty("tokenRenewalCountryVerification", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool TokenRenewalCountryVerification { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AccountOverviewApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AccountOverviewApiResponse { [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public AccountOverview Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Aircraft model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Aircraft + + /// + /// Aircraft model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class Aircraft { - /// Gets or sets the identifier of the airline owner (NULL if no airline owner). + /// + /// Gets or sets the airframe hours. + /// + [Newtonsoft.Json.JsonProperty("airframeHours", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double AirframeHours { get; set; } + + /// + /// Gets or sets the identifier of the airline owner (NULL if no airline owner). + /// [Newtonsoft.Json.JsonProperty("airlineOwnerID", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(3)] public string AirlineOwnerID { get; set; } - - /// Gets or sets the airport ICAO the plane is located at, note this is the departure airport if - /// the aircraft currently is flying. + + /// + /// Gets or sets the airport ICAO the plane is located at, note this is the departure airport if + ///
the aircraft currently is flying. + ///
[Newtonsoft.Json.JsonProperty("airportICAO", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(5, MinimumLength = 3)] public string AirportICAO { get; set; } - - /// Can the aircraft currently start a new flight? + + /// + /// Can the aircraft currently start a new flight? + /// [Newtonsoft.Json.JsonProperty("canStartFlight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool CanStartFlight { get; set; } - - /// Gets or sets the current fuel in gallons. + + /// + /// Gets or sets the engine 1 hours. + /// + [Newtonsoft.Json.JsonProperty("engine1Hours", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Engine1Hours { get; set; } + + /// + /// Gets or sets the engine 2 hours. + /// + [Newtonsoft.Json.JsonProperty("engine2Hours", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Engine2Hours { get; set; } + + /// + /// Gets or sets the engine 3 hours. + /// + [Newtonsoft.Json.JsonProperty("engine3Hours", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Engine3Hours { get; set; } + + /// + /// Gets or sets the engine 4 hours. + /// + [Newtonsoft.Json.JsonProperty("engine4Hours", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Engine4Hours { get; set; } + + /// + /// Gets or sets the current fuel in gallons. + /// [Newtonsoft.Json.JsonProperty("fuel", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Fuel { get; set; } - - /// Gets or sets the Date/Time until the aircraft is fuelling. + + /// + /// Gets or sets the Date/Time until the aircraft is fuelling. + /// [Newtonsoft.Json.JsonProperty("fuellingUntil", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset? FuellingUntil { get; set; } - - /// Gets the current heading of the aircraft, or 0 if not available. + + /// + /// Gets the current heading of the aircraft, or 0 if not available. + /// [Newtonsoft.Json.JsonProperty("heading", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Heading { get; set; } - - /// Gets the latitude. + + /// + /// Gets the latitude. + /// [Newtonsoft.Json.JsonProperty("latitude", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Latitude { get; set; } - - /// Gets or sets the life time expense (for the current owner only). + + /// + /// Gets or sets the life time expense (for the current owner only). + /// [Newtonsoft.Json.JsonProperty("lifeTimeExpense", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public long LifeTimeExpense { get; set; } - - /// Gets or sets the life time income (for the current owner only). + + /// + /// Gets or sets the life time income (for the current owner only). + /// [Newtonsoft.Json.JsonProperty("lifeTimeIncome", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public long LifeTimeIncome { get; set; } - - /// Gets or sets the Date/Time until the aircraft is loading payload (cargo or pax). + + /// + /// Gets or sets the Date/Time until the aircraft is loading payload (cargo or pax). + /// [Newtonsoft.Json.JsonProperty("loadingUntil", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset? LoadingUntil { get; set; } - - /// Gets the longitude. + + /// + /// Gets the longitude. + /// [Newtonsoft.Json.JsonProperty("longitude", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Longitude { get; set; } - - /// Gets or sets the user-chosen name of the aircraft. + + /// + /// Gets or sets the user-chosen name of the aircraft. + /// [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(30)] public string Name { get; set; } - - /// Gets or sets the identifier of the user that owns this aircraft (NULL if no user owner). + + /// + /// Gets or sets the identifier of the user that owns this aircraft (NULL if no user owner). + /// [Newtonsoft.Json.JsonProperty("ownerID", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255)] public string OwnerID { get; set; } - - /// Gets the owner name. + + /// + /// Gets the owner name. + /// [Newtonsoft.Json.JsonProperty("ownerName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string OwnerName { get; set; } - - /// Gets or sets the payloads currently loaded onto this aircraft. + + /// + /// Gets or sets the payloads currently loaded onto this aircraft. + /// [Newtonsoft.Json.JsonProperty("payloads", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Payloads { get; set; } - - /// Gets or sets the purchase price for the aircraft. Null if not available for purchase. + + /// + /// Gets or sets the purchase price for the aircraft. Null if not available for purchase. + /// [Newtonsoft.Json.JsonProperty("purchasePrice", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int? PurchasePrice { get; set; } - - /// Gets or sets the aircraft registration. + + /// + /// Gets or sets the aircraft registration. + /// [Newtonsoft.Json.JsonProperty("registry", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(12, MinimumLength = 7)] public string Registry { get; set; } - - /// Gets or sets the rent price per flight hour for the aircraft. Null if not available for rent. + + /// + /// Gets or sets the rent price per flight hour for the aircraft. Null if not available for rent. + /// [Newtonsoft.Json.JsonProperty("rentPrice", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int? RentPrice { get; set; } - - /// Gets the current status of the aircraft. + + /// + /// Gets the current status of the aircraft. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public AircraftType Type { get; set; } - - /// Gets or sets the identifier of the aircraft type. + + /// + /// Gets or sets the identifier of the aircraft type. + /// [Newtonsoft.Json.JsonProperty("typeID", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public System.Guid TypeID { get; set; } - - /// Gets or sets the Date/Time until the aircraft is warping. + + /// + /// Gets or sets the Date/Time until the aircraft is warping. + /// [Newtonsoft.Json.JsonProperty("warpingUntil", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset? WarpingUntil { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AircraftApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AircraftApiResponse { [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Aircraft Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AircraftIEnumerableApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AircraftIEnumerableApiResponse { - /// Gets or sets the embedded data of type T. + /// + /// Gets or sets the embedded data of type T. + /// [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Aircraft manufacturer model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AircraftManufacturer + + /// + /// Aircraft manufacturer model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AircraftManufacturer { - /// Short identifier string for the manufacturer. + /// + /// Short identifier string for the manufacturer. + /// [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(5, MinimumLength = 3)] public string Id { get; set; } - - /// Full name of manufacturer. + + /// + /// Full name of manufacturer. + /// [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(50)] public string Name { get; set; } - - + } - - /// Aircraft manufacturer delivery location model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AircraftManufacturerDeliveryLocation + + /// + /// Aircraft manufacturer delivery location model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AircraftManufacturerDeliveryLocation { - /// Gets or sets the identifier of the aircraft type. + /// + /// Gets or sets the identifier of the aircraft type. + /// [Newtonsoft.Json.JsonProperty("aircraftTypeID", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public System.Guid AircraftTypeID { get; set; } - - /// Gets or sets the airport icao. + + /// + /// Gets or sets the airport icao. + /// [Newtonsoft.Json.JsonProperty("airportICAO", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(5, MinimumLength = 3)] public string AirportICAO { get; set; } - - /// Gets the name of the airport. + + /// + /// Gets the name of the airport. + /// [Newtonsoft.Json.JsonProperty("airportName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string AirportName { get; set; } - - /// Gets or sets the identifier of the manufacturer. + + /// + /// Gets or sets the identifier of the manufacturer. + /// [Newtonsoft.Json.JsonProperty("manufacturerID", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(5, MinimumLength = 3)] public string ManufacturerID { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AircraftManufacturerIEnumerableApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AircraftManufacturerIEnumerableApiResponse { - /// Gets or sets the embedded data of type T. + /// + /// Gets or sets the embedded data of type T. + /// [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Aircraft search around airport model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AircraftSearchAroundAirport + + /// + /// Aircraft search around airport model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AircraftSearchAroundAirport { - /// Gets or sets the airport icao. + /// + /// Gets or sets the airport icao. + /// [Newtonsoft.Json.JsonProperty("airportICAO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string AirportICAO { get; set; } - + [Newtonsoft.Json.JsonProperty("category", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public AircraftTypeCategory Category { get; set; } - - /// Gets or sets a value indicating whether to filter by category (nullable enum for Category was ignored). + + /// + /// Gets or sets a value indicating whether to filter by category (nullable enum for Category was ignored). + /// [Newtonsoft.Json.JsonProperty("filterByCategory", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool FilterByCategory { get; set; } - - /// Gets or sets the manufacturer. + + /// + /// Gets or sets the manufacturer. + /// [Newtonsoft.Json.JsonProperty("manufacturer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Manufacturer { get; set; } - - /// Gets or sets the maximum results. + + /// + /// Gets or sets the maximum results. + /// [Newtonsoft.Json.JsonProperty("maxResults", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int MaxResults { get; set; } - - /// Gets or sets the type name. + + /// + /// Gets or sets the type name. + /// [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Name { get; set; } - - /// Gets or sets a value indicating whether to only include vanilla aircraft in the search results. + + /// + /// Gets or sets a value indicating whether to only include vanilla aircraft in the search results. + /// [Newtonsoft.Json.JsonProperty("onlyVanilla", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool OnlyVanilla { get; set; } - - /// Gets or sets the radius in nautical miles. + + /// + /// Gets or sets the radius in nautical miles. + /// [Newtonsoft.Json.JsonProperty("radius", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int Radius { get; set; } - - + } - - /// Aircraft search in country model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AircraftSearchInCountry + + /// + /// Aircraft search in country model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AircraftSearchInCountry { [Newtonsoft.Json.JsonProperty("category", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public AircraftTypeCategory Category { get; set; } - + [Newtonsoft.Json.JsonProperty("country", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Country Country { get; set; } - - /// Gets or sets a value indicating whether to filter by category (nullable enum for Category was ignored). + + /// + /// Gets or sets a value indicating whether to filter by category (nullable enum for Category was ignored). + /// [Newtonsoft.Json.JsonProperty("filterByCategory", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool FilterByCategory { get; set; } - - /// Gets or sets the manufacturer. + + /// + /// Gets or sets the manufacturer. + /// [Newtonsoft.Json.JsonProperty("manufacturer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Manufacturer { get; set; } - - /// Gets or sets the maximum results. + + /// + /// Gets or sets the maximum results. + /// [Newtonsoft.Json.JsonProperty("maxResults", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int MaxResults { get; set; } - - /// Gets or sets the type name. + + /// + /// Gets or sets the type name. + /// [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Name { get; set; } - - /// Gets or sets a value indicating whether to only include vanilla aircraft in the search results. + + /// + /// Gets or sets a value indicating whether to only include vanilla aircraft in the search results. + /// [Newtonsoft.Json.JsonProperty("onlyVanilla", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool OnlyVanilla { get; set; } - - + } - - /// Aircraft type model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AircraftType + + /// + /// Aircraft type model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AircraftType { - /// Gets or sets the ATCModel property in the sim. + /// + /// Gets or sets the ATCModel property in the sim. + /// [Newtonsoft.Json.JsonProperty("atcModel", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(100)] public string AtcModel { get; set; } - - /// Gets or sets the ATCType property in the sim. + + /// + /// Gets or sets the ATCType property in the sim. + /// [Newtonsoft.Json.JsonProperty("atcType", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(100)] public string AtcType { get; set; } - + [Newtonsoft.Json.JsonProperty("category", Required = Newtonsoft.Json.Required.Always)] public AircraftTypeCategory Category { get; set; } - - /// Gets or sets the comments (moderation status, retired, needs fixing, etc.). + + /// + /// Gets or sets the comments (moderation status, retired, needs fixing, etc.). + /// [Newtonsoft.Json.JsonProperty("comments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Comments { get; set; } - - /// Gets or sets the custom agent module name, default is NULL for none. + + /// + /// Gets or sets the custom agent module name, default is NULL for none. + /// [Newtonsoft.Json.JsonProperty("customAgentModule", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(20)] public string CustomAgentModule { get; set; } - - /// Gets or sets the delivery locations. + + /// + /// Gets or sets the delivery locations. + /// [Newtonsoft.Json.JsonProperty("deliveryLocations", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection DeliveryLocations { get; set; } - - /// Gets or sets a value indicating whether the detailed checks are TEMPORARILY disabled - only - /// use this on patch days until a new version of the plane can be added. + + /// + /// Gets or sets a value indicating whether the detailed checks are TEMPORARILY disabled - only + ///
use this on patch days until a new version of the plane can be added. + ///
[Newtonsoft.Json.JsonProperty("detailedChecksDisabled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool DetailedChecksDisabled { get; set; } - - /// Gets or sets the empty weight in pounds. + + /// + /// Gets or sets the empty weight in pounds. + /// [Newtonsoft.Json.JsonProperty("emptyWeight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double EmptyWeight { get; set; } - - /// Gets or sets a value indicating whether this aircraft type is enabled. + + /// + /// Gets or sets a value indicating whether this aircraft type is enabled. + /// [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool Enabled { get; set; } - - /// Gets or sets the number of engines. + + /// + /// Gets or sets the number of engines. + /// [Newtonsoft.Json.JsonProperty("engineCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int EngineCount { get; set; } - - /// Gets or sets the engine model. + + /// + /// Gets or sets the engine model. + /// [Newtonsoft.Json.JsonProperty("engineModel", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(50)] public string EngineModel { get; set; } - + [Newtonsoft.Json.JsonProperty("engineType", Required = Newtonsoft.Json.Required.Always)] public EngineType EngineType { get; set; } - - /// Gets or sets a value indicating whether this aircraft has flaps. + + /// + /// Gets or sets a value indicating whether this aircraft has flaps. + /// [Newtonsoft.Json.JsonProperty("flapsAvailable", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool FlapsAvailable { get; set; } - - /// Gets or sets the fuel total capacity in gallons. + + /// + /// Gets or sets the fuel total capacity in gallons. + /// [Newtonsoft.Json.JsonProperty("fuelTotalCapacity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double FuelTotalCapacity { get; set; } - + [Newtonsoft.Json.JsonProperty("fuelType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public FuelType FuelType { get; set; } - - /// Gets or sets the fuel weight per gallon (default values are 6 lbs/gallon avgas and 6.66 lbs/gallon jetfuel). + + /// + /// Gets or sets the fuel weight per gallon (default values are 6 lbs/gallon avgas and 6.66 lbs/gallon jetfuel). + /// [Newtonsoft.Json.JsonProperty("fuelWeightPerGallon", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double FuelWeightPerGallon { get; set; } - - /// Gets a value indicating whether this aircraft type has an image uploaded. + + /// + /// Gets a value indicating whether this aircraft type has an image uploaded. + /// [Newtonsoft.Json.JsonProperty("hasAircraftImage", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool HasAircraftImage { get; set; } - - /// Gets a value indicating whether this aircraft type has variants. + + /// + /// Gets a value indicating whether this aircraft type has variants. + /// [Newtonsoft.Json.JsonProperty("hasVariants", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool HasVariants { get; set; } - - /// Gets or sets the identifier. + + /// + /// Gets or sets the identifier. + /// [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Guid Id { get; set; } - - /// Gets or sets a value indicating whether this aircraft type should be included in the world - /// population, or only when a player buys one (use for popular mods only!). + + /// + /// Gets or sets a value indicating whether this aircraft type should be included in the world + ///
population, or only when a player buys one (use for popular mods only!). + ///
[Newtonsoft.Json.JsonProperty("includeInWorldPopulation", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IncludeInWorldPopulation { get; set; } - - /// Gets or sets a value indicating whether this aircraft has retractable landing gear. + + /// + /// Gets or sets a value indicating whether this aircraft has retractable landing gear. + /// [Newtonsoft.Json.JsonProperty("isGearRetractable", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsGearRetractable { get; set; } - - /// Gets or sets a value indicating whether this aircraft is historic (can't be purchased new). + + /// + /// Gets or sets a value indicating whether this aircraft is historic (can't be purchased new). + /// [Newtonsoft.Json.JsonProperty("isHistoric", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsHistoric { get; set; } - - /// Gets or sets a value indicating whether this aircraft is available in the vanilla sim or is - /// coming from a mod. + + /// + /// Gets or sets a value indicating whether this aircraft is available in the vanilla sim or is + ///
coming from a mod. + ///
[Newtonsoft.Json.JsonProperty("isVanilla", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsVanilla { get; set; } - - /// Gets or sets the ID of the aircraft that this one is a variant of. + + /// + /// Gets or sets the ID of the aircraft that this one is a variant of. + /// [Newtonsoft.Json.JsonProperty("isVariantOf", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Guid? IsVariantOf { get; set; } - - /// Gets or sets the identifier of the last edited by user. + + /// + /// Gets or sets the identifier of the last edited by user. + /// [Newtonsoft.Json.JsonProperty("lastEditedByID", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255)] public string LastEditedByID { get; set; } - - /// Gets the name of the last edited by user. + + /// + /// Gets the name of the last edited by user. + /// [Newtonsoft.Json.JsonProperty("lastEditedByName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string LastEditedByName { get; set; } - + [Newtonsoft.Json.JsonProperty("manufacturer", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public AircraftManufacturer Manufacturer { get; set; } - - /// Gets or sets the identifier of the manufacturer. + + /// + /// Gets or sets the identifier of the manufacturer. + /// [Newtonsoft.Json.JsonProperty("manufacturerID", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(5, MinimumLength = 3)] public string ManufacturerID { get; set; } - - /// Gets or sets the maximum gross weight in pounds. + + /// + /// Gets or sets the maximum gross weight in pounds. + /// [Newtonsoft.Json.JsonProperty("maxGrossWeight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double MaxGrossWeight { get; set; } - - /// Gets or sets the maximum payload delta allowed during a flight (to compensate for consumables - /// like de-icing fluid). + + /// + /// Gets or sets the maximum payload delta allowed during a flight (to compensate for consumables + ///
like de-icing fluid). + ///
[Newtonsoft.Json.JsonProperty("maxPayloadDeltaAllowed", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int MaxPayloadDeltaAllowed { get; set; } - - /// Gets or sets the maximum selling price. + + /// + /// Gets or sets the maximum selling price. + /// [Newtonsoft.Json.JsonProperty("maxPrice", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int MaxPrice { get; set; } - - /// Minimum runway length in feet. + + /// + /// Minimum runway length in feet. + /// [Newtonsoft.Json.JsonProperty("minimumRunwayLength", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int MinimumRunwayLength { get; set; } - - /// Gets or sets the minimum selling price. + + /// + /// Gets or sets the minimum selling price. + /// [Newtonsoft.Json.JsonProperty("minPrice", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int MinPrice { get; set; } - - /// Gets or sets the name of the aircraft. + + /// + /// Gets or sets the name of the aircraft. + /// [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(50)] public string Name { get; set; } - - /// Gets or sets a value indicating whether the aircraft needs a co-pilot. + + /// + /// Gets or sets a value indicating whether the aircraft needs a co-pilot. + /// [Newtonsoft.Json.JsonProperty("needsCoPilot", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool NeedsCoPilot { get; set; } - - /// Gets or sets a value indicating whether the aircraft needs a flight engineer. + + /// + /// Gets or sets a value indicating whether the aircraft needs a flight engineer. + /// [Newtonsoft.Json.JsonProperty("needsFlightEngineer", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool NeedsFlightEngineer { get; set; } - - /// Gets or sets the next version of this aircraft type - to migrate existing aircraft to this - /// new type. + + /// + /// Gets or sets the next version of this aircraft type - to migrate existing aircraft to this + ///
new type. + ///
[Newtonsoft.Json.JsonProperty("nextVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Guid? NextVersion { get; set; } - + [Newtonsoft.Json.JsonProperty("overrideFuelType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public FuelType OverrideFuelType { get; set; } - - /// Gets or sets a value indicating whether the aircraft type requires manual fuelling. + + /// + /// Gets or sets a value indicating whether the aircraft type requires manual fuelling. + /// [Newtonsoft.Json.JsonProperty("requiresManualFuelling", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool RequiresManualFuelling { get; set; } - - /// Gets or sets a value indicating whether the aircraft type requires manual loading. + + /// + /// Gets or sets a value indicating whether the aircraft type requires manual loading. + /// [Newtonsoft.Json.JsonProperty("requiresManualLoading", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool RequiresManualLoading { get; set; } - + [Newtonsoft.Json.JsonProperty("simulator", Required = Newtonsoft.Json.Required.Always)] public Simulator Simulator { get; set; } - - /// Gets or sets the identifier of the uploader user. + + /// + /// Gets or sets the identifier of the uploader user. + /// [Newtonsoft.Json.JsonProperty("uploaderID", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(255)] public string UploaderID { get; set; } - - /// Gets the name of the uploader. + + /// + /// Gets the name of the uploader. + /// [Newtonsoft.Json.JsonProperty("uploaderName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string UploaderName { get; set; } - - /// Gets or sets the variants of this aircraft. + + /// + /// Gets or sets the variants of this aircraft. + /// [Newtonsoft.Json.JsonProperty("variants", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Variants { get; set; } - - /// Gets or sets the version number of this type. + + /// + /// Gets or sets the version number of this type. + /// [Newtonsoft.Json.JsonProperty("versionNumber", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int VersionNumber { get; set; } - - + } - - /// Values that represent aircraft type categories. 0 = SEP, 1 = MEP, 2 = SET, 3 = MET, 4 = JET, 5 = REG, 6 = NBA, 7 = WBA, 8 = HEL - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// Values that represent aircraft type categories. 0 = SEP, 1 = MEP, 2 = SET, 3 = MET, 4 = JET, 5 = REG, 6 = NBA, 7 = WBA, 8 = HEL + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] public enum AircraftTypeCategory { + SEP = 0, - + MEP = 1, - + SET = 2, - + MET = 3, - + JET = 4, - + REG = 5, - + NBA = 6, - + WBA = 7, - + HEL = 8, - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AircraftTypeIEnumerableApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AircraftTypeIEnumerableApiResponse { - /// Gets or sets the embedded data of type T. + /// + /// Gets or sets the embedded data of type T. + /// [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Aircraft type upgrade model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AircraftTypeUpgrade + + /// + /// Aircraft type upgrade model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AircraftTypeUpgrade { - /// Gets or sets the number of aircraft affected by this upgrade. + /// + /// Gets or sets the number of aircraft affected by this upgrade. + /// [Newtonsoft.Json.JsonProperty("aircraftCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int AircraftCount { get; set; } - + [Newtonsoft.Json.JsonProperty("from", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public AircraftType From { get; set; } - + [Newtonsoft.Json.JsonProperty("to", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public AircraftType To { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AircraftTypeUpgradeIEnumerableApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AircraftTypeUpgradeIEnumerableApiResponse { - /// Gets or sets the embedded data of type T. + /// + /// Gets or sets the embedded data of type T. + /// [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AirlineMemberAirlinePermissionHashSetDictionaryApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AirlineMemberAirlinePermissionHashSetDictionaryApiResponse { - /// Gets or sets the embedded data of type T. + /// + /// Gets or sets the embedded data of type T. + /// [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.IDictionary> Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Airline roles. 10 = BuyAircraft, 11 = SellAircraft, 12 = RentAircraft, 13 = RentOutAircraft, 14 = AssignAircraft, 15 = RenameAircraft, 20 = BuyFBO, 21 = SellFBO, 22 = RentFBO, 23 = RentOutFBO, 24 = RenameFBO, 25 = OrderFuel, 30 = AcceptJobs, 31 = Dispatch, 32 = OutsourceJobs, 33 = AbortJobs, 40 = ModifyAircraft, 41 = MaintainAircraft, 42 = ReplaceAircraftParts, 43 = PerformGroundOperations, 50 = FinancialRecords, 90 = ChangePermissions, 91 = BoardMember, 92 = AllPermissions - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// Airline roles. 10 = BuyAircraft, 11 = SellAircraft, 12 = RentAircraft, 13 = RentOutAircraft, 14 = AssignAircraft, 15 = RenameAircraft, 20 = BuyFBO, 21 = SellFBO, 22 = RentFBO, 23 = RentOutFBO, 24 = RenameFBO, 25 = OrderFuel, 30 = AcceptJobs, 31 = Dispatch, 32 = OutsourceJobs, 33 = AbortJobs, 40 = ModifyAircraft, 41 = MaintainAircraft, 42 = ReplaceAircraftParts, 43 = PerformGroundOperations, 50 = FinancialRecords, 90 = ChangePermissions, 91 = BoardMember, 92 = AllPermissions + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] public enum AirlinePermission { + BuyAircraft = 10, - + SellAircraft = 11, - + RentAircraft = 12, - + RentOutAircraft = 13, - + AssignAircraft = 14, - + RenameAircraft = 15, - + BuyFBO = 20, - + SellFBO = 21, - + RentFBO = 22, - + RentOutFBO = 23, - + RenameFBO = 24, - + OrderFuel = 25, - + AcceptJobs = 30, - + Dispatch = 31, - + OutsourceJobs = 32, - + AbortJobs = 33, - + ModifyAircraft = 40, - + MaintainAircraft = 41, - + ReplaceAircraftParts = 42, - + PerformGroundOperations = 43, - + FinancialRecords = 50, - + ChangePermissions = 90, - + BoardMember = 91, - + AllPermissions = 92, - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AirlinePermissionListApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AirlinePermissionListApiResponse { - /// Gets or sets the embedded data of type T. + /// + /// Gets or sets the embedded data of type T. + /// [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Airport model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Airport + + /// + /// Airport model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class Airport { - /// Gets or sets the altitude of the airport in feet. + /// + /// Gets or sets the altitude of the airport in feet. + /// [Newtonsoft.Json.JsonProperty("altitude", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int Altitude { get; set; } - - /// Gets the approaches. + + /// + /// Gets the approaches. + /// [Newtonsoft.Json.JsonProperty("approaches", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Approaches { get; set; } - - /// Gets or sets the ATIS frequency (if available). + + /// + /// Gets or sets the ATIS frequency (if available). + /// [Newtonsoft.Json.JsonProperty("atisFrequency", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int? AtisFrequency { get; set; } - - /// Gets or sets the AV gas price in SkyBucks/Gallon. + + /// + /// Gets or sets the AV gas price in SkyBucks/Gallon. + /// [Newtonsoft.Json.JsonProperty("avGasPrice", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public float AvGasPrice { get; set; } - - /// Gets or sets the city. + + /// + /// Gets or sets the city. + /// [Newtonsoft.Json.JsonProperty("city", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(50)] public string City { get; set; } - - /// Gets or sets the number of GA ramps. + + /// + /// Gets or sets the number of GA ramps. + /// [Newtonsoft.Json.JsonProperty("gaRamps", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int GaRamps { get; set; } - - /// Gets or sets the number of gates. + + /// + /// Gets or sets the number of gates. + /// [Newtonsoft.Json.JsonProperty("gates", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int Gates { get; set; } - - /// Gets or sets a value indicating whether the airport has AV gas for refueling. + + /// + /// Gets or sets a value indicating whether the airport has AV gas for refueling. + /// [Newtonsoft.Json.JsonProperty("hasAvGas", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool HasAvGas { get; set; } - + [Newtonsoft.Json.JsonProperty("hasBeenPopulatedMSFS", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public ProcessingStatus HasBeenPopulatedMSFS { get; set; } - + [Newtonsoft.Json.JsonProperty("hasBeenPopulatedXP11", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public ProcessingStatus HasBeenPopulatedXP11 { get; set; } - - /// Gets or sets a value indicating whether the airport has jet fuel for refueling. + + /// + /// Gets or sets a value indicating whether the airport has jet fuel for refueling. + /// [Newtonsoft.Json.JsonProperty("hasJetFuel", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool HasJetFuel { get; set; } - - /// Gets or sets the ICAO identifier of the airport. + + /// + /// Gets or sets the ICAO identifier of the airport. + /// [Newtonsoft.Json.JsonProperty("icao", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(5, MinimumLength = 3)] public string Icao { get; set; } - - /// Gets or sets a value indicating whether the airport is closed. + + /// + /// Gets or sets a value indicating whether the airport is closed. + /// [Newtonsoft.Json.JsonProperty("isClosed", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsClosed { get; set; } - - /// Gets or sets a value indicating whether the airport is a military one. + + /// + /// Gets or sets a value indicating whether the airport is a military one. + /// [Newtonsoft.Json.JsonProperty("isMilitary", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsMilitary { get; set; } - - /// Gets or sets the jet fuel price in SkyBucks/Gallon. + + /// + /// Gets or sets the jet fuel price in SkyBucks/Gallon. + /// [Newtonsoft.Json.JsonProperty("jetFuelPrice", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public float JetFuelPrice { get; set; } - - /// Gets or sets the latitude of the airport. + + /// + /// Gets or sets the latitude of the airport. + /// [Newtonsoft.Json.JsonProperty("latitude", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Latitude { get; set; } - - /// Gets or sets the length of the longest runway in feet. + + /// + /// Gets or sets the length of the longest runway in feet. + /// [Newtonsoft.Json.JsonProperty("longestRunwayLength", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int LongestRunwayLength { get; set; } - - /// Gets or sets the surface type of the longest runway (can be "UNKNOWN" in a few cases). + + /// + /// Gets or sets the surface type of the longest runway (can be "UNKNOWN" in a few cases). + /// [Newtonsoft.Json.JsonProperty("longestRunwaySurface", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(7)] public string LongestRunwaySurface { get; set; } - - /// Gets or sets the longitude of the airport. + + /// + /// Gets or sets the longitude of the airport. + /// [Newtonsoft.Json.JsonProperty("longitude", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Longitude { get; set; } - - /// Gets or sets a value indicating whether the airport is available in MSFS 2020. + + /// + /// Gets or sets a value indicating whether the airport is available in MSFS 2020. + /// [Newtonsoft.Json.JsonProperty("msfs", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool Msfs { get; set; } - - /// Gets or sets the name. + + /// + /// Gets or sets the name. + /// [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(50)] public string Name { get; set; } - - /// Gets or sets the previous size of the airport (if available, used to detect size changes and - /// trigger other services like the aircraft world populator). + + /// + /// Gets or sets the previous size of the airport (if available, used to detect size changes and + ///
trigger other services like the aircraft world populator). + ///
[Newtonsoft.Json.JsonProperty("previousSize", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int? PreviousSize { get; set; } - - /// Gets or sets the number of runways. + + /// + /// Gets or sets the number of runways. + /// [Newtonsoft.Json.JsonProperty("runwayCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int RunwayCount { get; set; } - - /// Gets or sets the runways. + + /// + /// Gets or sets the runways. + /// [Newtonsoft.Json.JsonProperty("runways", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Runways { get; set; } - - /// S2 geometry cell ID for level 3. + + /// + /// S2 geometry cell ID for level 3. + /// [Newtonsoft.Json.JsonProperty("s2Cell3", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string S2Cell3 { get; set; } - - /// S2 geometry cell ID for level 4. + + /// + /// S2 geometry cell ID for level 4. + /// [Newtonsoft.Json.JsonProperty("s2Cell4", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string S2Cell4 { get; set; } - - /// S2 geometry cell ID for level 5. + + /// + /// S2 geometry cell ID for level 5. + /// [Newtonsoft.Json.JsonProperty("s2Cell5", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string S2Cell5 { get; set; } - - /// S2 geometry cell ID for level 6. + + /// + /// S2 geometry cell ID for level 6. + /// [Newtonsoft.Json.JsonProperty("s2Cell6", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string S2Cell6 { get; set; } - - /// S2 geometry cell ID for level 7. + + /// + /// S2 geometry cell ID for level 7. + /// [Newtonsoft.Json.JsonProperty("s2Cell7", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string S2Cell7 { get; set; } - - /// S2 geometry cell ID for level 8. + + /// + /// S2 geometry cell ID for level 8. + /// [Newtonsoft.Json.JsonProperty("s2Cell8", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string S2Cell8 { get; set; } - - /// S2 geometry cell ID for level 9. + + /// + /// S2 geometry cell ID for level 9. + /// [Newtonsoft.Json.JsonProperty("s2Cell9", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string S2Cell9 { get; set; } - - /// Gets or sets the size of the airport (from -1 to 6, NULL means size isn't calculated yet). + + /// + /// Gets or sets the size of the airport (from -1 to 6, NULL means size isn't calculated yet). + /// [Newtonsoft.Json.JsonProperty("size", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int? Size { get; set; } - - /// Gets or sets a value indicating whether the airport supports super-heavy aircraft like the Airbus A380. + + /// + /// Gets or sets a value indicating whether the airport supports super-heavy aircraft like the Airbus A380. + /// [Newtonsoft.Json.JsonProperty("supportsSuper", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool SupportsSuper { get; set; } - - /// Gets or sets the tower frequency (if available). + + /// + /// Gets or sets the tower frequency (if available). + /// [Newtonsoft.Json.JsonProperty("towerFrequency", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int? TowerFrequency { get; set; } - - /// Gets or sets the unicom frequency (if available). + + /// + /// Gets or sets the unicom frequency (if available). + /// [Newtonsoft.Json.JsonProperty("unicomFrequency", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int? UnicomFrequency { get; set; } - - /// Gets or sets a value indicating whether the airport is available in XPlane 11. + + /// + /// Gets or sets a value indicating whether the airport is available in XPlane 11. + /// [Newtonsoft.Json.JsonProperty("xP11", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool XP11 { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AirportApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AirportApiResponse { [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Airport Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Airport client package model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AirportClientPackage + + /// + /// Airport client package model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AirportClientPackage { - /// Gets or sets the creation time of the package. + /// + /// Gets or sets the creation time of the package. + /// [Newtonsoft.Json.JsonProperty("creationTime", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public System.DateTimeOffset CreationTime { get; set; } - - /// Gets or sets the package contents (g-zipped, base64 encoded). + + /// + /// Gets or sets the package contents (g-zipped, base64 encoded). + /// [Newtonsoft.Json.JsonProperty("package", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Package { get; set; } - - /// Gets or sets the package hash (SHA-256, base64 encoded) + + /// + /// Gets or sets the package hash (SHA-256, base64 encoded) + /// [Newtonsoft.Json.JsonProperty("packageHash", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string PackageHash { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AirportClientPackageApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AirportClientPackageApiResponse { [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public AirportClientPackage Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AirportIEnumerableApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class AirportIEnumerableApiResponse { - /// Gets or sets the embedded data of type T. + /// + /// Gets or sets the embedded data of type T. + /// [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Application token model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ApplicationToken + + /// + /// Application token model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class ApplicationToken { - /// Gets or sets the name of the application. + /// + /// Gets or sets the name of the application. + /// [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Name { get; set; } - - + } - - /// Approach model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Approach + + /// + /// Approach model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class Approach { - /// Gets or sets the airport ICAO. + /// + /// Gets or sets the airport ICAO. + /// [Newtonsoft.Json.JsonProperty("airportICAO", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(5, MinimumLength = 3)] public string AirportICAO { get; set; } - - /// Gets or sets the approach ID. + + /// + /// Gets or sets the approach ID. + /// [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int Id { get; set; } - - /// Gets or sets the name of the runway (can be NULL if approach doesn't specify a runway). + + /// + /// Gets or sets the name of the runway (can be NULL if approach doesn't specify a runway). + /// [Newtonsoft.Json.JsonProperty("runwayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(6)] public string RunwayName { get; set; } - - /// Gets or sets the approach type suffix (Y, Z, etc.). + + /// + /// Gets or sets the approach type suffix (Y, Z, etc.). + /// [Newtonsoft.Json.JsonProperty("suffix", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(1)] public string Suffix { get; set; } - - /// Gets or sets the approach type (ILS, RNAV, etc.). + + /// + /// Gets or sets the approach type (ILS, RNAV, etc.). + /// [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(25)] public string Type { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ByteArrayApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class ByteArrayApiResponse { - /// Gets or sets the embedded data of type T. + /// + /// Gets or sets the embedded data of type T. + /// [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public byte[] Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Change password model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ChangePassword + + /// + /// Change password model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class ChangePassword { - /// Gets or sets the password. + /// + /// Gets or sets the password. + /// [Newtonsoft.Json.JsonProperty("newPassword", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string NewPassword { get; set; } - - /// Gets or sets the password. + + /// + /// Gets or sets the password. + /// [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Password { get; set; } - - /// Gets or sets a value indicating whether to reset all OpenSky api tokens. + + /// + /// Gets or sets a value indicating whether to reset all OpenSky api tokens. + /// [Newtonsoft.Json.JsonProperty("resetTokens", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool ResetTokens { get; set; } - - + } - - /// Enum of two letter country codes according to ISO-3166. 1 = AF, 2 = AX, 3 = AL, 4 = DZ, 5 = AS, 6 = AD, 7 = AO, 8 = AI, 9 = AQ, 10 = AG, 11 = AR, 12 = AM, 13 = AW, 14 = AU, 15 = AT, 16 = AZ, 17 = BS, 18 = BH, 19 = BD, 20 = BB, 21 = BY, 22 = BE, 23 = BZ, 24 = BJ, 25 = BM, 26 = BT, 27 = BO, 28 = BQ, 29 = BA, 30 = BW, 31 = BV, 32 = BR, 33 = IO, 34 = BN, 35 = BG, 36 = BF, 37 = BI, 38 = CV, 39 = KH, 40 = CM, 41 = CA, 42 = KY, 43 = CF, 44 = TD, 45 = CL, 46 = CN, 47 = CX, 48 = CC, 49 = CO, 50 = KM, 51 = CG, 52 = CD, 53 = CK, 54 = CR, 55 = CI, 56 = HR, 57 = CU, 58 = CW, 59 = CY, 60 = CZ, 61 = DK, 62 = DJ, 63 = DM, 64 = DO, 65 = EC, 66 = EG, 67 = SV, 68 = GQ, 69 = ER, 70 = EE, 71 = ET, 72 = FK, 73 = FO, 74 = FJ, 75 = FI, 76 = FR, 77 = GF, 78 = PF, 79 = TF, 80 = GA, 81 = GM, 82 = GE, 83 = DE, 84 = GH, 85 = GI, 86 = GR, 87 = GL, 88 = GD, 89 = GP, 90 = GU, 91 = GT, 92 = GG, 93 = GN, 94 = GW, 95 = GY, 96 = HT, 97 = HM, 98 = VA, 99 = HN, 100 = HK, 101 = HU, 102 = IS, 103 = IN, 104 = ID, 105 = IR, 106 = IQ, 107 = IE, 108 = IM, 109 = IL, 110 = IT, 111 = JM, 112 = JP, 113 = JE, 114 = JO, 115 = KZ, 116 = KE, 117 = KI, 118 = KP, 119 = KR, 120 = KW, 121 = KG, 122 = LA, 123 = LV, 124 = LB, 125 = LS, 126 = LR, 127 = LY, 128 = LI, 129 = LT, 130 = LU, 131 = MO, 132 = MK, 133 = MG, 134 = MW, 135 = MY, 136 = MV, 137 = ML, 138 = MT, 139 = MH, 140 = MQ, 141 = MR, 142 = MU, 143 = YT, 144 = MX, 145 = FM, 146 = MD, 147 = MC, 148 = MN, 149 = ME, 150 = MS, 151 = MA, 152 = MZ, 153 = MM, 154 = NA, 155 = NR, 156 = NP, 157 = NL, 158 = NC, 159 = NZ, 160 = NI, 161 = NE, 162 = NG, 163 = NU, 164 = NF, 165 = MP, 166 = NO, 167 = OM, 168 = PK, 169 = PW, 170 = PS, 171 = PA, 172 = PG, 173 = PY, 174 = PE, 175 = PH, 176 = PN, 177 = PL, 178 = PT, 179 = PR, 180 = QA, 181 = RE, 182 = RO, 183 = RU, 184 = RW, 185 = BL, 186 = SH, 187 = KN, 188 = LC, 189 = MF, 190 = PM, 191 = VC, 192 = WS, 193 = SM, 194 = ST, 195 = SA, 196 = SN, 197 = RS, 198 = SC, 199 = SL, 200 = SG, 201 = SX, 202 = SK, 203 = SI, 204 = SB, 205 = SO, 206 = ZA, 207 = GS, 208 = SS, 209 = ES, 210 = LK, 211 = SD, 212 = SR, 213 = SJ, 214 = SZ, 215 = SE, 216 = CH, 217 = SY, 218 = TW, 219 = TJ, 220 = TZ, 221 = TH, 222 = TL, 223 = TG, 224 = TK, 225 = TO, 226 = TT, 227 = TN, 228 = TR, 229 = TM, 230 = TC, 231 = TV, 232 = UG, 233 = UA, 234 = AE, 235 = GB, 236 = US, 237 = UM, 238 = UY, 239 = UZ, 240 = VU, 241 = VE, 242 = VN, 243 = VG, 244 = VI, 245 = WF, 246 = EH, 247 = YE, 248 = ZM, 249 = ZW, 250 = XK - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// Enum of two letter country codes according to ISO-3166. 1 = AF, 2 = AX, 3 = AL, 4 = DZ, 5 = AS, 6 = AD, 7 = AO, 8 = AI, 9 = AQ, 10 = AG, 11 = AR, 12 = AM, 13 = AW, 14 = AU, 15 = AT, 16 = AZ, 17 = BS, 18 = BH, 19 = BD, 20 = BB, 21 = BY, 22 = BE, 23 = BZ, 24 = BJ, 25 = BM, 26 = BT, 27 = BO, 28 = BQ, 29 = BA, 30 = BW, 31 = BV, 32 = BR, 33 = IO, 34 = BN, 35 = BG, 36 = BF, 37 = BI, 38 = CV, 39 = KH, 40 = CM, 41 = CA, 42 = KY, 43 = CF, 44 = TD, 45 = CL, 46 = CN, 47 = CX, 48 = CC, 49 = CO, 50 = KM, 51 = CG, 52 = CD, 53 = CK, 54 = CR, 55 = CI, 56 = HR, 57 = CU, 58 = CW, 59 = CY, 60 = CZ, 61 = DK, 62 = DJ, 63 = DM, 64 = DO, 65 = EC, 66 = EG, 67 = SV, 68 = GQ, 69 = ER, 70 = EE, 71 = ET, 72 = FK, 73 = FO, 74 = FJ, 75 = FI, 76 = FR, 77 = GF, 78 = PF, 79 = TF, 80 = GA, 81 = GM, 82 = GE, 83 = DE, 84 = GH, 85 = GI, 86 = GR, 87 = GL, 88 = GD, 89 = GP, 90 = GU, 91 = GT, 92 = GG, 93 = GN, 94 = GW, 95 = GY, 96 = HT, 97 = HM, 98 = VA, 99 = HN, 100 = HK, 101 = HU, 102 = IS, 103 = IN, 104 = ID, 105 = IR, 106 = IQ, 107 = IE, 108 = IM, 109 = IL, 110 = IT, 111 = JM, 112 = JP, 113 = JE, 114 = JO, 115 = KZ, 116 = KE, 117 = KI, 118 = KP, 119 = KR, 120 = KW, 121 = KG, 122 = LA, 123 = LV, 124 = LB, 125 = LS, 126 = LR, 127 = LY, 128 = LI, 129 = LT, 130 = LU, 131 = MO, 132 = MK, 133 = MG, 134 = MW, 135 = MY, 136 = MV, 137 = ML, 138 = MT, 139 = MH, 140 = MQ, 141 = MR, 142 = MU, 143 = YT, 144 = MX, 145 = FM, 146 = MD, 147 = MC, 148 = MN, 149 = ME, 150 = MS, 151 = MA, 152 = MZ, 153 = MM, 154 = NA, 155 = NR, 156 = NP, 157 = NL, 158 = NC, 159 = NZ, 160 = NI, 161 = NE, 162 = NG, 163 = NU, 164 = NF, 165 = MP, 166 = NO, 167 = OM, 168 = PK, 169 = PW, 170 = PS, 171 = PA, 172 = PG, 173 = PY, 174 = PE, 175 = PH, 176 = PN, 177 = PL, 178 = PT, 179 = PR, 180 = QA, 181 = RE, 182 = RO, 183 = RU, 184 = RW, 185 = BL, 186 = SH, 187 = KN, 188 = LC, 189 = MF, 190 = PM, 191 = VC, 192 = WS, 193 = SM, 194 = ST, 195 = SA, 196 = SN, 197 = RS, 198 = SC, 199 = SL, 200 = SG, 201 = SX, 202 = SK, 203 = SI, 204 = SB, 205 = SO, 206 = ZA, 207 = GS, 208 = SS, 209 = ES, 210 = LK, 211 = SD, 212 = SR, 213 = SJ, 214 = SZ, 215 = SE, 216 = CH, 217 = SY, 218 = TW, 219 = TJ, 220 = TZ, 221 = TH, 222 = TL, 223 = TG, 224 = TK, 225 = TO, 226 = TT, 227 = TN, 228 = TR, 229 = TM, 230 = TC, 231 = TV, 232 = UG, 233 = UA, 234 = AE, 235 = GB, 236 = US, 237 = UM, 238 = UY, 239 = UZ, 240 = VU, 241 = VE, 242 = VN, 243 = VG, 244 = VI, 245 = WF, 246 = EH, 247 = YE, 248 = ZM, 249 = ZW, 250 = XK + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] public enum Country { + AF = 1, - + AX = 2, - + AL = 3, - + DZ = 4, - + AS = 5, - + AD = 6, - + AO = 7, - + AI = 8, - + AQ = 9, - + AG = 10, - + AR = 11, - + AM = 12, - + AW = 13, - + AU = 14, - + AT = 15, - + AZ = 16, - + BS = 17, - + BH = 18, - + BD = 19, - + BB = 20, - + BY = 21, - + BE = 22, - + BZ = 23, - + BJ = 24, - + BM = 25, - + BT = 26, - + BO = 27, - + BQ = 28, - + BA = 29, - + BW = 30, - + BV = 31, - + BR = 32, - + IO = 33, - + BN = 34, - + BG = 35, - + BF = 36, - + BI = 37, - + CV = 38, - + KH = 39, - + CM = 40, - + CA = 41, - + KY = 42, - + CF = 43, - + TD = 44, - + CL = 45, - + CN = 46, - + CX = 47, - + CC = 48, - + CO = 49, - + KM = 50, - + CG = 51, - + CD = 52, - + CK = 53, - + CR = 54, - + CI = 55, - + HR = 56, - + CU = 57, - + CW = 58, - + CY = 59, - + CZ = 60, - + DK = 61, - + DJ = 62, - + DM = 63, - + DO = 64, - + EC = 65, - + EG = 66, - + SV = 67, - + GQ = 68, - + ER = 69, - + EE = 70, - + ET = 71, - + FK = 72, - + FO = 73, - + FJ = 74, - + FI = 75, - + FR = 76, - + GF = 77, - + PF = 78, - + TF = 79, - + GA = 80, - + GM = 81, - + GE = 82, - + DE = 83, - + GH = 84, - + GI = 85, - + GR = 86, - + GL = 87, - + GD = 88, - + GP = 89, - + GU = 90, - + GT = 91, - + GG = 92, - + GN = 93, - + GW = 94, - + GY = 95, - + HT = 96, - + HM = 97, - + VA = 98, - + HN = 99, - + HK = 100, - + HU = 101, - + IS = 102, - + IN = 103, - + ID = 104, - + IR = 105, - + IQ = 106, - + IE = 107, - + IM = 108, - + IL = 109, - + IT = 110, - + JM = 111, - + JP = 112, - + JE = 113, - + JO = 114, - + KZ = 115, - + KE = 116, - + KI = 117, - + KP = 118, - + KR = 119, - + KW = 120, - + KG = 121, - + LA = 122, - + LV = 123, - + LB = 124, - + LS = 125, - + LR = 126, - + LY = 127, - + LI = 128, - + LT = 129, - + LU = 130, - + MO = 131, - + MK = 132, - + MG = 133, - + MW = 134, - + MY = 135, - + MV = 136, - + ML = 137, - + MT = 138, - + MH = 139, - + MQ = 140, - + MR = 141, - + MU = 142, - + YT = 143, - + MX = 144, - + FM = 145, - + MD = 146, - + MC = 147, - + MN = 148, - + ME = 149, - + MS = 150, - + MA = 151, - + MZ = 152, - + MM = 153, - + NA = 154, - + NR = 155, - + NP = 156, - + NL = 157, - + NC = 158, - + NZ = 159, - + NI = 160, - + NE = 161, - + NG = 162, - + NU = 163, - + NF = 164, - + MP = 165, - + NO = 166, - + OM = 167, - + PK = 168, - + PW = 169, - + PS = 170, - + PA = 171, - + PG = 172, - + PY = 173, - + PE = 174, - + PH = 175, - + PN = 176, - + PL = 177, - + PT = 178, - + PR = 179, - + QA = 180, - + RE = 181, - + RO = 182, - + RU = 183, - + RW = 184, - + BL = 185, - + SH = 186, - + KN = 187, - + LC = 188, - + MF = 189, - + PM = 190, - + VC = 191, - + WS = 192, - + SM = 193, - + ST = 194, - + SA = 195, - + SN = 196, - + RS = 197, - + SC = 198, - + SL = 199, - + SG = 200, - + SX = 201, - + SK = 202, - + SI = 203, - + SB = 204, - + SO = 205, - + ZA = 206, - + GS = 207, - + SS = 208, - + ES = 209, - + LK = 210, - + SD = 211, - + SR = 212, - + SJ = 213, - + SZ = 214, - + SE = 215, - + CH = 216, - + SY = 217, - + TW = 218, - + TJ = 219, - + TZ = 220, - + TH = 221, - + TL = 222, - + TG = 223, - + TK = 224, - + TO = 225, - + TT = 226, - + TN = 227, - + TR = 228, - + TM = 229, - + TC = 230, - + TV = 231, - + UG = 232, - + UA = 233, - + AE = 234, - + GB = 235, - + US = 236, - + UM = 237, - + UY = 238, - + UZ = 239, - + VU = 240, - + VE = 241, - + VN = 242, - + VG = 243, - + VI = 244, - + WF = 245, - + EH = 246, - + YE = 247, - + ZM = 248, - + ZW = 249, - + XK = 250, - + } - - /// Data import model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DataImport + + /// + /// Data import model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class DataImport { - /// Gets or sets the Date/Time when the import was finished. + /// + /// Gets or sets the Date/Time when the import was finished. + /// [Newtonsoft.Json.JsonProperty("finished", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset? Finished { get; set; } - - /// Gets or sets the identifier of the import. + + /// + /// Gets or sets the identifier of the import. + /// [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Guid Id { get; set; } - - /// Gets or sets information describing the import data source (filename, url, etc.). + + /// + /// Gets or sets information describing the import data source (filename, url, etc.). + /// [Newtonsoft.Json.JsonProperty("importDataSource", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ImportDataSource { get; set; } - + [Newtonsoft.Json.JsonProperty("importStatus", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public DataImportStatus ImportStatus { get; set; } - - /// Gets or sets the optional import status JSON text. + + /// + /// Gets or sets the optional import status JSON text. + /// [Newtonsoft.Json.JsonProperty("importStatusJson", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ImportStatusJson { get; set; } - - /// Gets or sets the Date/Time when the import was started. + + /// + /// Gets or sets the Date/Time when the import was started. + /// [Newtonsoft.Json.JsonProperty("started", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset Started { get; set; } - - /// Gets or sets the total number of records processed. + + /// + /// Gets or sets the total number of records processed. + /// [Newtonsoft.Json.JsonProperty("totalRecordsProcessed", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TotalRecordsProcessed { get; set; } - - /// Gets or sets the type of the import (ex. LittleNavmapMSFS). + + /// + /// Gets or sets the type of the import (ex. LittleNavmapMSFS). + /// [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(50)] public string Type { get; set; } - - /// Gets or sets the name of the user that initiated the import. + + /// + /// Gets or sets the name of the user that initiated the import. + /// [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(256)] public string UserName { get; set; } - - + } - - /// Data import element model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DataImportElement + + /// + /// Data import element model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class DataImportElement { - /// Gets or sets the number of new records inserted. + /// + /// Gets or sets the number of new records inserted. + /// [Newtonsoft.Json.JsonProperty("new", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int New { get; set; } - - /// Gets the percent done. + + /// + /// Gets the percent done. + /// [Newtonsoft.Json.JsonProperty("percentDone", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int PercentDone { get; set; } - - /// Gets or sets the number of records processed. + + /// + /// Gets or sets the number of records processed. + /// [Newtonsoft.Json.JsonProperty("processed", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int Processed { get; set; } - - /// Gets or sets the number of skipped records. + + /// + /// Gets or sets the number of skipped records. + /// [Newtonsoft.Json.JsonProperty("skipped", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int Skipped { get; set; } - - /// Gets or sets the total number of records to be processed. + + /// + /// Gets or sets the total number of records to be processed. + /// [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int Total { get; set; } - - /// Gets or sets the number of updated records. + + /// + /// Gets or sets the number of updated records. + /// [Newtonsoft.Json.JsonProperty("updated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int Updated { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DataImportIEnumerableApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class DataImportIEnumerableApiResponse { - /// Gets or sets the embedded data of type T. + /// + /// Gets or sets the embedded data of type T. + /// [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Data import status model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DataImportStatus + + /// + /// Data import status model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class DataImportStatus { - /// Gets or sets the elements. + /// + /// Gets or sets the elements. + /// [Newtonsoft.Json.JsonProperty("elements", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.IDictionary Elements { get; set; } - - /// Gets the percent done. + + /// + /// Gets the percent done. + /// [Newtonsoft.Json.JsonProperty("percentDone", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int PercentDone { get; set; } - - /// Gets or sets the number of records processed. + + /// + /// Gets or sets the number of records processed. + /// [Newtonsoft.Json.JsonProperty("processed", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int Processed { get; set; } - - /// Gets or sets the total number of records to be processed. + + /// + /// Gets or sets the total number of records to be processed. + /// [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int Total { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DataImportStatusApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class DataImportStatusApiResponse { [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public DataImportStatus Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Engine types (currently exactly matching SimConnect). 0 = Piston, 1 = Jet, 2 = None, 3 = HeloBellTurbine, 4 = Unsupported, 5 = Turboprop - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// Engine types (currently exactly matching SimConnect). 0 = Piston, 1 = Jet, 2 = None, 3 = HeloBellTurbine, 4 = Unsupported, 5 = Turboprop + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] public enum EngineType { + Piston = 0, - + Jet = 1, - + None = 2, - + HeloBellTurbine = 3, - + Unsupported = 4, - + Turboprop = 5, - + } - - /// Flight final report model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FinalReport + + /// + /// Flight final report model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class FinalReport { [Newtonsoft.Json.JsonProperty("finalPositionReport", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public PositionReport FinalPositionReport { get; set; } - - /// Gets or sets the flight log (final save). + + /// + /// Gets or sets the flight log (final save). + /// [Newtonsoft.Json.JsonProperty("flightLog", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string FlightLog { get; set; } - - + } - - /// Financial categories. 0 = None, 1 = Aircraft, 2 = Fuel, 3 = Maintenance, 4 = AirportFees, 5 = Salaries, 6 = Loan, 7 = Interest, 8 = Shares, 9 = Dividend, 10 = FBO, 11 = Cargo, 12 = Passengers, 13 = SpecialtyJobs, 14 = Fines, 15 = Ferry, -1 = Flight - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// Financial categories. 0 = None, 1 = Aircraft, 2 = Fuel, 3 = Maintenance, 4 = AirportFees, 5 = Salaries, 6 = Loan, 7 = Interest, 8 = Shares, 9 = Dividend, 10 = FBO, 11 = Cargo, 12 = Passengers, 13 = SpecialtyJobs, 14 = Fines, 15 = Ferry, -1 = Flight + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] public enum FinancialCategory { + None = 0, - + Aircraft = 1, - + Fuel = 2, - + Maintenance = 3, - + AirportFees = 4, - + Salaries = 5, - + Loan = 6, - + Interest = 7, - + Shares = 8, - + Dividend = 9, - + FBO = 10, - + Cargo = 11, - + Passengers = 12, - + SpecialtyJobs = 13, - + Fines = 14, - + Ferry = 15, - + Flight = -1, - + } - - /// Financial overview model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FinancialOverview + + /// + /// Financial overview model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class FinancialOverview { - /// Gets or sets the account balance (of the user). + /// + /// Gets or sets the account balance (of the user). + /// [Newtonsoft.Json.JsonProperty("accountBalance", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public long AccountBalance { get; set; } - - /// Gets or sets the airline account balance (if user has the permission). + + /// + /// Gets or sets the airline account balance (if user has the permission). + /// [Newtonsoft.Json.JsonProperty("airlineAccountBalance", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public long? AirlineAccountBalance { get; set; } - - /// Gets or sets the recent airline financial records (if user has the permission). + + /// + /// Gets or sets the recent airline financial records (if user has the permission). + /// [Newtonsoft.Json.JsonProperty("recentAirlineFinancialRecords", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection RecentAirlineFinancialRecords { get; set; } - - /// Gets or sets the recent financial records (of the user). + + /// + /// Gets or sets the recent financial records (of the user). + /// [Newtonsoft.Json.JsonProperty("recentFinancialRecords", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection RecentFinancialRecords { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FinancialOverviewApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class FinancialOverviewApiResponse { [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public FinancialOverview Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Financial record model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FinancialRecord + + /// + /// Financial record model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class FinancialRecord { - /// Gets or sets the aircraft registry (optional, if record relates to an aircraft). + /// + /// Gets or sets the aircraft registry (optional, if record relates to an aircraft). + /// [Newtonsoft.Json.JsonProperty("aircraftRegistry", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(10, MinimumLength = 5)] public string AircraftRegistry { get; set; } - + [Newtonsoft.Json.JsonProperty("category", Required = Newtonsoft.Json.Required.Always)] public FinancialCategory Category { get; set; } - - /// Gets or sets the child records. + + /// + /// Gets or sets the child records. + /// [Newtonsoft.Json.JsonProperty("childRecords", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection ChildRecords { get; set; } - - /// Gets or sets the description of the record. + + /// + /// Gets or sets the description of the record. + /// [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Description { get; set; } - - /// Gets or sets the expense amount in SkyBucks. + + /// + /// Gets or sets the expense amount in SkyBucks. + /// [Newtonsoft.Json.JsonProperty("expense", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public long Expense { get; set; } - - /// Gets or sets the identifier for the financial record. + + /// + /// Gets or sets the identifier for the financial record. + /// [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public System.Guid Id { get; set; } - - /// Gets or sets the income amount in SkyBucks. + + /// + /// Gets or sets the income amount in SkyBucks. + /// [Newtonsoft.Json.JsonProperty("income", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public long Income { get; set; } - - /// Gets or sets the timestamp of the record. + + /// + /// Gets or sets the timestamp of the record. + /// [Newtonsoft.Json.JsonProperty("timestamp", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset Timestamp { get; set; } - - + } - - /// Flight model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Flight + + /// + /// Flight model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class Flight { [Newtonsoft.Json.JsonProperty("aircraft", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Aircraft Aircraft { get; set; } - - /// Gets or sets the true airspeed in knots. + + /// + /// Gets or sets the true airspeed in knots. + /// [Newtonsoft.Json.JsonProperty("airspeedTrue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? AirspeedTrue { get; set; } - + [Newtonsoft.Json.JsonProperty("alternate", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Airport Alternate { get; set; } - - /// Gets or sets the alternate route. + + /// + /// Gets or sets the alternate route. + /// [Newtonsoft.Json.JsonProperty("alternateRoute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string AlternateRoute { get; set; } - - /// Gets or sets the altitude in feet. + + /// + /// Gets or sets the altitude in feet. + /// [Newtonsoft.Json.JsonProperty("altitude", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? Altitude { get; set; } - - /// The bank angle in degrees. + + /// + /// The bank angle in degrees. + /// [Newtonsoft.Json.JsonProperty("bankAngle", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double BankAngle { get; set; } - + [Newtonsoft.Json.JsonProperty("destination", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Airport Destination { get; set; } - - /// Gets the name of the dispatcher. + + /// + /// Gets the name of the dispatcher. + /// [Newtonsoft.Json.JsonProperty("dispatcherName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string DispatcherName { get; set; } - - /// Gets or sets the dispatcher remarks. + + /// + /// Gets or sets the dispatcher remarks. + /// [Newtonsoft.Json.JsonProperty("dispatcherRemarks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string DispatcherRemarks { get; set; } - - /// Gets or sets the flight number (1-9999). + + /// + /// Gets or sets the flight number (1-9999). + /// [Newtonsoft.Json.JsonProperty("flightNumber", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int FlightNumber { get; set; } - - /// Gets or sets the flight payloads. + + /// + /// Gets or sets the flight payloads. + /// [Newtonsoft.Json.JsonProperty("flightPayloads", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection FlightPayloads { get; set; } - + [Newtonsoft.Json.JsonProperty("flightPhase", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public FlightPhase FlightPhase { get; set; } - - /// Gets or sets the fuel in gallons. + + /// + /// Gets or sets the fuel in gallons. + /// [Newtonsoft.Json.JsonProperty("fuelGallons", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? FuelGallons { get; set; } - - /// Gets or sets the Date/Time when fuel loading will be complete. + + /// + /// Gets or sets the Date/Time when fuel loading will be complete. + /// [Newtonsoft.Json.JsonProperty("fuelLoadingComplete", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset? FuelLoadingComplete { get; set; } - - /// Gets or sets the fuel tank center 2 quantity. + + /// + /// Gets or sets the fuel tank center 2 quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankCenter2Quantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? FuelTankCenter2Quantity { get; set; } - - /// Gets or sets the fuel tank center 3 quantity. + + /// + /// Gets or sets the fuel tank center 3 quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankCenter3Quantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? FuelTankCenter3Quantity { get; set; } - - /// Gets or sets the fuel tank center quantity. + + /// + /// Gets or sets the fuel tank center quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankCenterQuantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? FuelTankCenterQuantity { get; set; } - - /// Gets or sets the fuel tank external 1 quantity. + + /// + /// Gets or sets the fuel tank external 1 quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankExternal1Quantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? FuelTankExternal1Quantity { get; set; } - - /// Gets or sets the fuel tank external 2 quantity. + + /// + /// Gets or sets the fuel tank external 2 quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankExternal2Quantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? FuelTankExternal2Quantity { get; set; } - - /// Gets or sets the fuel tank left auxiliary quantity. + + /// + /// Gets or sets the fuel tank left auxiliary quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankLeftAuxQuantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? FuelTankLeftAuxQuantity { get; set; } - - /// Gets or sets the fuel tank left main quantity. + + /// + /// Gets or sets the fuel tank left main quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankLeftMainQuantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? FuelTankLeftMainQuantity { get; set; } - - /// Gets or sets the fuel tank left tip quantity. + + /// + /// Gets or sets the fuel tank left tip quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankLeftTipQuantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? FuelTankLeftTipQuantity { get; set; } - - /// Gets or sets the fuel tank right auxiliary quantity. + + /// + /// Gets or sets the fuel tank right auxiliary quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankRightAuxQuantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? FuelTankRightAuxQuantity { get; set; } - - /// Gets or sets the fuel tank right main quantity. + + /// + /// Gets or sets the fuel tank right main quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankRightMainQuantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? FuelTankRightMainQuantity { get; set; } - - /// Gets or sets the fuel tank right tip quantity. + + /// + /// Gets or sets the fuel tank right tip quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankRightTipQuantity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? FuelTankRightTipQuantity { get; set; } - - /// Gets the full flight number (airline code and number combined). + + /// + /// Gets the full flight number (airline code and number combined). + /// [Newtonsoft.Json.JsonProperty("fullFlightNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string FullFlightNumber { get; set; } - - /// Gets or sets the ground speed in knots. + + /// + /// Gets or sets the ground speed in knots. + /// [Newtonsoft.Json.JsonProperty("groundSpeed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? GroundSpeed { get; set; } - - /// Gets a value indicating whether this flight has an auto-saved log. + + /// + /// Gets a value indicating whether this flight has an auto-saved log. + /// [Newtonsoft.Json.JsonProperty("hasAutoSaveLog", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool HasAutoSaveLog { get; set; } - - /// The magnetic heading. + + /// + /// The magnetic heading. + /// [Newtonsoft.Json.JsonProperty("heading", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? Heading { get; set; } - - /// Gets or sets the identifier for the flight. + + /// + /// Gets or sets the identifier for the flight. + /// [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public System.Guid Id { get; set; } - - /// Gets or sets the Date/Time of the last auto-save. + + /// + /// Gets or sets the Date/Time of the last auto-save. + /// [Newtonsoft.Json.JsonProperty("lastAutoSave", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset? LastAutoSave { get; set; } - - /// Gets or sets the Date/Time of the last position report. + + /// + /// Gets or sets the Date/Time of the last position report. + /// [Newtonsoft.Json.JsonProperty("lastPositionReport", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset? LastPositionReport { get; set; } - - /// The latitude in degrees. + + /// + /// The latitude in degrees. + /// [Newtonsoft.Json.JsonProperty("latitude", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? Latitude { get; set; } - - /// The longitude in degrees. + + /// + /// The longitude in degrees. + /// [Newtonsoft.Json.JsonProperty("longitude", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? Longitude { get; set; } - - /// Gets or sets the navlog fixes. + + /// + /// Gets or sets the navlog fixes. + /// [Newtonsoft.Json.JsonProperty("navlogFixes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection NavlogFixes { get; set; } - - /// Gets or sets the OFP HTML (most likely from simBrief). + + /// + /// Gets or sets the OFP HTML (most likely from simBrief). + /// [Newtonsoft.Json.JsonProperty("ofpHtml", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string OfpHtml { get; set; } - - /// Is the plane on the ground? + + /// + /// Is the plane on the ground? + /// [Newtonsoft.Json.JsonProperty("onGround", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool OnGround { get; set; } - - /// Gets the name of the flight operator. + + /// + /// Gets the name of the flight operator. + /// [Newtonsoft.Json.JsonProperty("operatorName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string OperatorName { get; set; } - + [Newtonsoft.Json.JsonProperty("origin", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Airport Origin { get; set; } - - /// Gets or sets the Date/Time of when the flight was paused (so it can be resumed later). + + /// + /// Gets or sets the Date/Time of when the flight was paused (so it can be resumed later). + /// [Newtonsoft.Json.JsonProperty("paused", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset? Paused { get; set; } - - /// Gets or sets the Date/Time when payload loading will be complete. + + /// + /// Gets or sets the Date/Time when payload loading will be complete. + /// [Newtonsoft.Json.JsonProperty("payloadLoadingComplete", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset? PayloadLoadingComplete { get; set; } - - /// The pitch angle in degrees. + + /// + /// The pitch angle in degrees. + /// [Newtonsoft.Json.JsonProperty("pitchAngle", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double PitchAngle { get; set; } - - /// Gets or sets the planned departure time. + + /// + /// Gets or sets the planned departure time. + /// [Newtonsoft.Json.JsonProperty("plannedDepartureTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset PlannedDepartureTime { get; set; } - - /// The radio height in feet. + + /// + /// The radio height in feet. + /// [Newtonsoft.Json.JsonProperty("radioHeight", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? RadioHeight { get; set; } - - /// Gets or sets the route. + + /// + /// Gets or sets the route. + /// [Newtonsoft.Json.JsonProperty("route", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Route { get; set; } - - /// Gets or sets the time-warp time saved (in seconds). + + /// + /// Gets or sets the time-warp time saved (in seconds). + /// [Newtonsoft.Json.JsonProperty("timeWarpTimeSavedSeconds", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TimeWarpTimeSavedSeconds { get; set; } - - /// The vertical speed in feet per second. + + /// + /// The vertical speed in feet per second. + /// [Newtonsoft.Json.JsonProperty("verticalSpeedSeconds", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double VerticalSpeedSeconds { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FlightApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class FlightApiResponse { [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Flight Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FlightIEnumerableApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class FlightIEnumerableApiResponse { - /// Gets or sets the embedded data of type T. + /// + /// Gets or sets the embedded data of type T. + /// [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Flight log model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FlightLog + + /// + /// Flight log model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class FlightLog { [Newtonsoft.Json.JsonProperty("aircraftEngineType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public EngineType AircraftEngineType { get; set; } - - /// Gets or sets the aircraft registry. + + /// + /// Gets or sets the aircraft registry. + /// [Newtonsoft.Json.JsonProperty("aircraftRegistry", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string AircraftRegistry { get; set; } - - /// Gets or sets the type of the aircraft. + + /// + /// Gets or sets the type of the aircraft. + /// [Newtonsoft.Json.JsonProperty("aircraftType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string AircraftType { get; set; } - - /// Gets or sets the alternate. + + /// + /// Gets or sets the alternate. + /// [Newtonsoft.Json.JsonProperty("alternate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Alternate { get; set; } - - /// Gets or sets the alternate airport ICAO code. + + /// + /// Gets or sets the alternate airport ICAO code. + /// [Newtonsoft.Json.JsonProperty("alternateICAO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string AlternateICAO { get; set; } - - /// Gets or sets the alternate route. + + /// + /// Gets or sets the alternate route. + /// [Newtonsoft.Json.JsonProperty("alternateRoute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string AlternateRoute { get; set; } - - /// Gets or sets the Date/Time of when the flight was completed. + + /// + /// Gets or sets the Date/Time of when the flight was completed. + /// [Newtonsoft.Json.JsonProperty("completed", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset Completed { get; set; } - - /// Gets or sets a value indicating whether the aircraft crashed. + + /// + /// Gets or sets a value indicating whether the aircraft crashed. + /// [Newtonsoft.Json.JsonProperty("crashed", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool Crashed { get; set; } - - /// Gets or sets the Destination for the. + + /// + /// Gets or sets the Destination for the. + /// [Newtonsoft.Json.JsonProperty("destination", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Destination { get; set; } - - /// Gets or sets destination airport ICAO code. + + /// + /// Gets or sets destination airport ICAO code. + /// [Newtonsoft.Json.JsonProperty("destinationICAO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string DestinationICAO { get; set; } - - /// Gets or sets the dispatcher. + + /// + /// Gets or sets the dispatcher. + /// [Newtonsoft.Json.JsonProperty("dispatcher", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Dispatcher { get; set; } - - /// Gets or sets the dispatcher remarks. + + /// + /// Gets or sets the dispatcher remarks. + /// [Newtonsoft.Json.JsonProperty("dispatcherRemarks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string DispatcherRemarks { get; set; } - - /// Gets or sets the fuel consumption. + + /// + /// Gets or sets the fuel consumption. + /// [Newtonsoft.Json.JsonProperty("fuelConsumption", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double FuelConsumption { get; set; } - - /// Gets or sets the fuel weight per gallon. + + /// + /// Gets or sets the fuel weight per gallon. + /// [Newtonsoft.Json.JsonProperty("fuelWeightPerGallon", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double FuelWeightPerGallon { get; set; } - - /// Gets or sets the full flight number. + + /// + /// Gets or sets the full flight number. + /// [Newtonsoft.Json.JsonProperty("fullFlightNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string FullFlightNumber { get; set; } - - /// Gets or sets the identifier for the flight. + + /// + /// Gets or sets the identifier for the flight. + /// [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Guid Id { get; set; } - - /// Gets or sets a value indicating whether this is an airline flight or a private one. + + /// + /// Gets or sets a value indicating whether this is an airline flight or a private one. + /// [Newtonsoft.Json.JsonProperty("isAirlineFlight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsAirlineFlight { get; set; } - - /// Gets or sets the landed at. + + /// + /// Gets or sets the landed at. + /// [Newtonsoft.Json.JsonProperty("landedAt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string LandedAt { get; set; } - - /// Gets or sets the "landed at" airport ICAO code. + + /// + /// Gets or sets the "landed at" airport ICAO code. + /// [Newtonsoft.Json.JsonProperty("landedAtICAO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string LandedAtICAO { get; set; } - - /// Gets or sets the off block fuel. + + /// + /// Gets or sets the off block fuel. + /// [Newtonsoft.Json.JsonProperty("offBlockFuel", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double OffBlockFuel { get; set; } - - /// Gets or sets the on block fuel. + + /// + /// Gets or sets the on block fuel. + /// [Newtonsoft.Json.JsonProperty("onBlockFuel", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double OnBlockFuel { get; set; } - - /// Gets or sets the operator. + + /// + /// Gets or sets the operator. + /// [Newtonsoft.Json.JsonProperty("operator", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Operator { get; set; } - - /// Gets or sets the origin. + + /// + /// Gets or sets the origin. + /// [Newtonsoft.Json.JsonProperty("origin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Origin { get; set; } - - /// Gets or sets the origin airport ICAO code. + + /// + /// Gets or sets the origin airport ICAO code. + /// [Newtonsoft.Json.JsonProperty("originICAO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string OriginICAO { get; set; } - - /// Gets or sets the pilot. + + /// + /// Gets or sets the pilot. + /// [Newtonsoft.Json.JsonProperty("pilot", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Pilot { get; set; } - - /// Gets or sets the planned departure time. + + /// + /// Gets or sets the planned departure time. + /// [Newtonsoft.Json.JsonProperty("plannedDepartureTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset PlannedDepartureTime { get; set; } - - /// Gets or sets the route. + + /// + /// Gets or sets the route. + /// [Newtonsoft.Json.JsonProperty("route", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Route { get; set; } - + [Newtonsoft.Json.JsonProperty("simulator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Simulator Simulator { get; set; } - - /// Gets or sets the Date/Time of when the flight was started. + + /// + /// Gets or sets the Date/Time of when the flight was started. + /// [Newtonsoft.Json.JsonProperty("started", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset Started { get; set; } - - /// Gets or sets the time-warp time saved (in seconds). + + /// + /// Gets or sets the time-warp time saved (in seconds). + /// [Newtonsoft.Json.JsonProperty("timeWarpTimeSavedSeconds", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TimeWarpTimeSavedSeconds { get; set; } - - + } - - /// Flight log details model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FlightLogDetails + + /// + /// Flight log details model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class FlightLogDetails { - /// Gets or sets the final flight log file (base64 encoded, gzipped xml). + /// + /// Gets or sets the final flight log file (base64 encoded, gzipped xml). + /// [Newtonsoft.Json.JsonProperty("flightLog", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string FlightLog { get; set; } - - /// Gets or sets the OFP HTML (most likely from simBrief). + + /// + /// Gets or sets the OFP HTML (most likely from simBrief). + /// [Newtonsoft.Json.JsonProperty("ofpHtml", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string OfpHtml { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FlightLogDetailsApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class FlightLogDetailsApiResponse { [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public FlightLogDetails Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FlightLogIEnumerableApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class FlightLogIEnumerableApiResponse { - /// Gets or sets the embedded data of type T. + /// + /// Gets or sets the embedded data of type T. + /// [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Flight navigation log fix model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FlightNavlogFix + + /// + /// Flight navigation log fix model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class FlightNavlogFix { - /// Gets or sets the fix number. + /// + /// Gets or sets the fix number. + /// [Newtonsoft.Json.JsonProperty("fixNumber", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int FixNumber { get; set; } - - /// Gets or sets the identifier of the flight. + + /// + /// Gets or sets the identifier of the flight. + /// [Newtonsoft.Json.JsonProperty("flightID", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public System.Guid FlightID { get; set; } - - /// Gets or sets the ident of the fix. + + /// + /// Gets or sets the ident of the fix. + /// [Newtonsoft.Json.JsonProperty("ident", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Ident { get; set; } - - /// Gets or sets the latitude. + + /// + /// Gets or sets the latitude. + /// [Newtonsoft.Json.JsonProperty("latitude", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Latitude { get; set; } - - /// Gets or sets the longitude. + + /// + /// Gets or sets the longitude. + /// [Newtonsoft.Json.JsonProperty("longitude", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Longitude { get; set; } - - /// Gets or sets the type of the fix. + + /// + /// Gets or sets the type of the fix. + /// [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Type { get; set; } - - + } - - /// Flight payload model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FlightPayload + + /// + /// Flight payload model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class FlightPayload { - /// Gets or sets the identifier of the flight. + /// + /// Gets or sets the identifier of the flight. + /// [Newtonsoft.Json.JsonProperty("flightID", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Guid FlightID { get; set; } - + [Newtonsoft.Json.JsonProperty("payload", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Payload Payload { get; set; } - - /// Gets or sets the identifier of the payload. + + /// + /// Gets or sets the identifier of the payload. + /// [Newtonsoft.Json.JsonProperty("payloadID", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Guid PayloadID { get; set; } - - + } - - /// Values that represent OpenSky flight phases. 0 = Briefing, 1 = Unknown, 2 = UnTracked, 10 = PreFlight, 11 = PushBack, 12 = TaxiOut, 13 = Takeoff, 14 = Departure, 15 = Climb, 16 = Cruise, 17 = Descent, 18 = Approach, 19 = Landing, 20 = GoAround, 21 = TaxiIn, 22 = PostFlight, 99 = Crashed - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// Values that represent OpenSky flight phases. 0 = Briefing, 1 = Unknown, 2 = UnTracked, 10 = PreFlight, 11 = PushBack, 12 = TaxiOut, 13 = Takeoff, 14 = Departure, 15 = Climb, 16 = Cruise, 17 = Descent, 18 = Approach, 19 = Landing, 20 = GoAround, 21 = TaxiIn, 22 = PostFlight, 99 = Crashed + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] public enum FlightPhase { + Briefing = 0, - + Unknown = 1, - + UnTracked = 2, - + PreFlight = 10, - + PushBack = 11, - + TaxiOut = 12, - + Takeoff = 13, - + Departure = 14, - + Climb = 15, - + Cruise = 16, - + Descent = 17, - + Approach = 18, - + Landing = 19, - + GoAround = 20, - + TaxiIn = 21, - + PostFlight = 22, - + Crashed = 99, - + } - - /// Flight plan model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FlightPlan + + /// + /// Flight plan model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class FlightPlan { [Newtonsoft.Json.JsonProperty("aircraft", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Aircraft Aircraft { get; set; } - - /// Gets or sets the alternate airport ICAO code. + + /// + /// Gets or sets the alternate airport ICAO code. + /// [Newtonsoft.Json.JsonProperty("alternateICAO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(5, MinimumLength = 3)] public string AlternateICAO { get; set; } - - /// Gets or sets the alternate route. + + /// + /// Gets or sets the alternate route. + /// [Newtonsoft.Json.JsonProperty("alternateRoute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string AlternateRoute { get; set; } - - /// Gets or sets destination airport ICAO code. + + /// + /// Gets or sets destination airport ICAO code. + /// [Newtonsoft.Json.JsonProperty("destinationICAO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(5, MinimumLength = 3)] public string DestinationICAO { get; set; } - - /// Gets or sets the identifier of the dispatcher. + + /// + /// Gets or sets the identifier of the dispatcher. + /// [Newtonsoft.Json.JsonProperty("dispatcherID", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255)] public string DispatcherID { get; set; } - - /// Gets or sets the name of the dispatcher (read only, for display in list view, not for editing!). + + /// + /// Gets or sets the name of the dispatcher (read only, for display in list view, not for editing!). + /// [Newtonsoft.Json.JsonProperty("dispatcherName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string DispatcherName { get; set; } - - /// Gets or sets the dispatcher remarks. + + /// + /// Gets or sets the dispatcher remarks. + /// [Newtonsoft.Json.JsonProperty("dispatcherRemarks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string DispatcherRemarks { get; set; } - - /// Gets or sets the flight number (1-9999). + + /// + /// Gets or sets the flight number (1-9999). + /// [Newtonsoft.Json.JsonProperty("flightNumber", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int FlightNumber { get; set; } - - /// Gets or sets the fuel in gallons. + + /// + /// Gets or sets the fuel in gallons. + /// [Newtonsoft.Json.JsonProperty("fuelGallons", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? FuelGallons { get; set; } - - /// Gets the full flight number (airline code and number combined)(read only, for display in list view, not for editing!). + + /// + /// Gets the full flight number (airline code and number combined)(read only, for display in list view, not for editing!). + /// [Newtonsoft.Json.JsonProperty("fullFlightNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string FullFlightNumber { get; set; } - - /// Gets or sets the identifier for the flight. + + /// + /// Gets or sets the identifier for the flight. + /// [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public System.Guid Id { get; set; } - - /// Gets or sets a value indicating whether this is an airline flight or a private one. + + /// + /// Gets or sets a value indicating whether this is an airline flight or a private one. + /// [Newtonsoft.Json.JsonProperty("isAirlineFlight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsAirlineFlight { get; set; } - - /// Gets or sets the navlog fixes. + + /// + /// Gets or sets the navlog fixes. + /// [Newtonsoft.Json.JsonProperty("navlogFixes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection NavlogFixes { get; set; } - - /// Gets or sets the payloads. + + /// + /// Gets or sets the payloads. + /// [Newtonsoft.Json.JsonProperty("payloads", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Payloads { get; set; } - - /// Gets or sets the OFP HTML (most likely from simBrief). + + /// + /// Gets or sets the OFP HTML (most likely from simBrief). + /// [Newtonsoft.Json.JsonProperty("ofpHtml", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string OfpHtml { get; set; } - - /// Gets or sets the origin airport ICAO code. + + /// + /// Gets or sets the origin airport ICAO code. + /// [Newtonsoft.Json.JsonProperty("originICAO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(5, MinimumLength = 3)] public string OriginICAO { get; set; } - - /// Gets or sets the planned departure time. + + /// + /// Gets or sets the planned departure time. + /// [Newtonsoft.Json.JsonProperty("plannedDepartureTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset PlannedDepartureTime { get; set; } - - /// Gets or sets the route. + + /// + /// Gets or sets the route. + /// [Newtonsoft.Json.JsonProperty("route", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Route { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FlightPlanIEnumerableApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class FlightPlanIEnumerableApiResponse { - /// Gets or sets the embedded data of type T. + /// + /// Gets or sets the embedded data of type T. + /// [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Forgot password model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ForgotPassword + + /// + /// Forgot password model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class ForgotPassword { - /// Gets or sets the email. + /// + /// Gets or sets the email. + /// [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Email { get; set; } - - /// Gets or sets the recaptcha token. + + /// + /// Gets or sets the recaptcha token. + /// [Newtonsoft.Json.JsonProperty("recaptchaToken", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string RecaptchaToken { get; set; } - - + } - - /// Fuel types (derived from engine type, SimConnect doesn't report this). 0 = AvGas, 1 = JetFuel, 2 = None, 3 = Hydrogen, 4 = Electricity, 99 = NotUsed - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// Fuel types (derived from engine type, SimConnect doesn't report this). 0 = AvGas, 1 = JetFuel, 2 = None, 3 = Hydrogen, 4 = Electricity, 99 = NotUsed + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] public enum FuelType { + AvGas = 0, - + JetFuel = 1, - + None = 2, - + Hydrogen = 3, - + Electricity = 4, - + NotUsed = 99, - + } - - /// Ground operations model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroundOperations + + /// + /// Ground operations model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class GroundOperations { - /// Gets or sets the target fuel in gallons. + /// + /// Gets or sets the target fuel in gallons. + /// [Newtonsoft.Json.JsonProperty("fuel", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Fuel { get; set; } - - /// Gets or sets the target payloads. + + /// + /// Gets or sets the target payloads. + /// [Newtonsoft.Json.JsonProperty("payloads", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Payloads { get; set; } - - /// Gets or sets the aircraft registry. + + /// + /// Gets or sets the aircraft registry. + /// [Newtonsoft.Json.JsonProperty("registry", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Registry { get; set; } - - + + } + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class GuidApiResponse + { + /// + /// Gets or sets the embedded data of type T. + /// + [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Guid Data { get; set; } + + /// + /// Gets or sets the error details (NULL if no error). + /// + [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ErrorDetails { get; set; } + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// + [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsError { get; set; } + + /// + /// Gets or sets the message. + /// + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + /// + /// Gets or sets the status. + /// + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Status { get; set; } + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GuidNullableApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class GuidNullableApiResponse { - /// Gets or sets the embedded data of type T. + /// + /// Gets or sets the embedded data of type T. + /// [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Guid? Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Job model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Job + + /// + /// Job model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class Job { - /// Gets or sets the identifier of the assigned airline dispatcher (should not be set for user operated flights - will be ignored). + /// + /// Gets or sets the identifier of the assigned airline dispatcher (should not be set for user operated flights - will be ignored). + /// [Newtonsoft.Json.JsonProperty("assignedAirlineDispatcherID", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255)] public string AssignedAirlineDispatcherID { get; set; } - + [Newtonsoft.Json.JsonProperty("category", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public AircraftTypeCategory Category { get; set; } - - /// Gets or sets the Date/Time the job expires at. + + /// + /// Gets or sets the Date/Time the job expires at. + /// [Newtonsoft.Json.JsonProperty("expiresAt", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset ExpiresAt { get; set; } - - /// Gets or sets the identifier for the job. + + /// + /// Gets or sets the identifier for the job. + /// [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public System.Guid Id { get; set; } - - /// Gets or sets the identifier of the airline operator of this flight (either this or OperatorID - /// must be set. + + /// + /// Gets or sets the identifier of the airline operator of this flight (either this or OperatorID + ///
must be set. + ///
[Newtonsoft.Json.JsonProperty("operatorAirlineID", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(3)] public string OperatorAirlineID { get; set; } - - /// Gets or sets the identifier of the operator of this flight (either this or OperatorAirlineID - /// must be set. + + /// + /// Gets or sets the identifier of the operator of this flight (either this or OperatorAirlineID + ///
must be set. + ///
[Newtonsoft.Json.JsonProperty("operatorID", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(255)] public string OperatorID { get; set; } - - /// Gets the name of the flight operator. + + /// + /// Gets the name of the flight operator. + /// [Newtonsoft.Json.JsonProperty("operatorName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string OperatorName { get; set; } - - /// Gets or sets the origin airport icao. + + /// + /// Gets or sets the origin airport icao. + /// [Newtonsoft.Json.JsonProperty("originICAO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(5, MinimumLength = 3)] public string OriginICAO { get; set; } - - /// Gets or sets the payloads. + + /// + /// Gets or sets the payloads. + /// [Newtonsoft.Json.JsonProperty("payloads", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Payloads { get; set; } - + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public JobType Type { get; set; } - - /// Gets or sets a user-settable identifier string for the job. + + /// + /// Gets or sets a user-settable identifier string for the job. + /// [Newtonsoft.Json.JsonProperty("userIdentifier", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(50)] public string UserIdentifier { get; set; } - - /// Gets or sets the job value in SkyBucks. + + /// + /// Gets or sets the job value in SkyBucks. + /// [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int Value { get; set; } - - + } - - /// Job directions. 0 = From, 1 = To, 2 = RoundTrip - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// Job directions. 0 = From, 1 = To, 2 = RoundTrip + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] public enum JobDirection { + From = 0, - + To = 1, - + RoundTrip = 2, - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class JobIEnumerableApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class JobIEnumerableApiResponse { - /// Gets or sets the embedded data of type T. + /// + /// Gets or sets the embedded data of type T. + /// [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Job types. 0 = Cargo_L, 1 = Cargo_S - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// Job types. 0 = Cargo_L, 1 = Cargo_S + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] public enum JobType { + Cargo_L = 0, - + Cargo_S = 1, - + } - - /// Linked accounts and keys model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LinkedAccounts + + /// + /// Linked accounts and keys model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class LinkedAccounts { - /// Gets or sets the Bing maps API key. + /// + /// Gets or sets the Bing maps API key. + /// [Newtonsoft.Json.JsonProperty("bingMapsKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string BingMapsKey { get; set; } - - /// Gets or sets the Simbrief username. + + /// + /// Gets or sets the Simbrief username. + /// [Newtonsoft.Json.JsonProperty("simbriefUsername", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string SimbriefUsername { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LinkedAccountsApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class LinkedAccountsApiResponse { [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public LinkedAccounts Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Login model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Login + + /// + /// Login model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class Login { - /// Gets or sets the password. + /// + /// Gets or sets the password. + /// [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Password { get; set; } - - /// Gets or sets the recaptcha token. + + /// + /// Gets or sets the recaptcha token. + /// [Newtonsoft.Json.JsonProperty("recaptchaToken", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string RecaptchaToken { get; set; } - - /// Gets or sets a value indicating whether to remember the user login (extends JWT token expiry). + + /// + /// Gets or sets a value indicating whether to remember the user login (extends JWT token expiry). + /// [Newtonsoft.Json.JsonProperty("rememberMe", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool RememberMe { get; set; } - - /// Gets or sets the username. + + /// + /// Gets or sets the username. + /// [Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Username { get; set; } - - + } - - /// Login response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LoginResponse + + /// + /// Login response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class LoginResponse { - /// Gets or sets the Date/Time of the expiration. + /// + /// Gets or sets the Date/Time of the expiration. + /// [Newtonsoft.Json.JsonProperty("expiration", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset Expiration { get; set; } - - /// Gets or sets the refresh token. + + /// + /// Gets or sets the refresh token. + /// [Newtonsoft.Json.JsonProperty("refreshToken", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string RefreshToken { get; set; } - - /// Gets or sets the Date/Time of the refresh token expiration. + + /// + /// Gets or sets the Date/Time of the refresh token expiration. + /// [Newtonsoft.Json.JsonProperty("refreshTokenExpiration", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset RefreshTokenExpiration { get; set; } - - /// Gets or sets the token. + + /// + /// Gets or sets the token. + /// [Newtonsoft.Json.JsonProperty("token", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Token { get; set; } - - /// Gets or sets the username (in case the user logged in with the email address). + + /// + /// Gets or sets the username (in case the user logged in with the email address). + /// [Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Username { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LoginResponseApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class LoginResponseApiResponse { [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public LoginResponse Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + + } + + /// + /// Moderator role model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class ModeratorRole + { + /// + /// Gets or sets a value indicating whether this user should be a moderator. + /// + [Newtonsoft.Json.JsonProperty("isModerator", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsModerator { get; set; } + + /// + /// Gets or sets the username. + /// + [Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public string Username { get; set; } + } - - /// New aircraft delivery options. 0 = ManufacturerDeliveryAirport, 1 = ManufacturerFerry, 2 = OutsourceFerry - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// New aircraft delivery options. 0 = ManufacturerDeliveryAirport, 1 = ManufacturerFerry, 2 = OutsourceFerry + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] public enum NewAircraftDeliveryOption { + ManufacturerDeliveryAirport = 0, - + ManufacturerFerry = 1, - + OutsourceFerry = 2, - + } - - /// Payload model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Payload + + /// + /// Payload model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class Payload { - /// Gets or sets the aircraft registry the payload is currently loaded on, or NULL if stored at an airport. + /// + /// Gets or sets the aircraft registry the payload is currently loaded on, or NULL if stored at an airport. + /// [Newtonsoft.Json.JsonProperty("aircraftRegistry", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(10, MinimumLength = 5)] public string AircraftRegistry { get; set; } - - /// Gets or sets the airport icao the payload is currently stored at, or NULL if onboard an aircraft. + + /// + /// Gets or sets the airport icao the payload is currently stored at, or NULL if onboard an aircraft. + /// [Newtonsoft.Json.JsonProperty("airportICAO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(5, MinimumLength = 3)] public string AirportICAO { get; set; } - - /// Gets or sets the payload description. + + /// + /// Gets or sets the payload description. + /// [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(50, MinimumLength = 3)] public string Description { get; set; } - - /// Gets or sets the destination icao for the payload. + + /// + /// Gets or sets the destination icao for the payload. + /// [Newtonsoft.Json.JsonProperty("destinationICAO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(5, MinimumLength = 3)] public string DestinationICAO { get; set; } - - /// Gets or sets the identifier for the payload. + + /// + /// Gets or sets the identifier for the payload. + /// [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public System.Guid Id { get; set; } - - /// Gets or sets the identifier of the job. + + /// + /// Gets or sets the identifier of the job. + /// [Newtonsoft.Json.JsonProperty("jobID", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public System.Guid JobID { get; set; } - - /// Gets or sets the payload weight in lbs. + + /// + /// Gets or sets the payload weight in lbs. + /// [Newtonsoft.Json.JsonProperty("weight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Weight { get; set; } - - + } - - /// Pie chart value. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PieChartValue + + /// + /// Pie chart value. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class PieChartValue { - /// Gets or sets the key. + /// + /// Gets or sets the key. + /// [Newtonsoft.Json.JsonProperty("key", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Key { get; set; } - - /// Gets or sets the value. + + /// + /// Gets or sets the value. + /// [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public long Value { get; set; } - - + } - - /// (Flight)Plannable payload. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PlannablePayload + + /// + /// (Flight)Plannable payload. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class PlannablePayload { - /// Gets or sets the current location (airport or aircraft). + /// + /// Gets or sets the current location (airport or aircraft). + /// [Newtonsoft.Json.JsonProperty("currentLocation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string CurrentLocation { get; set; } - - /// Gets or sets the description. + + /// + /// Gets or sets the description. + /// [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Description { get; set; } - - /// Gets or sets destination ICAO code. + + /// + /// Gets or sets destination ICAO code. + /// [Newtonsoft.Json.JsonProperty("destinationICAO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string DestinationICAO { get; set; } - - /// Gets or sets the flights the payload is planned to fly on. + + /// + /// Gets or sets the flights the payload is planned to fly on. + /// [Newtonsoft.Json.JsonProperty("flights", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.IDictionary Flights { get; set; } - - /// Gets or sets the destinations this payload is planning to go to. + + /// + /// Gets or sets the destinations this payload is planning to go to. + /// [Newtonsoft.Json.JsonProperty("destinations", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Destinations { get; set; } - - /// Gets or sets the identifier of the payload. + + /// + /// Gets or sets the identifier of the payload. + /// [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Guid Id { get; set; } - - /// Gets or sets the weight in lbs. + + /// + /// Gets or sets the weight in lbs. + /// [Newtonsoft.Json.JsonProperty("weight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Weight { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PlannablePayloadIEnumerableApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class PlannablePayloadIEnumerableApiResponse { - /// Gets or sets the embedded data of type T. + /// + /// Gets or sets the embedded data of type T. + /// [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Flight position report model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PositionReport + + /// + /// Flight position report model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class PositionReport { - /// Gets or sets the true airspeed in knots. + /// + /// Gets or sets the true airspeed in knots. + /// [Newtonsoft.Json.JsonProperty("airspeedTrue", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double AirspeedTrue { get; set; } - - /// Gets or sets the altitude in feet. + + /// + /// Gets or sets the altitude in feet. + /// [Newtonsoft.Json.JsonProperty("altitude", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Altitude { get; set; } - - /// The bank angle in degrees. + + /// + /// The bank angle in degrees. + /// [Newtonsoft.Json.JsonProperty("bankAngle", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double BankAngle { get; set; } - + [Newtonsoft.Json.JsonProperty("flightPhase", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public FlightPhase FlightPhase { get; set; } - - /// Gets or sets the fuel tank center 2 quantity. + + /// + /// Gets or sets the fuel tank center 2 quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankCenter2Quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double FuelTankCenter2Quantity { get; set; } - - /// Gets or sets the fuel tank center 3 quantity. + + /// + /// Gets or sets the fuel tank center 3 quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankCenter3Quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double FuelTankCenter3Quantity { get; set; } - - /// Gets or sets the fuel tank center quantity. + + /// + /// Gets or sets the fuel tank center quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankCenterQuantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double FuelTankCenterQuantity { get; set; } - - /// Gets or sets the fuel tank external 1 quantity. + + /// + /// Gets or sets the fuel tank external 1 quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankExternal1Quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double FuelTankExternal1Quantity { get; set; } - - /// Gets or sets the fuel tank external 2 quantity. + + /// + /// Gets or sets the fuel tank external 2 quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankExternal2Quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double FuelTankExternal2Quantity { get; set; } - - /// Gets or sets the fuel tank left auxiliary quantity. + + /// + /// Gets or sets the fuel tank left auxiliary quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankLeftAuxQuantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double FuelTankLeftAuxQuantity { get; set; } - - /// Gets or sets the fuel tank left main quantity. + + /// + /// Gets or sets the fuel tank left main quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankLeftMainQuantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double FuelTankLeftMainQuantity { get; set; } - - /// Gets or sets the fuel tank left tip quantity. + + /// + /// Gets or sets the fuel tank left tip quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankLeftTipQuantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double FuelTankLeftTipQuantity { get; set; } - - /// Gets or sets the fuel tank right auxiliary quantity. + + /// + /// Gets or sets the fuel tank right auxiliary quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankRightAuxQuantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double FuelTankRightAuxQuantity { get; set; } - - /// Gets or sets the fuel tank right main quantity. + + /// + /// Gets or sets the fuel tank right main quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankRightMainQuantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double FuelTankRightMainQuantity { get; set; } - - /// Gets or sets the fuel tank right tip quantity. + + /// + /// Gets or sets the fuel tank right tip quantity. + /// [Newtonsoft.Json.JsonProperty("fuelTankRightTipQuantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double FuelTankRightTipQuantity { get; set; } - - /// Gets or sets the ground speed in knots. + + /// + /// Gets or sets the ground speed in knots. + /// [Newtonsoft.Json.JsonProperty("groundSpeed", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double GroundSpeed { get; set; } - - /// The magnetic heading. + + /// + /// The magnetic heading. + /// [Newtonsoft.Json.JsonProperty("heading", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Heading { get; set; } - - /// Gets or sets the identifier for the flight. + + /// + /// Gets or sets the identifier for the flight. + /// [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Guid Id { get; set; } - - /// The latitude in degrees. + + /// + /// The latitude in degrees. + /// [Newtonsoft.Json.JsonProperty("latitude", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Latitude { get; set; } - - /// The longitude in degrees. + + /// + /// The longitude in degrees. + /// [Newtonsoft.Json.JsonProperty("longitude", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Longitude { get; set; } - - /// Is the plane on the ground? + + /// + /// Is the plane on the ground? + /// [Newtonsoft.Json.JsonProperty("onGround", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool OnGround { get; set; } - - /// The pitch angle in degrees. + + /// + /// The pitch angle in degrees. + /// [Newtonsoft.Json.JsonProperty("pitchAngle", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double PitchAngle { get; set; } - - /// The radio height in feet. + + /// + /// The radio height in feet. + /// [Newtonsoft.Json.JsonProperty("radioHeight", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? RadioHeight { get; set; } - - /// Gets or sets the time-warp time saved (in seconds). + + /// + /// Gets or sets the time-warp time saved (in seconds). + /// [Newtonsoft.Json.JsonProperty("timeWarpTimeSavedSeconds", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TimeWarpTimeSavedSeconds { get; set; } - - /// The vertical speed in feet per second. + + /// + /// The vertical speed in feet per second. + /// [Newtonsoft.Json.JsonProperty("verticalSpeedSeconds", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double VerticalSpeedSeconds { get; set; } - - + } - - /// General purpose enum for handling different states of an entity Import, queued tasks etc... 0 = NeedsHandling, 1 = Queued, 2 = Finished, 3 = Failed - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// General purpose enum for handling different states of an entity Import, queued tasks etc... 0 = NeedsHandling, 1 = Queued, 2 = Finished, 3 = Failed + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] public enum ProcessingStatus { + NeedsHandling = 0, - + Queued = 1, - + Finished = 2, - + Failed = 3, - + } - - /// Purchase aircraft model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PurchaseAircraft + + /// + /// Purchase aircraft model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class PurchaseAircraft { - /// Gets or sets a value indicating whether to purchase the aircraft for the airline or the user. + /// + /// Gets or sets a value indicating whether to purchase the aircraft for the airline or the user. + /// [Newtonsoft.Json.JsonProperty("forAirline", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool ForAirline { get; set; } - - /// Gets or sets the registry. + + /// + /// Gets or sets the registry. + /// [Newtonsoft.Json.JsonProperty("registry", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Registry { get; set; } - - /// Gets or sets the identifier of the variant (can be Guid.Empty). + + /// + /// Gets or sets the identifier of the variant (can be Guid.Empty). + /// [Newtonsoft.Json.JsonProperty("variantID", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Guid VariantID { get; set; } - - + } - - /// Purchase new aircraft model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PurchaseNewAircraft + + /// + /// Purchase new aircraft model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class PurchaseNewAircraft { [Newtonsoft.Json.JsonProperty("country", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public Country Country { get; set; } - - /// Gets or sets the delivery airport ICAO. + + /// + /// Gets or sets the delivery airport ICAO. + /// [Newtonsoft.Json.JsonProperty("deliveryAirportICAO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string DeliveryAirportICAO { get; set; } - + [Newtonsoft.Json.JsonProperty("deliveryOption", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public NewAircraftDeliveryOption DeliveryOption { get; set; } - - /// Gets or sets the ferry airport ICAO. + + /// + /// Gets or sets the ferry airport ICAO. + /// [Newtonsoft.Json.JsonProperty("ferryAirportICAO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string FerryAirportICAO { get; set; } - - /// Gets or sets a value indicating whether to purchase the aircraft for the airline or the user. + + /// + /// Gets or sets a value indicating whether to purchase the aircraft for the airline or the user. + /// [Newtonsoft.Json.JsonProperty("forAirline", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool ForAirline { get; set; } - - /// Gets or sets the number of aircraft to purchase. + + /// + /// Gets or sets the number of aircraft to purchase. + /// [Newtonsoft.Json.JsonProperty("numberOfAircraft", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int NumberOfAircraft { get; set; } - - /// Gets or sets the outsource ferry rate (SkyBucks / NM). + + /// + /// Gets or sets the outsource ferry rate (SkyBucks / NM). + /// [Newtonsoft.Json.JsonProperty("outsourceFerryRate", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int OutsourceFerryRate { get; set; } - - /// Gets or sets the identifier of the type. + + /// + /// Gets or sets the identifier of the type. + /// [Newtonsoft.Json.JsonProperty("typeID", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Guid TypeID { get; set; } - - + } - - /// Refresh JWT token model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RefreshToken + + /// + /// Refresh JWT token model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class RefreshToken { - /// Gets or sets the refresh token. + /// + /// Gets or sets the refresh token. + /// [Newtonsoft.Json.JsonProperty("refresh", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Refresh { get; set; } - - /// Gets or sets the token. + + /// + /// Gets or sets the token. + /// [Newtonsoft.Json.JsonProperty("token", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Token { get; set; } - - + } - - /// Refresh token response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RefreshTokenResponse + + /// + /// Refresh token response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class RefreshTokenResponse { - /// Gets or sets the Date/Time of the expiration. + /// + /// Gets or sets the Date/Time of the expiration. + /// [Newtonsoft.Json.JsonProperty("expiration", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset Expiration { get; set; } - - /// Gets or sets the refresh token. + + /// + /// Gets or sets the refresh token. + /// [Newtonsoft.Json.JsonProperty("refreshToken", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string RefreshToken { get; set; } - - /// Gets or sets the Date/Time of the refresh token expiration. + + /// + /// Gets or sets the Date/Time of the refresh token expiration. + /// [Newtonsoft.Json.JsonProperty("refreshTokenExpiration", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset RefreshTokenExpiration { get; set; } - - /// Gets or sets the token. + + /// + /// Gets or sets the token. + /// [Newtonsoft.Json.JsonProperty("token", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Token { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RefreshTokenResponseApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class RefreshTokenResponseApiResponse { [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public RefreshTokenResponse Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Register user model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RegisterUser + + /// + /// Register user model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class RegisterUser { - /// Gets or sets the email. + /// + /// Gets or sets the email. + /// [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Email { get; set; } - - /// Gets or sets the password. + + /// + /// Gets or sets the password. + /// [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Password { get; set; } - - /// Gets or sets the recaptcha token. + + /// + /// Gets or sets the recaptcha token. + /// [Newtonsoft.Json.JsonProperty("recaptchaToken", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string RecaptchaToken { get; set; } - - /// Gets or sets the username. + + /// + /// Gets or sets the username. + /// [Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(15, MinimumLength = 3)] public string Username { get; set; } - - + } - - /// Resend validation email model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ResendValidationEmail + + /// + /// Resend validation email model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class ResendValidationEmail { - /// Gets or sets the email. + /// + /// Gets or sets the email. + /// [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Email { get; set; } - - /// Gets or sets the recaptcha token. + + /// + /// Gets or sets the recaptcha token. + /// [Newtonsoft.Json.JsonProperty("recaptchaToken", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string RecaptchaToken { get; set; } - - + } - - /// Reset password model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ResetPassword + + /// + /// Reset password model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class ResetPassword { - /// Gets or sets the email. + /// + /// Gets or sets the email. + /// [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Email { get; set; } - - /// Gets or sets the password. + + /// + /// Gets or sets the password. + /// [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Password { get; set; } - - /// Gets or sets the recaptcha token. + + /// + /// Gets or sets the recaptcha token. + /// [Newtonsoft.Json.JsonProperty("recaptchaToken", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string RecaptchaToken { get; set; } - - /// Gets or sets a value indicating whether to reset all OpenSky api tokens. + + /// + /// Gets or sets a value indicating whether to reset all OpenSky api tokens. + /// [Newtonsoft.Json.JsonProperty("resetTokens", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool ResetTokens { get; set; } - - /// Gets or sets the token. + + /// + /// Gets or sets the token. + /// [Newtonsoft.Json.JsonProperty("token", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Token { get; set; } - - + } - - /// Revoke token model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RevokeToken + + /// + /// Revoke token model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class RevokeToken { - /// Gets or sets the OpenSky refresh token ID to invalidate. + /// + /// Gets or sets the OpenSky refresh token ID to invalidate. + /// [Newtonsoft.Json.JsonProperty("token", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Token { get; set; } - - + } - - /// Revoke token by name and expiry model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RevokeTokenByName + + /// + /// Revoke token by name and expiry model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class RevokeTokenByName { - /// Gets or sets the Date/Time of the expiry. + /// + /// Gets or sets the Date/Time of the expiry. + /// [Newtonsoft.Json.JsonProperty("expiry", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset Expiry { get; set; } - - /// Gets or sets the name. + + /// + /// Gets or sets the name. + /// [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Name { get; set; } - - + } - - /// Runway model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Runway + + /// + /// Runway model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class Runway { - /// Gets or sets the airport ICAO. + /// + /// Gets or sets the airport ICAO. + /// [Newtonsoft.Json.JsonProperty("airportICAO", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] [System.ComponentModel.DataAnnotations.StringLength(5, MinimumLength = 3)] public string AirportICAO { get; set; } - - /// Gets or sets the altitude. + + /// + /// Gets or sets the altitude. + /// [Newtonsoft.Json.JsonProperty("altitude", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int Altitude { get; set; } - - /// The type of center lighting (NULL for no lighting). + + /// + /// The type of center lighting (NULL for no lighting). + /// [Newtonsoft.Json.JsonProperty("centerLight", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(1)] public string CenterLight { get; set; } - - /// The type of available edge lighting (NULL for no lighting). + + /// + /// The type of available edge lighting (NULL for no lighting). + /// [Newtonsoft.Json.JsonProperty("edgeLight", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(1)] public string EdgeLight { get; set; } - - /// Gets or sets the runway ID. + + /// + /// Gets or sets the runway ID. + /// [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int Id { get; set; } - - /// Gets or sets the length of the runway in feet. + + /// + /// Gets or sets the length of the runway in feet. + /// [Newtonsoft.Json.JsonProperty("length", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int Length { get; set; } - - /// Gets or sets the runway ends. + + /// + /// Gets or sets the runway ends. + /// [Newtonsoft.Json.JsonProperty("runwayEnds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection RunwayEnds { get; set; } - - /// Gets or sets the surface type (can be "UNKNOWN" in a few cases). + + /// + /// Gets or sets the surface type (can be "UNKNOWN" in a few cases). + /// [Newtonsoft.Json.JsonProperty("surface", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(7)] public string Surface { get; set; } - - /// Gets or sets the width of the runway in feet. + + /// + /// Gets or sets the width of the runway in feet. + /// [Newtonsoft.Json.JsonProperty("width", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int Width { get; set; } - - + } - - /// Runway-End model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RunwayEnd + + /// + /// Runway-End model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class RunwayEnd { - /// Gets or sets the approach light system (NULL for no approach light). + /// + /// Gets or sets the approach light system (NULL for no approach light). + /// [Newtonsoft.Json.JsonProperty("approachLightSystem", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(15)] public string ApproachLightSystem { get; set; } - - /// Gets or sets a value indicating whether the runway end has closed markings painted on it. + + /// + /// Gets or sets a value indicating whether the runway end has closed markings painted on it. + /// [Newtonsoft.Json.JsonProperty("hasClosedMarkings", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool HasClosedMarkings { get; set; } - - /// Gets or sets the compass heading. + + /// + /// Gets or sets the compass heading. + /// [Newtonsoft.Json.JsonProperty("heading", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Heading { get; set; } - - /// Gets or sets the runway end ID. + + /// + /// Gets or sets the runway end ID. + /// [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int Id { get; set; } - - /// Gets or sets the latitude. + + /// + /// Gets or sets the latitude. + /// [Newtonsoft.Json.JsonProperty("latitude", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Latitude { get; set; } - - /// Gets or sets the left VASI pitch angle. + + /// + /// Gets or sets the left VASI pitch angle. + /// [Newtonsoft.Json.JsonProperty("leftVasiPitch", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? LeftVasiPitch { get; set; } - - /// Gets or sets the left VASI (Visual approach slope indicator) type. + + /// + /// Gets or sets the left VASI (Visual approach slope indicator) type. + /// [Newtonsoft.Json.JsonProperty("leftVasiType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(15)] public string LeftVasiType { get; set; } - - /// Gets or sets the longitude. + + /// + /// Gets or sets the longitude. + /// [Newtonsoft.Json.JsonProperty("longitude", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Longitude { get; set; } - - /// Gets or sets the name (for example 04L). + + /// + /// Gets or sets the name (for example 04L). + /// [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [System.ComponentModel.DataAnnotations.StringLength(10)] public string Name { get; set; } - - /// Gets or sets the offset threshold in feet. + + /// + /// Gets or sets the offset threshold in feet. + /// [Newtonsoft.Json.JsonProperty("offsetThreshold", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int OffsetThreshold { get; set; } - - /// Gets or sets the right VASI pitch angle. + + /// + /// Gets or sets the right VASI pitch angle. + /// [Newtonsoft.Json.JsonProperty("rightVasiPitch", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double? RightVasiPitch { get; set; } - - /// Gets or sets the right VASI (Visual approach slope indicator) type. + + /// + /// Gets or sets the right VASI (Visual approach slope indicator) type. + /// [Newtonsoft.Json.JsonProperty("rightVasiType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(15)] public string RightVasiType { get; set; } - - /// Gets or sets the parent runway ID. + + /// + /// Gets or sets the parent runway ID. + /// [Newtonsoft.Json.JsonProperty("runwayID", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int RunwayID { get; set; } - - + } - - /// Simulators. 0 = MSFS, 1 = XPlane11 - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// Simulators. 0 = MSFS, 1 = XPlane11 + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] public enum Simulator { + MSFS = 0, - + XPlane11 = 1, - + } - - /// Start flight model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class StartFlight + + /// + /// Start flight model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class StartFlight { - /// Gets or sets the identifier of the flight. + /// + /// Gets or sets the identifier of the flight. + /// [Newtonsoft.Json.JsonProperty("flightID", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Guid FlightID { get; set; } - - /// Gets or sets a list of states to override the checks for. + + /// + /// Gets or sets a list of states to override the checks for. + /// [Newtonsoft.Json.JsonProperty("overrideStates", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection OverrideStates { get; set; } - - + } - - /// Start flight status. 0 = Started, 1 = AircraftNotAtOrigin, 2 = OriginDoesntSellAvGas, 3 = OriginDoesntSellJetFuel, 4 = NonFlightPlanPayloadsFound, -1 = Error - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] + + /// + /// Start flight status. 0 = Started, 1 = AircraftNotAtOrigin, 2 = OriginDoesntSellAvGas, 3 = OriginDoesntSellJetFuel, 4 = NonFlightPlanPayloadsFound, -1 = Error + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] public enum StartFlightStatus { + Started = 0, - + AircraftNotAtOrigin = 1, - + OriginDoesntSellAvGas = 2, - + OriginDoesntSellJetFuel = 3, - + NonFlightPlanPayloadsFound = 4, - + Error = -1, - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class StartFlightStatusApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class StartFlightStatusApiResponse { [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public StartFlightStatus Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class StringApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class StringApiResponse { - /// Gets or sets the embedded data of type T. + /// + /// Gets or sets the embedded data of type T. + /// [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class StringIEnumerableApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class StringIEnumerableApiResponse { - /// Gets or sets the embedded data of type T. + /// + /// Gets or sets the embedded data of type T. + /// [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Token model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Token + + /// + /// Token model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class Token { - /// Gets or sets the Date/Time of the expiry of the token. + /// + /// Gets or sets the Date/Time of the expiry of the token. + /// [Newtonsoft.Json.JsonProperty("expiry", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset Expiry { get; set; } - - /// Gets or sets the name of the token (ex. website, agent-msfs, etc.). + + /// + /// Gets or sets the name of the token (ex. website, agent-msfs, etc.). + /// [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Name { get; set; } - - /// Gets or sets the geo location (country) the token was created from. + + /// + /// Gets or sets the geo location (country) the token was created from. + /// [Newtonsoft.Json.JsonProperty("tokenGeo", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string TokenGeo { get; set; } - - /// Gets or sets the IP address the token was created from. + + /// + /// Gets or sets the IP address the token was created from. + /// [Newtonsoft.Json.JsonProperty("tokenIP", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string TokenIP { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TokenIEnumerableApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class TokenIEnumerableApiResponse { - /// Gets or sets the embedded data of type T. + /// + /// Gets or sets the embedded data of type T. + /// [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Update aircraft model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateAircraft + + /// + /// Update aircraft model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class UpdateAircraft { - /// Gets or sets the user-chosen name of the aircraft. + /// + /// Gets or sets the user-chosen name of the aircraft. + /// [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(30)] public string Name { get; set; } - - /// Gets or sets the purchase price. + + /// + /// Gets or sets the purchase price. + /// [Newtonsoft.Json.JsonProperty("purchasePrice", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int? PurchasePrice { get; set; } - - /// Gets or sets the registry of the aircraft to update. + + /// + /// Gets or sets the registry of the aircraft to update. + /// [Newtonsoft.Json.JsonProperty("registry", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Registry { get; set; } - - /// Gets or sets the rent price. + + /// + /// Gets or sets the rent price. + /// [Newtonsoft.Json.JsonProperty("rentPrice", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int? RentPrice { get; set; } - - /// Gets or sets the identifier of the variant (can be set to Guid.Empty to leave unchanged). + + /// + /// Gets or sets the identifier of the variant (can be set to Guid.Empty to leave unchanged). + /// [Newtonsoft.Json.JsonProperty("variantID", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Guid VariantID { get; set; } - - + + } + + /// + /// OpenSky user model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class User + { + /// + /// Gets or sets the number of failed access attempts. + /// + [Newtonsoft.Json.JsonProperty("accessFailedCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int AccessFailedCount { get; set; } + + /// + /// Gets or sets the email. + /// + [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Email { get; set; } + + /// + /// Gets or sets a value indicating whether the user confirmed the email address. + /// + [Newtonsoft.Json.JsonProperty("emailConfirmed", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool EmailConfirmed { get; set; } + + /// + /// Gets or sets the user identifier. + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Guid Id { get; set; } + + /// + /// Gets or sets the Date/Time of the last login. + /// + [Newtonsoft.Json.JsonProperty("lastLogin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? LastLogin { get; set; } + + /// + /// Gets or sets the last login geo location if available. + /// + [Newtonsoft.Json.JsonProperty("lastLoginGeo", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string LastLoginGeo { get; set; } + + /// + /// Gets or sets the last login IP. + /// + [Newtonsoft.Json.JsonProperty("lastLoginIP", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string LastLoginIP { get; set; } + + /// + /// Gets or sets the Date/Time the user registered on. + /// + [Newtonsoft.Json.JsonProperty("registeredOn", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset RegisteredOn { get; set; } + + /// + /// Gets or sets the username. + /// + [Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Username { get; set; } + + /// + /// Gets or sets the roles of the user. + /// + [Newtonsoft.Json.JsonProperty("roles", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Roles { get; set; } + } - - /// User airline information data contract. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserAirline + + /// + /// User airline information data contract. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class UserAirline { - /// Gets or sets the optional IATA code of the airline. + /// + /// Gets or sets the optional IATA code of the airline. + /// [Newtonsoft.Json.JsonProperty("iata", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(2, MinimumLength = 2)] public string Iata { get; set; } - - /// Gets or sets the airline ICAO code. + + /// + /// Gets or sets the airline ICAO code. + /// [Newtonsoft.Json.JsonProperty("icao", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(3, MinimumLength = 3)] public string Icao { get; set; } - - /// Gets or sets the name of the airline. + + /// + /// Gets or sets the name of the airline. + /// [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [System.ComponentModel.DataAnnotations.StringLength(50, MinimumLength = 4)] public string Name { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserAirlineApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class UserAirlineApiResponse { [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public UserAirline Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// + [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ErrorDetails { get; set; } + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// + [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsError { get; set; } + + /// + /// Gets or sets the message. + /// + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + /// + /// Gets or sets the status. + /// + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Status { get; set; } + + } + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class UserIEnumerableApiResponse + { + /// + /// Gets or sets the embedded data of type T. + /// + [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Data { get; set; } + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// Validate email model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ValidateEmail + + /// + /// Validate email model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class ValidateEmail { - /// Gets or sets the email. + /// + /// Gets or sets the email. + /// [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Email { get; set; } - - /// Gets or sets the recaptcha token. + + /// + /// Gets or sets the recaptcha token. + /// [Newtonsoft.Json.JsonProperty("recaptchaToken", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string RecaptchaToken { get; set; } - - /// Gets or sets the token. + + /// + /// Gets or sets the token. + /// [Newtonsoft.Json.JsonProperty("token", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [System.ComponentModel.DataAnnotations.Required] public string Token { get; set; } - - + } - - /// World map flight. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class WorldMapFlight + + /// + /// World map flight. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class WorldMapFlight { - /// Gets or sets the aircraft registry. + /// + /// Gets or sets the aircraft registry. + /// [Newtonsoft.Json.JsonProperty("aircraftRegistry", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string AircraftRegistry { get; set; } - - /// Gets or sets the type of the aircraft. + + /// + /// Gets or sets the type of the aircraft. + /// [Newtonsoft.Json.JsonProperty("aircraftType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string AircraftType { get; set; } - - /// Gets or sets the altitude in feet. + + /// + /// Gets or sets the altitude in feet. + /// [Newtonsoft.Json.JsonProperty("altitude", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Altitude { get; set; } - - /// Gets or sets the Destination for the. + + /// + /// Gets or sets the Destination for the. + /// [Newtonsoft.Json.JsonProperty("destination", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Destination { get; set; } - + [Newtonsoft.Json.JsonProperty("flightPhase", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public FlightPhase FlightPhase { get; set; } - - /// Gets or sets the full flight number. + + /// + /// Gets or sets the full flight number. + /// [Newtonsoft.Json.JsonProperty("fullFlightNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string FullFlightNumber { get; set; } - - /// Gets or sets the ground speed in knots. + + /// + /// Gets or sets the ground speed in knots. + /// [Newtonsoft.Json.JsonProperty("groundSpeed", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double GroundSpeed { get; set; } - - /// The magnetic heading. + + /// + /// The magnetic heading. + /// [Newtonsoft.Json.JsonProperty("heading", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Heading { get; set; } - - /// Gets or sets a value indicating whether this flight is paused. + + /// + /// Gets or sets a value indicating whether this flight is paused. + /// [Newtonsoft.Json.JsonProperty("isPaused", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsPaused { get; set; } - - /// The latitude in degrees. + + /// + /// The latitude in degrees. + /// [Newtonsoft.Json.JsonProperty("latitude", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Latitude { get; set; } - - /// The longitude in degrees. + + /// + /// The longitude in degrees. + /// [Newtonsoft.Json.JsonProperty("longitude", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Longitude { get; set; } - - /// Is the plane on the ground? + + /// + /// Is the plane on the ground? + /// [Newtonsoft.Json.JsonProperty("onGround", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool OnGround { get; set; } - - /// Gets or sets the operator. + + /// + /// Gets or sets the operator. + /// [Newtonsoft.Json.JsonProperty("operator", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Operator { get; set; } - - /// Gets or sets the origin. + + /// + /// Gets or sets the origin. + /// [Newtonsoft.Json.JsonProperty("origin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Origin { get; set; } - - /// Gets or sets the pilot. + + /// + /// Gets or sets the pilot. + /// [Newtonsoft.Json.JsonProperty("pilot", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Pilot { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class WorldMapFlightIEnumerableApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class WorldMapFlightIEnumerableApiResponse { - /// Gets or sets the embedded data of type T. + /// + /// Gets or sets the embedded data of type T. + /// [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - - /// World statistics overview model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class WorldStatisticsOverview + + /// + /// World statistics overview model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class WorldStatisticsOverview { - /// Gets or sets a pie chart series for aircraft categories. + /// + /// Gets or sets a pie chart series for aircraft categories. + /// [Newtonsoft.Json.JsonProperty("aircraftCategories", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection AircraftCategories { get; set; } - - /// Gets or sets a pie chart series for aircraft ownership. + + /// + /// Gets or sets a pie chart series for aircraft ownership. + /// [Newtonsoft.Json.JsonProperty("aircraftOwner", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection AircraftOwner { get; set; } - - /// Gets or sets a pie chart series for airport sizes. + + /// + /// Gets or sets a pie chart series for airport sizes. + /// [Newtonsoft.Json.JsonProperty("airportSizes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection AirportSizes { get; set; } - - /// Gets or sets a pie chart series for approach types. + + /// + /// Gets or sets a pie chart series for approach types. + /// [Newtonsoft.Json.JsonProperty("approachTypes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection ApproachTypes { get; set; } - - /// Gets or sets the completed flights. + + /// + /// Gets or sets the completed flights. + /// [Newtonsoft.Json.JsonProperty("completedFlights", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int CompletedFlights { get; set; } - - /// Gets or sets the completed flights for MSFS. + + /// + /// Gets or sets the completed flights for MSFS. + /// [Newtonsoft.Json.JsonProperty("completedFlightsMSFS", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int CompletedFlightsMSFS { get; set; } - - /// Gets or sets the completed flights for XPlane11. + + /// + /// Gets or sets the completed flights for XPlane11. + /// [Newtonsoft.Json.JsonProperty("completedFlightsXP11", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int CompletedFlightsXP11 { get; set; } - - /// Gets or sets a pie chart series for flight aircraft categories. + + /// + /// Gets or sets a pie chart series for flight aircraft categories. + /// [Newtonsoft.Json.JsonProperty("flightAircraftCategories", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection FlightAircraftCategories { get; set; } - - /// Gets or sets a pie chart series for flight operators. + + /// + /// Gets or sets a pie chart series for flight operators. + /// [Newtonsoft.Json.JsonProperty("flightOperators", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection FlightOperators { get; set; } - - /// Gets or sets a pie chart series for fuel availability at airports. + + /// + /// Gets or sets a pie chart series for fuel availability at airports. + /// [Newtonsoft.Json.JsonProperty("fuelAvailability", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection FuelAvailability { get; set; } - - /// Gets or sets a pie chart series for job categories. + + /// + /// Gets or sets a pie chart series for job categories. + /// [Newtonsoft.Json.JsonProperty("jobAircraftCategories", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection JobAircraftCategories { get; set; } - - /// Gets or sets a pie chart series for job operators. + + /// + /// Gets or sets a pie chart series for job operators. + /// [Newtonsoft.Json.JsonProperty("jobOperators", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection JobOperators { get; set; } - - /// Gets or sets the jobs generated. + + /// + /// Gets or sets the jobs generated. + /// [Newtonsoft.Json.JsonProperty("jobsGenerated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int JobsGenerated { get; set; } - - /// Gets or sets a pie chart series for job types. + + /// + /// Gets or sets a pie chart series for job types. + /// [Newtonsoft.Json.JsonProperty("jobTypes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection JobTypes { get; set; } - - /// Gets or sets a pie chart series for runway lights. + + /// + /// Gets or sets a pie chart series for runway lights. + /// [Newtonsoft.Json.JsonProperty("runwayLights", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection RunwayLights { get; set; } - - /// Gets or sets a pie chart series for runway surfaces. + + /// + /// Gets or sets a pie chart series for runway surfaces. + /// [Newtonsoft.Json.JsonProperty("runwaySurfaces", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection RunwaySurfaces { get; set; } - - /// Gets or sets the total number of aircraft. + + /// + /// Gets or sets the total number of aircraft. + /// [Newtonsoft.Json.JsonProperty("totalAircraft", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TotalAircraft { get; set; } - - /// Gets or sets the total number of aircraft for MSFS. + + /// + /// Gets or sets the total number of aircraft for MSFS. + /// [Newtonsoft.Json.JsonProperty("totalAircraftMSFS", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TotalAircraftMSFS { get; set; } - - /// Gets or sets the total number of aircraft for XPlane11. + + /// + /// Gets or sets the total number of aircraft for XPlane11. + /// [Newtonsoft.Json.JsonProperty("totalAircraftXP11", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TotalAircraftXP11 { get; set; } - - /// Gets or sets the total number of airports. + + /// + /// Gets or sets the total number of airports. + /// [Newtonsoft.Json.JsonProperty("totalAirports", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TotalAirports { get; set; } - - /// Gets or sets the total number of airports for MSFS. + + /// + /// Gets or sets the total number of airports for MSFS. + /// [Newtonsoft.Json.JsonProperty("totalAirportsMSFS", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TotalAirportsMSFS { get; set; } - - /// Gets or sets the total number of airports for XPlane11. + + /// + /// Gets or sets the total number of airports for XPlane11. + /// [Newtonsoft.Json.JsonProperty("totalAirportsXP11", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TotalAirportsXP11 { get; set; } - - /// Gets or sets the total number of approaches. + + /// + /// Gets or sets the total number of approaches. + /// [Newtonsoft.Json.JsonProperty("totalApproaches", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TotalApproaches { get; set; } - - /// Gets or sets the total number of approaches for MSFS. + + /// + /// Gets or sets the total number of approaches for MSFS. + /// [Newtonsoft.Json.JsonProperty("totalApproachesMSFS", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TotalApproachesMSFS { get; set; } - - /// Gets or sets the total number of approaches for XPlane11. + + /// + /// Gets or sets the total number of approaches for XPlane11. + /// [Newtonsoft.Json.JsonProperty("totalApproachesXP11", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TotalApproachesXP11 { get; set; } - - /// Gets or sets the total number of jobs. + + /// + /// Gets or sets the total number of jobs. + /// [Newtonsoft.Json.JsonProperty("totalJobs", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TotalJobs { get; set; } - - /// Gets or sets the total number of jobs for MSFS. + + /// + /// Gets or sets the total number of jobs for MSFS. + /// [Newtonsoft.Json.JsonProperty("totalJobsMSFS", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TotalJobsMSFS { get; set; } - - /// Gets or sets the total number of jobs for XPlane11. + + /// + /// Gets or sets the total number of jobs for XPlane11. + /// [Newtonsoft.Json.JsonProperty("totalJobsXP11", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TotalJobsXP11 { get; set; } - - /// Gets or sets the total number of runways. + + /// + /// Gets or sets the total number of runways. + /// [Newtonsoft.Json.JsonProperty("totalRunways", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TotalRunways { get; set; } - - /// Gets or sets the total number of runways for MSFS. + + /// + /// Gets or sets the total number of runways for MSFS. + /// [Newtonsoft.Json.JsonProperty("totalRunwaysMSFS", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TotalRunwaysMSFS { get; set; } - - /// Gets or sets the total number of runways for XPlane11. + + /// + /// Gets or sets the total number of runways for XPlane11. + /// [Newtonsoft.Json.JsonProperty("totalRunwaysXP11", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TotalRunwaysXP11 { get; set; } - - + } - - /// API standard response model. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.2.1.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class WorldStatisticsOverviewApiResponse + + /// + /// API standard response model. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class WorldStatisticsOverviewApiResponse { [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public WorldStatisticsOverview Data { get; set; } - - /// Gets or sets the error details (NULL if no error). + + /// + /// Gets or sets the error details (NULL if no error). + /// [Newtonsoft.Json.JsonProperty("errorDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ErrorDetails { get; set; } - - /// Gets or sets a value indicating whether this response is reporting an error. + + /// + /// Gets or sets a value indicating whether this response is reporting an error. + /// [Newtonsoft.Json.JsonProperty("isError", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsError { get; set; } - - /// Gets or sets the message. + + /// + /// Gets or sets the message. + /// [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } - - /// Gets or sets the status. + + /// + /// Gets or sets the status. + /// [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Status { get; set; } - - + } - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.8.2.0 (NJsonSchema v10.2.1.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class FileParameter { public FileParameter(System.IO.Stream data) @@ -11160,7 +14036,9 @@ public FileParameter(System.IO.Stream data, string fileName, string contentType) public string ContentType { get; private set; } } - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.8.2.0 (NJsonSchema v10.2.1.0 (Newtonsoft.Json v11.0.0.0))")] + + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class ApiException : System.Exception { public int StatusCode { get; private set; } @@ -11173,7 +14051,7 @@ public ApiException(string message, int statusCode, string response, System.Coll : base(message + "\n\nStatus: " + statusCode + "\nResponse: \n" + ((response == null) ? "(null)" : response.Substring(0, response.Length >= 512 ? 512 : response.Length)), innerException) { StatusCode = statusCode; - Response = response; + Response = response; Headers = headers; } @@ -11183,7 +14061,7 @@ public override string ToString() } } - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.8.2.0 (NJsonSchema v10.2.1.0 (Newtonsoft.Json v11.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))")] public partial class ApiException : ApiException { public TResult Result { get; private set; } @@ -11201,4 +14079,6 @@ public ApiException(string message, int statusCode, string response, System.Coll #pragma warning restore 1573 #pragma warning restore 472 #pragma warning restore 114 -#pragma warning restore 108 \ No newline at end of file +#pragma warning restore 108 +#pragma warning restore 3016 +#pragma warning restore 8603 \ No newline at end of file diff --git a/OpenSky.Agent.Simulator/OpenAPIs/swagger.json b/OpenSky.Agent.Simulator/OpenAPIs/swagger.json index ff36b05..ca838bd 100644 --- a/OpenSky.Agent.Simulator/OpenAPIs/swagger.json +++ b/OpenSky.Agent.Simulator/OpenAPIs/swagger.json @@ -119,6 +119,134 @@ } } }, + "/Account/profileImage/{userId}": { + "get": { + "tags": [ + "Account" + ], + "summary": "Get profile image for the specified user ID.", + "description": "sushi.at, 23/11/2023.", + "operationId": "GetProfileImage", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "The ID of the OpenSky user.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ByteArrayApiResponse" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ByteArrayApiResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ByteArrayApiResponse" + } + } + } + } + } + } + }, + "/Account/users": { + "get": { + "tags": [ + "Account" + ], + "summary": "Get the list of all OpenSky users.", + "description": "sushi.at, 22/11/2023.", + "operationId": "GetUsers", + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/UserIEnumerableApiResponse" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserIEnumerableApiResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserIEnumerableApiResponse" + } + } + } + } + } + } + }, + "/Account/moderatorRole": { + "post": { + "tags": [ + "Account" + ], + "summary": "Adds or removes the moderator role from the specified user.", + "description": "sushi.at, 21/11/2023.", + "operationId": "SetModeratorRole", + "requestBody": { + "description": "The moderator role model.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModeratorRole" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ModeratorRole" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/ModeratorRole" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/StringApiResponse" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/StringApiResponse" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/StringApiResponse" + } + } + } + } + } + } + }, "/Account/tokenRenewalCountryVerification/{enableVerification}": { "put": { "tags": [ @@ -694,6 +822,17 @@ "summary": "Adds a new aircraft type.", "description": "sushi.at, 02/06/2021.", "operationId": "AddAircraftType", + "parameters": [ + { + "name": "upgradeForType", + "in": "query", + "description": "The ID of the aircraft type this one is an update for (auto adjusts next version and variants).", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], "requestBody": { "description": "The new aircraft type to add.", "content": { @@ -720,17 +859,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/StringApiResponse" + "$ref": "#/components/schemas/GuidApiResponse" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/StringApiResponse" + "$ref": "#/components/schemas/GuidApiResponse" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/StringApiResponse" + "$ref": "#/components/schemas/GuidApiResponse" } } } @@ -3964,6 +4103,11 @@ ], "type": "object", "properties": { + "airframeHours": { + "type": "number", + "description": "Gets or sets the airframe hours.", + "format": "double" + }, "airlineOwnerID": { "maxLength": 3, "minLength": 0, @@ -3982,6 +4126,26 @@ "description": "Can the aircraft currently start a new flight?", "readOnly": true }, + "engine1Hours": { + "type": "number", + "description": "Gets or sets the engine 1 hours.", + "format": "double" + }, + "engine2Hours": { + "type": "number", + "description": "Gets or sets the engine 2 hours.", + "format": "double" + }, + "engine3Hours": { + "type": "number", + "description": "Gets or sets the engine 3 hours.", + "format": "double" + }, + "engine4Hours": { + "type": "number", + "description": "Gets or sets the engine 4 hours.", + "format": "double" + }, "fuel": { "type": "number", "description": "Gets or sets the current fuel in gallons.", @@ -5091,10 +5255,12 @@ "format": "date-time" }, "package": { + "minLength": 1, "type": "string", "description": "Gets or sets the package contents (g-zipped, base64 encoded)." }, "packageHash": { + "minLength": 1, "type": "string", "description": "Gets or sets the package hash (SHA-256, base64 encoded)" } @@ -5172,6 +5338,7 @@ "type": "object", "properties": { "name": { + "minLength": 1, "type": "string", "description": "Gets or sets the name of the application." } @@ -5261,10 +5428,12 @@ "type": "object", "properties": { "newPassword": { + "minLength": 1, "type": "string", "description": "Gets or sets the password." }, "password": { + "minLength": 1, "type": "string", "description": "Gets or sets the password." }, @@ -6422,6 +6591,7 @@ "nullable": true }, "description": { + "minLength": 1, "type": "string", "description": "Gets or sets the description of the record." }, @@ -7029,6 +7199,7 @@ "format": "uuid" }, "ident": { + "minLength": 1, "type": "string", "description": "Gets or sets the ident of the fix." }, @@ -7043,6 +7214,7 @@ "format": "double" }, "type": { + "minLength": 1, "type": "string", "description": "Gets or sets the type of the fix." } @@ -7285,6 +7457,7 @@ "type": "object", "properties": { "email": { + "minLength": 1, "type": "string", "description": "Gets or sets the email.", "format": "email" @@ -7353,6 +7526,37 @@ "additionalProperties": false, "description": "Ground operations model." }, + "GuidApiResponse": { + "type": "object", + "properties": { + "data": { + "type": "string", + "description": "Gets or sets the embedded data of type T.", + "format": "uuid" + }, + "errorDetails": { + "type": "string", + "description": "Gets or sets the error details (NULL if no error).", + "nullable": true + }, + "isError": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this response is reporting an error." + }, + "message": { + "type": "string", + "description": "Gets or sets the message.", + "nullable": true + }, + "status": { + "type": "string", + "description": "Gets or sets the status.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "API standard response model." + }, "GuidNullableApiResponse": { "type": "object", "properties": { @@ -7590,6 +7794,7 @@ "type": "object", "properties": { "password": { + "minLength": 1, "type": "string", "description": "Gets or sets the password." }, @@ -7603,6 +7808,7 @@ "description": "Gets or sets a value indicating whether to remember the user login (extends JWT token expiry)." }, "username": { + "minLength": 1, "type": "string", "description": "Gets or sets the username." } @@ -7671,6 +7877,25 @@ "additionalProperties": false, "description": "API standard response model." }, + "ModeratorRole": { + "required": [ + "username" + ], + "type": "object", + "properties": { + "isModerator": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this user should be a moderator." + }, + "username": { + "minLength": 1, + "type": "string", + "description": "Gets or sets the username." + } + }, + "additionalProperties": false, + "description": "Moderator role model." + }, "NewAircraftDeliveryOption": { "enum": [ 0, @@ -8009,6 +8234,7 @@ "description": "Gets or sets a value indicating whether to purchase the aircraft for the airline or the user." }, "registry": { + "minLength": 1, "type": "string", "description": "Gets or sets the registry." }, @@ -8145,11 +8371,13 @@ "type": "object", "properties": { "email": { + "minLength": 1, "type": "string", "description": "Gets or sets the email.", "format": "email" }, "password": { + "minLength": 1, "type": "string", "description": "Gets or sets the password." }, @@ -8175,6 +8403,7 @@ "type": "object", "properties": { "email": { + "minLength": 1, "type": "string", "description": "Gets or sets the email.", "format": "email" @@ -8197,11 +8426,13 @@ "type": "object", "properties": { "email": { + "minLength": 1, "type": "string", "description": "Gets or sets the email.", "format": "email" }, "password": { + "minLength": 1, "type": "string", "description": "Gets or sets the password." }, @@ -8215,6 +8446,7 @@ "description": "Gets or sets a value indicating whether to reset all OpenSky api tokens." }, "token": { + "minLength": 1, "type": "string", "description": "Gets or sets the token." } @@ -8229,6 +8461,7 @@ "type": "object", "properties": { "token": { + "minLength": 1, "type": "string", "description": "Gets or sets the OpenSky refresh token ID to invalidate." } @@ -8642,6 +8875,7 @@ "nullable": true }, "registry": { + "minLength": 1, "type": "string", "description": "Gets or sets the registry of the aircraft to update." }, @@ -8660,6 +8894,66 @@ "additionalProperties": false, "description": "Update aircraft model." }, + "User": { + "type": "object", + "properties": { + "accessFailedCount": { + "type": "integer", + "description": "Gets or sets the number of failed access attempts.", + "format": "int32" + }, + "email": { + "type": "string", + "description": "Gets or sets the email.", + "nullable": true + }, + "emailConfirmed": { + "type": "boolean", + "description": "Gets or sets a value indicating whether the user confirmed the email address." + }, + "id": { + "type": "string", + "description": "Gets or sets the user identifier.", + "format": "uuid" + }, + "lastLogin": { + "type": "string", + "description": "Gets or sets the Date/Time of the last login.", + "format": "date-time", + "nullable": true + }, + "lastLoginGeo": { + "type": "string", + "description": "Gets or sets the last login geo location if available.", + "nullable": true + }, + "lastLoginIP": { + "type": "string", + "description": "Gets or sets the last login IP.", + "nullable": true + }, + "registeredOn": { + "type": "string", + "description": "Gets or sets the Date/Time the user registered on.", + "format": "date-time" + }, + "username": { + "type": "string", + "description": "Gets or sets the username.", + "nullable": true + }, + "roles": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Gets or sets the roles of the user.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "OpenSky user model." + }, "UserAirline": { "type": "object", "properties": { @@ -8717,6 +9011,40 @@ "additionalProperties": false, "description": "API standard response model." }, + "UserIEnumerableApiResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + }, + "description": "Gets or sets the embedded data of type T.", + "nullable": true + }, + "errorDetails": { + "type": "string", + "description": "Gets or sets the error details (NULL if no error).", + "nullable": true + }, + "isError": { + "type": "boolean", + "description": "Gets or sets a value indicating whether this response is reporting an error." + }, + "message": { + "type": "string", + "description": "Gets or sets the message.", + "nullable": true + }, + "status": { + "type": "string", + "description": "Gets or sets the status.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "API standard response model." + }, "ValidateEmail": { "required": [ "email", @@ -8725,6 +9053,7 @@ "type": "object", "properties": { "email": { + "minLength": 1, "type": "string", "description": "Gets or sets the email.", "format": "email" @@ -8735,6 +9064,7 @@ "nullable": true }, "token": { + "minLength": 1, "type": "string", "description": "Gets or sets the token." } diff --git a/OpenSky.Agent.Simulator/OpenSky.Agent.Simulator.csproj b/OpenSky.Agent.Simulator/OpenSky.Agent.Simulator.csproj index 5ec15ce..7ef456e 100644 --- a/OpenSky.Agent.Simulator/OpenSky.Agent.Simulator.csproj +++ b/OpenSky.Agent.Simulator/OpenSky.Agent.Simulator.csproj @@ -156,6 +156,9 @@ MSBuild:Compile + + + diff --git a/OpenSky.Agent/Views/Models/AircraftTypesViewModel.cs b/OpenSky.Agent/Views/Models/AircraftTypesViewModel.cs index e29013f..ffa4f07 100644 --- a/OpenSky.Agent/Views/Models/AircraftTypesViewModel.cs +++ b/OpenSky.Agent/Views/Models/AircraftTypesViewModel.cs @@ -45,6 +45,13 @@ public class AircraftTypesViewModel : ViewModel /// ------------------------------------------------------------------------------------------------- private Visibility addAircraftVisibility = Visibility.Collapsed; + /// ------------------------------------------------------------------------------------------------- + /// + /// The aircraft type being updated. + /// + /// ------------------------------------------------------------------------------------------------- + private Guid? aircraftTypeBeingUpdated; + /// ------------------------------------------------------------------------------------------------- /// /// The aircraft type details visibility. @@ -227,6 +234,13 @@ public class AircraftTypesViewModel : ViewModel /// ------------------------------------------------------------------------------------------------- private AircraftManufacturer selectedManufacturer; + /// ------------------------------------------------------------------------------------------------- + /// + /// The upgrade aircraft visibility. + /// + /// ------------------------------------------------------------------------------------------------- + private Visibility upgradeAircraftVisibility = Visibility.Collapsed; + /// ------------------------------------------------------------------------------------------------- /// /// The version number. @@ -278,126 +292,6 @@ public AircraftTypesViewModel() this.GetAircraftManufacturersCommand.DoExecute(null); } - /// ------------------------------------------------------------------------------------------------- - /// - /// Perform the specified aircraft type upgrade. - /// - /// - /// sushi.at, 29/11/2021. - /// - /// - /// The parameter. - /// - /// ------------------------------------------------------------------------------------------------- - private void UpdateAircraftType(object parameter) - { - if (parameter is AircraftTypeUpgrade upgrade) - { - this.LoadingText = "Upgrading aircraft..."; - try - { - var result = AgentOpenSkyService.Instance.UpgradeAircraftTypeAsync(upgrade).Result; - if (!result.IsError) - { - this.UpdateAircraftTypeCommand.ReportProgress(() => this.GetAircraftUpgradesCommand.DoExecute(null)); - } - else - { - this.UpdateAircraftTypeCommand.ReportProgress( - () => - { - Debug.WriteLine("Error performing aircraft type upgrade: " + result.Message); - if (!string.IsNullOrEmpty(result.ErrorDetails)) - { - Debug.WriteLine(result.ErrorDetails); - } - - var notification = new OpenSkyNotification("Error performing aircraft type upgrade", result.Message, MessageBoxButton.OK, ExtendedMessageBoxImage.Error, 30); - notification.SetErrorColorStyle(); - this.ViewReference.ShowNotification(notification); - }); - } - } - catch (Exception ex) - { - ex.HandleApiCallException(this.ViewReference, this.UpdateAircraftTypeCommand, "Error performing aircraft type upgrade"); - } - finally - { - this.LoadingText = null; - } - } - } - - /// ------------------------------------------------------------------------------------------------- - /// - /// Gets the update aircraft type command. - /// - /// ------------------------------------------------------------------------------------------------- - public AsynchronousCommand UpdateAircraftTypeCommand { get; } - - /// ------------------------------------------------------------------------------------------------- - /// - /// The upgrade aircraft visibility. - /// - /// ------------------------------------------------------------------------------------------------- - private Visibility upgradeAircraftVisibility = Visibility.Collapsed; - - /// ------------------------------------------------------------------------------------------------- - /// - /// Gets or sets the upgrade aircraft visibility. - /// - /// ------------------------------------------------------------------------------------------------- - public Visibility UpgradeAircraftVisibility - { - get => this.upgradeAircraftVisibility; - - set - { - if (Equals(this.upgradeAircraftVisibility, value)) - { - return; - } - - this.upgradeAircraftVisibility = value; - this.NotifyPropertyChanged(); - } - } - - /// ------------------------------------------------------------------------------------------------- - /// - /// Gets the close upgrade aircraft command. - /// - /// ------------------------------------------------------------------------------------------------- - public Command CloseUpgradeAircraftCommand { get; } - - /// ------------------------------------------------------------------------------------------------- - /// - /// Closes the upgrade aircraft view and clears the upgrades collection. - /// - /// - /// sushi.at, 29/11/2021. - /// - /// ------------------------------------------------------------------------------------------------- - public void CloseUpgradeAircraft() - { - this.UpgradeAircraftVisibility = Visibility.Collapsed; - } - - /// ------------------------------------------------------------------------------------------------- - /// - /// Gets the get aircraft upgrades command. - /// - /// ------------------------------------------------------------------------------------------------- - public AsynchronousCommand GetAircraftUpgradesCommand { get; } - - /// ------------------------------------------------------------------------------------------------- - /// - /// Gets the aircraft upgrades. - /// - /// ------------------------------------------------------------------------------------------------- - public ObservableCollection AircraftUpgrades { get; } - /// ------------------------------------------------------------------------------------------------- /// /// Gets the add aircraft type command. @@ -447,6 +341,13 @@ public Visibility AircraftTypeDetailsVisibility } } + /// ------------------------------------------------------------------------------------------------- + /// + /// Gets the aircraft upgrades. + /// + /// ------------------------------------------------------------------------------------------------- + public ObservableCollection AircraftUpgrades { get; } + /// ------------------------------------------------------------------------------------------------- /// /// Gets the abort add aircraft command. @@ -510,6 +411,13 @@ public AircraftTypeCategory Category /// ------------------------------------------------------------------------------------------------- public Command ClearVariantOfNewCommand { get; } + /// ------------------------------------------------------------------------------------------------- + /// + /// Gets the close upgrade aircraft command. + /// + /// ------------------------------------------------------------------------------------------------- + public Command CloseUpgradeAircraftCommand { get; } + /// ------------------------------------------------------------------------------------------------- /// /// Gets or sets the optional comments (what mod was loaded, etc.). @@ -689,6 +597,13 @@ public string EngineModel /// ------------------------------------------------------------------------------------------------- public AsynchronousCommand GetAircraftManufacturersCommand { get; } + /// ------------------------------------------------------------------------------------------------- + /// + /// Gets the get aircraft upgrades command. + /// + /// ------------------------------------------------------------------------------------------------- + public AsynchronousCommand GetAircraftUpgradesCommand { get; } + /// ------------------------------------------------------------------------------------------------- /// /// Gets the get user roles command. @@ -1155,6 +1070,34 @@ public AircraftManufacturer SelectedManufacturer /// ------------------------------------------------------------------------------------------------- public Command StartUpdateAircraftCommand { get; } + /// ------------------------------------------------------------------------------------------------- + /// + /// Gets the update aircraft type command. + /// + /// ------------------------------------------------------------------------------------------------- + public AsynchronousCommand UpdateAircraftTypeCommand { get; } + + /// ------------------------------------------------------------------------------------------------- + /// + /// Gets or sets the upgrade aircraft visibility. + /// + /// ------------------------------------------------------------------------------------------------- + public Visibility UpgradeAircraftVisibility + { + get => this.upgradeAircraftVisibility; + + set + { + if (Equals(this.upgradeAircraftVisibility, value)) + { + return; + } + + this.upgradeAircraftVisibility = value; + this.NotifyPropertyChanged(); + } + } + /// ------------------------------------------------------------------------------------------------- /// /// Gets the upload image command. @@ -1183,6 +1126,19 @@ public int VersionNumber } } + /// ------------------------------------------------------------------------------------------------- + /// + /// Closes the upgrade aircraft view and clears the upgrades collection. + /// + /// + /// sushi.at, 29/11/2021. + /// + /// ------------------------------------------------------------------------------------------------- + public void CloseUpgradeAircraft() + { + this.UpgradeAircraftVisibility = Visibility.Collapsed; + } + /// ------------------------------------------------------------------------------------------------- /// /// Adds the current plane identity to the CSV. @@ -1298,17 +1254,10 @@ private void AddAircraftType() } } - // The special "Missing" manufacturer was selected - if (this.SelectedManufacturer.Id == "miss") - { - newAircraftType.ManufacturerID = null; - newAircraftType.DeliveryLocations = null; - } - this.LoadingText = "Adding new aircraft type"; try { - var result = AgentOpenSkyService.Instance.AddAircraftTypeAsync(newAircraftType).Result; + var result = AgentOpenSkyService.Instance.AddAircraftTypeAsync(this.aircraftTypeBeingUpdated, newAircraftType).Result; if (!result.IsError) { this.AddAircraftTypeCommand.ReportProgress( @@ -1372,6 +1321,8 @@ private void CancelAddAircraft() this.MaximumPrice = 0; this.MinimumRunwayLength = 0; this.Comments = null; + + this.aircraftTypeBeingUpdated = null; } /// ------------------------------------------------------------------------------------------------- @@ -1470,64 +1421,18 @@ private void CopySelectedTypeToBeUpdated() this.EngineModel = this.SelectedAircraftType.EngineModel; this.OverrideFuelType = this.SelectedAircraftType.OverrideFuelType; this.IsHistoric = this.SelectedAircraftType.IsHistoric; - - this.AddAircraftVisibility = Visibility.Visible; - } - - /// ------------------------------------------------------------------------------------------------- - /// - /// Gets the available aircraft upgrades. - /// - /// - /// sushi.at, 29/11/2021. - /// - /// ------------------------------------------------------------------------------------------------- - private void GetAircraftUpgrades() - { - if (!UserSessionService.Instance.IsModerator) - { - return; - } - - this.LoadingText = "Checking for available aircraft type upgrades..."; - try + if (this.SelectedAircraftType.IsVariantOf.HasValue) { - var result = AgentOpenSkyService.Instance.GetAircraftTypeUpgradesAsync().Result; - if (!result.IsError) - { - this.GetAircraftUpgradesCommand.ReportProgress( - () => - { - this.AircraftUpgrades.Clear(); - this.AircraftUpgrades.AddRange(result.Data); - this.UpgradeAircraftVisibility = Visibility.Visible; - }); - } - else + var variantType = this.ExistingAircraftTypes.SingleOrDefault(t => t.Id == this.SelectedAircraftType.IsVariantOf.Value); + if (variantType != null) { - this.GetAircraftUpgradesCommand.ReportProgress( - () => - { - Debug.WriteLine("Error checking for aircraft type upgrades: " + result.Message); - if (!string.IsNullOrEmpty(result.ErrorDetails)) - { - Debug.WriteLine(result.ErrorDetails); - } - - var notification = new OpenSkyNotification("Error checking for aircraft type upgrades", result.Message, MessageBoxButton.OK, ExtendedMessageBoxImage.Error, 30); - notification.SetErrorColorStyle(); - this.ViewReference.ShowNotification(notification); - }); + this.IsVariantOf = variantType; } } - catch (Exception ex) - { - ex.HandleApiCallException(this.ViewReference, this.GetAircraftUpgradesCommand, "Error checking for aircraft type upgrades"); - } - finally - { - this.LoadingText = null; - } + + this.aircraftTypeBeingUpdated = this.SelectedAircraftType.Id; + + this.AddAircraftVisibility = Visibility.Visible; } /// ------------------------------------------------------------------------------------------------- @@ -1892,6 +1797,62 @@ private void GetAircraftManufacturers() } } + /// ------------------------------------------------------------------------------------------------- + /// + /// Gets the available aircraft upgrades. + /// + /// + /// sushi.at, 29/11/2021. + /// + /// ------------------------------------------------------------------------------------------------- + private void GetAircraftUpgrades() + { + if (!UserSessionService.Instance.IsModerator) + { + return; + } + + this.LoadingText = "Checking for available aircraft type upgrades..."; + try + { + var result = AgentOpenSkyService.Instance.GetAircraftTypeUpgradesAsync().Result; + if (!result.IsError) + { + this.GetAircraftUpgradesCommand.ReportProgress( + () => + { + this.AircraftUpgrades.Clear(); + this.AircraftUpgrades.AddRange(result.Data); + this.UpgradeAircraftVisibility = Visibility.Visible; + }); + } + else + { + this.GetAircraftUpgradesCommand.ReportProgress( + () => + { + Debug.WriteLine("Error checking for aircraft type upgrades: " + result.Message); + if (!string.IsNullOrEmpty(result.ErrorDetails)) + { + Debug.WriteLine(result.ErrorDetails); + } + + var notification = new OpenSkyNotification("Error checking for aircraft type upgrades", result.Message, MessageBoxButton.OK, ExtendedMessageBoxImage.Error, 30); + notification.SetErrorColorStyle(); + this.ViewReference.ShowNotification(notification); + }); + } + } + catch (Exception ex) + { + ex.HandleApiCallException(this.ViewReference, this.GetAircraftUpgradesCommand, "Error checking for aircraft type upgrades"); + } + finally + { + this.LoadingText = null; + } + } + /// ------------------------------------------------------------------------------------------------- /// /// Gets the user's OpenSky roles. @@ -1906,11 +1867,12 @@ private void GetUserRoles() var result = UserSessionService.Instance.UpdateUserRoles().Result; if (result) { - this.GetUserRolesCommand.ReportProgress(() => - { - this.RefreshAircraftTypesCommand.DoExecute(null); - this.GetAircraftUpgradesCommand.CanExecute = UserSessionService.Instance.IsModerator; - }); + this.GetUserRolesCommand.ReportProgress( + () => + { + this.RefreshAircraftTypesCommand.DoExecute(null); + this.GetAircraftUpgradesCommand.CanExecute = UserSessionService.Instance.IsModerator; + }); } else { @@ -2252,6 +2214,57 @@ private void StartUpdateAircraft() } } + /// ------------------------------------------------------------------------------------------------- + /// + /// Perform the specified aircraft type upgrade. + /// + /// + /// sushi.at, 29/11/2021. + /// + /// + /// The parameter. + /// + /// ------------------------------------------------------------------------------------------------- + private void UpdateAircraftType(object parameter) + { + if (parameter is AircraftTypeUpgrade upgrade) + { + this.LoadingText = "Upgrading aircraft..."; + try + { + var result = AgentOpenSkyService.Instance.UpgradeAircraftTypeAsync(upgrade).Result; + if (!result.IsError) + { + this.UpdateAircraftTypeCommand.ReportProgress(() => this.GetAircraftUpgradesCommand.DoExecute(null)); + } + else + { + this.UpdateAircraftTypeCommand.ReportProgress( + () => + { + Debug.WriteLine("Error performing aircraft type upgrade: " + result.Message); + if (!string.IsNullOrEmpty(result.ErrorDetails)) + { + Debug.WriteLine(result.ErrorDetails); + } + + var notification = new OpenSkyNotification("Error performing aircraft type upgrade", result.Message, MessageBoxButton.OK, ExtendedMessageBoxImage.Error, 30); + notification.SetErrorColorStyle(); + this.ViewReference.ShowNotification(notification); + }); + } + } + catch (Exception ex) + { + ex.HandleApiCallException(this.ViewReference, this.UpdateAircraftTypeCommand, "Error performing aircraft type upgrade"); + } + finally + { + this.LoadingText = null; + } + } + } + /// ------------------------------------------------------------------------------------------------- /// /// Upload aircraft type image. From 854ad29ba3434f56ad0579d881236e2ba38e883d Mon Sep 17 00:00:00 2001 From: "sushi.at" Date: Thu, 23 Nov 2023 19:04:43 +0000 Subject: [PATCH 2/3] Bumped version and added changelog --- OpenSky.Agent/Properties/AssemblyInfo.cs | 4 ++-- changelog.txt | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/OpenSky.Agent/Properties/AssemblyInfo.cs b/OpenSky.Agent/Properties/AssemblyInfo.cs index 64dff84..ffd6907 100644 --- a/OpenSky.Agent/Properties/AssemblyInfo.cs +++ b/OpenSky.Agent/Properties/AssemblyInfo.cs @@ -21,8 +21,8 @@ [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] -[assembly: AssemblyVersion("0.5.2")] -[assembly: AssemblyFileVersion("0.5.2")] +[assembly: AssemblyVersion("0.5.3")] +[assembly: AssemblyFileVersion("0.5.3")] // This allows us to detect debug mode in XAML #if DEBUG diff --git a/changelog.txt b/changelog.txt index e127196..3036b19 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,12 @@ OpenSky Flight Tracking Agent Changelog ====================================================================================== +-------------------------------------------------------------------------------------- +Version 0.5.3 (ALPHA5) +-------------------------------------------------------------------------------------- +- Improved aircraft type updates, next version and variants updated automatically + in improved API method + -------------------------------------------------------------------------------------- Version 0.5.2 (ALPHA5) -------------------------------------------------------------------------------------- From 9cb614e3150f0b14bd19e6adbbe89d3a5b272be3 Mon Sep 17 00:00:00 2001 From: "sushi.at" Date: Thu, 23 Nov 2023 19:18:17 +0000 Subject: [PATCH 3/3] Changed default fuel type override to NONE Fixed crash if no manufacturer was selected --- OpenSky.Agent/Views/Models/AircraftTypesViewModel.cs | 5 +++-- changelog.txt | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenSky.Agent/Views/Models/AircraftTypesViewModel.cs b/OpenSky.Agent/Views/Models/AircraftTypesViewModel.cs index ffa4f07..76c605c 100644 --- a/OpenSky.Agent/Views/Models/AircraftTypesViewModel.cs +++ b/OpenSky.Agent/Views/Models/AircraftTypesViewModel.cs @@ -204,7 +204,7 @@ public class AircraftTypesViewModel : ViewModel /// The override fuel type. /// /// ------------------------------------------------------------------------------------------------- - private FuelType overrideFuelType; + private FuelType overrideFuelType = FuelType.NotUsed; /// ------------------------------------------------------------------------------------------------- /// @@ -1215,7 +1215,7 @@ private void AddAircraftType() IsGearRetractable = this.Simulator.AircraftIdentity.GearRetractable, Name = this.Name, VersionNumber = this.VersionNumber, - ManufacturerID = this.SelectedManufacturer.Id, + ManufacturerID = this.SelectedManufacturer?.Id, Category = this.Category, IsVanilla = this.IsVanilla, IncludeInWorldPopulation = this.IncludeInWorldPopulation, @@ -1321,6 +1321,7 @@ private void CancelAddAircraft() this.MaximumPrice = 0; this.MinimumRunwayLength = 0; this.Comments = null; + this.OverrideFuelType = FuelType.NotUsed; this.aircraftTypeBeingUpdated = null; } diff --git a/changelog.txt b/changelog.txt index 3036b19..25a27cd 100644 --- a/changelog.txt +++ b/changelog.txt @@ -7,6 +7,8 @@ Version 0.5.3 (ALPHA5) -------------------------------------------------------------------------------------- - Improved aircraft type updates, next version and variants updated automatically in improved API method +- Changed default fuel type override to NOT USED +- Fixed crash if no manufacturer was selected -------------------------------------------------------------------------------------- Version 0.5.2 (ALPHA5)