From 0ee81ef847af3702b3b37f94cc62e835f9294e55 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Mon, 16 Nov 2020 14:35:19 +0200 Subject: Working on DataStore WebAPI & CLI. --- .../DataStore/Tango.DataStore.CLI/Program.cs | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs (limited to 'Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs') diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs new file mode 100644 index 000000000..e27f76c79 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs @@ -0,0 +1,49 @@ +using CommandLine; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL; + +namespace Tango.DataStore.CLI +{ + class Program + { + static void Main(string[] args) + { + var result = Parser.Default.ParseArguments(args) + .WithParsed((options) => + { + Console.WriteLine($"{options.Email}, {options.Password}"); + }) + .WithParsed((options) => + { + Console.WriteLine($"{options.Email}, {options.Password}"); + }) + .WithNotParsed((errors) => + { + + }); + + Console.ReadLine(); + } + + private static int DisplayHelp(ParserResult result, IEnumerable errs) + { + var helpText = CommandLine.Text.HelpText.AutoBuild(result, h => + { + h.AdditionalNewLineAfterOption = false; + h.AddNewLineBetweenHelpSections = true; + h.AddEnumValuesToHelpText = true; + h.AutoVersion = false; + h.Heading = CommandLine.Text.HeadingInfo.Empty; + h.MaximumDisplayWidth = 110; + // h.AddVerbs(typeof(SyncOptions), typeof(QueryOptions), typeof(TokenOptions)); + return h; // only h + }); + Console.WriteLine(helpText); + return 1; + } + } +} -- cgit v1.3.1 From 69dbba322f6ef275134b7b214510e47b9fcdd0b0 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Tue, 17 Nov 2020 15:11:40 +0200 Subject: IMplemented NSwag for DataStore WebAPI controller. Implemented data store tool dsUtil. --- .../DataStore/Tango.DataStore.CLI/App.config | 24 + .../DataStore/Tango.DataStore.CLI/Options.cs | 22 +- .../DataStore/Tango.DataStore.CLI/Program.cs | 91 +- .../Tango.DataStore.CLI/Tango.DataStore.CLI.csproj | 24 +- .../Tango.DataStore.CLI/Web/DataStoreClient.cs | 3766 ++++++++++++++++++++ .../DataStore/Tango.DataStore.CLI/packages.config | 3 + .../DataStore/Tango.DataStore.Web/LoginRequest.cs | 14 + .../DataStore/Tango.DataStore.Web/LoginResponse.cs | 14 + .../Tango.DataStore.Web/Tango.DataStore.Web.csproj | 2 + .../Tango.Web/Controllers/TangoController.cs | 15 +- .../Controllers/DataStoreController.cs | 114 +- .../Filters/JwtWebApiTokenFilter.cs | 72 + .../Nswag/DataStoreClient.nswag | 140 + .../Tango.MachineService.csproj | 2 + 14 files changed, 4264 insertions(+), 39 deletions(-) create mode 100644 Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Web/DataStoreClient.cs create mode 100644 Software/Visual_Studio/DataStore/Tango.DataStore.Web/LoginRequest.cs create mode 100644 Software/Visual_Studio/DataStore/Tango.DataStore.Web/LoginResponse.cs create mode 100644 Software/Visual_Studio/Web/Tango.MachineService/Filters/JwtWebApiTokenFilter.cs create mode 100644 Software/Visual_Studio/Web/Tango.MachineService/Nswag/DataStoreClient.nswag (limited to 'Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs') diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/App.config b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/App.config index a46da65da..f850936a4 100644 --- a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/App.config +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/App.config @@ -23,6 +23,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Options.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Options.cs index 80b3caf7e..150756671 100644 --- a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Options.cs +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Options.cs @@ -10,42 +10,42 @@ namespace Tango.DataStore.CLI { public class OptionsBase { - [Option(longName: "email", HelpText = "Email address", Required = true)] + [Option(longName: "email", HelpText = "Email address.", Required = true)] public String Email { get; set; } - [Option(longName: "password", HelpText = "Password")] + [Option(longName: "password", HelpText = "Password.", Required = true)] public String Password { get; set; } - [Option(longName: "env", HelpText = "Environment")] + [Option(longName: "env", HelpText = "The target environment.", Required = true)] public DeploymentSlot Environment { get; set; } } [Verb("get", HelpText = "Get a data store item.")] public class GetOptions : OptionsBase { - [Option(longName: "sn", HelpText = "Machine serial number")] + [Option(longName: "sn", HelpText = "Machine serial number. if not specified will return only global values.")] public String MachineSerialNumber { get; set; } - [Option(longName: "collection", HelpText = "Collection name")] + [Option(longName: "collection", HelpText = "Collection name.\nIf not specified will return all collections.\nIf 'key' if specified the 'collection' must be specified.")] public String Collection { get; set; } - [Option(longName: "key", HelpText = "Item key")] + [Option(longName: "key", HelpText = "Item key. If not specified will return the entire collection.")] public String Key { get; set; } } - [Verb("put", HelpText = "Get a data store item.")] + [Verb("put", HelpText = "Put a new, or update an existing data store item.")] public class PutOptions : OptionsBase { - [Option(longName: "sn", HelpText = "Machine serial number")] + [Option(longName: "sn", HelpText = "Machine serial number. If not specified will put a value on the global data store.")] public String MachineSerialNumber { get; set; } - [Option(longName: "collection", HelpText = "Collection name")] + [Option(longName: "collection", HelpText = "New or existing collection name.", Required = true)] public String Collection { get; set; } - [Option(longName: "key", HelpText = "Item key")] + [Option(longName: "key", HelpText = "New or existing item key", Required = true)] public String Key { get; set; } - [Option(longName: "value", HelpText = "Item value")] + [Option(longName: "value", HelpText = "Item value", Required = true)] public String Value { get; set; } } } diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs index e27f76c79..db4f54620 100644 --- a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs @@ -1,10 +1,15 @@ using CommandLine; +using ConsoleTables; using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; +using System.Net.Http; using System.Text; using System.Threading.Tasks; using Tango.BL; +using Tango.DataStore.Web; +using Tango.Web; namespace Tango.DataStore.CLI { @@ -12,38 +17,88 @@ namespace Tango.DataStore.CLI { static void Main(string[] args) { + var console = new DataStoreConsole(); + var result = Parser.Default.ParseArguments(args) .WithParsed((options) => { - Console.WriteLine($"{options.Email}, {options.Password}"); + console.Get(options); }) - .WithParsed((options) => + .WithParsed((options) => { - Console.WriteLine($"{options.Email}, {options.Password}"); + console.Put(options); }) - .WithNotParsed((errors) => + .WithNotParsed((errors) => { - + }); - Console.ReadLine(); + if (Debugger.IsAttached) + { + Console.WriteLine(); + Console.WriteLine("Press return to exit..."); + Console.ReadLine(); + } + } + } + + public class DataStoreConsole + { + public void Get(GetOptions options) + { + try + { + if (options.MachineSerialNumber != null) + { + Console.WriteLine($"Retrieving data store values for '{options.MachineSerialNumber}'..."); + } + else + { + Console.WriteLine("Retrieving global data store values..."); + } + + var client = CreateClient(options.Email, options.Password, options.Environment); + + var items = client.Get(options.MachineSerialNumber, options.Collection, options.Key).ToList(); + + ConsoleTable table = new ConsoleTable("COLLECTION", "KEY", "DATA TYPE", "STATE", "GLOBAL", "LOCAL"); + + foreach (var item in items) + { + table.AddRow(item.Collection, item.Key, item.DataType, item.Type, item.GlobalValue.ToStringSafe().ToOneLine(), item.LocalValue.ToStringSafe().ToOneLine()); + } + + Console.WriteLine(); + Console.WriteLine("DATA STORE RESULTS:"); + Console.WriteLine(); + + table.Write(); + } + catch (Exception ex) + { + Console.WriteLine(ex.FlattenMessage()); + } } - private static int DisplayHelp(ParserResult result, IEnumerable errs) + public void Put(PutOptions options) { - var helpText = CommandLine.Text.HelpText.AutoBuild(result, h => + + } + + private DataStoreClient CreateClient(String email, String password, DeploymentSlot slot) + { + String token = String.Empty; + + HttpClient http = new HttpClient(); + DataStoreClient dsClient = new DataStoreClient(slot.ToAddress(), http); + var response = dsClient.Login(new LoginRequest() { - h.AdditionalNewLineAfterOption = false; - h.AddNewLineBetweenHelpSections = true; - h.AddEnumValuesToHelpText = true; - h.AutoVersion = false; - h.Heading = CommandLine.Text.HeadingInfo.Empty; - h.MaximumDisplayWidth = 110; - // h.AddVerbs(typeof(SyncOptions), typeof(QueryOptions), typeof(TokenOptions)); - return h; // only h + Email = "roy@twine-s.com", + Password = "1Creativity", }); - Console.WriteLine(helpText); - return 1; + http.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", response.Token); + + return dsClient; } } } diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Tango.DataStore.CLI.csproj b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Tango.DataStore.CLI.csproj index 05e4022c4..28aab4ef7 100644 --- a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Tango.DataStore.CLI.csproj +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Tango.DataStore.CLI.csproj @@ -7,7 +7,7 @@ {6189B8C3-7AF9-43DD-8A61-A8A05F526F62} Exe Tango.DataStore.CLI - Tango.DataStore.CLI + dsUtil v4.6.1 512 true @@ -36,15 +36,25 @@ ..\..\packages\CommandLineParser.2.8.0\lib\net461\CommandLine.dll + + ..\..\packages\ConsoleTables.2.4.2\lib\net40\ConsoleTables.dll + ..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll ..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll + + ..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll + + + ..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll + + @@ -56,6 +66,7 @@ + @@ -66,6 +77,14 @@ {F441FEEE-322A-4943-B566-110E12FD3B72} Tango.BL + + {a34ee0f0-649d-41c8-8489-b6f1cc6924ee} + Tango.Core + + + {e4927038-348d-4295-aaf4-861c58cb3943} + Tango.PMR + {5001990f-977b-48ff-b217-0236a5022ad8} Tango.Web @@ -83,4 +102,7 @@ + + REM nswag run "$(SolutionDir)Web\Tango.MachineService\Nswag\DataStoreClient.nswag" /variables:assembly="$(SolutionDir)Web\Tango.MachineService\bin\Tango.MachineService.dll",output="$(ProjectDir)Web\DataStoreClient.cs" + \ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Web/DataStoreClient.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Web/DataStoreClient.cs new file mode 100644 index 000000000..cf280284f --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Web/DataStoreClient.cs @@ -0,0 +1,3766 @@ +//---------------------- +// +// Generated using the NSwag toolchain v13.2.3.0 (NJsonSchema v10.1.5.0 (Newtonsoft.Json v11.0.0.0)) (http://NSwag.org) +// +//---------------------- + +#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." +#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." +#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 ..." + +namespace Tango.DataStore.Web +{ + using System = global::System; + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.2.3.0 (NJsonSchema v10.1.5.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class DataStoreClient + { + private string _baseUrl = ""; + private System.Net.Http.HttpClient _httpClient; + private System.Lazy _settings; + + public DataStoreClient(string baseUrl, System.Net.Http.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 + { + 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); + + /// A server side error occurred. + public System.Threading.Tasks.Task LoginAsync(LoginRequest request) + { + return LoginAsync(request, System.Threading.CancellationToken.None); + } + + /// A server side error occurred. + public LoginResponse Login(LoginRequest request) + { + return System.Threading.Tasks.Task.Run(async () => await LoginAsync(request, System.Threading.CancellationToken.None)).GetAwaiter().GetResult(); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// A server side error occurred. + public async System.Threading.Tasks.Task LoginAsync(LoginRequest request, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/DataStore/Login"); + + var client_ = _httpClient; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(request, _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_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + 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); + 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).ToString(); + if (status_ == "200") + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_).ConfigureAwait(false); + return objectResponse_.Object; + } + else + if (status_ != "200" && status_ != "204") + { + 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 (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null); + } + + return default(LoginResponse); + } + finally + { + if (response_ != null) + response_.Dispose(); + } + } + } + finally + { + } + } + + /// A server side error occurred. + public System.Threading.Tasks.Task> GetAsync(string sn, string collection, string key) + { + return GetAsync(sn, collection, key, System.Threading.CancellationToken.None); + } + + /// A server side error occurred. + public System.Collections.Generic.ICollection Get(string sn, string collection, string key) + { + return System.Threading.Tasks.Task.Run(async () => await GetAsync(sn, collection, key, System.Threading.CancellationToken.None)).GetAwaiter().GetResult(); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// A server side error occurred. + public async System.Threading.Tasks.Task> GetAsync(string sn, string collection, string key, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/DataStore/Get?"); + if (sn != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("sn") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sn, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (collection != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("collection") + "=").Append(System.Uri.EscapeDataString(ConvertToString(collection, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + if (key != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("key") + "=").Append(System.Uri.EscapeDataString(ConvertToString(key, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); + } + urlBuilder_.Length--; + + var client_ = _httpClient; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + 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); + 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).ToString(); + if (status_ == "200") + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_).ConfigureAwait(false); + return objectResponse_.Object; + } + else + if (status_ != "200" && status_ != "204") + { + 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 (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null); + } + + return default(System.Collections.Generic.ICollection); + } + finally + { + if (response_ != null) + response_.Dispose(); + } + } + } + finally + { + } + } + + /// A server side error occurred. + public System.Threading.Tasks.Task PutAsync(DataStoreWebPutItem item) + { + return PutAsync(item, System.Threading.CancellationToken.None); + } + + /// A server side error occurred. + public void Put(DataStoreWebPutItem item) + { + System.Threading.Tasks.Task.Run(async () => await PutAsync(item, System.Threading.CancellationToken.None)).GetAwaiter().GetResult(); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// A server side error occurred. + public async System.Threading.Tasks.Task PutAsync(DataStoreWebPutItem item, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/DataStore/Put"); + + var client_ = _httpClient; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(item, _settings.Value)); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + + 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); + 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).ToString(); + if (status_ == "204") + { + return; + } + else + if (status_ != "200" && status_ != "204") + { + 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 (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null); + } + } + finally + { + if (response_ != null) + response_.Dispose(); + } + } + } + finally + { + } + } + + /// A server side error occurred. + public System.Threading.Tasks.Task ExecuteAsync(HttpControllerContext context) + { + return ExecuteAsync(context, System.Threading.CancellationToken.None); + } + + /// A server side error occurred. + public FileResponse Execute(HttpControllerContext context) + { + return System.Threading.Tasks.Task.Run(async () => await ExecuteAsync(context, System.Threading.CancellationToken.None)).GetAwaiter().GetResult(); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// A server side error occurred. + public async System.Threading.Tasks.Task ExecuteAsync(HttpControllerContext context, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/DataStore/Execute"); + + var client_ = _httpClient; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(context, _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_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + 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); + 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).ToString(); + if (status_ == "200" || status_ == "206") + { + var responseStream_ = response_.Content == null ? System.IO.Stream.Null : await response_.Content.ReadAsStreamAsync().ConfigureAwait(false); + var fileResponse_ = new FileResponse((int)response_.StatusCode, headers_, responseStream_, null, response_); + client_ = null; response_ = null; // response and client are disposed by FileResponse + return fileResponse_; + } + else + if (status_ != "200" && status_ != "204") + { + 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 (" + (int)response_.StatusCode + ").", (int)response_.StatusCode, responseData_, headers_, null); + } + + return default(FileResponse); + } + finally + { + if (response_ != null) + response_.Dispose(); + } + } + } + finally + { + } + } + + protected struct ObjectResponseResult + { + public ObjectResponseResult(T responseObject, string responseText) + { + this.Object = responseObject; + this.Text = responseText; + } + + public T Object { get; } + + public string Text { get; } + } + + public bool ReadResponseAsString { get; set; } + + protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers) + { + if (response == null || response.Content == null) + { + return new ObjectResponseResult(default(T), string.Empty); + } + + if (ReadResponseAsString) + { + var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); + return new ObjectResponseResult(typedBody, responseText); + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); + } + } + else + { + try + { + using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) + using (var streamReader = new System.IO.StreamReader(responseStream)) + using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) + { + var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); + var typedBody = serializer.Deserialize(jsonTextReader); + return new ObjectResponseResult(typedBody, string.Empty); + } + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); + } + } + } + + private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) + { + if (value is System.Enum) + { + string name = System.Enum.GetName(value.GetType(), value); + if (name != null) + { + var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); + if (field != null) + { + var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) + as System.Runtime.Serialization.EnumMemberAttribute; + if (attribute != null) + { + return attribute.Value != null ? attribute.Value : name; + } + } + } + } + else if (value is bool) { + return System.Convert.ToString(value, cultureInfo).ToLowerInvariant(); + } + else if (value is byte[]) + { + return System.Convert.ToBase64String((byte[]) value); + } + else if (value != null && value.GetType().IsArray) + { + var array = System.Linq.Enumerable.OfType((System.Array) value); + return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); + } + + return System.Convert.ToString(value, cultureInfo); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class LoginResponse + { + [Newtonsoft.Json.JsonProperty("Token", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Token { get; set; } + + [Newtonsoft.Json.JsonProperty("ExpirationUTC", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public System.DateTimeOffset ExpirationUTC { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class LoginRequest + { + [Newtonsoft.Json.JsonProperty("Email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Email { get; set; } + + [Newtonsoft.Json.JsonProperty("Password", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Password { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class DataStoreWebItem + { + [Newtonsoft.Json.JsonProperty("Collection", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Collection { get; set; } + + [Newtonsoft.Json.JsonProperty("Type", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public DataStoreWebItemType Type { get; set; } + + [Newtonsoft.Json.JsonProperty("Date", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public System.DateTimeOffset Date { get; set; } + + [Newtonsoft.Json.JsonProperty("Key", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Key { get; set; } + + [Newtonsoft.Json.JsonProperty("DataType", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public DataType DataType { get; set; } + + [Newtonsoft.Json.JsonProperty("ProtoMessageType", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public MessageType ProtoMessageType { get; set; } + + [Newtonsoft.Json.JsonProperty("LocalValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object LocalValue { get; set; } + + [Newtonsoft.Json.JsonProperty("GlobalValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object GlobalValue { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum DataStoreWebItemType + { + [System.Runtime.Serialization.EnumMember(Value = @"Local")] + Local = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Global")] + Global = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Overrides")] + Overrides = 2, + + } + + /// Represents a data store item type. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum DataType + { + [System.Runtime.Serialization.EnumMember(Value = @"Int32")] + Int32 = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Float")] + Float = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Double")] + Double = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"Boolean")] + Boolean = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"String")] + String = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"Bytes")] + Bytes = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"Proto")] + Proto = 6, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum MessageType + { + [System.Runtime.Serialization.EnumMember(Value = @"None")] + None = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"ErrorResponse")] + ErrorResponse = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"CalculateRequest")] + CalculateRequest = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"CalculateResponse")] + CalculateResponse = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"ProgressRequest")] + ProgressRequest = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"ProgressResponse")] + ProgressResponse = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"StubCartridgeReadRequest")] + StubCartridgeReadRequest = 6, + + [System.Runtime.Serialization.EnumMember(Value = @"StubCartridgeReadResponse")] + StubCartridgeReadResponse = 7, + + [System.Runtime.Serialization.EnumMember(Value = @"StubCartridgeWriteRequest")] + StubCartridgeWriteRequest = 8, + + [System.Runtime.Serialization.EnumMember(Value = @"StubCartridgeWriteResponse")] + StubCartridgeWriteResponse = 9, + + [System.Runtime.Serialization.EnumMember(Value = @"StubDispenserRequest")] + StubDispenserRequest = 10, + + [System.Runtime.Serialization.EnumMember(Value = @"StubDispenserResponse")] + StubDispenserResponse = 11, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpioinputSetupRequest")] + StubGpioinputSetupRequest = 12, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpioinputSetupResponse")] + StubGpioinputSetupResponse = 13, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpioreadBitRequest")] + StubGpioreadBitRequest = 14, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpioreadBitResponse")] + StubGpioreadBitResponse = 15, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpioreadByteRequest")] + StubGpioreadByteRequest = 16, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpioreadByteResponse")] + StubGpioreadByteResponse = 17, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpiowriteBitRequest")] + StubGpiowriteBitRequest = 18, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpiowriteBitResponse")] + StubGpiowriteBitResponse = 19, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpiowriteByteRequest")] + StubGpiowriteByteRequest = 20, + + [System.Runtime.Serialization.EnumMember(Value = @"StubGpiowriteByteResponse")] + StubGpiowriteByteResponse = 21, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHeaterRequest")] + StubHeaterRequest = 22, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHeaterResponse")] + StubHeaterResponse = 23, + + [System.Runtime.Serialization.EnumMember(Value = @"StubI2Crequest")] + StubI2Crequest = 24, + + [System.Runtime.Serialization.EnumMember(Value = @"StubI2Cresponse")] + StubI2Cresponse = 25, + + [System.Runtime.Serialization.EnumMember(Value = @"StubOptLimitSwitchRequest")] + StubOptLimitSwitchRequest = 26, + + [System.Runtime.Serialization.EnumMember(Value = @"StubOptLimitSwitchResponse")] + StubOptLimitSwitchResponse = 27, + + [System.Runtime.Serialization.EnumMember(Value = @"StubSteperMotorRequest")] + StubSteperMotorRequest = 28, + + [System.Runtime.Serialization.EnumMember(Value = @"StubSteperMotorResponse")] + StubSteperMotorResponse = 29, + + [System.Runtime.Serialization.EnumMember(Value = @"StubValveRequest")] + StubValveRequest = 30, + + [System.Runtime.Serialization.EnumMember(Value = @"StubValveResponse")] + StubValveResponse = 31, + + [System.Runtime.Serialization.EnumMember(Value = @"StubExtFlashReadRequest")] + StubExtFlashReadRequest = 32, + + [System.Runtime.Serialization.EnumMember(Value = @"StubExtFlashReadResponse")] + StubExtFlashReadResponse = 33, + + [System.Runtime.Serialization.EnumMember(Value = @"StubExtFlashWriteRequest")] + StubExtFlashWriteRequest = 34, + + [System.Runtime.Serialization.EnumMember(Value = @"StubExtFlashWriteResponse")] + StubExtFlashWriteResponse = 35, + + [System.Runtime.Serialization.EnumMember(Value = @"StubFpgareadBackRegRequest")] + StubFpgareadBackRegRequest = 36, + + [System.Runtime.Serialization.EnumMember(Value = @"StubFpgareadBackRegResponse")] + StubFpgareadBackRegResponse = 37, + + [System.Runtime.Serialization.EnumMember(Value = @"StubFpgareadVersionRequest")] + StubFpgareadVersionRequest = 38, + + [System.Runtime.Serialization.EnumMember(Value = @"StubFpgareadVersionResponse")] + StubFpgareadVersionResponse = 39, + + [System.Runtime.Serialization.EnumMember(Value = @"StubL6470DriverRequest")] + StubL6470DriverRequest = 40, + + [System.Runtime.Serialization.EnumMember(Value = @"StubL6470DriverResponse")] + StubL6470DriverResponse = 41, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorInitRequest")] + StubMotorInitRequest = 42, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorInitResponse")] + StubMotorInitResponse = 43, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorRunRequest")] + StubMotorRunRequest = 44, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorRunResponse")] + StubMotorRunResponse = 45, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorStopRequest")] + StubMotorStopRequest = 46, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorStopResponse")] + StubMotorStopResponse = 47, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorStatusRequest")] + StubMotorStatusRequest = 48, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorStatusResponse")] + StubMotorStatusResponse = 49, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorMovRequest")] + StubMotorMovRequest = 50, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorMovResponse")] + StubMotorMovResponse = 51, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorSpeedRequest")] + StubMotorSpeedRequest = 52, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorSpeedResponse")] + StubMotorSpeedResponse = 53, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorPositionRequest")] + StubMotorPositionRequest = 54, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorPositionResponse")] + StubMotorPositionResponse = 55, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHwversionRequest")] + StubHwversionRequest = 56, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHwversionResponse")] + StubHwversionResponse = 57, + + [System.Runtime.Serialization.EnumMember(Value = @"StubF3Gpo01WriteRequest")] + StubF3Gpo01WriteRequest = 58, + + [System.Runtime.Serialization.EnumMember(Value = @"StubF3Gpo01WriteResponse")] + StubF3Gpo01WriteResponse = 59, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHeatingTestRequest")] + StubHeatingTestRequest = 60, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHeatingTestResponse")] + StubHeatingTestResponse = 61, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHeatingTestPollRequest")] + StubHeatingTestPollRequest = 62, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHeatingTestPollResponse")] + StubHeatingTestPollResponse = 63, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorRequest")] + StubMotorRequest = 64, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorResponse")] + StubMotorResponse = 65, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorHomeMarkRequest")] + StubMotorHomeMarkRequest = 66, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorHomeMarkResponse")] + StubMotorHomeMarkResponse = 67, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorRunStepTickRequest")] + StubMotorRunStepTickRequest = 68, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMotorRunStepTickResponse")] + StubMotorRunStepTickResponse = 69, + + [System.Runtime.Serialization.EnumMember(Value = @"StubFpgaReadRegRequest")] + StubFpgaReadRegRequest = 70, + + [System.Runtime.Serialization.EnumMember(Value = @"StubFpgaReadRegResponse")] + StubFpgaReadRegResponse = 71, + + [System.Runtime.Serialization.EnumMember(Value = @"StubFpgaWriteRegRequest")] + StubFpgaWriteRegRequest = 72, + + [System.Runtime.Serialization.EnumMember(Value = @"StubFpgaWriteRegResponse")] + StubFpgaWriteRegResponse = 73, + + [System.Runtime.Serialization.EnumMember(Value = @"StubReadEmbeddedVersionRequest")] + StubReadEmbeddedVersionRequest = 74, + + [System.Runtime.Serialization.EnumMember(Value = @"StubReadEmbeddedVersionResponse")] + StubReadEmbeddedVersionResponse = 75, + + [System.Runtime.Serialization.EnumMember(Value = @"StubTivaReadRegRequest")] + StubTivaReadRegRequest = 76, + + [System.Runtime.Serialization.EnumMember(Value = @"StubTivaReadRegResponse")] + StubTivaReadRegResponse = 77, + + [System.Runtime.Serialization.EnumMember(Value = @"StubTivaWriteRegRequest")] + StubTivaWriteRegRequest = 78, + + [System.Runtime.Serialization.EnumMember(Value = @"StubTivaWriteRegResponse")] + StubTivaWriteRegResponse = 79, + + [System.Runtime.Serialization.EnumMember(Value = @"StubDancerPositionRequest")] + StubDancerPositionRequest = 80, + + [System.Runtime.Serialization.EnumMember(Value = @"StubDancerPositionResponse")] + StubDancerPositionResponse = 81, + + [System.Runtime.Serialization.EnumMember(Value = @"StubSpeedSensorRequest")] + StubSpeedSensorRequest = 82, + + [System.Runtime.Serialization.EnumMember(Value = @"StubSpeedSensorResponse")] + StubSpeedSensorResponse = 83, + + [System.Runtime.Serialization.EnumMember(Value = @"StubRealTimeUsageRequest")] + StubRealTimeUsageRequest = 84, + + [System.Runtime.Serialization.EnumMember(Value = @"StubRealTimeUsageResponse")] + StubRealTimeUsageResponse = 85, + + [System.Runtime.Serialization.EnumMember(Value = @"StubIntAdcreadRequest")] + StubIntAdcreadRequest = 86, + + [System.Runtime.Serialization.EnumMember(Value = @"StubIntAdcreadResponse")] + StubIntAdcreadResponse = 87, + + [System.Runtime.Serialization.EnumMember(Value = @"StubTempSensorRequest")] + StubTempSensorRequest = 88, + + [System.Runtime.Serialization.EnumMember(Value = @"StubTempSensorResponse")] + StubTempSensorResponse = 89, + + [System.Runtime.Serialization.EnumMember(Value = @"StubI2CreadBytesRequest")] + StubI2CreadBytesRequest = 90, + + [System.Runtime.Serialization.EnumMember(Value = @"StubI2CreadBytesResponse")] + StubI2CreadBytesResponse = 91, + + [System.Runtime.Serialization.EnumMember(Value = @"StubI2CwriteBytesRequest")] + StubI2CwriteBytesRequest = 92, + + [System.Runtime.Serialization.EnumMember(Value = @"StubI2CwriteBytesResponse")] + StubI2CwriteBytesResponse = 93, + + [System.Runtime.Serialization.EnumMember(Value = @"StubExtFlashWriteWordsRequest")] + StubExtFlashWriteWordsRequest = 94, + + [System.Runtime.Serialization.EnumMember(Value = @"StubExtFlashWriteWordsResponse")] + StubExtFlashWriteWordsResponse = 95, + + [System.Runtime.Serialization.EnumMember(Value = @"StubExtFlashReadWordsRequest")] + StubExtFlashReadWordsRequest = 96, + + [System.Runtime.Serialization.EnumMember(Value = @"StubExtFlashReadWordsResponse")] + StubExtFlashReadWordsResponse = 97, + + [System.Runtime.Serialization.EnumMember(Value = @"StubJobRequest")] + StubJobRequest = 98, + + [System.Runtime.Serialization.EnumMember(Value = @"StubJobResponse")] + StubJobResponse = 99, + + [System.Runtime.Serialization.EnumMember(Value = @"StubAbortJobRequest")] + StubAbortJobRequest = 100, + + [System.Runtime.Serialization.EnumMember(Value = @"StubAbortJobResponse")] + StubAbortJobResponse = 101, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMidTankPressureSensorRequest")] + StubMidTankPressureSensorRequest = 102, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMidTankPressureSensorResponse")] + StubMidTankPressureSensorResponse = 103, + + [System.Runtime.Serialization.EnumMember(Value = @"StubDispenserEepromRequest")] + StubDispenserEepromRequest = 104, + + [System.Runtime.Serialization.EnumMember(Value = @"StubDispenserEepromResponse")] + StubDispenserEepromResponse = 105, + + [System.Runtime.Serialization.EnumMember(Value = @"StubWhsEepromRequest")] + StubWhsEepromRequest = 106, + + [System.Runtime.Serialization.EnumMember(Value = @"StubWhsEepromResponse")] + StubWhsEepromResponse = 107, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMainCardEepromReadRequest")] + StubMainCardEepromReadRequest = 108, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMainCardEepromReadResponse")] + StubMainCardEepromReadResponse = 109, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMainCardEepromWriteRequest")] + StubMainCardEepromWriteRequest = 110, + + [System.Runtime.Serialization.EnumMember(Value = @"StubMainCardEepromWriteResponse")] + StubMainCardEepromWriteResponse = 111, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHeadEepromRequest")] + StubHeadEepromRequest = 112, + + [System.Runtime.Serialization.EnumMember(Value = @"StubHeadEepromResponse")] + StubHeadEepromResponse = 113, + + [System.Runtime.Serialization.EnumMember(Value = @"ExternalBridgeUdpDiscoveryPacket")] + ExternalBridgeUdpDiscoveryPacket = 114, + + [System.Runtime.Serialization.EnumMember(Value = @"ExternalBridgeLoginRequest")] + ExternalBridgeLoginRequest = 115, + + [System.Runtime.Serialization.EnumMember(Value = @"ExternalBridgeLoginResponse")] + ExternalBridgeLoginResponse = 116, + + [System.Runtime.Serialization.EnumMember(Value = @"ExternalBridgeLogoutRequest")] + ExternalBridgeLogoutRequest = 117, + + [System.Runtime.Serialization.EnumMember(Value = @"ExternalBridgeLogoutResponse")] + ExternalBridgeLogoutResponse = 118, + + [System.Runtime.Serialization.EnumMember(Value = @"DirectSynchronizationRequest")] + DirectSynchronizationRequest = 119, + + [System.Runtime.Serialization.EnumMember(Value = @"DirectSynchronizationResponse")] + DirectSynchronizationResponse = 120, + + [System.Runtime.Serialization.EnumMember(Value = @"OverrideDataBaseRequest")] + OverrideDataBaseRequest = 121, + + [System.Runtime.Serialization.EnumMember(Value = @"OverrideDataBaseResponse")] + OverrideDataBaseResponse = 122, + + [System.Runtime.Serialization.EnumMember(Value = @"StartApplicationLogsRequest")] + StartApplicationLogsRequest = 123, + + [System.Runtime.Serialization.EnumMember(Value = @"StartApplicationLogsResponse")] + StartApplicationLogsResponse = 124, + + [System.Runtime.Serialization.EnumMember(Value = @"StopApplicationLogsRequest")] + StopApplicationLogsRequest = 125, + + [System.Runtime.Serialization.EnumMember(Value = @"StopApplicationLogsResponse")] + StopApplicationLogsResponse = 126, + + [System.Runtime.Serialization.EnumMember(Value = @"ColorProfileRequest")] + ColorProfileRequest = 127, + + [System.Runtime.Serialization.EnumMember(Value = @"ColorProfileResponse")] + ColorProfileResponse = 128, + + [System.Runtime.Serialization.EnumMember(Value = @"UpdateStatusRequest")] + UpdateStatusRequest = 129, + + [System.Runtime.Serialization.EnumMember(Value = @"UpdateStatusResponse")] + UpdateStatusResponse = 130, + + [System.Runtime.Serialization.EnumMember(Value = @"GenericRequest")] + GenericRequest = 131, + + [System.Runtime.Serialization.EnumMember(Value = @"GenericResponse")] + GenericResponse = 132, + + [System.Runtime.Serialization.EnumMember(Value = @"ConfigureProtocolRequest")] + ConfigureProtocolRequest = 133, + + [System.Runtime.Serialization.EnumMember(Value = @"ConfigureProtocolResponse")] + ConfigureProtocolResponse = 134, + + [System.Runtime.Serialization.EnumMember(Value = @"StartDiagnosticsRequest")] + StartDiagnosticsRequest = 135, + + [System.Runtime.Serialization.EnumMember(Value = @"StartDiagnosticsResponse")] + StartDiagnosticsResponse = 136, + + [System.Runtime.Serialization.EnumMember(Value = @"MotorAbortHomingRequest")] + MotorAbortHomingRequest = 137, + + [System.Runtime.Serialization.EnumMember(Value = @"MotorAbortHomingResponse")] + MotorAbortHomingResponse = 138, + + [System.Runtime.Serialization.EnumMember(Value = @"MotorHomingRequest")] + MotorHomingRequest = 139, + + [System.Runtime.Serialization.EnumMember(Value = @"MotorHomingResponse")] + MotorHomingResponse = 140, + + [System.Runtime.Serialization.EnumMember(Value = @"MotorJoggingRequest")] + MotorJoggingRequest = 141, + + [System.Runtime.Serialization.EnumMember(Value = @"MotorJoggingResponse")] + MotorJoggingResponse = 142, + + [System.Runtime.Serialization.EnumMember(Value = @"MotorAbortJoggingRequest")] + MotorAbortJoggingRequest = 143, + + [System.Runtime.Serialization.EnumMember(Value = @"MotorAbortJoggingResponse")] + MotorAbortJoggingResponse = 144, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserAbortHomingRequest")] + DispenserAbortHomingRequest = 145, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserAbortHomingResponse")] + DispenserAbortHomingResponse = 146, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserHomingRequest")] + DispenserHomingRequest = 147, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserHomingResponse")] + DispenserHomingResponse = 148, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserJoggingRequest")] + DispenserJoggingRequest = 149, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserJoggingResponse")] + DispenserJoggingResponse = 150, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserAbortJoggingRequest")] + DispenserAbortJoggingRequest = 151, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserAbortJoggingResponse")] + DispenserAbortJoggingResponse = 152, + + [System.Runtime.Serialization.EnumMember(Value = @"SetDigitalOutRequest")] + SetDigitalOutRequest = 153, + + [System.Runtime.Serialization.EnumMember(Value = @"SetDigitalOutResponse")] + SetDigitalOutResponse = 154, + + [System.Runtime.Serialization.EnumMember(Value = @"ThreadJoggingRequest")] + ThreadJoggingRequest = 155, + + [System.Runtime.Serialization.EnumMember(Value = @"ThreadJoggingResponse")] + ThreadJoggingResponse = 156, + + [System.Runtime.Serialization.EnumMember(Value = @"ThreadAbortJoggingRequest")] + ThreadAbortJoggingRequest = 157, + + [System.Runtime.Serialization.EnumMember(Value = @"ThreadAbortJoggingResponse")] + ThreadAbortJoggingResponse = 158, + + [System.Runtime.Serialization.EnumMember(Value = @"SetComponentValueRequest")] + SetComponentValueRequest = 159, + + [System.Runtime.Serialization.EnumMember(Value = @"SetComponentValueResponse")] + SetComponentValueResponse = 160, + + [System.Runtime.Serialization.EnumMember(Value = @"ResolveEventRequest")] + ResolveEventRequest = 161, + + [System.Runtime.Serialization.EnumMember(Value = @"ResolveEventResponse")] + ResolveEventResponse = 162, + + [System.Runtime.Serialization.EnumMember(Value = @"StopDiagnosticsRequest")] + StopDiagnosticsRequest = 163, + + [System.Runtime.Serialization.EnumMember(Value = @"StopDiagnosticsResponse")] + StopDiagnosticsResponse = 164, + + [System.Runtime.Serialization.EnumMember(Value = @"StartEventsNotificationRequest")] + StartEventsNotificationRequest = 165, + + [System.Runtime.Serialization.EnumMember(Value = @"StartEventsNotificationResponse")] + StartEventsNotificationResponse = 166, + + [System.Runtime.Serialization.EnumMember(Value = @"StopEventsNotificationRequest")] + StopEventsNotificationRequest = 167, + + [System.Runtime.Serialization.EnumMember(Value = @"StopEventsNotificationResponse")] + StopEventsNotificationResponse = 168, + + [System.Runtime.Serialization.EnumMember(Value = @"SetHeaterStateRequest")] + SetHeaterStateRequest = 169, + + [System.Runtime.Serialization.EnumMember(Value = @"SetHeaterStateResponse")] + SetHeaterStateResponse = 170, + + [System.Runtime.Serialization.EnumMember(Value = @"SetBlowerStateRequest")] + SetBlowerStateRequest = 171, + + [System.Runtime.Serialization.EnumMember(Value = @"SetBlowerStateResponse")] + SetBlowerStateResponse = 172, + + [System.Runtime.Serialization.EnumMember(Value = @"SetValveStateRequest")] + SetValveStateRequest = 173, + + [System.Runtime.Serialization.EnumMember(Value = @"SetValveStateResponse")] + SetValveStateResponse = 174, + + [System.Runtime.Serialization.EnumMember(Value = @"CartridgeValidationRequest")] + CartridgeValidationRequest = 175, + + [System.Runtime.Serialization.EnumMember(Value = @"CartridgeValidationResponse")] + CartridgeValidationResponse = 176, + + [System.Runtime.Serialization.EnumMember(Value = @"JobRequest")] + JobRequest = 177, + + [System.Runtime.Serialization.EnumMember(Value = @"JobResponse")] + JobResponse = 178, + + [System.Runtime.Serialization.EnumMember(Value = @"AbortJobRequest")] + AbortJobRequest = 179, + + [System.Runtime.Serialization.EnumMember(Value = @"AbortJobResponse")] + AbortJobResponse = 180, + + [System.Runtime.Serialization.EnumMember(Value = @"UploadProcessParametersRequest")] + UploadProcessParametersRequest = 181, + + [System.Runtime.Serialization.EnumMember(Value = @"UploadProcessParametersResponse")] + UploadProcessParametersResponse = 182, + + [System.Runtime.Serialization.EnumMember(Value = @"CurrentJobRequest")] + CurrentJobRequest = 183, + + [System.Runtime.Serialization.EnumMember(Value = @"CurrentJobResponse")] + CurrentJobResponse = 184, + + [System.Runtime.Serialization.EnumMember(Value = @"ResumeCurrentJobRequest")] + ResumeCurrentJobRequest = 185, + + [System.Runtime.Serialization.EnumMember(Value = @"ResumeCurrentJobResponse")] + ResumeCurrentJobResponse = 186, + + [System.Runtime.Serialization.EnumMember(Value = @"StartHeadCleaningRequest")] + StartHeadCleaningRequest = 187, + + [System.Runtime.Serialization.EnumMember(Value = @"StartHeadCleaningResponse")] + StartHeadCleaningResponse = 188, + + [System.Runtime.Serialization.EnumMember(Value = @"AbortHeadCleaningRequest")] + AbortHeadCleaningRequest = 189, + + [System.Runtime.Serialization.EnumMember(Value = @"AbortHeadCleaningResponse")] + AbortHeadCleaningResponse = 190, + + [System.Runtime.Serialization.EnumMember(Value = @"StartDebugLogRequest")] + StartDebugLogRequest = 191, + + [System.Runtime.Serialization.EnumMember(Value = @"StartDebugLogResponse")] + StartDebugLogResponse = 192, + + [System.Runtime.Serialization.EnumMember(Value = @"StopDebugLogRequest")] + StopDebugLogRequest = 193, + + [System.Runtime.Serialization.EnumMember(Value = @"StopDebugLogResponse")] + StopDebugLogResponse = 194, + + [System.Runtime.Serialization.EnumMember(Value = @"SetDebugLogCategoryRequest")] + SetDebugLogCategoryRequest = 195, + + [System.Runtime.Serialization.EnumMember(Value = @"SetDebugLogCategoryResponse")] + SetDebugLogCategoryResponse = 196, + + [System.Runtime.Serialization.EnumMember(Value = @"SetupDebugDisributorsRequest")] + SetupDebugDisributorsRequest = 197, + + [System.Runtime.Serialization.EnumMember(Value = @"SetupDebugDisributorsResponse")] + SetupDebugDisributorsResponse = 198, + + [System.Runtime.Serialization.EnumMember(Value = @"UploadHardwareConfigurationRequest")] + UploadHardwareConfigurationRequest = 199, + + [System.Runtime.Serialization.EnumMember(Value = @"UploadHardwareConfigurationResponse")] + UploadHardwareConfigurationResponse = 200, + + [System.Runtime.Serialization.EnumMember(Value = @"SystemResetRequest")] + SystemResetRequest = 201, + + [System.Runtime.Serialization.EnumMember(Value = @"SystemResetResponse")] + SystemResetResponse = 202, + + [System.Runtime.Serialization.EnumMember(Value = @"KeepAliveRequest")] + KeepAliveRequest = 203, + + [System.Runtime.Serialization.EnumMember(Value = @"KeepAliveResponse")] + KeepAliveResponse = 204, + + [System.Runtime.Serialization.EnumMember(Value = @"ConnectRequest")] + ConnectRequest = 205, + + [System.Runtime.Serialization.EnumMember(Value = @"ConnectResponse")] + ConnectResponse = 206, + + [System.Runtime.Serialization.EnumMember(Value = @"DisconnectRequest")] + DisconnectRequest = 207, + + [System.Runtime.Serialization.EnumMember(Value = @"DisconnectResponse")] + DisconnectResponse = 208, + + [System.Runtime.Serialization.EnumMember(Value = @"FileUploadRequest")] + FileUploadRequest = 209, + + [System.Runtime.Serialization.EnumMember(Value = @"FileUploadResponse")] + FileUploadResponse = 210, + + [System.Runtime.Serialization.EnumMember(Value = @"FileChunkUploadRequest")] + FileChunkUploadRequest = 211, + + [System.Runtime.Serialization.EnumMember(Value = @"FileChunkUploadResponse")] + FileChunkUploadResponse = 212, + + [System.Runtime.Serialization.EnumMember(Value = @"ExecuteProcessRequest")] + ExecuteProcessRequest = 213, + + [System.Runtime.Serialization.EnumMember(Value = @"ExecuteProcessResponse")] + ExecuteProcessResponse = 214, + + [System.Runtime.Serialization.EnumMember(Value = @"KillProcessRequest")] + KillProcessRequest = 215, + + [System.Runtime.Serialization.EnumMember(Value = @"KillProcessResponse")] + KillProcessResponse = 216, + + [System.Runtime.Serialization.EnumMember(Value = @"CreateRequest")] + CreateRequest = 217, + + [System.Runtime.Serialization.EnumMember(Value = @"CreateResponse")] + CreateResponse = 218, + + [System.Runtime.Serialization.EnumMember(Value = @"DeleteRequest")] + DeleteRequest = 219, + + [System.Runtime.Serialization.EnumMember(Value = @"DeleteResponse")] + DeleteResponse = 220, + + [System.Runtime.Serialization.EnumMember(Value = @"GetStorageInfoRequest")] + GetStorageInfoRequest = 221, + + [System.Runtime.Serialization.EnumMember(Value = @"GetStorageInfoResponse")] + GetStorageInfoResponse = 222, + + [System.Runtime.Serialization.EnumMember(Value = @"GetFilesRequest")] + GetFilesRequest = 223, + + [System.Runtime.Serialization.EnumMember(Value = @"GetFilesResponse")] + GetFilesResponse = 224, + + [System.Runtime.Serialization.EnumMember(Value = @"FileDownloadRequest")] + FileDownloadRequest = 225, + + [System.Runtime.Serialization.EnumMember(Value = @"FileDownloadResponse")] + FileDownloadResponse = 226, + + [System.Runtime.Serialization.EnumMember(Value = @"FileChunkDownloadRequest")] + FileChunkDownloadRequest = 227, + + [System.Runtime.Serialization.EnumMember(Value = @"FileChunkDownloadResponse")] + FileChunkDownloadResponse = 228, + + [System.Runtime.Serialization.EnumMember(Value = @"ValidateVersionRequest")] + ValidateVersionRequest = 229, + + [System.Runtime.Serialization.EnumMember(Value = @"ValidateVersionResponse")] + ValidateVersionResponse = 230, + + [System.Runtime.Serialization.EnumMember(Value = @"ActivateVersionRequest")] + ActivateVersionRequest = 231, + + [System.Runtime.Serialization.EnumMember(Value = @"ActivateVersionResponse")] + ActivateVersionResponse = 232, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserDataRequest")] + DispenserDataRequest = 233, + + [System.Runtime.Serialization.EnumMember(Value = @"DispenserDataResponse")] + DispenserDataResponse = 234, + + [System.Runtime.Serialization.EnumMember(Value = @"MidTankDataSetupRequest")] + MidTankDataSetupRequest = 235, + + [System.Runtime.Serialization.EnumMember(Value = @"MidTankDataSetupResponse")] + MidTankDataSetupResponse = 236, + + [System.Runtime.Serialization.EnumMember(Value = @"MachineCalibrationDataRequest")] + MachineCalibrationDataRequest = 237, + + [System.Runtime.Serialization.EnumMember(Value = @"MachineCalibrationDataResponse")] + MachineCalibrationDataResponse = 238, + + [System.Runtime.Serialization.EnumMember(Value = @"MainCardStoredDataRequest")] + MainCardStoredDataRequest = 239, + + [System.Runtime.Serialization.EnumMember(Value = @"MainCardStoredDataResponse")] + MainCardStoredDataResponse = 240, + + [System.Runtime.Serialization.EnumMember(Value = @"StartMachineStatusUpdateRequest")] + StartMachineStatusUpdateRequest = 241, + + [System.Runtime.Serialization.EnumMember(Value = @"StartMachineStatusUpdateResponse")] + StartMachineStatusUpdateResponse = 242, + + [System.Runtime.Serialization.EnumMember(Value = @"StopMachineStatusUpdateRequest")] + StopMachineStatusUpdateRequest = 243, + + [System.Runtime.Serialization.EnumMember(Value = @"StopMachineStatusUpdateResponse")] + StopMachineStatusUpdateResponse = 244, + + [System.Runtime.Serialization.EnumMember(Value = @"StartPowerDownRequest")] + StartPowerDownRequest = 245, + + [System.Runtime.Serialization.EnumMember(Value = @"StartPowerDownResponse")] + StartPowerDownResponse = 246, + + [System.Runtime.Serialization.EnumMember(Value = @"AbortPowerDownRequest")] + AbortPowerDownRequest = 247, + + [System.Runtime.Serialization.EnumMember(Value = @"AbortPowerDownResponse")] + AbortPowerDownResponse = 248, + + [System.Runtime.Serialization.EnumMember(Value = @"StartPowerUpRequest")] + StartPowerUpRequest = 249, + + [System.Runtime.Serialization.EnumMember(Value = @"StartPowerUpResponse")] + StartPowerUpResponse = 250, + + [System.Runtime.Serialization.EnumMember(Value = @"AbortPowerUpRequest")] + AbortPowerUpRequest = 251, + + [System.Runtime.Serialization.EnumMember(Value = @"AbortPowerUpResponse")] + AbortPowerUpResponse = 252, + + [System.Runtime.Serialization.EnumMember(Value = @"StandByRequest")] + StandByRequest = 253, + + [System.Runtime.Serialization.EnumMember(Value = @"StandByResponse")] + StandByResponse = 254, + + [System.Runtime.Serialization.EnumMember(Value = @"StartThreadLoadingRequest")] + StartThreadLoadingRequest = 255, + + [System.Runtime.Serialization.EnumMember(Value = @"StartThreadLoadingResponse")] + StartThreadLoadingResponse = 256, + + [System.Runtime.Serialization.EnumMember(Value = @"ContinueThreadLoadingRequest")] + ContinueThreadLoadingRequest = 257, + + [System.Runtime.Serialization.EnumMember(Value = @"ContinueThreadLoadingResponse")] + ContinueThreadLoadingResponse = 258, + + [System.Runtime.Serialization.EnumMember(Value = @"StopThreadLoadingRequest")] + StopThreadLoadingRequest = 259, + + [System.Runtime.Serialization.EnumMember(Value = @"StopThreadLoadingResponse")] + StopThreadLoadingResponse = 260, + + [System.Runtime.Serialization.EnumMember(Value = @"TryThreadLoadingRequest")] + TryThreadLoadingRequest = 261, + + [System.Runtime.Serialization.EnumMember(Value = @"TryThreadLoadingResponse")] + TryThreadLoadingResponse = 262, + + [System.Runtime.Serialization.EnumMember(Value = @"AttemptThreadJoggingRequest")] + AttemptThreadJoggingRequest = 263, + + [System.Runtime.Serialization.EnumMember(Value = @"AttemptThreadJoggingResponse")] + AttemptThreadJoggingResponse = 264, + + [System.Runtime.Serialization.EnumMember(Value = @"StartInkFillingStatusRequest")] + StartInkFillingStatusRequest = 265, + + [System.Runtime.Serialization.EnumMember(Value = @"StartInkFillingStatusResponse")] + StartInkFillingStatusResponse = 266, + + [System.Runtime.Serialization.EnumMember(Value = @"PutDataStoreItemRequest")] + PutDataStoreItemRequest = 267, + + [System.Runtime.Serialization.EnumMember(Value = @"PutDataStoreItemResponse")] + PutDataStoreItemResponse = 268, + + [System.Runtime.Serialization.EnumMember(Value = @"GetDataStoreItemRequest")] + GetDataStoreItemRequest = 269, + + [System.Runtime.Serialization.EnumMember(Value = @"GetDataStoreItemResponse")] + GetDataStoreItemResponse = 270, + + [System.Runtime.Serialization.EnumMember(Value = @"DataStoreItemModifiedRequest")] + DataStoreItemModifiedRequest = 271, + + [System.Runtime.Serialization.EnumMember(Value = @"DataStoreItemModifiedResponse")] + DataStoreItemModifiedResponse = 272, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class DataStoreWebPutItem + { + [Newtonsoft.Json.JsonProperty("MachineSerialNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string MachineSerialNumber { get; set; } + + [Newtonsoft.Json.JsonProperty("Collection", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Collection { get; set; } + + [Newtonsoft.Json.JsonProperty("Key", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Key { get; set; } + + [Newtonsoft.Json.JsonProperty("DataType", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public DataType DataType { get; set; } + + [Newtonsoft.Json.JsonProperty("ProtoMessageType", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public MessageType ProtoMessageType { get; set; } + + [Newtonsoft.Json.JsonProperty("Value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object Value { get; set; } + + + } + + /// Contains information for a single HTTP operation. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class HttpControllerContext + { + /// Gets or sets the configuration. + [Newtonsoft.Json.JsonProperty("Configuration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpConfiguration Configuration { get; set; } + + /// Gets or sets the controller descriptor. + [Newtonsoft.Json.JsonProperty("ControllerDescriptor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpControllerDescriptor ControllerDescriptor { get; set; } + + /// Gets or sets the HTTP controller. + [Newtonsoft.Json.JsonProperty("Controller", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IHttpController Controller { get; set; } + + /// Gets or sets the request. + [Newtonsoft.Json.JsonProperty("Request", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpRequestMessage Request { get; set; } + + /// Gets or sets the request context. + [Newtonsoft.Json.JsonProperty("RequestContext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpRequestContext RequestContext { get; set; } + + /// Gets or sets the route data. + [Newtonsoft.Json.JsonProperty("RouteData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IHttpRouteData RouteData { get; set; } + + + } + + /// Represents a configuration of HttpServer instances. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class HttpConfiguration + { + /// Gets or sets the action that will perform final initialization of the HttpConfiguration instance before it is used to process requests. + [Newtonsoft.Json.JsonProperty("Initializer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ActionOfHttpConfiguration Initializer { get; set; } + + /// Gets the list of filters that apply to all requests served using this HttpConfiguration instance. + [Newtonsoft.Json.JsonProperty("Filters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Filters { get; set; } + + /// Gets an ordered list of DelegatingHandler instances to be invoked as an HttpRequestMessage travels up the stack and an HttpResponseMessage travels down in stack in return. + [Newtonsoft.Json.JsonProperty("MessageHandlers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection MessageHandlers { get; set; } + + /// Gets the HttpRouteCollection associated with this HttpConfiguration instance. + [Newtonsoft.Json.JsonProperty("Routes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Routes { get; set; } + + /// Gets the properties associated with this instance. + [Newtonsoft.Json.JsonProperty("Properties", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary Properties { get; set; } + + /// Gets the root virtual path. + [Newtonsoft.Json.JsonProperty("VirtualPathRoot", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string VirtualPathRoot { get; set; } + + /// Gets or sets the dependency resolver associated with thisinstance. + [Newtonsoft.Json.JsonProperty("DependencyResolver", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IDependencyResolver DependencyResolver { get; set; } + + /// Gets the container of default services associated with this instance. + [Newtonsoft.Json.JsonProperty("Services", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ServicesContainer Services { get; set; } + + /// Gets the collection of rules for how parameters should be bound. + [Newtonsoft.Json.JsonProperty("ParameterBindingRules", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ParameterBindingRulesCollection ParameterBindingRules { get; set; } + + /// Gets or sets a value indicating whether error details should be included in error messages. + [Newtonsoft.Json.JsonProperty("IncludeErrorDetailPolicy", Required = Newtonsoft.Json.Required.Always)] + public IncludeErrorDetailPolicy IncludeErrorDetailPolicy { get; set; } + + /// Gets the media-type formatters for this instance. + [Newtonsoft.Json.JsonProperty("Formatters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public MediaTypeFormatterCollection Formatters { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class ActionOfHttpConfiguration : MulticastDelegate + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class MulticastDelegate : Delegate + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class Delegate + { + [Newtonsoft.Json.JsonProperty("_target", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object _target { get; set; } + + [Newtonsoft.Json.JsonProperty("_methodBase", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object _methodBase { get; set; } + + [Newtonsoft.Json.JsonProperty("_methodPtr", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public IntPtr _methodPtr { get; set; } = new IntPtr(); + + [Newtonsoft.Json.JsonProperty("_methodPtrAux", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public IntPtr _methodPtrAux { get; set; } = new IntPtr(); + + [Newtonsoft.Json.JsonProperty("Method", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public MethodInfo Method { get; set; } + + [Newtonsoft.Json.JsonProperty("Target", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object Target { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class IntPtr + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class MethodInfo : MethodBase + { + [Newtonsoft.Json.JsonProperty("MemberType", Required = Newtonsoft.Json.Required.Always)] + public MemberTypes MemberType { get; set; } + + [Newtonsoft.Json.JsonProperty("ReturnType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ReturnType { get; set; } + + [Newtonsoft.Json.JsonProperty("ReturnParameter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ParameterInfo ReturnParameter { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + [System.Flags] + public enum MemberTypes + { + Constructor = 1, + + Event = 2, + + Field = 4, + + Method = 8, + + Property = 16, + + TypeInfo = 32, + + Custom = 64, + + NestedType = 128, + + All = 191, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class ParameterInfo + { + [Newtonsoft.Json.JsonProperty("ParameterType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ParameterType { get; set; } + + [Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("HasDefaultValue", Required = Newtonsoft.Json.Required.Always)] + public bool HasDefaultValue { get; set; } + + [Newtonsoft.Json.JsonProperty("DefaultValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object DefaultValue { get; set; } + + [Newtonsoft.Json.JsonProperty("RawDefaultValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object RawDefaultValue { get; set; } + + [Newtonsoft.Json.JsonProperty("Position", Required = Newtonsoft.Json.Required.Always)] + public int Position { get; set; } + + [Newtonsoft.Json.JsonProperty("Attributes", Required = Newtonsoft.Json.Required.Always)] + public ParameterAttributes Attributes { get; set; } + + [Newtonsoft.Json.JsonProperty("Member", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public MemberInfo Member { get; set; } + + [Newtonsoft.Json.JsonProperty("IsIn", Required = Newtonsoft.Json.Required.Always)] + public bool IsIn { get; set; } + + [Newtonsoft.Json.JsonProperty("IsOut", Required = Newtonsoft.Json.Required.Always)] + public bool IsOut { get; set; } + + [Newtonsoft.Json.JsonProperty("IsLcid", Required = Newtonsoft.Json.Required.Always)] + public bool IsLcid { get; set; } + + [Newtonsoft.Json.JsonProperty("IsRetval", Required = Newtonsoft.Json.Required.Always)] + public bool IsRetval { get; set; } + + [Newtonsoft.Json.JsonProperty("IsOptional", Required = Newtonsoft.Json.Required.Always)] + public bool IsOptional { get; set; } + + [Newtonsoft.Json.JsonProperty("MetadataToken", Required = Newtonsoft.Json.Required.Always)] + public int MetadataToken { get; set; } + + [Newtonsoft.Json.JsonProperty("CustomAttributes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection CustomAttributes { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + [System.Flags] + public enum ParameterAttributes + { + None = 0, + + In = 1, + + Out = 2, + + Lcid = 4, + + Retval = 8, + + Optional = 16, + + HasDefault = 4096, + + HasFieldMarshal = 8192, + + Reserved3 = 16384, + + Reserved4 = 32768, + + ReservedMask = 61440, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class MemberInfo + { + [Newtonsoft.Json.JsonProperty("CustomAttributes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection CustomAttributes { get; set; } + + [Newtonsoft.Json.JsonProperty("MetadataToken", Required = Newtonsoft.Json.Required.Always)] + public int MetadataToken { get; set; } + + [Newtonsoft.Json.JsonProperty("Module", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Module Module { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class CustomAttributeData + { + [Newtonsoft.Json.JsonProperty("AttributeType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string AttributeType { get; set; } + + [Newtonsoft.Json.JsonProperty("Constructor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ConstructorInfo Constructor { get; set; } + + [Newtonsoft.Json.JsonProperty("ConstructorArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection ConstructorArguments { get; set; } + + [Newtonsoft.Json.JsonProperty("NamedArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection NamedArguments { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class ConstructorInfo : MethodBase + { + [Newtonsoft.Json.JsonProperty("MemberType", Required = Newtonsoft.Json.Required.Always)] + public MemberTypes MemberType { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class MethodBase : MemberInfo + { + [Newtonsoft.Json.JsonProperty("MethodImplementationFlags", Required = Newtonsoft.Json.Required.Always)] + public MethodImplAttributes MethodImplementationFlags { get; set; } + + [Newtonsoft.Json.JsonProperty("CallingConvention", Required = Newtonsoft.Json.Required.Always)] + public CallingConventions CallingConvention { get; set; } + + [Newtonsoft.Json.JsonProperty("IsGenericMethodDefinition", Required = Newtonsoft.Json.Required.Always)] + public bool IsGenericMethodDefinition { get; set; } + + [Newtonsoft.Json.JsonProperty("ContainsGenericParameters", Required = Newtonsoft.Json.Required.Always)] + public bool ContainsGenericParameters { get; set; } + + [Newtonsoft.Json.JsonProperty("IsGenericMethod", Required = Newtonsoft.Json.Required.Always)] + public bool IsGenericMethod { get; set; } + + [Newtonsoft.Json.JsonProperty("IsSecurityCritical", Required = Newtonsoft.Json.Required.Always)] + public bool IsSecurityCritical { get; set; } + + [Newtonsoft.Json.JsonProperty("IsSecuritySafeCritical", Required = Newtonsoft.Json.Required.Always)] + public bool IsSecuritySafeCritical { get; set; } + + [Newtonsoft.Json.JsonProperty("IsSecurityTransparent", Required = Newtonsoft.Json.Required.Always)] + public bool IsSecurityTransparent { get; set; } + + [Newtonsoft.Json.JsonProperty("IsPublic", Required = Newtonsoft.Json.Required.Always)] + public bool IsPublic { get; set; } + + [Newtonsoft.Json.JsonProperty("IsPrivate", Required = Newtonsoft.Json.Required.Always)] + public bool IsPrivate { get; set; } + + [Newtonsoft.Json.JsonProperty("IsFamily", Required = Newtonsoft.Json.Required.Always)] + public bool IsFamily { get; set; } + + [Newtonsoft.Json.JsonProperty("IsAssembly", Required = Newtonsoft.Json.Required.Always)] + public bool IsAssembly { get; set; } + + [Newtonsoft.Json.JsonProperty("IsFamilyAndAssembly", Required = Newtonsoft.Json.Required.Always)] + public bool IsFamilyAndAssembly { get; set; } + + [Newtonsoft.Json.JsonProperty("IsFamilyOrAssembly", Required = Newtonsoft.Json.Required.Always)] + public bool IsFamilyOrAssembly { get; set; } + + [Newtonsoft.Json.JsonProperty("IsStatic", Required = Newtonsoft.Json.Required.Always)] + public bool IsStatic { get; set; } + + [Newtonsoft.Json.JsonProperty("IsFinal", Required = Newtonsoft.Json.Required.Always)] + public bool IsFinal { get; set; } + + [Newtonsoft.Json.JsonProperty("IsVirtual", Required = Newtonsoft.Json.Required.Always)] + public bool IsVirtual { get; set; } + + [Newtonsoft.Json.JsonProperty("IsHideBySig", Required = Newtonsoft.Json.Required.Always)] + public bool IsHideBySig { get; set; } + + [Newtonsoft.Json.JsonProperty("IsAbstract", Required = Newtonsoft.Json.Required.Always)] + public bool IsAbstract { get; set; } + + [Newtonsoft.Json.JsonProperty("IsSpecialName", Required = Newtonsoft.Json.Required.Always)] + public bool IsSpecialName { get; set; } + + [Newtonsoft.Json.JsonProperty("IsConstructor", Required = Newtonsoft.Json.Required.Always)] + public bool IsConstructor { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum MethodImplAttributes + { + IL = 0, + + Managed = 0, + + Native = 1, + + OPTIL = 2, + + Runtime = 3, + + CodeTypeMask = 3, + + Unmanaged = 4, + + ManagedMask = 4, + + NoInlining = 8, + + ForwardRef = 16, + + Synchronized = 32, + + NoOptimization = 64, + + PreserveSig = 128, + + AggressiveInlining = 256, + + SecurityMitigations = 1024, + + InternalCall = 4096, + + MaxMethodImplVal = 65535, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + [System.Flags] + public enum CallingConventions + { + Standard = 1, + + VarArgs = 2, + + Any = 3, + + HasThis = 32, + + ExplicitThis = 64, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class CustomAttributeTypedArgument + { + [Newtonsoft.Json.JsonProperty("ArgumentType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ArgumentType { get; set; } + + [Newtonsoft.Json.JsonProperty("Value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object Value { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class CustomAttributeNamedArgument + { + [Newtonsoft.Json.JsonProperty("MemberInfo", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public MemberInfo MemberInfo { get; set; } + + [Newtonsoft.Json.JsonProperty("TypedValue", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public CustomAttributeTypedArgument TypedValue { get; set; } = new CustomAttributeTypedArgument(); + + [Newtonsoft.Json.JsonProperty("MemberName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string MemberName { get; set; } + + [Newtonsoft.Json.JsonProperty("IsField", Required = Newtonsoft.Json.Required.Always)] + public bool IsField { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class Module + { + [Newtonsoft.Json.JsonProperty("CustomAttributes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection CustomAttributes { get; set; } + + [Newtonsoft.Json.JsonProperty("MDStreamVersion", Required = Newtonsoft.Json.Required.Always)] + public int MDStreamVersion { get; set; } + + [Newtonsoft.Json.JsonProperty("FullyQualifiedName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string FullyQualifiedName { get; set; } + + [Newtonsoft.Json.JsonProperty("ModuleVersionId", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public System.Guid ModuleVersionId { get; set; } + + [Newtonsoft.Json.JsonProperty("MetadataToken", Required = Newtonsoft.Json.Required.Always)] + public int MetadataToken { get; set; } + + [Newtonsoft.Json.JsonProperty("ScopeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ScopeName { get; set; } + + [Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("Assembly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Assembly Assembly { get; set; } + + [Newtonsoft.Json.JsonProperty("ModuleHandle", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public ModuleHandle ModuleHandle { get; set; } = new ModuleHandle(); + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class Assembly + { + [Newtonsoft.Json.JsonProperty("CodeBase", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CodeBase { get; set; } + + [Newtonsoft.Json.JsonProperty("EscapedCodeBase", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string EscapedCodeBase { get; set; } + + [Newtonsoft.Json.JsonProperty("FullName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string FullName { get; set; } + + [Newtonsoft.Json.JsonProperty("EntryPoint", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public MethodInfo EntryPoint { get; set; } + + [Newtonsoft.Json.JsonProperty("ExportedTypes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection ExportedTypes { get; set; } + + [Newtonsoft.Json.JsonProperty("DefinedTypes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection DefinedTypes { get; set; } + + [Newtonsoft.Json.JsonProperty("Evidence", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Evidence { get; set; } + + [Newtonsoft.Json.JsonProperty("PermissionSet", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection PermissionSet { get; set; } + + [Newtonsoft.Json.JsonProperty("IsFullyTrusted", Required = Newtonsoft.Json.Required.Always)] + public bool IsFullyTrusted { get; set; } + + [Newtonsoft.Json.JsonProperty("SecurityRuleSet", Required = Newtonsoft.Json.Required.Always)] + public SecurityRuleSet SecurityRuleSet { get; set; } + + [Newtonsoft.Json.JsonProperty("ManifestModule", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Module ManifestModule { get; set; } + + [Newtonsoft.Json.JsonProperty("CustomAttributes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection CustomAttributes { get; set; } + + [Newtonsoft.Json.JsonProperty("ReflectionOnly", Required = Newtonsoft.Json.Required.Always)] + public bool ReflectionOnly { get; set; } + + [Newtonsoft.Json.JsonProperty("Modules", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Modules { get; set; } + + [Newtonsoft.Json.JsonProperty("Location", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Location { get; set; } + + [Newtonsoft.Json.JsonProperty("ImageRuntimeVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ImageRuntimeVersion { get; set; } + + [Newtonsoft.Json.JsonProperty("GlobalAssemblyCache", Required = Newtonsoft.Json.Required.Always)] + public bool GlobalAssemblyCache { get; set; } + + [Newtonsoft.Json.JsonProperty("HostContext", Required = Newtonsoft.Json.Required.Always)] + public long HostContext { get; set; } + + [Newtonsoft.Json.JsonProperty("IsDynamic", Required = Newtonsoft.Json.Required.Always)] + public bool IsDynamic { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum SecurityRuleSet + { + None = 0, + + Level1 = 1, + + Level2 = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class ModuleHandle + { + [Newtonsoft.Json.JsonProperty("MDStreamVersion", Required = Newtonsoft.Json.Required.Always)] + public int MDStreamVersion { get; set; } + + + } + + /// Provides information about the available action filters. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class FilterInfo + { + /// Gets or sets an instance of the FilterInfo. + [Newtonsoft.Json.JsonProperty("Instance", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IFilter Instance { get; set; } + + /// Gets or sets the scope FilterInfo. + [Newtonsoft.Json.JsonProperty("Scope", Required = Newtonsoft.Json.Required.Always)] + public FilterScope Scope { get; set; } + + + } + + /// Defines the methods that are used in a filter. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IFilter + { + /// Gets or sets a value indicating whether more than one instance of the indicated attribute can be specified for a single program element. + [Newtonsoft.Json.JsonProperty("AllowMultiple", Required = Newtonsoft.Json.Required.Always)] + public bool AllowMultiple { get; set; } + + + } + + /// Defines values that specify the order in which filters run within the same filter type and filter order. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum FilterScope + { + Global = 0, + + Controller = 10, + + Action = 20, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class DelegatingHandler : HttpMessageHandler + { + [Newtonsoft.Json.JsonProperty("InnerHandler", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpMessageHandler InnerHandler { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class HttpMessageHandler + { + + } + + /// IHttpRoute defines the interface for a route expressing how to map an incoming HttpRequestMessage to a particular controller and action. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IHttpRoute + { + /// Gets the route template describing the URI pattern to match against. + [Newtonsoft.Json.JsonProperty("RouteTemplate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string RouteTemplate { get; set; } + + /// Gets the default values for route parameters if not provided by the incoming HttpRequestMessage. + [Newtonsoft.Json.JsonProperty("Defaults", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary Defaults { get; set; } + + /// Gets the constraints for the route parameters. + [Newtonsoft.Json.JsonProperty("Constraints", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary Constraints { get; set; } + + /// Gets any additional data tokens not used directly to determine whether a route matches an incoming HttpRequestMessage. + [Newtonsoft.Json.JsonProperty("DataTokens", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary DataTokens { get; set; } + + /// Gets the message handler that will be the recipient of the request. + [Newtonsoft.Json.JsonProperty("Handler", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpMessageHandler Handler { get; set; } + + + } + + /// Represents a dependency injection container. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IDependencyResolver + { + + } + + /// An abstract class that provides a container for services used by ASP.NET Web API. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class ServicesContainer + { + + } + + /// Collection of functions that can produce a parameter binding for a given parameter. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class ParameterBindingRulesCollection : System.Collections.ObjectModel.Collection + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class FuncOfHttpParameterDescriptorAndHttpParameterBinding : MulticastDelegate + { + + } + + /// Specifies whether error details, such as exception messages and stack traces, should be included in error messages. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum IncludeErrorDetailPolicy + { + Default = 0, + + LocalOnly = 1, + + Always = 2, + + Never = 3, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class MediaTypeFormatterCollection : Anonymous + { + + } + + /// MediaTypeFormatter class to handle Xml. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class XmlMediaTypeFormatter : MediaTypeFormatter + { + /// Gets or sets a value indicating whether the XML formatter uses the XmlSerializer as the default serializer, instead of using the DataContractSerializer. + [Newtonsoft.Json.JsonProperty("UseXmlSerializer", Required = Newtonsoft.Json.Required.Always)] + public bool UseXmlSerializer { get; set; } = false; + + /// Gets or sets a value indicating whether to indent elements when writing data. + [Newtonsoft.Json.JsonProperty("Indent", Required = Newtonsoft.Json.Required.Always)] + public bool Indent { get; set; } + + /// Gets the settings to be used while writing. + [Newtonsoft.Json.JsonProperty("WriterSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public XmlWriterSettings WriterSettings { get; set; } + + /// Gets and sets the maximum nested node depth. + [Newtonsoft.Json.JsonProperty("MaxDepth", Required = Newtonsoft.Json.Required.Always)] + public int MaxDepth { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class XmlWriterSettings + { + [Newtonsoft.Json.JsonProperty("Async", Required = Newtonsoft.Json.Required.Always)] + public bool Async { get; set; } + + [Newtonsoft.Json.JsonProperty("Encoding", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Encoding Encoding { get; set; } + + [Newtonsoft.Json.JsonProperty("OmitXmlDeclaration", Required = Newtonsoft.Json.Required.Always)] + public bool OmitXmlDeclaration { get; set; } + + [Newtonsoft.Json.JsonProperty("NewLineHandling", Required = Newtonsoft.Json.Required.Always)] + public NewLineHandling NewLineHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("NewLineChars", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string NewLineChars { get; set; } + + [Newtonsoft.Json.JsonProperty("Indent", Required = Newtonsoft.Json.Required.Always)] + public bool Indent { get; set; } + + [Newtonsoft.Json.JsonProperty("IndentChars", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string IndentChars { get; set; } + + [Newtonsoft.Json.JsonProperty("NewLineOnAttributes", Required = Newtonsoft.Json.Required.Always)] + public bool NewLineOnAttributes { get; set; } + + [Newtonsoft.Json.JsonProperty("CloseOutput", Required = Newtonsoft.Json.Required.Always)] + public bool CloseOutput { get; set; } + + [Newtonsoft.Json.JsonProperty("ConformanceLevel", Required = Newtonsoft.Json.Required.Always)] + public ConformanceLevel ConformanceLevel { get; set; } + + [Newtonsoft.Json.JsonProperty("CheckCharacters", Required = Newtonsoft.Json.Required.Always)] + public bool CheckCharacters { get; set; } + + [Newtonsoft.Json.JsonProperty("NamespaceHandling", Required = Newtonsoft.Json.Required.Always)] + public NamespaceHandling NamespaceHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("WriteEndDocumentOnClose", Required = Newtonsoft.Json.Required.Always)] + public bool WriteEndDocumentOnClose { get; set; } + + [Newtonsoft.Json.JsonProperty("OutputMethod", Required = Newtonsoft.Json.Required.Always)] + public XmlOutputMethod OutputMethod { get; set; } + + [Newtonsoft.Json.JsonProperty("DoNotEscapeUriAttributes", Required = Newtonsoft.Json.Required.Always)] + public bool DoNotEscapeUriAttributes { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class Encoding + { + [Newtonsoft.Json.JsonProperty("BodyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string BodyName { get; set; } + + [Newtonsoft.Json.JsonProperty("EncodingName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string EncodingName { get; set; } + + [Newtonsoft.Json.JsonProperty("HeaderName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string HeaderName { get; set; } + + [Newtonsoft.Json.JsonProperty("WebName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string WebName { get; set; } + + [Newtonsoft.Json.JsonProperty("WindowsCodePage", Required = Newtonsoft.Json.Required.Always)] + public int WindowsCodePage { get; set; } + + [Newtonsoft.Json.JsonProperty("IsBrowserDisplay", Required = Newtonsoft.Json.Required.Always)] + public bool IsBrowserDisplay { get; set; } + + [Newtonsoft.Json.JsonProperty("IsBrowserSave", Required = Newtonsoft.Json.Required.Always)] + public bool IsBrowserSave { get; set; } + + [Newtonsoft.Json.JsonProperty("IsMailNewsDisplay", Required = Newtonsoft.Json.Required.Always)] + public bool IsMailNewsDisplay { get; set; } + + [Newtonsoft.Json.JsonProperty("IsMailNewsSave", Required = Newtonsoft.Json.Required.Always)] + public bool IsMailNewsSave { get; set; } + + [Newtonsoft.Json.JsonProperty("IsSingleByte", Required = Newtonsoft.Json.Required.Always)] + public bool IsSingleByte { get; set; } + + [Newtonsoft.Json.JsonProperty("EncoderFallback", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public EncoderFallback EncoderFallback { get; set; } + + [Newtonsoft.Json.JsonProperty("DecoderFallback", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public DecoderFallback DecoderFallback { get; set; } + + [Newtonsoft.Json.JsonProperty("IsReadOnly", Required = Newtonsoft.Json.Required.Always)] + public bool IsReadOnly { get; set; } + + [Newtonsoft.Json.JsonProperty("CodePage", Required = Newtonsoft.Json.Required.Always)] + public int CodePage { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class EncoderFallback + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class DecoderFallback + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum NewLineHandling + { + Replace = 0, + + Entitize = 1, + + None = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum ConformanceLevel + { + Auto = 0, + + Fragment = 1, + + Document = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + [System.Flags] + public enum NamespaceHandling + { + Default = 0, + + OmitDuplicates = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum XmlOutputMethod + { + Xml = 0, + + Html = 1, + + Text = 2, + + AutoDetect = 3, + + } + + /// Base class to handle serializing and deserializing strongly-typed objects using ObjectContent. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class MediaTypeFormatter + { + /// Gets the mutable collection of media types supported bythis MediaTypeFormatter. + [Newtonsoft.Json.JsonProperty("SupportedMediaTypes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection SupportedMediaTypes { get; set; } + + /// Gets the mutable collection of character encodings supported bythis MediaTypeFormatter. + [Newtonsoft.Json.JsonProperty("SupportedEncodings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection SupportedEncodings { get; set; } + + /// Gets the mutable collection of MediaTypeMapping objects that match HTTP requests to media types. + [Newtonsoft.Json.JsonProperty("MediaTypeMappings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection MediaTypeMappings { get; set; } + + /// Gets or sets the IRequiredMemberSelector instance used to determine required members. + [Newtonsoft.Json.JsonProperty("RequiredMemberSelector", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IRequiredMemberSelector RequiredMemberSelector { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class MediaTypeHeaderValue + { + [Newtonsoft.Json.JsonProperty("CharSet", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CharSet { get; set; } + + [Newtonsoft.Json.JsonProperty("Parameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Parameters { get; set; } + + [Newtonsoft.Json.JsonProperty("MediaType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string MediaType { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class NameValueHeaderValue + { + [Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("Value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Value { get; set; } + + + } + + /// An abstract base class used to create an association between HttpRequestMessage or HttpResponseMessage instances that have certain characteristics and a specific MediaTypeHeaderValue. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class MediaTypeMapping + { + /// Gets the MediaTypeHeaderValue that is associated with HttpRequestMessage or HttpResponseMessage instances that have the given characteristics of the MediaTypeMapping. + [Newtonsoft.Json.JsonProperty("MediaType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public MediaTypeHeaderValue MediaType { get; set; } + + + } + + /// Defines method that determines whether a given member is required on deserialization. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IRequiredMemberSelector + { + + } + + /// Represents the MediaTypeFormatter class to handle JSON. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class JsonMediaTypeFormatter : BaseJsonMediaTypeFormatter + { + /// Gets or sets a value indicating whether to use DataContractJsonSerializer by default. + [Newtonsoft.Json.JsonProperty("UseDataContractJsonSerializer", Required = Newtonsoft.Json.Required.Always)] + public bool UseDataContractJsonSerializer { get; set; } + + /// Gets or sets a value indicating whether to indent elements when writing data. + [Newtonsoft.Json.JsonProperty("Indent", Required = Newtonsoft.Json.Required.Always)] + public bool Indent { get; set; } + + /// Gets or sets the maximum depth allowed by this formatter. + [Newtonsoft.Json.JsonProperty("MaxDepth", Required = Newtonsoft.Json.Required.Always)] + public int MaxDepth { get; set; } + + + } + + /// Abstract media type formatter class to support Bson and Json. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class BaseJsonMediaTypeFormatter : MediaTypeFormatter + { + /// Gets or sets the JsonSerializerSettings used to configure the JsonSerializer. + [Newtonsoft.Json.JsonProperty("SerializerSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public JsonSerializerSettings SerializerSettings { get; set; } + + /// Gets or sets the maximum depth allowed by this formatter. + [Newtonsoft.Json.JsonProperty("MaxDepth", Required = Newtonsoft.Json.Required.Always)] + public int MaxDepth { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class JsonSerializerSettings + { + [Newtonsoft.Json.JsonProperty("ReferenceLoopHandling", Required = Newtonsoft.Json.Required.Always)] + public ReferenceLoopHandling ReferenceLoopHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("MissingMemberHandling", Required = Newtonsoft.Json.Required.Always)] + public MissingMemberHandling MissingMemberHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("ObjectCreationHandling", Required = Newtonsoft.Json.Required.Always)] + public ObjectCreationHandling ObjectCreationHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("NullValueHandling", Required = Newtonsoft.Json.Required.Always)] + public NullValueHandling NullValueHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("DefaultValueHandling", Required = Newtonsoft.Json.Required.Always)] + public DefaultValueHandling DefaultValueHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("Converters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Converters { get; set; } + + [Newtonsoft.Json.JsonProperty("PreserveReferencesHandling", Required = Newtonsoft.Json.Required.Always)] + public PreserveReferencesHandling PreserveReferencesHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("TypeNameHandling", Required = Newtonsoft.Json.Required.Always)] + public TypeNameHandling TypeNameHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("MetadataPropertyHandling", Required = Newtonsoft.Json.Required.Always)] + public MetadataPropertyHandling MetadataPropertyHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("TypeNameAssemblyFormat", Required = Newtonsoft.Json.Required.Always)] + public FormatterAssemblyStyle TypeNameAssemblyFormat { get; set; } + + [Newtonsoft.Json.JsonProperty("TypeNameAssemblyFormatHandling", Required = Newtonsoft.Json.Required.Always)] + public TypeNameAssemblyFormatHandling TypeNameAssemblyFormatHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("ConstructorHandling", Required = Newtonsoft.Json.Required.Always)] + public ConstructorHandling ConstructorHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("ContractResolver", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IContractResolver ContractResolver { get; set; } + + [Newtonsoft.Json.JsonProperty("EqualityComparer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IEqualityComparer EqualityComparer { get; set; } + + [Newtonsoft.Json.JsonProperty("ReferenceResolver", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IReferenceResolver ReferenceResolver { get; set; } + + [Newtonsoft.Json.JsonProperty("ReferenceResolverProvider", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public FuncOfIReferenceResolver ReferenceResolverProvider { get; set; } + + [Newtonsoft.Json.JsonProperty("TraceWriter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ITraceWriter TraceWriter { get; set; } + + [Newtonsoft.Json.JsonProperty("Binder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SerializationBinder Binder { get; set; } + + [Newtonsoft.Json.JsonProperty("SerializationBinder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ISerializationBinder SerializationBinder { get; set; } + + [Newtonsoft.Json.JsonProperty("Error", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public EventHandlerOfErrorEventArgs Error { get; set; } + + [Newtonsoft.Json.JsonProperty("Context", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public StreamingContext Context { get; set; } = new StreamingContext(); + + [Newtonsoft.Json.JsonProperty("DateFormatString", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string DateFormatString { get; set; } + + [Newtonsoft.Json.JsonProperty("MaxDepth", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? MaxDepth { get; set; } + + [Newtonsoft.Json.JsonProperty("Formatting", Required = Newtonsoft.Json.Required.Always)] + public Formatting Formatting { get; set; } + + [Newtonsoft.Json.JsonProperty("DateFormatHandling", Required = Newtonsoft.Json.Required.Always)] + public DateFormatHandling DateFormatHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("DateTimeZoneHandling", Required = Newtonsoft.Json.Required.Always)] + public DateTimeZoneHandling DateTimeZoneHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("DateParseHandling", Required = Newtonsoft.Json.Required.Always)] + public DateParseHandling DateParseHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("FloatFormatHandling", Required = Newtonsoft.Json.Required.Always)] + public FloatFormatHandling FloatFormatHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("FloatParseHandling", Required = Newtonsoft.Json.Required.Always)] + public FloatParseHandling FloatParseHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("StringEscapeHandling", Required = Newtonsoft.Json.Required.Always)] + public StringEscapeHandling StringEscapeHandling { get; set; } + + [Newtonsoft.Json.JsonProperty("Culture", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Culture { get; set; } + + [Newtonsoft.Json.JsonProperty("CheckAdditionalContent", Required = Newtonsoft.Json.Required.Always)] + public bool CheckAdditionalContent { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum ReferenceLoopHandling + { + Error = 0, + + Ignore = 1, + + Serialize = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum MissingMemberHandling + { + Ignore = 0, + + Error = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum ObjectCreationHandling + { + Auto = 0, + + Reuse = 1, + + Replace = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum NullValueHandling + { + Include = 0, + + Ignore = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + [System.Flags] + public enum DefaultValueHandling + { + Include = 0, + + Ignore = 1, + + Populate = 2, + + IgnoreAndPopulate = 3, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class JsonConverter + { + [Newtonsoft.Json.JsonProperty("CanRead", Required = Newtonsoft.Json.Required.Always)] + public bool CanRead { get; set; } + + [Newtonsoft.Json.JsonProperty("CanWrite", Required = Newtonsoft.Json.Required.Always)] + public bool CanWrite { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + [System.Flags] + public enum PreserveReferencesHandling + { + None = 0, + + Objects = 1, + + Arrays = 2, + + All = 3, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + [System.Flags] + public enum TypeNameHandling + { + None = 0, + + Objects = 1, + + Arrays = 2, + + All = 3, + + Auto = 4, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum MetadataPropertyHandling + { + Default = 0, + + ReadAhead = 1, + + Ignore = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum FormatterAssemblyStyle + { + Simple = 0, + + Full = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum TypeNameAssemblyFormatHandling + { + Simple = 0, + + Full = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum ConstructorHandling + { + Default = 0, + + AllowNonPublicDefaultConstructor = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IContractResolver + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IEqualityComparer + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IReferenceResolver + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class FuncOfIReferenceResolver : MulticastDelegate + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class ITraceWriter + { + [Newtonsoft.Json.JsonProperty("LevelFilter", Required = Newtonsoft.Json.Required.Always)] + public TraceLevel LevelFilter { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum TraceLevel + { + Off = 0, + + Error = 1, + + Warning = 2, + + Info = 3, + + Verbose = 4, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class SerializationBinder + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class ISerializationBinder + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class EventHandlerOfErrorEventArgs : MulticastDelegate + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class StreamingContext + { + [Newtonsoft.Json.JsonProperty("Context", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object Context { get; set; } + + [Newtonsoft.Json.JsonProperty("State", Required = Newtonsoft.Json.Required.Always)] + public StreamingContextStates State { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + [System.Flags] + public enum StreamingContextStates + { + CrossProcess = 1, + + CrossMachine = 2, + + File = 4, + + Persistence = 8, + + Remoting = 16, + + Other = 32, + + Clone = 64, + + CrossAppDomain = 128, + + All = 255, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum Formatting + { + None = 0, + + Indented = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum DateFormatHandling + { + IsoDateFormat = 0, + + MicrosoftDateFormat = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum DateTimeZoneHandling + { + Local = 0, + + Utc = 1, + + Unspecified = 2, + + RoundtripKind = 3, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum DateParseHandling + { + None = 0, + + DateTime = 1, + + DateTimeOffset = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum FloatFormatHandling + { + String = 0, + + Symbol = 1, + + DefaultValue = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum FloatParseHandling + { + Double = 0, + + Decimal = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public enum StringEscapeHandling + { + Default = 0, + + EscapeNonAscii = 1, + + EscapeHtml = 2, + + } + + /// MediaTypeFormatter class for handling HTML form URL-ended data, also known as application/x-www-form-urlencoded. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class FormUrlEncodedMediaTypeFormatter : MediaTypeFormatter + { + /// Gets or sets the maximum depth allowed by this formatter. + [Newtonsoft.Json.JsonProperty("MaxDepth", Required = Newtonsoft.Json.Required.Always)] + public int MaxDepth { get; set; } + + /// Gets or sets the size of the buffer when reading the incoming stream. + [Newtonsoft.Json.JsonProperty("ReadBufferSize", Required = Newtonsoft.Json.Required.Always)] + public int ReadBufferSize { get; set; } + + + } + + /// Represents information that describes the HTTP controller. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class HttpControllerDescriptor + { + /// Gets the properties associated with this instance. + [Newtonsoft.Json.JsonProperty("Properties", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary Properties { get; set; } + + /// Gets or sets the configurations associated with the controller. + [Newtonsoft.Json.JsonProperty("Configuration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpConfiguration Configuration { get; set; } + + /// Gets or sets the name of the controller. + [Newtonsoft.Json.JsonProperty("ControllerName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ControllerName { get; set; } + + /// Gets or sets the type of the controller. + [Newtonsoft.Json.JsonProperty("ControllerType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ControllerType { get; set; } + + + } + + /// Represents an HTTP controller. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IHttpController + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class HttpRequestMessage + { + [Newtonsoft.Json.JsonProperty("Version", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Version Version { get; set; } + + [Newtonsoft.Json.JsonProperty("Content", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpContent Content { get; set; } + + [Newtonsoft.Json.JsonProperty("Method", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpMethod Method { get; set; } + + [Newtonsoft.Json.JsonProperty("RequestUri", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Uri RequestUri { get; set; } + + [Newtonsoft.Json.JsonProperty("Headers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpRequestHeaders Headers { get; set; } + + [Newtonsoft.Json.JsonProperty("Properties", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary Properties { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class Version + { + [Newtonsoft.Json.JsonProperty("Major", Required = Newtonsoft.Json.Required.Always)] + public int Major { get; set; } + + [Newtonsoft.Json.JsonProperty("Minor", Required = Newtonsoft.Json.Required.Always)] + public int Minor { get; set; } + + [Newtonsoft.Json.JsonProperty("Build", Required = Newtonsoft.Json.Required.Always)] + public int Build { get; set; } + + [Newtonsoft.Json.JsonProperty("Revision", Required = Newtonsoft.Json.Required.Always)] + public int Revision { get; set; } + + [Newtonsoft.Json.JsonProperty("MajorRevision", Required = Newtonsoft.Json.Required.Always)] + public int MajorRevision { get; set; } + + [Newtonsoft.Json.JsonProperty("MinorRevision", Required = Newtonsoft.Json.Required.Always)] + public int MinorRevision { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class HttpContent + { + [Newtonsoft.Json.JsonProperty("Headers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpContentHeaders Headers { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class HttpContentHeaders : Anonymous2 + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class ContentDispositionHeaderValue + { + [Newtonsoft.Json.JsonProperty("DispositionType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string DispositionType { get; set; } + + [Newtonsoft.Json.JsonProperty("Parameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Parameters { get; set; } + + [Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("FileName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string FileName { get; set; } + + [Newtonsoft.Json.JsonProperty("FileNameStar", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string FileNameStar { get; set; } + + [Newtonsoft.Json.JsonProperty("CreationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? CreationDate { get; set; } + + [Newtonsoft.Json.JsonProperty("ModificationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ModificationDate { get; set; } + + [Newtonsoft.Json.JsonProperty("ReadDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ReadDate { get; set; } + + [Newtonsoft.Json.JsonProperty("Size", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Size { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class ContentRangeHeaderValue + { + [Newtonsoft.Json.JsonProperty("Unit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Unit { get; set; } + + [Newtonsoft.Json.JsonProperty("From", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? From { get; set; } + + [Newtonsoft.Json.JsonProperty("To", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? To { get; set; } + + [Newtonsoft.Json.JsonProperty("Length", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Length { get; set; } + + [Newtonsoft.Json.JsonProperty("HasLength", Required = Newtonsoft.Json.Required.Always)] + public bool HasLength { get; set; } + + [Newtonsoft.Json.JsonProperty("HasRange", Required = Newtonsoft.Json.Required.Always)] + public bool HasRange { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class KeyValuePairOfStringAndIEnumerableOfString + { + [Newtonsoft.Json.JsonProperty("Key", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Key { get; set; } + + [Newtonsoft.Json.JsonProperty("Value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Value { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class HttpMethod + { + [Newtonsoft.Json.JsonProperty("Method", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Method { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class HttpRequestHeaders : Anonymous3 + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class MediaTypeWithQualityHeaderValue : MediaTypeHeaderValue + { + [Newtonsoft.Json.JsonProperty("Quality", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Quality { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class StringWithQualityHeaderValue + { + [Newtonsoft.Json.JsonProperty("Value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Value { get; set; } + + [Newtonsoft.Json.JsonProperty("Quality", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Quality { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class AuthenticationHeaderValue + { + [Newtonsoft.Json.JsonProperty("Scheme", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Scheme { get; set; } + + [Newtonsoft.Json.JsonProperty("Parameter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Parameter { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class NameValueWithParametersHeaderValue : NameValueHeaderValue + { + [Newtonsoft.Json.JsonProperty("Parameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Parameters { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class EntityTagHeaderValue + { + [Newtonsoft.Json.JsonProperty("Tag", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Tag { get; set; } + + [Newtonsoft.Json.JsonProperty("IsWeak", Required = Newtonsoft.Json.Required.Always)] + public bool IsWeak { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class RangeConditionHeaderValue + { + [Newtonsoft.Json.JsonProperty("Date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Date { get; set; } + + [Newtonsoft.Json.JsonProperty("EntityTag", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public EntityTagHeaderValue EntityTag { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class RangeHeaderValue + { + [Newtonsoft.Json.JsonProperty("Unit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Unit { get; set; } + + [Newtonsoft.Json.JsonProperty("Ranges", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Ranges { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class RangeItemHeaderValue + { + [Newtonsoft.Json.JsonProperty("From", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? From { get; set; } + + [Newtonsoft.Json.JsonProperty("To", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? To { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class TransferCodingWithQualityHeaderValue : TransferCodingHeaderValue + { + [Newtonsoft.Json.JsonProperty("Quality", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Quality { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class TransferCodingHeaderValue + { + [Newtonsoft.Json.JsonProperty("Value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Value { get; set; } + + [Newtonsoft.Json.JsonProperty("Parameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Parameters { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class ProductInfoHeaderValue + { + [Newtonsoft.Json.JsonProperty("Product", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ProductHeaderValue Product { get; set; } + + [Newtonsoft.Json.JsonProperty("Comment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Comment { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class ProductHeaderValue + { + [Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("Version", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Version { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class CacheControlHeaderValue + { + [Newtonsoft.Json.JsonProperty("NoCache", Required = Newtonsoft.Json.Required.Always)] + public bool NoCache { get; set; } + + [Newtonsoft.Json.JsonProperty("NoCacheHeaders", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection NoCacheHeaders { get; set; } + + [Newtonsoft.Json.JsonProperty("NoStore", Required = Newtonsoft.Json.Required.Always)] + public bool NoStore { get; set; } + + [Newtonsoft.Json.JsonProperty("MaxAge", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.TimeSpan? MaxAge { get; set; } + + [Newtonsoft.Json.JsonProperty("SharedMaxAge", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.TimeSpan? SharedMaxAge { get; set; } + + [Newtonsoft.Json.JsonProperty("MaxStale", Required = Newtonsoft.Json.Required.Always)] + public bool MaxStale { get; set; } + + [Newtonsoft.Json.JsonProperty("MaxStaleLimit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.TimeSpan? MaxStaleLimit { get; set; } + + [Newtonsoft.Json.JsonProperty("MinFresh", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.TimeSpan? MinFresh { get; set; } + + [Newtonsoft.Json.JsonProperty("NoTransform", Required = Newtonsoft.Json.Required.Always)] + public bool NoTransform { get; set; } + + [Newtonsoft.Json.JsonProperty("OnlyIfCached", Required = Newtonsoft.Json.Required.Always)] + public bool OnlyIfCached { get; set; } + + [Newtonsoft.Json.JsonProperty("Public", Required = Newtonsoft.Json.Required.Always)] + public bool Public { get; set; } + + [Newtonsoft.Json.JsonProperty("Private", Required = Newtonsoft.Json.Required.Always)] + public bool Private { get; set; } + + [Newtonsoft.Json.JsonProperty("PrivateHeaders", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection PrivateHeaders { get; set; } + + [Newtonsoft.Json.JsonProperty("MustRevalidate", Required = Newtonsoft.Json.Required.Always)] + public bool MustRevalidate { get; set; } + + [Newtonsoft.Json.JsonProperty("ProxyRevalidate", Required = Newtonsoft.Json.Required.Always)] + public bool ProxyRevalidate { get; set; } + + [Newtonsoft.Json.JsonProperty("Extensions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Extensions { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class ViaHeaderValue + { + [Newtonsoft.Json.JsonProperty("ProtocolName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ProtocolName { get; set; } + + [Newtonsoft.Json.JsonProperty("ProtocolVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ProtocolVersion { get; set; } + + [Newtonsoft.Json.JsonProperty("ReceivedBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ReceivedBy { get; set; } + + [Newtonsoft.Json.JsonProperty("Comment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Comment { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class WarningHeaderValue + { + [Newtonsoft.Json.JsonProperty("Code", Required = Newtonsoft.Json.Required.Always)] + public int Code { get; set; } + + [Newtonsoft.Json.JsonProperty("Agent", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Agent { get; set; } + + [Newtonsoft.Json.JsonProperty("Text", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Text { get; set; } + + [Newtonsoft.Json.JsonProperty("Date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Date { get; set; } + + + } + + /// Represents the context associated with a request. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class HttpRequestContext + { + /// Gets or sets the client certificate. + [Newtonsoft.Json.JsonProperty("ClientCertificate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public X509Certificate2 ClientCertificate { get; set; } + + /// Gets or sets the configuration. + [Newtonsoft.Json.JsonProperty("Configuration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpConfiguration Configuration { get; set; } + + /// Gets or sets a value indicating whether error details, such as exception messages and stack traces, should be included in the response for this request. + [Newtonsoft.Json.JsonProperty("IncludeErrorDetail", Required = Newtonsoft.Json.Required.Always)] + public bool IncludeErrorDetail { get; set; } + + /// Gets or sets a value indicating whether the request originates from a local address. + [Newtonsoft.Json.JsonProperty("IsLocal", Required = Newtonsoft.Json.Required.Always)] + public bool IsLocal { get; set; } + + /// .Gets or sets the principal + [Newtonsoft.Json.JsonProperty("Principal", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IPrincipal Principal { get; set; } + + /// Gets or sets the route data. + [Newtonsoft.Json.JsonProperty("RouteData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IHttpRouteData RouteData { get; set; } + + /// Gets or sets the factory used to generate URLs to other APIs. + [Newtonsoft.Json.JsonProperty("Url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public UrlHelper Url { get; set; } + + /// Gets or sets the virtual path root. + [Newtonsoft.Json.JsonProperty("VirtualPathRoot", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string VirtualPathRoot { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class X509Certificate2 : X509Certificate + { + [Newtonsoft.Json.JsonProperty("Archived", Required = Newtonsoft.Json.Required.Always)] + public bool Archived { get; set; } + + [Newtonsoft.Json.JsonProperty("Extensions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Extensions { get; set; } + + [Newtonsoft.Json.JsonProperty("FriendlyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string FriendlyName { get; set; } + + [Newtonsoft.Json.JsonProperty("IssuerName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public X500DistinguishedName IssuerName { get; set; } + + [Newtonsoft.Json.JsonProperty("NotAfter", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public System.DateTimeOffset NotAfter { get; set; } + + [Newtonsoft.Json.JsonProperty("NotBefore", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public System.DateTimeOffset NotBefore { get; set; } + + [Newtonsoft.Json.JsonProperty("HasPrivateKey", Required = Newtonsoft.Json.Required.Always)] + public bool HasPrivateKey { get; set; } + + [Newtonsoft.Json.JsonProperty("PrivateKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public AsymmetricAlgorithm PrivateKey { get; set; } + + [Newtonsoft.Json.JsonProperty("PublicKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public PublicKey PublicKey { get; set; } + + [Newtonsoft.Json.JsonProperty("RawData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public byte[] RawData { get; set; } + + [Newtonsoft.Json.JsonProperty("SerialNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string SerialNumber { get; set; } + + [Newtonsoft.Json.JsonProperty("SubjectName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public X500DistinguishedName SubjectName { get; set; } + + [Newtonsoft.Json.JsonProperty("SignatureAlgorithm", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Oid SignatureAlgorithm { get; set; } + + [Newtonsoft.Json.JsonProperty("Thumbprint", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Thumbprint { get; set; } + + [Newtonsoft.Json.JsonProperty("Version", Required = Newtonsoft.Json.Required.Always)] + public int Version { get; set; } + + [Newtonsoft.Json.JsonProperty("CertContext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SafeCertContextHandle CertContext { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class X500DistinguishedName : AsnEncodedData + { + [Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class AsnEncodedData + { + [Newtonsoft.Json.JsonProperty("Oid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Oid Oid { get; set; } + + [Newtonsoft.Json.JsonProperty("RawData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public byte[] RawData { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class Oid + { + [Newtonsoft.Json.JsonProperty("Value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Value { get; set; } + + [Newtonsoft.Json.JsonProperty("FriendlyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string FriendlyName { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class AsymmetricAlgorithm + { + [Newtonsoft.Json.JsonProperty("KeySize", Required = Newtonsoft.Json.Required.Always)] + public int KeySize { get; set; } + + [Newtonsoft.Json.JsonProperty("LegalKeySizes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection LegalKeySizes { get; set; } + + [Newtonsoft.Json.JsonProperty("SignatureAlgorithm", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string SignatureAlgorithm { get; set; } + + [Newtonsoft.Json.JsonProperty("KeyExchangeAlgorithm", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string KeyExchangeAlgorithm { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class KeySizes + { + [Newtonsoft.Json.JsonProperty("MinSize", Required = Newtonsoft.Json.Required.Always)] + public int MinSize { get; set; } + + [Newtonsoft.Json.JsonProperty("MaxSize", Required = Newtonsoft.Json.Required.Always)] + public int MaxSize { get; set; } + + [Newtonsoft.Json.JsonProperty("SkipSize", Required = Newtonsoft.Json.Required.Always)] + public int SkipSize { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class PublicKey + { + [Newtonsoft.Json.JsonProperty("Key", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public AsymmetricAlgorithm Key { get; set; } + + [Newtonsoft.Json.JsonProperty("Oid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Oid Oid { get; set; } + + [Newtonsoft.Json.JsonProperty("EncodedKeyValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public AsnEncodedData EncodedKeyValue { get; set; } + + [Newtonsoft.Json.JsonProperty("EncodedParameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public AsnEncodedData EncodedParameters { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class SafeCertContextHandle : SafeHandleZeroOrMinusOneIsInvalid + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class SafeHandleZeroOrMinusOneIsInvalid : SafeHandle + { + [Newtonsoft.Json.JsonProperty("IsInvalid", Required = Newtonsoft.Json.Required.Always)] + public bool IsInvalid { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class SafeHandle : CriticalFinalizerObject + { + [Newtonsoft.Json.JsonProperty("IsClosed", Required = Newtonsoft.Json.Required.Always)] + public bool IsClosed { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class CriticalFinalizerObject + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class X509Certificate + { + [Newtonsoft.Json.JsonProperty("Handle", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public IntPtr Handle { get; set; } = new IntPtr(); + + [Newtonsoft.Json.JsonProperty("Issuer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Issuer { get; set; } + + [Newtonsoft.Json.JsonProperty("Subject", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Subject { get; set; } + + [Newtonsoft.Json.JsonProperty("CertContext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SafeCertContextHandle2 CertContext { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class SafeCertContextHandle2 : SafeHandleZeroOrMinusOneIsInvalid + { + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IPrincipal + { + [Newtonsoft.Json.JsonProperty("Identity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IIdentity Identity { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IIdentity + { + [Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("AuthenticationType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string AuthenticationType { get; set; } + + [Newtonsoft.Json.JsonProperty("IsAuthenticated", Required = Newtonsoft.Json.Required.Always)] + public bool IsAuthenticated { get; set; } + + + } + + /// Provides information about a route. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public abstract partial class IHttpRouteData + { + /// Gets the object that represents the route. + [Newtonsoft.Json.JsonProperty("Route", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public IHttpRoute Route { get; set; } + + /// Gets a collection of URL parameter values and default values for the route. + [Newtonsoft.Json.JsonProperty("Values", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary Values { get; set; } + + + } + + /// Represents a factory for creating URLs. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class UrlHelper + { + /// Gets or sets the HttpRequestMessage of the current UrlHelper instance. + [Newtonsoft.Json.JsonProperty("Request", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HttpRequestMessage Request { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class Evidence + { + private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties; } + set { _additionalProperties = value; } + } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class PermissionSet + { + private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties; } + set { _additionalProperties = value; } + } + + + } + + /// Collection class that contains MediaTypeFormatter instances. + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class Anonymous + { + /// Gets the MediaTypeFormatter to use for XML. + [Newtonsoft.Json.JsonProperty("XmlFormatter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public XmlMediaTypeFormatter XmlFormatter { get; set; } + + /// Gets the MediaTypeFormatter to use for JSON. + [Newtonsoft.Json.JsonProperty("JsonFormatter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public JsonMediaTypeFormatter JsonFormatter { get; set; } + + /// Gets the MediaTypeFormatter to use for application/x-www-form-urlencoded data. + [Newtonsoft.Json.JsonProperty("FormUrlEncodedFormatter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public FormUrlEncodedMediaTypeFormatter FormUrlEncodedFormatter { get; set; } + + [Newtonsoft.Json.JsonProperty("WritingFormatters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection WritingFormatters { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class Anonymous2 + { + [Newtonsoft.Json.JsonProperty("Allow", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Allow { get; set; } + + [Newtonsoft.Json.JsonProperty("ContentDisposition", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ContentDispositionHeaderValue ContentDisposition { get; set; } + + [Newtonsoft.Json.JsonProperty("ContentEncoding", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection ContentEncoding { get; set; } + + [Newtonsoft.Json.JsonProperty("ContentLanguage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection ContentLanguage { get; set; } + + [Newtonsoft.Json.JsonProperty("ContentLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? ContentLength { get; set; } + + [Newtonsoft.Json.JsonProperty("ContentLocation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Uri ContentLocation { get; set; } + + [Newtonsoft.Json.JsonProperty("ContentMD5", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public byte[] ContentMD5 { get; set; } + + [Newtonsoft.Json.JsonProperty("ContentRange", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ContentRangeHeaderValue ContentRange { get; set; } + + [Newtonsoft.Json.JsonProperty("ContentType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public MediaTypeHeaderValue ContentType { get; set; } + + [Newtonsoft.Json.JsonProperty("Expires", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Expires { get; set; } + + [Newtonsoft.Json.JsonProperty("LastModified", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? LastModified { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class Anonymous3 + { + [Newtonsoft.Json.JsonProperty("Accept", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Accept { get; set; } + + [Newtonsoft.Json.JsonProperty("AcceptCharset", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection AcceptCharset { get; set; } + + [Newtonsoft.Json.JsonProperty("AcceptEncoding", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection AcceptEncoding { get; set; } + + [Newtonsoft.Json.JsonProperty("AcceptLanguage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection AcceptLanguage { get; set; } + + [Newtonsoft.Json.JsonProperty("Authorization", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public AuthenticationHeaderValue Authorization { get; set; } + + [Newtonsoft.Json.JsonProperty("Expect", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Expect { get; set; } + + [Newtonsoft.Json.JsonProperty("ExpectContinue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? ExpectContinue { get; set; } + + [Newtonsoft.Json.JsonProperty("From", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string From { get; set; } + + [Newtonsoft.Json.JsonProperty("Host", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Host { get; set; } + + [Newtonsoft.Json.JsonProperty("IfMatch", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection IfMatch { get; set; } + + [Newtonsoft.Json.JsonProperty("IfModifiedSince", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? IfModifiedSince { get; set; } + + [Newtonsoft.Json.JsonProperty("IfNoneMatch", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection IfNoneMatch { get; set; } + + [Newtonsoft.Json.JsonProperty("IfRange", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public RangeConditionHeaderValue IfRange { get; set; } + + [Newtonsoft.Json.JsonProperty("IfUnmodifiedSince", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? IfUnmodifiedSince { get; set; } + + [Newtonsoft.Json.JsonProperty("MaxForwards", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? MaxForwards { get; set; } + + [Newtonsoft.Json.JsonProperty("ProxyAuthorization", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public AuthenticationHeaderValue ProxyAuthorization { get; set; } + + [Newtonsoft.Json.JsonProperty("Range", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public RangeHeaderValue Range { get; set; } + + [Newtonsoft.Json.JsonProperty("Referrer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Uri Referrer { get; set; } + + [Newtonsoft.Json.JsonProperty("TE", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection TE { get; set; } + + [Newtonsoft.Json.JsonProperty("UserAgent", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection UserAgent { get; set; } + + [Newtonsoft.Json.JsonProperty("CacheControl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CacheControlHeaderValue CacheControl { get; set; } + + [Newtonsoft.Json.JsonProperty("Connection", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Connection { get; set; } + + [Newtonsoft.Json.JsonProperty("ConnectionClose", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? ConnectionClose { get; set; } + + [Newtonsoft.Json.JsonProperty("Date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Date { get; set; } + + [Newtonsoft.Json.JsonProperty("Pragma", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Pragma { get; set; } + + [Newtonsoft.Json.JsonProperty("Trailer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Trailer { get; set; } + + [Newtonsoft.Json.JsonProperty("TransferEncoding", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection TransferEncoding { get; set; } + + [Newtonsoft.Json.JsonProperty("TransferEncodingChunked", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? TransferEncodingChunked { get; set; } + + [Newtonsoft.Json.JsonProperty("Upgrade", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Upgrade { get; set; } + + [Newtonsoft.Json.JsonProperty("Via", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Via { get; set; } + + [Newtonsoft.Json.JsonProperty("Warning", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Warning { get; set; } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.1.5.0 (Newtonsoft.Json v11.0.0.0)")] + public partial class Extensions + { + private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties; } + set { _additionalProperties = value; } + } + + + } + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.2.3.0 (NJsonSchema v10.1.5.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class FileResponse : System.IDisposable + { + private System.IDisposable _client; + private System.IDisposable _response; + + public int StatusCode { get; private set; } + + public System.Collections.Generic.IReadOnlyDictionary> Headers { get; private set; } + + public System.IO.Stream Stream { get; private set; } + + public bool IsPartial + { + get { return StatusCode == 206; } + } + + public FileResponse(int statusCode, System.Collections.Generic.IReadOnlyDictionary> headers, System.IO.Stream stream, System.IDisposable client, System.IDisposable response) + { + StatusCode = statusCode; + Headers = headers; + Stream = stream; + _client = client; + _response = response; + } + + public void Dispose() + { + if (Stream != null) + Stream.Dispose(); + if (_response != null) + _response.Dispose(); + if (_client != null) + _client.Dispose(); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.2.3.0 (NJsonSchema v10.1.5.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class ApiException : System.Exception + { + public int StatusCode { get; private set; } + + public string Response { get; private set; } + + public System.Collections.Generic.IReadOnlyDictionary> Headers { get; private set; } + + public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Exception innerException) + : base(message + "\n\nStatus: " + statusCode + "\nResponse: \n" + response.Substring(0, response.Length >= 512 ? 512 : response.Length), innerException) + { + StatusCode = statusCode; + Response = response; + Headers = headers; + } + + public override string ToString() + { + return string.Format("HTTP Response: \n\n{0}\n\n{1}", Response, base.ToString()); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.2.3.0 (NJsonSchema v10.1.5.0 (Newtonsoft.Json v11.0.0.0))")] + public partial class ApiException : ApiException + { + public TResult Result { get; private set; } + + public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, TResult result, System.Exception innerException) + : base(message, statusCode, response, headers, innerException) + { + Result = result; + } + } + +} + +#pragma warning restore 1591 +#pragma warning restore 1573 +#pragma warning restore 472 +#pragma warning restore 114 +#pragma warning restore 108 \ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/packages.config b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/packages.config index 71553e4ac..dcc862688 100644 --- a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/packages.config +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/packages.config @@ -1,5 +1,8 @@  + + + \ No newline at end of file diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Web/LoginRequest.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/LoginRequest.cs new file mode 100644 index 000000000..4a68fe3ab --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/LoginRequest.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Web +{ + public class LoginRequest + { + public String Email { get; set; } + public String Password { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Web/LoginResponse.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/LoginResponse.cs new file mode 100644 index 000000000..5c70d85b9 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/LoginResponse.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DataStore.Web +{ + public class LoginResponse + { + public String Token { get; set; } + public DateTime ExpirationUTC { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.Web/Tango.DataStore.Web.csproj b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/Tango.DataStore.Web.csproj index ac4e4a6f8..9233a050b 100644 --- a/Software/Visual_Studio/DataStore/Tango.DataStore.Web/Tango.DataStore.Web.csproj +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.Web/Tango.DataStore.Web.csproj @@ -52,6 +52,8 @@ + + diff --git a/Software/Visual_Studio/Tango.Web/Controllers/TangoController.cs b/Software/Visual_Studio/Tango.Web/Controllers/TangoController.cs index b3df0373e..0f69bf570 100644 --- a/Software/Visual_Studio/Tango.Web/Controllers/TangoController.cs +++ b/Software/Visual_Studio/Tango.Web/Controllers/TangoController.cs @@ -60,6 +60,7 @@ namespace Tango.Web.Controllers LogManager.Log(ex, $"An error occurred while processing the request message on {controllerName + "/" + actionName}."); HttpStatusCode code = HttpStatusCode.InternalServerError; + HttpResponseException httpException = null; if (ex is ArgumentException || ex is InvalidDataException) { @@ -69,8 +70,18 @@ namespace Tango.Web.Controllers { code = HttpStatusCode.Unauthorized; } - - var httpException = new HttpResponseException(Request.CreateErrorResponse(code, ex.FlattenMessage(), ex)); + else if (ex is KeyNotFoundException) + { + code = HttpStatusCode.NotFound; + } + else if (ex is HttpResponseException httpResponseException) + { + httpException = httpResponseException; + } + else + { + httpException = new HttpResponseException(Request.CreateErrorResponse(code, ex.FlattenMessage(), ex)); + } #if DEBUG throw httpException; diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/DataStoreController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/DataStoreController.cs index f0dc0f2ba..0d35bd776 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/DataStoreController.cs +++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/DataStoreController.cs @@ -3,17 +3,36 @@ using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; +using System.Security.Authentication; using System.Web.Http; +using Tango.BL.Builders; using Tango.BL.Entities; +using Tango.BL.Enumerations; +using Tango.Core.Cryptography; using Tango.DataStore; using Tango.DataStore.EF; using Tango.DataStore.Web; +using Tango.MachineService.Filters; +using Tango.Web.Controllers; using Tango.Web.Helpers; +using Tango.Web.Security; +using static Tango.MachineService.Controllers.DataStoreController; namespace Tango.MachineService.Controllers { - public class DataStoreController : ApiController + public class DataStoreController : TangoController { + public class TokenObject + { + public String UserGuid { get; set; } + public List Permissions { get; set; } + + public TokenObject() + { + Permissions = new List(); + } + } + private IDataStoreManager _manager; public DataStoreController() @@ -21,10 +40,57 @@ namespace Tango.MachineService.Controllers _manager = new EFDataStoreManager(); } + [HttpPost] + public LoginResponse Login(LoginRequest request) + { + User user = null; + + IHashGenerator hash = new BasicHashGenerator(); + var password = hash.Encrypt(request.Password); + + using (var db = ObservablesContextHelper.CreateContext()) + { + user = new UserBuilder(db).Set(x => x.Email.ToLower() == request.Email.ToLower() && x.Password == password).WithRolesAndPermissions().WithDeleted().Build(); + + if (user == null) + { + throw new AuthenticationException("Invalid email or password."); + } + + if (user.Deleted) + { + throw new AuthenticationException("Your account has been disabled. Please contact your administrator."); + } + + var token = WebToken.CreateNew(MachineServiceConfig.JWT_TOKEN_SECRET, new TokenObject() + { + UserGuid = user.Guid, + Permissions = user.Permissions.Select(x => (Permissions)x.Code).ToList() + }, DateTime.UtcNow.AddDays(1)); + + return new LoginResponse() + { + Token = token.AccessToken, + ExpirationUTC = token.Expiration.Value, + }; + } + } + + [JwtWebApiTokenFilter] public List Get(String sn = null, String collection = null, String key = null) { try { + if (!RequestToken.Object.Permissions.Contains(Permissions.FSE_DataStoreRead)) + { + throw CreateHttpException(new AuthenticationException("The current user was not authorized to read from the data store."), HttpStatusCode.Unauthorized); + } + + if (key != null && collection == null) + { + throw CreateHttpException(new ArgumentException(), HttpStatusCode.BadRequest, "When specifying a key, collection must be specified."); + } + ValidateCollectionAndKey(collection, key); using (var db = ObservablesContextHelper.CreateContext()) @@ -35,12 +101,17 @@ namespace Tango.MachineService.Controllers if (machineGuid == null) { - return ThrowException>(new KeyNotFoundException(), HttpStatusCode.NotFound, "The specified machine serial number could not be found."); + throw CreateHttpException(new KeyNotFoundException(), HttpStatusCode.NotFound, "The specified machine serial number could not be found."); } var localItems = db.DataStoreItems.Where(x => !x.IsDeleted).Where(x => x.MachineGuid == machineGuid && (collection == null || x.CollectionName == collection) && (key == null || x.Key == key)).ToList(); var globalItems = db.GlobalDataStoreItems.Where(x => (collection == null || x.CollectionName == collection) && (key == null || x.Key == key)).ToList(); + if (localItems.Count == 0 && globalItems.Count == 0 && key != null) + { + throw CreateHttpException(new KeyNotFoundException(), HttpStatusCode.NotFound, "The specified key was not found on the data store."); + } + List finalList = new List(); foreach (var localItem in localItems) @@ -64,16 +135,31 @@ namespace Tango.MachineService.Controllers } } } + catch (HttpResponseException ex) + { + throw ex; + } catch (Exception ex) { - return ThrowException>(ex, HttpStatusCode.InternalServerError, ex.FlattenMessage()); + throw CreateHttpException(ex, HttpStatusCode.InternalServerError); } } + [JwtWebApiTokenFilter] public void Put([FromBody]DataStoreWebPutItem item) { try { + if (!RequestToken.Object.Permissions.Contains(Permissions.FSE_DataStoreWrite)) + { + throw CreateHttpException(new AuthenticationException("The current user was not authorized to write to the data store."), HttpStatusCode.BadRequest); + } + + if (item.Collection == null || item.Key == null) + { + throw CreateHttpException(new AuthenticationException("Collection and key must be specified."), HttpStatusCode.BadRequest); + } + ValidateCollectionAndKey(item.Collection, item.Key); using (var db = ObservablesContextHelper.CreateContext()) @@ -84,13 +170,18 @@ namespace Tango.MachineService.Controllers if (machineGuid == null) { - ThrowException>(new KeyNotFoundException(), HttpStatusCode.NotFound, "The specified machine serial number could not be found."); + throw CreateHttpException(new KeyNotFoundException("The specified machine serial number could not be found."), HttpStatusCode.NotFound); } DataStoreItem dbItem = db.DataStoreItems.FirstOrDefault(x => x.CollectionName == item.Collection && x.Key == item.Key); if (dbItem == null) { + if (!RequestToken.Object.Permissions.Contains(Permissions.FSE_DataStoreCreate)) + { + throw CreateHttpException(new AuthenticationException("The current user was not authorized to create new items on the data store."), HttpStatusCode.Unauthorized); + } + dbItem = new DataStoreItem(); dbItem.Key = item.Key; dbItem.CollectionName = item.Collection; @@ -110,6 +201,11 @@ namespace Tango.MachineService.Controllers if (dbItem == null) { + if (!RequestToken.Object.Permissions.Contains(Permissions.FSE_DataStoreCreate)) + { + throw CreateHttpException(new AuthenticationException("The current user was not authorized to create new items on the data store."), HttpStatusCode.Unauthorized); + } + dbItem = new GlobalDataStoreItem(); dbItem.Key = item.Key; dbItem.CollectionName = item.Collection; @@ -124,15 +220,19 @@ namespace Tango.MachineService.Controllers db.SaveChanges(); } } + catch (HttpResponseException ex) + { + throw ex; + } catch (Exception ex) { - ThrowException>(ex, HttpStatusCode.InternalServerError, ex.FlattenMessage()); + throw CreateHttpException(ex, HttpStatusCode.InternalServerError); } } - private T ThrowException(Exception ex, HttpStatusCode code, String message = null) + private HttpResponseException CreateHttpException(Exception ex, HttpStatusCode code, String message = null) { - throw new HttpResponseException(new HttpResponseMessage(code) + return new HttpResponseException(new HttpResponseMessage(code) { Content = new StringContent(message != null ? message : ex.Message), ReasonPhrase = ex.FlattenMessage() diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Filters/JwtWebApiTokenFilter.cs b/Software/Visual_Studio/Web/Tango.MachineService/Filters/JwtWebApiTokenFilter.cs new file mode 100644 index 000000000..89169fc48 --- /dev/null +++ b/Software/Visual_Studio/Web/Tango.MachineService/Filters/JwtWebApiTokenFilter.cs @@ -0,0 +1,72 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Security.Authentication; +using System.Web; +using System.Web.Http; +using System.Web.Http.Controllers; +using System.Web.Http.Filters; +using Tango.Transport.Web; +using Tango.Web.Security; + +namespace Tango.MachineService.Filters +{ + public class JwtWebApiTokenFilter : ActionFilterAttribute + { + public bool AllowExpired { get; private set; } + + public JwtWebApiTokenFilter() + { + + } + + public JwtWebApiTokenFilter(bool allowExpired) + { + AllowExpired = allowExpired; + } + + public override void OnActionExecuting(HttpActionContext actionContext) + { + try + { + var authorizationHeader = actionContext.Request.Headers.Authorization; + + if (authorizationHeader != null && authorizationHeader.Parameter != null) + { + try + { + WebToken.Validate(MachineServiceConfig.JWT_TOKEN_SECRET, authorizationHeader.Parameter); + } + catch (JWT.TokenExpiredException) + { + if (!AllowExpired) + { + throw new TokenExpiredException("Token expired."); + } + } + catch (JWT.SignatureVerificationException) + { + throw new InvalidTokenException("Invalid token."); + } + } + else + { + throw new AuthenticationException("No token specified."); + } + } + catch (Exception ex) + { + throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.Unauthorized) + { + Content = new StringContent(ex.Message), + ReasonPhrase = ex.FlattenMessage() + }); + } + + base.OnActionExecuting(actionContext); + } + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Nswag/DataStoreClient.nswag b/Software/Visual_Studio/Web/Tango.MachineService/Nswag/DataStoreClient.nswag new file mode 100644 index 000000000..c7aeb10a3 --- /dev/null +++ b/Software/Visual_Studio/Web/Tango.MachineService/Nswag/DataStoreClient.nswag @@ -0,0 +1,140 @@ +{ + "runtime": "Default", + "defaultVariables": "", + "documentGenerator": { + "webApiToOpenApi": { + "controllerNames": [ + "Tango.MachineService.Controllers.DataStoreController" + ], + "isAspNetCore": false, + "resolveJsonOptions": false, + "defaultUrlTemplate": "api/{controller}/{action}", + "addMissingPathParameters": false, + "includedVersions": null, + "defaultPropertyNameHandling": "Default", + "defaultReferenceTypeNullHandling": "Null", + "defaultDictionaryValueReferenceTypeNullHandling": "NotNull", + "defaultResponseReferenceTypeNullHandling": "NotNull", + "defaultEnumHandling": "Integer", + "flattenInheritanceHierarchy": false, + "generateKnownTypes": true, + "generateEnumMappingDescription": false, + "generateXmlObjects": false, + "generateAbstractProperties": false, + "generateAbstractSchemas": true, + "ignoreObsoleteProperties": false, + "allowReferencesWithProperties": false, + "excludedTypeNames": [], + "serviceHost": null, + "serviceBasePath": null, + "serviceSchemes": [], + "infoTitle": "My Title", + "infoDescription": null, + "infoVersion": "1.0.0", + "documentTemplate": null, + "documentProcessorTypes": [], + "operationProcessorTypes": [], + "typeNameGeneratorType": null, + "schemaNameGeneratorType": null, + "contractResolverType": null, + "serializerSettingsType": null, + "useDocumentProvider": true, + "documentName": "v1", + "aspNetCoreEnvironment": null, + "createWebHostBuilderMethod": null, + "startupType": null, + "allowNullableBodyParameters": true, + "output": null, + "outputType": "Swagger2", + "assemblyPaths": [ + "$(assembly)" + ], + "assemblyConfig": null, + "referencePaths": [], + "useNuGetCache": false + } + }, + "codeGenerators": { + "openApiToCSharpClient": { + "clientBaseClass": null, + "configurationClass": null, + "generateClientClasses": true, + "generateClientInterfaces": false, + "injectHttpClient": true, + "disposeHttpClient": true, + "protectedMethods": [], + "generateExceptionClasses": true, + "exceptionClass": "ApiException", + "wrapDtoExceptions": true, + "useHttpClientCreationMethod": false, + "httpClientType": "System.Net.Http.HttpClient", + "useHttpRequestMessageCreationMethod": false, + "useBaseUrl": true, + "generateBaseUrlProperty": true, + "generateSyncMethods": true, + "exposeJsonSerializerSettings": false, + "clientClassAccessModifier": "public", + "typeAccessModifier": "public", + "generateContractsOutput": false, + "contractsNamespace": null, + "contractsOutputFilePath": null, + "parameterDateTimeFormat": "s", + "parameterDateFormat": "yyyy-MM-dd", + "generateUpdateJsonSerializerSettingsMethod": true, + "useRequestAndResponseSerializationSettings": false, + "serializeTypeInformation": false, + "queryNullValue": "", + "className": "DataStoreClient", + "operationGenerationMode": "MultipleClientsFromOperationId", + "additionalNamespaceUsages": [], + "additionalContractNamespaceUsages": [], + "generateOptionalParameters": false, + "generateJsonMethods": false, + "enforceFlagEnums": false, + "parameterArrayType": "System.Collections.Generic.IEnumerable", + "parameterDictionaryType": "System.Collections.Generic.IDictionary", + "responseArrayType": "System.Collections.Generic.ICollection", + "responseDictionaryType": "System.Collections.Generic.IDictionary", + "wrapResponses": false, + "wrapResponseMethods": [], + "generateResponseClasses": true, + "responseClass": "SwaggerResponse", + "namespace": "Tango.DataStore.Web", + "requiredPropertiesMustBeDefined": true, + "dateType": "System.DateTimeOffset", + "jsonConverters": null, + "anyType": "object", + "dateTimeType": "System.DateTimeOffset", + "timeType": "System.TimeSpan", + "timeSpanType": "System.TimeSpan", + "arrayType": "System.Collections.Generic.ICollection", + "arrayInstanceType": "System.Collections.ObjectModel.Collection", + "dictionaryType": "System.Collections.Generic.IDictionary", + "dictionaryInstanceType": "System.Collections.Generic.Dictionary", + "arrayBaseType": "System.Collections.ObjectModel.Collection", + "dictionaryBaseType": "System.Collections.Generic.Dictionary", + "classStyle": "Poco", + "generateDefaultValues": true, + "generateDataAnnotations": true, + "excludedTypeNames": [], + "excludedParameterNames": [], + "handleReferences": false, + "generateImmutableArrayProperties": false, + "generateImmutableDictionaryProperties": false, + "jsonSerializerSettingsTransformationMethod": null, + "inlineNamedArrays": false, + "inlineNamedDictionaries": false, + "inlineNamedTuples": true, + "inlineNamedAny": false, + "generateDtoTypes": true, + "generateOptionalPropertiesAsNullable": false, + "templateDirectory": null, + "typeNameGeneratorType": null, + "propertyNameGeneratorType": null, + "enumNameGeneratorType": null, + "serviceHost": null, + "serviceSchemes": null, + "output": "$(output)" + } + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Tango.MachineService.csproj b/Software/Visual_Studio/Web/Tango.MachineService/Tango.MachineService.csproj index df4e346f6..bccd84cad 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService/Tango.MachineService.csproj +++ b/Software/Visual_Studio/Web/Tango.MachineService/Tango.MachineService.csproj @@ -322,6 +322,7 @@ + @@ -342,6 +343,7 @@ + -- cgit v1.3.1 From 466340a97f8a158570f84fc12238101ca9c124ec Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Thu, 19 Nov 2020 01:46:41 +0200 Subject: Data store improvements. Added line number to logs viewer. Added DataStore Create Write Global permission. Added FSE application path to "Path" environment variable for dsUtil. Completed dsUtil. --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 22675456 -> 22675456 bytes .../Advanced Installer Projects/FSE Installer.aip | 52 ++++++-- .../DataStore/Tango.DataStore.CLI/DataStoreUtil.cs | 131 +++++++++++++++++++++ .../Tango.DataStore.CLI/DataStoreUtilSettings.cs | 15 +++ .../DataStore/Tango.DataStore.CLI/Options.cs | 21 +++- .../DataStore/Tango.DataStore.CLI/Program.cs | 66 +---------- .../Tango.DataStore.CLI/Tango.DataStore.CLI.csproj | 6 + .../ViewModels/DataStoreViewVM.cs | 14 +-- .../ViewModels/MachineViewVM.cs | 2 +- .../Help/proc-doc.chm | Bin 245435 -> 245437 bytes .../Views/LogFileTabView.xaml | 5 +- .../FSE/Tango.FSE.UI/Properties/AssemblyInfo.cs | 3 +- .../FSE/Tango.FSE.UI/Tango.FSE.UI.csproj | 4 + .../Tango.BL/Enumerations/Permissions.cs | 12 +- .../Controllers/DataStoreController.cs | 20 +++- 16 files changed, 255 insertions(+), 96 deletions(-) create mode 100644 Software/Visual_Studio/DataStore/Tango.DataStore.CLI/DataStoreUtil.cs create mode 100644 Software/Visual_Studio/DataStore/Tango.DataStore.CLI/DataStoreUtilSettings.cs (limited to 'Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs') diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index b80bbc9b0..58fbcac47 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index b06dad7d5..981698cbd 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Visual_Studio/Advanced Installer Projects/FSE Installer.aip b/Software/Visual_Studio/Advanced Installer Projects/FSE Installer.aip index dc6557505..86a02fb0f 100644 --- a/Software/Visual_Studio/Advanced Installer Projects/FSE Installer.aip +++ b/Software/Visual_Studio/Advanced Installer Projects/FSE Installer.aip @@ -63,6 +63,8 @@ + + @@ -303,8 +305,10 @@ - - + + + + @@ -314,6 +318,7 @@ + @@ -361,6 +366,7 @@ + @@ -372,10 +378,10 @@ - - - - + + + + @@ -755,16 +761,27 @@ + + + + + + + + + + + + + + + + + - - - - - - @@ -927,6 +944,9 @@ + + + @@ -1246,13 +1266,19 @@ + - + + + + + + diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/DataStoreUtil.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/DataStoreUtil.cs new file mode 100644 index 000000000..b18476e3f --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/DataStoreUtil.cs @@ -0,0 +1,131 @@ +using ConsoleTables; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using Tango.Core.Cryptography; +using Tango.DataStore.Web; +using Tango.Settings; +using Tango.Web; + +namespace Tango.DataStore.CLI +{ + public class DataStoreConsole + { + public void Get(GetOptions options) + { + try + { + ApplyAutoLogin(options); + + if (options.MachineSerialNumber != null) + { + Console.WriteLine($"Retrieving data store values for '{options.MachineSerialNumber}'..."); + } + else + { + Console.WriteLine("Retrieving global data store values..."); + } + + var client = CreateClient(options.Email, options.Password, options.Environment); + + var items = client.Get(options.MachineSerialNumber, options.Collection, options.Key).ToList(); + + ConsoleTable table = new ConsoleTable("COLLECTION", "KEY", "DATA TYPE", "PROTO TYPE", "STATE", "GLOBAL", "LOCAL"); + + foreach (var item in items) + { + table.AddRow(item.Collection, item.Key, item.DataType, item.ProtoMessageType != MessageType.None ? item.ProtoMessageType.ToString() : null, item.Type, item.GlobalValue.ToStringSafe().ToOneLine(), item.LocalValue.ToStringSafe().ToOneLine()); + } + + Console.WriteLine(); + Console.WriteLine("DATA STORE RESULTS:"); + Console.WriteLine(); + + table.Write(); + } + catch (Exception ex) + { + Console.WriteLine(ex.FlattenMessage()); + } + } + + public void Put(PutOptions options) + { + try + { + ApplyAutoLogin(options); + + if (options.MachineSerialNumber != null) + { + Console.WriteLine($"Storing data store value for '{options.MachineSerialNumber}'..."); + } + else + { + Console.WriteLine("Storing global data store value..."); + } + + var client = CreateClient(options.Email, options.Password, options.Environment); + + if (options.DataType == Web.DataType.Proto) + { + options.Value = options.Value.ToStringOrEmpty().Replace("'", "\""); + } + + client.Put(new DataStoreWebPutItem() + { + Collection = options.Collection, + Key = options.Key, + DataType = options.DataType, + MachineSerialNumber = options.MachineSerialNumber, + ProtoMessageType = options.ProtoMessageType, + Value = options.Value + }); + + Console.WriteLine($"Item '{options.Key}' stored successfully."); + } + catch (Exception ex) + { + Console.WriteLine(ex.FlattenMessage()); + } + } + + public void AutoLogin(LoginConfig options) + { + MachineLevelCryptographer crypt = new MachineLevelCryptographer(); + var settings = SettingsManager.Default.GetOrCreate(); + settings.Email = options.Email; + settings.Password = crypt.Encrypt(options.Password); + settings.Save(); + } + + private void ApplyAutoLogin(OptionsBase options) + { + if (options.Email == null && options.Password == null) + { + MachineLevelCryptographer crypt = new MachineLevelCryptographer(); + var settings = SettingsManager.Default.GetOrCreate(); + options.Email = settings.Email; + options.Password = crypt.Decrypt(settings.Password); + } + } + + private DataStoreClient CreateClient(String email, String password, DeploymentSlot slot) + { + String token = String.Empty; + + HttpClient http = new HttpClient(); + DataStoreClient dsClient = new DataStoreClient(slot.ToAddress(), http); + var response = dsClient.Login(new LoginRequest() + { + Email = email, + Password = password, + }); + http.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", response.Token); + + return dsClient; + } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/DataStoreUtilSettings.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/DataStoreUtilSettings.cs new file mode 100644 index 000000000..58380d231 --- /dev/null +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/DataStoreUtilSettings.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Settings; + +namespace Tango.DataStore.CLI +{ + public class DataStoreUtilSettings : SettingsBase + { + public String Email { get; set; } + public String Password { get; set; } + } +} diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Options.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Options.cs index 150756671..fd91a5722 100644 --- a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Options.cs +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Options.cs @@ -4,16 +4,17 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Tango.DataStore.Web; using Tango.Web; namespace Tango.DataStore.CLI { public class OptionsBase { - [Option(longName: "email", HelpText = "Email address.", Required = true)] + [Option(longName: "email", HelpText = "Email address.")] public String Email { get; set; } - [Option(longName: "password", HelpText = "Password.", Required = true)] + [Option(longName: "password", HelpText = "Password.")] public String Password { get; set; } [Option(longName: "env", HelpText = "The target environment.", Required = true)] @@ -45,7 +46,23 @@ namespace Tango.DataStore.CLI [Option(longName: "key", HelpText = "New or existing item key", Required = true)] public String Key { get; set; } + [Option(longName: "data-type", HelpText = "Item data type", Required = true)] + public Web.DataType DataType { get; set; } + + [Option(longName: "proto-type", HelpText = "Protobuf message type when data-type is 'Proto'.")] + public MessageType ProtoMessageType { get; set; } + [Option(longName: "value", HelpText = "Item value", Required = true)] public String Value { get; set; } } + + [Verb("login-config", HelpText = "Stores the specified credentials for use with the --auto-login flag.")] + public class LoginConfig + { + [Option(longName: "email", HelpText = "Email address.")] + public String Email { get; set; } + + [Option(longName: "password", HelpText = "Password.")] + public String Password { get; set; } + } } diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs index db4f54620..85dfbb0bb 100644 --- a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Program.cs @@ -19,7 +19,7 @@ namespace Tango.DataStore.CLI { var console = new DataStoreConsole(); - var result = Parser.Default.ParseArguments(args) + var result = Parser.Default.ParseArguments(args) .WithParsed((options) => { console.Get(options); @@ -28,6 +28,10 @@ namespace Tango.DataStore.CLI { console.Put(options); }) + .WithParsed((options) => + { + console.AutoLogin(options); + }) .WithNotParsed((errors) => { @@ -41,64 +45,4 @@ namespace Tango.DataStore.CLI } } } - - public class DataStoreConsole - { - public void Get(GetOptions options) - { - try - { - if (options.MachineSerialNumber != null) - { - Console.WriteLine($"Retrieving data store values for '{options.MachineSerialNumber}'..."); - } - else - { - Console.WriteLine("Retrieving global data store values..."); - } - - var client = CreateClient(options.Email, options.Password, options.Environment); - - var items = client.Get(options.MachineSerialNumber, options.Collection, options.Key).ToList(); - - ConsoleTable table = new ConsoleTable("COLLECTION", "KEY", "DATA TYPE", "STATE", "GLOBAL", "LOCAL"); - - foreach (var item in items) - { - table.AddRow(item.Collection, item.Key, item.DataType, item.Type, item.GlobalValue.ToStringSafe().ToOneLine(), item.LocalValue.ToStringSafe().ToOneLine()); - } - - Console.WriteLine(); - Console.WriteLine("DATA STORE RESULTS:"); - Console.WriteLine(); - - table.Write(); - } - catch (Exception ex) - { - Console.WriteLine(ex.FlattenMessage()); - } - } - - public void Put(PutOptions options) - { - - } - - private DataStoreClient CreateClient(String email, String password, DeploymentSlot slot) - { - String token = String.Empty; - - HttpClient http = new HttpClient(); - DataStoreClient dsClient = new DataStoreClient(slot.ToAddress(), http); - var response = dsClient.Login(new LoginRequest() - { - Email = "roy@twine-s.com", - Password = "1Creativity", - }); - http.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", response.Token); - - return dsClient; - } - } } diff --git a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Tango.DataStore.CLI.csproj b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Tango.DataStore.CLI.csproj index 28aab4ef7..42b0b95dc 100644 --- a/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Tango.DataStore.CLI.csproj +++ b/Software/Visual_Studio/DataStore/Tango.DataStore.CLI/Tango.DataStore.CLI.csproj @@ -63,6 +63,8 @@ + + @@ -85,6 +87,10 @@ {e4927038-348d-4295-aaf4-861c58cb3943} Tango.PMR + + {d8f1ad85-526a-4f50-b6dc-d437af63d8d8} + Tango.Settings + {5001990f-977b-48ff-b217-0236a5022ad8} Tango.Web diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/ViewModels/DataStoreViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/ViewModels/DataStoreViewVM.cs index d8bd8791a..46f388461 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/ViewModels/DataStoreViewVM.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/ViewModels/DataStoreViewVM.cs @@ -114,7 +114,7 @@ namespace Tango.FSE.MachineConfiguration.ViewModels private async void EditItem(DataStoreItemModel item) { - if (!CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.FSE_DataStoreWrite)) + if (!CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.DataStoreWrite)) { await NotificationProvider.ShowError("The current user profile does not allow editing of the data store.\nPlease contact your administrator."); return; @@ -133,7 +133,7 @@ namespace Tango.FSE.MachineConfiguration.ViewModels private async void AddCollection() { - if (!CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.FSE_DataStoreCreate)) + if (!CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.DataStoreCreate)) { await NotificationProvider.ShowError("The current user profile does not allow creating new data store collections.\nPlease contact your administrator."); return; @@ -174,7 +174,7 @@ namespace Tango.FSE.MachineConfiguration.ViewModels private async void AddItem() { - if (!CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.FSE_DataStoreCreate)) + if (!CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.DataStoreCreate)) { await NotificationProvider.ShowError("The current user profile does not allow creating new data store items.\nPlease contact your administrator."); return; @@ -217,7 +217,7 @@ namespace Tango.FSE.MachineConfiguration.ViewModels private async void RemoveCollection(DataStoreCollectionModel collection) { - if (!CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.FSE_DataStoreCreate)) + if (!CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.DataStoreCreate)) { await NotificationProvider.ShowError("The current user profile does not allow deleting data store collections.\nPlease contact your administrator."); return; @@ -229,7 +229,7 @@ namespace Tango.FSE.MachineConfiguration.ViewModels private async void RemoveItem(DataStoreItemModel item) { - if (!CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.FSE_DataStoreCreate)) + if (!CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.DataStoreCreate)) { await NotificationProvider.ShowError("The current user profile does not allow deleting data store items.\nPlease contact your administrator."); return; @@ -263,7 +263,7 @@ namespace Tango.FSE.MachineConfiguration.ViewModels private async void SaveModel() { - if (!CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.FSE_DataStoreWrite)) + if (!CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.DataStoreWrite)) { await NotificationProvider.ShowError("The current user profile does not allow editing of the data store.\nPlease contact your administrator."); return; @@ -332,7 +332,7 @@ namespace Tango.FSE.MachineConfiguration.ViewModels { base.OnNavigatedTo(); - if (!CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.FSE_DataStoreRead)) + if (!CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.DataStoreRead)) { return; } diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/ViewModels/MachineViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/ViewModels/MachineViewVM.cs index dd2430415..fd953a0b8 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/ViewModels/MachineViewVM.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.MachineConfiguration/ViewModels/MachineViewVM.cs @@ -33,7 +33,7 @@ namespace Tango.FSE.MachineConfiguration.ViewModels { if (value == NavigationView.DataStoreView) { - if (!CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.FSE_DataStoreRead)) + if (!CurrentUser.HasPermission(Tango.BL.Enumerations.Permissions.DataStoreRead)) { Task.Delay(500).ContinueWith((x) => { diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures.Documentation/Help/proc-doc.chm b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures.Documentation/Help/proc-doc.chm index 8777b5768..ef7ec26c0 100644 Binary files a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures.Documentation/Help/proc-doc.chm and b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures.Documentation/Help/proc-doc.chm differ diff --git a/Software/Visual_Studio/FSE/Tango.FSE.LogViewer.UI/Views/LogFileTabView.xaml b/Software/Visual_Studio/FSE/Tango.FSE.LogViewer.UI/Views/LogFileTabView.xaml index 8f06dac0d..92064f9fd 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.LogViewer.UI/Views/LogFileTabView.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.LogViewer.UI/Views/LogFileTabView.xaml @@ -16,7 +16,7 @@ Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}"> - + @@ -24,6 +24,7 @@ + @@ -34,7 +35,7 @@ - + diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/Properties/AssemblyInfo.cs index fa70e630e..964eb990b 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Properties/AssemblyInfo.cs @@ -8,5 +8,4 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Tango FSE")] -[assembly: AssemblyVersion("1.1.1.0")] - +[assembly: AssemblyVersion("1.1.1.0")] diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tango.FSE.UI.csproj b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tango.FSE.UI.csproj index 4b4d46a78..2a79629a3 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tango.FSE.UI.csproj +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tango.FSE.UI.csproj @@ -601,6 +601,10 @@ + + {6189b8c3-7af9-43dd-8a61-a8a05f526f62} + Tango.DataStore.CLI + {208C8BD8-72C6-4E3C-ACAA-351091A2ACC7} Tango.PPC.Shared diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/Permissions.cs b/Software/Visual_Studio/Tango.BL/Enumerations/Permissions.cs index 5bf6095f5..51e98f6f4 100644 --- a/Software/Visual_Studio/Tango.BL/Enumerations/Permissions.cs +++ b/Software/Visual_Studio/Tango.BL/Enumerations/Permissions.cs @@ -305,19 +305,19 @@ namespace Tango.BL.Enumerations /// (Allows viewing data store items) /// [Description("Allows viewing data store items")] - FSE_DataStoreRead = 1026, + DataStoreRead = 1026, /// /// (Allows writing to data store items) /// [Description("Allows writing to data store items")] - FSE_DataStoreWrite = 1027, + DataStoreWrite = 1027, /// /// (Allows creating data store items and collections) /// [Description("Allows creating data store items and collections")] - FSE_DataStoreCreate = 1028, + DataStoreCreate = 1028, /// /// (Allows resetting the machine counters) @@ -331,5 +331,11 @@ namespace Tango.BL.Enumerations [Description("Allows resetting the machine device registration")] FSE_ResetMachineDeviceRegistration = 1030, + /// + /// (Allows creating creating and editing the global data store) + /// + [Description("Allows creating creating and editing the global data store")] + DataStoreCreateWriteGlobal = 1031, + } } diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/DataStoreController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/DataStoreController.cs index 0d35bd776..383a59850 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/DataStoreController.cs +++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/DataStoreController.cs @@ -62,6 +62,11 @@ namespace Tango.MachineService.Controllers throw new AuthenticationException("Your account has been disabled. Please contact your administrator."); } + if (!user.HasPermission(Permissions.DataStoreRead)) + { + throw new AuthenticationException("You are not authorized to access the data store."); + } + var token = WebToken.CreateNew(MachineServiceConfig.JWT_TOKEN_SECRET, new TokenObject() { UserGuid = user.Guid, @@ -81,7 +86,7 @@ namespace Tango.MachineService.Controllers { try { - if (!RequestToken.Object.Permissions.Contains(Permissions.FSE_DataStoreRead)) + if (!RequestToken.Object.Permissions.Contains(Permissions.DataStoreRead)) { throw CreateHttpException(new AuthenticationException("The current user was not authorized to read from the data store."), HttpStatusCode.Unauthorized); } @@ -150,9 +155,9 @@ namespace Tango.MachineService.Controllers { try { - if (!RequestToken.Object.Permissions.Contains(Permissions.FSE_DataStoreWrite)) + if (!RequestToken.Object.Permissions.Contains(Permissions.DataStoreWrite)) { - throw CreateHttpException(new AuthenticationException("The current user was not authorized to write to the data store."), HttpStatusCode.BadRequest); + throw CreateHttpException(new AuthenticationException("The current user was not authorized to write to the data store."), HttpStatusCode.Unauthorized); } if (item.Collection == null || item.Key == null) @@ -177,7 +182,7 @@ namespace Tango.MachineService.Controllers if (dbItem == null) { - if (!RequestToken.Object.Permissions.Contains(Permissions.FSE_DataStoreCreate)) + if (!RequestToken.Object.Permissions.Contains(Permissions.DataStoreCreate)) { throw CreateHttpException(new AuthenticationException("The current user was not authorized to create new items on the data store."), HttpStatusCode.Unauthorized); } @@ -197,11 +202,16 @@ namespace Tango.MachineService.Controllers } else { + if (!RequestToken.Object.Permissions.Contains(Permissions.DataStoreCreateWriteGlobal)) + { + throw CreateHttpException(new AuthenticationException("The current user was not authorized to write to the global data store."), HttpStatusCode.Unauthorized); + } + GlobalDataStoreItem dbItem = db.GlobalDataStoreItems.FirstOrDefault(x => x.CollectionName == item.Collection && x.Key == item.Key); if (dbItem == null) { - if (!RequestToken.Object.Permissions.Contains(Permissions.FSE_DataStoreCreate)) + if (!RequestToken.Object.Permissions.Contains(Permissions.DataStoreCreate)) { throw CreateHttpException(new AuthenticationException("The current user was not authorized to create new items on the data store."), HttpStatusCode.Unauthorized); } -- cgit v1.3.1