From 5d6d04b9a08f764e215136c4afbbda5259bdc417 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 13 Aug 2019 13:26:34 +0200 Subject: [PATCH 01/85] stage --- src/Elasticsearch.sln | 7 ++ src/Tests/Tests.Yaml/Class1.cs | 15 +++ src/Tests/Tests.Yaml/RestSpecDownloader.cs | 107 +++++++++++++++++++++ src/Tests/Tests.Yaml/Tests.Yaml.csproj | 17 ++++ 4 files changed, 146 insertions(+) create mode 100644 src/Tests/Tests.Yaml/Class1.cs create mode 100644 src/Tests/Tests.Yaml/RestSpecDownloader.cs create mode 100644 src/Tests/Tests.Yaml/Tests.Yaml.csproj diff --git a/src/Elasticsearch.sln b/src/Elasticsearch.sln index c764c456737..65de0ff8b7f 100644 --- a/src/Elasticsearch.sln +++ b/src/Elasticsearch.sln @@ -83,6 +83,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Examples", "Examples\Exampl EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExamplesGenerator", "Examples\ExamplesGenerator\ExamplesGenerator.csproj", "{78B04D5D-FBB1-4E4D-B484-45953B9480C8}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.Yaml", "Tests\Tests.Yaml\Tests.Yaml.csproj", "{4A35665D-83E8-49E0-AD99-7573606DD78A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -112,6 +114,7 @@ Global {BA4C7FC9-13AD-4632-9A51-FAAD376E70BE} = {14241027-0A92-466D-B024-E0063F338915} {27BFE628-6BE9-48E7-891F-E228DBF0E294} = {40A4ECFA-F8A7-4560-861E-0B8A1DE1C49D} {78B04D5D-FBB1-4E4D-B484-45953B9480C8} = {40A4ECFA-F8A7-4560-861E-0B8A1DE1C49D} + {4A35665D-83E8-49E0-AD99-7573606DD78A} = {6C4A2627-AF22-4388-9DF7-7A9AEACFD635} EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {5B393962-7586-49BA-BD99-3B1E35F48E94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU @@ -182,5 +185,9 @@ Global {78B04D5D-FBB1-4E4D-B484-45953B9480C8}.Debug|Any CPU.Build.0 = Debug|Any CPU {78B04D5D-FBB1-4E4D-B484-45953B9480C8}.Release|Any CPU.ActiveCfg = Release|Any CPU {78B04D5D-FBB1-4E4D-B484-45953B9480C8}.Release|Any CPU.Build.0 = Release|Any CPU + {4A35665D-83E8-49E0-AD99-7573606DD78A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A35665D-83E8-49E0-AD99-7573606DD78A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A35665D-83E8-49E0-AD99-7573606DD78A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A35665D-83E8-49E0-AD99-7573606DD78A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/src/Tests/Tests.Yaml/Class1.cs b/src/Tests/Tests.Yaml/Class1.cs new file mode 100644 index 00000000000..5b9be43e228 --- /dev/null +++ b/src/Tests/Tests.Yaml/Class1.cs @@ -0,0 +1,15 @@ +using System; +using System.Threading.Tasks; + +namespace Tests.Yaml +{ + + public static class Program + { + public static async Task Main() + { + + } + } + +} diff --git a/src/Tests/Tests.Yaml/RestSpecDownloader.cs b/src/Tests/Tests.Yaml/RestSpecDownloader.cs new file mode 100644 index 00000000000..5e7c2ff2569 --- /dev/null +++ b/src/Tests/Tests.Yaml/RestSpecDownloader.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using ShellProgressBar; + +namespace Tests.Yaml +{ + public class RestSpecDownloader + { + private static readonly ProgressBarOptions MainProgressBarOptions = new ProgressBarOptions { BackgroundColor = ConsoleColor.DarkGray }; + + private static readonly Dictionary OnlineSpecifications = new Dictionary + { + { "Core", "https://github.com/elastic/elasticsearch/tree/{version}/rest-api-spec/src/main/resources/rest-api-spec/api" }, + { "XPack", "https://github.com/elastic/elasticsearch/tree/{version}/x-pack/plugin/src/test/resources/rest-api-spec/api"} + }; + + private static readonly ProgressBarOptions SubProgressBarOptions = new ProgressBarOptions + { + ForegroundColor = ConsoleColor.Cyan, + ForegroundColorDone = ConsoleColor.DarkGreen, + ProgressCharacter = '─', + BackgroundColor = ConsoleColor.DarkGray, + }; + + private RestSpecDownloader(string branch) + { + var specifications = + (from kv in OnlineSpecifications + let url = kv.Value.Replace("{version}", branch) + select new Specification { FolderOnDisk = kv.Key, Branch = branch, GithubListingUrl = url }).ToList(); + + using (var pbar = new ProgressBar(specifications.Count, "Downloading specifications", MainProgressBarOptions)) + { + foreach (var spec in specifications) + { + pbar.Message = $"Downloading rest-api-spec to {spec.FolderOnDisk} for branch {branch}"; + DownloadJsonDefinitions(spec, pbar); + pbar.Tick($"Downloaded rest-api-spec to {spec.FolderOnDisk} for branch {branch}"); + } + } + + File.WriteAllText(GeneratorLocations.LastDownloadedVersionFile, branch); + } + + public static RestSpecDownloader Download(string branch) => new RestSpecDownloader(branch); + + private void DownloadJsonDefinitions(Specification spec, IProgressBar pbar) + { + using (var client = new WebClient()) + { + var html = client.DownloadString(spec.GithubListingUrl); + FindJsonFilesOnListing(spec, html, pbar); + } + } + + private void FindJsonFilesOnListing(Specification spec, string html, IProgressBar pbar) + { + if (!Directory.Exists(GeneratorLocations.RestSpecificationFolder)) + Directory.CreateDirectory(GeneratorLocations.RestSpecificationFolder); + + var dom = CQ.Create(html); + + WriteToEndpointsFolder(spec.FolderOnDisk, "root.html", html); + + var endpoints = dom[".js-navigation-open"] + .Select(s => s.InnerText) + .Where(s => !string.IsNullOrEmpty(s) && s.EndsWith(".json")) + .ToList(); + + using (var subBar = pbar.Spawn(endpoints.Count, "fetching individual json files", SubProgressBarOptions)) + endpoints.ForEach(s => WriteEndpointFile(spec, s, subBar)); + } + + private void WriteEndpointFile(Specification spec, string s, IProgressBar pbar) + { + var rawFile = spec.GithubDownloadUrl(s); + using (var client = new WebClient()) + { + var fileName = rawFile.Split('/').Last(); + var json = client.DownloadString(rawFile); + WriteToEndpointsFolder(spec.FolderOnDisk, fileName, json); + pbar.Tick($"Downloading {fileName}"); + } + } + + private void WriteToEndpointsFolder(string folder, string filename, string contents) + { + var f = Path.Combine(GeneratorLocations.RestSpecificationFolder, folder); + if (!Directory.Exists(f)) Directory.CreateDirectory(f); + File.WriteAllText(f + "\\" + filename, contents); + } + + private class Specification + { + // ReSharper disable once UnusedAutoPropertyAccessor.Local + public string Branch { get; set; } + public string FolderOnDisk { get; set; } + public string GithubListingUrl { get; set; } + + public string GithubDownloadUrl(string file) => + GithubListingUrl.Replace("github.com", "raw.githubusercontent.com").Replace("tree/", "") + "/" + file; + } + } +} diff --git a/src/Tests/Tests.Yaml/Tests.Yaml.csproj b/src/Tests/Tests.Yaml/Tests.Yaml.csproj new file mode 100644 index 00000000000..e81a75e17cc --- /dev/null +++ b/src/Tests/Tests.Yaml/Tests.Yaml.csproj @@ -0,0 +1,17 @@ + + + + netcoreapp2.2 + Exe + True + latest + + + + + + + + + + From d782565aa4c5dc4cafe80f9028687eca25d5a98b Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Wed, 21 Aug 2019 16:10:45 +0200 Subject: [PATCH 02/85] stage --- build/scripts/scripts.fsproj | 3 +- .../ApiGenerator/ApiGenerator.csproj | 2 +- src/Elasticsearch.sln | 7 ++ src/Tests/Tests.Yaml/Class1.cs | 45 ++++++++++++ src/Tests/Tests.Yaml/GeneratorLocations.cs | 33 +++++++++ src/Tests/Tests.Yaml/Tests.Yaml.csproj | 3 +- ...pecDownloader.cs => YamlTestDownloader.cs} | 23 ++++--- src/Tests/Tests.YamlRunner/Program.fs | 68 +++++++++++++++++++ .../Tests.YamlRunner/Tests.YamlRunner.fsproj | 18 +++++ 9 files changed, 188 insertions(+), 14 deletions(-) create mode 100644 src/Tests/Tests.Yaml/GeneratorLocations.cs rename src/Tests/Tests.Yaml/{RestSpecDownloader.cs => YamlTestDownloader.cs} (80%) create mode 100644 src/Tests/Tests.YamlRunner/Program.fs create mode 100644 src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj diff --git a/build/scripts/scripts.fsproj b/build/scripts/scripts.fsproj index dfcf42806ee..da63857208c 100644 --- a/build/scripts/scripts.fsproj +++ b/build/scripts/scripts.fsproj @@ -30,6 +30,8 @@ azure-pipelines.yml + + @@ -37,7 +39,6 @@ - diff --git a/src/CodeGeneration/ApiGenerator/ApiGenerator.csproj b/src/CodeGeneration/ApiGenerator/ApiGenerator.csproj index 9b59df0f9d1..2e557634437 100644 --- a/src/CodeGeneration/ApiGenerator/ApiGenerator.csproj +++ b/src/CodeGeneration/ApiGenerator/ApiGenerator.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/Elasticsearch.sln b/src/Elasticsearch.sln index 65de0ff8b7f..a5790ca43ec 100644 --- a/src/Elasticsearch.sln +++ b/src/Elasticsearch.sln @@ -85,6 +85,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExamplesGenerator", "Exampl EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.Yaml", "Tests\Tests.Yaml\Tests.Yaml.csproj", "{4A35665D-83E8-49E0-AD99-7573606DD78A}" EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Tests.YamlRunner", "Tests\Tests.YamlRunner\Tests.YamlRunner.fsproj", "{81473437-5722-4829-A5CD-125B17CCA238}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -115,6 +117,7 @@ Global {27BFE628-6BE9-48E7-891F-E228DBF0E294} = {40A4ECFA-F8A7-4560-861E-0B8A1DE1C49D} {78B04D5D-FBB1-4E4D-B484-45953B9480C8} = {40A4ECFA-F8A7-4560-861E-0B8A1DE1C49D} {4A35665D-83E8-49E0-AD99-7573606DD78A} = {6C4A2627-AF22-4388-9DF7-7A9AEACFD635} + {81473437-5722-4829-A5CD-125B17CCA238} = {6C4A2627-AF22-4388-9DF7-7A9AEACFD635} EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {5B393962-7586-49BA-BD99-3B1E35F48E94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU @@ -189,5 +192,9 @@ Global {4A35665D-83E8-49E0-AD99-7573606DD78A}.Debug|Any CPU.Build.0 = Debug|Any CPU {4A35665D-83E8-49E0-AD99-7573606DD78A}.Release|Any CPU.ActiveCfg = Release|Any CPU {4A35665D-83E8-49E0-AD99-7573606DD78A}.Release|Any CPU.Build.0 = Release|Any CPU + {81473437-5722-4829-A5CD-125B17CCA238}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {81473437-5722-4829-A5CD-125B17CCA238}.Debug|Any CPU.Build.0 = Debug|Any CPU + {81473437-5722-4829-A5CD-125B17CCA238}.Release|Any CPU.ActiveCfg = Release|Any CPU + {81473437-5722-4829-A5CD-125B17CCA238}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/src/Tests/Tests.Yaml/Class1.cs b/src/Tests/Tests.Yaml/Class1.cs index 5b9be43e228..b62e2531852 100644 --- a/src/Tests/Tests.Yaml/Class1.cs +++ b/src/Tests/Tests.Yaml/Class1.cs @@ -1,4 +1,5 @@ using System; +using System.IO; using System.Threading.Tasks; namespace Tests.Yaml @@ -6,9 +7,53 @@ namespace Tests.Yaml public static class Program { + private static readonly string DownloadBranch = "master"; + public static async Task Main() { + var redownloadCoreSpecification = false; + var generateCode = false; + var downloadBranch = DownloadBranch; + + Console.WriteLine(GeneratorLocations.Root); + return; + + var answer = "invalid"; + while (answer != "y" && answer != "n" && answer != "") + { + Console.Write("Download online yaml test specifications? [y/N] (default N): "); + answer = Console.ReadLine()?.Trim().ToLowerInvariant(); + redownloadCoreSpecification = answer == "y"; + } + + if (redownloadCoreSpecification) + { + Console.Write($"Branch to download yaml test specifications from (default {downloadBranch}): "); + var readBranch = Console.ReadLine()?.Trim(); + if (!string.IsNullOrEmpty(readBranch)) downloadBranch = readBranch; + } + else + { + // read last downloaded branch from file. + //if (File.Exists(GeneratorLocations.LastDownloadedVersionFile)) + //downloadBranch = File.ReadAllText(GeneratorLocations.LastDownloadedVersionFile); + } + + if (string.IsNullOrEmpty(downloadBranch)) + downloadBranch = DownloadBranch; + + if (redownloadCoreSpecification) + YamlTestDownloader.Download(downloadBranch); + answer = "invalid"; + while (answer != "y" && answer != "n" && answer != "") + { + Console.Write("Generate code from the specification files on disk? [Y/n] (default Y): "); + answer = Console.ReadLine()?.Trim().ToLowerInvariant(); + generateCode = answer == "y" || answer == ""; + } + //if (generateCode) + //await Generator.ApiGenerator.Generate(downloadBranch, "Core", "XPack"); } } diff --git a/src/Tests/Tests.Yaml/GeneratorLocations.cs b/src/Tests/Tests.Yaml/GeneratorLocations.cs new file mode 100644 index 00000000000..9c75fe09404 --- /dev/null +++ b/src/Tests/Tests.Yaml/GeneratorLocations.cs @@ -0,0 +1,33 @@ +using System.IO; +using System.Reflection; + +namespace Tests.Yaml +{ + public static class GeneratorLocations + { + private static string _root; + /// + /// Points to the root of the project whether it's run through the editor or the .NET cli tool. + /// + public static string Root + { + get + { + if (_root != null) return _root; + + var pwd = Directory.GetCurrentDirectory(); + var directoryInfo = new DirectoryInfo(pwd); + + var runningAsDnx = + directoryInfo.Name == "Tests.Yaml" && + directoryInfo.Parent != null && + directoryInfo.Parent.Name == "Tests"; + + var relative = runningAsDnx ? "" : @"../../../"; + var fullPath = Path.Combine(pwd, relative); + _root = Path.GetFullPath(fullPath); + return _root; + } + } + } +} diff --git a/src/Tests/Tests.Yaml/Tests.Yaml.csproj b/src/Tests/Tests.Yaml/Tests.Yaml.csproj index e81a75e17cc..df790d3eb9d 100644 --- a/src/Tests/Tests.Yaml/Tests.Yaml.csproj +++ b/src/Tests/Tests.Yaml/Tests.Yaml.csproj @@ -12,6 +12,7 @@ - + + diff --git a/src/Tests/Tests.Yaml/RestSpecDownloader.cs b/src/Tests/Tests.Yaml/YamlTestDownloader.cs similarity index 80% rename from src/Tests/Tests.Yaml/RestSpecDownloader.cs rename to src/Tests/Tests.Yaml/YamlTestDownloader.cs index 5e7c2ff2569..a038bde476a 100644 --- a/src/Tests/Tests.Yaml/RestSpecDownloader.cs +++ b/src/Tests/Tests.Yaml/YamlTestDownloader.cs @@ -3,18 +3,19 @@ using System.IO; using System.Linq; using System.Net; +using CsQuery; using ShellProgressBar; namespace Tests.Yaml { - public class RestSpecDownloader + public class YamlTestDownloader { private static readonly ProgressBarOptions MainProgressBarOptions = new ProgressBarOptions { BackgroundColor = ConsoleColor.DarkGray }; private static readonly Dictionary OnlineSpecifications = new Dictionary { - { "Core", "https://github.com/elastic/elasticsearch/tree/{version}/rest-api-spec/src/main/resources/rest-api-spec/api" }, - { "XPack", "https://github.com/elastic/elasticsearch/tree/{version}/x-pack/plugin/src/test/resources/rest-api-spec/api"} + { "Core", "https://github.com/elastic/elasticsearch/tree/{version}/rest-api-spec/src/main/resources/rest-api-spec/test" }, + { "XPack", "https://github.com/elastic/elasticsearch/tree/{version}/x-pack/plugin/src/test/resources/rest-api-spec/test"} }; private static readonly ProgressBarOptions SubProgressBarOptions = new ProgressBarOptions @@ -25,7 +26,7 @@ public class RestSpecDownloader BackgroundColor = ConsoleColor.DarkGray, }; - private RestSpecDownloader(string branch) + private YamlTestDownloader(string branch) { var specifications = (from kv in OnlineSpecifications @@ -42,10 +43,10 @@ private RestSpecDownloader(string branch) } } - File.WriteAllText(GeneratorLocations.LastDownloadedVersionFile, branch); + //File.WriteAllText(GeneratorLocations.LastDownloadedVersionFile, branch); } - public static RestSpecDownloader Download(string branch) => new RestSpecDownloader(branch); + public static YamlTestDownloader Download(string branch) => new YamlTestDownloader(branch); private void DownloadJsonDefinitions(Specification spec, IProgressBar pbar) { @@ -58,8 +59,8 @@ private void DownloadJsonDefinitions(Specification spec, IProgressBar pbar) private void FindJsonFilesOnListing(Specification spec, string html, IProgressBar pbar) { - if (!Directory.Exists(GeneratorLocations.RestSpecificationFolder)) - Directory.CreateDirectory(GeneratorLocations.RestSpecificationFolder); + //if (!Directory.Exists(GeneratorLocations.RestSpecificationFolder)) + //Directory.CreateDirectory(GeneratorLocations.RestSpecificationFolder); var dom = CQ.Create(html); @@ -88,9 +89,9 @@ private void WriteEndpointFile(Specification spec, string s, IProgressBar pbar) private void WriteToEndpointsFolder(string folder, string filename, string contents) { - var f = Path.Combine(GeneratorLocations.RestSpecificationFolder, folder); - if (!Directory.Exists(f)) Directory.CreateDirectory(f); - File.WriteAllText(f + "\\" + filename, contents); + //var f = Path.Combine(GeneratorLocations.RestSpecificationFolder, folder); + //if (!Directory.Exists(f)) Directory.CreateDirectory(f); + //File.WriteAllText(f + "\\" + filename, contents); } private class Specification diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs new file mode 100644 index 00000000000..d0d5a4e5d2a --- /dev/null +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -0,0 +1,68 @@ +open System +open System.Threading.Tasks +open FSharp.Data +open ShellProgressBar + + +let barOptions = + ProgressBarOptions( + ForegroundColor = ConsoleColor.Cyan, + ForegroundColorDone = Nullable ConsoleColor.DarkGreen, + ProgressCharacter = '─', + BackgroundColor = Nullable ConsoleColor.DarkGray, + CollapseWhenFinished = true + ) +let subBarOptions = + ProgressBarOptions( + ForegroundColor = ConsoleColor.DarkYellow, + ForegroundColorDone = Nullable ConsoleColor.DarkGreen, + ProgressCharacter = '─', + CollapseWhenFinished = true + ) +let branchOrTag = "master" +let folders branch = + let url = sprintf "https://github.com/elastic/elasticsearch/tree/%s/rest-api-spec/src/main/resources/rest-api-spec/test" branch + let doc = HtmlDocument.Load(url) + doc.CssSelect("td.content a.js-navigation-open") + |> List.map(fun a -> a.InnerText()) + |> List.filter(fun f -> not <| f.EndsWith(".asciidoc")) + +let downloadYamlFile url (progress:ChildProgressBar) = async { + let! yaml = Http.AsyncRequestString url + progress.Tick(url) + return yaml +} +let folderFiles branch folder (progress:ProgressBar) = async { + let url = sprintf "https://github.com/elastic/elasticsearch/tree/%s/rest-api-spec/src/main/resources/rest-api-spec/test/%s" branch folder + let! doc = HtmlDocument.AsyncLoad(url) + progress.Tick() + let url file = sprintf "https://raw.githubusercontent.com/elastic/elasticsearch/%s/rest-api-spec/src/main/resources/rest-api-spec/test/%s/%s" branch folder file + let yamlFiles = + doc.CssSelect("td.content a.js-navigation-open") + |> List.map(fun a -> a.InnerText()) + |> List.filter(fun f -> f.EndsWith(".yml")) + |> List.map url + + let filesProgress = progress.Spawn(yamlFiles.Length, sprintf "Downloading %i files in %s" yamlFiles.Length folder, subBarOptions) + let actions = + yamlFiles + |> List.map (fun url -> downloadYamlFile url filesProgress) + + let result = Async.RunSynchronously <| Async.Parallel (actions, 4) + return result +} + +[] +let main argv = + // load the live package stats for FSharp.Data + let folders = folders branchOrTag + use pbar = new ProgressBar(folders.Length, "Listing folders", barOptions) + + let x = folders |> List.map(fun folder -> folderFiles branchOrTag folder pbar) + + let result = Async.RunSynchronously <| Async.Parallel (x, 2) + pbar.Dispose() + + printfn "Hello World %O" result + 0 // return an integer exit code + diff --git a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj new file mode 100644 index 00000000000..6e0443e2e8b --- /dev/null +++ b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj @@ -0,0 +1,18 @@ + + + + Exe + netcoreapp2.2 + + + + + + + + + + + + + From 3c92c6c91c5708fc1aaf89b1831b3109312651cc Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Wed, 21 Aug 2019 20:37:35 +0200 Subject: [PATCH 03/85] stage --- src/Tests/Tests.YamlRunner/Program.fs | 73 +++++++++++++++++++-------- 1 file changed, 52 insertions(+), 21 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index d0d5a4e5d2a..22b600dbe70 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -9,15 +9,13 @@ let barOptions = ForegroundColor = ConsoleColor.Cyan, ForegroundColorDone = Nullable ConsoleColor.DarkGreen, ProgressCharacter = '─', - BackgroundColor = Nullable ConsoleColor.DarkGray, - CollapseWhenFinished = true + BackgroundColor = Nullable ConsoleColor.DarkGray ) let subBarOptions = ProgressBarOptions( - ForegroundColor = ConsoleColor.DarkYellow, + ForegroundColor = ConsoleColor.Yellow, ForegroundColorDone = Nullable ConsoleColor.DarkGreen, - ProgressCharacter = '─', - CollapseWhenFinished = true + ProgressCharacter = '─' ) let branchOrTag = "master" let folders branch = @@ -28,41 +26,74 @@ let folders branch = |> List.filter(fun f -> not <| f.EndsWith(".asciidoc")) let downloadYamlFile url (progress:ChildProgressBar) = async { - let! yaml = Http.AsyncRequestString url + //let! yaml = Http.AsyncRequestString url + let! x = Async.Sleep 2000 progress.Tick(url) - return yaml + return "" } -let folderFiles branch folder (progress:ProgressBar) = async { +let folderFiles branch folder = async { let url = sprintf "https://github.com/elastic/elasticsearch/tree/%s/rest-api-spec/src/main/resources/rest-api-spec/test/%s" branch folder let! doc = HtmlDocument.AsyncLoad(url) - progress.Tick() let url file = sprintf "https://raw.githubusercontent.com/elastic/elasticsearch/%s/rest-api-spec/src/main/resources/rest-api-spec/test/%s/%s" branch folder file let yamlFiles = doc.CssSelect("td.content a.js-navigation-open") |> List.map(fun a -> a.InnerText()) |> List.filter(fun f -> f.EndsWith(".yml")) |> List.map url + return (folder, yamlFiles) +} + +let f (yamlFiles:Async>) (progress: IProgressBar) = async { + let! token = Async.StartChild yamlFiles + let! (folder, yamlFiles) = token let filesProgress = progress.Spawn(yamlFiles.Length, sprintf "Downloading %i files in %s" yamlFiles.Length folder, subBarOptions) let actions = yamlFiles - |> List.map (fun url -> downloadYamlFile url filesProgress) - - let result = Async.RunSynchronously <| Async.Parallel (actions, 4) - return result + |> Seq.indexed + |> Seq.groupBy (fun (i, _) -> i % yamlFiles.Length / 4) + |> Seq.map (fun (_, indexed) -> indexed |> Seq.map (fun (_, url) -> url)) + //|> Seq.map (fun url -> downloadYamlFile url filesProgress) + + for files in actions do + let tasks = files |> Seq.map (fun f -> downloadYamlFile f filesProgress) + let! token = Async.StartChild <| Async.Parallel tasks + let! result = token + ignore() + + progress.Tick() } -[] -let main argv = - // load the live package stats for FSharp.Data +let h = async { let folders = folders branchOrTag - use pbar = new ProgressBar(folders.Length, "Listing folders", barOptions) - let x = folders |> List.map(fun folder -> folderFiles branchOrTag folder pbar) - let result = Async.RunSynchronously <| Async.Parallel (x, 2) + use pbar = new ProgressBar(folders.Length, "Listing folders", barOptions) + let folderDownloads = + folders + |> Seq.map(fun folder -> folderFiles branchOrTag folder) + |> Seq.indexed + |> Seq.groupBy (fun (i, _) -> i % folders.Length / 4) + |> Seq.map (fun (_, indexed) -> indexed |> Seq.map (fun (_, folder) -> folder)) + |> Seq.toList + + for group in folderDownloads do + pbar.WriteLine( sprintf "length %i" (group |> Seq.length) ) + let tasks = group |> Seq.map (fun files -> f files pbar) + let! token = Async.StartChild <| Async.Parallel tasks + let! result = token + ignore() + pbar.Dispose() - printfn "Hello World %O" result - 0 // return an integer exit code + printfn "Hello World" +} + +[] +let main argv = + async { + do! Async.SwitchToThreadPool () + let! exitCode = h + return 0 + } |> Async.RunSynchronously From 2ce10239c54107b962de61e8cfbe85f20f0eb3ca Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Wed, 21 Aug 2019 20:49:55 +0200 Subject: [PATCH 04/85] stage --- src/Tests/Tests.YamlRunner/Program.fs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index 22b600dbe70..16c290d41d8 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -73,14 +73,15 @@ let h = async { folders |> Seq.map(fun folder -> folderFiles branchOrTag folder) |> Seq.indexed - |> Seq.groupBy (fun (i, _) -> i % folders.Length / 4) + |> Seq.groupBy (fun (i, _) -> i % folders.Length / 2) |> Seq.map (fun (_, indexed) -> indexed |> Seq.map (fun (_, folder) -> folder)) |> Seq.toList + for group in folderDownloads do pbar.WriteLine( sprintf "length %i" (group |> Seq.length) ) let tasks = group |> Seq.map (fun files -> f files pbar) - let! token = Async.StartChild <| Async.Parallel tasks + let! token = Async.StartChild <| Async.Parallel (tasks , 4) let! result = token ignore() From 881c730983c02cbd560abce0d82f684486b383c4 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Wed, 21 Aug 2019 21:57:06 +0200 Subject: [PATCH 05/85] stage --- src/Tests/Tests.YamlRunner/Program.fs | 79 ++++++++++++++++++--------- 1 file changed, 53 insertions(+), 26 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index 16c290d41d8..b5bbc159b70 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -1,4 +1,5 @@ open System +open System.Threading open System.Threading.Tasks open FSharp.Data open ShellProgressBar @@ -25,10 +26,9 @@ let folders branch = |> List.map(fun a -> a.InnerText()) |> List.filter(fun f -> not <| f.EndsWith(".asciidoc")) -let downloadYamlFile url (progress:ChildProgressBar) = async { +let downloadYamlFile url = async { //let! yaml = Http.AsyncRequestString url - let! x = Async.Sleep 2000 - progress.Tick(url) + let! x = Async.Sleep 500 return "" } let folderFiles branch folder = async { @@ -42,25 +42,52 @@ let folderFiles branch folder = async { |> List.map url return (folder, yamlFiles) } +let foreach<'a> maxDegreeOfParallelism (asyncs:seq>) = async { + let tasks = new System.Collections.Generic.List>(4) + for async in asyncs do + let! x = Async.StartChildAsTask async + tasks.Add <| x + if (tasks.Count >= maxDegreeOfParallelism) then + let! task = Async.AwaitTask <| Task.WhenAny(tasks) + if (task.IsFaulted) then System.Runtime.ExceptionServices.ExceptionDispatchInfo.Capture(task.Exception).Throw(); + let removed = tasks.Remove <| task + ignore() + let! completed = Async.AwaitTask <| Task.WhenAll tasks + ignore() +} + +let any asyncs = + async { + let! t = + asyncs + |> Seq.map Async.StartAsTask + |> System.Threading.Tasks.Task.WhenAny + |> Async.AwaitTask + + return t.Result } + let f (yamlFiles:Async>) (progress: IProgressBar) = async { let! token = Async.StartChild yamlFiles let! (folder, yamlFiles) = token - let filesProgress = progress.Spawn(yamlFiles.Length, sprintf "Downloading %i files in %s" yamlFiles.Length folder, subBarOptions) + let mutable seenFiles = 0; + let filesProgress = progress.Spawn(yamlFiles.Length, sprintf "Downloading [0/%i] files in %s" yamlFiles.Length folder, subBarOptions) let actions = yamlFiles - |> Seq.indexed - |> Seq.groupBy (fun (i, _) -> i % yamlFiles.Length / 4) - |> Seq.map (fun (_, indexed) -> indexed |> Seq.map (fun (_, url) -> url)) - //|> Seq.map (fun url -> downloadYamlFile url filesProgress) + |> Seq.map (fun url -> async { + let! result = downloadYamlFile url + let i = Interlocked.Increment (&seenFiles) + let message = sprintf "Downloaded [%i/%i] files in %s" i yamlFiles.Length folder + filesProgress.Tick(message) + return result + }) +// |> Seq.indexed +// |> Seq.groupBy (fun (i, _) -> i % yamlFiles.Length / 4) +// |> Seq.map (fun (_, indexed) -> indexed |> Seq.map (fun (_, url) -> url)) + - for files in actions do - let tasks = files |> Seq.map (fun f -> downloadYamlFile f filesProgress) - let! token = Async.StartChild <| Async.Parallel tasks - let! result = token - ignore() - + let! completed = foreach 1 actions progress.Tick() } @@ -71,19 +98,19 @@ let h = async { use pbar = new ProgressBar(folders.Length, "Listing folders", barOptions) let folderDownloads = folders - |> Seq.map(fun folder -> folderFiles branchOrTag folder) - |> Seq.indexed - |> Seq.groupBy (fun (i, _) -> i % folders.Length / 2) - |> Seq.map (fun (_, indexed) -> indexed |> Seq.map (fun (_, folder) -> folder)) - |> Seq.toList - + |> Seq.map(fun folder -> f (folderFiles branchOrTag folder) pbar) +// |> Seq.indexed +// |> Seq.groupBy (fun (i, _) -> i % folders.Length / 2) +// |> Seq.map (fun (_, indexed) -> indexed |> Seq.map (fun (_, folder) -> folder)) +// |> Seq.toList + + let! completed = foreach 4 folderDownloads - for group in folderDownloads do - pbar.WriteLine( sprintf "length %i" (group |> Seq.length) ) - let tasks = group |> Seq.map (fun files -> f files pbar) - let! token = Async.StartChild <| Async.Parallel (tasks , 4) - let! result = token - ignore() +// for group in folderDownloads do +// let tasks = group |> Seq.map (fun files -> f files pbar) +// let! token = Async.StartChild <| Async.Parallel (tasks , 4) +// let! result = token +// ignore() pbar.Dispose() From 1b328fcd2c8c3dcf4a5c7e655b84861362083174 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Wed, 21 Aug 2019 22:27:20 +0200 Subject: [PATCH 06/85] stage --- src/Tests/Tests.YamlRunner/Program.fs | 45 ++++--------------- .../Tests.YamlRunner/Tests.YamlRunner.fsproj | 2 + 2 files changed, 10 insertions(+), 37 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index b5bbc159b70..7d4607b7ece 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -1,4 +1,6 @@ -open System +module Tests.YamlRunner.Main + +open System open System.Threading open System.Threading.Tasks open FSharp.Data @@ -18,30 +20,15 @@ let subBarOptions = ForegroundColorDone = Nullable ConsoleColor.DarkGreen, ProgressCharacter = '─' ) + let branchOrTag = "master" -let folders branch = - let url = sprintf "https://github.com/elastic/elasticsearch/tree/%s/rest-api-spec/src/main/resources/rest-api-spec/test" branch - let doc = HtmlDocument.Load(url) - doc.CssSelect("td.content a.js-navigation-open") - |> List.map(fun a -> a.InnerText()) - |> List.filter(fun f -> not <| f.EndsWith(".asciidoc")) +let randomTime = Random() let downloadYamlFile url = async { //let! yaml = Http.AsyncRequestString url - let! x = Async.Sleep 500 + let! x = Async.Sleep <| randomTime.Next(200, 900) return "" } -let folderFiles branch folder = async { - let url = sprintf "https://github.com/elastic/elasticsearch/tree/%s/rest-api-spec/src/main/resources/rest-api-spec/test/%s" branch folder - let! doc = HtmlDocument.AsyncLoad(url) - let url file = sprintf "https://raw.githubusercontent.com/elastic/elasticsearch/%s/rest-api-spec/src/main/resources/rest-api-spec/test/%s/%s" branch folder file - let yamlFiles = - doc.CssSelect("td.content a.js-navigation-open") - |> List.map(fun a -> a.InnerText()) - |> List.filter(fun f -> f.EndsWith(".yml")) - |> List.map url - return (folder, yamlFiles) -} let foreach<'a> maxDegreeOfParallelism (asyncs:seq>) = async { let tasks = new System.Collections.Generic.List>(4) for async in asyncs do @@ -82,36 +69,20 @@ let f (yamlFiles:Async>) (progress: IProgressBar) = async filesProgress.Tick(message) return result }) -// |> Seq.indexed -// |> Seq.groupBy (fun (i, _) -> i % yamlFiles.Length / 4) -// |> Seq.map (fun (_, indexed) -> indexed |> Seq.map (fun (_, url) -> url)) - - - let! completed = foreach 1 actions + let! completed = foreach 4 actions progress.Tick() } let h = async { - let folders = folders branchOrTag + let folders = YamlTestsDownloader.ListFolders Locations.OpenSource branchOrTag use pbar = new ProgressBar(folders.Length, "Listing folders", barOptions) let folderDownloads = folders |> Seq.map(fun folder -> f (folderFiles branchOrTag folder) pbar) -// |> Seq.indexed -// |> Seq.groupBy (fun (i, _) -> i % folders.Length / 2) -// |> Seq.map (fun (_, indexed) -> indexed |> Seq.map (fun (_, folder) -> folder)) -// |> Seq.toList - let! completed = foreach 4 folderDownloads -// for group in folderDownloads do -// let tasks = group |> Seq.map (fun files -> f files pbar) -// let! token = Async.StartChild <| Async.Parallel (tasks , 4) -// let! result = token -// ignore() - pbar.Dispose() printfn "Hello World" diff --git a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj index 6e0443e2e8b..14e6fbf4be7 100644 --- a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj +++ b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj @@ -6,6 +6,8 @@ + + From de926e707693bbb5ea326b79933203c03eebfad9 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Wed, 21 Aug 2019 22:27:27 +0200 Subject: [PATCH 07/85] stage --- src/Tests/Tests.YamlRunner/Locations.fs | 17 ++++++++++++ .../Tests.YamlRunner/YamlTestsDownloader.fs | 26 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 src/Tests/Tests.YamlRunner/Locations.fs create mode 100644 src/Tests/Tests.YamlRunner/YamlTestsDownloader.fs diff --git a/src/Tests/Tests.YamlRunner/Locations.fs b/src/Tests/Tests.YamlRunner/Locations.fs new file mode 100644 index 00000000000..76a0da37cb8 --- /dev/null +++ b/src/Tests/Tests.YamlRunner/Locations.fs @@ -0,0 +1,17 @@ +module Tests.YamlRunner.Locations + let private rootListingUrl = "https://github.com/elastic/elasticsearch" + + + type YamlTestType = OpenSource | XPack + + let private openSourceResourcePath = "rest-api-spec/src/main/resources" + let private xpackResourcesPath = "x-pack/plugin/src/test/resources" + + let private opensourceTests branch = sprintf "%s/tree/%s/%s/rest-api-spec/test" rootListingUrl branch openSourceResourcePath + let private xpackTests branch = sprintf "%s/tree/%s/%s/rest-api-spec/test" rootListingUrl branch xpackResourcesPath + + let TestGithubRootUrl testType branch = + match testType with + | OpenSource -> opensourceTests branch + | XPack -> xpackTests branch + diff --git a/src/Tests/Tests.YamlRunner/YamlTestsDownloader.fs b/src/Tests/Tests.YamlRunner/YamlTestsDownloader.fs new file mode 100644 index 00000000000..5b87a809534 --- /dev/null +++ b/src/Tests/Tests.YamlRunner/YamlTestsDownloader.fs @@ -0,0 +1,26 @@ +module Tests.YamlRunner.YamlTestsDownloader + +open FSharp.Data + +let ListFolders testType branch = + let url = Locations.TestGithubRootUrl testType branch + let doc = HtmlDocument.Load(url) + + doc.CssSelect("td.content a.js-navigation-open") + |> List.map (fun a -> a.InnerText()) + |> List.filter (fun f -> not <| f.EndsWith(".asciidoc")) + +let ListFolderFiles branch folder = async { + let url = Locations.TestGithubRootUrl testType branch + let url = sprintf "https://github.com/elastic/elasticsearch/tree/%s/rest-api-spec/src/main/resources/rest-api-spec/test/%s" branch folder + let! doc = HtmlDocument.AsyncLoad(url) + let url file = sprintf "https://raw.githubusercontent.com/elastic/elasticsearch/%s/rest-api-spec/src/main/resources/rest-api-spec/test/%s/%s" branch folder file + let yamlFiles = + doc.CssSelect("td.content a.js-navigation-open") + |> List.map(fun a -> a.InnerText()) + |> List.filter(fun f -> f.EndsWith(".yml")) + |> List.map url + return (folder, yamlFiles) +} + + From 71e8897ac5a73ac30e6260e3e99f9929fb0132ad Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Thu, 22 Aug 2019 18:38:07 +0200 Subject: [PATCH 08/85] stage --- src/Tests/Tests.YamlRunner/AsyncExtensions.fs | 42 +++++++ src/Tests/Tests.YamlRunner/Locations.fs | 24 ++-- src/Tests/Tests.YamlRunner/Program.fs | 116 ++++++------------ .../Tests.YamlRunner/Tests.YamlRunner.fsproj | 2 + .../Tests.YamlRunner/YamlTestsDownloader.fs | 104 ++++++++++++++-- 5 files changed, 190 insertions(+), 98 deletions(-) create mode 100644 src/Tests/Tests.YamlRunner/AsyncExtensions.fs diff --git a/src/Tests/Tests.YamlRunner/AsyncExtensions.fs b/src/Tests/Tests.YamlRunner/AsyncExtensions.fs new file mode 100644 index 00000000000..d102eaa4c63 --- /dev/null +++ b/src/Tests/Tests.YamlRunner/AsyncExtensions.fs @@ -0,0 +1,42 @@ +module Tests.YamlRunner.AsyncExtensions + +open System.Runtime.CompilerServices +open Microsoft.FSharp.Control +open System.Threading.Tasks +open System.Collections.Generic +open System.Runtime.ExceptionServices + +[] +module AsyncExtensions = + type Microsoft.FSharp.Control.Async with + + // Wrote this as Async.Parallel eagerly materializes and forcefully executes in order. + // There is an extension that came in as dependency that extends Async.Parallel with maxDegreeOfParallelism + // but for some reason this did not behave as I had expected + [] + static member inline ForEachAsync (maxDegreeOfParallelism: int) asyncs = async { + let tasks = new List>(maxDegreeOfParallelism) + for async in asyncs do + let! x = Async.StartChildAsTask async + tasks.Add <| x + if (tasks.Count >= maxDegreeOfParallelism) then + let! task = Async.AwaitTask <| Task.WhenAny(tasks) + if (task.IsFaulted) then ExceptionDispatchInfo.Capture(task.Exception).Throw(); + let removed = tasks.Remove <| task + ignore() + let! completed = Async.AwaitTask <| Task.WhenAll tasks + return completed + } + + [] + static member inline WhenAny asyncs = async { + let! t = + asyncs + |> Seq.map Async.StartAsTask + |> Task.WhenAny + |> Async.AwaitTask + + return t.Result + } + + diff --git a/src/Tests/Tests.YamlRunner/Locations.fs b/src/Tests/Tests.YamlRunner/Locations.fs index 76a0da37cb8..6e0a22e3ca0 100644 --- a/src/Tests/Tests.YamlRunner/Locations.fs +++ b/src/Tests/Tests.YamlRunner/Locations.fs @@ -1,17 +1,23 @@ module Tests.YamlRunner.Locations let private rootListingUrl = "https://github.com/elastic/elasticsearch" + let private rootRawUrl = "https://raw.githubusercontent.com/elastic/elasticsearch" - - type YamlTestType = OpenSource | XPack + type TestSuite = OpenSource | XPack let private openSourceResourcePath = "rest-api-spec/src/main/resources" let private xpackResourcesPath = "x-pack/plugin/src/test/resources" - let private opensourceTests branch = sprintf "%s/tree/%s/%s/rest-api-spec/test" rootListingUrl branch openSourceResourcePath - let private xpackTests branch = sprintf "%s/tree/%s/%s/rest-api-spec/test" rootListingUrl branch xpackResourcesPath - - let TestGithubRootUrl testType branch = - match testType with - | OpenSource -> opensourceTests branch - | XPack -> xpackTests branch + let private Path namedSuite revision = + let path = match namedSuite with | OpenSource -> openSourceResourcePath | XPack -> xpackResourcesPath + sprintf "%s/%s/rest-api-spec/test" revision path + + let TestGithubRootUrl namedSuite revision = sprintf "%s/tree/%s" rootListingUrl <| Path namedSuite revision + + let FolderListUrl namedSuite revision folder = + let root = TestGithubRootUrl namedSuite revision + sprintf "%s/%s" root folder + + let TestRawUrl namedSuite revision folder file = + let path = Path namedSuite revision + sprintf "%s/%s/%s/%s" rootRawUrl path folder file diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index 7d4607b7ece..dca11a03579 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -1,18 +1,16 @@ module Tests.YamlRunner.Main +open Argu open System -open System.Threading -open System.Threading.Tasks -open FSharp.Data open ShellProgressBar - +open Tests.YamlRunner.AsyncExtensions let barOptions = ProgressBarOptions( ForegroundColor = ConsoleColor.Cyan, ForegroundColorDone = Nullable ConsoleColor.DarkGreen, - ProgressCharacter = '─', - BackgroundColor = Nullable ConsoleColor.DarkGray + BackgroundColor = Nullable ConsoleColor.DarkGray, + ProgressCharacter = '─' ) let subBarOptions = ProgressBarOptions( @@ -21,78 +19,44 @@ let subBarOptions = ProgressCharacter = '─' ) -let branchOrTag = "master" - -let randomTime = Random() -let downloadYamlFile url = async { - //let! yaml = Http.AsyncRequestString url - let! x = Async.Sleep <| randomTime.Next(200, 900) - return "" -} -let foreach<'a> maxDegreeOfParallelism (asyncs:seq>) = async { - let tasks = new System.Collections.Generic.List>(4) - for async in asyncs do - let! x = Async.StartChildAsTask async - tasks.Add <| x - if (tasks.Count >= maxDegreeOfParallelism) then - let! task = Async.AwaitTask <| Task.WhenAny(tasks) - if (task.IsFaulted) then System.Runtime.ExceptionServices.ExceptionDispatchInfo.Capture(task.Exception).Throw(); - let removed = tasks.Remove <| task - ignore() - let! completed = Async.AwaitTask <| Task.WhenAll tasks - ignore() -} - -let any asyncs = - async { - let! t = - asyncs - |> Seq.map Async.StartAsTask - |> System.Threading.Tasks.Task.WhenAny - |> Async.AwaitTask - - return t.Result } - - -let f (yamlFiles:Async>) (progress: IProgressBar) = async { - let! token = Async.StartChild yamlFiles - let! (folder, yamlFiles) = token - - let mutable seenFiles = 0; - let filesProgress = progress.Spawn(yamlFiles.Length, sprintf "Downloading [0/%i] files in %s" yamlFiles.Length folder, subBarOptions) - let actions = - yamlFiles - |> Seq.map (fun url -> async { - let! result = downloadYamlFile url - let i = Interlocked.Increment (&seenFiles) - let message = sprintf "Downloaded [%i/%i] files in %s" i yamlFiles.Length folder - filesProgress.Tick(message) - return result - }) - let! completed = foreach 4 actions - progress.Tick() -} +type Arguments = + | [] NamedSuite of Locations.TestSuite + | []Revision of string + with + interface IArgParserTemplate with + member s.Usage = + match s with + | NamedSuite _ -> "specify a known yaml test suite. defaults to `opensource`." + | Revision _ -> "The git revision to reference (commit/branch/tag). defaults to `master`" -let h = async { - - let folders = YamlTestsDownloader.ListFolders Locations.OpenSource branchOrTag - - use pbar = new ProgressBar(folders.Length, "Listing folders", barOptions) - let folderDownloads = - folders - |> Seq.map(fun folder -> f (folderFiles branchOrTag folder) pbar) - let! completed = foreach 4 folderDownloads - - pbar.Dispose() - - printfn "Hello World" -} [] let main argv = - async { - do! Async.SwitchToThreadPool () - let! exitCode = h - return 0 - } |> Async.RunSynchronously + let parser = ArgumentParser.Create(programName = "yaml-test-runner") + let parsed = + try + Some <| parser.ParseCommandLine(inputs = argv, raiseOnUsage = true) + with e -> + printfn "%s" e.Message + None + match parsed with + | None -> 1 + | Some parsed -> + async { + do! Async.SwitchToThreadPool () + let namedSuite = parsed.TryGetResult NamedSuite |> Option.defaultValue Locations.OpenSource + let revision = parsed.TryGetResult Revision |> Option.defaultValue "master" + + let! folders = YamlTestsDownloader.ListFolders namedSuite revision + + let l = folders.Length + use progress = new ProgressBar(l, sprintf "Listing %i folders" l, barOptions) + progress.WriteLine((YamlTestsDownloader.TemporaryPath revision).Force()) + let folderDownloads = + folders + |> Seq.map(fun folder -> YamlTestsDownloader.DownloadTestsInFolder folder namedSuite revision progress subBarOptions) + let! completed = Async.ForEachAsync 4 folderDownloads + + return 0 + } |> Async.RunSynchronously diff --git a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj index 14e6fbf4be7..c10b4f0e1d0 100644 --- a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj +++ b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj @@ -6,12 +6,14 @@ + + diff --git a/src/Tests/Tests.YamlRunner/YamlTestsDownloader.fs b/src/Tests/Tests.YamlRunner/YamlTestsDownloader.fs index 5b87a809534..b6a274adfe9 100644 --- a/src/Tests/Tests.YamlRunner/YamlTestsDownloader.fs +++ b/src/Tests/Tests.YamlRunner/YamlTestsDownloader.fs @@ -1,26 +1,104 @@ module Tests.YamlRunner.YamlTestsDownloader +open System +open System.IO +open System.Threading open FSharp.Data +open Tests.YamlRunner.AsyncExtensions +open ShellProgressBar +open Tests.YamlRunner -let ListFolders testType branch = - let url = Locations.TestGithubRootUrl testType branch - let doc = HtmlDocument.Load(url) +let randomTime = Random() + +let TemporaryPath revision = lazy(Path.Combine(Path.GetTempPath(), sprintf "elastic-test-%s" revision)) + +let private download url = async { + let! x = Async.Sleep <| randomTime.Next(500, 900) + let! yaml = Http.AsyncRequestString url + return yaml +} +let cachedOrDownload revision folder file url = async { + let parent = (TemporaryPath revision).Force() + let directory = Path.Combine(parent, folder) + let file = Path.Combine(directory, file) + let fileExists = File.Exists file + let directoryExists = Directory.Exists directory + let! result = async { + match (fileExists, directoryExists) with + | (true, _) -> + let! text = Async.AwaitTask <| File.ReadAllTextAsync file + return text + | (_, d) -> + if (not d) then Directory.CreateDirectory(directory) |> ignore + let! contents = download url + File.WriteAllText(file, contents) + return contents + + } + return (file, result) +} + +let ListFolders namedSuite revision = async { + let url = Locations.TestGithubRootUrl namedSuite revision + let! (_, html) = cachedOrDownload revision "_root_" "index.html" url + let doc = HtmlDocument.Parse(html) - doc.CssSelect("td.content a.js-navigation-open") - |> List.map (fun a -> a.InnerText()) - |> List.filter (fun f -> not <| f.EndsWith(".asciidoc")) + return + doc.CssSelect("td.content a.js-navigation-open") + |> List.map (fun a -> a.InnerText()) + |> List.filter (fun f -> not <| f.EndsWith(".asciidoc")) +} -let ListFolderFiles branch folder = async { - let url = Locations.TestGithubRootUrl testType branch - let url = sprintf "https://github.com/elastic/elasticsearch/tree/%s/rest-api-spec/src/main/resources/rest-api-spec/test/%s" branch folder - let! doc = HtmlDocument.AsyncLoad(url) - let url file = sprintf "https://raw.githubusercontent.com/elastic/elasticsearch/%s/rest-api-spec/src/main/resources/rest-api-spec/test/%s/%s" branch folder file +let ListFolderFiles namedSuite revision folder (progress:IProgressBar) = async { + let url = Locations.FolderListUrl namedSuite revision folder + let! (_, html) = cachedOrDownload revision folder "index.html" url + let doc = HtmlDocument.Parse(html) let yamlFiles = + let fileUrl file = (file, Locations.TestRawUrl namedSuite revision folder file) doc.CssSelect("td.content a.js-navigation-open") |> List.map(fun a -> a.InnerText()) |> List.filter(fun f -> f.EndsWith(".yml")) - |> List.map url - return (folder, yamlFiles) + |> List.map fileUrl + return yamlFiles +} + +let private downloadTestsInFolder (yamlFiles:list) folder revision (progress: IProgressBar) subBarOptions = async { + let mutable seenFiles = 0; + let filesProgress = progress.Spawn(yamlFiles.Length, sprintf "Downloading [0/%i] files in %s" yamlFiles.Length folder, subBarOptions) + let actions = + yamlFiles + |> Seq.map (fun (file, url) -> async { + let! (localFile, yaml) = cachedOrDownload revision folder file url + let i = Interlocked.Increment (&seenFiles) + let message = sprintf "Downloaded [%i/%i] files in %s" i yamlFiles.Length folder + filesProgress.Tick(message) + match String.IsNullOrWhiteSpace yaml with + | true -> + progress.WriteLine(sprintf "Skipped %s since it returned no data" url) + return None + | _ -> + return Some localFile + }) + + let! completed = Async.ForEachAsync 4 actions + return completed } +let DownloadTestsInFolder folder namedSuite revision (progress: IProgressBar) subBarOptions = async { + let! token = Async.StartChild <| ListFolderFiles namedSuite revision folder progress + let! yamlFiles = token + let! localFiles = async { + match yamlFiles.Length with + | 0 -> + progress.WriteLine(sprintf "%s folder yielded no tests" folder) + return None + | _ -> + let! result = downloadTestsInFolder yamlFiles folder revision progress subBarOptions + return Some <| result + } + progress.Tick() + return localFiles; +} + + From 0bfd95f7707e052e622ff9e41f341797775605ad Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Thu, 22 Aug 2019 19:02:24 +0200 Subject: [PATCH 09/85] stage --- src/Tests/Tests.YamlRunner/Program.fs | 1 - src/Tests/Tests.YamlRunner/YamlTestsDownloader.fs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index dca11a03579..1caa47309a6 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -51,7 +51,6 @@ let main argv = let l = folders.Length use progress = new ProgressBar(l, sprintf "Listing %i folders" l, barOptions) - progress.WriteLine((YamlTestsDownloader.TemporaryPath revision).Force()) let folderDownloads = folders |> Seq.map(fun folder -> YamlTestsDownloader.DownloadTestsInFolder folder namedSuite revision progress subBarOptions) diff --git a/src/Tests/Tests.YamlRunner/YamlTestsDownloader.fs b/src/Tests/Tests.YamlRunner/YamlTestsDownloader.fs index b6a274adfe9..1efffb3b72d 100644 --- a/src/Tests/Tests.YamlRunner/YamlTestsDownloader.fs +++ b/src/Tests/Tests.YamlRunner/YamlTestsDownloader.fs @@ -10,14 +10,14 @@ open Tests.YamlRunner let randomTime = Random() -let TemporaryPath revision = lazy(Path.Combine(Path.GetTempPath(), sprintf "elastic-test-%s" revision)) +let TemporaryPath revision = lazy(Path.Combine(Path.GetTempPath(), "elastic", sprintf "tests-%s" revision)) let private download url = async { let! x = Async.Sleep <| randomTime.Next(500, 900) let! yaml = Http.AsyncRequestString url return yaml } -let cachedOrDownload revision folder file url = async { +let private cachedOrDownload revision folder file url = async { let parent = (TemporaryPath revision).Force() let directory = Path.Combine(parent, folder) let file = Path.Combine(directory, file) From ec7336df46c6f1bfd8259f3a857a79877364e85a Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Thu, 22 Aug 2019 19:13:53 +0200 Subject: [PATCH 10/85] stage --- src/Tests/Tests.YamlRunner/Locations.fs | 23 -------- src/Tests/Tests.YamlRunner/Models.fs | 4 ++ src/Tests/Tests.YamlRunner/Program.fs | 9 +-- .../Tests.YamlRunner/Tests.YamlRunner.fsproj | 5 +- src/Tests/Tests.YamlRunner/TestsDownloader.fs | 58 +++++++++++++++++++ ...YamlTestsDownloader.fs => TestsLocator.fs} | 52 +++-------------- 6 files changed, 79 insertions(+), 72 deletions(-) delete mode 100644 src/Tests/Tests.YamlRunner/Locations.fs create mode 100644 src/Tests/Tests.YamlRunner/Models.fs create mode 100644 src/Tests/Tests.YamlRunner/TestsDownloader.fs rename src/Tests/Tests.YamlRunner/{YamlTestsDownloader.fs => TestsLocator.fs} (56%) diff --git a/src/Tests/Tests.YamlRunner/Locations.fs b/src/Tests/Tests.YamlRunner/Locations.fs deleted file mode 100644 index 6e0a22e3ca0..00000000000 --- a/src/Tests/Tests.YamlRunner/Locations.fs +++ /dev/null @@ -1,23 +0,0 @@ -module Tests.YamlRunner.Locations - let private rootListingUrl = "https://github.com/elastic/elasticsearch" - let private rootRawUrl = "https://raw.githubusercontent.com/elastic/elasticsearch" - - type TestSuite = OpenSource | XPack - - let private openSourceResourcePath = "rest-api-spec/src/main/resources" - let private xpackResourcesPath = "x-pack/plugin/src/test/resources" - - let private Path namedSuite revision = - let path = match namedSuite with | OpenSource -> openSourceResourcePath | XPack -> xpackResourcesPath - sprintf "%s/%s/rest-api-spec/test" revision path - - let TestGithubRootUrl namedSuite revision = sprintf "%s/tree/%s" rootListingUrl <| Path namedSuite revision - - let FolderListUrl namedSuite revision folder = - let root = TestGithubRootUrl namedSuite revision - sprintf "%s/%s" root folder - - let TestRawUrl namedSuite revision folder file = - let path = Path namedSuite revision - sprintf "%s/%s/%s/%s" rootRawUrl path folder file - diff --git a/src/Tests/Tests.YamlRunner/Models.fs b/src/Tests/Tests.YamlRunner/Models.fs new file mode 100644 index 00000000000..76faebbb283 --- /dev/null +++ b/src/Tests/Tests.YamlRunner/Models.fs @@ -0,0 +1,4 @@ +module Tests.YamlRunner.Models + +type TestSuite = OpenSource | XPack + diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index 1caa47309a6..d912831e8e4 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -4,6 +4,7 @@ open Argu open System open ShellProgressBar open Tests.YamlRunner.AsyncExtensions +open Tests.YamlRunner.Models let barOptions = ProgressBarOptions( @@ -20,7 +21,7 @@ let subBarOptions = ) type Arguments = - | [] NamedSuite of Locations.TestSuite + | [] NamedSuite of TestSuite | []Revision of string with interface IArgParserTemplate with @@ -44,16 +45,16 @@ let main argv = | Some parsed -> async { do! Async.SwitchToThreadPool () - let namedSuite = parsed.TryGetResult NamedSuite |> Option.defaultValue Locations.OpenSource + let namedSuite = parsed.TryGetResult NamedSuite |> Option.defaultValue OpenSource let revision = parsed.TryGetResult Revision |> Option.defaultValue "master" - let! folders = YamlTestsDownloader.ListFolders namedSuite revision + let! folders = TestsLocator.ListFolders namedSuite revision let l = folders.Length use progress = new ProgressBar(l, sprintf "Listing %i folders" l, barOptions) let folderDownloads = folders - |> Seq.map(fun folder -> YamlTestsDownloader.DownloadTestsInFolder folder namedSuite revision progress subBarOptions) + |> Seq.map(fun folder -> TestsLocator.DownloadTestsInFolder folder namedSuite revision progress subBarOptions) let! completed = Async.ForEachAsync 4 folderDownloads return 0 diff --git a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj index c10b4f0e1d0..cc2cf81db95 100644 --- a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj +++ b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj @@ -7,8 +7,9 @@ - - + + + diff --git a/src/Tests/Tests.YamlRunner/TestsDownloader.fs b/src/Tests/Tests.YamlRunner/TestsDownloader.fs new file mode 100644 index 00000000000..0ef04cd2eba --- /dev/null +++ b/src/Tests/Tests.YamlRunner/TestsDownloader.fs @@ -0,0 +1,58 @@ +module Tests.YamlRunner.TestsDownloader + +open System +open System.IO +open FSharp.Data +open Tests.YamlRunner.Models + + +let private rootListingUrl = "https://github.com/elastic/elasticsearch" +let private rootRawUrl = "https://raw.githubusercontent.com/elastic/elasticsearch" + +let private openSourceResourcePath = "rest-api-spec/src/main/resources" +let private xpackResourcesPath = "x-pack/plugin/src/test/resources" + +let private path namedSuite revision = + let path = match namedSuite with | OpenSource -> openSourceResourcePath | XPack -> xpackResourcesPath + sprintf "%s/%s/rest-api-spec/test" revision path + +let TestGithubRootUrl namedSuite revision = sprintf "%s/tree/%s" rootListingUrl <| path namedSuite revision + +let FolderListUrl namedSuite revision folder = + let root = TestGithubRootUrl namedSuite revision + sprintf "%s/%s" root folder + +let TestRawUrl namedSuite revision folder file = + let path = path namedSuite revision + sprintf "%s/%s/%s/%s" rootRawUrl path folder file + +let randomTime = Random() + +let TemporaryPath revision = lazy(Path.Combine(Path.GetTempPath(), "elastic", sprintf "tests-%s" revision)) + +let private download url = async { + let! x = Async.Sleep <| randomTime.Next(500, 900) + let! yaml = Http.AsyncRequestString url + return yaml +} +let CachedOrDownload revision folder file url = async { + let parent = (TemporaryPath revision).Force() + let directory = Path.Combine(parent, folder) + let file = Path.Combine(directory, file) + let fileExists = File.Exists file + let directoryExists = Directory.Exists directory + let! result = async { + match (fileExists, directoryExists) with + | (true, _) -> + let! text = Async.AwaitTask <| File.ReadAllTextAsync file + return text + | (_, d) -> + if (not d) then Directory.CreateDirectory(directory) |> ignore + let! contents = download url + File.WriteAllText(file, contents) + return contents + + } + return (file, result) +} + diff --git a/src/Tests/Tests.YamlRunner/YamlTestsDownloader.fs b/src/Tests/Tests.YamlRunner/TestsLocator.fs similarity index 56% rename from src/Tests/Tests.YamlRunner/YamlTestsDownloader.fs rename to src/Tests/Tests.YamlRunner/TestsLocator.fs index 1efffb3b72d..ac137fb2742 100644 --- a/src/Tests/Tests.YamlRunner/YamlTestsDownloader.fs +++ b/src/Tests/Tests.YamlRunner/TestsLocator.fs @@ -1,46 +1,15 @@ -module Tests.YamlRunner.YamlTestsDownloader +module Tests.YamlRunner.TestsLocator open System -open System.IO open System.Threading open FSharp.Data open Tests.YamlRunner.AsyncExtensions open ShellProgressBar open Tests.YamlRunner -let randomTime = Random() - -let TemporaryPath revision = lazy(Path.Combine(Path.GetTempPath(), "elastic", sprintf "tests-%s" revision)) - -let private download url = async { - let! x = Async.Sleep <| randomTime.Next(500, 900) - let! yaml = Http.AsyncRequestString url - return yaml -} -let private cachedOrDownload revision folder file url = async { - let parent = (TemporaryPath revision).Force() - let directory = Path.Combine(parent, folder) - let file = Path.Combine(directory, file) - let fileExists = File.Exists file - let directoryExists = Directory.Exists directory - let! result = async { - match (fileExists, directoryExists) with - | (true, _) -> - let! text = Async.AwaitTask <| File.ReadAllTextAsync file - return text - | (_, d) -> - if (not d) then Directory.CreateDirectory(directory) |> ignore - let! contents = download url - File.WriteAllText(file, contents) - return contents - - } - return (file, result) -} - let ListFolders namedSuite revision = async { - let url = Locations.TestGithubRootUrl namedSuite revision - let! (_, html) = cachedOrDownload revision "_root_" "index.html" url + let url = TestsDownloader.TestGithubRootUrl namedSuite revision + let! (_, html) = TestsDownloader.CachedOrDownload revision "_root_" "index.html" url let doc = HtmlDocument.Parse(html) return @@ -49,12 +18,12 @@ let ListFolders namedSuite revision = async { |> List.filter (fun f -> not <| f.EndsWith(".asciidoc")) } -let ListFolderFiles namedSuite revision folder (progress:IProgressBar) = async { - let url = Locations.FolderListUrl namedSuite revision folder - let! (_, html) = cachedOrDownload revision folder "index.html" url +let ListFolderFiles namedSuite revision folder = async { + let url = TestsDownloader.FolderListUrl namedSuite revision folder + let! (_, html) = TestsDownloader.CachedOrDownload revision folder "index.html" url let doc = HtmlDocument.Parse(html) let yamlFiles = - let fileUrl file = (file, Locations.TestRawUrl namedSuite revision folder file) + let fileUrl file = (file, TestsDownloader.TestRawUrl namedSuite revision folder file) doc.CssSelect("td.content a.js-navigation-open") |> List.map(fun a -> a.InnerText()) |> List.filter(fun f -> f.EndsWith(".yml")) @@ -68,7 +37,7 @@ let private downloadTestsInFolder (yamlFiles:list) folder revis let actions = yamlFiles |> Seq.map (fun (file, url) -> async { - let! (localFile, yaml) = cachedOrDownload revision folder file url + let! (localFile, yaml) = TestsDownloader.CachedOrDownload revision folder file url let i = Interlocked.Increment (&seenFiles) let message = sprintf "Downloaded [%i/%i] files in %s" i yamlFiles.Length folder filesProgress.Tick(message) @@ -85,7 +54,7 @@ let private downloadTestsInFolder (yamlFiles:list) folder revis } let DownloadTestsInFolder folder namedSuite revision (progress: IProgressBar) subBarOptions = async { - let! token = Async.StartChild <| ListFolderFiles namedSuite revision folder progress + let! token = Async.StartChild <| ListFolderFiles namedSuite revision folder let! yamlFiles = token let! localFiles = async { match yamlFiles.Length with @@ -99,6 +68,3 @@ let DownloadTestsInFolder folder namedSuite revision (progress: IProgressBar) su progress.Tick() return localFiles; } - - - From f4feabd998feb938667194e8f201ad06da9e97df Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Thu, 22 Aug 2019 19:29:40 +0200 Subject: [PATCH 11/85] stage --- src/Tests/Tests.YamlRunner/Program.fs | 43 ++++++------------- .../Tests.YamlRunner/Tests.YamlRunner.fsproj | 1 + 2 files changed, 13 insertions(+), 31 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index d912831e8e4..5e5c7464b58 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -1,25 +1,8 @@ module Tests.YamlRunner.Main open Argu -open System -open ShellProgressBar -open Tests.YamlRunner.AsyncExtensions open Tests.YamlRunner.Models -let barOptions = - ProgressBarOptions( - ForegroundColor = ConsoleColor.Cyan, - ForegroundColorDone = Nullable ConsoleColor.DarkGreen, - BackgroundColor = Nullable ConsoleColor.DarkGray, - ProgressCharacter = '─' - ) -let subBarOptions = - ProgressBarOptions( - ForegroundColor = ConsoleColor.Yellow, - ForegroundColorDone = Nullable ConsoleColor.DarkGreen, - ProgressCharacter = '─' - ) - type Arguments = | [] NamedSuite of TestSuite | []Revision of string @@ -31,6 +14,16 @@ type Arguments = | Revision _ -> "The git revision to reference (commit/branch/tag). defaults to `master`" +let runMain (parsed:ParseResults) = async { + + let namedSuite = parsed.TryGetResult NamedSuite |> Option.defaultValue OpenSource + let revision = parsed.TryGetResult Revision |> Option.defaultValue "master" + + let! locateResults = Commands.LocateTests namedSuite revision + + return 0 +} + [] let main argv = let parser = ArgumentParser.Create(programName = "yaml-test-runner") @@ -42,21 +35,9 @@ let main argv = None match parsed with | None -> 1 - | Some parsed -> + | Some parsed -> async { do! Async.SwitchToThreadPool () - let namedSuite = parsed.TryGetResult NamedSuite |> Option.defaultValue OpenSource - let revision = parsed.TryGetResult Revision |> Option.defaultValue "master" - - let! folders = TestsLocator.ListFolders namedSuite revision - - let l = folders.Length - use progress = new ProgressBar(l, sprintf "Listing %i folders" l, barOptions) - let folderDownloads = - folders - |> Seq.map(fun folder -> TestsLocator.DownloadTestsInFolder folder namedSuite revision progress subBarOptions) - let! completed = Async.ForEachAsync 4 folderDownloads - - return 0 + return! runMain parsed } |> Async.RunSynchronously diff --git a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj index cc2cf81db95..2dc40ee19f1 100644 --- a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj +++ b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj @@ -10,6 +10,7 @@ + From 9ac6c89c18cbf97e3a393052ab6452b4a7602573 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Thu, 22 Aug 2019 19:29:43 +0200 Subject: [PATCH 12/85] stage --- src/Tests/Tests.YamlRunner/Commands.fs | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/Tests/Tests.YamlRunner/Commands.fs diff --git a/src/Tests/Tests.YamlRunner/Commands.fs b/src/Tests/Tests.YamlRunner/Commands.fs new file mode 100644 index 00000000000..40f61a06403 --- /dev/null +++ b/src/Tests/Tests.YamlRunner/Commands.fs @@ -0,0 +1,27 @@ +module Tests.YamlRunner.Commands + +open System +open ShellProgressBar +open Tests.YamlRunner.AsyncExtensions + +let private barOptions = + ProgressBarOptions( + ForegroundColor = ConsoleColor.Cyan, + ForegroundColorDone = Nullable ConsoleColor.DarkGreen, + BackgroundColor = Nullable ConsoleColor.DarkGray, + ProgressCharacter = '─' + ) +let private subBarOptions = + ProgressBarOptions(ForegroundColor = ConsoleColor.Yellow, ForegroundColorDone = Nullable ConsoleColor.DarkGreen, ProgressCharacter = '─') + +let LocateTests namedSuite revision = async { + let! folders = TestsLocator.ListFolders namedSuite revision + let l = folders.Length + use progress = new ProgressBar(l, sprintf "Listing %i folders" l, barOptions) + let folderDownloads = + folders + |> Seq.map(fun folder -> TestsLocator.DownloadTestsInFolder folder namedSuite revision progress subBarOptions) + let! completed = Async.ForEachAsync 4 folderDownloads + return completed +} + From d4dd01adbd5f85f5fddfbeaa4137a56f73e8ea60 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Fri, 23 Aug 2019 14:12:20 +0200 Subject: [PATCH 13/85] stage --- src/Tests/Tests.YamlRunner/Program.fs | 34 +-- .../Tests.YamlRunner/Tests.YamlRunner.fsproj | 3 + src/Tests/Tests.YamlRunner/TestsDownloader.fs | 4 +- src/Tests/Tests.YamlRunner/TestsReader.fs | 220 ++++++++++++++++++ 4 files changed, 245 insertions(+), 16 deletions(-) create mode 100644 src/Tests/Tests.YamlRunner/TestsReader.fs diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index 5e5c7464b58..d48980b8e4d 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -2,6 +2,7 @@ open Argu open Tests.YamlRunner.Models +open Tests.YamlRunner.TestsReader type Arguments = | [] NamedSuite of TestSuite @@ -26,18 +27,23 @@ let runMain (parsed:ParseResults) = async { [] let main argv = - let parser = ArgumentParser.Create(programName = "yaml-test-runner") - let parsed = - try - Some <| parser.ParseCommandLine(inputs = argv, raiseOnUsage = true) - with e -> - printfn "%s" e.Message - None - match parsed with - | None -> 1 - | Some parsed -> - async { - do! Async.SwitchToThreadPool () - return! runMain parsed - } |> Async.RunSynchronously + let documents = TestsReader.test () + 0 + + +// let parser = ArgumentParser.Create(programName = "yaml-test-runner") +// let parsed = +// try +// Some <| parser.ParseCommandLine(inputs = argv, raiseOnUsage = true) +// with e -> +// printfn "%s" e.Message +// None +// match parsed with +// | None -> 1 +// | Some parsed -> +// async { +// do! Async.SwitchToThreadPool () +// return! runMain parsed +// } |> Async.RunSynchronously +// diff --git a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj index 2dc40ee19f1..d6a0e5fda95 100644 --- a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj +++ b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj @@ -10,6 +10,7 @@ + @@ -17,6 +18,8 @@ + + diff --git a/src/Tests/Tests.YamlRunner/TestsDownloader.fs b/src/Tests/Tests.YamlRunner/TestsDownloader.fs index 0ef04cd2eba..6dbb8e0bcb4 100644 --- a/src/Tests/Tests.YamlRunner/TestsDownloader.fs +++ b/src/Tests/Tests.YamlRunner/TestsDownloader.fs @@ -49,9 +49,9 @@ let CachedOrDownload revision folder file url = async { | (_, d) -> if (not d) then Directory.CreateDirectory(directory) |> ignore let! contents = download url - File.WriteAllText(file, contents) + let write = File.WriteAllTextAsync(file, contents) + do! Async.AwaitTask write return contents - } return (file, result) } diff --git a/src/Tests/Tests.YamlRunner/TestsReader.fs b/src/Tests/Tests.YamlRunner/TestsReader.fs new file mode 100644 index 00000000000..56ed267fcf4 --- /dev/null +++ b/src/Tests/Tests.YamlRunner/TestsReader.fs @@ -0,0 +1,220 @@ +module Tests.YamlRunner.TestsReader + +open System +open System +open System.Collections.Generic +open System.Text.RegularExpressions +open System.Linq + + +type Skip = { Version:string; Reason:string option } + +type DoCatch = + | BadRequest // bad_request, 400 response from ES + | Unauthorized //unauthorized a 401 response from ES + | Forbidden //forbidden a 403 response from ES + | Missing //missing a 404 response from ES + | RequestTimeout //request_timeout a 408 response from ES + | Conflict //conflict a 409 response from ES + | Unavailable//unavailable a 503 response from ES + | UnknownParameter //param a client-side error indicating an unknown parameter has been passed to the method + | OtherBadResponse //request 4xx-5xx error response from ES, not equal to any named response above + | Regex // /foo bar/ the text of the error message matches this regular expression + +let (|IsDoCatch|_|) (s:string) = + match s with + | "bad_request" -> Some BadRequest + | "unauthorized " -> Some Unauthorized + | "forbidden " -> Some Forbidden + | "missing " -> Some Missing + | "request_timeout " -> Some RequestTimeout + | "conflict " -> Some Conflict + | "unavailable " -> Some Unavailable + | "param " -> Some UnknownParameter + | "request " -> Some OtherBadResponse + | "regex" -> Some Regex + | _ -> None + +type NodeSelector = + | NodeVersionSelector of string + | NodeAttributeSelector of string * string + | NodeSelector of string * string * string + +type ResponseProperty = private ResponseProperty of string +type StashedId = private StashedId of string +type SetTransformation = private SetTransformation of string +type AssertPath = private AssertPath of string + +type Set = Map +type TransformAndSet = Map +type Match = Map +type NumericMatch = Map + +type Do = { + ApiCall: string * Object + Catch:DoCatch option + Warnings:option + NodeSelector:NodeSelector option +} + +type NumericAssert = + | LowerThan + | GreaterThan + | GreaterThanOrEqual + | LowerThanOrEqual + | Equal + | Length + +let (|IsNumericAssert|_|) (s:string) = + match s with + | "length" -> Some Length + | "eq" -> Some Equal + | "gte" -> Some GreaterThanOrEqual + | "lte" -> Some LowerThanOrEqual + | "gt" -> Some GreaterThan + | "lt" -> Some LowerThan + | _ -> None + +type Assert = + | IsTrue of AssertPath + | IsFalse of AssertPath + | Match of Match + | NumericAssert of NumericAssert * NumericMatch + +type Operation = + | Unknown of string + | Skip of Skip + | Do of Do + | Set of Set + | TransformAndSet of TransformAndSet + | Assert of Assert +type Operations = Operation list + +type YamlTest = { + Name:string; + Actions: Operations; +} + +type TestType = | Setup of Operations | Teardown of Operations | Suite of YamlTest + +type YamlMap = Dictionary + +let tryPick<'a> (map:YamlMap) key = + let found, value = map.TryGetValue key + if (found) then Some (value :?> 'a) else None + +let pick<'a> (map:YamlMap) key = + let found, value = map.TryGetValue key + if (found) then (value :?> 'a) + else failwithf "expected to find %s of type %s" key typeof<'a>.Name + +let mapSkip (operation:YamlMap) = + let version = pick operation "version" + let reason = tryPick operation "reason" + Skip { Version=version; Reason=reason } + +let mapNumericAssert (operation:YamlMap) = + operation + |> Seq.map (fun (kv) -> AssertPath (kv.Key :?> string), kv.Value :?> int64) + |> Map.ofSeq + +let firstValueAsPath (operation:YamlMap) = AssertPath (operation.Values.First() :?> string) + +let mapMatch (operation:YamlMap) = + operation + |> Seq.map (fun (kv) -> AssertPath (kv.Key :?> string), kv.Value) + |> Map.ofSeq + +let mapTransformAndSet (operation:YamlMap) = + operation + |> Seq.map (fun (kv) -> StashedId (kv.Key :?> string), SetTransformation (kv.Value :?> string)) + |> Map.ofSeq + +let mapSet (operation:YamlMap) = + operation + |> Seq.map (fun (kv) -> ResponseProperty (kv.Key :?> string), StashedId (kv.Value :?> string)) + |> Map.ofSeq + +let mapNodeSelector (operation:YamlMap) = + let version = tryPick operation "version" + let attribute = tryPick operation "attribute" + match (version, attribute) with + | (version, Some attribute) -> + let kv = attribute.First() + let key = kv.Key :?> string + let value = kv.Value :?> string + match version with + | Some version -> Some <| NodeSelector (version, key, value) + | None -> Some <| NodeAttributeSelector(key, value) + | (Some version, None) -> Some <| NodeVersionSelector(version) + | _ -> None + + +let mapDo (operation:YamlMap) = + + let last = operation.Last() + let lastKey = last.Key :?> string + let lastValue = last.Key + + let catch = + match tryPick operation "catch" with + | Some s -> + match s with | IsDoCatch s -> Some s | _ -> None + | _ -> None + + let warnings = + match tryPick> operation "warnings" with + | Some s -> Some (s |> Seq.toList) + | _ -> None + + let nodeSelector = mapNodeSelector operation + Do { + ApiCall = (lastKey, lastValue) + Catch = catch + Warnings = warnings + NodeSelector = nodeSelector + } + +let mapOperation (operation:YamlMap) = + let kv = operation.First(); + let key = kv.Key :?> string + let yamlMap = kv.Value :?> YamlMap + + match key with + | "skip" -> mapSkip yamlMap + | "set" -> Set <| mapSet yamlMap + | "transform_and_set" -> TransformAndSet <| mapTransformAndSet yamlMap + | "do" -> mapDo yamlMap + | "match" -> Assert <| Match (mapMatch yamlMap) + | "is_false" -> Assert <| IsFalse (firstValueAsPath yamlMap) + | "is_true" -> Assert <| IsTrue (firstValueAsPath yamlMap) + | IsNumericAssert n -> Assert <| NumericAssert (n, mapNumericAssert yamlMap) + | unknownOperation -> Unknown unknownOperation + +let mapOperations (operations:YamlMap list) = + operations |> List.map mapOperation + +let mapDocument (document:Dictionary) = + + let kv = document.First(); + + let list = (kv.Value :?> List) |> Enumerable.Cast |> Seq.toList |> mapOperations + + document + +let test () = + let document = "/tmp/elastic/tests-master/cat.aliases/10_basic.yml" + + let x = SharpYaml.Serialization.Serializer() + let contents = System.IO.File.ReadAllText document + let tests = + Regex.Split(contents, @"--- ?\r?\n") + |> Seq.filter (fun s -> not <| String.IsNullOrEmpty s) + |> Seq.map (fun document -> x.Deserialize> document) + |> Seq.filter (fun s -> s <> null) + |> Seq.map mapDocument + |> Seq.toList + + + tests + From ab1171c1fdb59ec31b0d61a466310e6ba09a2d3d Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Mon, 26 Aug 2019 12:02:37 +0200 Subject: [PATCH 14/85] stage --- src/Tests/Tests.YamlRunner/Models.fs | 97 ++++++++++++++ src/Tests/Tests.YamlRunner/TestsReader.fs | 146 +++++----------------- 2 files changed, 126 insertions(+), 117 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/Models.fs b/src/Tests/Tests.YamlRunner/Models.fs index 76faebbb283..9dcd1288836 100644 --- a/src/Tests/Tests.YamlRunner/Models.fs +++ b/src/Tests/Tests.YamlRunner/Models.fs @@ -1,4 +1,101 @@ module Tests.YamlRunner.Models +open System +open System.IO + type TestSuite = OpenSource | XPack +type Skip = { Version:string; Reason:string option } + +type DoCatch = + | BadRequest // bad_request, 400 response from ES + | Unauthorized //unauthorized a 401 response from ES + | Forbidden //forbidden a 403 response from ES + | Missing //missing a 404 response from ES + | RequestTimeout //request_timeout a 408 response from ES + | Conflict //conflict a 409 response from ES + | Unavailable//unavailable a 503 response from ES + | UnknownParameter //param a client-side error indicating an unknown parameter has been passed to the method + | OtherBadResponse //request 4xx-5xx error response from ES, not equal to any named response above + | Regex // /foo bar/ the text of the error message matches this regular expression + +let (|IsDoCatch|_|) (s:string) = + match s with + | "bad_request" -> Some BadRequest + | "unauthorized " -> Some Unauthorized + | "forbidden " -> Some Forbidden + | "missing " -> Some Missing + | "request_timeout " -> Some RequestTimeout + | "conflict " -> Some Conflict + | "unavailable " -> Some Unavailable + | "param " -> Some UnknownParameter + | "request " -> Some OtherBadResponse + | "regex" -> Some Regex + | _ -> None + +type NodeSelector = + | NodeVersionSelector of string + | NodeAttributeSelector of string * string + | NodeSelector of string * string * string + +type ResponseProperty = ResponseProperty of string + +type StashedId = private StashedId of string + with static member Create s = StashedId <| sprintf "$%s" s + +type SetTransformation = private SetTransformation of string + with static member Create s = SetTransformation <| sprintf "$%s" s +type AssertPath = AssertPath of string + +type Set = Map +type TransformAndSet = Map +type Match = Map +type NumericMatch = Map + +type Do = { + ApiCall: string * Object + Catch:DoCatch option + Warnings:option + NodeSelector:NodeSelector option +} + +type NumericAssert = + | LowerThan + | GreaterThan + | GreaterThanOrEqual + | LowerThanOrEqual + | Equal + | Length + +let (|IsNumericAssert|_|) (s:string) = + match s with + | "length" -> Some Length + | "eq" -> Some Equal + | "gte" -> Some GreaterThanOrEqual + | "lte" -> Some LowerThanOrEqual + | "gt" -> Some GreaterThan + | "lt" -> Some LowerThan + | _ -> None + +type Assert = + | IsTrue of AssertPath + | IsFalse of AssertPath + | Match of Match + | NumericAssert of NumericAssert * NumericMatch + +type Operation = + | Unknown of string + | Skip of Skip + | Do of Do + | Set of Set + | TransformAndSet of TransformAndSet + | Assert of Assert +type Operations = Operation list + +type YamlTest = { + Name:string + Operations: Operations +} + +type YamlTestSection = | Setup of Operations | Teardown of Operations | YamlTest of YamlTest + diff --git a/src/Tests/Tests.YamlRunner/TestsReader.fs b/src/Tests/Tests.YamlRunner/TestsReader.fs index 56ed267fcf4..8e6b24cc796 100644 --- a/src/Tests/Tests.YamlRunner/TestsReader.fs +++ b/src/Tests/Tests.YamlRunner/TestsReader.fs @@ -1,141 +1,51 @@ module Tests.YamlRunner.TestsReader -open System open System open System.Collections.Generic open System.Text.RegularExpressions open System.Linq - -type Skip = { Version:string; Reason:string option } - -type DoCatch = - | BadRequest // bad_request, 400 response from ES - | Unauthorized //unauthorized a 401 response from ES - | Forbidden //forbidden a 403 response from ES - | Missing //missing a 404 response from ES - | RequestTimeout //request_timeout a 408 response from ES - | Conflict //conflict a 409 response from ES - | Unavailable//unavailable a 503 response from ES - | UnknownParameter //param a client-side error indicating an unknown parameter has been passed to the method - | OtherBadResponse //request 4xx-5xx error response from ES, not equal to any named response above - | Regex // /foo bar/ the text of the error message matches this regular expression - -let (|IsDoCatch|_|) (s:string) = - match s with - | "bad_request" -> Some BadRequest - | "unauthorized " -> Some Unauthorized - | "forbidden " -> Some Forbidden - | "missing " -> Some Missing - | "request_timeout " -> Some RequestTimeout - | "conflict " -> Some Conflict - | "unavailable " -> Some Unavailable - | "param " -> Some UnknownParameter - | "request " -> Some OtherBadResponse - | "regex" -> Some Regex - | _ -> None - -type NodeSelector = - | NodeVersionSelector of string - | NodeAttributeSelector of string * string - | NodeSelector of string * string * string - -type ResponseProperty = private ResponseProperty of string -type StashedId = private StashedId of string -type SetTransformation = private SetTransformation of string -type AssertPath = private AssertPath of string - -type Set = Map -type TransformAndSet = Map -type Match = Map -type NumericMatch = Map - -type Do = { - ApiCall: string * Object - Catch:DoCatch option - Warnings:option - NodeSelector:NodeSelector option -} - -type NumericAssert = - | LowerThan - | GreaterThan - | GreaterThanOrEqual - | LowerThanOrEqual - | Equal - | Length - -let (|IsNumericAssert|_|) (s:string) = - match s with - | "length" -> Some Length - | "eq" -> Some Equal - | "gte" -> Some GreaterThanOrEqual - | "lte" -> Some LowerThanOrEqual - | "gt" -> Some GreaterThan - | "lt" -> Some LowerThan - | _ -> None - -type Assert = - | IsTrue of AssertPath - | IsFalse of AssertPath - | Match of Match - | NumericAssert of NumericAssert * NumericMatch - -type Operation = - | Unknown of string - | Skip of Skip - | Do of Do - | Set of Set - | TransformAndSet of TransformAndSet - | Assert of Assert -type Operations = Operation list - -type YamlTest = { - Name:string; - Actions: Operations; -} - -type TestType = | Setup of Operations | Teardown of Operations | Suite of YamlTest +open Tests.YamlRunner.Models type YamlMap = Dictionary -let tryPick<'a> (map:YamlMap) key = +let private tryPick<'a> (map:YamlMap) key = let found, value = map.TryGetValue key if (found) then Some (value :?> 'a) else None -let pick<'a> (map:YamlMap) key = +let private pick<'a> (map:YamlMap) key = let found, value = map.TryGetValue key if (found) then (value :?> 'a) else failwithf "expected to find %s of type %s" key typeof<'a>.Name -let mapSkip (operation:YamlMap) = +let private mapSkip (operation:YamlMap) = let version = pick operation "version" let reason = tryPick operation "reason" Skip { Version=version; Reason=reason } -let mapNumericAssert (operation:YamlMap) = +let private mapNumericAssert (operation:YamlMap) = operation |> Seq.map (fun (kv) -> AssertPath (kv.Key :?> string), kv.Value :?> int64) |> Map.ofSeq -let firstValueAsPath (operation:YamlMap) = AssertPath (operation.Values.First() :?> string) +let private firstValueAsPath (operation:YamlMap) = AssertPath (operation.Values.First() :?> string) -let mapMatch (operation:YamlMap) = +let private mapMatch (operation:YamlMap) = operation |> Seq.map (fun (kv) -> AssertPath (kv.Key :?> string), kv.Value) |> Map.ofSeq -let mapTransformAndSet (operation:YamlMap) = +let private mapTransformAndSet (operation:YamlMap) = operation - |> Seq.map (fun (kv) -> StashedId (kv.Key :?> string), SetTransformation (kv.Value :?> string)) + |> Seq.map (fun (kv) -> StashedId.Create (kv.Key :?> string), SetTransformation.Create (kv.Value :?> string)) |> Map.ofSeq -let mapSet (operation:YamlMap) = +let private mapSet (operation:YamlMap) = operation - |> Seq.map (fun (kv) -> ResponseProperty (kv.Key :?> string), StashedId (kv.Value :?> string)) + |> Seq.map (fun (kv) -> ResponseProperty (kv.Key :?> string), StashedId.Create (kv.Value :?> string)) |> Map.ofSeq -let mapNodeSelector (operation:YamlMap) = +let private mapNodeSelector (operation:YamlMap) = let version = tryPick operation "version" let attribute = tryPick operation "attribute" match (version, attribute) with @@ -150,7 +60,7 @@ let mapNodeSelector (operation:YamlMap) = | _ -> None -let mapDo (operation:YamlMap) = +let private mapDo (operation:YamlMap) = let last = operation.Last() let lastKey = last.Key :?> string @@ -175,7 +85,7 @@ let mapDo (operation:YamlMap) = NodeSelector = nodeSelector } -let mapOperation (operation:YamlMap) = +let private mapOperation (operation:YamlMap) = let kv = operation.First(); let key = kv.Key :?> string let yamlMap = kv.Value :?> YamlMap @@ -191,30 +101,32 @@ let mapOperation (operation:YamlMap) = | IsNumericAssert n -> Assert <| NumericAssert (n, mapNumericAssert yamlMap) | unknownOperation -> Unknown unknownOperation -let mapOperations (operations:YamlMap list) = +let private mapOperations (operations:YamlMap list) = operations |> List.map mapOperation -let mapDocument (document:Dictionary) = +let private mapDocument (document:Dictionary) = let kv = document.First(); + let key = kv.Key + let values = kv.Value :?> List - let list = (kv.Value :?> List) |> Enumerable.Cast |> Seq.toList |> mapOperations + let operations = values |> Enumerable.Cast |> Seq.toList |> mapOperations - document + match key with + | "setup" -> Setup operations + | "teardown" -> Teardown operations + | name -> YamlTest { Name=name; Operations=operations } -let test () = - let document = "/tmp/elastic/tests-master/cat.aliases/10_basic.yml" +let ReadYamlFile yamlString = - let x = SharpYaml.Serialization.Serializer() - let contents = System.IO.File.ReadAllText document - let tests = - Regex.Split(contents, @"--- ?\r?\n") + let serializer = SharpYaml.Serialization.Serializer() + let sections = + Regex.Split(yamlString, @"--- ?\r?\n") |> Seq.filter (fun s -> not <| String.IsNullOrEmpty s) - |> Seq.map (fun document -> x.Deserialize> document) + |> Seq.map (fun document -> serializer.Deserialize> document) |> Seq.filter (fun s -> s <> null) |> Seq.map mapDocument |> Seq.toList - - tests + sections From c9c86ff1f24dbece65739fce6e467bfd67e1fbab Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Mon, 26 Aug 2019 15:53:28 +0200 Subject: [PATCH 15/85] stage --- src/Tests/Tests.YamlRunner/AsyncExtensions.fs | 8 +- src/Tests/Tests.YamlRunner/Commands.fs | 14 ++- src/Tests/Tests.YamlRunner/Models.fs | 57 ++++++++- src/Tests/Tests.YamlRunner/Program.fs | 56 +++++---- src/Tests/Tests.YamlRunner/TestsLocator.fs | 24 ++-- src/Tests/Tests.YamlRunner/TestsReader.fs | 112 ++++++++++++++---- 6 files changed, 212 insertions(+), 59 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/AsyncExtensions.fs b/src/Tests/Tests.YamlRunner/AsyncExtensions.fs index d102eaa4c63..63f9e480f3a 100644 --- a/src/Tests/Tests.YamlRunner/AsyncExtensions.fs +++ b/src/Tests/Tests.YamlRunner/AsyncExtensions.fs @@ -15,17 +15,21 @@ module AsyncExtensions = // but for some reason this did not behave as I had expected [] static member inline ForEachAsync (maxDegreeOfParallelism: int) asyncs = async { - let tasks = new List>(maxDegreeOfParallelism) + let tasks = new List>() + let results = new List<'a>() for async in asyncs do let! x = Async.StartChildAsTask async tasks.Add <| x if (tasks.Count >= maxDegreeOfParallelism) then let! task = Async.AwaitTask <| Task.WhenAny(tasks) if (task.IsFaulted) then ExceptionDispatchInfo.Capture(task.Exception).Throw(); + results.Add(task.Result) let removed = tasks.Remove <| task ignore() + let! completed = Async.AwaitTask <| Task.WhenAll tasks - return completed + for c in completed do results.Add c + return results |> Seq.toList } [] diff --git a/src/Tests/Tests.YamlRunner/Commands.fs b/src/Tests/Tests.YamlRunner/Commands.fs index 40f61a06403..a7fbebcc30c 100644 --- a/src/Tests/Tests.YamlRunner/Commands.fs +++ b/src/Tests/Tests.YamlRunner/Commands.fs @@ -3,6 +3,8 @@ module Tests.YamlRunner.Commands open System open ShellProgressBar open Tests.YamlRunner.AsyncExtensions +open Tests.YamlRunner.TestsLocator +open Tests.YamlRunner.TestsReader let private barOptions = ProgressBarOptions( @@ -13,7 +15,9 @@ let private barOptions = ) let private subBarOptions = ProgressBarOptions(ForegroundColor = ConsoleColor.Yellow, ForegroundColorDone = Nullable ConsoleColor.DarkGreen, ProgressCharacter = '─') - + + + let LocateTests namedSuite revision = async { let! folders = TestsLocator.ListFolders namedSuite revision let l = folders.Length @@ -22,6 +26,12 @@ let LocateTests namedSuite revision = async { folders |> Seq.map(fun folder -> TestsLocator.DownloadTestsInFolder folder namedSuite revision progress subBarOptions) let! completed = Async.ForEachAsync 4 folderDownloads - return completed + return completed } +let ReadTests (tests:LocateResults list) = + + let readPaths paths = paths |> List.map TestsReader.ReadYamlFile + + tests |> List.map (fun t -> { Folder= t.Folder; Files = readPaths t.Paths}) + diff --git a/src/Tests/Tests.YamlRunner/Models.fs b/src/Tests/Tests.YamlRunner/Models.fs index 9dcd1288836..6cee375f546 100644 --- a/src/Tests/Tests.YamlRunner/Models.fs +++ b/src/Tests/Tests.YamlRunner/Models.fs @@ -2,11 +2,10 @@ module Tests.YamlRunner.Models open System open System.IO +open System.Linq.Expressions type TestSuite = OpenSource | XPack -type Skip = { Version:string; Reason:string option } - type DoCatch = | BadRequest // bad_request, 400 response from ES | Unauthorized //unauthorized a 401 response from ES @@ -36,11 +35,12 @@ let (|IsDoCatch|_|) (s:string) = type NodeSelector = | NodeVersionSelector of string | NodeAttributeSelector of string * string - | NodeSelector of string * string * string + | VersionAndAttributeSelector of string * string * string type ResponseProperty = ResponseProperty of string type StashedId = private StashedId of string + // TODO handle $ when already on s with static member Create s = StashedId <| sprintf "$%s" s type SetTransformation = private SetTransformation of string @@ -50,7 +50,8 @@ type AssertPath = AssertPath of string type Set = Map type TransformAndSet = Map type Match = Map -type NumericMatch = Map +type NumericValue = Fixed of int64 | StashedId of StashedId +type NumericMatch = Map type Do = { ApiCall: string * Object @@ -59,6 +60,41 @@ type Do = { NodeSelector:NodeSelector option } +type Feature = + | CatchUnauthorized // "catch_unauthorized", + | DefaultShards // "default_shards", + | EmbeddedStashKey // "embedded_stash_key", + | Headers // "headers", + | NodeSelector // "node_selector", + | StashInKey // "stash_in_key", + | StashInPath // "stash_in_path", + | StashPathReplace // "stash_path_replace", + | Warnings // "warnings", + | Yaml // "yaml", + | Contains // "contains", + | TransformAndSet // "transform_and_set", + | ArbitraryKey // "arbitrary_key" + | Unsupported of string + +let (|ToFeature|) (s:string) = + match s with + | "catch_unauthorized" -> CatchUnauthorized + | "default_shards" -> DefaultShards + | "embedded_stash_key" -> EmbeddedStashKey + | "headers" -> Headers + | "node_selector" -> NodeSelector + | "stash_in_key" -> StashInKey + | "stash_in_path" -> StashInPath + | "stash_path_replace" -> StashPathReplace + | "warnings" -> Warnings + | "yaml" -> Yaml + | "contains" -> Contains + | "transform_and_set" -> TransformAndSet + | "arbitrary_key" -> ArbitraryKey + | s -> Unsupported s + +type Skip = { Version:string option; Reason:string option; Features: Feature list option } + type NumericAssert = | LowerThan | GreaterThan @@ -90,6 +126,19 @@ type Operation = | Set of Set | TransformAndSet of TransformAndSet | Assert of Assert + +let (|IsOperation|_|) (s:string) = + match s with + | "skip" + | "set" + | "transform_and_set" + | "do" + | "match" + | "is_false" + | "is_true" -> Some s + | IsNumericAssert n -> Some s + | _ -> None + type Operations = Operation list type YamlTest = { diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index d48980b8e4d..58a043d2cb9 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -3,6 +3,7 @@ open Argu open Tests.YamlRunner.Models open Tests.YamlRunner.TestsReader +open Tests.YamlRunner.TestsLocator type Arguments = | [] NamedSuite of TestSuite @@ -20,7 +21,26 @@ let runMain (parsed:ParseResults) = async { let namedSuite = parsed.TryGetResult NamedSuite |> Option.defaultValue OpenSource let revision = parsed.TryGetResult Revision |> Option.defaultValue "master" - let! locateResults = Commands.LocateTests namedSuite revision + +// let test = TestsLocator.TestLocalFile "/tmp/elastic/tests-master/bulk/60_deprecated.yml" +// let read = TestsReader.ReadYamlFile test + + + let! locateResults = Commands.LocateTests namedSuite revision + let readResults = Commands.ReadTests locateResults +// +// printfn "folders: %O" locateResults.Length +// for folder in locateResults do +// printfn "folder: %O" folder.Folder +// for p in folder.Paths do +// printfn " %s" p.File + + printfn "folders: %O" locateResults.Length + for folder in readResults do + printfn "folder: %O" folder.Folder + for f in folder.Files do + for t in f.Tests do + printfn " %s (%i tests)" t.Name t.Operations.Length return 0 } @@ -28,22 +48,18 @@ let runMain (parsed:ParseResults) = async { [] let main argv = - let documents = TestsReader.test () - 0 - - -// let parser = ArgumentParser.Create(programName = "yaml-test-runner") -// let parsed = -// try -// Some <| parser.ParseCommandLine(inputs = argv, raiseOnUsage = true) -// with e -> -// printfn "%s" e.Message -// None -// match parsed with -// | None -> 1 -// | Some parsed -> -// async { -// do! Async.SwitchToThreadPool () -// return! runMain parsed -// } |> Async.RunSynchronously -// + let parser = ArgumentParser.Create(programName = "yaml-test-runner") + let parsed = + try + Some <| parser.ParseCommandLine(inputs = argv, raiseOnUsage = true) + with e -> + printfn "%s" e.Message + None + match parsed with + | None -> 1 + | Some parsed -> + async { + do! Async.SwitchToThreadPool () + return! runMain parsed + } |> Async.RunSynchronously + diff --git a/src/Tests/Tests.YamlRunner/TestsLocator.fs b/src/Tests/Tests.YamlRunner/TestsLocator.fs index ac137fb2742..20cb5e02495 100644 --- a/src/Tests/Tests.YamlRunner/TestsLocator.fs +++ b/src/Tests/Tests.YamlRunner/TestsLocator.fs @@ -31,9 +31,15 @@ let ListFolderFiles namedSuite revision folder = async { return yamlFiles } +type YamlFileInfo = { File: string; Yaml: string } + +let TestLocalFile file = + let yaml = System.IO.File.ReadAllText file + { File = file; Yaml = yaml } + let private downloadTestsInFolder (yamlFiles:list) folder revision (progress: IProgressBar) subBarOptions = async { let mutable seenFiles = 0; - let filesProgress = progress.Spawn(yamlFiles.Length, sprintf "Downloading [0/%i] files in %s" yamlFiles.Length folder, subBarOptions) + use filesProgress = progress.Spawn(yamlFiles.Length, sprintf "Downloading [0/%i] files in %s" yamlFiles.Length folder, subBarOptions) let actions = yamlFiles |> Seq.map (fun (file, url) -> async { @@ -46,13 +52,17 @@ let private downloadTestsInFolder (yamlFiles:list) folder revis progress.WriteLine(sprintf "Skipped %s since it returned no data" url) return None | _ -> - return Some localFile + return Some {File = localFile; Yaml = yaml} }) + |> Seq.toList let! completed = Async.ForEachAsync 4 actions - return completed + let files = completed |> List.choose id; + return files } +type LocateResults = { Folder: string; Paths: YamlFileInfo list } + let DownloadTestsInFolder folder namedSuite revision (progress: IProgressBar) subBarOptions = async { let! token = Async.StartChild <| ListFolderFiles namedSuite revision folder let! yamlFiles = token @@ -60,11 +70,11 @@ let DownloadTestsInFolder folder namedSuite revision (progress: IProgressBar) su match yamlFiles.Length with | 0 -> progress.WriteLine(sprintf "%s folder yielded no tests" folder) - return None - | _ -> + return List.empty + | x -> let! result = downloadTestsInFolder yamlFiles folder revision progress subBarOptions - return Some <| result + return result } progress.Tick() - return localFiles; + return { Folder = folder; Paths = localFiles } } diff --git a/src/Tests/Tests.YamlRunner/TestsReader.fs b/src/Tests/Tests.YamlRunner/TestsReader.fs index 8e6b24cc796..1e4d6ec800e 100644 --- a/src/Tests/Tests.YamlRunner/TestsReader.fs +++ b/src/Tests/Tests.YamlRunner/TestsReader.fs @@ -6,26 +6,59 @@ open System.Text.RegularExpressions open System.Linq open Tests.YamlRunner.Models +open Tests.YamlRunner.TestsLocator type YamlMap = Dictionary +type YamlValue = YamlDictionary of YamlMap | YamlString of string let private tryPick<'a> (map:YamlMap) key = let found, value = map.TryGetValue key if (found) then Some (value :?> 'a) else None +let private tryPickList<'a,'b> (map:YamlMap) key parse = + let found, value = map.TryGetValue key + if (found) then + let value = + value :?> List + |> Seq.map (fun o -> o :?> 'a) + |> Seq.map parse + |> Seq.toList<'b> + Some value + else None + let private pick<'a> (map:YamlMap) key = let found, value = map.TryGetValue key if (found) then (value :?> 'a) else failwithf "expected to find %s of type %s" key typeof<'a>.Name let private mapSkip (operation:YamlMap) = - let version = pick operation "version" + let version = tryPick operation "version" let reason = tryPick operation "reason" - Skip { Version=version; Reason=reason } + let parseFeature s = match s with | ToFeature s -> s + let features = + let found, value= operation.TryGetValue "features" + match (found, value) with + | (false, _) -> None + | (_, x) -> + match x with + | :? List -> tryPickList operation "features" parseFeature + | :? String as feature -> Some [parseFeature feature] + | _ -> None + + + Skip { Version=version; Reason=reason; Features=features } let private mapNumericAssert (operation:YamlMap) = operation - |> Seq.map (fun (kv) -> AssertPath (kv.Key :?> string), kv.Value :?> int64) + |> Seq.map (fun (kv) -> + let v = + match kv.Value with + | :? int32 as i -> Fixed <| Convert.ToInt64 kv.Value + | :? int64 as i -> Fixed <| i + | :? string as i -> StashedId <| StashedId.Create i + | _ -> failwithf "unsupported %s" (kv.Value.GetType().Name) + AssertPath (kv.Key :?> string), v + ) |> Map.ofSeq let private firstValueAsPath (operation:YamlMap) = AssertPath (operation.Values.First() :?> string) @@ -54,7 +87,7 @@ let private mapNodeSelector (operation:YamlMap) = let key = kv.Key :?> string let value = kv.Value :?> string match version with - | Some version -> Some <| NodeSelector (version, key, value) + | Some version -> Some <| VersionAndAttributeSelector (version, key, value) | None -> Some <| NodeAttributeSelector(key, value) | (Some version, None) -> Some <| NodeVersionSelector(version) | _ -> None @@ -72,10 +105,7 @@ let private mapDo (operation:YamlMap) = match s with | IsDoCatch s -> Some s | _ -> None | _ -> None - let warnings = - match tryPick> operation "warnings" with - | Some s -> Some (s |> Seq.toList) - | _ -> None + let warnings = tryPickList operation "warnings" id let nodeSelector = mapNodeSelector operation Do { @@ -88,17 +118,26 @@ let private mapDo (operation:YamlMap) = let private mapOperation (operation:YamlMap) = let kv = operation.First(); let key = kv.Key :?> string - let yamlMap = kv.Value :?> YamlMap + let yamlValue : YamlValue = + match kv.Value with + | :? YamlMap as m -> YamlDictionary m + | :? string as s -> YamlString s + | _ -> failwithf "unsupported %s" (kv.Value.GetType().Name) match key with - | "skip" -> mapSkip yamlMap - | "set" -> Set <| mapSet yamlMap - | "transform_and_set" -> TransformAndSet <| mapTransformAndSet yamlMap - | "do" -> mapDo yamlMap - | "match" -> Assert <| Match (mapMatch yamlMap) - | "is_false" -> Assert <| IsFalse (firstValueAsPath yamlMap) - | "is_true" -> Assert <| IsTrue (firstValueAsPath yamlMap) - | IsNumericAssert n -> Assert <| NumericAssert (n, mapNumericAssert yamlMap) + | IsOperation s -> + match (s, yamlValue) with + | ("skip", YamlDictionary map) -> mapSkip map + | ("set", YamlDictionary map) -> Set <| mapSet map + | ("transform_and_set", YamlDictionary map) -> TransformAndSet <| mapTransformAndSet map + | ("do", YamlDictionary map) -> mapDo map + | ("match", YamlDictionary map) -> Assert <| Match (mapMatch map) + | ("is_false", YamlDictionary map) -> Assert <| IsFalse (firstValueAsPath map) + | ("is_true", YamlDictionary map) -> Assert <| IsTrue (firstValueAsPath map) + | ("is_false", YamlString str) -> Assert <| IsFalse (AssertPath str) + | ("is_true", YamlString str) -> Assert <| IsTrue (AssertPath str) + | (IsNumericAssert n, YamlDictionary map) -> Assert <| NumericAssert (n, mapNumericAssert map) + | (k, v) -> failwithf "%s does not support %s" k (v.GetType().Name) | unknownOperation -> Unknown unknownOperation let private mapOperations (operations:YamlMap list) = @@ -117,16 +156,41 @@ let private mapDocument (document:Dictionary) = | "teardown" -> Teardown operations | name -> YamlTest { Name=name; Operations=operations } -let ReadYamlFile yamlString = +type YamlTestDocument = { + Setup: Operations option + Teardown: Operations option + Tests: YamlTest list +} + +let private toDocument (sections:YamlTestSection list) = + { + Setup = sections |> List.tryPick (fun s -> match s with | Setup s -> Some s | _ -> None) + Teardown = sections |> List.tryPick (fun s -> match s with | Teardown s -> Some s | _ -> None) + Tests = sections |> List.map (fun s -> match s with | YamlTest s -> Some s | _ -> None) |> List.choose id + } + +type ReadResults = { Folder: string; Files: YamlTestDocument list } + +let ReadYamlFile (yamlInfo:YamlFileInfo) = let serializer = SharpYaml.Serialization.Serializer() let sections = - Regex.Split(yamlString, @"--- ?\r?\n") - |> Seq.filter (fun s -> not <| String.IsNullOrEmpty s) - |> Seq.map (fun document -> serializer.Deserialize> document) - |> Seq.filter (fun s -> s <> null) - |> Seq.map mapDocument + Regex.Split(yamlInfo.Yaml, @"---\s*?\r?\n") + |> Seq.filter (fun s -> not <| String.IsNullOrWhiteSpace s) + |> Seq.map (fun sectionString -> + printfn "%s" sectionString + try + (sectionString, serializer.Deserialize> sectionString) + with | e -> failwithf "parseError %s: %s %s %s" yamlInfo.File e.Message Environment.NewLine sectionString + ) + |> Seq.filter (fun (s, _) -> s <> null) + |> Seq.map (fun (s, document) -> + try + mapDocument document + with | e -> failwithf "mapError %s: %O %O %O" yamlInfo.File (e.Message) Environment.NewLine s + ) |> Seq.toList + |> toDocument - sections + sections From c74ae3a1adbbd20b51d122f5711a5ce329087444 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Mon, 26 Aug 2019 18:46:46 +0200 Subject: [PATCH 16/85] stage --- src/Tests/Tests.YamlRunner/Models.fs | 2 +- src/Tests/Tests.YamlRunner/Program.fs | 2 +- src/Tests/Tests.YamlRunner/TestsReader.fs | 11 ++++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/Models.fs b/src/Tests/Tests.YamlRunner/Models.fs index 6cee375f546..ee856b5a354 100644 --- a/src/Tests/Tests.YamlRunner/Models.fs +++ b/src/Tests/Tests.YamlRunner/Models.fs @@ -50,7 +50,7 @@ type AssertPath = AssertPath of string type Set = Map type TransformAndSet = Map type Match = Map -type NumericValue = Fixed of int64 | StashedId of StashedId +type NumericValue = Fixed of double | StashedId of StashedId type NumericMatch = Map type Do = { diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index 58a043d2cb9..94c590ff011 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -40,7 +40,7 @@ let runMain (parsed:ParseResults) = async { printfn "folder: %O" folder.Folder for f in folder.Files do for t in f.Tests do - printfn " %s (%i tests)" t.Name t.Operations.Length + printfn " %s (%i steps)" t.Name t.Operations.Length return 0 } diff --git a/src/Tests/Tests.YamlRunner/TestsReader.fs b/src/Tests/Tests.YamlRunner/TestsReader.fs index 1e4d6ec800e..d472bc6f363 100644 --- a/src/Tests/Tests.YamlRunner/TestsReader.fs +++ b/src/Tests/Tests.YamlRunner/TestsReader.fs @@ -53,8 +53,9 @@ let private mapNumericAssert (operation:YamlMap) = |> Seq.map (fun (kv) -> let v = match kv.Value with - | :? int32 as i -> Fixed <| Convert.ToInt64 kv.Value - | :? int64 as i -> Fixed <| i + | :? int32 as i -> Fixed <| Convert.ToDouble i + | :? int64 as i -> Fixed <| Convert.ToDouble i + | :? double as i -> Fixed <| Convert.ToDouble i | :? string as i -> StashedId <| StashedId.Create i | _ -> failwithf "unsupported %s" (kv.Value.GetType().Name) AssertPath (kv.Key :?> string), v @@ -175,19 +176,19 @@ let ReadYamlFile (yamlInfo:YamlFileInfo) = let serializer = SharpYaml.Serialization.Serializer() let sections = + let r e message = raise <| new Exception(message, e) Regex.Split(yamlInfo.Yaml, @"---\s*?\r?\n") |> Seq.filter (fun s -> not <| String.IsNullOrWhiteSpace s) |> Seq.map (fun sectionString -> - printfn "%s" sectionString try (sectionString, serializer.Deserialize> sectionString) - with | e -> failwithf "parseError %s: %s %s %s" yamlInfo.File e.Message Environment.NewLine sectionString + with | e -> r e <| sprintf "parseError %s: %s %s %s" yamlInfo.File e.Message Environment.NewLine sectionString ) |> Seq.filter (fun (s, _) -> s <> null) |> Seq.map (fun (s, document) -> try mapDocument document - with | e -> failwithf "mapError %s: %O %O %O" yamlInfo.File (e.Message) Environment.NewLine s + with | e -> r e <| sprintf "mapError %s: %O %O %O" yamlInfo.File (e.Message) Environment.NewLine s ) |> Seq.toList |> toDocument From 2b03bbb8db6fa75676d8cf42c29577dc679498d2 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Mon, 26 Aug 2019 20:17:02 +0200 Subject: [PATCH 17/85] stage --- src/Tests/Tests.YamlRunner/Commands.fs | 10 ++- src/Tests/Tests.YamlRunner/Program.fs | 16 +++-- .../Tests.YamlRunner/Tests.YamlRunner.fsproj | 1 + src/Tests/Tests.YamlRunner/TestsDownloader.fs | 2 +- src/Tests/Tests.YamlRunner/TestsReader.fs | 9 ++- src/Tests/Tests.YamlRunner/TestsRunner.fs | 66 +++++++++++++++++++ 6 files changed, 92 insertions(+), 12 deletions(-) create mode 100644 src/Tests/Tests.YamlRunner/TestsRunner.fs diff --git a/src/Tests/Tests.YamlRunner/Commands.fs b/src/Tests/Tests.YamlRunner/Commands.fs index a7fbebcc30c..712ffab5023 100644 --- a/src/Tests/Tests.YamlRunner/Commands.fs +++ b/src/Tests/Tests.YamlRunner/Commands.fs @@ -16,8 +16,6 @@ let private barOptions = let private subBarOptions = ProgressBarOptions(ForegroundColor = ConsoleColor.Yellow, ForegroundColorDone = Nullable ConsoleColor.DarkGreen, ProgressCharacter = '─') - - let LocateTests namedSuite revision = async { let! folders = TestsLocator.ListFolders namedSuite revision let l = folders.Length @@ -34,4 +32,12 @@ let ReadTests (tests:LocateResults list) = let readPaths paths = paths |> List.map TestsReader.ReadYamlFile tests |> List.map (fun t -> { Folder= t.Folder; Files = readPaths t.Paths}) + +let RunTests (tests:YamlTestFolder list) = async { + let l = tests.Length + use progress = new ProgressBar(l, sprintf "Running %i folders" l, barOptions) + let a = TestsRunner.RunTestsInFolder progress subBarOptions + let! x = Async.Sequential <| (tests |> List.map a) + return x +} diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index 94c590ff011..c374fc362a9 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -28,6 +28,10 @@ let runMain (parsed:ParseResults) = async { let! locateResults = Commands.LocateTests namedSuite revision let readResults = Commands.ReadTests locateResults + let! runTesults = Commands.RunTests readResults + + + // // printfn "folders: %O" locateResults.Length // for folder in locateResults do @@ -35,12 +39,12 @@ let runMain (parsed:ParseResults) = async { // for p in folder.Paths do // printfn " %s" p.File - printfn "folders: %O" locateResults.Length - for folder in readResults do - printfn "folder: %O" folder.Folder - for f in folder.Files do - for t in f.Tests do - printfn " %s (%i steps)" t.Name t.Operations.Length +// printfn "folders: %O" locateResults.Length +// for folder in readResults do +// printfn "folder: %O" folder.Folder +// for f in folder.Files do +// for t in f.Tests do +// printfn " %s (%i steps)" t.Name t.Operations.Length return 0 } diff --git a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj index d6a0e5fda95..eea08062791 100644 --- a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj +++ b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj @@ -11,6 +11,7 @@ + diff --git a/src/Tests/Tests.YamlRunner/TestsDownloader.fs b/src/Tests/Tests.YamlRunner/TestsDownloader.fs index 6dbb8e0bcb4..24897906e97 100644 --- a/src/Tests/Tests.YamlRunner/TestsDownloader.fs +++ b/src/Tests/Tests.YamlRunner/TestsDownloader.fs @@ -26,7 +26,7 @@ let TestRawUrl namedSuite revision folder file = let path = path namedSuite revision sprintf "%s/%s/%s/%s" rootRawUrl path folder file -let randomTime = Random() +let private randomTime = Random() let TemporaryPath revision = lazy(Path.Combine(Path.GetTempPath(), "elastic", sprintf "tests-%s" revision)) diff --git a/src/Tests/Tests.YamlRunner/TestsReader.fs b/src/Tests/Tests.YamlRunner/TestsReader.fs index d472bc6f363..db98fc7536f 100644 --- a/src/Tests/Tests.YamlRunner/TestsReader.fs +++ b/src/Tests/Tests.YamlRunner/TestsReader.fs @@ -5,6 +5,7 @@ open System.Collections.Generic open System.Text.RegularExpressions open System.Linq +open System.IO open Tests.YamlRunner.Models open Tests.YamlRunner.TestsLocator @@ -158,19 +159,21 @@ let private mapDocument (document:Dictionary) = | name -> YamlTest { Name=name; Operations=operations } type YamlTestDocument = { + FileInfo: FileInfo Setup: Operations option Teardown: Operations option Tests: YamlTest list } -let private toDocument (sections:YamlTestSection list) = +let private toDocument (yamlInfo:YamlFileInfo) (sections:YamlTestSection list) = { + FileInfo = FileInfo yamlInfo.File Setup = sections |> List.tryPick (fun s -> match s with | Setup s -> Some s | _ -> None) Teardown = sections |> List.tryPick (fun s -> match s with | Teardown s -> Some s | _ -> None) Tests = sections |> List.map (fun s -> match s with | YamlTest s -> Some s | _ -> None) |> List.choose id } -type ReadResults = { Folder: string; Files: YamlTestDocument list } +type YamlTestFolder = { Folder: string; Files: YamlTestDocument list } let ReadYamlFile (yamlInfo:YamlFileInfo) = @@ -191,7 +194,7 @@ let ReadYamlFile (yamlInfo:YamlFileInfo) = with | e -> r e <| sprintf "mapError %s: %O %O %O" yamlInfo.File (e.Message) Environment.NewLine s ) |> Seq.toList - |> toDocument + |> toDocument yamlInfo sections diff --git a/src/Tests/Tests.YamlRunner/TestsRunner.fs b/src/Tests/Tests.YamlRunner/TestsRunner.fs new file mode 100644 index 00000000000..0a09b7f05da --- /dev/null +++ b/src/Tests/Tests.YamlRunner/TestsRunner.fs @@ -0,0 +1,66 @@ +module Tests.YamlRunner.TestsRunner + +open System +open System.Threading +open ShellProgressBar +open Tests.YamlRunner +open Tests.YamlRunner.AsyncExtensions +open Tests.YamlRunner.Models +open Tests.YamlRunner.TestsReader + +let private randomTime = Random() +let RunOperation (progress:IProgressBar) m operation = async { + let! x = Async.Sleep <| randomTime.Next(500, 900) + return true +} + +let RunOperations (progress:IProgressBar) (barOptions:ProgressBarOptions) m (ops:Operations) = + let mutable seen = 0; + let l = ops.Length + progress.WriteLine <| m + use progress = progress.Spawn(l, sprintf "%s [0/%i] operations" m l, barOptions) + let actions = + ops + |> List.map (fun op -> async { + let i = Interlocked.Increment (&seen) + let message = sprintf "%s [%i/%i] operations" m i l + let! x = Async.Sleep <| randomTime.Next(500, 900) + let! pass = RunOperation progress m op + progress.Tick(message) + return pass + }) + + let x = Async.Sequential actions + x + + +let asyncIter f inp = async { + match inp with + | None -> return None + | Some v -> + let! x = f v + return Some x +} +let RunTestFile (progress:IProgressBar) (subBarOptions:ProgressBarOptions) (file:YamlTestDocument) = async { + let message m = sprintf "%s: %s" m file.FileInfo.Name + let f a = RunOperations progress subBarOptions <| message a + let! x = Async.Sleep <| randomTime.Next(500, 900) + let passed = file.Setup |> (asyncIter (f "setup")) + let! x = Async.Sleep <| randomTime.Next(500, 900) + let passed = file.Tests |> Seq.map (fun s -> s.Operations |> f s.Name) + let! x = Async.Sleep <| randomTime.Next(500, 900) + let passed = file.Teardown |> asyncIter (f "teardown") + let! x = Async.Sleep <| randomTime.Next(500, 900) + progress.Tick(); + +} + +let RunTestsInFolder (progress:IProgressBar) (subBarOptions:ProgressBarOptions) (folder:YamlTestFolder) = async { + + let! x = Async.Sleep <| randomTime.Next(500, 900) + let actions = folder.Files |> List.map (fun f -> RunTestFile progress subBarOptions f) + + let! completed = Async.ForEachAsync 2 actions + return completed +} + From 9ecceb56b6210cb10bad67c8a72ba6adfac85825 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 27 Aug 2019 08:28:02 +0200 Subject: [PATCH 18/85] stage --- src/Elasticsearch.sln | 7 -- src/Tests/Tests.Yaml/Class1.cs | 60 ------------ src/Tests/Tests.Yaml/GeneratorLocations.cs | 33 ------- src/Tests/Tests.Yaml/Tests.Yaml.csproj | 18 ---- src/Tests/Tests.Yaml/YamlTestDownloader.cs | 108 --------------------- 5 files changed, 226 deletions(-) delete mode 100644 src/Tests/Tests.Yaml/Class1.cs delete mode 100644 src/Tests/Tests.Yaml/GeneratorLocations.cs delete mode 100644 src/Tests/Tests.Yaml/Tests.Yaml.csproj delete mode 100644 src/Tests/Tests.Yaml/YamlTestDownloader.cs diff --git a/src/Elasticsearch.sln b/src/Elasticsearch.sln index a5790ca43ec..f160ec9b3d6 100644 --- a/src/Elasticsearch.sln +++ b/src/Elasticsearch.sln @@ -83,8 +83,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Examples", "Examples\Exampl EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExamplesGenerator", "Examples\ExamplesGenerator\ExamplesGenerator.csproj", "{78B04D5D-FBB1-4E4D-B484-45953B9480C8}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.Yaml", "Tests\Tests.Yaml\Tests.Yaml.csproj", "{4A35665D-83E8-49E0-AD99-7573606DD78A}" -EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Tests.YamlRunner", "Tests\Tests.YamlRunner\Tests.YamlRunner.fsproj", "{81473437-5722-4829-A5CD-125B17CCA238}" EndProject Global @@ -116,7 +114,6 @@ Global {BA4C7FC9-13AD-4632-9A51-FAAD376E70BE} = {14241027-0A92-466D-B024-E0063F338915} {27BFE628-6BE9-48E7-891F-E228DBF0E294} = {40A4ECFA-F8A7-4560-861E-0B8A1DE1C49D} {78B04D5D-FBB1-4E4D-B484-45953B9480C8} = {40A4ECFA-F8A7-4560-861E-0B8A1DE1C49D} - {4A35665D-83E8-49E0-AD99-7573606DD78A} = {6C4A2627-AF22-4388-9DF7-7A9AEACFD635} {81473437-5722-4829-A5CD-125B17CCA238} = {6C4A2627-AF22-4388-9DF7-7A9AEACFD635} EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution @@ -188,10 +185,6 @@ Global {78B04D5D-FBB1-4E4D-B484-45953B9480C8}.Debug|Any CPU.Build.0 = Debug|Any CPU {78B04D5D-FBB1-4E4D-B484-45953B9480C8}.Release|Any CPU.ActiveCfg = Release|Any CPU {78B04D5D-FBB1-4E4D-B484-45953B9480C8}.Release|Any CPU.Build.0 = Release|Any CPU - {4A35665D-83E8-49E0-AD99-7573606DD78A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4A35665D-83E8-49E0-AD99-7573606DD78A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4A35665D-83E8-49E0-AD99-7573606DD78A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4A35665D-83E8-49E0-AD99-7573606DD78A}.Release|Any CPU.Build.0 = Release|Any CPU {81473437-5722-4829-A5CD-125B17CCA238}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {81473437-5722-4829-A5CD-125B17CCA238}.Debug|Any CPU.Build.0 = Debug|Any CPU {81473437-5722-4829-A5CD-125B17CCA238}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/src/Tests/Tests.Yaml/Class1.cs b/src/Tests/Tests.Yaml/Class1.cs deleted file mode 100644 index b62e2531852..00000000000 --- a/src/Tests/Tests.Yaml/Class1.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.IO; -using System.Threading.Tasks; - -namespace Tests.Yaml -{ - - public static class Program - { - private static readonly string DownloadBranch = "master"; - - public static async Task Main() - { - var redownloadCoreSpecification = false; - var generateCode = false; - var downloadBranch = DownloadBranch; - - Console.WriteLine(GeneratorLocations.Root); - return; - - var answer = "invalid"; - while (answer != "y" && answer != "n" && answer != "") - { - Console.Write("Download online yaml test specifications? [y/N] (default N): "); - answer = Console.ReadLine()?.Trim().ToLowerInvariant(); - redownloadCoreSpecification = answer == "y"; - } - - if (redownloadCoreSpecification) - { - Console.Write($"Branch to download yaml test specifications from (default {downloadBranch}): "); - var readBranch = Console.ReadLine()?.Trim(); - if (!string.IsNullOrEmpty(readBranch)) downloadBranch = readBranch; - } - else - { - // read last downloaded branch from file. - //if (File.Exists(GeneratorLocations.LastDownloadedVersionFile)) - //downloadBranch = File.ReadAllText(GeneratorLocations.LastDownloadedVersionFile); - } - - if (string.IsNullOrEmpty(downloadBranch)) - downloadBranch = DownloadBranch; - - if (redownloadCoreSpecification) - YamlTestDownloader.Download(downloadBranch); - - answer = "invalid"; - while (answer != "y" && answer != "n" && answer != "") - { - Console.Write("Generate code from the specification files on disk? [Y/n] (default Y): "); - answer = Console.ReadLine()?.Trim().ToLowerInvariant(); - generateCode = answer == "y" || answer == ""; - } - //if (generateCode) - //await Generator.ApiGenerator.Generate(downloadBranch, "Core", "XPack"); - } - } - -} diff --git a/src/Tests/Tests.Yaml/GeneratorLocations.cs b/src/Tests/Tests.Yaml/GeneratorLocations.cs deleted file mode 100644 index 9c75fe09404..00000000000 --- a/src/Tests/Tests.Yaml/GeneratorLocations.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.IO; -using System.Reflection; - -namespace Tests.Yaml -{ - public static class GeneratorLocations - { - private static string _root; - /// - /// Points to the root of the project whether it's run through the editor or the .NET cli tool. - /// - public static string Root - { - get - { - if (_root != null) return _root; - - var pwd = Directory.GetCurrentDirectory(); - var directoryInfo = new DirectoryInfo(pwd); - - var runningAsDnx = - directoryInfo.Name == "Tests.Yaml" && - directoryInfo.Parent != null && - directoryInfo.Parent.Name == "Tests"; - - var relative = runningAsDnx ? "" : @"../../../"; - var fullPath = Path.Combine(pwd, relative); - _root = Path.GetFullPath(fullPath); - return _root; - } - } - } -} diff --git a/src/Tests/Tests.Yaml/Tests.Yaml.csproj b/src/Tests/Tests.Yaml/Tests.Yaml.csproj deleted file mode 100644 index df790d3eb9d..00000000000 --- a/src/Tests/Tests.Yaml/Tests.Yaml.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - netcoreapp2.2 - Exe - True - latest - - - - - - - - - - - diff --git a/src/Tests/Tests.Yaml/YamlTestDownloader.cs b/src/Tests/Tests.Yaml/YamlTestDownloader.cs deleted file mode 100644 index a038bde476a..00000000000 --- a/src/Tests/Tests.Yaml/YamlTestDownloader.cs +++ /dev/null @@ -1,108 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net; -using CsQuery; -using ShellProgressBar; - -namespace Tests.Yaml -{ - public class YamlTestDownloader - { - private static readonly ProgressBarOptions MainProgressBarOptions = new ProgressBarOptions { BackgroundColor = ConsoleColor.DarkGray }; - - private static readonly Dictionary OnlineSpecifications = new Dictionary - { - { "Core", "https://github.com/elastic/elasticsearch/tree/{version}/rest-api-spec/src/main/resources/rest-api-spec/test" }, - { "XPack", "https://github.com/elastic/elasticsearch/tree/{version}/x-pack/plugin/src/test/resources/rest-api-spec/test"} - }; - - private static readonly ProgressBarOptions SubProgressBarOptions = new ProgressBarOptions - { - ForegroundColor = ConsoleColor.Cyan, - ForegroundColorDone = ConsoleColor.DarkGreen, - ProgressCharacter = '─', - BackgroundColor = ConsoleColor.DarkGray, - }; - - private YamlTestDownloader(string branch) - { - var specifications = - (from kv in OnlineSpecifications - let url = kv.Value.Replace("{version}", branch) - select new Specification { FolderOnDisk = kv.Key, Branch = branch, GithubListingUrl = url }).ToList(); - - using (var pbar = new ProgressBar(specifications.Count, "Downloading specifications", MainProgressBarOptions)) - { - foreach (var spec in specifications) - { - pbar.Message = $"Downloading rest-api-spec to {spec.FolderOnDisk} for branch {branch}"; - DownloadJsonDefinitions(spec, pbar); - pbar.Tick($"Downloaded rest-api-spec to {spec.FolderOnDisk} for branch {branch}"); - } - } - - //File.WriteAllText(GeneratorLocations.LastDownloadedVersionFile, branch); - } - - public static YamlTestDownloader Download(string branch) => new YamlTestDownloader(branch); - - private void DownloadJsonDefinitions(Specification spec, IProgressBar pbar) - { - using (var client = new WebClient()) - { - var html = client.DownloadString(spec.GithubListingUrl); - FindJsonFilesOnListing(spec, html, pbar); - } - } - - private void FindJsonFilesOnListing(Specification spec, string html, IProgressBar pbar) - { - //if (!Directory.Exists(GeneratorLocations.RestSpecificationFolder)) - //Directory.CreateDirectory(GeneratorLocations.RestSpecificationFolder); - - var dom = CQ.Create(html); - - WriteToEndpointsFolder(spec.FolderOnDisk, "root.html", html); - - var endpoints = dom[".js-navigation-open"] - .Select(s => s.InnerText) - .Where(s => !string.IsNullOrEmpty(s) && s.EndsWith(".json")) - .ToList(); - - using (var subBar = pbar.Spawn(endpoints.Count, "fetching individual json files", SubProgressBarOptions)) - endpoints.ForEach(s => WriteEndpointFile(spec, s, subBar)); - } - - private void WriteEndpointFile(Specification spec, string s, IProgressBar pbar) - { - var rawFile = spec.GithubDownloadUrl(s); - using (var client = new WebClient()) - { - var fileName = rawFile.Split('/').Last(); - var json = client.DownloadString(rawFile); - WriteToEndpointsFolder(spec.FolderOnDisk, fileName, json); - pbar.Tick($"Downloading {fileName}"); - } - } - - private void WriteToEndpointsFolder(string folder, string filename, string contents) - { - //var f = Path.Combine(GeneratorLocations.RestSpecificationFolder, folder); - //if (!Directory.Exists(f)) Directory.CreateDirectory(f); - //File.WriteAllText(f + "\\" + filename, contents); - } - - private class Specification - { - // ReSharper disable once UnusedAutoPropertyAccessor.Local - public string Branch { get; set; } - public string FolderOnDisk { get; set; } - public string GithubListingUrl { get; set; } - - public string GithubDownloadUrl(string file) => - GithubListingUrl.Replace("github.com", "raw.githubusercontent.com").Replace("tree/", "") + "/" + file; - } - } -} From 796dba60d6cb388bd05ef1a4211b3394665bd726 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 27 Aug 2019 15:47:30 +0200 Subject: [PATCH 19/85] stage --- src/Tests/Tests.YamlRunner/Commands.fs | 15 +++- src/Tests/Tests.YamlRunner/TestsRunner.fs | 91 +++++++++++++++-------- 2 files changed, 71 insertions(+), 35 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/Commands.fs b/src/Tests/Tests.YamlRunner/Commands.fs index 712ffab5023..bed1b9f6a93 100644 --- a/src/Tests/Tests.YamlRunner/Commands.fs +++ b/src/Tests/Tests.YamlRunner/Commands.fs @@ -1,6 +1,7 @@ module Tests.YamlRunner.Commands open System +open System.Threading open ShellProgressBar open Tests.YamlRunner.AsyncExtensions open Tests.YamlRunner.TestsLocator @@ -35,9 +36,17 @@ let ReadTests (tests:LocateResults list) = let RunTests (tests:YamlTestFolder list) = async { let l = tests.Length - use progress = new ProgressBar(l, sprintf "Running %i folders" l, barOptions) - let a = TestsRunner.RunTestsInFolder progress subBarOptions - let! x = Async.Sequential <| (tests |> List.map a) + use progress = new ProgressBar(l, sprintf "Executing [0/%i] folders" l, barOptions) + do! Async.SwitchToNewThread() + let mutable seen = 0; + let a v = async { + let i = Interlocked.Increment (&seen) + progress.Message <- sprintf "Executing [%i/%i] folders: %s" i l v.Folder + let! op = TestsRunner.RunTestsInFolder progress subBarOptions v + progress.Tick() + return op + } + let x = tests |> List.map a |> List.map Async.RunSynchronously return x } diff --git a/src/Tests/Tests.YamlRunner/TestsRunner.fs b/src/Tests/Tests.YamlRunner/TestsRunner.fs index 0a09b7f05da..bc6050c0a46 100644 --- a/src/Tests/Tests.YamlRunner/TestsRunner.fs +++ b/src/Tests/Tests.YamlRunner/TestsRunner.fs @@ -10,57 +10,84 @@ open Tests.YamlRunner.TestsReader let private randomTime = Random() let RunOperation (progress:IProgressBar) m operation = async { - let! x = Async.Sleep <| randomTime.Next(500, 900) + //let! x = Async.Sleep <| randomTime.Next(500, 900) return true } let RunOperations (progress:IProgressBar) (barOptions:ProgressBarOptions) m (ops:Operations) = let mutable seen = 0; let l = ops.Length - progress.WriteLine <| m - use progress = progress.Spawn(l, sprintf "%s [0/%i] operations" m l, barOptions) + let message = sprintf "%s [0/%i] operations" m l + //progress.WriteLine <| message let actions = + let p = progress.Spawn(l, message, barOptions) ops |> List.map (fun op -> async { let i = Interlocked.Increment (&seen) let message = sprintf "%s [%i/%i] operations" m i l - let! x = Async.Sleep <| randomTime.Next(500, 900) + p.Tick(message) let! pass = RunOperation progress m op - progress.Tick(message) + + let! x = Async.Sleep <| randomTime.Next(50, 200) return pass }) - let x = Async.Sequential actions - x + actions -let asyncIter f inp = async { - match inp with - | None -> return None - | Some v -> - let! x = f v - return Some x -} -let RunTestFile (progress:IProgressBar) (subBarOptions:ProgressBarOptions) (file:YamlTestDocument) = async { - let message m = sprintf "%s: %s" m file.FileInfo.Name - let f a = RunOperations progress subBarOptions <| message a - let! x = Async.Sleep <| randomTime.Next(500, 900) - let passed = file.Setup |> (asyncIter (f "setup")) - let! x = Async.Sleep <| randomTime.Next(500, 900) - let passed = file.Tests |> Seq.map (fun s -> s.Operations |> f s.Name) - let! x = Async.Sleep <| randomTime.Next(500, 900) - let passed = file.Teardown |> asyncIter (f "teardown") - let! x = Async.Sleep <| randomTime.Next(500, 900) - progress.Tick(); +let RunTestFile (progress:IProgressBar) (barOptions:ProgressBarOptions) (file:YamlTestDocument) = async { + let mutable seen = 0; + let message = sprintf "Inspecting file for sections" + use p = progress.Spawn(0, message, barOptions) -} - -let RunTestsInFolder (progress:IProgressBar) (subBarOptions:ProgressBarOptions) (folder:YamlTestFolder) = async { + let message m = sprintf "%s: %s" m file.FileInfo.FullName + let f a v = RunOperations p barOptions <| message a <| v + let setup = file.Setup |> Option.map (f "Setup") |> Option.toList //|> Option.map Async.RunSynchronously + + let passed = file.Tests |> List.map (fun s -> s.Operations |> f s.Name) //|> List.map Async.RunSynchronously + + let teardown = file.Teardown |> Option.map (f "Teardown") |> Option.toList //|> Option.map Async.RunSynchronously + + let suites = (setup @ passed @ teardown) + //let combined = suites |> List.concat + + let l = suites.Length + p.MaxTicks <- l - let! x = Async.Sleep <| randomTime.Next(500, 900) - let actions = folder.Files |> List.map (fun f -> RunTestFile progress subBarOptions f) + let actions = + suites + |> List.map (fun suite -> async { + let! x = Async.Sleep <| randomTime.Next(50, 200) + let i = Interlocked.Increment (&seen) + let message = sprintf "[%i/%i] sections" i l + p.Tick(message) + let result = suite |> List.map Async.RunSynchronously + return result + }) + |> List.map Async.RunSynchronously + + return actions - let! completed = Async.ForEachAsync 2 actions - return completed +} + +let RunTestsInFolder (progress:IProgressBar) (barOptions:ProgressBarOptions) (folder:YamlTestFolder) = async { + let mutable seen = 0; + let l = folder.Files.Length + let message = sprintf "Executing [%i/%i] files" seen l + use p = progress.Spawn(l, message, barOptions) + let run document = async { + let i = Interlocked.Increment (&seen) + let message = sprintf "Executing [%i/%i] files: %s" i l document.FileInfo.FullName + p.Message <- message + let! result = RunTestFile p barOptions document + p.Tick() + result + } + + let actions = + folder.Files + |> List.map run + |> List.map Async.RunSynchronously + return actions } From 4d38f3fe0bac79e3360666d5827610ff24cf125a Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 27 Aug 2019 15:58:57 +0200 Subject: [PATCH 20/85] stage --- src/Tests/Tests.YamlRunner/TestsRunner.fs | 40 ++++++++++++++--------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/TestsRunner.fs b/src/Tests/Tests.YamlRunner/TestsRunner.fs index bc6050c0a46..b1583ae5bfe 100644 --- a/src/Tests/Tests.YamlRunner/TestsRunner.fs +++ b/src/Tests/Tests.YamlRunner/TestsRunner.fs @@ -14,25 +14,18 @@ let RunOperation (progress:IProgressBar) m operation = async { return true } -let RunOperations (progress:IProgressBar) (barOptions:ProgressBarOptions) m (ops:Operations) = - let mutable seen = 0; - let l = ops.Length - let message = sprintf "%s [0/%i] operations" m l - //progress.WriteLine <| message - let actions = - let p = progress.Spawn(l, message, barOptions) +let RunOperations (progress:IProgressBar) (barOptions:ProgressBarOptions) m (ops:Operations) = async { + let executedOperations = ops |> List.map (fun op -> async { - let i = Interlocked.Increment (&seen) - let message = sprintf "%s [%i/%i] operations" m i l - p.Tick(message) let! pass = RunOperation progress m op let! x = Async.Sleep <| randomTime.Next(50, 200) return pass }) - actions + return (m, executedOperations) +} let RunTestFile (progress:IProgressBar) (barOptions:ProgressBarOptions) (file:YamlTestDocument) = async { @@ -48,20 +41,37 @@ let RunTestFile (progress:IProgressBar) (barOptions:ProgressBarOptions) (file:Ya let teardown = file.Teardown |> Option.map (f "Teardown") |> Option.toList //|> Option.map Async.RunSynchronously - let suites = (setup @ passed @ teardown) + let sections = (setup @ passed @ teardown) //let combined = suites |> List.concat - let l = suites.Length + let l = sections.Length p.MaxTicks <- l let actions = - suites + sections |> List.map (fun suite -> async { let! x = Async.Sleep <| randomTime.Next(50, 200) let i = Interlocked.Increment (&seen) let message = sprintf "[%i/%i] sections" i l p.Tick(message) - let result = suite |> List.map Async.RunSynchronously + + + let! (m, ops) = suite + let lOps = ops.Length + let mutable seenL = 0; + let messageL = sprintf "%s [0/%i] operations" m l + progress.WriteLine <| message + let lp = p.Spawn(lOps, messageL, barOptions) + + let result = + ops + |> List.map (fun op -> async { + let i = Interlocked.Increment (&seenL) + let message = sprintf "%s [%i/%i] operations" m i l + lp.Tick(message) + return! op + }) + |> List.map Async.RunSynchronously return result }) |> List.map Async.RunSynchronously From 53f6279fc5d65e678c52d724d25f3e4d6bad2ac0 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 27 Aug 2019 16:03:17 +0200 Subject: [PATCH 21/85] stage --- src/Tests/Tests.YamlRunner/TestsRunner.fs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/TestsRunner.fs b/src/Tests/Tests.YamlRunner/TestsRunner.fs index b1583ae5bfe..4fa84e27ca4 100644 --- a/src/Tests/Tests.YamlRunner/TestsRunner.fs +++ b/src/Tests/Tests.YamlRunner/TestsRunner.fs @@ -60,9 +60,7 @@ let RunTestFile (progress:IProgressBar) (barOptions:ProgressBarOptions) (file:Ya let lOps = ops.Length let mutable seenL = 0; let messageL = sprintf "%s [0/%i] operations" m l - progress.WriteLine <| message - let lp = p.Spawn(lOps, messageL, barOptions) - + use lp = p.Spawn(lOps, messageL, barOptions) let result = ops |> List.map (fun op -> async { @@ -91,7 +89,7 @@ let RunTestsInFolder (progress:IProgressBar) (barOptions:ProgressBarOptions) (fo p.Message <- message let! result = RunTestFile p barOptions document p.Tick() - result + return result } let actions = From f3f457152e41eef105ab80a79f2eb98d9c849826 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 27 Aug 2019 17:41:10 +0200 Subject: [PATCH 22/85] stage --- src/Tests/Tests.YamlRunner/Commands.fs | 22 ++++--- src/Tests/Tests.YamlRunner/TestsRunner.fs | 78 ++++++++++------------- 2 files changed, 44 insertions(+), 56 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/Commands.fs b/src/Tests/Tests.YamlRunner/Commands.fs index bed1b9f6a93..80dd9b97157 100644 --- a/src/Tests/Tests.YamlRunner/Commands.fs +++ b/src/Tests/Tests.YamlRunner/Commands.fs @@ -35,18 +35,20 @@ let ReadTests (tests:LocateResults list) = tests |> List.map (fun t -> { Folder= t.Folder; Files = readPaths t.Paths}) let RunTests (tests:YamlTestFolder list) = async { - let l = tests.Length - use progress = new ProgressBar(l, sprintf "Executing [0/%i] folders" l, barOptions) do! Async.SwitchToNewThread() - let mutable seen = 0; - let a v = async { - let i = Interlocked.Increment (&seen) - progress.Message <- sprintf "Executing [%i/%i] folders: %s" i l v.Folder - let! op = TestsRunner.RunTestsInFolder progress subBarOptions v - progress.Tick() - return op + let l = tests |> List.sumBy (fun t -> t.Files.Length) + use progress = new ProgressBar(l, sprintf "Executing [0/%i] folders" l, barOptions) + let a (i, v) = async { + let mainMessage = sprintf "Executing [%i/%i] folders: %s" (i+1) l v.Folder + let! op = TestsRunner.RunTestsInFolder progress subBarOptions mainMessage v + return op |> Seq.toList } - let x = tests |> List.map a |> List.map Async.RunSynchronously + let x = + tests + |> Seq.indexed + |> Seq.map a + |> Seq.map Async.RunSynchronously + |> Seq.toList return x } diff --git a/src/Tests/Tests.YamlRunner/TestsRunner.fs b/src/Tests/Tests.YamlRunner/TestsRunner.fs index 4fa84e27ca4..b750c580836 100644 --- a/src/Tests/Tests.YamlRunner/TestsRunner.fs +++ b/src/Tests/Tests.YamlRunner/TestsRunner.fs @@ -9,93 +9,79 @@ open Tests.YamlRunner.Models open Tests.YamlRunner.TestsReader let private randomTime = Random() -let RunOperation (progress:IProgressBar) m operation = async { +let RunOperation m operation = async { //let! x = Async.Sleep <| randomTime.Next(500, 900) return true } -let RunOperations (progress:IProgressBar) (barOptions:ProgressBarOptions) m (ops:Operations) = async { +let createOperations m (ops:Operations) = let executedOperations = ops |> List.map (fun op -> async { - let! pass = RunOperation progress m op - + let! pass = RunOperation m op let! x = Async.Sleep <| randomTime.Next(50, 200) return pass }) - - return (m, executedOperations) -} + (m, executedOperations) let RunTestFile (progress:IProgressBar) (barOptions:ProgressBarOptions) (file:YamlTestDocument) = async { - let mutable seen = 0; - let message = sprintf "Inspecting file for sections" - use p = progress.Spawn(0, message, barOptions) let message m = sprintf "%s: %s" m file.FileInfo.FullName - let f a v = RunOperations p barOptions <| message a <| v - let setup = file.Setup |> Option.map (f "Setup") |> Option.toList //|> Option.map Async.RunSynchronously - - let passed = file.Tests |> List.map (fun s -> s.Operations |> f s.Name) //|> List.map Async.RunSynchronously + let f a v = createOperations <| message a <| v - let teardown = file.Teardown |> Option.map (f "Teardown") |> Option.toList //|> Option.map Async.RunSynchronously + let setup = file.Setup |> Option.map (f "Setup") |> Option.toList + let teardown = file.Teardown |> Option.map (f "Teardown") |> Option.toList + let passed = file.Tests |> List.map (fun s -> s.Operations |> f s.Name) - let sections = (setup @ passed @ teardown) - //let combined = suites |> List.concat + let sections = (setup @ passed @ teardown) let l = sections.Length - p.MaxTicks <- l + let ops = sections |> List.sumBy (fun (_, i) -> i.Length) + progress.MaxTicks <- ops let actions = sections - |> List.map (fun suite -> async { - let! x = Async.Sleep <| randomTime.Next(50, 200) - let i = Interlocked.Increment (&seen) - let message = sprintf "[%i/%i] sections" i l - p.Tick(message) - + |> Seq.indexed + |> Seq.map (fun (i, suite) -> async { + let sections = sprintf "[%i/%i] sections" (i+1) l - let! (m, ops) = suite + let (m, ops) = suite let lOps = ops.Length - let mutable seenL = 0; - let messageL = sprintf "%s [0/%i] operations" m l - use lp = p.Spawn(lOps, messageL, barOptions) let result = ops - |> List.map (fun op -> async { - let i = Interlocked.Increment (&seenL) - let message = sprintf "%s [%i/%i] operations" m i l - lp.Tick(message) + |> Seq.indexed + |> Seq.map (fun (i, op) -> async { + let operations = sprintf "%s [%i/%i] operations: %s" sections (i+1) lOps m + progress.Tick(operations) return! op }) - |> List.map Async.RunSynchronously + |> Seq.map Async.RunSynchronously + |> Seq.toList return result }) - |> List.map Async.RunSynchronously + |> Seq.map Async.RunSynchronously - return actions + return actions |> Seq.toList } -let RunTestsInFolder (progress:IProgressBar) (barOptions:ProgressBarOptions) (folder:YamlTestFolder) = async { - let mutable seen = 0; +let RunTestsInFolder (progress:IProgressBar) (barOptions:ProgressBarOptions) mainMessage (folder:YamlTestFolder) = async { let l = folder.Files.Length - let message = sprintf "Executing [%i/%i] files" seen l - use p = progress.Spawn(l, message, barOptions) - let run document = async { - let i = Interlocked.Increment (&seen) - let message = sprintf "Executing [%i/%i] files: %s" i l document.FileInfo.FullName - p.Message <- message + let run (i, document) = async { + let message = sprintf "%s [%i/%i] files: %s" mainMessage (i+1) l document.FileInfo.FullName + progress.Tick(message) + let message = sprintf "Inspecting file for sections" + use p = progress.Spawn(0, message, barOptions) let! result = RunTestFile p barOptions document - p.Tick() return result } let actions = folder.Files - |> List.map run - |> List.map Async.RunSynchronously + |> Seq.indexed + |> Seq.map run + |> Seq.map Async.RunSynchronously return actions } From 9d055c3b052ad5cfba7915250b2419bbea5b3b8b Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 27 Aug 2019 17:44:04 +0200 Subject: [PATCH 23/85] stage --- src/Tests/Tests.YamlRunner/Commands.fs | 4 ++-- src/Tests/Tests.YamlRunner/TestsRunner.fs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/Commands.fs b/src/Tests/Tests.YamlRunner/Commands.fs index 80dd9b97157..9cbad87ee70 100644 --- a/src/Tests/Tests.YamlRunner/Commands.fs +++ b/src/Tests/Tests.YamlRunner/Commands.fs @@ -37,9 +37,9 @@ let ReadTests (tests:LocateResults list) = let RunTests (tests:YamlTestFolder list) = async { do! Async.SwitchToNewThread() let l = tests |> List.sumBy (fun t -> t.Files.Length) - use progress = new ProgressBar(l, sprintf "Executing [0/%i] folders" l, barOptions) + use progress = new ProgressBar(l, sprintf "Folders [0/%i]" l, barOptions) let a (i, v) = async { - let mainMessage = sprintf "Executing [%i/%i] folders: %s" (i+1) l v.Folder + let mainMessage = sprintf "Folders [%i/%i] (%s)" (i+1) l v.Folder let! op = TestsRunner.RunTestsInFolder progress subBarOptions mainMessage v return op |> Seq.toList } diff --git a/src/Tests/Tests.YamlRunner/TestsRunner.fs b/src/Tests/Tests.YamlRunner/TestsRunner.fs index b750c580836..db58fe430e1 100644 --- a/src/Tests/Tests.YamlRunner/TestsRunner.fs +++ b/src/Tests/Tests.YamlRunner/TestsRunner.fs @@ -69,7 +69,8 @@ let RunTestFile (progress:IProgressBar) (barOptions:ProgressBarOptions) (file:Ya let RunTestsInFolder (progress:IProgressBar) (barOptions:ProgressBarOptions) mainMessage (folder:YamlTestFolder) = async { let l = folder.Files.Length let run (i, document) = async { - let message = sprintf "%s [%i/%i] files: %s" mainMessage (i+1) l document.FileInfo.FullName + let file = sprintf "%s/%s" document.FileInfo.Directory.Name document.FileInfo.Name + let message = sprintf "%s Files [%i/%i] file: %s" mainMessage (i+1) l file progress.Tick(message) let message = sprintf "Inspecting file for sections" use p = progress.Spawn(0, message, barOptions) From 51c3f09aad2fbfccfd5b397cf4747bb66142165d Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 27 Aug 2019 21:02:49 +0200 Subject: [PATCH 24/85] stage --- src/Tests/Tests.YamlRunner/Commands.fs | 2 +- .../Tests.YamlRunner/OperationExecutor.fs | 24 +++++++ .../Tests.YamlRunner/Tests.YamlRunner.fsproj | 1 + src/Tests/Tests.YamlRunner/TestsRunner.fs | 69 +++++++++---------- 4 files changed, 59 insertions(+), 37 deletions(-) create mode 100644 src/Tests/Tests.YamlRunner/OperationExecutor.fs diff --git a/src/Tests/Tests.YamlRunner/Commands.fs b/src/Tests/Tests.YamlRunner/Commands.fs index 9cbad87ee70..c2bb1b051ec 100644 --- a/src/Tests/Tests.YamlRunner/Commands.fs +++ b/src/Tests/Tests.YamlRunner/Commands.fs @@ -39,7 +39,7 @@ let RunTests (tests:YamlTestFolder list) = async { let l = tests |> List.sumBy (fun t -> t.Files.Length) use progress = new ProgressBar(l, sprintf "Folders [0/%i]" l, barOptions) let a (i, v) = async { - let mainMessage = sprintf "Folders [%i/%i] (%s)" (i+1) l v.Folder + let mainMessage = sprintf "[%i/%i] Folders : %s | " (i+1) l v.Folder let! op = TestsRunner.RunTestsInFolder progress subBarOptions mainMessage v return op |> Seq.toList } diff --git a/src/Tests/Tests.YamlRunner/OperationExecutor.fs b/src/Tests/Tests.YamlRunner/OperationExecutor.fs new file mode 100644 index 00000000000..6ca9ec0b52c --- /dev/null +++ b/src/Tests/Tests.YamlRunner/OperationExecutor.fs @@ -0,0 +1,24 @@ +module Tests.YamlRunner.OperationExecutor +open System.IO +open Tests.YamlRunner.Models + + +type ExecutionContext = { + Suite: TestSuite + Folder: DirectoryInfo + File: FileInfo + Section: string + NthOperation: int + Operation: Operation +} + with member __.Throw message = failwithf "%s" message + + +let Execute (op:ExecutionContext) = + match op.Operation with + | Unknown u -> op.Throw <| sprintf "Unknown operation %s" u + | Skip s -> ignore + | Do d -> ignore + | Set s -> ignore + | TransformAndSet ts -> ignore + | Assert a -> ignore diff --git a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj index eea08062791..0a30a940a6c 100644 --- a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj +++ b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj @@ -11,6 +11,7 @@ + diff --git a/src/Tests/Tests.YamlRunner/TestsRunner.fs b/src/Tests/Tests.YamlRunner/TestsRunner.fs index db58fe430e1..35bd56c53f5 100644 --- a/src/Tests/Tests.YamlRunner/TestsRunner.fs +++ b/src/Tests/Tests.YamlRunner/TestsRunner.fs @@ -1,68 +1,65 @@ module Tests.YamlRunner.TestsRunner open System -open System.Threading open ShellProgressBar -open Tests.YamlRunner -open Tests.YamlRunner.AsyncExtensions open Tests.YamlRunner.Models open Tests.YamlRunner.TestsReader let private randomTime = Random() + let RunOperation m operation = async { - //let! x = Async.Sleep <| randomTime.Next(500, 900) - return true + return OperationExecutor.Execute operation } -let createOperations m (ops:Operations) = +let private createOperations m (ops:Operations) = let executedOperations = ops |> List.map (fun op -> async { let! pass = RunOperation m op - let! x = Async.Sleep <| randomTime.Next(50, 200) + let! x = Async.Sleep <| randomTime.Next(0, 10) return pass }) (m, executedOperations) -let RunTestFile (progress:IProgressBar) (barOptions:ProgressBarOptions) (file:YamlTestDocument) = async { - - let message m = sprintf "%s: %s" m file.FileInfo.FullName - let f a v = createOperations <| message a <| v +let RunTestFile (progress:IProgressBar) (file:YamlTestDocument) = async { - let setup = file.Setup |> Option.map (f "Setup") |> Option.toList - let teardown = file.Teardown |> Option.map (f "Teardown") |> Option.toList - let passed = file.Tests |> List.map (fun s -> s.Operations |> f s.Name) + let setup = file.Setup |> Option.map (createOperations "Setup") |> Option.toList + let teardown = file.Teardown |> Option.map (createOperations "Teardown") |> Option.toList + let passed = file.Tests |> List.map (fun s -> s.Operations |> createOperations s.Name) - let sections = (setup @ passed @ teardown) + let sections = setup @ passed @ teardown let l = sections.Length let ops = sections |> List.sumBy (fun (_, i) -> i.Length) progress.MaxTicks <- ops - let actions = + let runSection progressHeader sectionHeader ops = async { + let l = ops |> List.length + let result = + ops + |> List.indexed + |> Seq.map (fun (i, op) -> async { + let operations = sprintf "%s [%i/%i] operations: %s" progressHeader (i+1) l sectionHeader + progress.Tick(operations) + return! op + }) + |> Seq.map Async.RunSynchronously + |> Seq.toList + return result + } + + let runAllSections = sections |> Seq.indexed - |> Seq.map (fun (i, suite) -> async { - let sections = sprintf "[%i/%i] sections" (i+1) l - - let (m, ops) = suite - let lOps = ops.Length - let result = - ops - |> Seq.indexed - |> Seq.map (fun (i, op) -> async { - let operations = sprintf "%s [%i/%i] operations: %s" sections (i+1) lOps m - progress.Tick(operations) - return! op - }) - |> Seq.map Async.RunSynchronously - |> Seq.toList - return result - }) + |> Seq.map (fun (i, suite) -> + let progressHeader = sprintf "[%i/%i] sections" (i+1) l + let (sectionHeader, ops) = suite + runSection progressHeader sectionHeader ops + ) |> Seq.map Async.RunSynchronously - return actions |> Seq.toList + return runAllSections |> Seq.toList } @@ -70,11 +67,11 @@ let RunTestsInFolder (progress:IProgressBar) (barOptions:ProgressBarOptions) mai let l = folder.Files.Length let run (i, document) = async { let file = sprintf "%s/%s" document.FileInfo.Directory.Name document.FileInfo.Name - let message = sprintf "%s Files [%i/%i] file: %s" mainMessage (i+1) l file + let message = sprintf "%s [%i/%i] Files : %s" mainMessage (i+1) l file progress.Tick(message) let message = sprintf "Inspecting file for sections" use p = progress.Spawn(0, message, barOptions) - let! result = RunTestFile p barOptions document + let! result = RunTestFile p document return result } From 7f09dba6a67276f00959f691c97d004a155a3299 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Thu, 29 Aug 2019 12:54:06 +0200 Subject: [PATCH 25/85] stage --- src/Tests/Tests.YamlRunner/Commands.fs | 6 +++- .../Tests.YamlRunner/OperationExecutor.fs | 2 ++ .../Tests.YamlRunner/Tests.YamlRunner.fsproj | 2 +- src/Tests/Tests.YamlRunner/TestsRunner.fs | 31 +++++++++++++------ 4 files changed, 30 insertions(+), 11 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/Commands.fs b/src/Tests/Tests.YamlRunner/Commands.fs index c2bb1b051ec..fc65180421b 100644 --- a/src/Tests/Tests.YamlRunner/Commands.fs +++ b/src/Tests/Tests.YamlRunner/Commands.fs @@ -36,10 +36,11 @@ let ReadTests (tests:LocateResults list) = let RunTests (tests:YamlTestFolder list) = async { do! Async.SwitchToNewThread() + let f = tests.Length let l = tests |> List.sumBy (fun t -> t.Files.Length) use progress = new ProgressBar(l, sprintf "Folders [0/%i]" l, barOptions) let a (i, v) = async { - let mainMessage = sprintf "[%i/%i] Folders : %s | " (i+1) l v.Folder + let mainMessage = sprintf "[%i/%i] Folders : %s | " (i+1) f v.Folder let! op = TestsRunner.RunTestsInFolder progress subBarOptions mainMessage v return op |> Seq.toList } @@ -49,6 +50,9 @@ let RunTests (tests:YamlTestFolder list) = async { |> Seq.map a |> Seq.map Async.RunSynchronously |> Seq.toList + + progress.Message <- sprintf "[%i/%i] Folders [%i/%i] Files" f f l l + return x } diff --git a/src/Tests/Tests.YamlRunner/OperationExecutor.fs b/src/Tests/Tests.YamlRunner/OperationExecutor.fs index 6ca9ec0b52c..d2e00fd26d0 100644 --- a/src/Tests/Tests.YamlRunner/OperationExecutor.fs +++ b/src/Tests/Tests.YamlRunner/OperationExecutor.fs @@ -14,6 +14,8 @@ type ExecutionContext = { with member __.Throw message = failwithf "%s" message +let Do executionContext = ignore() + let Execute (op:ExecutionContext) = match op.Operation with | Unknown u -> op.Throw <| sprintf "Unknown operation %s" u diff --git a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj index 0a30a940a6c..6a7b7681a80 100644 --- a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj +++ b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj @@ -10,8 +10,8 @@ - + diff --git a/src/Tests/Tests.YamlRunner/TestsRunner.fs b/src/Tests/Tests.YamlRunner/TestsRunner.fs index 35bd56c53f5..e214903317a 100644 --- a/src/Tests/Tests.YamlRunner/TestsRunner.fs +++ b/src/Tests/Tests.YamlRunner/TestsRunner.fs @@ -4,19 +4,30 @@ open System open ShellProgressBar open Tests.YamlRunner.Models open Tests.YamlRunner.TestsReader +open Tests.YamlRunner.OperationExecutor let private randomTime = Random() -let RunOperation m operation = async { - return OperationExecutor.Execute operation +let RunOperation file section operation nth = async { + let executionContext = { + Suite= OpenSource + File= file + Folder= file.Directory + Section= section + NthOperation= nth + Operation= operation + } + + return OperationExecutor.Execute executionContext } -let private createOperations m (ops:Operations) = +let private createOperations m file (ops:Operations) = let executedOperations = ops - |> List.map (fun op -> async { - let! pass = RunOperation m op - let! x = Async.Sleep <| randomTime.Next(0, 10) + |> List.indexed + |> List.map (fun (i, op) -> async { + let! pass = RunOperation file m op i + //let! x = Async.Sleep <| randomTime.Next(0, 10) return pass }) (m, executedOperations) @@ -24,9 +35,11 @@ let private createOperations m (ops:Operations) = let RunTestFile (progress:IProgressBar) (file:YamlTestDocument) = async { - let setup = file.Setup |> Option.map (createOperations "Setup") |> Option.toList - let teardown = file.Teardown |> Option.map (createOperations "Teardown") |> Option.toList - let passed = file.Tests |> List.map (fun s -> s.Operations |> createOperations s.Name) + let m section ops = createOperations section file.FileInfo ops + + let setup = file.Setup |> Option.map (m "Setup") |> Option.toList + let teardown = file.Teardown |> Option.map (m "Teardown") |> Option.toList + let passed = file.Tests |> List.map (fun s -> s.Operations |> m s.Name) let sections = setup @ passed @ teardown From be433fd44117db8cd26baa84d204517b8e2f142b Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Fri, 30 Aug 2019 16:07:04 +0200 Subject: [PATCH 26/85] stage --- .../ApiGenerator/Domain/Code/CsharpNames.cs | 7 +- .../Code/LowLevel/LowLevelClientMethod.cs | 2 + .../Domain/Specification/ApiEndpoint.cs | 5 + .../Methods/MethodImplementation.cshtml | 1 + .../ElasticLowLevelClient.Cat.cs | 31 ++ .../ElasticLowLevelClient.Cluster.cs | 13 + ...cLowLevelClient.CrossClusterReplication.cs | 12 + .../ElasticLowLevelClient.Graph.cs | 12 +- ...LowLevelClient.IndexLifecycleManagement.cs | 11 + .../ElasticLowLevelClient.Indices.cs | 79 +++- .../ElasticLowLevelClient.Ingest.cs | 7 + .../ElasticLowLevelClient.License.cs | 7 + .../ElasticLowLevelClient.MachineLearning.cs | 53 +++ .../ElasticLowLevelClient.Migration.cs | 2 + .../ElasticLowLevelClient.NoNamespace.cs | 425 ++++++++++-------- .../ElasticLowLevelClient.Nodes.cs | 18 + .../ElasticLowLevelClient.Rollup.cs | 83 ++-- .../ElasticLowLevelClient.Security.cs | 33 ++ .../ElasticLowLevelClient.Snapshot.cs | 12 + .../ElasticLowLevelClient.Sql.cs | 3 + .../ElasticLowLevelClient.Tasks.cs | 4 + .../ElasticLowLevelClient.Watcher.cs | 13 + .../ElasticLowLevelClient.XPack.cs | 2 + .../Extensions/MapsApiAttribute.cs | 32 ++ src/Tests/Tests.YamlRunner/DoMapper.fs | 68 +++ src/Tests/Tests.YamlRunner/Program.fs | 9 +- .../Tests.YamlRunner/Tests.YamlRunner.fsproj | 3 + 27 files changed, 708 insertions(+), 239 deletions(-) create mode 100644 src/Elasticsearch.Net/Extensions/MapsApiAttribute.cs create mode 100644 src/Tests/Tests.YamlRunner/DoMapper.fs diff --git a/src/CodeGeneration/ApiGenerator/Domain/Code/CsharpNames.cs b/src/CodeGeneration/ApiGenerator/Domain/Code/CsharpNames.cs index 0f32153ea3a..c969a9f86c2 100644 --- a/src/CodeGeneration/ApiGenerator/Domain/Code/CsharpNames.cs +++ b/src/CodeGeneration/ApiGenerator/Domain/Code/CsharpNames.cs @@ -11,6 +11,7 @@ public class CsharpNames { public CsharpNames(string name, string endpointMethodName, string endpointNamespace) { + RestSpecName = string.IsNullOrWhiteSpace(endpointNamespace) ? endpointNamespace : $"{endpointNamespace}.{endpointMethodName}"; Namespace = CreateCSharpNamespace(endpointNamespace); if (CodeConfiguration.ApiNameMapping.TryGetValue(name, out var mapsApiMethodName)) ApiName = mapsApiMethodName; @@ -20,13 +21,13 @@ public CsharpNames(string name, string endpointMethodName, string endpointNamesp string Replace(string original, string ns, string find, string replace) { if (ns != null && Namespace != ns) return original; + var replaced = original.Replace(find, replace); if (string.IsNullOrEmpty(replaced)) return original; return replaced; } - MethodName = Replace(ApiName, null, Namespace, ""); var namespaceRenames = new Dictionary @@ -43,7 +44,9 @@ string Replace(string original, string ns, string find, string replace) /// Pascal cased version of the namespace from the specification public string Namespace { get; } - /// + public string RestSpecName { get; } + + /// /// The pascal cased method name as loaded by ///
Uses  mapping of request implementations in the nest code base
///
diff --git a/src/CodeGeneration/ApiGenerator/Domain/Code/LowLevel/LowLevelClientMethod.cs b/src/CodeGeneration/ApiGenerator/Domain/Code/LowLevel/LowLevelClientMethod.cs index 8f1c36ba7b2..1de40d3dbf9 100644 --- a/src/CodeGeneration/ApiGenerator/Domain/Code/LowLevel/LowLevelClientMethod.cs +++ b/src/CodeGeneration/ApiGenerator/Domain/Code/LowLevel/LowLevelClientMethod.cs @@ -47,5 +47,7 @@ string Evaluator(Match m) return urlCode; } } + + public string MapsApiArguments { get; set; } } } diff --git a/src/CodeGeneration/ApiGenerator/Domain/Specification/ApiEndpoint.cs b/src/CodeGeneration/ApiGenerator/Domain/Specification/ApiEndpoint.cs index a89d031a854..6c2d761230f 100644 --- a/src/CodeGeneration/ApiGenerator/Domain/Specification/ApiEndpoint.cs +++ b/src/CodeGeneration/ApiGenerator/Domain/Specification/ApiEndpoint.cs @@ -132,9 +132,13 @@ public IReadOnlyCollection LowLevelClientMethods { var methodName = CsharpNames.PerPathMethodName(path.Path); var parts = new List(path.Parts); + var mapsApiArgumentHints = parts.Select(p => p.Name).ToList(); if (Body != null) + { parts.Add(new UrlPart { Name = "body", Type = "PostData", Description = Body.Description }); + mapsApiArgumentHints.Add("body"); + } var args = parts .Select(p => p.Argument) @@ -144,6 +148,7 @@ public IReadOnlyCollection LowLevelClientMethods var apiMethod = new LowLevelClientMethod { Arguments = string.Join(", ", args), + MapsApiArguments = string.Join(", ", mapsApiArgumentHints), CsharpNames = CsharpNames, PerPathMethodName = methodName, HttpMethod = httpMethod, diff --git a/src/CodeGeneration/ApiGenerator/Views/LowLevel/Client/Methods/MethodImplementation.cshtml b/src/CodeGeneration/ApiGenerator/Views/LowLevel/Client/Methods/MethodImplementation.cshtml index 47bb192edab..0e6506922b3 100644 --- a/src/CodeGeneration/ApiGenerator/Views/LowLevel/Client/Methods/MethodImplementation.cshtml +++ b/src/CodeGeneration/ApiGenerator/Views/LowLevel/Client/Methods/MethodImplementation.cshtml @@ -14,5 +14,6 @@ where TResponse : class, IElasticsearchResponse, new() => DoRequest@(Raw(""))(@method.HttpMethod, @Raw(method.UrlInCode), @(method.HasBody ? "body" : "null"), RequestParams(requestParameters)); @{await IncludeAsync("LowLevel/Client/Methods/MethodDocs.cshtml", method); } + [MapsApi("@(method.CsharpNames.RestSpecName)", "@(method.MapsApiArguments)")] public Task@(Raw("")) @(method.PerPathMethodName)Async@(Raw(""))(@Raw(method.Arguments), CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync@(Raw(""))(@method.HttpMethod, @Raw(method.UrlInCode), ctx, @(method.HasBody ? "body" : "null"), RequestParams(requestParameters)); diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Cat.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Cat.cs index 46d2ddea863..7267b97cd7c 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Cat.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Cat.cs @@ -55,6 +55,7 @@ public TResponse Aliases(CatAliasesRequestParameters requestParameter where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat/aliases", null, RequestParams(requestParameters)); ///GET on /_cat/aliases https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.aliases", "")] public Task AliasesAsync(CatAliasesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat/aliases", ctx, null, RequestParams(requestParameters)); ///GET on /_cat/aliases/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html @@ -65,6 +66,7 @@ public TResponse Aliases(string name, CatAliasesRequestParameters req ///GET on /_cat/aliases/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html ///A comma-separated list of alias names to return ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.aliases", "name")] public Task AliasesAsync(string name, CatAliasesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_cat/aliases/{name:name}"), ctx, null, RequestParams(requestParameters)); ///GET on /_cat/allocation https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html @@ -73,6 +75,7 @@ public TResponse Allocation(CatAllocationRequestParameters requestPar where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat/allocation", null, RequestParams(requestParameters)); ///GET on /_cat/allocation https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.allocation", "")] public Task AllocationAsync(CatAllocationRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat/allocation", ctx, null, RequestParams(requestParameters)); ///GET on /_cat/allocation/{node_id} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html @@ -83,6 +86,7 @@ public TResponse Allocation(string nodeId, CatAllocationRequestParame ///GET on /_cat/allocation/{node_id} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html ///A comma-separated list of node IDs or names to limit the returned information ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.allocation", "node_id")] public Task AllocationAsync(string nodeId, CatAllocationRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_cat/allocation/{nodeId:nodeId}"), ctx, null, RequestParams(requestParameters)); ///GET on /_cat/count https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html @@ -91,6 +95,7 @@ public TResponse Count(CatCountRequestParameters requestParameters = where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat/count", null, RequestParams(requestParameters)); ///GET on /_cat/count https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.count", "")] public Task CountAsync(CatCountRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat/count", ctx, null, RequestParams(requestParameters)); ///GET on /_cat/count/{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html @@ -101,6 +106,7 @@ public TResponse Count(string index, CatCountRequestParameters reques ///GET on /_cat/count/{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html ///A comma-separated list of index names to limit the returned information ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.count", "index")] public Task CountAsync(string index, CatCountRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_cat/count/{index:index}"), ctx, null, RequestParams(requestParameters)); ///GET on /_cat/fielddata https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html @@ -109,6 +115,7 @@ public TResponse Fielddata(CatFielddataRequestParameters requestParam where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat/fielddata", null, RequestParams(requestParameters)); ///GET on /_cat/fielddata https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.fielddata", "")] public Task FielddataAsync(CatFielddataRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat/fielddata", ctx, null, RequestParams(requestParameters)); ///GET on /_cat/fielddata/{fields} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html @@ -119,6 +126,7 @@ public TResponse Fielddata(string fields, CatFielddataRequestParamete ///GET on /_cat/fielddata/{fields} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html ///A comma-separated list of fields to return the fielddata size ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.fielddata", "fields")] public Task FielddataAsync(string fields, CatFielddataRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_cat/fielddata/{fields:fields}"), ctx, null, RequestParams(requestParameters)); ///GET on /_cat/health https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html @@ -127,6 +135,7 @@ public TResponse Health(CatHealthRequestParameters requestParameters where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat/health", null, RequestParams(requestParameters)); ///GET on /_cat/health https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.health", "")] public Task HealthAsync(CatHealthRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat/health", ctx, null, RequestParams(requestParameters)); ///GET on /_cat https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html @@ -135,6 +144,7 @@ public TResponse Help(CatHelpRequestParameters requestParameters = nu where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat", null, RequestParams(requestParameters)); ///GET on /_cat https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.help", "")] public Task HelpAsync(CatHelpRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat", ctx, null, RequestParams(requestParameters)); ///GET on /_cat/indices https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html @@ -143,6 +153,7 @@ public TResponse Indices(CatIndicesRequestParameters requestParameter where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat/indices", null, RequestParams(requestParameters)); ///GET on /_cat/indices https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.indices", "")] public Task IndicesAsync(CatIndicesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat/indices", ctx, null, RequestParams(requestParameters)); ///GET on /_cat/indices/{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html @@ -153,6 +164,7 @@ public TResponse Indices(string index, CatIndicesRequestParameters re ///GET on /_cat/indices/{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html ///A comma-separated list of index names to limit the returned information ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.indices", "index")] public Task IndicesAsync(string index, CatIndicesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_cat/indices/{index:index}"), ctx, null, RequestParams(requestParameters)); ///GET on /_cat/master https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html @@ -161,6 +173,7 @@ public TResponse Master(CatMasterRequestParameters requestParameters where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat/master", null, RequestParams(requestParameters)); ///GET on /_cat/master https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.master", "")] public Task MasterAsync(CatMasterRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat/master", ctx, null, RequestParams(requestParameters)); ///GET on /_cat/nodeattrs https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html @@ -169,6 +182,7 @@ public TResponse NodeAttributes(CatNodeAttributesRequestParameters re where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat/nodeattrs", null, RequestParams(requestParameters)); ///GET on /_cat/nodeattrs https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.nodeattrs", "")] public Task NodeAttributesAsync(CatNodeAttributesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat/nodeattrs", ctx, null, RequestParams(requestParameters)); ///GET on /_cat/nodes https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html @@ -177,6 +191,7 @@ public TResponse Nodes(CatNodesRequestParameters requestParameters = where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat/nodes", null, RequestParams(requestParameters)); ///GET on /_cat/nodes https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.nodes", "")] public Task NodesAsync(CatNodesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat/nodes", ctx, null, RequestParams(requestParameters)); ///GET on /_cat/pending_tasks https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html @@ -185,6 +200,7 @@ public TResponse PendingTasks(CatPendingTasksRequestParameters reques where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat/pending_tasks", null, RequestParams(requestParameters)); ///GET on /_cat/pending_tasks https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.pending_tasks", "")] public Task PendingTasksAsync(CatPendingTasksRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat/pending_tasks", ctx, null, RequestParams(requestParameters)); ///GET on /_cat/plugins https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html @@ -193,6 +209,7 @@ public TResponse Plugins(CatPluginsRequestParameters requestParameter where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat/plugins", null, RequestParams(requestParameters)); ///GET on /_cat/plugins https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.plugins", "")] public Task PluginsAsync(CatPluginsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat/plugins", ctx, null, RequestParams(requestParameters)); ///GET on /_cat/recovery https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html @@ -201,6 +218,7 @@ public TResponse Recovery(CatRecoveryRequestParameters requestParamet where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat/recovery", null, RequestParams(requestParameters)); ///GET on /_cat/recovery https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.recovery", "")] public Task RecoveryAsync(CatRecoveryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat/recovery", ctx, null, RequestParams(requestParameters)); ///GET on /_cat/recovery/{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html @@ -211,6 +229,7 @@ public TResponse Recovery(string index, CatRecoveryRequestParameters ///GET on /_cat/recovery/{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html ///A comma-separated list of index names to limit the returned information ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.recovery", "index")] public Task RecoveryAsync(string index, CatRecoveryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_cat/recovery/{index:index}"), ctx, null, RequestParams(requestParameters)); ///GET on /_cat/repositories https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html @@ -219,6 +238,7 @@ public TResponse Repositories(CatRepositoriesRequestParameters reques where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat/repositories", null, RequestParams(requestParameters)); ///GET on /_cat/repositories https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.repositories", "")] public Task RepositoriesAsync(CatRepositoriesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat/repositories", ctx, null, RequestParams(requestParameters)); ///GET on /_cat/segments https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html @@ -227,6 +247,7 @@ public TResponse Segments(CatSegmentsRequestParameters requestParamet where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat/segments", null, RequestParams(requestParameters)); ///GET on /_cat/segments https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.segments", "")] public Task SegmentsAsync(CatSegmentsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat/segments", ctx, null, RequestParams(requestParameters)); ///GET on /_cat/segments/{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html @@ -237,6 +258,7 @@ public TResponse Segments(string index, CatSegmentsRequestParameters ///GET on /_cat/segments/{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html ///A comma-separated list of index names to limit the returned information ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.segments", "index")] public Task SegmentsAsync(string index, CatSegmentsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_cat/segments/{index:index}"), ctx, null, RequestParams(requestParameters)); ///GET on /_cat/shards https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html @@ -245,6 +267,7 @@ public TResponse Shards(CatShardsRequestParameters requestParameters where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat/shards", null, RequestParams(requestParameters)); ///GET on /_cat/shards https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.shards", "")] public Task ShardsAsync(CatShardsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat/shards", ctx, null, RequestParams(requestParameters)); ///GET on /_cat/shards/{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html @@ -255,6 +278,7 @@ public TResponse Shards(string index, CatShardsRequestParameters requ ///GET on /_cat/shards/{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html ///A comma-separated list of index names to limit the returned information ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.shards", "index")] public Task ShardsAsync(string index, CatShardsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_cat/shards/{index:index}"), ctx, null, RequestParams(requestParameters)); ///GET on /_cat/snapshots https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html @@ -263,6 +287,7 @@ public TResponse Snapshots(CatSnapshotsRequestParameters requestParam where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat/snapshots", null, RequestParams(requestParameters)); ///GET on /_cat/snapshots https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.snapshots", "")] public Task SnapshotsAsync(CatSnapshotsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat/snapshots", ctx, null, RequestParams(requestParameters)); ///GET on /_cat/snapshots/{repository} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html @@ -273,6 +298,7 @@ public TResponse Snapshots(string repository, CatSnapshotsRequestPara ///GET on /_cat/snapshots/{repository} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html ///Name of repository from which to fetch the snapshot information ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.snapshots", "repository")] public Task SnapshotsAsync(string repository, CatSnapshotsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_cat/snapshots/{repository:repository}"), ctx, null, RequestParams(requestParameters)); ///GET on /_cat/tasks https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html @@ -281,6 +307,7 @@ public TResponse Tasks(CatTasksRequestParameters requestParameters = where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat/tasks", null, RequestParams(requestParameters)); ///GET on /_cat/tasks https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.tasks", "")] public Task TasksAsync(CatTasksRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat/tasks", ctx, null, RequestParams(requestParameters)); ///GET on /_cat/templates https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html @@ -289,6 +316,7 @@ public TResponse Templates(CatTemplatesRequestParameters requestParam where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat/templates", null, RequestParams(requestParameters)); ///GET on /_cat/templates https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.templates", "")] public Task TemplatesAsync(CatTemplatesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat/templates", ctx, null, RequestParams(requestParameters)); ///GET on /_cat/templates/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html @@ -299,6 +327,7 @@ public TResponse Templates(string name, CatTemplatesRequestParameters ///GET on /_cat/templates/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html ///A pattern that returned template names must match ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.templates", "name")] public Task TemplatesAsync(string name, CatTemplatesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_cat/templates/{name:name}"), ctx, null, RequestParams(requestParameters)); ///GET on /_cat/thread_pool https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html @@ -307,6 +336,7 @@ public TResponse ThreadPool(CatThreadPoolRequestParameters requestPar where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cat/thread_pool", null, RequestParams(requestParameters)); ///GET on /_cat/thread_pool https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.thread_pool", "")] public Task ThreadPoolAsync(CatThreadPoolRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cat/thread_pool", ctx, null, RequestParams(requestParameters)); ///GET on /_cat/thread_pool/{thread_pool_patterns} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html @@ -317,6 +347,7 @@ public TResponse ThreadPool(string threadPoolPatterns, CatThreadPoolR ///GET on /_cat/thread_pool/{thread_pool_patterns} https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html ///A comma-separated list of regular-expressions to filter the thread pools in the output ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cat.thread_pool", "thread_pool_patterns")] public Task ThreadPoolAsync(string threadPoolPatterns, CatThreadPoolRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_cat/thread_pool/{threadPoolPatterns:threadPoolPatterns}"), ctx, null, RequestParams(requestParameters)); } diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Cluster.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Cluster.cs index e1524271ba7..82273f243a9 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Cluster.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Cluster.cs @@ -51,6 +51,7 @@ public TResponse AllocationExplain(PostData body, ClusterAllocationEx ///POST on /_cluster/allocation/explain https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html ///The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard' ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cluster.allocation_explain", "body")] public Task AllocationExplainAsync(PostData body, ClusterAllocationExplainRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_cluster/allocation/explain", ctx, body, RequestParams(requestParameters)); ///GET on /_cluster/settings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html @@ -59,6 +60,7 @@ public TResponse GetSettings(ClusterGetSettingsRequestParameters requ where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cluster/settings", null, RequestParams(requestParameters)); ///GET on /_cluster/settings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cluster.get_settings", "")] public Task GetSettingsAsync(ClusterGetSettingsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cluster/settings", ctx, null, RequestParams(requestParameters)); ///GET on /_cluster/health https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html @@ -67,6 +69,7 @@ public TResponse Health(ClusterHealthRequestParameters requestParamet where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cluster/health", null, RequestParams(requestParameters)); ///GET on /_cluster/health https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cluster.health", "")] public Task HealthAsync(ClusterHealthRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cluster/health", ctx, null, RequestParams(requestParameters)); ///GET on /_cluster/health/{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html @@ -77,6 +80,7 @@ public TResponse Health(string index, ClusterHealthRequestParameters ///GET on /_cluster/health/{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html ///Limit the information returned to a specific index ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cluster.health", "index")] public Task HealthAsync(string index, ClusterHealthRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_cluster/health/{index:index}"), ctx, null, RequestParams(requestParameters)); ///GET on /_cluster/pending_tasks https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html @@ -85,6 +89,7 @@ public TResponse PendingTasks(ClusterPendingTasksRequestParameters re where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cluster/pending_tasks", null, RequestParams(requestParameters)); ///GET on /_cluster/pending_tasks https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cluster.pending_tasks", "")] public Task PendingTasksAsync(ClusterPendingTasksRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cluster/pending_tasks", ctx, null, RequestParams(requestParameters)); ///PUT on /_cluster/settings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html @@ -95,6 +100,7 @@ public TResponse PutSettings(PostData body, ClusterPutSettingsRequest ///PUT on /_cluster/settings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html ///The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart). ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cluster.put_settings", "body")] public Task PutSettingsAsync(PostData body, ClusterPutSettingsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, "_cluster/settings", ctx, body, RequestParams(requestParameters)); ///GET on /_remote/info https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html @@ -103,6 +109,7 @@ public TResponse RemoteInfo(RemoteInfoRequestParameters requestParame where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_remote/info", null, RequestParams(requestParameters)); ///GET on /_remote/info https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cluster.remote_info", "")] public Task RemoteInfoAsync(RemoteInfoRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_remote/info", ctx, null, RequestParams(requestParameters)); ///POST on /_cluster/reroute https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html @@ -113,6 +120,7 @@ public TResponse Reroute(PostData body, ClusterRerouteRequestParamete ///POST on /_cluster/reroute https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html ///The definition of `commands` to perform (`move`, `cancel`, `allocate`) ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cluster.reroute", "body")] public Task RerouteAsync(PostData body, ClusterRerouteRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_cluster/reroute", ctx, body, RequestParams(requestParameters)); ///GET on /_cluster/state https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html @@ -121,6 +129,7 @@ public TResponse State(ClusterStateRequestParameters requestParameter where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cluster/state", null, RequestParams(requestParameters)); ///GET on /_cluster/state https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cluster.state", "")] public Task StateAsync(ClusterStateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cluster/state", ctx, null, RequestParams(requestParameters)); ///GET on /_cluster/state/{metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html @@ -131,6 +140,7 @@ public TResponse State(string metric, ClusterStateRequestParameters r ///GET on /_cluster/state/{metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html ///Limit the information returned to the specified metrics ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cluster.state", "metric")] public Task StateAsync(string metric, ClusterStateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_cluster/state/{metric:metric}"), ctx, null, RequestParams(requestParameters)); ///GET on /_cluster/state/{metric}/{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html @@ -143,6 +153,7 @@ public TResponse State(string metric, string index, ClusterStateReque ///Limit the information returned to the specified metrics ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cluster.state", "metric, index")] public Task StateAsync(string metric, string index, ClusterStateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_cluster/state/{metric:metric}/{index:index}"), ctx, null, RequestParams(requestParameters)); ///GET on /_cluster/stats https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html @@ -151,6 +162,7 @@ public TResponse Stats(ClusterStatsRequestParameters requestParameter where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_cluster/stats", null, RequestParams(requestParameters)); ///GET on /_cluster/stats https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cluster.stats", "")] public Task StatsAsync(ClusterStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_cluster/stats", ctx, null, RequestParams(requestParameters)); ///GET on /_cluster/stats/nodes/{node_id} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html @@ -161,6 +173,7 @@ public TResponse Stats(string nodeId, ClusterStatsRequestParameters r ///GET on /_cluster/stats/nodes/{node_id} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("cluster.stats", "node_id")] public Task StatsAsync(string nodeId, ClusterStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_cluster/stats/nodes/{nodeId:nodeId}"), ctx, null, RequestParams(requestParameters)); } diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.CrossClusterReplication.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.CrossClusterReplication.cs index 0c1561187d9..a8bb7993472 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.CrossClusterReplication.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.CrossClusterReplication.cs @@ -51,6 +51,7 @@ public TResponse DeleteAutoFollowPattern(string name, DeleteAutoFollo ///DELETE on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html ///The name of the auto follow pattern. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ccr.delete_auto_follow_pattern", "name")] public Task DeleteAutoFollowPatternAsync(string name, DeleteAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_ccr/auto_follow/{name:name}"), ctx, null, RequestParams(requestParameters)); ///PUT on /{index}/_ccr/follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html @@ -63,6 +64,7 @@ public TResponse CreateFollowIndex(string index, PostData body, Creat ///The name of the follower index ///The name of the leader index and other optional ccr related parameters ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ccr.follow", "index, body")] public Task CreateFollowIndexAsync(string index, PostData body, CreateFollowIndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"{index:index}/_ccr/follow"), ctx, body, RequestParams(requestParameters)); ///GET on /{index}/_ccr/info https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html @@ -73,6 +75,7 @@ public TResponse FollowInfo(string index, FollowInfoRequestParameters ///GET on /{index}/_ccr/info https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html ///A comma-separated list of index patterns; use `_all` to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ccr.follow_info", "index")] public Task FollowInfoAsync(string index, FollowInfoRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_ccr/info"), ctx, null, RequestParams(requestParameters)); ///GET on /{index}/_ccr/stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html @@ -83,6 +86,7 @@ public TResponse FollowIndexStats(string index, FollowIndexStatsReque ///GET on /{index}/_ccr/stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html ///A comma-separated list of index patterns; use `_all` to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ccr.follow_stats", "index")] public Task FollowIndexStatsAsync(string index, FollowIndexStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_ccr/stats"), ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_ccr/forget_follower http://www.elastic.co/guide/en/elasticsearch/reference/current @@ -95,6 +99,7 @@ public TResponse ForgetFollowerIndex(string index, PostData body, For ///the name of the leader index for which specified follower retention leases should be removed ///the name and UUID of the follower index, the name of the cluster containing the follower index, and the alias from the perspective of that cluster for the remote cluster containing the leader index ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ccr.forget_follower", "index, body")] public Task ForgetFollowerIndexAsync(string index, PostData body, ForgetFollowerIndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_ccr/forget_follower"), ctx, body, RequestParams(requestParameters)); ///GET on /_ccr/auto_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html @@ -103,6 +108,7 @@ public TResponse GetAutoFollowPattern(GetAutoFollowPatternRequestPara where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_ccr/auto_follow", null, RequestParams(requestParameters)); ///GET on /_ccr/auto_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ccr.get_auto_follow_pattern", "")] public Task GetAutoFollowPatternAsync(GetAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_ccr/auto_follow", ctx, null, RequestParams(requestParameters)); ///GET on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html @@ -113,6 +119,7 @@ public TResponse GetAutoFollowPattern(string name, GetAutoFollowPatte ///GET on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html ///The name of the auto follow pattern. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ccr.get_auto_follow_pattern", "name")] public Task GetAutoFollowPatternAsync(string name, GetAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_ccr/auto_follow/{name:name}"), ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_ccr/pause_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html @@ -123,6 +130,7 @@ public TResponse PauseFollowIndex(string index, PauseFollowIndexReque ///POST on /{index}/_ccr/pause_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html ///The name of the follower index that should pause following its leader index. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ccr.pause_follow", "index")] public Task PauseFollowIndexAsync(string index, PauseFollowIndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_ccr/pause_follow"), ctx, null, RequestParams(requestParameters)); ///PUT on /_ccr/auto_follow/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html @@ -135,6 +143,7 @@ public TResponse CreateAutoFollowPattern(string name, PostData body, ///The name of the auto follow pattern. ///The specification of the auto follow pattern ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ccr.put_auto_follow_pattern", "name, body")] public Task CreateAutoFollowPatternAsync(string name, PostData body, CreateAutoFollowPatternRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_ccr/auto_follow/{name:name}"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_ccr/resume_follow https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html @@ -147,6 +156,7 @@ public TResponse ResumeFollowIndex(string index, PostData body, Resum ///The name of the follow index to resume following. ///The name of the leader index and other optional ccr related parameters ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ccr.resume_follow", "index, body")] public Task ResumeFollowIndexAsync(string index, PostData body, ResumeFollowIndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_ccr/resume_follow"), ctx, body, RequestParams(requestParameters)); ///GET on /_ccr/stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html @@ -155,6 +165,7 @@ public TResponse Stats(CcrStatsRequestParameters requestParameters = where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_ccr/stats", null, RequestParams(requestParameters)); ///GET on /_ccr/stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ccr.stats", "")] public Task StatsAsync(CcrStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_ccr/stats", ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_ccr/unfollow http://www.elastic.co/guide/en/elasticsearch/reference/current @@ -165,6 +176,7 @@ public TResponse UnfollowIndex(string index, UnfollowIndexRequestPara ///POST on /{index}/_ccr/unfollow http://www.elastic.co/guide/en/elasticsearch/reference/current ///The name of the follower index that should be turned into a regular index. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ccr.unfollow", "index")] public Task UnfollowIndexAsync(string index, UnfollowIndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_ccr/unfollow"), ctx, null, RequestParams(requestParameters)); } diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Graph.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Graph.cs index 15cabfe2db7..21528f1f835 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Graph.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Graph.cs @@ -1,12 +1,12 @@ // ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ // ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ // ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ // ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ // ----------------------------------------------- -// -// This file is automatically generated +// +// This file is automatically generated // Please do not edit these files manually // Run the following in the root of the repos: // @@ -53,6 +53,7 @@ public TResponse Explore(string index, PostData body, GraphExploreReq ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///Graph Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("graph.explore", "index, body")] public Task ExploreAsync(string index, PostData body, GraphExploreRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_graph/explore"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type}/_graph/explore https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html @@ -69,7 +70,8 @@ public TResponse ExploreUsingType(string index, string type, PostData ///Graph Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [MapsApi("graph.explore", "index, type, body")] public Task ExploreUsingTypeAsync(string index, string type, PostData body, GraphExploreRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_graph/explore"), ctx, body, RequestParams(requestParameters)); } -} \ No newline at end of file +} diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.IndexLifecycleManagement.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.IndexLifecycleManagement.cs index 348b6f273a9..44909c687e1 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.IndexLifecycleManagement.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.IndexLifecycleManagement.cs @@ -51,6 +51,7 @@ public TResponse DeleteLifecycle(string policyId, DeleteLifecycleRequ ///DELETE on /_ilm/policy/{policy_id} https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html ///The name of the index lifecycle policy ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ilm.delete_lifecycle", "policy_id")] public Task DeleteLifecycleAsync(string policyId, DeleteLifecycleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_ilm/policy/{policyId:policyId}"), ctx, null, RequestParams(requestParameters)); ///GET on /{index}/_ilm/explain https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html @@ -61,6 +62,7 @@ public TResponse ExplainLifecycle(string index, ExplainLifecycleReque ///GET on /{index}/_ilm/explain https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html ///The name of the index to explain ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ilm.explain_lifecycle", "index")] public Task ExplainLifecycleAsync(string index, ExplainLifecycleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_ilm/explain"), ctx, null, RequestParams(requestParameters)); ///GET on /_ilm/policy/{policy_id} https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html @@ -71,6 +73,7 @@ public TResponse GetLifecycle(string policyId, GetLifecycleRequestPar ///GET on /_ilm/policy/{policy_id} https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html ///The name of the index lifecycle policy ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ilm.get_lifecycle", "policy_id")] public Task GetLifecycleAsync(string policyId, GetLifecycleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_ilm/policy/{policyId:policyId}"), ctx, null, RequestParams(requestParameters)); ///GET on /_ilm/policy https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html @@ -79,6 +82,7 @@ public TResponse GetLifecycle(GetLifecycleRequestParameters requestPa where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_ilm/policy", null, RequestParams(requestParameters)); ///GET on /_ilm/policy https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ilm.get_lifecycle", "")] public Task GetLifecycleAsync(GetLifecycleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_ilm/policy", ctx, null, RequestParams(requestParameters)); ///GET on /_ilm/status https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html @@ -87,6 +91,7 @@ public TResponse GetStatus(GetIlmStatusRequestParameters requestParam where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_ilm/status", null, RequestParams(requestParameters)); ///GET on /_ilm/status https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ilm.get_status", "")] public Task GetStatusAsync(GetIlmStatusRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_ilm/status", ctx, null, RequestParams(requestParameters)); ///POST on /_ilm/move/{index} https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html @@ -99,6 +104,7 @@ public TResponse MoveToStep(string index, PostData body, MoveToStepRe ///The name of the index whose lifecycle step is to change ///The new lifecycle step to move to ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ilm.move_to_step", "index, body")] public Task MoveToStepAsync(string index, PostData body, MoveToStepRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ilm/move/{index:index}"), ctx, body, RequestParams(requestParameters)); ///PUT on /_ilm/policy/{policy_id} https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html @@ -111,6 +117,7 @@ public TResponse PutLifecycle(string policyId, PostData body, PutLife ///The name of the index lifecycle policy ///The lifecycle policy definition to register ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ilm.put_lifecycle", "policy_id, body")] public Task PutLifecycleAsync(string policyId, PostData body, PutLifecycleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_ilm/policy/{policyId:policyId}"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_ilm/remove https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html @@ -121,6 +128,7 @@ public TResponse RemovePolicy(string index, RemovePolicyRequestParame ///POST on /{index}/_ilm/remove https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html ///The name of the index to remove policy on ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ilm.remove_policy", "index")] public Task RemovePolicyAsync(string index, RemovePolicyRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_ilm/remove"), ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_ilm/retry https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html @@ -131,6 +139,7 @@ public TResponse Retry(string index, RetryIlmRequestParameters reques ///POST on /{index}/_ilm/retry https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html ///The name of the indices (comma-separated) whose failed lifecycle step is to be retry ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ilm.retry", "index")] public Task RetryAsync(string index, RetryIlmRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_ilm/retry"), ctx, null, RequestParams(requestParameters)); ///POST on /_ilm/start https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html @@ -139,6 +148,7 @@ public TResponse Start(StartIlmRequestParameters requestParameters = where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_ilm/start", null, RequestParams(requestParameters)); ///POST on /_ilm/start https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ilm.start", "")] public Task StartAsync(StartIlmRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_ilm/start", ctx, null, RequestParams(requestParameters)); ///POST on /_ilm/stop https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html @@ -147,6 +157,7 @@ public TResponse Stop(StopIlmRequestParameters requestParameters = nu where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_ilm/stop", null, RequestParams(requestParameters)); ///POST on /_ilm/stop https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ilm.stop", "")] public Task StopAsync(StopIlmRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_ilm/stop", ctx, null, RequestParams(requestParameters)); } diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Indices.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Indices.cs index 807ae275380..46b212777cb 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Indices.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Indices.cs @@ -1,12 +1,12 @@ // ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ // ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ // ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ // ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ // ----------------------------------------------- -// -// This file is automatically generated +// +// This file is automatically generated // Please do not edit these files manually // Run the following in the root of the repos: // @@ -51,6 +51,7 @@ public TResponse AnalyzeForAll(PostData body, AnalyzeRequestParameter ///POST on /_analyze https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html ///Define analyzer/tokenizer parameters and the text on which the analysis should be performed ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.analyze", "body")] public Task AnalyzeForAllAsync(PostData body, AnalyzeRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_analyze", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_analyze https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html @@ -63,6 +64,7 @@ public TResponse Analyze(string index, PostData body, AnalyzeRequestP ///The name of the index to scope the operation ///Define analyzer/tokenizer parameters and the text on which the analysis should be performed ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.analyze", "index, body")] public Task AnalyzeAsync(string index, PostData body, AnalyzeRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_analyze"), ctx, body, RequestParams(requestParameters)); ///POST on /_cache/clear https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html @@ -71,6 +73,7 @@ public TResponse ClearCacheForAll(ClearCacheRequestParameters request where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_cache/clear", null, RequestParams(requestParameters)); ///POST on /_cache/clear https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.clear_cache", "")] public Task ClearCacheForAllAsync(ClearCacheRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_cache/clear", ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_cache/clear https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html @@ -81,6 +84,7 @@ public TResponse ClearCache(string index, ClearCacheRequestParameters ///POST on /{index}/_cache/clear https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html ///A comma-separated list of index name to limit the operation ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.clear_cache", "index")] public Task ClearCacheAsync(string index, ClearCacheRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_cache/clear"), ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_close https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html @@ -91,6 +95,7 @@ public TResponse Close(string index, CloseIndexRequestParameters requ ///POST on /{index}/_close https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html ///A comma separated list of indices to close ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.close", "index")] public Task CloseAsync(string index, CloseIndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_close"), ctx, null, RequestParams(requestParameters)); ///PUT on /{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html @@ -103,6 +108,7 @@ public TResponse Create(string index, PostData body, CreateIndexReque ///The name of the index ///The configuration for the index (`settings` and `mappings`) ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.create", "index, body")] public Task CreateAsync(string index, PostData body, CreateIndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"{index:index}"), ctx, body, RequestParams(requestParameters)); ///DELETE on /{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html @@ -113,6 +119,7 @@ public TResponse Delete(string index, DeleteIndexRequestParameters re ///DELETE on /{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html ///A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.delete", "index")] public Task DeleteAsync(string index, DeleteIndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"{index:index}"), ctx, null, RequestParams(requestParameters)); ///DELETE on /{index}/_alias/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html @@ -125,6 +132,7 @@ public TResponse DeleteAlias(string index, string name, DeleteAliasRe ///A comma-separated list of index names (supports wildcards); use `_all` for all indices ///A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.delete_alias", "index, name")] public Task DeleteAliasAsync(string index, string name, DeleteAliasRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"{index:index}/_alias/{name:name}"), ctx, null, RequestParams(requestParameters)); ///DELETE on /_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html @@ -135,6 +143,7 @@ public TResponse DeleteTemplateForAll(string name, DeleteIndexTemplat ///DELETE on /_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html ///The name of the template ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.delete_template", "name")] public Task DeleteTemplateForAllAsync(string name, DeleteIndexTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_template/{name:name}"), ctx, null, RequestParams(requestParameters)); ///HEAD on /{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html @@ -145,6 +154,7 @@ public TResponse Exists(string index, IndexExistsRequestParameters re ///HEAD on /{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html ///A comma-separated list of index names ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.exists", "index")] public Task ExistsAsync(string index, IndexExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, Url($"{index:index}"), ctx, null, RequestParams(requestParameters)); ///HEAD on /_alias/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html @@ -155,6 +165,7 @@ public TResponse AliasExistsForAll(string name, AliasExistsRequestPar ///HEAD on /_alias/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html ///A comma-separated list of alias names to return ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.exists_alias", "name")] public Task AliasExistsForAllAsync(string name, AliasExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, Url($"_alias/{name:name}"), ctx, null, RequestParams(requestParameters)); ///HEAD on /{index}/_alias/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html @@ -167,6 +178,7 @@ public TResponse AliasExists(string index, string name, AliasExistsRe ///A comma-separated list of index names to filter aliases ///A comma-separated list of alias names to return ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.exists_alias", "index, name")] public Task AliasExistsAsync(string index, string name, AliasExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, Url($"{index:index}/_alias/{name:name}"), ctx, null, RequestParams(requestParameters)); ///HEAD on /_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html @@ -177,6 +189,7 @@ public TResponse TemplateExistsForAll(string name, IndexTemplateExist ///HEAD on /_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html ///The comma separated names of the index templates ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.exists_template", "name")] public Task TemplateExistsForAllAsync(string name, IndexTemplateExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, Url($"_template/{name:name}"), ctx, null, RequestParams(requestParameters)); ///HEAD on /{index}/_mapping/{type} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html @@ -189,6 +202,7 @@ public TResponse TypeExists(string index, string type, TypeExistsRequ ///A comma-separated list of index names; use `_all` to check the types across all indices ///A comma-separated list of document types to check ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.exists_type", "index, type")] public Task TypeExistsAsync(string index, string type, TypeExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, Url($"{index:index}/_mapping/{type:type}"), ctx, null, RequestParams(requestParameters)); ///POST on /_flush https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html @@ -197,6 +211,7 @@ public TResponse FlushForAll(FlushRequestParameters requestParameters where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_flush", null, RequestParams(requestParameters)); ///POST on /_flush https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.flush", "")] public Task FlushForAllAsync(FlushRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_flush", ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_flush https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html @@ -207,6 +222,7 @@ public TResponse Flush(string index, FlushRequestParameters requestPa ///POST on /{index}/_flush https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html ///A comma-separated list of index names; use the special string `_all` or Indices.All for all indices ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.flush", "index")] public Task FlushAsync(string index, FlushRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_flush"), ctx, null, RequestParams(requestParameters)); ///POST on /_flush/synced https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush-api.html @@ -215,6 +231,7 @@ public TResponse SyncedFlushForAll(SyncedFlushRequestParameters reque where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_flush/synced", null, RequestParams(requestParameters)); ///POST on /_flush/synced https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush-api.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.flush_synced", "")] public Task SyncedFlushForAllAsync(SyncedFlushRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_flush/synced", ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_flush/synced https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush-api.html @@ -225,6 +242,7 @@ public TResponse SyncedFlush(string index, SyncedFlushRequestParamete ///POST on /{index}/_flush/synced https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush-api.html ///A comma-separated list of index names; use the special string `_all` or Indices.All for all indices ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.flush_synced", "index")] public Task SyncedFlushAsync(string index, SyncedFlushRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_flush/synced"), ctx, null, RequestParams(requestParameters)); ///POST on /_forcemerge https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html @@ -233,6 +251,7 @@ public TResponse ForceMergeForAll(ForceMergeRequestParameters request where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_forcemerge", null, RequestParams(requestParameters)); ///POST on /_forcemerge https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.forcemerge", "")] public Task ForceMergeForAllAsync(ForceMergeRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_forcemerge", ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_forcemerge https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html @@ -243,6 +262,7 @@ public TResponse ForceMerge(string index, ForceMergeRequestParameters ///POST on /{index}/_forcemerge https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.forcemerge", "index")] public Task ForceMergeAsync(string index, ForceMergeRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_forcemerge"), ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_freeze https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html @@ -253,6 +273,7 @@ public TResponse Freeze(string index, FreezeIndexRequestParameters re ///POST on /{index}/_freeze https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html ///The name of the index to freeze ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.freeze", "index")] public Task FreezeAsync(string index, FreezeIndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_freeze"), ctx, null, RequestParams(requestParameters)); ///GET on /{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html @@ -263,6 +284,7 @@ public TResponse Get(string index, GetIndexRequestParameters requestP ///GET on /{index} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html ///A comma-separated list of index names ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.get", "index")] public Task GetAsync(string index, GetIndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}"), ctx, null, RequestParams(requestParameters)); ///GET on /_alias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html @@ -271,6 +293,7 @@ public TResponse GetAliasForAll(GetAliasRequestParameters requestPara where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_alias", null, RequestParams(requestParameters)); ///GET on /_alias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.get_alias", "")] public Task GetAliasForAllAsync(GetAliasRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_alias", ctx, null, RequestParams(requestParameters)); ///GET on /_alias/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html @@ -281,6 +304,7 @@ public TResponse GetAliasForAll(string name, GetAliasRequestParameter ///GET on /_alias/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html ///A comma-separated list of alias names to return ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.get_alias", "name")] public Task GetAliasForAllAsync(string name, GetAliasRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_alias/{name:name}"), ctx, null, RequestParams(requestParameters)); ///GET on /{index}/_alias/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html @@ -293,6 +317,7 @@ public TResponse GetAlias(string index, string name, GetAliasRequestP ///A comma-separated list of index names to filter aliases ///A comma-separated list of alias names to return ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.get_alias", "index, name")] public Task GetAliasAsync(string index, string name, GetAliasRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_alias/{name:name}"), ctx, null, RequestParams(requestParameters)); ///GET on /{index}/_alias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html @@ -303,6 +328,7 @@ public TResponse GetAlias(string index, GetAliasRequestParameters req ///GET on /{index}/_alias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html ///A comma-separated list of index names to filter aliases ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.get_alias", "index")] public Task GetAliasAsync(string index, GetAliasRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_alias"), ctx, null, RequestParams(requestParameters)); ///GET on /_mapping/field/{fields} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html @@ -313,6 +339,7 @@ public TResponse GetFieldMappingForAll(string fields, GetFieldMapping ///GET on /_mapping/field/{fields} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html ///A comma-separated list of fields ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.get_field_mapping", "fields")] public Task GetFieldMappingForAllAsync(string fields, GetFieldMappingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_mapping/field/{fields:fields}"), ctx, null, RequestParams(requestParameters)); ///GET on /{index}/_mapping/field/{fields} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html @@ -325,6 +352,7 @@ public TResponse GetFieldMapping(string index, string fields, GetFiel ///A comma-separated list of index names ///A comma-separated list of fields ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.get_field_mapping", "index, fields")] public Task GetFieldMappingAsync(string index, string fields, GetFieldMappingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_mapping/field/{fields:fields}"), ctx, null, RequestParams(requestParameters)); ///GET on /_mapping/{type}/field/{fields} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html @@ -339,6 +367,7 @@ public TResponse GetFieldMappingUsingTypeForAll(string type, string f ///A comma-separated list of fields ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [MapsApi("indices.get_field_mapping", "type, fields")] public Task GetFieldMappingUsingTypeForAllAsync(string type, string fields, GetFieldMappingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_mapping/{type:type}/field/{fields:fields}"), ctx, null, RequestParams(requestParameters)); ///GET on /{index}/_mapping/{type}/field/{fields} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html @@ -355,6 +384,7 @@ public TResponse GetFieldMappingUsingType(string index, string type, ///A comma-separated list of fields ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [MapsApi("indices.get_field_mapping", "index, type, fields")] public Task GetFieldMappingUsingTypeAsync(string index, string type, string fields, GetFieldMappingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_mapping/{type:type}/field/{fields:fields}"), ctx, null, RequestParams(requestParameters)); ///GET on /_mapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html @@ -363,6 +393,7 @@ public TResponse GetMappingForAll(GetMappingRequestParameters request where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_mapping", null, RequestParams(requestParameters)); ///GET on /_mapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.get_mapping", "")] public Task GetMappingForAllAsync(GetMappingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_mapping", ctx, null, RequestParams(requestParameters)); ///GET on /{index}/_mapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html @@ -373,6 +404,7 @@ public TResponse GetMapping(string index, GetMappingRequestParameters ///GET on /{index}/_mapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html ///A comma-separated list of index names ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.get_mapping", "index")] public Task GetMappingAsync(string index, GetMappingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_mapping"), ctx, null, RequestParams(requestParameters)); ///GET on /_mapping/{type} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html @@ -385,6 +417,7 @@ public TResponse GetMappingUsingTypeForAll(string type, GetMappingReq ///A comma-separated list of document types ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [MapsApi("indices.get_mapping", "type")] public Task GetMappingUsingTypeForAllAsync(string type, GetMappingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_mapping/{type:type}"), ctx, null, RequestParams(requestParameters)); ///GET on /{index}/_mapping/{type} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html @@ -399,6 +432,7 @@ public TResponse GetMappingUsingType(string index, string type, GetMa ///A comma-separated list of document types ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [MapsApi("indices.get_mapping", "index, type")] public Task GetMappingUsingTypeAsync(string index, string type, GetMappingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_mapping/{type:type}"), ctx, null, RequestParams(requestParameters)); ///GET on /_settings https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html @@ -407,6 +441,7 @@ public TResponse GetSettingsForAll(GetIndexSettingsRequestParameters where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_settings", null, RequestParams(requestParameters)); ///GET on /_settings https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.get_settings", "")] public Task GetSettingsForAllAsync(GetIndexSettingsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_settings", ctx, null, RequestParams(requestParameters)); ///GET on /{index}/_settings https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html @@ -417,6 +452,7 @@ public TResponse GetSettings(string index, GetIndexSettingsRequestPar ///GET on /{index}/_settings https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.get_settings", "index")] public Task GetSettingsAsync(string index, GetIndexSettingsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_settings"), ctx, null, RequestParams(requestParameters)); ///GET on /{index}/_settings/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html @@ -429,6 +465,7 @@ public TResponse GetSettings(string index, string name, GetIndexSetti ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices ///The name of the settings that should be included ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.get_settings", "index, name")] public Task GetSettingsAsync(string index, string name, GetIndexSettingsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_settings/{name:name}"), ctx, null, RequestParams(requestParameters)); ///GET on /_settings/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html @@ -439,6 +476,7 @@ public TResponse GetSettingsForAll(string name, GetIndexSettingsReque ///GET on /_settings/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html ///The name of the settings that should be included ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.get_settings", "name")] public Task GetSettingsForAllAsync(string name, GetIndexSettingsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_settings/{name:name}"), ctx, null, RequestParams(requestParameters)); ///GET on /_template https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html @@ -447,6 +485,7 @@ public TResponse GetTemplateForAll(GetIndexTemplateRequestParameters where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_template", null, RequestParams(requestParameters)); ///GET on /_template https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.get_template", "")] public Task GetTemplateForAllAsync(GetIndexTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_template", ctx, null, RequestParams(requestParameters)); ///GET on /_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html @@ -457,6 +496,7 @@ public TResponse GetTemplateForAll(string name, GetIndexTemplateReque ///GET on /_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html ///The comma separated names of the index templates ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.get_template", "name")] public Task GetTemplateForAllAsync(string name, GetIndexTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_template/{name:name}"), ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_open https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html @@ -467,6 +507,7 @@ public TResponse Open(string index, OpenIndexRequestParameters reques ///POST on /{index}/_open https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html ///A comma separated list of indices to open ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.open", "index")] public Task OpenAsync(string index, OpenIndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_open"), ctx, null, RequestParams(requestParameters)); ///PUT on /{index}/_alias/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html @@ -481,6 +522,7 @@ public TResponse PutAlias(string index, string name, PostData body, P ///The name of the alias to be created or updated ///The settings for the alias, such as `routing` or `filter` ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.put_alias", "index, name, body")] public Task PutAliasAsync(string index, string name, PostData body, PutAliasRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"{index:index}/_alias/{name:name}"), ctx, body, RequestParams(requestParameters)); ///PUT on /{index}/_mapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html @@ -493,6 +535,7 @@ public TResponse PutMapping(string index, PostData body, PutMappingRe ///A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. ///The mapping definition ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.put_mapping", "index, body")] public Task PutMappingAsync(string index, PostData body, PutMappingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"{index:index}/_mapping"), ctx, body, RequestParams(requestParameters)); ///PUT on /{index}/{type}/_mapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html @@ -509,6 +552,7 @@ public TResponse PutMappingUsingType(string index, string type, PostD ///The mapping definition ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [MapsApi("indices.put_mapping", "index, type, body")] public Task PutMappingUsingTypeAsync(string index, string type, PostData body, PutMappingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"{index:index}/{type:type}/_mapping"), ctx, body, RequestParams(requestParameters)); ///PUT on /_mappings/{type} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html @@ -523,6 +567,7 @@ public TResponse PutMappingUsingTypeForAll(string type, PostData body ///The mapping definition ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [MapsApi("indices.put_mapping", "type, body")] public Task PutMappingUsingTypeForAllAsync(string type, PostData body, PutMappingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_mappings/{type:type}"), ctx, body, RequestParams(requestParameters)); ///PUT on /_settings https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html @@ -533,6 +578,7 @@ public TResponse UpdateSettingsForAll(PostData body, UpdateIndexSetti ///PUT on /_settings https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html ///The index settings to be updated ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.put_settings", "body")] public Task UpdateSettingsForAllAsync(PostData body, UpdateIndexSettingsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, "_settings", ctx, body, RequestParams(requestParameters)); ///PUT on /{index}/_settings https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html @@ -545,6 +591,7 @@ public TResponse UpdateSettings(string index, PostData body, UpdateIn ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices ///The index settings to be updated ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.put_settings", "index, body")] public Task UpdateSettingsAsync(string index, PostData body, UpdateIndexSettingsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"{index:index}/_settings"), ctx, body, RequestParams(requestParameters)); ///PUT on /_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html @@ -557,6 +604,7 @@ public TResponse PutTemplateForAll(string name, PostData body, PutInd ///The name of the template ///The template definition ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.put_template", "name, body")] public Task PutTemplateForAllAsync(string name, PostData body, PutIndexTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_template/{name:name}"), ctx, body, RequestParams(requestParameters)); ///GET on /_recovery https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html @@ -565,6 +613,7 @@ public TResponse RecoveryStatusForAll(RecoveryStatusRequestParameters where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_recovery", null, RequestParams(requestParameters)); ///GET on /_recovery https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.recovery", "")] public Task RecoveryStatusForAllAsync(RecoveryStatusRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_recovery", ctx, null, RequestParams(requestParameters)); ///GET on /{index}/_recovery https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html @@ -575,6 +624,7 @@ public TResponse RecoveryStatus(string index, RecoveryStatusRequestPa ///GET on /{index}/_recovery https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.recovery", "index")] public Task RecoveryStatusAsync(string index, RecoveryStatusRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_recovery"), ctx, null, RequestParams(requestParameters)); ///POST on /_refresh https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html @@ -583,6 +633,7 @@ public TResponse RefreshForAll(RefreshRequestParameters requestParame where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_refresh", null, RequestParams(requestParameters)); ///POST on /_refresh https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.refresh", "")] public Task RefreshForAllAsync(RefreshRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_refresh", ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_refresh https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html @@ -593,6 +644,7 @@ public TResponse Refresh(string index, RefreshRequestParameters reque ///POST on /{index}/_refresh https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.refresh", "index")] public Task RefreshAsync(string index, RefreshRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_refresh"), ctx, null, RequestParams(requestParameters)); ///POST on /{alias}/_rollover https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html @@ -605,6 +657,7 @@ public TResponse RolloverForAll(string alias, PostData body, Rollover ///The name of the alias to rollover ///The conditions that needs to be met for executing rollover ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.rollover", "alias, body")] public Task RolloverForAllAsync(string alias, PostData body, RolloverIndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{alias:alias}/_rollover"), ctx, body, RequestParams(requestParameters)); ///POST on /{alias}/_rollover/{new_index} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html @@ -619,6 +672,7 @@ public TResponse RolloverForAll(string alias, string newIndex, PostDa ///The name of the rollover index ///The conditions that needs to be met for executing rollover ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.rollover", "alias, new_index, body")] public Task RolloverForAllAsync(string alias, string newIndex, PostData body, RolloverIndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{alias:alias}/_rollover/{newIndex:newIndex}"), ctx, body, RequestParams(requestParameters)); ///GET on /_segments https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html @@ -627,6 +681,7 @@ public TResponse SegmentsForAll(SegmentsRequestParameters requestPara where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_segments", null, RequestParams(requestParameters)); ///GET on /_segments https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.segments", "")] public Task SegmentsForAllAsync(SegmentsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_segments", ctx, null, RequestParams(requestParameters)); ///GET on /{index}/_segments https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html @@ -637,6 +692,7 @@ public TResponse Segments(string index, SegmentsRequestParameters req ///GET on /{index}/_segments https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.segments", "index")] public Task SegmentsAsync(string index, SegmentsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_segments"), ctx, null, RequestParams(requestParameters)); ///GET on /_shard_stores https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html @@ -645,6 +701,7 @@ public TResponse ShardStoresForAll(IndicesShardStoresRequestParameter where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_shard_stores", null, RequestParams(requestParameters)); ///GET on /_shard_stores https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.shard_stores", "")] public Task ShardStoresForAllAsync(IndicesShardStoresRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_shard_stores", ctx, null, RequestParams(requestParameters)); ///GET on /{index}/_shard_stores https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html @@ -655,6 +712,7 @@ public TResponse ShardStores(string index, IndicesShardStoresRequestP ///GET on /{index}/_shard_stores https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.shard_stores", "index")] public Task ShardStoresAsync(string index, IndicesShardStoresRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_shard_stores"), ctx, null, RequestParams(requestParameters)); ///PUT on /{index}/_shrink/{target} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html @@ -669,6 +727,7 @@ public TResponse Shrink(string index, string target, PostData body, S ///The name of the target index to shrink into ///The configuration for the target index (`settings` and `aliases`) ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.shrink", "index, target, body")] public Task ShrinkAsync(string index, string target, PostData body, ShrinkIndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"{index:index}/_shrink/{target:target}"), ctx, body, RequestParams(requestParameters)); ///PUT on /{index}/_split/{target} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html @@ -683,6 +742,7 @@ public TResponse Split(string index, string target, PostData body, Sp ///The name of the target index to split into ///The configuration for the target index (`settings` and `aliases`) ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.split", "index, target, body")] public Task SplitAsync(string index, string target, PostData body, SplitIndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"{index:index}/_split/{target:target}"), ctx, body, RequestParams(requestParameters)); ///GET on /_stats https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html @@ -691,6 +751,7 @@ public TResponse StatsForAll(IndicesStatsRequestParameters requestPar where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_stats", null, RequestParams(requestParameters)); ///GET on /_stats https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.stats", "")] public Task StatsForAllAsync(IndicesStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_stats", ctx, null, RequestParams(requestParameters)); ///GET on /_stats/{metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html @@ -701,6 +762,7 @@ public TResponse StatsForAll(string metric, IndicesStatsRequestParame ///GET on /_stats/{metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html ///Limit the information returned the specific metrics. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.stats", "metric")] public Task StatsForAllAsync(string metric, IndicesStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_stats/{metric:metric}"), ctx, null, RequestParams(requestParameters)); ///GET on /{index}/_stats https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html @@ -711,6 +773,7 @@ public TResponse Stats(string index, IndicesStatsRequestParameters re ///GET on /{index}/_stats https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.stats", "index")] public Task StatsAsync(string index, IndicesStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_stats"), ctx, null, RequestParams(requestParameters)); ///GET on /{index}/_stats/{metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html @@ -723,6 +786,7 @@ public TResponse Stats(string index, string metric, IndicesStatsReque ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices ///Limit the information returned the specific metrics. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.stats", "index, metric")] public Task StatsAsync(string index, string metric, IndicesStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_stats/{metric:metric}"), ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_unfreeze https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html @@ -733,6 +797,7 @@ public TResponse Unfreeze(string index, UnfreezeIndexRequestParameter ///POST on /{index}/_unfreeze https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html ///The name of the index to unfreeze ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.unfreeze", "index")] public Task UnfreezeAsync(string index, UnfreezeIndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_unfreeze"), ctx, null, RequestParams(requestParameters)); ///POST on /_aliases https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html @@ -743,6 +808,7 @@ public TResponse BulkAliasForAll(PostData body, BulkAliasRequestParam ///POST on /_aliases https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html ///The definition of `actions` to perform ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.update_aliases", "body")] public Task BulkAliasForAllAsync(PostData body, BulkAliasRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_aliases", ctx, body, RequestParams(requestParameters)); ///POST on /_validate/query https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html @@ -753,6 +819,7 @@ public TResponse ValidateQueryForAll(PostData body, ValidateQueryRequ ///POST on /_validate/query https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html ///The query definition specified with the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.validate_query", "body")] public Task ValidateQueryForAllAsync(PostData body, ValidateQueryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_validate/query", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_validate/query https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html @@ -765,6 +832,7 @@ public TResponse ValidateQuery(string index, PostData body, ValidateQ ///A comma-separated list of index names to restrict the operation; use the special string `_all` or Indices.All to perform the operation on all indices ///The query definition specified with the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("indices.validate_query", "index, body")] public Task ValidateQueryAsync(string index, PostData body, ValidateQueryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_validate/query"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type}/_validate/query https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html @@ -781,7 +849,8 @@ public TResponse ValidateQueryUsingType(string index, string type, Po ///The query definition specified with the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [MapsApi("indices.validate_query", "index, type, body")] public Task ValidateQueryUsingTypeAsync(string index, string type, PostData body, ValidateQueryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_validate/query"), ctx, body, RequestParams(requestParameters)); } -} \ No newline at end of file +} diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Ingest.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Ingest.cs index d3f0a71dde6..d6f6eef8c15 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Ingest.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Ingest.cs @@ -51,6 +51,7 @@ public TResponse DeletePipeline(string id, DeletePipelineRequestParam ///DELETE on /_ingest/pipeline/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html ///Pipeline ID ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ingest.delete_pipeline", "id")] public Task DeletePipelineAsync(string id, DeletePipelineRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_ingest/pipeline/{id:id}"), ctx, null, RequestParams(requestParameters)); ///GET on /_ingest/pipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html @@ -59,6 +60,7 @@ public TResponse GetPipeline(GetPipelineRequestParameters requestPara where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_ingest/pipeline", null, RequestParams(requestParameters)); ///GET on /_ingest/pipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ingest.get_pipeline", "")] public Task GetPipelineAsync(GetPipelineRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_ingest/pipeline", ctx, null, RequestParams(requestParameters)); ///GET on /_ingest/pipeline/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html @@ -69,6 +71,7 @@ public TResponse GetPipeline(string id, GetPipelineRequestParameters ///GET on /_ingest/pipeline/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html ///Comma separated list of pipeline ids. Wildcards supported ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ingest.get_pipeline", "id")] public Task GetPipelineAsync(string id, GetPipelineRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_ingest/pipeline/{id:id}"), ctx, null, RequestParams(requestParameters)); ///GET on /_ingest/processor/grok https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get @@ -77,6 +80,7 @@ public TResponse GrokProcessorPatterns(GrokProcessorPatternsRequestPa where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_ingest/processor/grok", null, RequestParams(requestParameters)); ///GET on /_ingest/processor/grok https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ingest.processor_grok", "")] public Task GrokProcessorPatternsAsync(GrokProcessorPatternsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_ingest/processor/grok", ctx, null, RequestParams(requestParameters)); ///PUT on /_ingest/pipeline/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html @@ -89,6 +93,7 @@ public TResponse PutPipeline(string id, PostData body, PutPipelineReq ///Pipeline ID ///The ingest definition ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ingest.put_pipeline", "id, body")] public Task PutPipelineAsync(string id, PostData body, PutPipelineRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_ingest/pipeline/{id:id}"), ctx, body, RequestParams(requestParameters)); ///POST on /_ingest/pipeline/_simulate https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html @@ -99,6 +104,7 @@ public TResponse SimulatePipeline(PostData body, SimulatePipelineRequ ///POST on /_ingest/pipeline/_simulate https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html ///The simulate definition ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ingest.simulate", "body")] public Task SimulatePipelineAsync(PostData body, SimulatePipelineRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_ingest/pipeline/_simulate", ctx, body, RequestParams(requestParameters)); ///POST on /_ingest/pipeline/{id}/_simulate https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html @@ -111,6 +117,7 @@ public TResponse SimulatePipeline(string id, PostData body, SimulateP ///Pipeline ID ///The simulate definition ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ingest.simulate", "id, body")] public Task SimulatePipelineAsync(string id, PostData body, SimulatePipelineRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ingest/pipeline/{id:id}/_simulate"), ctx, body, RequestParams(requestParameters)); } diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.License.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.License.cs index 0d818d6c560..cb011359112 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.License.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.License.cs @@ -49,6 +49,7 @@ public TResponse Delete(DeleteLicenseRequestParameters requestParamet where TResponse : class, IElasticsearchResponse, new() => DoRequest(DELETE, "_license", null, RequestParams(requestParameters)); ///DELETE on /_license https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-license.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("license.delete", "")] public Task DeleteAsync(DeleteLicenseRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, "_license", ctx, null, RequestParams(requestParameters)); ///GET on /_license https://www.elastic.co/guide/en/elasticsearch/reference/master/get-license.html @@ -57,6 +58,7 @@ public TResponse Get(GetLicenseRequestParameters requestParameters = where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_license", null, RequestParams(requestParameters)); ///GET on /_license https://www.elastic.co/guide/en/elasticsearch/reference/master/get-license.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("license.get", "")] public Task GetAsync(GetLicenseRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_license", ctx, null, RequestParams(requestParameters)); ///GET on /_license/basic_status https://www.elastic.co/guide/en/elasticsearch/reference/master/get-basic-status.html @@ -65,6 +67,7 @@ public TResponse GetBasicStatus(GetBasicLicenseStatusRequestParameter where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_license/basic_status", null, RequestParams(requestParameters)); ///GET on /_license/basic_status https://www.elastic.co/guide/en/elasticsearch/reference/master/get-basic-status.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("license.get_basic_status", "")] public Task GetBasicStatusAsync(GetBasicLicenseStatusRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_license/basic_status", ctx, null, RequestParams(requestParameters)); ///GET on /_license/trial_status https://www.elastic.co/guide/en/elasticsearch/reference/master/get-trial-status.html @@ -73,6 +76,7 @@ public TResponse GetTrialStatus(GetTrialLicenseStatusRequestParameter where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_license/trial_status", null, RequestParams(requestParameters)); ///GET on /_license/trial_status https://www.elastic.co/guide/en/elasticsearch/reference/master/get-trial-status.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("license.get_trial_status", "")] public Task GetTrialStatusAsync(GetTrialLicenseStatusRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_license/trial_status", ctx, null, RequestParams(requestParameters)); ///PUT on /_license https://www.elastic.co/guide/en/elasticsearch/reference/master/update-license.html @@ -83,6 +87,7 @@ public TResponse Post(PostData body, PostLicenseRequestParameters req ///PUT on /_license https://www.elastic.co/guide/en/elasticsearch/reference/master/update-license.html ///licenses to be installed ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("license.post", "body")] public Task PostAsync(PostData body, PostLicenseRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, "_license", ctx, body, RequestParams(requestParameters)); ///POST on /_license/start_basic https://www.elastic.co/guide/en/elasticsearch/reference/master/start-basic.html @@ -91,6 +96,7 @@ public TResponse StartBasic(StartBasicLicenseRequestParameters reques where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_license/start_basic", null, RequestParams(requestParameters)); ///POST on /_license/start_basic https://www.elastic.co/guide/en/elasticsearch/reference/master/start-basic.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("license.post_start_basic", "")] public Task StartBasicAsync(StartBasicLicenseRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_license/start_basic", ctx, null, RequestParams(requestParameters)); ///POST on /_license/start_trial https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trial.html @@ -99,6 +105,7 @@ public TResponse StartTrial(StartTrialLicenseRequestParameters reques where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_license/start_trial", null, RequestParams(requestParameters)); ///POST on /_license/start_trial https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trial.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("license.post_start_trial", "")] public Task StartTrialAsync(StartTrialLicenseRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_license/start_trial", ctx, null, RequestParams(requestParameters)); } diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.MachineLearning.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.MachineLearning.cs index 6ad2fb9e17c..b5070c69c3f 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.MachineLearning.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.MachineLearning.cs @@ -53,6 +53,7 @@ public TResponse CloseJob(string jobId, PostData body, CloseJobReques ///The name of the job to close ///The URL params optionally sent in the body ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.close_job", "job_id, body")] public Task CloseJobAsync(string jobId, PostData body, CloseJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/_close"), ctx, body, RequestParams(requestParameters)); ///DELETE on /_ml/calendars/{calendar_id} @@ -63,6 +64,7 @@ public TResponse DeleteCalendar(string calendarId, DeleteCalendarRequ ///DELETE on /_ml/calendars/{calendar_id} ///The ID of the calendar to delete ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.delete_calendar", "calendar_id")] public Task DeleteCalendarAsync(string calendarId, DeleteCalendarRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_ml/calendars/{calendarId:calendarId}"), ctx, null, RequestParams(requestParameters)); ///DELETE on /_ml/calendars/{calendar_id}/events/{event_id} @@ -75,6 +77,7 @@ public TResponse DeleteCalendarEvent(string calendarId, string eventI ///The ID of the calendar to modify ///The ID of the event to remove from the calendar ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.delete_calendar_event", "calendar_id, event_id")] public Task DeleteCalendarEventAsync(string calendarId, string eventId, DeleteCalendarEventRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_ml/calendars/{calendarId:calendarId}/events/{eventId:eventId}"), ctx, null, RequestParams(requestParameters)); ///DELETE on /_ml/calendars/{calendar_id}/jobs/{job_id} @@ -87,6 +90,7 @@ public TResponse DeleteCalendarJob(string calendarId, string jobId, D ///The ID of the calendar to modify ///The ID of the job to remove from the calendar ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.delete_calendar_job", "calendar_id, job_id")] public Task DeleteCalendarJobAsync(string calendarId, string jobId, DeleteCalendarJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_ml/calendars/{calendarId:calendarId}/jobs/{jobId:jobId}"), ctx, null, RequestParams(requestParameters)); ///DELETE on /_ml/datafeeds/{datafeed_id} http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html @@ -97,6 +101,7 @@ public TResponse DeleteDatafeed(string datafeedId, DeleteDatafeedRequ ///DELETE on /_ml/datafeeds/{datafeed_id} http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html ///The ID of the datafeed to delete ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.delete_datafeed", "datafeed_id")] public Task DeleteDatafeedAsync(string datafeedId, DeleteDatafeedRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_ml/datafeeds/{datafeedId:datafeedId}"), ctx, null, RequestParams(requestParameters)); ///DELETE on /_ml/_delete_expired_data @@ -105,6 +110,7 @@ public TResponse DeleteExpiredData(DeleteExpiredDataRequestParameters where TResponse : class, IElasticsearchResponse, new() => DoRequest(DELETE, "_ml/_delete_expired_data", null, RequestParams(requestParameters)); ///DELETE on /_ml/_delete_expired_data ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.delete_expired_data", "")] public Task DeleteExpiredDataAsync(DeleteExpiredDataRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, "_ml/_delete_expired_data", ctx, null, RequestParams(requestParameters)); ///DELETE on /_ml/filters/{filter_id} @@ -115,6 +121,7 @@ public TResponse DeleteFilter(string filterId, DeleteFilterRequestPar ///DELETE on /_ml/filters/{filter_id} ///The ID of the filter to delete ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.delete_filter", "filter_id")] public Task DeleteFilterAsync(string filterId, DeleteFilterRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_ml/filters/{filterId:filterId}"), ctx, null, RequestParams(requestParameters)); ///DELETE on /_ml/anomaly_detectors/{job_id}/_forecast/{forecast_id} http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html @@ -127,6 +134,7 @@ public TResponse DeleteForecast(string jobId, string forecastId, Dele ///The ID of the job from which to delete forecasts ///The ID of the forecast to delete, can be comma delimited list or `_all` ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.delete_forecast", "job_id, forecast_id")] public Task DeleteForecastAsync(string jobId, string forecastId, DeleteForecastRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_ml/anomaly_detectors/{jobId:jobId}/_forecast/{forecastId:forecastId}"), ctx, null, RequestParams(requestParameters)); ///DELETE on /_ml/anomaly_detectors/{job_id} http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html @@ -137,6 +145,7 @@ public TResponse DeleteJob(string jobId, DeleteJobRequestParameters r ///DELETE on /_ml/anomaly_detectors/{job_id} http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html ///The ID of the job to delete ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.delete_job", "job_id")] public Task DeleteJobAsync(string jobId, DeleteJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_ml/anomaly_detectors/{jobId:jobId}"), ctx, null, RequestParams(requestParameters)); ///DELETE on /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id} http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html @@ -149,6 +158,7 @@ public TResponse DeleteModelSnapshot(string jobId, string snapshotId, ///The ID of the job to fetch ///The ID of the snapshot to delete ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.delete_model_snapshot", "job_id, snapshot_id")] public Task DeleteModelSnapshotAsync(string jobId, string snapshotId, DeleteModelSnapshotRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_ml/anomaly_detectors/{jobId:jobId}/model_snapshots/{snapshotId:snapshotId}"), ctx, null, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/{job_id}/_flush http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html @@ -161,6 +171,7 @@ public TResponse FlushJob(string jobId, PostData body, FlushJobReques ///The name of the job to flush ///Flush parameters ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.flush_job", "job_id, body")] public Task FlushJobAsync(string jobId, PostData body, FlushJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/_flush"), ctx, body, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/{job_id}/_forecast @@ -171,6 +182,7 @@ public TResponse ForecastJob(string jobId, ForecastJobRequestParamete ///POST on /_ml/anomaly_detectors/{job_id}/_forecast ///The ID of the job to forecast for ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.forecast", "job_id")] public Task ForecastJobAsync(string jobId, ForecastJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/_forecast"), ctx, null, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/{job_id}/results/buckets/{timestamp} http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html @@ -185,6 +197,7 @@ public TResponse GetBuckets(string jobId, string timestamp, PostData ///The timestamp of the desired single bucket result ///Bucket selection details if not provided in URI ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_buckets", "job_id, timestamp, body")] public Task GetBucketsAsync(string jobId, string timestamp, PostData body, GetBucketsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/results/buckets/{timestamp:timestamp}"), ctx, body, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/{job_id}/results/buckets http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html @@ -197,6 +210,7 @@ public TResponse GetBuckets(string jobId, PostData body, GetBucketsRe ///ID of the job to get bucket results from ///Bucket selection details if not provided in URI ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_buckets", "job_id, body")] public Task GetBucketsAsync(string jobId, PostData body, GetBucketsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/results/buckets"), ctx, body, RequestParams(requestParameters)); ///GET on /_ml/calendars/{calendar_id}/events @@ -207,6 +221,7 @@ public TResponse GetCalendarEvents(string calendarId, GetCalendarEven ///GET on /_ml/calendars/{calendar_id}/events ///The ID of the calendar containing the events ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_calendar_events", "calendar_id")] public Task GetCalendarEventsAsync(string calendarId, GetCalendarEventsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_ml/calendars/{calendarId:calendarId}/events"), ctx, null, RequestParams(requestParameters)); ///POST on /_ml/calendars @@ -217,6 +232,7 @@ public TResponse GetCalendars(PostData body, GetCalendarsRequestParam ///POST on /_ml/calendars ///Calendar selection details if not provided in URI ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_calendars", "body")] public Task GetCalendarsAsync(PostData body, GetCalendarsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_ml/calendars", ctx, body, RequestParams(requestParameters)); ///POST on /_ml/calendars/{calendar_id} @@ -229,6 +245,7 @@ public TResponse GetCalendars(string calendarId, PostData body, GetCa ///The ID of the calendar to fetch ///Calendar selection details if not provided in URI ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_calendars", "calendar_id, body")] public Task GetCalendarsAsync(string calendarId, PostData body, GetCalendarsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/calendars/{calendarId:calendarId}"), ctx, body, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/{job_id}/results/categories/{category_id} http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html @@ -243,6 +260,7 @@ public TResponse GetCategories(string jobId, long categoryId, PostDat ///The identifier of the category definition of interest ///Category selection details if not provided in URI ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_categories", "job_id, category_id, body")] public Task GetCategoriesAsync(string jobId, long categoryId, PostData body, GetCategoriesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/results/categories/{categoryId:categoryId}"), ctx, body, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/{job_id}/results/categories/ http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html @@ -255,6 +273,7 @@ public TResponse GetCategories(string jobId, PostData body, GetCatego ///The name of the job ///Category selection details if not provided in URI ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_categories", "job_id, body")] public Task GetCategoriesAsync(string jobId, PostData body, GetCategoriesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/results/categories/"), ctx, body, RequestParams(requestParameters)); ///GET on /_ml/datafeeds/{datafeed_id}/_stats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html @@ -265,6 +284,7 @@ public TResponse GetDatafeedStats(string datafeedId, GetDatafeedStats ///GET on /_ml/datafeeds/{datafeed_id}/_stats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html ///The ID of the datafeeds stats to fetch ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_datafeed_stats", "datafeed_id")] public Task GetDatafeedStatsAsync(string datafeedId, GetDatafeedStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_ml/datafeeds/{datafeedId:datafeedId}/_stats"), ctx, null, RequestParams(requestParameters)); ///GET on /_ml/datafeeds/_stats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html @@ -273,6 +293,7 @@ public TResponse GetDatafeedStats(GetDatafeedStatsRequestParameters r where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_ml/datafeeds/_stats", null, RequestParams(requestParameters)); ///GET on /_ml/datafeeds/_stats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_datafeed_stats", "")] public Task GetDatafeedStatsAsync(GetDatafeedStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_ml/datafeeds/_stats", ctx, null, RequestParams(requestParameters)); ///GET on /_ml/datafeeds/{datafeed_id} http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html @@ -283,6 +304,7 @@ public TResponse GetDatafeeds(string datafeedId, GetDatafeedsRequestP ///GET on /_ml/datafeeds/{datafeed_id} http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html ///The ID of the datafeeds to fetch ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_datafeeds", "datafeed_id")] public Task GetDatafeedsAsync(string datafeedId, GetDatafeedsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_ml/datafeeds/{datafeedId:datafeedId}"), ctx, null, RequestParams(requestParameters)); ///GET on /_ml/datafeeds http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html @@ -291,6 +313,7 @@ public TResponse GetDatafeeds(GetDatafeedsRequestParameters requestPa where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_ml/datafeeds", null, RequestParams(requestParameters)); ///GET on /_ml/datafeeds http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_datafeeds", "")] public Task GetDatafeedsAsync(GetDatafeedsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_ml/datafeeds", ctx, null, RequestParams(requestParameters)); ///GET on /_ml/filters @@ -299,6 +322,7 @@ public TResponse GetFilters(GetFiltersRequestParameters requestParame where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_ml/filters", null, RequestParams(requestParameters)); ///GET on /_ml/filters ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_filters", "")] public Task GetFiltersAsync(GetFiltersRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_ml/filters", ctx, null, RequestParams(requestParameters)); ///GET on /_ml/filters/{filter_id} @@ -309,6 +333,7 @@ public TResponse GetFilters(string filterId, GetFiltersRequestParamet ///GET on /_ml/filters/{filter_id} ///The ID of the filter to fetch ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_filters", "filter_id")] public Task GetFiltersAsync(string filterId, GetFiltersRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_ml/filters/{filterId:filterId}"), ctx, null, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/{job_id}/results/influencers http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html @@ -321,6 +346,7 @@ public TResponse GetInfluencers(string jobId, PostData body, GetInflu /// ///Influencer selection criteria ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_influencers", "job_id, body")] public Task GetInfluencersAsync(string jobId, PostData body, GetInfluencersRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/results/influencers"), ctx, body, RequestParams(requestParameters)); ///GET on /_ml/anomaly_detectors/_stats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html @@ -329,6 +355,7 @@ public TResponse GetJobStats(GetJobStatsRequestParameters requestPara where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_ml/anomaly_detectors/_stats", null, RequestParams(requestParameters)); ///GET on /_ml/anomaly_detectors/_stats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_job_stats", "")] public Task GetJobStatsAsync(GetJobStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_ml/anomaly_detectors/_stats", ctx, null, RequestParams(requestParameters)); ///GET on /_ml/anomaly_detectors/{job_id}/_stats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html @@ -339,6 +366,7 @@ public TResponse GetJobStats(string jobId, GetJobStatsRequestParamete ///GET on /_ml/anomaly_detectors/{job_id}/_stats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html ///The ID of the jobs stats to fetch ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_job_stats", "job_id")] public Task GetJobStatsAsync(string jobId, GetJobStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_ml/anomaly_detectors/{jobId:jobId}/_stats"), ctx, null, RequestParams(requestParameters)); ///GET on /_ml/anomaly_detectors/{job_id} http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html @@ -349,6 +377,7 @@ public TResponse GetJobs(string jobId, GetJobsRequestParameters reque ///GET on /_ml/anomaly_detectors/{job_id} http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html ///The ID of the jobs to fetch ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_jobs", "job_id")] public Task GetJobsAsync(string jobId, GetJobsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_ml/anomaly_detectors/{jobId:jobId}"), ctx, null, RequestParams(requestParameters)); ///GET on /_ml/anomaly_detectors http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html @@ -357,6 +386,7 @@ public TResponse GetJobs(GetJobsRequestParameters requestParameters = where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_ml/anomaly_detectors", null, RequestParams(requestParameters)); ///GET on /_ml/anomaly_detectors http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_jobs", "")] public Task GetJobsAsync(GetJobsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_ml/anomaly_detectors", ctx, null, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id} http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html @@ -371,6 +401,7 @@ public TResponse GetModelSnapshots(string jobId, string snapshotId, P ///The ID of the snapshot to fetch ///Model snapshot selection criteria ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_model_snapshots", "job_id, snapshot_id, body")] public Task GetModelSnapshotsAsync(string jobId, string snapshotId, PostData body, GetModelSnapshotsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/model_snapshots/{snapshotId:snapshotId}"), ctx, body, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/{job_id}/model_snapshots http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html @@ -383,6 +414,7 @@ public TResponse GetModelSnapshots(string jobId, PostData body, GetMo ///The ID of the job to fetch ///Model snapshot selection criteria ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_model_snapshots", "job_id, body")] public Task GetModelSnapshotsAsync(string jobId, PostData body, GetModelSnapshotsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/model_snapshots"), ctx, body, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/{job_id}/results/overall_buckets http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html @@ -395,6 +427,7 @@ public TResponse GetOverallBuckets(string jobId, PostData body, GetOv ///The job IDs for which to calculate overall bucket results ///Overall bucket selection details if not provided in URI ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_overall_buckets", "job_id, body")] public Task GetOverallBucketsAsync(string jobId, PostData body, GetOverallBucketsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/results/overall_buckets"), ctx, body, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/{job_id}/results/records http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html @@ -407,6 +440,7 @@ public TResponse GetAnomalyRecords(string jobId, PostData body, GetAn /// ///Record selection criteria ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.get_records", "job_id, body")] public Task GetAnomalyRecordsAsync(string jobId, PostData body, GetAnomalyRecordsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/results/records"), ctx, body, RequestParams(requestParameters)); ///GET on /_ml/info @@ -415,6 +449,7 @@ public TResponse Info(MachineLearningInfoRequestParameters requestPar where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_ml/info", null, RequestParams(requestParameters)); ///GET on /_ml/info ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.info", "")] public Task InfoAsync(MachineLearningInfoRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_ml/info", ctx, null, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/{job_id}/_open http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html @@ -425,6 +460,7 @@ public TResponse OpenJob(string jobId, OpenJobRequestParameters reque ///POST on /_ml/anomaly_detectors/{job_id}/_open http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html ///The ID of the job to open ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.open_job", "job_id")] public Task OpenJobAsync(string jobId, OpenJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/_open"), ctx, null, RequestParams(requestParameters)); ///POST on /_ml/calendars/{calendar_id}/events @@ -437,6 +473,7 @@ public TResponse PostCalendarEvents(string calendarId, PostData body, ///The ID of the calendar to modify ///A list of events ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.post_calendar_events", "calendar_id, body")] public Task PostCalendarEventsAsync(string calendarId, PostData body, PostCalendarEventsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/calendars/{calendarId:calendarId}/events"), ctx, body, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/{job_id}/_data http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html @@ -449,6 +486,7 @@ public TResponse PostJobData(string jobId, PostData body, PostJobData ///The name of the job receiving the data ///The data to process ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.post_data", "job_id, body")] public Task PostJobDataAsync(string jobId, PostData body, PostJobDataRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/_data"), ctx, body, RequestParams(requestParameters)); ///GET on /_ml/datafeeds/{datafeed_id}/_preview http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html @@ -459,6 +497,7 @@ public TResponse PreviewDatafeed(string datafeedId, PreviewDatafeedRe ///GET on /_ml/datafeeds/{datafeed_id}/_preview http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html ///The ID of the datafeed to preview ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.preview_datafeed", "datafeed_id")] public Task PreviewDatafeedAsync(string datafeedId, PreviewDatafeedRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_ml/datafeeds/{datafeedId:datafeedId}/_preview"), ctx, null, RequestParams(requestParameters)); ///PUT on /_ml/calendars/{calendar_id} @@ -471,6 +510,7 @@ public TResponse PutCalendar(string calendarId, PostData body, PutCal ///The ID of the calendar to create ///The calendar details ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.put_calendar", "calendar_id, body")] public Task PutCalendarAsync(string calendarId, PostData body, PutCalendarRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_ml/calendars/{calendarId:calendarId}"), ctx, body, RequestParams(requestParameters)); ///PUT on /_ml/calendars/{calendar_id}/jobs/{job_id} @@ -483,6 +523,7 @@ public TResponse PutCalendarJob(string calendarId, string jobId, PutC ///The ID of the calendar to modify ///The ID of the job to add to the calendar ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.put_calendar_job", "calendar_id, job_id")] public Task PutCalendarJobAsync(string calendarId, string jobId, PutCalendarJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_ml/calendars/{calendarId:calendarId}/jobs/{jobId:jobId}"), ctx, null, RequestParams(requestParameters)); ///PUT on /_ml/datafeeds/{datafeed_id} http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html @@ -495,6 +536,7 @@ public TResponse PutDatafeed(string datafeedId, PostData body, PutDat ///The ID of the datafeed to create ///The datafeed config ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.put_datafeed", "datafeed_id, body")] public Task PutDatafeedAsync(string datafeedId, PostData body, PutDatafeedRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_ml/datafeeds/{datafeedId:datafeedId}"), ctx, body, RequestParams(requestParameters)); ///PUT on /_ml/filters/{filter_id} @@ -507,6 +549,7 @@ public TResponse PutFilter(string filterId, PostData body, PutFilterR ///The ID of the filter to create ///The filter details ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.put_filter", "filter_id, body")] public Task PutFilterAsync(string filterId, PostData body, PutFilterRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_ml/filters/{filterId:filterId}"), ctx, body, RequestParams(requestParameters)); ///PUT on /_ml/anomaly_detectors/{job_id} http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html @@ -519,6 +562,7 @@ public TResponse PutJob(string jobId, PostData body, PutJobRequestPar ///The ID of the job to create ///The job ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.put_job", "job_id, body")] public Task PutJobAsync(string jobId, PostData body, PutJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_ml/anomaly_detectors/{jobId:jobId}"), ctx, body, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_revert http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html @@ -533,6 +577,7 @@ public TResponse RevertModelSnapshot(string jobId, string snapshotId, ///The ID of the snapshot to revert to ///Reversion options ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.revert_model_snapshot", "job_id, snapshot_id, body")] public Task RevertModelSnapshotAsync(string jobId, string snapshotId, PostData body, RevertModelSnapshotRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/model_snapshots/{snapshotId:snapshotId}/_revert"), ctx, body, RequestParams(requestParameters)); ///POST on /_ml/datafeeds/{datafeed_id}/_start http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html @@ -545,6 +590,7 @@ public TResponse StartDatafeed(string datafeedId, PostData body, Star ///The ID of the datafeed to start ///The start datafeed parameters ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.start_datafeed", "datafeed_id, body")] public Task StartDatafeedAsync(string datafeedId, PostData body, StartDatafeedRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/datafeeds/{datafeedId:datafeedId}/_start"), ctx, body, RequestParams(requestParameters)); ///POST on /_ml/datafeeds/{datafeed_id}/_stop http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html @@ -555,6 +601,7 @@ public TResponse StopDatafeed(string datafeedId, StopDatafeedRequestP ///POST on /_ml/datafeeds/{datafeed_id}/_stop http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html ///The ID of the datafeed to stop ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.stop_datafeed", "datafeed_id")] public Task StopDatafeedAsync(string datafeedId, StopDatafeedRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/datafeeds/{datafeedId:datafeedId}/_stop"), ctx, null, RequestParams(requestParameters)); ///POST on /_ml/datafeeds/{datafeed_id}/_update http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html @@ -567,6 +614,7 @@ public TResponse UpdateDatafeed(string datafeedId, PostData body, Upd ///The ID of the datafeed to update ///The datafeed update settings ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.update_datafeed", "datafeed_id, body")] public Task UpdateDatafeedAsync(string datafeedId, PostData body, UpdateDatafeedRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/datafeeds/{datafeedId:datafeedId}/_update"), ctx, body, RequestParams(requestParameters)); ///POST on /_ml/filters/{filter_id}/_update @@ -579,6 +627,7 @@ public TResponse UpdateFilter(string filterId, PostData body, UpdateF ///The ID of the filter to update ///The filter update ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.update_filter", "filter_id, body")] public Task UpdateFilterAsync(string filterId, PostData body, UpdateFilterRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/filters/{filterId:filterId}/_update"), ctx, body, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/{job_id}/_update http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html @@ -591,6 +640,7 @@ public TResponse UpdateJob(string jobId, PostData body, UpdateJobRequ ///The ID of the job to create ///The job update settings ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.update_job", "job_id, body")] public Task UpdateJobAsync(string jobId, PostData body, UpdateJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/_update"), ctx, body, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html @@ -605,6 +655,7 @@ public TResponse UpdateModelSnapshot(string jobId, string snapshotId, ///The ID of the snapshot to update ///The model snapshot properties to update ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.update_model_snapshot", "job_id, snapshot_id, body")] public Task UpdateModelSnapshotAsync(string jobId, string snapshotId, PostData body, UpdateModelSnapshotRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/model_snapshots/{snapshotId:snapshotId}/_update"), ctx, body, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/_validate @@ -615,6 +666,7 @@ public TResponse ValidateJob(PostData body, ValidateJobRequestParamet ///POST on /_ml/anomaly_detectors/_validate ///The job config ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.validate", "body")] public Task ValidateJobAsync(PostData body, ValidateJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_ml/anomaly_detectors/_validate", ctx, body, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/_validate/detector @@ -625,6 +677,7 @@ public TResponse ValidateDetector(PostData body, ValidateDetectorRequ ///POST on /_ml/anomaly_detectors/_validate/detector ///The detector ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.validate_detector", "body")] public Task ValidateDetectorAsync(PostData body, ValidateDetectorRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_ml/anomaly_detectors/_validate/detector", ctx, body, RequestParams(requestParameters)); } diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Migration.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Migration.cs index 6648c4f0bcc..c15987dfe7d 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Migration.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Migration.cs @@ -49,6 +49,7 @@ public TResponse DeprecationInfo(DeprecationInfoRequestParameters req where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_migration/deprecations", null, RequestParams(requestParameters)); ///GET on /_migration/deprecations http://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("migration.deprecations", "")] public Task DeprecationInfoAsync(DeprecationInfoRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_migration/deprecations", ctx, null, RequestParams(requestParameters)); ///GET on /{index}/_migration/deprecations http://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html @@ -59,6 +60,7 @@ public TResponse DeprecationInfo(string index, DeprecationInfoRequest ///GET on /{index}/_migration/deprecations http://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html ///Index pattern ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("migration.deprecations", "index")] public Task DeprecationInfoAsync(string index, DeprecationInfoRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_migration/deprecations"), ctx, null, RequestParams(requestParameters)); } diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs index 25a888e2d75..888d939bfb1 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs @@ -182,29 +182,31 @@ partial void SetupNamespaces() XPack = new LowLevelXPackNamespace(this); } - ///POST on /_bulk https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html + ///POST on /_bulk http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html ///The operation definition and data (action-data pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Bulk(PostData body, BulkRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_bulk", body, RequestParams(requestParameters)); - ///POST on /_bulk https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html + ///POST on /_bulk http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html ///The operation definition and data (action-data pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".bulk", "body")] public Task BulkAsync(PostData body, BulkRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_bulk", ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_bulk https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html + ///POST on /{index}/_bulk http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html ///Default index for items which don't provide one ///The operation definition and data (action-data pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Bulk(string index, PostData body, BulkRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_bulk"), body, RequestParams(requestParameters)); - ///POST on /{index}/_bulk https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html + ///POST on /{index}/_bulk http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html ///Default index for items which don't provide one ///The operation definition and data (action-data pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".bulk", "index, body")] public Task BulkAsync(string index, PostData body, BulkRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_bulk"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_bulk https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html + ///POST on /{index}/{type}/_bulk http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html ///Default index for items which don't provide one ///Default document type for items which don't provide one ///The operation definition and data (action-data pairs), separated by newlines @@ -212,134 +214,144 @@ public Task BulkAsync(string index, PostData body, BulkReq [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse BulkUsingType(string index, string type, PostData body, BulkRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_bulk"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_bulk https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html + ///POST on /{index}/{type}/_bulk http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html ///Default index for items which don't provide one ///Default document type for items which don't provide one ///The operation definition and data (action-data pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".bulk", "index, type, body")] public Task BulkUsingTypeAsync(string index, string type, PostData body, BulkRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_bulk"), ctx, body, RequestParams(requestParameters)); - ///DELETE on /_search/scroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api + ///DELETE on /_search/scroll http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html ///A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse ClearScroll(PostData body, ClearScrollRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(DELETE, "_search/scroll", body, RequestParams(requestParameters)); - ///DELETE on /_search/scroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api + ///DELETE on /_search/scroll http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html ///A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".clear_scroll", "body")] public Task ClearScrollAsync(PostData body, ClearScrollRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, "_search/scroll", ctx, body, RequestParams(requestParameters)); - ///DELETE on /_search/scroll/{scroll_id} https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api + ///DELETE on /_search/scroll/{scroll_id} http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html ///A comma-separated list of scroll IDs to clear ///A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: A scroll id can be quite large and should be specified as part of the body")] + [Obsolete("Deprecated in version 7.0: A scroll id can be quite large and should be specified as part of the body")] public TResponse ClearScroll(string scrollId, PostData body, ClearScrollRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(DELETE, Url($"_search/scroll/{scrollId:scrollId}"), body, RequestParams(requestParameters)); - ///DELETE on /_search/scroll/{scroll_id} https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api + ///DELETE on /_search/scroll/{scroll_id} http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html ///A comma-separated list of scroll IDs to clear ///A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: A scroll id can be quite large and should be specified as part of the body")] + [Obsolete("Deprecated in version 7.0: A scroll id can be quite large and should be specified as part of the body")] + [MapsApi(".clear_scroll", "scroll_id, body")] public Task ClearScrollAsync(string scrollId, PostData body, ClearScrollRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_search/scroll/{scrollId:scrollId}"), ctx, body, RequestParams(requestParameters)); - ///POST on /_count https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html + ///POST on /_count http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html ///A query to restrict the results specified with the Query DSL (optional) ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Count(PostData body, CountRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_count", body, RequestParams(requestParameters)); - ///POST on /_count https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html + ///POST on /_count http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html ///A query to restrict the results specified with the Query DSL (optional) ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".count", "body")] public Task CountAsync(PostData body, CountRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_count", ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_count https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html + ///POST on /{index}/_count http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html ///A comma-separated list of indices to restrict the results ///A query to restrict the results specified with the Query DSL (optional) ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Count(string index, PostData body, CountRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_count"), body, RequestParams(requestParameters)); - ///POST on /{index}/_count https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html + ///POST on /{index}/_count http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html ///A comma-separated list of indices to restrict the results ///A query to restrict the results specified with the Query DSL (optional) ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".count", "index, body")] public Task CountAsync(string index, PostData body, CountRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_count"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_count https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html + ///POST on /{index}/{type}/_count http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html ///A comma-separated list of indices to restrict the results ///A comma-separated list of types to restrict the results ///A query to restrict the results specified with the Query DSL (optional) ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse CountUsingType(string index, string type, PostData body, CountRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_count"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_count https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html + ///POST on /{index}/{type}/_count http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html ///A comma-separated list of indices to restrict the results ///A comma-separated list of types to restrict the results ///A query to restrict the results specified with the Query DSL (optional) ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".count", "index, type, body")] public Task CountUsingTypeAsync(string index, string type, PostData body, CountRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_count"), ctx, body, RequestParams(requestParameters)); - ///PUT on /{index}/_create/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///PUT on /{index}/_create/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Create(string index, string id, PostData body, CreateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(PUT, Url($"{index:index}/_create/{id:id}"), body, RequestParams(requestParameters)); - ///PUT on /{index}/_create/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///PUT on /{index}/_create/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".create", "index, id, body")] public Task CreateAsync(string index, string id, PostData body, CreateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"{index:index}/_create/{id:id}"), ctx, body, RequestParams(requestParameters)); - ///PUT on /{index}/{type}/{id}/_create https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///PUT on /{index}/{type}/{id}/_create http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///The type of the document ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse CreateUsingType(string index, string type, string id, PostData body, CreateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(PUT, Url($"{index:index}/{type:type}/{id:id}/_create"), body, RequestParams(requestParameters)); - ///PUT on /{index}/{type}/{id}/_create https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///PUT on /{index}/{type}/{id}/_create http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///The type of the document ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".create", "index, type, id, body")] public Task CreateUsingTypeAsync(string index, string type, string id, PostData body, CreateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"{index:index}/{type:type}/{id:id}/_create"), ctx, body, RequestParams(requestParameters)); - ///DELETE on /{index}/_doc/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html + ///DELETE on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Delete(string index, string id, DeleteRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(DELETE, Url($"{index:index}/_doc/{id:id}"), null, RequestParams(requestParameters)); - ///DELETE on /{index}/_doc/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html + ///DELETE on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".delete", "index, id")] public Task DeleteAsync(string index, string id, DeleteRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"{index:index}/_doc/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///DELETE on /{index}/{type}/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html + ///DELETE on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html ///The name of the index ///The type of the document ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse DeleteUsingType(string index, string type, string id, DeleteRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(DELETE, Url($"{index:index}/{type:type}/{id:id}"), null, RequestParams(requestParameters)); - ///DELETE on /{index}/{type}/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html + ///DELETE on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html ///The name of the index ///The type of the document ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".delete", "index, type, id")] public Task DeleteUsingTypeAsync(string index, string type, string id, DeleteRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"{index:index}/{type:type}/{id:id}"), ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_delete_by_query https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html @@ -352,6 +364,7 @@ public TResponse DeleteByQuery(string index, PostData body, DeleteByQ ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".delete_by_query", "index, body")] public Task DeleteByQueryAsync(string index, PostData body, DeleteByQueryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_delete_by_query"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type}/_delete_by_query https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html @@ -359,7 +372,7 @@ public Task DeleteByQueryAsync(string index, PostData body ///A comma-separated list of document types to search; leave empty to perform the operation on all types ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse DeleteByQueryUsingType(string index, string type, PostData body, DeleteByQueryRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_delete_by_query"), body, RequestParams(requestParameters)); ///POST on /{index}/{type}/_delete_by_query https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html @@ -367,7 +380,8 @@ public TResponse DeleteByQueryUsingType(string index, string type, Po ///A comma-separated list of document types to search; leave empty to perform the operation on all types ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".delete_by_query", "index, type, body")] public Task DeleteByQueryUsingTypeAsync(string index, string type, PostData body, DeleteByQueryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_delete_by_query"), ctx, body, RequestParams(requestParameters)); ///POST on /_delete_by_query/{task_id}/_rethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html @@ -378,442 +392,477 @@ public TResponse DeleteByQueryRethrottle(string taskId, DeleteByQuery ///POST on /_delete_by_query/{task_id}/_rethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html ///The task id to rethrottle ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".delete_by_query_rethrottle", "task_id")] public Task DeleteByQueryRethrottleAsync(string taskId, DeleteByQueryRethrottleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_delete_by_query/{taskId:taskId}/_rethrottle"), ctx, null, RequestParams(requestParameters)); - ///DELETE on /_scripts/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///DELETE on /_scripts/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html ///Script ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse DeleteScript(string id, DeleteScriptRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(DELETE, Url($"_scripts/{id:id}"), null, RequestParams(requestParameters)); - ///DELETE on /_scripts/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///DELETE on /_scripts/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html ///Script ID ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".delete_script", "id")] public Task DeleteScriptAsync(string id, DeleteScriptRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_scripts/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///HEAD on /{index}/_doc/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///HEAD on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse DocumentExists(string index, string id, DocumentExistsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(HEAD, Url($"{index:index}/_doc/{id:id}"), null, RequestParams(requestParameters)); - ///HEAD on /{index}/_doc/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///HEAD on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".exists", "index, id")] public Task DocumentExistsAsync(string index, string id, DocumentExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, Url($"{index:index}/_doc/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///HEAD on /{index}/{type}/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///HEAD on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The type of the document (use `_all` to fetch the first document matching the ID across all types) ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse DocumentExistsUsingType(string index, string type, string id, DocumentExistsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(HEAD, Url($"{index:index}/{type:type}/{id:id}"), null, RequestParams(requestParameters)); - ///HEAD on /{index}/{type}/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///HEAD on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The type of the document (use `_all` to fetch the first document matching the ID across all types) ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".exists", "index, type, id")] public Task DocumentExistsUsingTypeAsync(string index, string type, string id, DocumentExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, Url($"{index:index}/{type:type}/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///HEAD on /{index}/_source/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///HEAD on /{index}/_source/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse SourceExists(string index, string id, SourceExistsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(HEAD, Url($"{index:index}/_source/{id:id}"), null, RequestParams(requestParameters)); - ///HEAD on /{index}/_source/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///HEAD on /{index}/_source/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".exists_source", "index, id")] public Task SourceExistsAsync(string index, string id, SourceExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, Url($"{index:index}/_source/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///HEAD on /{index}/{type}/{id}/_source https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///HEAD on /{index}/{type}/{id}/_source http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The type of the document; deprecated and optional starting with 7.0 ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse SourceExistsUsingType(string index, string type, string id, SourceExistsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(HEAD, Url($"{index:index}/{type:type}/{id:id}/_source"), null, RequestParams(requestParameters)); - ///HEAD on /{index}/{type}/{id}/_source https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///HEAD on /{index}/{type}/{id}/_source http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The type of the document; deprecated and optional starting with 7.0 ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".exists_source", "index, type, id")] public Task SourceExistsUsingTypeAsync(string index, string type, string id, SourceExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, Url($"{index:index}/{type:type}/{id:id}/_source"), ctx, null, RequestParams(requestParameters)); - ///POST on /{index}/_explain/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html + ///POST on /{index}/_explain/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html ///The name of the index ///The document ID ///The query definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Explain(string index, string id, PostData body, ExplainRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_explain/{id:id}"), body, RequestParams(requestParameters)); - ///POST on /{index}/_explain/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html + ///POST on /{index}/_explain/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html ///The name of the index ///The document ID ///The query definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".explain", "index, id, body")] public Task ExplainAsync(string index, string id, PostData body, ExplainRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_explain/{id:id}"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/{id}/_explain https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html + ///POST on /{index}/{type}/{id}/_explain http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html ///The name of the index ///The type of the document ///The document ID ///The query definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse ExplainUsingType(string index, string type, string id, PostData body, ExplainRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/{id:id}/_explain"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/{id}/_explain https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html + ///POST on /{index}/{type}/{id}/_explain http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html ///The name of the index ///The type of the document ///The document ID ///The query definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".explain", "index, type, id, body")] public Task ExplainUsingTypeAsync(string index, string type, string id, PostData body, ExplainRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/{id:id}/_explain"), ctx, body, RequestParams(requestParameters)); - ///POST on /_field_caps https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html + ///POST on /_field_caps http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse FieldCapabilities(FieldCapabilitiesRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_field_caps", null, RequestParams(requestParameters)); - ///POST on /_field_caps https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html + ///POST on /_field_caps http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".field_caps", "")] public Task FieldCapabilitiesAsync(FieldCapabilitiesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_field_caps", ctx, null, RequestParams(requestParameters)); - ///POST on /{index}/_field_caps https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html + ///POST on /{index}/_field_caps http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse FieldCapabilities(string index, FieldCapabilitiesRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_field_caps"), null, RequestParams(requestParameters)); - ///POST on /{index}/_field_caps https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html + ///POST on /{index}/_field_caps http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".field_caps", "index")] public Task FieldCapabilitiesAsync(string index, FieldCapabilitiesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_field_caps"), ctx, null, RequestParams(requestParameters)); - ///GET on /{index}/_doc/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///GET on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Get(string index, string id, GetRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"{index:index}/_doc/{id:id}"), null, RequestParams(requestParameters)); - ///GET on /{index}/_doc/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///GET on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".get", "index, id")] public Task GetAsync(string index, string id, GetRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_doc/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///GET on /{index}/{type}/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///GET on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The type of the document (use `_all` to fetch the first document matching the ID across all types) ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse GetUsingType(string index, string type, string id, GetRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"{index:index}/{type:type}/{id:id}"), null, RequestParams(requestParameters)); - ///GET on /{index}/{type}/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///GET on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The type of the document (use `_all` to fetch the first document matching the ID across all types) ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".get", "index, type, id")] public Task GetUsingTypeAsync(string index, string type, string id, GetRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/{type:type}/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///GET on /_scripts/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///GET on /_scripts/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html ///Script ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse GetScript(string id, GetScriptRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"_scripts/{id:id}"), null, RequestParams(requestParameters)); - ///GET on /_scripts/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///GET on /_scripts/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html ///Script ID ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".get_script", "id")] public Task GetScriptAsync(string id, GetScriptRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_scripts/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///GET on /{index}/_source/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///GET on /{index}/_source/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Source(string index, string id, SourceRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"{index:index}/_source/{id:id}"), null, RequestParams(requestParameters)); - ///GET on /{index}/_source/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///GET on /{index}/_source/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".get_source", "index, id")] public Task SourceAsync(string index, string id, SourceRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_source/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///GET on /{index}/{type}/{id}/_source https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///GET on /{index}/{type}/{id}/_source http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The type of the document; deprecated and optional starting with 7.0 ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse SourceUsingType(string index, string type, string id, SourceRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"{index:index}/{type:type}/{id:id}/_source"), null, RequestParams(requestParameters)); - ///GET on /{index}/{type}/{id}/_source https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///GET on /{index}/{type}/{id}/_source http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The type of the document; deprecated and optional starting with 7.0 ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".get_source", "index, type, id")] public Task SourceUsingTypeAsync(string index, string type, string id, SourceRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/{type:type}/{id:id}/_source"), ctx, null, RequestParams(requestParameters)); - ///POST on /{index}/_doc/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///POST on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Index(string index, string id, PostData body, IndexRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_doc/{id:id}"), body, RequestParams(requestParameters)); - ///POST on /{index}/_doc/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///POST on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".index", "index, id, body")] public Task IndexAsync(string index, string id, PostData body, IndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_doc/{id:id}"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_doc https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///POST on /{index}/_doc http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Index(string index, PostData body, IndexRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_doc"), body, RequestParams(requestParameters)); - ///POST on /{index}/_doc https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///POST on /{index}/_doc http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".index", "index, body")] public Task IndexAsync(string index, PostData body, IndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_doc"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///POST on /{index}/{type} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///The type of the document ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse IndexUsingType(string index, string type, PostData body, IndexRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///POST on /{index}/{type} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///The type of the document ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".index", "index, type, body")] public Task IndexUsingTypeAsync(string index, string type, PostData body, IndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///POST on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///The type of the document ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse IndexUsingType(string index, string type, string id, PostData body, IndexRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/{id:id}"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///POST on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///The type of the document ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".index", "index, type, id, body")] public Task IndexUsingTypeAsync(string index, string type, string id, PostData body, IndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/{id:id}"), ctx, body, RequestParams(requestParameters)); - ///GET on / https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + ///GET on / http://www.elastic.co/guide/ ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse RootNodeInfo(RootNodeInfoRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "", null, RequestParams(requestParameters)); - ///GET on / https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + ///GET on / http://www.elastic.co/guide/ ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".info", "")] public Task RootNodeInfoAsync(RootNodeInfoRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "", ctx, null, RequestParams(requestParameters)); - ///POST on /_mget https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html + ///POST on /_mget http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html ///Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiGet(PostData body, MultiGetRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_mget", body, RequestParams(requestParameters)); - ///POST on /_mget https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html + ///POST on /_mget http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html ///Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".mget", "body")] public Task MultiGetAsync(PostData body, MultiGetRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_mget", ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_mget https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html + ///POST on /{index}/_mget http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html ///The name of the index ///Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiGet(string index, PostData body, MultiGetRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_mget"), body, RequestParams(requestParameters)); - ///POST on /{index}/_mget https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html + ///POST on /{index}/_mget http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html ///The name of the index ///Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".mget", "index, body")] public Task MultiGetAsync(string index, PostData body, MultiGetRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_mget"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_mget https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html + ///POST on /{index}/{type}/_mget http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html ///The name of the index ///The type of the document ///Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse MultiGetUsingType(string index, string type, PostData body, MultiGetRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_mget"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_mget https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html + ///POST on /{index}/{type}/_mget http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html ///The name of the index ///The type of the document ///Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".mget", "index, type, body")] public Task MultiGetUsingTypeAsync(string index, string type, PostData body, MultiGetRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_mget"), ctx, body, RequestParams(requestParameters)); - ///POST on /_msearch https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html + ///POST on /_msearch http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiSearch(PostData body, MultiSearchRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_msearch", body, RequestParams(requestParameters)); - ///POST on /_msearch https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html + ///POST on /_msearch http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".msearch", "body")] public Task MultiSearchAsync(PostData body, MultiSearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_msearch", ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_msearch https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html + ///POST on /{index}/_msearch http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html ///A comma-separated list of index names to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiSearch(string index, PostData body, MultiSearchRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_msearch"), body, RequestParams(requestParameters)); - ///POST on /{index}/_msearch https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html + ///POST on /{index}/_msearch http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html ///A comma-separated list of index names to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".msearch", "index, body")] public Task MultiSearchAsync(string index, PostData body, MultiSearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_msearch"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_msearch https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html + ///POST on /{index}/{type}/_msearch http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html ///A comma-separated list of index names to use as default ///A comma-separated list of document types to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse MultiSearchUsingType(string index, string type, PostData body, MultiSearchRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_msearch"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_msearch https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html + ///POST on /{index}/{type}/_msearch http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html ///A comma-separated list of index names to use as default ///A comma-separated list of document types to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".msearch", "index, type, body")] public Task MultiSearchUsingTypeAsync(string index, string type, PostData body, MultiSearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_msearch"), ctx, body, RequestParams(requestParameters)); - ///POST on /_msearch/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + ///POST on /_msearch/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiSearchTemplate(PostData body, MultiSearchTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_msearch/template", body, RequestParams(requestParameters)); - ///POST on /_msearch/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + ///POST on /_msearch/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".msearch_template", "body")] public Task MultiSearchTemplateAsync(PostData body, MultiSearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_msearch/template", ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_msearch/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + ///POST on /{index}/_msearch/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html ///A comma-separated list of index names to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiSearchTemplate(string index, PostData body, MultiSearchTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_msearch/template"), body, RequestParams(requestParameters)); - ///POST on /{index}/_msearch/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + ///POST on /{index}/_msearch/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html ///A comma-separated list of index names to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".msearch_template", "index, body")] public Task MultiSearchTemplateAsync(string index, PostData body, MultiSearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_msearch/template"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_msearch/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + ///POST on /{index}/{type}/_msearch/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html ///A comma-separated list of index names to use as default ///A comma-separated list of document types to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse MultiSearchTemplateUsingType(string index, string type, PostData body, MultiSearchTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_msearch/template"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_msearch/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + ///POST on /{index}/{type}/_msearch/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html ///A comma-separated list of index names to use as default ///A comma-separated list of document types to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".msearch_template", "index, type, body")] public Task MultiSearchTemplateUsingTypeAsync(string index, string type, PostData body, MultiSearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_msearch/template"), ctx, body, RequestParams(requestParameters)); - ///POST on /_mtermvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html + ///POST on /_mtermvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html ///Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiTermVectors(PostData body, MultiTermVectorsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_mtermvectors", body, RequestParams(requestParameters)); - ///POST on /_mtermvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html + ///POST on /_mtermvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html ///Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".mtermvectors", "body")] public Task MultiTermVectorsAsync(PostData body, MultiTermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_mtermvectors", ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_mtermvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html + ///POST on /{index}/_mtermvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html ///The index in which the document resides. ///Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiTermVectors(string index, PostData body, MultiTermVectorsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_mtermvectors"), body, RequestParams(requestParameters)); - ///POST on /{index}/_mtermvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html + ///POST on /{index}/_mtermvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html ///The index in which the document resides. ///Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".mtermvectors", "index, body")] public Task MultiTermVectorsAsync(string index, PostData body, MultiTermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_mtermvectors"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_mtermvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html + ///POST on /{index}/{type}/_mtermvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html ///The index in which the document resides. ///The type of the document. ///Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse MultiTermVectorsUsingType(string index, string type, PostData body, MultiTermVectorsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_mtermvectors"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_mtermvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html + ///POST on /{index}/{type}/_mtermvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html ///The index in which the document resides. ///The type of the document. ///Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".mtermvectors", "index, type, body")] public Task MultiTermVectorsUsingTypeAsync(string index, string type, PostData body, MultiTermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_mtermvectors"), ctx, body, RequestParams(requestParameters)); - ///HEAD on / https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + ///HEAD on / http://www.elastic.co/guide/ ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Ping(PingRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(HEAD, "", null, RequestParams(requestParameters)); - ///HEAD on / https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + ///HEAD on / http://www.elastic.co/guide/ ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".ping", "")] public Task PingAsync(PingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, "", ctx, null, RequestParams(requestParameters)); - ///PUT on /_scripts/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///PUT on /_scripts/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html ///Script ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse PutScript(string id, PostData body, PutScriptRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(PUT, Url($"_scripts/{id:id}"), body, RequestParams(requestParameters)); - ///PUT on /_scripts/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///PUT on /_scripts/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html ///Script ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".put_script", "id, body")] public Task PutScriptAsync(string id, PostData body, PutScriptRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_scripts/{id:id}"), ctx, body, RequestParams(requestParameters)); - ///PUT on /_scripts/{id}/{context} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///PUT on /_scripts/{id}/{context} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html ///Script ID ///Script context ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse PutScript(string id, string context, PostData body, PutScriptRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(PUT, Url($"_scripts/{id:id}/{context:context}"), body, RequestParams(requestParameters)); - ///PUT on /_scripts/{id}/{context} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///PUT on /_scripts/{id}/{context} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html ///Script ID ///Script context ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".put_script", "id, context, body")] public Task PutScriptAsync(string id, string context, PostData body, PutScriptRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_scripts/{id:id}/{context:context}"), ctx, body, RequestParams(requestParameters)); ///POST on /_reindex https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html @@ -824,6 +873,7 @@ public TResponse ReindexOnServer(PostData body, ReindexOnServerReques ///POST on /_reindex https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html ///The search definition using the Query DSL and the prototype for the index request. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".reindex", "body")] public Task ReindexOnServerAsync(PostData body, ReindexOnServerRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_reindex", ctx, body, RequestParams(requestParameters)); ///POST on /_reindex/{task_id}/_rethrottle https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html @@ -834,250 +884,268 @@ public TResponse ReindexRethrottle(string taskId, ReindexRethrottleRe ///POST on /_reindex/{task_id}/_rethrottle https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html ///The task id to rethrottle ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".reindex_rethrottle", "task_id")] public Task ReindexRethrottleAsync(string taskId, ReindexRethrottleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_reindex/{taskId:taskId}/_rethrottle"), ctx, null, RequestParams(requestParameters)); - ///POST on /_render/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates + ///POST on /_render/template http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse RenderSearchTemplate(PostData body, RenderSearchTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_render/template", body, RequestParams(requestParameters)); - ///POST on /_render/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates + ///POST on /_render/template http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".render_search_template", "body")] public Task RenderSearchTemplateAsync(PostData body, RenderSearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_render/template", ctx, body, RequestParams(requestParameters)); - ///POST on /_render/template/{id} https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates + ///POST on /_render/template/{id} http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html ///The id of the stored search template ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse RenderSearchTemplate(string id, PostData body, RenderSearchTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"_render/template/{id:id}"), body, RequestParams(requestParameters)); - ///POST on /_render/template/{id} https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates + ///POST on /_render/template/{id} http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html ///The id of the stored search template ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".render_search_template", "id, body")] public Task RenderSearchTemplateAsync(string id, PostData body, RenderSearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_render/template/{id:id}"), ctx, body, RequestParams(requestParameters)); ///POST on /_scripts/painless/_execute https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html ///The script to execute ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse ExecutePainlessScript(PostData body, ExecutePainlessScriptRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_scripts/painless/_execute", body, RequestParams(requestParameters)); ///POST on /_scripts/painless/_execute https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html ///The script to execute ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + [MapsApi(".scripts_painless_execute", "body")] public Task ExecutePainlessScriptAsync(PostData body, ExecutePainlessScriptRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_scripts/painless/_execute", ctx, body, RequestParams(requestParameters)); - ///POST on /_search/scroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll + ///POST on /_search/scroll http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html ///The scroll ID if not passed by URL or query parameter. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Scroll(PostData body, ScrollRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_search/scroll", body, RequestParams(requestParameters)); - ///POST on /_search/scroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll + ///POST on /_search/scroll http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html ///The scroll ID if not passed by URL or query parameter. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".scroll", "body")] public Task ScrollAsync(PostData body, ScrollRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_search/scroll", ctx, body, RequestParams(requestParameters)); - ///POST on /_search/scroll/{scroll_id} https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll + ///POST on /_search/scroll/{scroll_id} http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html ///The scroll ID ///The scroll ID if not passed by URL or query parameter. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: A scroll id can be quite large and should be specified as part of the body")] + [Obsolete("Deprecated in version 7.0: A scroll id can be quite large and should be specified as part of the body")] public TResponse Scroll(string scrollId, PostData body, ScrollRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"_search/scroll/{scrollId:scrollId}"), body, RequestParams(requestParameters)); - ///POST on /_search/scroll/{scroll_id} https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll + ///POST on /_search/scroll/{scroll_id} http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html ///The scroll ID ///The scroll ID if not passed by URL or query parameter. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: A scroll id can be quite large and should be specified as part of the body")] + [Obsolete("Deprecated in version 7.0: A scroll id can be quite large and should be specified as part of the body")] + [MapsApi(".scroll", "scroll_id, body")] public Task ScrollAsync(string scrollId, PostData body, ScrollRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_search/scroll/{scrollId:scrollId}"), ctx, body, RequestParams(requestParameters)); - ///POST on /_search https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html + ///POST on /_search http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Search(PostData body, SearchRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_search", body, RequestParams(requestParameters)); - ///POST on /_search https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html + ///POST on /_search http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".search", "body")] public Task SearchAsync(PostData body, SearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_search", ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_search https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html + ///POST on /{index}/_search http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Search(string index, PostData body, SearchRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_search"), body, RequestParams(requestParameters)); - ///POST on /{index}/_search https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html + ///POST on /{index}/_search http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".search", "index, body")] public Task SearchAsync(string index, PostData body, SearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_search"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_search https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html + ///POST on /{index}/{type}/_search http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///A comma-separated list of document types to search; leave empty to perform the operation on all types ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse SearchUsingType(string index, string type, PostData body, SearchRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_search"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_search https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html + ///POST on /{index}/{type}/_search http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///A comma-separated list of document types to search; leave empty to perform the operation on all types ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".search", "index, type, body")] public Task SearchUsingTypeAsync(string index, string type, PostData body, SearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_search"), ctx, body, RequestParams(requestParameters)); - ///POST on /_search_shards https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html + ///POST on /_search_shards http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse SearchShards(SearchShardsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_search_shards", null, RequestParams(requestParameters)); - ///POST on /_search_shards https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html + ///POST on /_search_shards http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".search_shards", "")] public Task SearchShardsAsync(SearchShardsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_search_shards", ctx, null, RequestParams(requestParameters)); - ///POST on /{index}/_search_shards https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html + ///POST on /{index}/_search_shards http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse SearchShards(string index, SearchShardsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_search_shards"), null, RequestParams(requestParameters)); - ///POST on /{index}/_search_shards https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html + ///POST on /{index}/_search_shards http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".search_shards", "index")] public Task SearchShardsAsync(string index, SearchShardsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_search_shards"), ctx, null, RequestParams(requestParameters)); - ///POST on /_search/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html + ///POST on /_search/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse SearchTemplate(PostData body, SearchTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_search/template", body, RequestParams(requestParameters)); - ///POST on /_search/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html + ///POST on /_search/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".search_template", "body")] public Task SearchTemplateAsync(PostData body, SearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_search/template", ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_search/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html + ///POST on /{index}/_search/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse SearchTemplate(string index, PostData body, SearchTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_search/template"), body, RequestParams(requestParameters)); - ///POST on /{index}/_search/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html + ///POST on /{index}/_search/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".search_template", "index, body")] public Task SearchTemplateAsync(string index, PostData body, SearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_search/template"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_search/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html + ///POST on /{index}/{type}/_search/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///A comma-separated list of document types to search; leave empty to perform the operation on all types ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse SearchTemplateUsingType(string index, string type, PostData body, SearchTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_search/template"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_search/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html + ///POST on /{index}/{type}/_search/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///A comma-separated list of document types to search; leave empty to perform the operation on all types ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".search_template", "index, type, body")] public Task SearchTemplateUsingTypeAsync(string index, string type, PostData body, SearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_search/template"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_termvectors/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + ///POST on /{index}/_termvectors/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html ///The index in which the document resides. ///The id of the document, when not specified a doc param should be supplied. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse TermVectors(string index, string id, PostData body, TermVectorsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_termvectors/{id:id}"), body, RequestParams(requestParameters)); - ///POST on /{index}/_termvectors/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + ///POST on /{index}/_termvectors/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html ///The index in which the document resides. ///The id of the document, when not specified a doc param should be supplied. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".termvectors", "index, id, body")] public Task TermVectorsAsync(string index, string id, PostData body, TermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_termvectors/{id:id}"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_termvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + ///POST on /{index}/_termvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html ///The index in which the document resides. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse TermVectors(string index, PostData body, TermVectorsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_termvectors"), body, RequestParams(requestParameters)); - ///POST on /{index}/_termvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + ///POST on /{index}/_termvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html ///The index in which the document resides. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".termvectors", "index, body")] public Task TermVectorsAsync(string index, PostData body, TermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_termvectors"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/{id}/_termvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + ///POST on /{index}/{type}/{id}/_termvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html ///The index in which the document resides. ///The type of the document. ///The id of the document, when not specified a doc param should be supplied. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse TermVectorsUsingType(string index, string type, string id, PostData body, TermVectorsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/{id:id}/_termvectors"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/{id}/_termvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + ///POST on /{index}/{type}/{id}/_termvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html ///The index in which the document resides. ///The type of the document. ///The id of the document, when not specified a doc param should be supplied. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".termvectors", "index, type, id, body")] public Task TermVectorsUsingTypeAsync(string index, string type, string id, PostData body, TermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/{id:id}/_termvectors"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_termvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + ///POST on /{index}/{type}/_termvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html ///The index in which the document resides. ///The type of the document. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse TermVectorsUsingType(string index, string type, PostData body, TermVectorsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_termvectors"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_termvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + ///POST on /{index}/{type}/_termvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html ///The index in which the document resides. ///The type of the document. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".termvectors", "index, type, body")] public Task TermVectorsUsingTypeAsync(string index, string type, PostData body, TermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_termvectors"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_update/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html + ///POST on /{index}/_update/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html ///The name of the index ///Document ID ///The request definition requires either `script` or partial `doc` ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Update(string index, string id, PostData body, UpdateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_update/{id:id}"), body, RequestParams(requestParameters)); - ///POST on /{index}/_update/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html + ///POST on /{index}/_update/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html ///The name of the index ///Document ID ///The request definition requires either `script` or partial `doc` ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".update", "index, id, body")] public Task UpdateAsync(string index, string id, PostData body, UpdateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_update/{id:id}"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/{id}/_update https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html + ///POST on /{index}/{type}/{id}/_update http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html ///The name of the index ///The type of the document ///Document ID ///The request definition requires either `script` or partial `doc` ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse UpdateUsingType(string index, string type, string id, PostData body, UpdateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/{id:id}/_update"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/{id}/_update https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html + ///POST on /{index}/{type}/{id}/_update http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html ///The name of the index ///The type of the document ///Document ID ///The request definition requires either `script` or partial `doc` ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".update", "index, type, id, body")] public Task UpdateUsingTypeAsync(string index, string type, string id, PostData body, UpdateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/{id:id}/_update"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_update_by_query https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html @@ -1090,6 +1158,7 @@ public TResponse UpdateByQuery(string index, PostData body, UpdateByQ ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".update_by_query", "index, body")] public Task UpdateByQueryAsync(string index, PostData body, UpdateByQueryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_update_by_query"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type}/_update_by_query https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html @@ -1097,7 +1166,7 @@ public Task UpdateByQueryAsync(string index, PostData body ///A comma-separated list of document types to search; leave empty to perform the operation on all types ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse UpdateByQueryUsingType(string index, string type, PostData body, UpdateByQueryRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_update_by_query"), body, RequestParams(requestParameters)); ///POST on /{index}/{type}/_update_by_query https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html @@ -1105,7 +1174,8 @@ public TResponse UpdateByQueryUsingType(string index, string type, Po ///A comma-separated list of document types to search; leave empty to perform the operation on all types ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi(".update_by_query", "index, type, body")] public Task UpdateByQueryUsingTypeAsync(string index, string type, PostData body, UpdateByQueryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_update_by_query"), ctx, body, RequestParams(requestParameters)); ///POST on /_update_by_query/{task_id}/_rethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html @@ -1116,7 +1186,8 @@ public TResponse UpdateByQueryRethrottle(string taskId, UpdateByQuery ///POST on /_update_by_query/{task_id}/_rethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html ///The task id to rethrottle ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi(".update_by_query_rethrottle", "task_id")] public Task UpdateByQueryRethrottleAsync(string taskId, UpdateByQueryRethrottleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_update_by_query/{taskId:taskId}/_rethrottle"), ctx, null, RequestParams(requestParameters)); } -} \ No newline at end of file +} diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Nodes.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Nodes.cs index ba837b926a6..4f3d068ae8e 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Nodes.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Nodes.cs @@ -49,6 +49,7 @@ public TResponse HotThreadsForAll(NodesHotThreadsRequestParameters re where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_nodes/hot_threads", null, RequestParams(requestParameters)); ///GET on /_nodes/hot_threads https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("nodes.hot_threads", "")] public Task HotThreadsForAllAsync(NodesHotThreadsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_nodes/hot_threads", ctx, null, RequestParams(requestParameters)); ///GET on /_nodes/{node_id}/hot_threads https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html @@ -59,6 +60,7 @@ public TResponse HotThreads(string nodeId, NodesHotThreadsRequestPara ///GET on /_nodes/{node_id}/hot_threads https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("nodes.hot_threads", "node_id")] public Task HotThreadsAsync(string nodeId, NodesHotThreadsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_nodes/{nodeId:nodeId}/hot_threads"), ctx, null, RequestParams(requestParameters)); ///GET on /_nodes https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html @@ -67,6 +69,7 @@ public TResponse InfoForAll(NodesInfoRequestParameters requestParamet where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_nodes", null, RequestParams(requestParameters)); ///GET on /_nodes https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("nodes.info", "")] public Task InfoForAllAsync(NodesInfoRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_nodes", ctx, null, RequestParams(requestParameters)); ///GET on /_nodes/{node_id} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html @@ -77,6 +80,7 @@ public TResponse Info(string nodeId, NodesInfoRequestParameters reque ///GET on /_nodes/{node_id} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("nodes.info", "node_id")] public Task InfoAsync(string nodeId, NodesInfoRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_nodes/{nodeId:nodeId}"), ctx, null, RequestParams(requestParameters)); ///GET on /_nodes/{metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html @@ -87,6 +91,7 @@ public TResponse InfoForAll(string metric, NodesInfoRequestParameters ///GET on /_nodes/{metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html ///A comma-separated list of metrics you wish returned. Leave empty to return all. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("nodes.info", "metric")] public Task InfoForAllAsync(string metric, NodesInfoRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_nodes/{metric:metric}"), ctx, null, RequestParams(requestParameters)); ///GET on /_nodes/{node_id}/{metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html @@ -99,6 +104,7 @@ public TResponse Info(string nodeId, string metric, NodesInfoRequestP ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes ///A comma-separated list of metrics you wish returned. Leave empty to return all. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("nodes.info", "node_id, metric")] public Task InfoAsync(string nodeId, string metric, NodesInfoRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_nodes/{nodeId:nodeId}/{metric:metric}"), ctx, null, RequestParams(requestParameters)); ///POST on /_nodes/reload_secure_settings https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings @@ -107,6 +113,7 @@ public TResponse ReloadSecureSettingsForAll(ReloadSecureSettingsReque where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_nodes/reload_secure_settings", null, RequestParams(requestParameters)); ///POST on /_nodes/reload_secure_settings https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("nodes.reload_secure_settings", "")] public Task ReloadSecureSettingsForAllAsync(ReloadSecureSettingsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_nodes/reload_secure_settings", ctx, null, RequestParams(requestParameters)); ///POST on /_nodes/{node_id}/reload_secure_settings https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings @@ -117,6 +124,7 @@ public TResponse ReloadSecureSettings(string nodeId, ReloadSecureSett ///POST on /_nodes/{node_id}/reload_secure_settings https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings ///A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("nodes.reload_secure_settings", "node_id")] public Task ReloadSecureSettingsAsync(string nodeId, ReloadSecureSettingsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_nodes/{nodeId:nodeId}/reload_secure_settings"), ctx, null, RequestParams(requestParameters)); ///GET on /_nodes/stats https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html @@ -125,6 +133,7 @@ public TResponse StatsForAll(NodesStatsRequestParameters requestParam where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_nodes/stats", null, RequestParams(requestParameters)); ///GET on /_nodes/stats https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("nodes.stats", "")] public Task StatsForAllAsync(NodesStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_nodes/stats", ctx, null, RequestParams(requestParameters)); ///GET on /_nodes/{node_id}/stats https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html @@ -135,6 +144,7 @@ public TResponse Stats(string nodeId, NodesStatsRequestParameters req ///GET on /_nodes/{node_id}/stats https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("nodes.stats", "node_id")] public Task StatsAsync(string nodeId, NodesStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_nodes/{nodeId:nodeId}/stats"), ctx, null, RequestParams(requestParameters)); ///GET on /_nodes/stats/{metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html @@ -145,6 +155,7 @@ public TResponse StatsForAll(string metric, NodesStatsRequestParamete ///GET on /_nodes/stats/{metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html ///Limit the information returned to the specified metrics ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("nodes.stats", "metric")] public Task StatsForAllAsync(string metric, NodesStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_nodes/stats/{metric:metric}"), ctx, null, RequestParams(requestParameters)); ///GET on /_nodes/{node_id}/stats/{metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html @@ -157,6 +168,7 @@ public TResponse Stats(string nodeId, string metric, NodesStatsReques ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes ///Limit the information returned to the specified metrics ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("nodes.stats", "node_id, metric")] public Task StatsAsync(string nodeId, string metric, NodesStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_nodes/{nodeId:nodeId}/stats/{metric:metric}"), ctx, null, RequestParams(requestParameters)); ///GET on /_nodes/stats/{metric}/{index_metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html @@ -169,6 +181,7 @@ public TResponse StatsForAll(string metric, string indexMetric, Nodes ///Limit the information returned to the specified metrics ///Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("nodes.stats", "metric, index_metric")] public Task StatsForAllAsync(string metric, string indexMetric, NodesStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_nodes/stats/{metric:metric}/{indexMetric:indexMetric}"), ctx, null, RequestParams(requestParameters)); ///GET on /_nodes/{node_id}/stats/{metric}/{index_metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html @@ -183,6 +196,7 @@ public TResponse Stats(string nodeId, string metric, string indexMetr ///Limit the information returned to the specified metrics ///Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("nodes.stats", "node_id, metric, index_metric")] public Task StatsAsync(string nodeId, string metric, string indexMetric, NodesStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_nodes/{nodeId:nodeId}/stats/{metric:metric}/{indexMetric:indexMetric}"), ctx, null, RequestParams(requestParameters)); ///GET on /_nodes/usage https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html @@ -191,6 +205,7 @@ public TResponse UsageForAll(NodesUsageRequestParameters requestParam where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_nodes/usage", null, RequestParams(requestParameters)); ///GET on /_nodes/usage https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("nodes.usage", "")] public Task UsageForAllAsync(NodesUsageRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_nodes/usage", ctx, null, RequestParams(requestParameters)); ///GET on /_nodes/{node_id}/usage https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html @@ -201,6 +216,7 @@ public TResponse Usage(string nodeId, NodesUsageRequestParameters req ///GET on /_nodes/{node_id}/usage https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("nodes.usage", "node_id")] public Task UsageAsync(string nodeId, NodesUsageRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_nodes/{nodeId:nodeId}/usage"), ctx, null, RequestParams(requestParameters)); ///GET on /_nodes/usage/{metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html @@ -211,6 +227,7 @@ public TResponse UsageForAll(string metric, NodesUsageRequestParamete ///GET on /_nodes/usage/{metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html ///Limit the information returned to the specified metrics ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("nodes.usage", "metric")] public Task UsageForAllAsync(string metric, NodesUsageRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_nodes/usage/{metric:metric}"), ctx, null, RequestParams(requestParameters)); ///GET on /_nodes/{node_id}/usage/{metric} https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html @@ -223,6 +240,7 @@ public TResponse Usage(string nodeId, string metric, NodesUsageReques ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes ///Limit the information returned to the specified metrics ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("nodes.usage", "node_id, metric")] public Task UsageAsync(string nodeId, string metric, NodesUsageRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_nodes/{nodeId:nodeId}/usage/{metric:metric}"), ctx, null, RequestParams(requestParameters)); } diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Rollup.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Rollup.cs index 39aac3433f8..29d781c3b97 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Rollup.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Rollup.cs @@ -43,143 +43,132 @@ internal LowLevelRollupNamespace(ElasticLowLevelClient client): base(client) { } - ///DELETE on /_rollup/job/{id} + ///DELETE on /_rollup/job/{id} ///The ID of the job to delete ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse DeleteJob(string id, DeleteRollupJobRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(DELETE, Url($"_rollup/job/{id:id}"), null, RequestParams(requestParameters)); - ///DELETE on /_rollup/job/{id} + ///DELETE on /_rollup/job/{id} ///The ID of the job to delete ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + [MapsApi("rollup.delete_job", "id")] public Task DeleteJobAsync(string id, DeleteRollupJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_rollup/job/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///GET on /_rollup/job/{id} + ///GET on /_rollup/job/{id} ///The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse GetJob(string id, GetRollupJobRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"_rollup/job/{id:id}"), null, RequestParams(requestParameters)); - ///GET on /_rollup/job/{id} + ///GET on /_rollup/job/{id} ///The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + [MapsApi("rollup.get_jobs", "id")] public Task GetJobAsync(string id, GetRollupJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_rollup/job/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///GET on /_rollup/job/ + ///GET on /_rollup/job/ ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse GetJob(GetRollupJobRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_rollup/job/", null, RequestParams(requestParameters)); - ///GET on /_rollup/job/ + ///GET on /_rollup/job/ ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + [MapsApi("rollup.get_jobs", "")] public Task GetJobAsync(GetRollupJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_rollup/job/", ctx, null, RequestParams(requestParameters)); - ///GET on /_rollup/data/{id} + ///GET on /_rollup/data/{id} ///The ID of the index to check rollup capabilities on, or left blank for all jobs ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse GetCapabilities(string id, GetRollupCapabilitiesRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"_rollup/data/{id:id}"), null, RequestParams(requestParameters)); - ///GET on /_rollup/data/{id} + ///GET on /_rollup/data/{id} ///The ID of the index to check rollup capabilities on, or left blank for all jobs ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + [MapsApi("rollup.get_rollup_caps", "id")] public Task GetCapabilitiesAsync(string id, GetRollupCapabilitiesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_rollup/data/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///GET on /_rollup/data/ + ///GET on /_rollup/data/ ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse GetCapabilities(GetRollupCapabilitiesRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_rollup/data/", null, RequestParams(requestParameters)); - ///GET on /_rollup/data/ + ///GET on /_rollup/data/ ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + [MapsApi("rollup.get_rollup_caps", "")] public Task GetCapabilitiesAsync(GetRollupCapabilitiesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_rollup/data/", ctx, null, RequestParams(requestParameters)); - ///GET on /{index}/_rollup/data + ///GET on /{index}/_rollup/data ///The rollup index or index pattern to obtain rollup capabilities from. ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse GetIndexCapabilities(string index, GetRollupIndexCapabilitiesRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"{index:index}/_rollup/data"), null, RequestParams(requestParameters)); - ///GET on /{index}/_rollup/data + ///GET on /{index}/_rollup/data ///The rollup index or index pattern to obtain rollup capabilities from. ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + [MapsApi("rollup.get_rollup_index_caps", "index")] public Task GetIndexCapabilitiesAsync(string index, GetRollupIndexCapabilitiesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_rollup/data"), ctx, null, RequestParams(requestParameters)); - ///PUT on /_rollup/job/{id} + ///PUT on /_rollup/job/{id} ///The ID of the job to create ///The job configuration ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse CreateJob(string id, PostData body, CreateRollupJobRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(PUT, Url($"_rollup/job/{id:id}"), body, RequestParams(requestParameters)); - ///PUT on /_rollup/job/{id} + ///PUT on /_rollup/job/{id} ///The ID of the job to create ///The job configuration ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + [MapsApi("rollup.put_job", "id, body")] public Task CreateJobAsync(string id, PostData body, CreateRollupJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_rollup/job/{id:id}"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_rollup_search + ///POST on /{index}/_rollup_search ///The indices or index-pattern(s) (containing rollup or regular data) that should be searched ///The search request body ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse Search(string index, PostData body, RollupSearchRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_rollup_search"), body, RequestParams(requestParameters)); - ///POST on /{index}/_rollup_search + ///POST on /{index}/_rollup_search ///The indices or index-pattern(s) (containing rollup or regular data) that should be searched ///The search request body ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + [MapsApi("rollup.rollup_search", "index, body")] public Task SearchAsync(string index, PostData body, RollupSearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_rollup_search"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_rollup_search + ///POST on /{index}/{type}/_rollup_search ///The indices or index-pattern(s) (containing rollup or regular data) that should be searched ///The doc type inside the index ///The search request body ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse SearchUsingType(string index, string type, PostData body, RollupSearchRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_rollup_search"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_rollup_search + ///POST on /{index}/{type}/_rollup_search ///The indices or index-pattern(s) (containing rollup or regular data) that should be searched ///The doc type inside the index ///The search request body ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. - [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [MapsApi("rollup.rollup_search", "index, type, body")] public Task SearchUsingTypeAsync(string index, string type, PostData body, RollupSearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_rollup_search"), ctx, body, RequestParams(requestParameters)); - ///POST on /_rollup/job/{id}/_start + ///POST on /_rollup/job/{id}/_start ///The ID of the job to start ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse StartJob(string id, StartRollupJobRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"_rollup/job/{id:id}/_start"), null, RequestParams(requestParameters)); - ///POST on /_rollup/job/{id}/_start + ///POST on /_rollup/job/{id}/_start ///The ID of the job to start ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + [MapsApi("rollup.start_job", "id")] public Task StartJobAsync(string id, StartRollupJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_rollup/job/{id:id}/_start"), ctx, null, RequestParams(requestParameters)); - ///POST on /_rollup/job/{id}/_stop + ///POST on /_rollup/job/{id}/_stop ///The ID of the job to stop ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse StopJob(string id, StopRollupJobRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"_rollup/job/{id:id}/_stop"), null, RequestParams(requestParameters)); - ///POST on /_rollup/job/{id}/_stop + ///POST on /_rollup/job/{id}/_stop ///The ID of the job to stop ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + [MapsApi("rollup.stop_job", "id")] public Task StopJobAsync(string id, StopRollupJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_rollup/job/{id:id}/_stop"), ctx, null, RequestParams(requestParameters)); } -} \ No newline at end of file +} diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Security.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Security.cs index 71acd5de12d..9d33df8ae0a 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Security.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Security.cs @@ -49,6 +49,7 @@ public TResponse Authenticate(AuthenticateRequestParameters requestPa where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_security/_authenticate", null, RequestParams(requestParameters)); ///GET on /_security/_authenticate https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.authenticate", "")] public Task AuthenticateAsync(AuthenticateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_security/_authenticate", ctx, null, RequestParams(requestParameters)); ///PUT on /_security/user/{username}/_password https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html @@ -61,6 +62,7 @@ public TResponse ChangePassword(string username, PostData body, Chang ///The username of the user to change the password for ///the new password for the user ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.change_password", "username, body")] public Task ChangePasswordAsync(string username, PostData body, ChangePasswordRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_security/user/{username:username}/_password"), ctx, body, RequestParams(requestParameters)); ///PUT on /_security/user/_password https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html @@ -71,6 +73,7 @@ public TResponse ChangePassword(PostData body, ChangePasswordRequestP ///PUT on /_security/user/_password https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html ///the new password for the user ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.change_password", "body")] public Task ChangePasswordAsync(PostData body, ChangePasswordRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, "_security/user/_password", ctx, body, RequestParams(requestParameters)); ///POST on /_security/realm/{realms}/_clear_cache https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html @@ -81,6 +84,7 @@ public TResponse ClearCachedRealms(string realms, ClearCachedRealmsRe ///POST on /_security/realm/{realms}/_clear_cache https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html ///Comma-separated list of realms to clear ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.clear_cached_realms", "realms")] public Task ClearCachedRealmsAsync(string realms, ClearCachedRealmsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_security/realm/{realms:realms}/_clear_cache"), ctx, null, RequestParams(requestParameters)); ///POST on /_security/role/{name}/_clear_cache https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html @@ -91,6 +95,7 @@ public TResponse ClearCachedRoles(string name, ClearCachedRolesReques ///POST on /_security/role/{name}/_clear_cache https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html ///Role name ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.clear_cached_roles", "name")] public Task ClearCachedRolesAsync(string name, ClearCachedRolesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_security/role/{name:name}/_clear_cache"), ctx, null, RequestParams(requestParameters)); ///PUT on /_security/api_key https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html @@ -101,6 +106,7 @@ public TResponse CreateApiKey(PostData body, CreateApiKeyRequestParam ///PUT on /_security/api_key https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html ///The api key request to create an API key ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.create_api_key", "body")] public Task CreateApiKeyAsync(PostData body, CreateApiKeyRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, "_security/api_key", ctx, body, RequestParams(requestParameters)); ///DELETE on /_security/privilege/{application}/{name} TODO @@ -113,6 +119,7 @@ public TResponse DeletePrivileges(string application, string name, De ///Application name ///Privilege name ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.delete_privileges", "application, name")] public Task DeletePrivilegesAsync(string application, string name, DeletePrivilegesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_security/privilege/{application:application}/{name:name}"), ctx, null, RequestParams(requestParameters)); ///DELETE on /_security/role/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html @@ -123,6 +130,7 @@ public TResponse DeleteRole(string name, DeleteRoleRequestParameters ///DELETE on /_security/role/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html ///Role name ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.delete_role", "name")] public Task DeleteRoleAsync(string name, DeleteRoleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_security/role/{name:name}"), ctx, null, RequestParams(requestParameters)); ///DELETE on /_security/role_mapping/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html @@ -133,6 +141,7 @@ public TResponse DeleteRoleMapping(string name, DeleteRoleMappingRequ ///DELETE on /_security/role_mapping/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html ///Role-mapping name ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.delete_role_mapping", "name")] public Task DeleteRoleMappingAsync(string name, DeleteRoleMappingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_security/role_mapping/{name:name}"), ctx, null, RequestParams(requestParameters)); ///DELETE on /_security/user/{username} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html @@ -143,6 +152,7 @@ public TResponse DeleteUser(string username, DeleteUserRequestParamet ///DELETE on /_security/user/{username} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html ///username ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.delete_user", "username")] public Task DeleteUserAsync(string username, DeleteUserRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_security/user/{username:username}"), ctx, null, RequestParams(requestParameters)); ///PUT on /_security/user/{username}/_disable https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html @@ -153,6 +163,7 @@ public TResponse DisableUser(string username, DisableUserRequestParam ///PUT on /_security/user/{username}/_disable https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html ///The username of the user to disable ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.disable_user", "username")] public Task DisableUserAsync(string username, DisableUserRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_security/user/{username:username}/_disable"), ctx, null, RequestParams(requestParameters)); ///PUT on /_security/user/{username}/_enable https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html @@ -163,6 +174,7 @@ public TResponse EnableUser(string username, EnableUserRequestParamet ///PUT on /_security/user/{username}/_enable https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html ///The username of the user to enable ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.enable_user", "username")] public Task EnableUserAsync(string username, EnableUserRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_security/user/{username:username}/_enable"), ctx, null, RequestParams(requestParameters)); ///GET on /_security/api_key https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html @@ -171,6 +183,7 @@ public TResponse GetApiKey(GetApiKeyRequestParameters requestParamete where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_security/api_key", null, RequestParams(requestParameters)); ///GET on /_security/api_key https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_api_key", "")] public Task GetApiKeyAsync(GetApiKeyRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_security/api_key", ctx, null, RequestParams(requestParameters)); ///GET on /_security/privilege https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html @@ -179,6 +192,7 @@ public TResponse GetPrivileges(GetPrivilegesRequestParameters request where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_security/privilege", null, RequestParams(requestParameters)); ///GET on /_security/privilege https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_privileges", "")] public Task GetPrivilegesAsync(GetPrivilegesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_security/privilege", ctx, null, RequestParams(requestParameters)); ///GET on /_security/privilege/{application} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html @@ -189,6 +203,7 @@ public TResponse GetPrivileges(string application, GetPrivilegesReque ///GET on /_security/privilege/{application} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html ///Application name ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_privileges", "application")] public Task GetPrivilegesAsync(string application, GetPrivilegesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_security/privilege/{application:application}"), ctx, null, RequestParams(requestParameters)); ///GET on /_security/privilege/{application}/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html @@ -201,6 +216,7 @@ public TResponse GetPrivileges(string application, string name, GetPr ///Application name ///Privilege name ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_privileges", "application, name")] public Task GetPrivilegesAsync(string application, string name, GetPrivilegesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_security/privilege/{application:application}/{name:name}"), ctx, null, RequestParams(requestParameters)); ///GET on /_security/role/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html @@ -211,6 +227,7 @@ public TResponse GetRole(string name, GetRoleRequestParameters reques ///GET on /_security/role/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html ///Role name ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_role", "name")] public Task GetRoleAsync(string name, GetRoleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_security/role/{name:name}"), ctx, null, RequestParams(requestParameters)); ///GET on /_security/role https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html @@ -219,6 +236,7 @@ public TResponse GetRole(GetRoleRequestParameters requestParameters = where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_security/role", null, RequestParams(requestParameters)); ///GET on /_security/role https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_role", "")] public Task GetRoleAsync(GetRoleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_security/role", ctx, null, RequestParams(requestParameters)); ///GET on /_security/role_mapping/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html @@ -229,6 +247,7 @@ public TResponse GetRoleMapping(string name, GetRoleMappingRequestPar ///GET on /_security/role_mapping/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html ///Role-Mapping name ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_role_mapping", "name")] public Task GetRoleMappingAsync(string name, GetRoleMappingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_security/role_mapping/{name:name}"), ctx, null, RequestParams(requestParameters)); ///GET on /_security/role_mapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html @@ -237,6 +256,7 @@ public TResponse GetRoleMapping(GetRoleMappingRequestParameters reque where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_security/role_mapping", null, RequestParams(requestParameters)); ///GET on /_security/role_mapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_role_mapping", "")] public Task GetRoleMappingAsync(GetRoleMappingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_security/role_mapping", ctx, null, RequestParams(requestParameters)); ///POST on /_security/oauth2/token https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html @@ -247,6 +267,7 @@ public TResponse GetUserAccessToken(PostData body, GetUserAccessToken ///POST on /_security/oauth2/token https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html ///The token request to get ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_token", "body")] public Task GetUserAccessTokenAsync(PostData body, GetUserAccessTokenRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_security/oauth2/token", ctx, body, RequestParams(requestParameters)); ///GET on /_security/user/{username} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html @@ -257,6 +278,7 @@ public TResponse GetUser(string username, GetUserRequestParameters re ///GET on /_security/user/{username} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html ///A comma-separated list of usernames ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_user", "username")] public Task GetUserAsync(string username, GetUserRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_security/user/{username:username}"), ctx, null, RequestParams(requestParameters)); ///GET on /_security/user https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html @@ -265,6 +287,7 @@ public TResponse GetUser(GetUserRequestParameters requestParameters = where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_security/user", null, RequestParams(requestParameters)); ///GET on /_security/user https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_user", "")] public Task GetUserAsync(GetUserRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_security/user", ctx, null, RequestParams(requestParameters)); ///GET on /_security/user/_privileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html @@ -273,6 +296,7 @@ public TResponse GetUserPrivileges(GetUserPrivilegesRequestParameters where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_security/user/_privileges", null, RequestParams(requestParameters)); ///GET on /_security/user/_privileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.get_user_privileges", "")] public Task GetUserPrivilegesAsync(GetUserPrivilegesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_security/user/_privileges", ctx, null, RequestParams(requestParameters)); ///POST on /_security/user/_has_privileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html @@ -283,6 +307,7 @@ public TResponse HasPrivileges(PostData body, HasPrivilegesRequestPar ///POST on /_security/user/_has_privileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html ///The privileges to test ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.has_privileges", "body")] public Task HasPrivilegesAsync(PostData body, HasPrivilegesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_security/user/_has_privileges", ctx, body, RequestParams(requestParameters)); ///POST on /_security/user/{user}/_has_privileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html @@ -295,6 +320,7 @@ public TResponse HasPrivileges(string user, PostData body, HasPrivile ///Username ///The privileges to test ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.has_privileges", "user, body")] public Task HasPrivilegesAsync(string user, PostData body, HasPrivilegesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_security/user/{user:user}/_has_privileges"), ctx, body, RequestParams(requestParameters)); ///DELETE on /_security/api_key https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html @@ -305,6 +331,7 @@ public TResponse InvalidateApiKey(PostData body, InvalidateApiKeyRequ ///DELETE on /_security/api_key https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html ///The api key request to invalidate API key(s) ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.invalidate_api_key", "body")] public Task InvalidateApiKeyAsync(PostData body, InvalidateApiKeyRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, "_security/api_key", ctx, body, RequestParams(requestParameters)); ///DELETE on /_security/oauth2/token https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html @@ -315,6 +342,7 @@ public TResponse InvalidateUserAccessToken(PostData body, InvalidateU ///DELETE on /_security/oauth2/token https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html ///The token to invalidate ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.invalidate_token", "body")] public Task InvalidateUserAccessTokenAsync(PostData body, InvalidateUserAccessTokenRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, "_security/oauth2/token", ctx, body, RequestParams(requestParameters)); ///PUT on /_security/privilege/ TODO @@ -325,6 +353,7 @@ public TResponse PutPrivileges(PostData body, PutPrivilegesRequestPar ///PUT on /_security/privilege/ TODO ///The privilege(s) to add ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.put_privileges", "body")] public Task PutPrivilegesAsync(PostData body, PutPrivilegesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, "_security/privilege/", ctx, body, RequestParams(requestParameters)); ///PUT on /_security/role/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html @@ -337,6 +366,7 @@ public TResponse PutRole(string name, PostData body, PutRoleRequestPa ///Role name ///The role to add ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.put_role", "name, body")] public Task PutRoleAsync(string name, PostData body, PutRoleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_security/role/{name:name}"), ctx, body, RequestParams(requestParameters)); ///PUT on /_security/role_mapping/{name} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html @@ -349,6 +379,7 @@ public TResponse PutRoleMapping(string name, PostData body, PutRoleMa ///Role-mapping name ///The role mapping to add ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.put_role_mapping", "name, body")] public Task PutRoleMappingAsync(string name, PostData body, PutRoleMappingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_security/role_mapping/{name:name}"), ctx, body, RequestParams(requestParameters)); ///PUT on /_security/user/{username} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html @@ -361,6 +392,7 @@ public TResponse PutUser(string username, PostData body, PutUserReque ///The username of the User ///The user to add ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("security.put_user", "username, body")] public Task PutUserAsync(string username, PostData body, PutUserRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_security/user/{username:username}"), ctx, body, RequestParams(requestParameters)); ///GET on /_ssl/certificates https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html @@ -369,6 +401,7 @@ public TResponse GetCertificates(GetCertificatesRequestParameters req where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_ssl/certificates", null, RequestParams(requestParameters)); ///GET on /_ssl/certificates https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ssl.certificates", "")] public Task GetCertificatesAsync(GetCertificatesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_ssl/certificates", ctx, null, RequestParams(requestParameters)); } diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Snapshot.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Snapshot.cs index 86287a8ab89..f2c58632a28 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Snapshot.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Snapshot.cs @@ -55,6 +55,7 @@ public TResponse Snapshot(string repository, string snapshot, PostDat ///A snapshot name ///The snapshot definition ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("snapshot.create", "repository, snapshot, body")] public Task SnapshotAsync(string repository, string snapshot, PostData body, SnapshotRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_snapshot/{repository:repository}/{snapshot:snapshot}"), ctx, body, RequestParams(requestParameters)); ///PUT on /_snapshot/{repository} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html @@ -67,6 +68,7 @@ public TResponse CreateRepository(string repository, PostData body, C ///A repository name ///The repository definition ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("snapshot.create_repository", "repository, body")] public Task CreateRepositoryAsync(string repository, PostData body, CreateRepositoryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_snapshot/{repository:repository}"), ctx, body, RequestParams(requestParameters)); ///DELETE on /_snapshot/{repository}/{snapshot} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html @@ -79,6 +81,7 @@ public TResponse Delete(string repository, string snapshot, DeleteSna ///A repository name ///A snapshot name ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("snapshot.delete", "repository, snapshot")] public Task DeleteAsync(string repository, string snapshot, DeleteSnapshotRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_snapshot/{repository:repository}/{snapshot:snapshot}"), ctx, null, RequestParams(requestParameters)); ///DELETE on /_snapshot/{repository} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html @@ -89,6 +92,7 @@ public TResponse DeleteRepository(string repository, DeleteRepository ///DELETE on /_snapshot/{repository} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html ///A comma-separated list of repository names ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("snapshot.delete_repository", "repository")] public Task DeleteRepositoryAsync(string repository, DeleteRepositoryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_snapshot/{repository:repository}"), ctx, null, RequestParams(requestParameters)); ///GET on /_snapshot/{repository}/{snapshot} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html @@ -101,6 +105,7 @@ public TResponse Get(string repository, string snapshot, GetSnapshotR ///A repository name ///A comma-separated list of snapshot names ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("snapshot.get", "repository, snapshot")] public Task GetAsync(string repository, string snapshot, GetSnapshotRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_snapshot/{repository:repository}/{snapshot:snapshot}"), ctx, null, RequestParams(requestParameters)); ///GET on /_snapshot https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html @@ -109,6 +114,7 @@ public TResponse GetRepository(GetRepositoryRequestParameters request where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_snapshot", null, RequestParams(requestParameters)); ///GET on /_snapshot https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("snapshot.get_repository", "")] public Task GetRepositoryAsync(GetRepositoryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_snapshot", ctx, null, RequestParams(requestParameters)); ///GET on /_snapshot/{repository} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html @@ -119,6 +125,7 @@ public TResponse GetRepository(string repository, GetRepositoryReques ///GET on /_snapshot/{repository} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html ///A comma-separated list of repository names ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("snapshot.get_repository", "repository")] public Task GetRepositoryAsync(string repository, GetRepositoryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_snapshot/{repository:repository}"), ctx, null, RequestParams(requestParameters)); ///POST on /_snapshot/{repository}/{snapshot}/_restore https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html @@ -133,6 +140,7 @@ public TResponse Restore(string repository, string snapshot, PostData ///A snapshot name ///Details of what to restore ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("snapshot.restore", "repository, snapshot, body")] public Task RestoreAsync(string repository, string snapshot, PostData body, RestoreRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_snapshot/{repository:repository}/{snapshot:snapshot}/_restore"), ctx, body, RequestParams(requestParameters)); ///GET on /_snapshot/_status https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html @@ -141,6 +149,7 @@ public TResponse Status(SnapshotStatusRequestParameters requestParame where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_snapshot/_status", null, RequestParams(requestParameters)); ///GET on /_snapshot/_status https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("snapshot.status", "")] public Task StatusAsync(SnapshotStatusRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_snapshot/_status", ctx, null, RequestParams(requestParameters)); ///GET on /_snapshot/{repository}/_status https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html @@ -151,6 +160,7 @@ public TResponse Status(string repository, SnapshotStatusRequestParam ///GET on /_snapshot/{repository}/_status https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html ///A repository name ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("snapshot.status", "repository")] public Task StatusAsync(string repository, SnapshotStatusRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_snapshot/{repository:repository}/_status"), ctx, null, RequestParams(requestParameters)); ///GET on /_snapshot/{repository}/{snapshot}/_status https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html @@ -163,6 +173,7 @@ public TResponse Status(string repository, string snapshot, SnapshotS ///A repository name ///A comma-separated list of snapshot names ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("snapshot.status", "repository, snapshot")] public Task StatusAsync(string repository, string snapshot, SnapshotStatusRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_snapshot/{repository:repository}/{snapshot:snapshot}/_status"), ctx, null, RequestParams(requestParameters)); ///POST on /_snapshot/{repository}/_verify https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html @@ -173,6 +184,7 @@ public TResponse VerifyRepository(string repository, VerifyRepository ///POST on /_snapshot/{repository}/_verify https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html ///A repository name ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("snapshot.verify_repository", "repository")] public Task VerifyRepositoryAsync(string repository, VerifyRepositoryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_snapshot/{repository:repository}/_verify"), ctx, null, RequestParams(requestParameters)); } diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Sql.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Sql.cs index c58d64fa13f..2870fa9dd54 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Sql.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Sql.cs @@ -51,6 +51,7 @@ public TResponse ClearCursor(PostData body, ClearSqlCursorRequestPara ///POST on /_sql/close Clear SQL cursor ///Specify the cursor value in the `cursor` element to clean the cursor. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("sql.clear_cursor", "body")] public Task ClearCursorAsync(PostData body, ClearSqlCursorRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_sql/close", ctx, body, RequestParams(requestParameters)); ///POST on /_sql Execute SQL @@ -61,6 +62,7 @@ public TResponse Query(PostData body, QuerySqlRequestParameters reque ///POST on /_sql Execute SQL ///Use the `query` element to start a query. Use the `cursor` element to continue a query. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("sql.query", "body")] public Task QueryAsync(PostData body, QuerySqlRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_sql", ctx, body, RequestParams(requestParameters)); ///POST on /_sql/translate Translate SQL into Elasticsearch queries @@ -71,6 +73,7 @@ public TResponse Translate(PostData body, TranslateSqlRequestParamete ///POST on /_sql/translate Translate SQL into Elasticsearch queries ///Specify the query in the `query` element. ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("sql.translate", "body")] public Task TranslateAsync(PostData body, TranslateSqlRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_sql/translate", ctx, body, RequestParams(requestParameters)); } diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Tasks.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Tasks.cs index 5d11ca704ac..54d9c2e6580 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Tasks.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Tasks.cs @@ -49,6 +49,7 @@ public TResponse Cancel(CancelTasksRequestParameters requestParameter where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_tasks/_cancel", null, RequestParams(requestParameters)); ///POST on /_tasks/_cancel https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("tasks.cancel", "")] public Task CancelAsync(CancelTasksRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_tasks/_cancel", ctx, null, RequestParams(requestParameters)); ///POST on /_tasks/{task_id}/_cancel https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html @@ -59,6 +60,7 @@ public TResponse Cancel(string taskId, CancelTasksRequestParameters r ///POST on /_tasks/{task_id}/_cancel https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html ///Cancel the task with specified task id (node_id:task_number) ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("tasks.cancel", "task_id")] public Task CancelAsync(string taskId, CancelTasksRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_tasks/{taskId:taskId}/_cancel"), ctx, null, RequestParams(requestParameters)); ///GET on /_tasks/{task_id} https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html @@ -69,6 +71,7 @@ public TResponse GetTask(string taskId, GetTaskRequestParameters requ ///GET on /_tasks/{task_id} https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html ///Return the task with specified id (node_id:task_number) ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("tasks.get", "task_id")] public Task GetTaskAsync(string taskId, GetTaskRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_tasks/{taskId:taskId}"), ctx, null, RequestParams(requestParameters)); ///GET on /_tasks https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html @@ -77,6 +80,7 @@ public TResponse List(ListTasksRequestParameters requestParameters = where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_tasks", null, RequestParams(requestParameters)); ///GET on /_tasks https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("tasks.list", "")] public Task ListAsync(ListTasksRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_tasks", ctx, null, RequestParams(requestParameters)); } diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Watcher.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Watcher.cs index f014a461cd5..b93f4fdd2f1 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Watcher.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Watcher.cs @@ -51,6 +51,7 @@ public TResponse Acknowledge(string watchId, AcknowledgeWatchRequestP ///PUT on /_watcher/watch/{watch_id}/_ack http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html ///Watch ID ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("watcher.ack_watch", "watch_id")] public Task AcknowledgeAsync(string watchId, AcknowledgeWatchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_watcher/watch/{watchId:watchId}/_ack"), ctx, null, RequestParams(requestParameters)); ///PUT on /_watcher/watch/{watch_id}/_ack/{action_id} http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html @@ -63,6 +64,7 @@ public TResponse Acknowledge(string watchId, string actionId, Acknowl ///Watch ID ///A comma-separated list of the action ids to be acked ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("watcher.ack_watch", "watch_id, action_id")] public Task AcknowledgeAsync(string watchId, string actionId, AcknowledgeWatchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_watcher/watch/{watchId:watchId}/_ack/{actionId:actionId}"), ctx, null, RequestParams(requestParameters)); ///PUT on /_watcher/watch/{watch_id}/_activate https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html @@ -73,6 +75,7 @@ public TResponse Activate(string watchId, ActivateWatchRequestParamet ///PUT on /_watcher/watch/{watch_id}/_activate https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html ///Watch ID ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("watcher.activate_watch", "watch_id")] public Task ActivateAsync(string watchId, ActivateWatchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_watcher/watch/{watchId:watchId}/_activate"), ctx, null, RequestParams(requestParameters)); ///PUT on /_watcher/watch/{watch_id}/_deactivate https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html @@ -83,6 +86,7 @@ public TResponse Deactivate(string watchId, DeactivateWatchRequestPar ///PUT on /_watcher/watch/{watch_id}/_deactivate https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html ///Watch ID ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("watcher.deactivate_watch", "watch_id")] public Task DeactivateAsync(string watchId, DeactivateWatchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_watcher/watch/{watchId:watchId}/_deactivate"), ctx, null, RequestParams(requestParameters)); ///DELETE on /_watcher/watch/{id} http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html @@ -93,6 +97,7 @@ public TResponse Delete(string id, DeleteWatchRequestParameters reque ///DELETE on /_watcher/watch/{id} http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html ///Watch ID ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("watcher.delete_watch", "id")] public Task DeleteAsync(string id, DeleteWatchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_watcher/watch/{id:id}"), ctx, null, RequestParams(requestParameters)); ///PUT on /_watcher/watch/{id}/_execute http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html @@ -105,6 +110,7 @@ public TResponse Execute(string id, PostData body, ExecuteWatchReques ///Watch ID ///Execution control ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("watcher.execute_watch", "id, body")] public Task ExecuteAsync(string id, PostData body, ExecuteWatchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_watcher/watch/{id:id}/_execute"), ctx, body, RequestParams(requestParameters)); ///PUT on /_watcher/watch/_execute http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html @@ -115,6 +121,7 @@ public TResponse Execute(PostData body, ExecuteWatchRequestParameters ///PUT on /_watcher/watch/_execute http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html ///Execution control ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("watcher.execute_watch", "body")] public Task ExecuteAsync(PostData body, ExecuteWatchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, "_watcher/watch/_execute", ctx, body, RequestParams(requestParameters)); ///GET on /_watcher/watch/{id} http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html @@ -125,6 +132,7 @@ public TResponse Get(string id, GetWatchRequestParameters requestPara ///GET on /_watcher/watch/{id} http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html ///Watch ID ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("watcher.get_watch", "id")] public Task GetAsync(string id, GetWatchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_watcher/watch/{id:id}"), ctx, null, RequestParams(requestParameters)); ///PUT on /_watcher/watch/{id} http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html @@ -137,6 +145,7 @@ public TResponse Put(string id, PostData body, PutWatchRequestParamet ///Watch ID ///The watch ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("watcher.put_watch", "id, body")] public Task PutAsync(string id, PostData body, PutWatchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_watcher/watch/{id:id}"), ctx, body, RequestParams(requestParameters)); ///POST on /_watcher/_start http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html @@ -145,6 +154,7 @@ public TResponse Start(StartWatcherRequestParameters requestParameter where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_watcher/_start", null, RequestParams(requestParameters)); ///POST on /_watcher/_start http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("watcher.start", "")] public Task StartAsync(StartWatcherRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_watcher/_start", ctx, null, RequestParams(requestParameters)); ///GET on /_watcher/stats http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html @@ -153,6 +163,7 @@ public TResponse Stats(WatcherStatsRequestParameters requestParameter where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_watcher/stats", null, RequestParams(requestParameters)); ///GET on /_watcher/stats http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("watcher.stats", "")] public Task StatsAsync(WatcherStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_watcher/stats", ctx, null, RequestParams(requestParameters)); ///GET on /_watcher/stats/{metric} http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html @@ -163,6 +174,7 @@ public TResponse Stats(string metric, WatcherStatsRequestParameters r ///GET on /_watcher/stats/{metric} http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html ///Controls what additional stat metrics should be include in the response ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("watcher.stats", "metric")] public Task StatsAsync(string metric, WatcherStatsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_watcher/stats/{metric:metric}"), ctx, null, RequestParams(requestParameters)); ///POST on /_watcher/_stop http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html @@ -171,6 +183,7 @@ public TResponse Stop(StopWatcherRequestParameters requestParameters where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_watcher/_stop", null, RequestParams(requestParameters)); ///POST on /_watcher/_stop http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("watcher.stop", "")] public Task StopAsync(StopWatcherRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_watcher/_stop", ctx, null, RequestParams(requestParameters)); } diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.XPack.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.XPack.cs index ebab2a21c9c..e19a742e038 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.XPack.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.XPack.cs @@ -49,6 +49,7 @@ public TResponse Info(XPackInfoRequestParameters requestParameters = where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_xpack", null, RequestParams(requestParameters)); ///GET on /_xpack https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("xpack.info", "")] public Task InfoAsync(XPackInfoRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_xpack", ctx, null, RequestParams(requestParameters)); ///GET on /_xpack/usage Retrieve information about xpack features usage @@ -57,6 +58,7 @@ public TResponse Usage(XPackUsageRequestParameters requestParameters where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_xpack/usage", null, RequestParams(requestParameters)); ///GET on /_xpack/usage Retrieve information about xpack features usage ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("xpack.usage", "")] public Task UsageAsync(XPackUsageRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_xpack/usage", ctx, null, RequestParams(requestParameters)); } diff --git a/src/Elasticsearch.Net/Extensions/MapsApiAttribute.cs b/src/Elasticsearch.Net/Extensions/MapsApiAttribute.cs new file mode 100644 index 00000000000..1f85e7d7477 --- /dev/null +++ b/src/Elasticsearch.Net/Extensions/MapsApiAttribute.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; + +namespace Elasticsearch.Net +{ + internal class MapsApiAttribute : Attribute + { + public MapsApiAttribute(string restSpecName) : this(restSpecName, null) { } + + public MapsApiAttribute(string restSpecName, string parametersCommaSeparated = null) + { + RestSpecName = restSpecName; + Parameters = new OrderedHashSet(); + if (!string.IsNullOrWhiteSpace(parametersCommaSeparated)) + { + var args = parametersCommaSeparated.Split(',').Select(s => s.Trim()); + foreach(var a in args) Parameters.Add(a); + } + } + + public string RestSpecName { get; } + public KeyedCollection Parameters { get; } + + public class OrderedHashSet : KeyedCollection + { + protected override string GetKeyForItem(string item) => item; + } + + } +} diff --git a/src/Tests/Tests.YamlRunner/DoMapper.fs b/src/Tests/Tests.YamlRunner/DoMapper.fs new file mode 100644 index 00000000000..acf014cc63f --- /dev/null +++ b/src/Tests/Tests.YamlRunner/DoMapper.fs @@ -0,0 +1,68 @@ +module Tests.YamlRunner.DoMapper + +open System +open System.Reflection +open System.Collections.Generic +open System.Collections.ObjectModel +open System.Collections.ObjectModel +open System.IO +open System.Linq.Expressions +open Elasticsearch.Net + +type ApiInvoke = delegate of Object * Object[] -> IElasticsearchResponse +type FastApiInvoke(instance: Object, restName:string, pathParams:KeyedCollection, methodInfo:MethodInfo) = + member this.ClientMethodName = methodInfo.Name + member this.ApiName = restName + member this.PathParameters = pathParams + member private this.Delegate = + let instanceExpression = Expression.Parameter(typeof, "instance"); + let argumentsExpression = Expression.Parameter(typeof, "arguments"); + let argumentExpressions = new List(); + methodInfo.GetParameters() + |> Array.indexed + |> Array.iter (fun (i, p) -> + let constant = Expression.Constant i + let index = Expression.ArrayIndex (argumentsExpression, constant) + let convert = Expression.Convert (index, p.ParameterType) + argumentExpressions.Add convert + ) + let callExpression = + let instance = Expression.Convert(instanceExpression, methodInfo.ReflectedType) + Expression.Call(instance, methodInfo, argumentExpressions) + let invokeExpression = Expression.Convert(callExpression, typeof) + Expression.Lambda(invokeExpression, instanceExpression, argumentsExpression).Compile(); + + member this.Invoke arguments = this.Delegate.Invoke(instance, arguments) + + +let getProp (t:Type) prop = t.GetProperty(prop).GetGetMethod() +let getRestName (t:Type) a = (getProp t "RestSpecName").Invoke(a, null) :?> String +let getParameters (t:Type) a = (getProp t "Parameters").Invoke(a, null) :?> KeyedCollection + +let methodsWithAttribute instance mapsApiAttribute = + let clientType = instance.GetType() + clientType.GetMethods() + |> Array.map (fun m -> (m, m.GetCustomAttributes(mapsApiAttribute, false))) + |> Array.filter (fun (_, a) -> a.Length > 0) + |> Array.map (fun (m, a) -> (m, a.[0] :?> Attribute)) + |> Array.map (fun (m, a) -> (m, getRestName mapsApiAttribute a, getParameters mapsApiAttribute a)) + |> Array.map (fun (m, restName, pathParams) -> (FastApiInvoke(instance, restName, pathParams, m))) + + +let clientApiDispatch client = + let t = client.GetType() + let mapsApiAttribute = t.Assembly.GetType("Elasticsearch.Net.MapsApiAttribute") + + let rootMethods = methodsWithAttribute client mapsApiAttribute + let namespaces = + t.GetProperties() + |> Array.filter (fun p -> typeof.IsAssignableFrom(p.PropertyType)) + |> Array.map (fun p -> methodsWithAttribute (p.GetGetMethod().Invoke(client, null)) mapsApiAttribute) + |> Array.concat + |> Array.append rootMethods + + for m in namespaces do + + printfn "method: %O api: %s len: %i" m.ClientMethodName m.ApiName m.PathParameters.Count + + diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index c374fc362a9..91d967416df 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -1,6 +1,8 @@ module Tests.YamlRunner.Main open Argu +open Elasticsearch.Net +open Tests.YamlRunner open Tests.YamlRunner.Models open Tests.YamlRunner.TestsReader open Tests.YamlRunner.TestsLocator @@ -26,12 +28,13 @@ let runMain (parsed:ParseResults) = async { // let read = TestsReader.ReadYamlFile test - let! locateResults = Commands.LocateTests namedSuite revision - let readResults = Commands.ReadTests locateResults - let! runTesults = Commands.RunTests readResults +// let! locateResults = Commands.LocateTests namedSuite revision +// let readResults = Commands.ReadTests locateResults +// let! runTesults = Commands.RunTests readResults + DoMapper.clientApiDispatch (ElasticLowLevelClient()) // // printfn "folders: %O" locateResults.Length // for folder in locateResults do diff --git a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj index 6a7b7681a80..ceefd8081ce 100644 --- a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj +++ b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj @@ -6,8 +6,11 @@ + + + From 36fbb0932bb10e957769358e6a415b82ec264b57 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Fri, 6 Sep 2019 10:59:17 +0200 Subject: [PATCH 27/85] stage --- .../ApiGenerator/Domain/Code/CsharpNames.cs | 2 +- .../ElasticLowLevelClient.NoNamespace.cs | 146 +++++++++--------- src/Tests/Tests.YamlRunner/Commands.fs | 2 +- src/Tests/Tests.YamlRunner/DoMapper.fs | 102 ++++++++++-- src/Tests/Tests.YamlRunner/Models.fs | 18 +-- .../Tests.YamlRunner/OperationExecutor.fs | 34 +++- src/Tests/Tests.YamlRunner/Program.fs | 9 +- src/Tests/Tests.YamlRunner/TestsReader.fs | 18 ++- src/Tests/Tests.YamlRunner/TestsRunner.fs | 14 +- 9 files changed, 227 insertions(+), 118 deletions(-) diff --git a/src/CodeGeneration/ApiGenerator/Domain/Code/CsharpNames.cs b/src/CodeGeneration/ApiGenerator/Domain/Code/CsharpNames.cs index c969a9f86c2..9be482b5d8e 100644 --- a/src/CodeGeneration/ApiGenerator/Domain/Code/CsharpNames.cs +++ b/src/CodeGeneration/ApiGenerator/Domain/Code/CsharpNames.cs @@ -11,7 +11,7 @@ public class CsharpNames { public CsharpNames(string name, string endpointMethodName, string endpointNamespace) { - RestSpecName = string.IsNullOrWhiteSpace(endpointNamespace) ? endpointNamespace : $"{endpointNamespace}.{endpointMethodName}"; + RestSpecName = string.IsNullOrWhiteSpace(endpointNamespace) ? endpointMethodName : $"{endpointNamespace}.{endpointMethodName}"; Namespace = CreateCSharpNamespace(endpointNamespace); if (CodeConfiguration.ApiNameMapping.TryGetValue(name, out var mapsApiMethodName)) ApiName = mapsApiMethodName; diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs index 888d939bfb1..8eed21f324f 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs @@ -190,7 +190,7 @@ public TResponse Bulk(PostData body, BulkRequestParameters requestPar ///POST on /_bulk http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html ///The operation definition and data (action-data pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".bulk", "body")] + [MapsApi("bulk", "body")] public Task BulkAsync(PostData body, BulkRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_bulk", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_bulk http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html @@ -203,7 +203,7 @@ public TResponse Bulk(string index, PostData body, BulkRequestParamet ///Default index for items which don't provide one ///The operation definition and data (action-data pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".bulk", "index, body")] + [MapsApi("bulk", "index, body")] public Task BulkAsync(string index, PostData body, BulkRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_bulk"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type}/_bulk http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html @@ -220,7 +220,7 @@ public TResponse BulkUsingType(string index, string type, PostData bo ///The operation definition and data (action-data pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".bulk", "index, type, body")] + [MapsApi("bulk", "index, type, body")] public Task BulkUsingTypeAsync(string index, string type, PostData body, BulkRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_bulk"), ctx, body, RequestParams(requestParameters)); ///DELETE on /_search/scroll http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html @@ -231,7 +231,7 @@ public TResponse ClearScroll(PostData body, ClearScrollRequestParamet ///DELETE on /_search/scroll http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html ///A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".clear_scroll", "body")] + [MapsApi("clear_scroll", "body")] public Task ClearScrollAsync(PostData body, ClearScrollRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, "_search/scroll", ctx, body, RequestParams(requestParameters)); ///DELETE on /_search/scroll/{scroll_id} http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html @@ -246,7 +246,7 @@ public TResponse ClearScroll(string scrollId, PostData body, ClearScr ///A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: A scroll id can be quite large and should be specified as part of the body")] - [MapsApi(".clear_scroll", "scroll_id, body")] + [MapsApi("clear_scroll", "scroll_id, body")] public Task ClearScrollAsync(string scrollId, PostData body, ClearScrollRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_search/scroll/{scrollId:scrollId}"), ctx, body, RequestParams(requestParameters)); ///POST on /_count http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html @@ -257,7 +257,7 @@ public TResponse Count(PostData body, CountRequestParameters requestP ///POST on /_count http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html ///A query to restrict the results specified with the Query DSL (optional) ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".count", "body")] + [MapsApi("count", "body")] public Task CountAsync(PostData body, CountRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_count", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_count http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html @@ -270,7 +270,7 @@ public TResponse Count(string index, PostData body, CountRequestParam ///A comma-separated list of indices to restrict the results ///A query to restrict the results specified with the Query DSL (optional) ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".count", "index, body")] + [MapsApi("count", "index, body")] public Task CountAsync(string index, PostData body, CountRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_count"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type}/_count http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html @@ -287,7 +287,7 @@ public TResponse CountUsingType(string index, string type, PostData b ///A query to restrict the results specified with the Query DSL (optional) ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".count", "index, type, body")] + [MapsApi("count", "index, type, body")] public Task CountUsingTypeAsync(string index, string type, PostData body, CountRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_count"), ctx, body, RequestParams(requestParameters)); ///PUT on /{index}/_create/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html @@ -302,7 +302,7 @@ public TResponse Create(string index, string id, PostData body, Creat ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".create", "index, id, body")] + [MapsApi("create", "index, id, body")] public Task CreateAsync(string index, string id, PostData body, CreateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"{index:index}/_create/{id:id}"), ctx, body, RequestParams(requestParameters)); ///PUT on /{index}/{type}/{id}/_create http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html @@ -321,7 +321,7 @@ public TResponse CreateUsingType(string index, string type, string id ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".create", "index, type, id, body")] + [MapsApi("create", "index, type, id, body")] public Task CreateUsingTypeAsync(string index, string type, string id, PostData body, CreateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"{index:index}/{type:type}/{id:id}/_create"), ctx, body, RequestParams(requestParameters)); ///DELETE on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html @@ -334,7 +334,7 @@ public TResponse Delete(string index, string id, DeleteRequestParamet ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".delete", "index, id")] + [MapsApi("delete", "index, id")] public Task DeleteAsync(string index, string id, DeleteRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"{index:index}/_doc/{id:id}"), ctx, null, RequestParams(requestParameters)); ///DELETE on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html @@ -351,7 +351,7 @@ public TResponse DeleteUsingType(string index, string type, string id ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".delete", "index, type, id")] + [MapsApi("delete", "index, type, id")] public Task DeleteUsingTypeAsync(string index, string type, string id, DeleteRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"{index:index}/{type:type}/{id:id}"), ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_delete_by_query https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html @@ -364,7 +364,7 @@ public TResponse DeleteByQuery(string index, PostData body, DeleteByQ ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".delete_by_query", "index, body")] + [MapsApi("delete_by_query", "index, body")] public Task DeleteByQueryAsync(string index, PostData body, DeleteByQueryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_delete_by_query"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type}/_delete_by_query https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html @@ -381,7 +381,7 @@ public TResponse DeleteByQueryUsingType(string index, string type, Po ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".delete_by_query", "index, type, body")] + [MapsApi("delete_by_query", "index, type, body")] public Task DeleteByQueryUsingTypeAsync(string index, string type, PostData body, DeleteByQueryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_delete_by_query"), ctx, body, RequestParams(requestParameters)); ///POST on /_delete_by_query/{task_id}/_rethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html @@ -392,7 +392,7 @@ public TResponse DeleteByQueryRethrottle(string taskId, DeleteByQuery ///POST on /_delete_by_query/{task_id}/_rethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html ///The task id to rethrottle ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".delete_by_query_rethrottle", "task_id")] + [MapsApi("delete_by_query_rethrottle", "task_id")] public Task DeleteByQueryRethrottleAsync(string taskId, DeleteByQueryRethrottleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_delete_by_query/{taskId:taskId}/_rethrottle"), ctx, null, RequestParams(requestParameters)); ///DELETE on /_scripts/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html @@ -403,7 +403,7 @@ public TResponse DeleteScript(string id, DeleteScriptRequestParameter ///DELETE on /_scripts/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html ///Script ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".delete_script", "id")] + [MapsApi("delete_script", "id")] public Task DeleteScriptAsync(string id, DeleteScriptRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_scripts/{id:id}"), ctx, null, RequestParams(requestParameters)); ///HEAD on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html @@ -416,7 +416,7 @@ public TResponse DocumentExists(string index, string id, DocumentExis ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".exists", "index, id")] + [MapsApi("exists", "index, id")] public Task DocumentExistsAsync(string index, string id, DocumentExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, Url($"{index:index}/_doc/{id:id}"), ctx, null, RequestParams(requestParameters)); ///HEAD on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html @@ -433,7 +433,7 @@ public TResponse DocumentExistsUsingType(string index, string type, s ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".exists", "index, type, id")] + [MapsApi("exists", "index, type, id")] public Task DocumentExistsUsingTypeAsync(string index, string type, string id, DocumentExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, Url($"{index:index}/{type:type}/{id:id}"), ctx, null, RequestParams(requestParameters)); ///HEAD on /{index}/_source/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html @@ -446,7 +446,7 @@ public TResponse SourceExists(string index, string id, SourceExistsRe ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".exists_source", "index, id")] + [MapsApi("exists_source", "index, id")] public Task SourceExistsAsync(string index, string id, SourceExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, Url($"{index:index}/_source/{id:id}"), ctx, null, RequestParams(requestParameters)); ///HEAD on /{index}/{type}/{id}/_source http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html @@ -463,7 +463,7 @@ public TResponse SourceExistsUsingType(string index, string type, str ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".exists_source", "index, type, id")] + [MapsApi("exists_source", "index, type, id")] public Task SourceExistsUsingTypeAsync(string index, string type, string id, SourceExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, Url($"{index:index}/{type:type}/{id:id}/_source"), ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_explain/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html @@ -478,7 +478,7 @@ public TResponse Explain(string index, string id, PostData body, Expl ///The document ID ///The query definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".explain", "index, id, body")] + [MapsApi("explain", "index, id, body")] public Task ExplainAsync(string index, string id, PostData body, ExplainRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_explain/{id:id}"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type}/{id}/_explain http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html @@ -497,7 +497,7 @@ public TResponse ExplainUsingType(string index, string type, string i ///The query definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".explain", "index, type, id, body")] + [MapsApi("explain", "index, type, id, body")] public Task ExplainUsingTypeAsync(string index, string type, string id, PostData body, ExplainRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/{id:id}/_explain"), ctx, body, RequestParams(requestParameters)); ///POST on /_field_caps http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html @@ -506,7 +506,7 @@ public TResponse FieldCapabilities(FieldCapabilitiesRequestParameters where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_field_caps", null, RequestParams(requestParameters)); ///POST on /_field_caps http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".field_caps", "")] + [MapsApi("field_caps", "")] public Task FieldCapabilitiesAsync(FieldCapabilitiesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_field_caps", ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_field_caps http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html @@ -517,7 +517,7 @@ public TResponse FieldCapabilities(string index, FieldCapabilitiesReq ///POST on /{index}/_field_caps http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".field_caps", "index")] + [MapsApi("field_caps", "index")] public Task FieldCapabilitiesAsync(string index, FieldCapabilitiesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_field_caps"), ctx, null, RequestParams(requestParameters)); ///GET on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html @@ -530,7 +530,7 @@ public TResponse Get(string index, string id, GetRequestParameters re ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".get", "index, id")] + [MapsApi("get", "index, id")] public Task GetAsync(string index, string id, GetRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_doc/{id:id}"), ctx, null, RequestParams(requestParameters)); ///GET on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html @@ -547,7 +547,7 @@ public TResponse GetUsingType(string index, string type, string id, G ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".get", "index, type, id")] + [MapsApi("get", "index, type, id")] public Task GetUsingTypeAsync(string index, string type, string id, GetRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/{type:type}/{id:id}"), ctx, null, RequestParams(requestParameters)); ///GET on /_scripts/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html @@ -558,7 +558,7 @@ public TResponse GetScript(string id, GetScriptRequestParameters requ ///GET on /_scripts/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html ///Script ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".get_script", "id")] + [MapsApi("get_script", "id")] public Task GetScriptAsync(string id, GetScriptRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_scripts/{id:id}"), ctx, null, RequestParams(requestParameters)); ///GET on /{index}/_source/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html @@ -571,7 +571,7 @@ public TResponse Source(string index, string id, SourceRequestParamet ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".get_source", "index, id")] + [MapsApi("get_source", "index, id")] public Task SourceAsync(string index, string id, SourceRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_source/{id:id}"), ctx, null, RequestParams(requestParameters)); ///GET on /{index}/{type}/{id}/_source http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html @@ -588,7 +588,7 @@ public TResponse SourceUsingType(string index, string type, string id ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".get_source", "index, type, id")] + [MapsApi("get_source", "index, type, id")] public Task SourceUsingTypeAsync(string index, string type, string id, SourceRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/{type:type}/{id:id}/_source"), ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html @@ -603,7 +603,7 @@ public TResponse Index(string index, string id, PostData body, IndexR ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".index", "index, id, body")] + [MapsApi("index", "index, id, body")] public Task IndexAsync(string index, string id, PostData body, IndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_doc/{id:id}"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_doc http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html @@ -616,7 +616,7 @@ public TResponse Index(string index, PostData body, IndexRequestParam ///The name of the index ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".index", "index, body")] + [MapsApi("index", "index, body")] public Task IndexAsync(string index, PostData body, IndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_doc"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html @@ -633,7 +633,7 @@ public TResponse IndexUsingType(string index, string type, PostData b ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".index", "index, type, body")] + [MapsApi("index", "index, type, body")] public Task IndexUsingTypeAsync(string index, string type, PostData body, IndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html @@ -652,7 +652,7 @@ public TResponse IndexUsingType(string index, string type, string id, ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".index", "index, type, id, body")] + [MapsApi("index", "index, type, id, body")] public Task IndexUsingTypeAsync(string index, string type, string id, PostData body, IndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/{id:id}"), ctx, body, RequestParams(requestParameters)); ///GET on / http://www.elastic.co/guide/ @@ -661,7 +661,7 @@ public TResponse RootNodeInfo(RootNodeInfoRequestParameters requestPa where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "", null, RequestParams(requestParameters)); ///GET on / http://www.elastic.co/guide/ ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".info", "")] + [MapsApi("info", "")] public Task RootNodeInfoAsync(RootNodeInfoRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "", ctx, null, RequestParams(requestParameters)); ///POST on /_mget http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html @@ -672,7 +672,7 @@ public TResponse MultiGet(PostData body, MultiGetRequestParameters re ///POST on /_mget http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html ///Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".mget", "body")] + [MapsApi("mget", "body")] public Task MultiGetAsync(PostData body, MultiGetRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_mget", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_mget http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html @@ -685,7 +685,7 @@ public TResponse MultiGet(string index, PostData body, MultiGetReques ///The name of the index ///Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".mget", "index, body")] + [MapsApi("mget", "index, body")] public Task MultiGetAsync(string index, PostData body, MultiGetRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_mget"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type}/_mget http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html @@ -702,7 +702,7 @@ public TResponse MultiGetUsingType(string index, string type, PostDat ///Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".mget", "index, type, body")] + [MapsApi("mget", "index, type, body")] public Task MultiGetUsingTypeAsync(string index, string type, PostData body, MultiGetRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_mget"), ctx, body, RequestParams(requestParameters)); ///POST on /_msearch http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html @@ -713,7 +713,7 @@ public TResponse MultiSearch(PostData body, MultiSearchRequestParamet ///POST on /_msearch http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".msearch", "body")] + [MapsApi("msearch", "body")] public Task MultiSearchAsync(PostData body, MultiSearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_msearch", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_msearch http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html @@ -726,7 +726,7 @@ public TResponse MultiSearch(string index, PostData body, MultiSearch ///A comma-separated list of index names to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".msearch", "index, body")] + [MapsApi("msearch", "index, body")] public Task MultiSearchAsync(string index, PostData body, MultiSearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_msearch"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type}/_msearch http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html @@ -743,7 +743,7 @@ public TResponse MultiSearchUsingType(string index, string type, Post ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".msearch", "index, type, body")] + [MapsApi("msearch", "index, type, body")] public Task MultiSearchUsingTypeAsync(string index, string type, PostData body, MultiSearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_msearch"), ctx, body, RequestParams(requestParameters)); ///POST on /_msearch/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html @@ -754,7 +754,7 @@ public TResponse MultiSearchTemplate(PostData body, MultiSearchTempla ///POST on /_msearch/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".msearch_template", "body")] + [MapsApi("msearch_template", "body")] public Task MultiSearchTemplateAsync(PostData body, MultiSearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_msearch/template", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_msearch/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html @@ -767,7 +767,7 @@ public TResponse MultiSearchTemplate(string index, PostData body, Mul ///A comma-separated list of index names to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".msearch_template", "index, body")] + [MapsApi("msearch_template", "index, body")] public Task MultiSearchTemplateAsync(string index, PostData body, MultiSearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_msearch/template"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type}/_msearch/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html @@ -784,7 +784,7 @@ public TResponse MultiSearchTemplateUsingType(string index, string ty ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".msearch_template", "index, type, body")] + [MapsApi("msearch_template", "index, type, body")] public Task MultiSearchTemplateUsingTypeAsync(string index, string type, PostData body, MultiSearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_msearch/template"), ctx, body, RequestParams(requestParameters)); ///POST on /_mtermvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html @@ -795,7 +795,7 @@ public TResponse MultiTermVectors(PostData body, MultiTermVectorsRequ ///POST on /_mtermvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html ///Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".mtermvectors", "body")] + [MapsApi("mtermvectors", "body")] public Task MultiTermVectorsAsync(PostData body, MultiTermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_mtermvectors", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_mtermvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html @@ -808,7 +808,7 @@ public TResponse MultiTermVectors(string index, PostData body, MultiT ///The index in which the document resides. ///Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".mtermvectors", "index, body")] + [MapsApi("mtermvectors", "index, body")] public Task MultiTermVectorsAsync(string index, PostData body, MultiTermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_mtermvectors"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type}/_mtermvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html @@ -825,7 +825,7 @@ public TResponse MultiTermVectorsUsingType(string index, string type, ///Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".mtermvectors", "index, type, body")] + [MapsApi("mtermvectors", "index, type, body")] public Task MultiTermVectorsUsingTypeAsync(string index, string type, PostData body, MultiTermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_mtermvectors"), ctx, body, RequestParams(requestParameters)); ///HEAD on / http://www.elastic.co/guide/ @@ -834,7 +834,7 @@ public TResponse Ping(PingRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(HEAD, "", null, RequestParams(requestParameters)); ///HEAD on / http://www.elastic.co/guide/ ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".ping", "")] + [MapsApi("ping", "")] public Task PingAsync(PingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, "", ctx, null, RequestParams(requestParameters)); ///PUT on /_scripts/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html @@ -847,7 +847,7 @@ public TResponse PutScript(string id, PostData body, PutScriptRequest ///Script ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".put_script", "id, body")] + [MapsApi("put_script", "id, body")] public Task PutScriptAsync(string id, PostData body, PutScriptRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_scripts/{id:id}"), ctx, body, RequestParams(requestParameters)); ///PUT on /_scripts/{id}/{context} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html @@ -862,7 +862,7 @@ public TResponse PutScript(string id, string context, PostData body, ///Script context ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".put_script", "id, context, body")] + [MapsApi("put_script", "id, context, body")] public Task PutScriptAsync(string id, string context, PostData body, PutScriptRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_scripts/{id:id}/{context:context}"), ctx, body, RequestParams(requestParameters)); ///POST on /_reindex https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html @@ -873,7 +873,7 @@ public TResponse ReindexOnServer(PostData body, ReindexOnServerReques ///POST on /_reindex https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html ///The search definition using the Query DSL and the prototype for the index request. ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".reindex", "body")] + [MapsApi("reindex", "body")] public Task ReindexOnServerAsync(PostData body, ReindexOnServerRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_reindex", ctx, body, RequestParams(requestParameters)); ///POST on /_reindex/{task_id}/_rethrottle https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html @@ -884,7 +884,7 @@ public TResponse ReindexRethrottle(string taskId, ReindexRethrottleRe ///POST on /_reindex/{task_id}/_rethrottle https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html ///The task id to rethrottle ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".reindex_rethrottle", "task_id")] + [MapsApi("reindex_rethrottle", "task_id")] public Task ReindexRethrottleAsync(string taskId, ReindexRethrottleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_reindex/{taskId:taskId}/_rethrottle"), ctx, null, RequestParams(requestParameters)); ///POST on /_render/template http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html @@ -895,7 +895,7 @@ public TResponse RenderSearchTemplate(PostData body, RenderSearchTemp ///POST on /_render/template http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".render_search_template", "body")] + [MapsApi("render_search_template", "body")] public Task RenderSearchTemplateAsync(PostData body, RenderSearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_render/template", ctx, body, RequestParams(requestParameters)); ///POST on /_render/template/{id} http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html @@ -908,7 +908,7 @@ public TResponse RenderSearchTemplate(string id, PostData body, Rende ///The id of the stored search template ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".render_search_template", "id, body")] + [MapsApi("render_search_template", "id, body")] public Task RenderSearchTemplateAsync(string id, PostData body, RenderSearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_render/template/{id:id}"), ctx, body, RequestParams(requestParameters)); ///POST on /_scripts/painless/_execute https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html @@ -919,7 +919,7 @@ public TResponse ExecutePainlessScript(PostData body, ExecutePainless ///POST on /_scripts/painless/_execute https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html ///The script to execute ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".scripts_painless_execute", "body")] + [MapsApi("scripts_painless_execute", "body")] public Task ExecutePainlessScriptAsync(PostData body, ExecutePainlessScriptRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_scripts/painless/_execute", ctx, body, RequestParams(requestParameters)); ///POST on /_search/scroll http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html @@ -930,7 +930,7 @@ public TResponse Scroll(PostData body, ScrollRequestParameters reques ///POST on /_search/scroll http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html ///The scroll ID if not passed by URL or query parameter. ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".scroll", "body")] + [MapsApi("scroll", "body")] public Task ScrollAsync(PostData body, ScrollRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_search/scroll", ctx, body, RequestParams(requestParameters)); ///POST on /_search/scroll/{scroll_id} http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html @@ -945,7 +945,7 @@ public TResponse Scroll(string scrollId, PostData body, ScrollRequest ///The scroll ID if not passed by URL or query parameter. ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: A scroll id can be quite large and should be specified as part of the body")] - [MapsApi(".scroll", "scroll_id, body")] + [MapsApi("scroll", "scroll_id, body")] public Task ScrollAsync(string scrollId, PostData body, ScrollRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_search/scroll/{scrollId:scrollId}"), ctx, body, RequestParams(requestParameters)); ///POST on /_search http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html @@ -956,7 +956,7 @@ public TResponse Search(PostData body, SearchRequestParameters reques ///POST on /_search http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".search", "body")] + [MapsApi("search", "body")] public Task SearchAsync(PostData body, SearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_search", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_search http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html @@ -969,7 +969,7 @@ public TResponse Search(string index, PostData body, SearchRequestPar ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".search", "index, body")] + [MapsApi("search", "index, body")] public Task SearchAsync(string index, PostData body, SearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_search"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type}/_search http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html @@ -986,7 +986,7 @@ public TResponse SearchUsingType(string index, string type, PostData ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".search", "index, type, body")] + [MapsApi("search", "index, type, body")] public Task SearchUsingTypeAsync(string index, string type, PostData body, SearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_search"), ctx, body, RequestParams(requestParameters)); ///POST on /_search_shards http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html @@ -995,7 +995,7 @@ public TResponse SearchShards(SearchShardsRequestParameters requestPa where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_search_shards", null, RequestParams(requestParameters)); ///POST on /_search_shards http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".search_shards", "")] + [MapsApi("search_shards", "")] public Task SearchShardsAsync(SearchShardsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_search_shards", ctx, null, RequestParams(requestParameters)); ///POST on /{index}/_search_shards http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html @@ -1006,7 +1006,7 @@ public TResponse SearchShards(string index, SearchShardsRequestParame ///POST on /{index}/_search_shards http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".search_shards", "index")] + [MapsApi("search_shards", "index")] public Task SearchShardsAsync(string index, SearchShardsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_search_shards"), ctx, null, RequestParams(requestParameters)); ///POST on /_search/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html @@ -1017,7 +1017,7 @@ public TResponse SearchTemplate(PostData body, SearchTemplateRequestP ///POST on /_search/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".search_template", "body")] + [MapsApi("search_template", "body")] public Task SearchTemplateAsync(PostData body, SearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_search/template", ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_search/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html @@ -1030,7 +1030,7 @@ public TResponse SearchTemplate(string index, PostData body, SearchTe ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".search_template", "index, body")] + [MapsApi("search_template", "index, body")] public Task SearchTemplateAsync(string index, PostData body, SearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_search/template"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type}/_search/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html @@ -1047,7 +1047,7 @@ public TResponse SearchTemplateUsingType(string index, string type, P ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".search_template", "index, type, body")] + [MapsApi("search_template", "index, type, body")] public Task SearchTemplateUsingTypeAsync(string index, string type, PostData body, SearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_search/template"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_termvectors/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html @@ -1062,7 +1062,7 @@ public TResponse TermVectors(string index, string id, PostData body, ///The id of the document, when not specified a doc param should be supplied. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".termvectors", "index, id, body")] + [MapsApi("termvectors", "index, id, body")] public Task TermVectorsAsync(string index, string id, PostData body, TermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_termvectors/{id:id}"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_termvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html @@ -1075,7 +1075,7 @@ public TResponse TermVectors(string index, PostData body, TermVectors ///The index in which the document resides. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".termvectors", "index, body")] + [MapsApi("termvectors", "index, body")] public Task TermVectorsAsync(string index, PostData body, TermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_termvectors"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type}/{id}/_termvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html @@ -1094,7 +1094,7 @@ public TResponse TermVectorsUsingType(string index, string type, stri ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".termvectors", "index, type, id, body")] + [MapsApi("termvectors", "index, type, id, body")] public Task TermVectorsUsingTypeAsync(string index, string type, string id, PostData body, TermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/{id:id}/_termvectors"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type}/_termvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html @@ -1111,7 +1111,7 @@ public TResponse TermVectorsUsingType(string index, string type, Post ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".termvectors", "index, type, body")] + [MapsApi("termvectors", "index, type, body")] public Task TermVectorsUsingTypeAsync(string index, string type, PostData body, TermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_termvectors"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_update/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html @@ -1126,7 +1126,7 @@ public TResponse Update(string index, string id, PostData body, Updat ///Document ID ///The request definition requires either `script` or partial `doc` ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".update", "index, id, body")] + [MapsApi("update", "index, id, body")] public Task UpdateAsync(string index, string id, PostData body, UpdateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_update/{id:id}"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type}/{id}/_update http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html @@ -1145,7 +1145,7 @@ public TResponse UpdateUsingType(string index, string type, string id ///The request definition requires either `script` or partial `doc` ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".update", "index, type, id, body")] + [MapsApi("update", "index, type, id, body")] public Task UpdateUsingTypeAsync(string index, string type, string id, PostData body, UpdateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/{id:id}/_update"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/_update_by_query https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html @@ -1158,7 +1158,7 @@ public TResponse UpdateByQuery(string index, PostData body, UpdateByQ ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".update_by_query", "index, body")] + [MapsApi("update_by_query", "index, body")] public Task UpdateByQueryAsync(string index, PostData body, UpdateByQueryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_update_by_query"), ctx, body, RequestParams(requestParameters)); ///POST on /{index}/{type}/_update_by_query https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html @@ -1175,7 +1175,7 @@ public TResponse UpdateByQueryUsingType(string index, string type, Po ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] - [MapsApi(".update_by_query", "index, type, body")] + [MapsApi("update_by_query", "index, type, body")] public Task UpdateByQueryUsingTypeAsync(string index, string type, PostData body, UpdateByQueryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_update_by_query"), ctx, body, RequestParams(requestParameters)); ///POST on /_update_by_query/{task_id}/_rethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html @@ -1186,7 +1186,7 @@ public TResponse UpdateByQueryRethrottle(string taskId, UpdateByQuery ///POST on /_update_by_query/{task_id}/_rethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html ///The task id to rethrottle ///Request specific configuration such as querystring parameters & request specific connection settings. - [MapsApi(".update_by_query_rethrottle", "task_id")] + [MapsApi("update_by_query_rethrottle", "task_id")] public Task UpdateByQueryRethrottleAsync(string taskId, UpdateByQueryRethrottleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_update_by_query/{taskId:taskId}/_rethrottle"), ctx, null, RequestParams(requestParameters)); } diff --git a/src/Tests/Tests.YamlRunner/Commands.fs b/src/Tests/Tests.YamlRunner/Commands.fs index fc65180421b..1dd4cefb525 100644 --- a/src/Tests/Tests.YamlRunner/Commands.fs +++ b/src/Tests/Tests.YamlRunner/Commands.fs @@ -30,7 +30,7 @@ let LocateTests namedSuite revision = async { let ReadTests (tests:LocateResults list) = - let readPaths paths = paths |> List.map TestsReader.ReadYamlFile + let readPaths paths = paths |> List.map TestsReader.ReadYamlFile tests |> List.map (fun t -> { Folder= t.Folder; Files = readPaths t.Paths}) diff --git a/src/Tests/Tests.YamlRunner/DoMapper.fs b/src/Tests/Tests.YamlRunner/DoMapper.fs index acf014cc63f..fcd5088f239 100644 --- a/src/Tests/Tests.YamlRunner/DoMapper.fs +++ b/src/Tests/Tests.YamlRunner/DoMapper.fs @@ -4,16 +4,19 @@ open System open System.Reflection open System.Collections.Generic open System.Collections.ObjectModel -open System.Collections.ObjectModel -open System.IO +open System.Globalization open System.Linq.Expressions +open System.Threading.Tasks open Elasticsearch.Net -type ApiInvoke = delegate of Object * Object[] -> IElasticsearchResponse +type ApiInvoke = delegate of Object * Object[] -> Task type FastApiInvoke(instance: Object, restName:string, pathParams:KeyedCollection, methodInfo:MethodInfo) = member this.ClientMethodName = methodInfo.Name member this.ApiName = restName - member this.PathParameters = pathParams + member private this.IndexOfParam p = pathParams.IndexOf p + member private this.SupportsBody = pathParams.IndexOf "body" >= 0 + member this.PathParameters = + pathParams |> Seq.map (fun k -> k) |> Seq.filter (fun k -> k <> "body") |> Set.ofSeq member private this.Delegate = let instanceExpression = Expression.Parameter(typeof, "instance"); let argumentsExpression = Expression.Parameter(typeof, "arguments"); @@ -26,13 +29,61 @@ type FastApiInvoke(instance: Object, restName:string, pathParams:KeyedCollection let convert = Expression.Convert (index, p.ParameterType) argumentExpressions.Add convert ) + let x = [|typeof|] let callExpression = let instance = Expression.Convert(instanceExpression, methodInfo.ReflectedType) - Expression.Call(instance, methodInfo, argumentExpressions) - let invokeExpression = Expression.Convert(callExpression, typeof) + //Expression.Call(instance, methodInfo ,argumentExpressions) + Expression.Call(instance, methodInfo.Name, x, argumentExpressions.ToArray()) + + let invokeExpression = Expression.Convert(callExpression, typeof>) Expression.Lambda(invokeExpression, instanceExpression, argumentsExpression).Compile(); - member this.Invoke arguments = this.Delegate.Invoke(instance, arguments) + member this.CanInvoke (o:Map) = + let operationKeys = + o + |> Seq.map (fun k -> k.Key) + |> Seq.filter (fun k -> k <> "body") + |> Set.ofSeq + this.PathParameters.IsSubsetOf operationKeys + + member this.Invoke (o:Map) = + let foundBody, body = o.TryGetValue "body" + + let arguments = + o + |> Map.toSeq + |> Seq.filter (fun (k, v) -> this.PathParameters.Contains(k)) + |> Seq.sortBy (fun (k, v) -> this.IndexOfParam k) + |> Seq.map (fun (k, v) -> + let toString (value:Object) = + match value with + | :? String as s -> s + | :? int32 as i -> i.ToString(CultureInfo.InvariantCulture) + | :? double as i -> i.ToString(CultureInfo.InvariantCulture) + | :? int64 as i -> i.ToString(CultureInfo.InvariantCulture) + | :? Boolean as b -> if b then "false" else "true" + | e -> failwithf "unknown type %s " (e.GetType().Name) + + match v with + | :? List as a -> + let values = a |> Seq.map toString |> Seq.toArray + String.Join(',', values) + | e -> toString e + ) + |> Seq.cast + |> Seq.toArray + match (foundBody, this.SupportsBody) with + | (true, true) -> + let arguments = Array.append arguments [|PostData.Serializable body; null; Async.DefaultCancellationToken|] + this.Delegate.Invoke(instance, arguments) + | (false, true) -> + let arguments = Array.append arguments [|null ; null; Async.DefaultCancellationToken|] + this.Delegate.Invoke(instance, arguments) + | (false, false) -> + let arguments = Array.append arguments [|null; Async.DefaultCancellationToken|] + this.Delegate.Invoke(instance, arguments) + | (true, false) -> + failwithf "found a body but this method does not take a body" let getProp (t:Type) prop = t.GetProperty(prop).GetGetMethod() @@ -47,9 +98,31 @@ let methodsWithAttribute instance mapsApiAttribute = |> Array.map (fun (m, a) -> (m, a.[0] :?> Attribute)) |> Array.map (fun (m, a) -> (m, getRestName mapsApiAttribute a, getParameters mapsApiAttribute a)) |> Array.map (fun (m, restName, pathParams) -> (FastApiInvoke(instance, restName, pathParams, m))) + +exception ParamException of string + +let createApiLookup (invokers: FastApiInvoke list) : (Map -> FastApiInvoke) = + let first = invokers |> List.head + let name = first.ApiName + let clientMethod = first.ClientMethodName + + let lookup (o:Map) = + + let invokers = + invokers + |> Seq.sortBy (fun i -> i.PathParameters.Count) + |> Seq.filter (fun i -> i.CanInvoke o) + |> Seq.toList + + match invokers with + | [] -> + raise <| ParamException(sprintf "%s matched no method on %s: %O " name clientMethod o) + | invoker::tail -> + invoker + lookup -let clientApiDispatch client = +let clientApiDispatch (client:IElasticLowLevelClient) = let t = client.GetType() let mapsApiAttribute = t.Assembly.GetType("Elasticsearch.Net.MapsApiAttribute") @@ -61,8 +134,15 @@ let clientApiDispatch client = |> Array.concat |> Array.append rootMethods - for m in namespaces do - - printfn "method: %O api: %s len: %i" m.ClientMethodName m.ApiName m.PathParameters.Count + namespaces + |> List.ofArray + |> List.groupBy (fun n -> n.ApiName) + |> Map.ofList + |> Map.map -> FastApiInvoke)>(fun k v -> createApiLookup v) + +let DoMap = + let settings = new ConnectionConfiguration() + let x = settings.Proxy(Uri("http://ipv4.fiddler:8080"), String(null), String(null)) + clientApiDispatch (new ElasticLowLevelClient(x)) diff --git a/src/Tests/Tests.YamlRunner/Models.fs b/src/Tests/Tests.YamlRunner/Models.fs index ee856b5a354..cd46c8397dc 100644 --- a/src/Tests/Tests.YamlRunner/Models.fs +++ b/src/Tests/Tests.YamlRunner/Models.fs @@ -21,14 +21,14 @@ type DoCatch = let (|IsDoCatch|_|) (s:string) = match s with | "bad_request" -> Some BadRequest - | "unauthorized " -> Some Unauthorized - | "forbidden " -> Some Forbidden - | "missing " -> Some Missing - | "request_timeout " -> Some RequestTimeout - | "conflict " -> Some Conflict - | "unavailable " -> Some Unavailable - | "param " -> Some UnknownParameter - | "request " -> Some OtherBadResponse + | "unauthorized" -> Some Unauthorized + | "forbidden" -> Some Forbidden + | "missing" -> Some Missing + | "request_timeout" -> Some RequestTimeout + | "conflict" -> Some Conflict + | "unavailable" -> Some Unavailable + | "param" -> Some UnknownParameter + | "request" -> Some OtherBadResponse | "regex" -> Some Regex | _ -> None @@ -54,7 +54,7 @@ type NumericValue = Fixed of double | StashedId of StashedId type NumericMatch = Map type Do = { - ApiCall: string * Object + ApiCall: string * Map Catch:DoCatch option Warnings:option NodeSelector:NodeSelector option diff --git a/src/Tests/Tests.YamlRunner/OperationExecutor.fs b/src/Tests/Tests.YamlRunner/OperationExecutor.fs index d2e00fd26d0..4eb561fa40f 100644 --- a/src/Tests/Tests.YamlRunner/OperationExecutor.fs +++ b/src/Tests/Tests.YamlRunner/OperationExecutor.fs @@ -1,6 +1,8 @@ module Tests.YamlRunner.OperationExecutor open System.IO +open Tests.YamlRunner.DoMapper open Tests.YamlRunner.Models +open ShellProgressBar type ExecutionContext = { @@ -16,11 +18,31 @@ type ExecutionContext = { let Do executionContext = ignore() -let Execute (op:ExecutionContext) = +let Execute (op:ExecutionContext) (progress:IProgressBar) = async { match op.Operation with | Unknown u -> op.Throw <| sprintf "Unknown operation %s" u - | Skip s -> ignore - | Do d -> ignore - | Set s -> ignore - | TransformAndSet ts -> ignore - | Assert a -> ignore + | Skip s -> Async.Ignore + | Do d -> + let (name, data) = d.ApiCall + let found, lookup = DoMapper.DoMap.TryGetValue name + if found then + try + let invoke = lookup data + let! r = Async.AwaitTask <| invoke.Invoke(data) + //printfn "r: %b" r.ApiCall.Success + progress.WriteLine <| sprintf "%s %s" (r.ApiCall.HttpMethod.ToString()) (r.Uri.PathAndQuery) + with + | ParamException e -> + match d.Catch with + | Some UnknownParameter -> printfn "success" + | _ -> + printfn "%s %O" e d.Catch + //reraise() + + else + printfn "%s: %b" name found + + | Set s -> Async.Ignore + | TransformAndSet ts -> Async.Ignore + | Assert a -> Async.Ignore +} diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index 91d967416df..83a7e52b1e8 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -29,12 +29,9 @@ let runMain (parsed:ParseResults) = async { -// let! locateResults = Commands.LocateTests namedSuite revision -// let readResults = Commands.ReadTests locateResults -// let! runTesults = Commands.RunTests readResults - - - DoMapper.clientApiDispatch (ElasticLowLevelClient()) + let! locateResults = Commands.LocateTests namedSuite revision + let readResults = Commands.ReadTests locateResults + let! runTesults = Commands.RunTests readResults // // printfn "folders: %O" locateResults.Length // for folder in locateResults do diff --git a/src/Tests/Tests.YamlRunner/TestsReader.fs b/src/Tests/Tests.YamlRunner/TestsReader.fs index db98fc7536f..93756e9a551 100644 --- a/src/Tests/Tests.YamlRunner/TestsReader.fs +++ b/src/Tests/Tests.YamlRunner/TestsReader.fs @@ -14,7 +14,11 @@ type YamlValue = YamlDictionary of YamlMap | YamlString of string let private tryPick<'a> (map:YamlMap) key = let found, value = map.TryGetValue key - if (found) then Some (value :?> 'a) else None + if (found) then + map.Remove key |> ignore + Some (value :?> 'a) + + else None let private tryPickList<'a,'b> (map:YamlMap) key parse = let found, value = map.TryGetValue key @@ -24,12 +28,15 @@ let private tryPickList<'a,'b> (map:YamlMap) key parse = |> Seq.map (fun o -> o :?> 'a) |> Seq.map parse |> Seq.toList<'b> + map.Remove key |> ignore Some value else None let private pick<'a> (map:YamlMap) key = let found, value = map.TryGetValue key - if (found) then (value :?> 'a) + if (found) then + map.Remove key |> ignore + (value :?> 'a) else failwithf "expected to find %s of type %s" key typeof<'a>.Name let private mapSkip (operation:YamlMap) = @@ -98,8 +105,12 @@ let private mapNodeSelector (operation:YamlMap) = let private mapDo (operation:YamlMap) = let last = operation.Last() + //Todo should be map.First after picking the others let lastKey = last.Key :?> string - let lastValue = last.Key + let lastValue = + last.Value :?> YamlMap + |> Seq.map (fun o -> o.Key :?> String , o.Value) + |> Map.ofSeq let catch = match tryPick operation "catch" with @@ -108,7 +119,6 @@ let private mapDo (operation:YamlMap) = | _ -> None let warnings = tryPickList operation "warnings" id - let nodeSelector = mapNodeSelector operation Do { ApiCall = (lastKey, lastValue) diff --git a/src/Tests/Tests.YamlRunner/TestsRunner.fs b/src/Tests/Tests.YamlRunner/TestsRunner.fs index e214903317a..8b84c8ae286 100644 --- a/src/Tests/Tests.YamlRunner/TestsRunner.fs +++ b/src/Tests/Tests.YamlRunner/TestsRunner.fs @@ -8,7 +8,7 @@ open Tests.YamlRunner.OperationExecutor let private randomTime = Random() -let RunOperation file section operation nth = async { +let RunOperation file section operation nth (progress:IProgressBar) = async { let executionContext = { Suite= OpenSource File= file @@ -18,24 +18,24 @@ let RunOperation file section operation nth = async { Operation= operation } - return OperationExecutor.Execute executionContext + return! OperationExecutor.Execute executionContext progress } -let private createOperations m file (ops:Operations) = +let private createOperations m file (ops:Operations) progress = let executedOperations = ops |> List.indexed |> List.map (fun (i, op) -> async { - let! pass = RunOperation file m op i + let! pass = RunOperation file m op i progress //let! x = Async.Sleep <| randomTime.Next(0, 10) return pass }) (m, executedOperations) -let RunTestFile (progress:IProgressBar) (file:YamlTestDocument) = async { +let RunTestFile progress (file:YamlTestDocument) = async { - let m section ops = createOperations section file.FileInfo ops + let m section ops = createOperations section file.FileInfo ops progress let setup = file.Setup |> Option.map (m "Setup") |> Option.toList let teardown = file.Teardown |> Option.map (m "Teardown") |> Option.toList @@ -84,7 +84,7 @@ let RunTestsInFolder (progress:IProgressBar) (barOptions:ProgressBarOptions) mai progress.Tick(message) let message = sprintf "Inspecting file for sections" use p = progress.Spawn(0, message, barOptions) - let! result = RunTestFile p document + let! result = RunTestFile p document return result } From e3fdff9a70cd61c48e7863de8dc81bef9b20182d Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Mon, 9 Sep 2019 17:14:55 +0200 Subject: [PATCH 28/85] stage, now actually sends querystring parameters --- src/Tests/Tests.YamlRunner/DoMapper.fs | 31 +++++++++++++++---- .../Tests.YamlRunner/OperationExecutor.fs | 3 -- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/DoMapper.fs b/src/Tests/Tests.YamlRunner/DoMapper.fs index fcd5088f239..bea0c35d2db 100644 --- a/src/Tests/Tests.YamlRunner/DoMapper.fs +++ b/src/Tests/Tests.YamlRunner/DoMapper.fs @@ -10,6 +10,9 @@ open System.Threading.Tasks open Elasticsearch.Net type ApiInvoke = delegate of Object * Object[] -> Task + +type RequestParametersInvoke = delegate of unit -> IRequestParameters + type FastApiInvoke(instance: Object, restName:string, pathParams:KeyedCollection, methodInfo:MethodInfo) = member this.ClientMethodName = methodInfo.Name member this.ApiName = restName @@ -17,6 +20,15 @@ type FastApiInvoke(instance: Object, restName:string, pathParams:KeyedCollection member private this.SupportsBody = pathParams.IndexOf "body" >= 0 member this.PathParameters = pathParams |> Seq.map (fun k -> k) |> Seq.filter (fun k -> k <> "body") |> Set.ofSeq + + member private this.CreateRequestParameters = + let t = methodInfo.GetParameters() |> Array.find (fun p -> typeof.IsAssignableFrom(p.ParameterType)) + let c = t.ParameterType.GetConstructors() |> Array.head + + let newExp = Expression.New(c) + Expression.Lambda(newExp).Compile() + + /// Create a call into a specific client method member private this.Delegate = let instanceExpression = Expression.Parameter(typeof, "instance"); let argumentsExpression = Expression.Parameter(typeof, "arguments"); @@ -32,7 +44,6 @@ type FastApiInvoke(instance: Object, restName:string, pathParams:KeyedCollection let x = [|typeof|] let callExpression = let instance = Expression.Convert(instanceExpression, methodInfo.ReflectedType) - //Expression.Call(instance, methodInfo ,argumentExpressions) Expression.Call(instance, methodInfo.Name, x, argumentExpressions.ToArray()) let invokeExpression = Expression.Convert(callExpression, typeof>) @@ -72,15 +83,23 @@ type FastApiInvoke(instance: Object, restName:string, pathParams:KeyedCollection ) |> Seq.cast |> Seq.toArray + + let requestParameters = this.CreateRequestParameters.Invoke(); + o + |> Map.toSeq + |> Seq.filter (fun (k, v) -> not <| this.PathParameters.Contains(k)) + |> Seq.filter (fun (k, v) -> k <> "body") + |> Seq.iter (fun (k, v) -> requestParameters.SetQueryString(k, v)) + match (foundBody, this.SupportsBody) with | (true, true) -> - let arguments = Array.append arguments [|PostData.Serializable body; null; Async.DefaultCancellationToken|] + let arguments = Array.append arguments [|PostData.Serializable body; requestParameters; Async.DefaultCancellationToken|] this.Delegate.Invoke(instance, arguments) | (false, true) -> - let arguments = Array.append arguments [|null ; null; Async.DefaultCancellationToken|] + let arguments = Array.append arguments [|null ; requestParameters; Async.DefaultCancellationToken|] this.Delegate.Invoke(instance, arguments) | (false, false) -> - let arguments = Array.append arguments [|null; Async.DefaultCancellationToken|] + let arguments = Array.append arguments [|requestParameters; Async.DefaultCancellationToken|] this.Delegate.Invoke(instance, arguments) | (true, false) -> failwithf "found a body but this method does not take a body" @@ -110,7 +129,7 @@ let createApiLookup (invokers: FastApiInvoke list) : (Map -> Fas let invokers = invokers - |> Seq.sortBy (fun i -> i.PathParameters.Count) + |> Seq.sortByDescending (fun i -> i.PathParameters.Count) |> Seq.filter (fun i -> i.CanInvoke o) |> Seq.toList @@ -141,7 +160,7 @@ let clientApiDispatch (client:IElasticLowLevelClient) = |> Map.map -> FastApiInvoke)>(fun k v -> createApiLookup v) let DoMap = - let settings = new ConnectionConfiguration() + let settings = new ConnectionConfiguration(new Uri("http://ipv4.fiddler:9200")) let x = settings.Proxy(Uri("http://ipv4.fiddler:8080"), String(null), String(null)) clientApiDispatch (new ElasticLowLevelClient(x)) diff --git a/src/Tests/Tests.YamlRunner/OperationExecutor.fs b/src/Tests/Tests.YamlRunner/OperationExecutor.fs index 4eb561fa40f..bea1ca509f6 100644 --- a/src/Tests/Tests.YamlRunner/OperationExecutor.fs +++ b/src/Tests/Tests.YamlRunner/OperationExecutor.fs @@ -4,7 +4,6 @@ open Tests.YamlRunner.DoMapper open Tests.YamlRunner.Models open ShellProgressBar - type ExecutionContext = { Suite: TestSuite Folder: DirectoryInfo @@ -15,7 +14,6 @@ type ExecutionContext = { } with member __.Throw message = failwithf "%s" message - let Do executionContext = ignore() let Execute (op:ExecutionContext) (progress:IProgressBar) = async { @@ -29,7 +27,6 @@ let Execute (op:ExecutionContext) (progress:IProgressBar) = async { try let invoke = lookup data let! r = Async.AwaitTask <| invoke.Invoke(data) - //printfn "r: %b" r.ApiCall.Success progress.WriteLine <| sprintf "%s %s" (r.ApiCall.HttpMethod.ToString()) (r.Uri.PathAndQuery) with | ParamException e -> From 19e1ce4f61b736280e3c0f9258dbe8f24bbc91e3 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Thu, 12 Sep 2019 16:52:10 +0200 Subject: [PATCH 29/85] stage --- src/Tests/Tests.YamlRunner/DoMapper.fs | 7 ++++-- .../Tests.YamlRunner/OperationExecutor.fs | 24 ++++++++++++------- src/Tests/Tests.YamlRunner/TestsRunner.fs | 22 ++++++++++------- 3 files changed, 34 insertions(+), 19 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/DoMapper.fs b/src/Tests/Tests.YamlRunner/DoMapper.fs index bea0c35d2db..89a82d8524f 100644 --- a/src/Tests/Tests.YamlRunner/DoMapper.fs +++ b/src/Tests/Tests.YamlRunner/DoMapper.fs @@ -77,8 +77,11 @@ type FastApiInvoke(instance: Object, restName:string, pathParams:KeyedCollection match v with | :? List as a -> - let values = a |> Seq.map toString |> Seq.toArray - String.Join(',', values) + let values = a |> Seq.map toString |> Seq.toList + // https://github.com/elastic/elasticsearch/blob/6f1359fb70fba1bd7a1e26f4a9d42a9098ed4371/rest-api-spec/src/main/resources/rest-api-spec/test/indices.refresh/10_basic.yml#L40-L42 + match values with + | [] -> "_all" + | _ -> String.Join(',', values) | e -> toString e ) |> Seq.cast diff --git a/src/Tests/Tests.YamlRunner/OperationExecutor.fs b/src/Tests/Tests.YamlRunner/OperationExecutor.fs index bea1ca509f6..03d342c89db 100644 --- a/src/Tests/Tests.YamlRunner/OperationExecutor.fs +++ b/src/Tests/Tests.YamlRunner/OperationExecutor.fs @@ -1,4 +1,5 @@ module Tests.YamlRunner.OperationExecutor +open SharpYaml.Events open System.IO open Tests.YamlRunner.DoMapper open Tests.YamlRunner.Models @@ -14,12 +15,15 @@ type ExecutionContext = { } with member __.Throw message = failwithf "%s" message -let Do executionContext = ignore() +type ExecutionResult = +| Succeeded of ExecutionContext +| Skipped of ExecutionContext +| Failed of ExecutionContext let Execute (op:ExecutionContext) (progress:IProgressBar) = async { match op.Operation with - | Unknown u -> op.Throw <| sprintf "Unknown operation %s" u - | Skip s -> Async.Ignore + | Unknown u -> return Skipped op + | Skip s -> return Skipped op | Do d -> let (name, data) = d.ApiCall let found, lookup = DoMapper.DoMap.TryGetValue name @@ -27,19 +31,21 @@ let Execute (op:ExecutionContext) (progress:IProgressBar) = async { try let invoke = lookup data let! r = Async.AwaitTask <| invoke.Invoke(data) - progress.WriteLine <| sprintf "%s %s" (r.ApiCall.HttpMethod.ToString()) (r.Uri.PathAndQuery) + //progress.WriteLine <| sprintf "%s %s" (r.ApiCall.HttpMethod.ToString()) (r.Uri.PathAndQuery) + return Succeeded op with | ParamException e -> match d.Catch with - | Some UnknownParameter -> printfn "success" + | Some UnknownParameter -> return Succeeded op | _ -> printfn "%s %O" e d.Catch - //reraise() + return Failed op else printfn "%s: %b" name found + return Failed op - | Set s -> Async.Ignore - | TransformAndSet ts -> Async.Ignore - | Assert a -> Async.Ignore + | Set s -> return Skipped op + | TransformAndSet ts -> return Skipped op + | Assert a -> return Skipped op } diff --git a/src/Tests/Tests.YamlRunner/TestsRunner.fs b/src/Tests/Tests.YamlRunner/TestsRunner.fs index 8b84c8ae286..7dff146d5c2 100644 --- a/src/Tests/Tests.YamlRunner/TestsRunner.fs +++ b/src/Tests/Tests.YamlRunner/TestsRunner.fs @@ -47,18 +47,24 @@ let RunTestFile progress (file:YamlTestDocument) = async { let ops = sections |> List.sumBy (fun (_, i) -> i.Length) progress.MaxTicks <- ops - let runSection progressHeader sectionHeader ops = async { + let runSection progressHeader sectionHeader (ops: Async list) = async { let l = ops |> List.length let result = ops |> List.indexed - |> Seq.map (fun (i, op) -> async { - let operations = sprintf "%s [%i/%i] operations: %s" progressHeader (i+1) l sectionHeader - progress.Tick(operations) - return! op - }) - |> Seq.map Async.RunSynchronously - |> Seq.toList + |> Seq.unfold (fun ms -> + match ms with + | (i, op) :: tl -> + let operations = sprintf "%s [%i/%i] operations: %s" progressHeader (i+1) l sectionHeader + progress.Tick(operations) + let r = Async.RunSynchronously op + match r with + | Succeeded context -> Some (r, tl) + | Skipped context -> Some (r, []) + | Failed context -> Some (r, []) + | [] -> None + ) + |> List.ofSeq return result } From fad776a7ee5943708eb5d66e0e5e564ca75e3890 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Fri, 13 Sep 2019 20:07:42 +0200 Subject: [PATCH 30/85] stage --- src/Tests/Tests.YamlRunner/Commands.fs | 2 +- src/Tests/Tests.YamlRunner/DoMapper.fs | 61 +++++++++++++------ src/Tests/Tests.YamlRunner/Models.fs | 12 ++-- .../Tests.YamlRunner/OperationExecutor.fs | 35 ++++++++++- .../Tests.YamlRunner/Tests.YamlRunner.fsproj | 2 + src/Tests/Tests.YamlRunner/TestsLocator.fs | 1 + src/Tests/Tests.YamlRunner/TestsReader.fs | 4 -- src/Tests/Tests.YamlRunner/TestsRunner.fs | 18 ++++-- 8 files changed, 97 insertions(+), 38 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/Commands.fs b/src/Tests/Tests.YamlRunner/Commands.fs index 1dd4cefb525..e36c21d11b6 100644 --- a/src/Tests/Tests.YamlRunner/Commands.fs +++ b/src/Tests/Tests.YamlRunner/Commands.fs @@ -40,7 +40,7 @@ let RunTests (tests:YamlTestFolder list) = async { let l = tests |> List.sumBy (fun t -> t.Files.Length) use progress = new ProgressBar(l, sprintf "Folders [0/%i]" l, barOptions) let a (i, v) = async { - let mainMessage = sprintf "[%i/%i] Folders : %s | " (i+1) f v.Folder + let mainMessage = sprintf "[%i/%i] Folders : %s | " (i+1) f v.Folder let! op = TestsRunner.RunTestsInFolder progress subBarOptions mainMessage v return op |> Seq.toList } diff --git a/src/Tests/Tests.YamlRunner/DoMapper.fs b/src/Tests/Tests.YamlRunner/DoMapper.fs index 89a82d8524f..372f38ac65b 100644 --- a/src/Tests/Tests.YamlRunner/DoMapper.fs +++ b/src/Tests/Tests.YamlRunner/DoMapper.fs @@ -5,9 +5,13 @@ open System.Reflection open System.Collections.Generic open System.Collections.ObjectModel open System.Globalization +open System.IO +open System.Linq open System.Linq.Expressions open System.Threading.Tasks open Elasticsearch.Net +open Elasticsearch.Net +open Tests.YamlRunner.Models type ApiInvoke = delegate of Object * Object[] -> Task @@ -48,16 +52,21 @@ type FastApiInvoke(instance: Object, restName:string, pathParams:KeyedCollection let invokeExpression = Expression.Convert(callExpression, typeof>) Expression.Lambda(invokeExpression, instanceExpression, argumentsExpression).Compile(); + + member private this.toMap (o:YamlMap) = o |> Seq.map (fun o -> o.Key :?> String , o.Value) |> Map.ofSeq - member this.CanInvoke (o:Map) = + member this.CanInvoke (o:YamlMap) = let operationKeys = o + |> this.toMap |> Seq.map (fun k -> k.Key) |> Seq.filter (fun k -> k <> "body") |> Set.ofSeq this.PathParameters.IsSubsetOf operationKeys - member this.Invoke (o:Map) = + member this.Invoke (map:YamlMap) = + let o = map |> this.toMap + let foundBody, body = o.TryGetValue "body" let arguments = @@ -94,18 +103,27 @@ type FastApiInvoke(instance: Object, restName:string, pathParams:KeyedCollection |> Seq.filter (fun (k, v) -> k <> "body") |> Seq.iter (fun (k, v) -> requestParameters.SetQueryString(k, v)) - match (foundBody, this.SupportsBody) with - | (true, true) -> - let arguments = Array.append arguments [|PostData.Serializable body; requestParameters; Async.DefaultCancellationToken|] - this.Delegate.Invoke(instance, arguments) - | (false, true) -> - let arguments = Array.append arguments [|null ; requestParameters; Async.DefaultCancellationToken|] - this.Delegate.Invoke(instance, arguments) - | (false, false) -> - let arguments = Array.append arguments [|requestParameters; Async.DefaultCancellationToken|] - this.Delegate.Invoke(instance, arguments) - | (true, false) -> - failwithf "found a body but this method does not take a body" + let post = + match body with + | null -> null + | :? List as e -> + + + PostData.MultiJson e + | :? String as s -> PostData.String s + | value -> PostData.Serializable body :> PostData + + let args = + match (foundBody, this.SupportsBody) with + | (true, true) -> + Array.append arguments [|post; requestParameters; Async.DefaultCancellationToken|] + | (false, true) -> + Array.append arguments [|null ; requestParameters; Async.DefaultCancellationToken|] + | (false, false) -> + Array.append arguments [|requestParameters; Async.DefaultCancellationToken|] + | (true, false) -> failwithf "found a body but this method does not take a body" + + this.Delegate.Invoke(instance, args) let getProp (t:Type) prop = t.GetProperty(prop).GetGetMethod() @@ -123,12 +141,12 @@ let methodsWithAttribute instance mapsApiAttribute = exception ParamException of string -let createApiLookup (invokers: FastApiInvoke list) : (Map -> FastApiInvoke) = +let createApiLookup (invokers: FastApiInvoke list) : (YamlMap -> FastApiInvoke) = let first = invokers |> List.head let name = first.ApiName let clientMethod = first.ClientMethodName - let lookup (o:Map) = + let lookup (o:YamlMap) = let invokers = invokers @@ -160,11 +178,14 @@ let clientApiDispatch (client:IElasticLowLevelClient) = |> List.ofArray |> List.groupBy (fun n -> n.ApiName) |> Map.ofList - |> Map.map -> FastApiInvoke)>(fun k v -> createApiLookup v) - -let DoMap = + |> Map.map FastApiInvoke)>(fun k v -> createApiLookup v) + +let Client = let settings = new ConnectionConfiguration(new Uri("http://ipv4.fiddler:9200")) let x = settings.Proxy(Uri("http://ipv4.fiddler:8080"), String(null), String(null)) - clientApiDispatch (new ElasticLowLevelClient(x)) + new ElasticLowLevelClient(x) + +let DoMap = + clientApiDispatch Client diff --git a/src/Tests/Tests.YamlRunner/Models.fs b/src/Tests/Tests.YamlRunner/Models.fs index cd46c8397dc..f22eb7debeb 100644 --- a/src/Tests/Tests.YamlRunner/Models.fs +++ b/src/Tests/Tests.YamlRunner/Models.fs @@ -1,8 +1,7 @@ module Tests.YamlRunner.Models open System -open System.IO -open System.Linq.Expressions +open System.Collections.Generic type TestSuite = OpenSource | XPack @@ -41,7 +40,9 @@ type ResponseProperty = ResponseProperty of string type StashedId = private StashedId of string // TODO handle $ when already on s - with static member Create s = StashedId <| sprintf "$%s" s + with + static member Create s = StashedId <| sprintf "$%s" s + static member Body = StashedId.Create "body" type SetTransformation = private SetTransformation of string with static member Create s = SetTransformation <| sprintf "$%s" s @@ -53,8 +54,11 @@ type Match = Map type NumericValue = Fixed of double | StashedId of StashedId type NumericMatch = Map +type YamlMap = Dictionary +type YamlValue = YamlDictionary of YamlMap | YamlString of string + type Do = { - ApiCall: string * Map + ApiCall: string * YamlMap Catch:DoCatch option Warnings:option NodeSelector:NodeSelector option diff --git a/src/Tests/Tests.YamlRunner/OperationExecutor.fs b/src/Tests/Tests.YamlRunner/OperationExecutor.fs index 03d342c89db..6bf09eae44c 100644 --- a/src/Tests/Tests.YamlRunner/OperationExecutor.fs +++ b/src/Tests/Tests.YamlRunner/OperationExecutor.fs @@ -1,8 +1,14 @@ module Tests.YamlRunner.OperationExecutor -open SharpYaml.Events + +open Elasticsearch.Net +open System +open System.Collections.Generic open System.IO +open System.Text +open System.Threading open Tests.YamlRunner.DoMapper open Tests.YamlRunner.Models +open Tests.YamlRunner.Stashes open ShellProgressBar type ExecutionContext = { @@ -12,6 +18,7 @@ type ExecutionContext = { Section: string NthOperation: int Operation: Operation + Stashes: Stashes } with member __.Throw message = failwithf "%s" message @@ -21,6 +28,7 @@ type ExecutionResult = | Failed of ExecutionContext let Execute (op:ExecutionContext) (progress:IProgressBar) = async { + let stashes = op.Stashes match op.Operation with | Unknown u -> return Skipped op | Skip s -> return Skipped op @@ -30,7 +38,12 @@ let Execute (op:ExecutionContext) (progress:IProgressBar) = async { if found then try let invoke = lookup data - let! r = Async.AwaitTask <| invoke.Invoke(data) + let resolvedData = stashes.Resolve data + let! r = Async.AwaitTask <| invoke.Invoke resolvedData + + op.Stashes.[StashedId.Body] <- r.Body + op.Stashes.Response <- Some r + //progress.WriteLine <| sprintf "%s %s" (r.ApiCall.HttpMethod.ToString()) (r.Uri.PathAndQuery) return Succeeded op with @@ -45,7 +58,23 @@ let Execute (op:ExecutionContext) (progress:IProgressBar) = async { printfn "%s: %b" name found return Failed op - | Set s -> return Skipped op + | Set s -> + let v (prop:ResponseProperty) id = + let (ResponseProperty prop) = prop + match stashes.Response with + | Some r -> + let v = stashes.GetResponseValue prop + stashes.[id] <- v + progress.WriteLine <| sprintf "%A %s %O" id prop v + Succeeded op + | None -> + progress.WriteLine <| sprintf "%A %s NOT FOUND" id prop + failwithf "Attempted to look up %s but no response was set prior" prop + Failed op + + let responses = s |> Map.map v + + return Succeeded op | TransformAndSet ts -> return Skipped op | Assert a -> return Skipped op } diff --git a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj index ceefd8081ce..27235d357d6 100644 --- a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj +++ b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj @@ -10,6 +10,7 @@ + @@ -24,6 +25,7 @@ + diff --git a/src/Tests/Tests.YamlRunner/TestsLocator.fs b/src/Tests/Tests.YamlRunner/TestsLocator.fs index 20cb5e02495..eef42b7d616 100644 --- a/src/Tests/Tests.YamlRunner/TestsLocator.fs +++ b/src/Tests/Tests.YamlRunner/TestsLocator.fs @@ -15,6 +15,7 @@ let ListFolders namedSuite revision = async { return doc.CssSelect("td.content a.js-navigation-open") |> List.map (fun a -> a.InnerText()) + |> List.filter (fun f -> not <| f.StartsWith("cluster")) |> List.filter (fun f -> not <| f.EndsWith(".asciidoc")) } diff --git a/src/Tests/Tests.YamlRunner/TestsReader.fs b/src/Tests/Tests.YamlRunner/TestsReader.fs index 93756e9a551..e9de8e6a8cc 100644 --- a/src/Tests/Tests.YamlRunner/TestsReader.fs +++ b/src/Tests/Tests.YamlRunner/TestsReader.fs @@ -9,8 +9,6 @@ open System.IO open Tests.YamlRunner.Models open Tests.YamlRunner.TestsLocator -type YamlMap = Dictionary -type YamlValue = YamlDictionary of YamlMap | YamlString of string let private tryPick<'a> (map:YamlMap) key = let found, value = map.TryGetValue key @@ -109,8 +107,6 @@ let private mapDo (operation:YamlMap) = let lastKey = last.Key :?> string let lastValue = last.Value :?> YamlMap - |> Seq.map (fun o -> o.Key :?> String , o.Value) - |> Map.ofSeq let catch = match tryPick operation "catch" with diff --git a/src/Tests/Tests.YamlRunner/TestsRunner.fs b/src/Tests/Tests.YamlRunner/TestsRunner.fs index 7dff146d5c2..20884e4cd12 100644 --- a/src/Tests/Tests.YamlRunner/TestsRunner.fs +++ b/src/Tests/Tests.YamlRunner/TestsRunner.fs @@ -5,10 +5,12 @@ open ShellProgressBar open Tests.YamlRunner.Models open Tests.YamlRunner.TestsReader open Tests.YamlRunner.OperationExecutor +open Tests.YamlRunner.Stashes +open Elasticsearch.Net let private randomTime = Random() -let RunOperation file section operation nth (progress:IProgressBar) = async { +let RunOperation file section operation nth stashes (progress:IProgressBar) = async { let executionContext = { Suite= OpenSource File= file @@ -16,22 +18,22 @@ let RunOperation file section operation nth (progress:IProgressBar) = async { Section= section NthOperation= nth Operation= operation + Stashes = stashes } - return! OperationExecutor.Execute executionContext progress } let private createOperations m file (ops:Operations) progress = let executedOperations = + let stashes = Stashes() ops |> List.indexed |> List.map (fun (i, op) -> async { - let! pass = RunOperation file m op i progress + let! pass = RunOperation file m op i stashes progress //let! x = Async.Sleep <| randomTime.Next(0, 10) return pass }) (m, executedOperations) - let RunTestFile progress (file:YamlTestDocument) = async { @@ -60,7 +62,7 @@ let RunTestFile progress (file:YamlTestDocument) = async { let r = Async.RunSynchronously op match r with | Succeeded context -> Some (r, tl) - | Skipped context -> Some (r, []) + | Skipped context -> Some (r, tl) | Failed context -> Some (r, []) | [] -> None ) @@ -90,7 +92,11 @@ let RunTestsInFolder (progress:IProgressBar) (barOptions:ProgressBarOptions) mai progress.Tick(message) let message = sprintf "Inspecting file for sections" use p = progress.Spawn(0, message, barOptions) - let! result = RunTestFile p document + let! result = RunTestFile p document + + let x = DoMapper.Client.Indices.Delete("*") + let x = DoMapper.Client.Indices.DeleteTemplateForAll("*") + return result } From 4e2a5717d7bebb7f0bb9c83338eee9e1bb25ea09 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Fri, 13 Sep 2019 20:07:55 +0200 Subject: [PATCH 31/85] stage --- src/Tests/Tests.YamlRunner/Stashes.fs | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/Tests/Tests.YamlRunner/Stashes.fs diff --git a/src/Tests/Tests.YamlRunner/Stashes.fs b/src/Tests/Tests.YamlRunner/Stashes.fs new file mode 100644 index 00000000000..5af63bee5a6 --- /dev/null +++ b/src/Tests/Tests.YamlRunner/Stashes.fs @@ -0,0 +1,36 @@ +module Tests.YamlRunner.Stashes + +open Elasticsearch.Net +open System +open System.Collections.Generic +open System.IO +open System.Text +open Tests.YamlRunner.Models + +type Stashes() = + inherit Dictionary() + + member val Response:StringResponse option = None with get, set + + member this.Dictionary = lazy( + let r = this.Response.Value + + use s = new MemoryStream(Encoding.UTF8.GetBytes r.Body) + r.ConnectionConfiguration.RequestResponseSerializer.Deserialize s + ) + + member this.GetResponseValue path = this.Dictionary.Force().Get path + + member this.Resolve (object:YamlMap) = + let rec resolve (o:Object) : Object = + match o with + | :? YamlMap as map -> + let newDict = YamlMap() + map + |> Seq.iter (fun kv -> newDict.[kv.Key] <- resolve kv.Value) + newDict :> Object + | :? String as value -> value :> Object + | value -> value + + let resolved = resolve object :?> YamlMap + resolved From 74d01a4a98ea192f7ea629348154a01915599340 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Mon, 16 Sep 2019 15:56:03 +0200 Subject: [PATCH 32/85] DynamicResponse now useful in the context of yaml runner --- .../Responses/Dynamic/DynamicDictionary.cs | 35 +++--- .../Responses/Dynamic/DynamicResponse.cs | 22 +++- .../Responses/Dynamic/DynamicValue.cs | 43 +++++--- .../Formatters/DynamicDictionaryFormatter.cs | 11 ++ .../Transport/Pipeline/ResponseBuilder.cs | 22 ++-- src/Elasticsearch.Net/Transport/PostData.cs | 5 +- src/Tests/Tests.YamlRunner/DoMapper.fs | 13 +-- src/Tests/Tests.YamlRunner/Models.fs | 5 +- .../Tests.YamlRunner/OperationExecutor.fs | 102 +++++++++--------- src/Tests/Tests.YamlRunner/Stashes.fs | 43 ++++++-- src/Tests/Tests.YamlRunner/TestsLocator.fs | 3 +- .../LowLevel/LowLevelResponseTypes.doc.cs | 96 +++++++++++++++++ 12 files changed, 296 insertions(+), 104 deletions(-) create mode 100644 src/Tests/Tests/ClientConcepts/LowLevel/LowLevelResponseTypes.doc.cs diff --git a/src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs b/src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs index 995ba81d583..b4658cce92e 100644 --- a/src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs +++ b/src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using System.Dynamic; using System.Linq; +using System.Text.RegularExpressions; using Elasticsearch.Net.Utf8Json; // ReSharper disable ArrangeMethodOrOperatorBody @@ -51,33 +52,34 @@ public bool IsReadOnly get { return false; } } + private static Regex SplitRegex = new Regex(@"(? - /// Traverses data using path notation + /// Traverses data using path notation. + /// e.g some.deep.nested.json.path + /// A special lookup is available for ANY key _arbitrary_key_ e.g some.deep._arbitrary_key_.json.path which will traverse into the first key /// - /// path into the stored object, keys are seperated with a dot and the last key is returned as T + /// path into the stored object, keys are separated with a dot and the last key is returned as T /// /// T or default public T Get(string path) { if (path == null) return default; - var stack = new Stack(path.Split('.')); - if (stack.Count == 0) return default; - var lastValue = stack.Pop(); - var queue = new Queue(stack.Reverse()); - IDictionary map = this; + var split = SplitRegex.Split(path); + var queue = new Queue(split); + if (queue.Count == 0) return default; + + var d = new DynamicValue(_backingDictionary); while (queue.Count > 0) { - var key = queue.Dequeue(); - var value = map[key]; - map = value?.ToDictionary(); - if (map == null) break; + var key = queue.Dequeue().Replace(@"\.", "."); + if (key == "_arbitrary_key_") d = d[0]; + else if (int.TryParse(key, out var i)) d = d[i]; + else d = d[key]; } - var v = map?[lastValue]?.Value; - if (v != null && typeof(T) == typeof(DynamicDictionary) && v is IDictionary dict) - return (T)(object)DynamicDictionary.Create(dict); - return v == null ? default : (T)v; + return d.TryParse(); } /// @@ -281,7 +283,8 @@ public static DynamicDictionary Create(IDictionary values) foreach (var key in values.Keys) { - instance[key] = new DynamicValue(values[key]); + var v = values[key]; + instance[key] = v is DynamicValue av ? av : new DynamicValue(v); } return instance; diff --git a/src/Elasticsearch.Net/Responses/Dynamic/DynamicResponse.cs b/src/Elasticsearch.Net/Responses/Dynamic/DynamicResponse.cs index 44c8db0c979..c9941e421c9 100644 --- a/src/Elasticsearch.Net/Responses/Dynamic/DynamicResponse.cs +++ b/src/Elasticsearch.Net/Responses/Dynamic/DynamicResponse.cs @@ -1,9 +1,27 @@ -namespace Elasticsearch.Net +using System.Collections.Generic; + +namespace Elasticsearch.Net { public class DynamicResponse : ElasticsearchResponse { public DynamicResponse() { } - public DynamicResponse(DynamicDictionary dictionary) => Body = dictionary; + public DynamicResponse(DynamicDictionary dictionary) + { + Body = dictionary; + Dictionary = dictionary; + } + + public DynamicDictionary Dictionary { get; } + + /// + /// Traverses data using path notation. + /// e.g some.deep.nested.json.path + /// A special lookup is available for ANY key using _arbitrary_key_ e.g some.deep._arbitrary_key_.json.path which will traverse into the first key + /// + /// path into the stored object, keys are separated with a dot and the last key is returned as T + /// + /// T or default + public T Get(string path) => Dictionary.Get(path); } } diff --git a/src/Elasticsearch.Net/Responses/Dynamic/DynamicValue.cs b/src/Elasticsearch.Net/Responses/Dynamic/DynamicValue.cs index 9fb3ed98fd6..b580a4fe141 100644 --- a/src/Elasticsearch.Net/Responses/Dynamic/DynamicValue.cs +++ b/src/Elasticsearch.Net/Responses/Dynamic/DynamicValue.cs @@ -2,8 +2,10 @@ using System.Collections; using System.Collections.Generic; using System.ComponentModel; +using System.Data.SqlTypes; using System.Dynamic; using System.Globalization; +using System.Linq; using System.Linq.Expressions; using System.Runtime.CompilerServices; using Microsoft.CSharp.RuntimeBinder; @@ -23,7 +25,7 @@ public class DynamicValue : DynamicObject, IEquatable, IConvertibl /// Initializes a new instance of the class. /// /// The value to store in the instance - public DynamicValue(object value) => _value = value; + public DynamicValue(object value) => _value = value is DynamicValue av ? av.Value : value; /// /// Gets a value indicating whether this instance has value. @@ -45,19 +47,32 @@ public DynamicValue this[string name] } } + public static DynamicValue NullValue { get; } = new DynamicValue(null); + public static DynamicValue SelfOrNew(object v) => v is DynamicValue av ? av : new DynamicValue(v); + public DynamicValue this[int i] { get { - if (!HasValue) - return new DynamicValue(null); + if (!HasValue) return NullValue; + + var v = Value; - var l = Value as IList; - if (l != null && l.Count - 1 >= i) + if (v is IList l && l.Count - 1 >= i) + return SelfOrNew(l[i]); + if (v is IList o && o.Count - 1 >= i) + return SelfOrNew(o[i]); + + if (v is IDictionary d) { - return new DynamicValue(l[i]); + if (d.TryGetValue(i.ToString(CultureInfo.InvariantCulture), out v)) + return SelfOrNew(v); + + if (i >= d.Count) return new DynamicValue(null); + var at = d[d.Keys.ElementAt(i)]; + return SelfOrNew(at); } - return new DynamicValue(null); + return NullValue; } } @@ -391,7 +406,7 @@ private bool Dispatch(out object result, string name) { if (!HasValue) { - result = new DynamicValue(null); + result = NullValue; return true; } @@ -399,24 +414,24 @@ private bool Dispatch(out object result, string name) object r; if (d != null && d.TryGetValue(name, out r)) { - result = new DynamicValue(r); + result = SelfOrNew(r); return true; } var x = Value as IDynamicMetaObjectProvider; if (x != null) { var dm = GetDynamicMember(Value, name); - result = new DynamicValue(dm); + result = SelfOrNew(dm); return true; } var ds = Value as IDictionary; if (ds != null && ds.Contains(name)) { - result = new DynamicValue(ds[name]); + result = SelfOrNew(ds[name]); return true; } - result = new DynamicValue(Value); + result = SelfOrNew(Value); return true; } @@ -472,6 +487,7 @@ private static object GetDynamicMember(object obj, string memberName) return (T)_value; } + var type = typeof(T); var stringValue = _value as string; @@ -493,6 +509,7 @@ private static object GetDynamicMember(object obj, string memberName) { return (T)Convert.ChangeType(_value, TypeCode.String, CultureInfo.InvariantCulture); } + else if (_value.GetType().IsValueType) return (T)Convert.ChangeType(_value, type); } catch { @@ -660,7 +677,7 @@ public override bool TryConvert(ConvertBinder binder, out object result) } else return false; - } + } result = Convert.ChangeType(_value, typeCode); return true; diff --git a/src/Elasticsearch.Net/Serialization/Formatters/DynamicDictionaryFormatter.cs b/src/Elasticsearch.Net/Serialization/Formatters/DynamicDictionaryFormatter.cs index 2b1819fdc1a..91cb32259cc 100644 --- a/src/Elasticsearch.Net/Serialization/Formatters/DynamicDictionaryFormatter.cs +++ b/src/Elasticsearch.Net/Serialization/Formatters/DynamicDictionaryFormatter.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Globalization; using Elasticsearch.Net.Utf8Json; using Elasticsearch.Net.Utf8Json.Formatters; @@ -8,6 +9,7 @@ internal class DynamicDictionaryFormatter : IJsonFormatter { protected static readonly DictionaryFormatter DictionaryFormatter = new DictionaryFormatter(); + protected static readonly ArrayFormatter ArrayFormatter = new ArrayFormatter(); public void Serialize(ref JsonWriter writer, DynamicDictionary value, IJsonFormatterResolver formatterResolver) { @@ -33,6 +35,15 @@ public void Serialize(ref JsonWriter writer, DynamicDictionary value, IJsonForma public DynamicDictionary Deserialize(ref JsonReader reader, IJsonFormatterResolver formatterResolver) { + if (reader.GetCurrentJsonToken() == JsonToken.BeginArray) + { + var array = ArrayFormatter.Deserialize(ref reader, formatterResolver); + var arrayDict = new Dictionary(); + for (var i = 0; i < array.Length; i++) + arrayDict[i.ToString(CultureInfo.InvariantCulture)] = new DynamicValue(array[i]); + return DynamicDictionary.Create(arrayDict); + + } var dictionary = DictionaryFormatter.Deserialize(ref reader, formatterResolver); return DynamicDictionary.Create(dictionary); } diff --git a/src/Elasticsearch.Net/Transport/Pipeline/ResponseBuilder.cs b/src/Elasticsearch.Net/Transport/Pipeline/ResponseBuilder.cs index 8bca2b44a15..0b6045bec20 100644 --- a/src/Elasticsearch.Net/Transport/Pipeline/ResponseBuilder.cs +++ b/src/Elasticsearch.Net/Transport/Pipeline/ResponseBuilder.cs @@ -100,7 +100,7 @@ private static TResponse SetBody(ApiCallDetails details, RequestData using (responseStream) { - if (SetSpecialTypes(bytes, requestData.MemoryStreamFactory, out var r)) + if (SetSpecialTypes(mimeType, bytes, requestData.MemoryStreamFactory, out var r)) return r; if (details.HttpStatusCode.HasValue && requestData.SkipDeserializationForStatusCodes.Contains(details.HttpStatusCode.Value)) @@ -133,7 +133,7 @@ private static async Task SetBodyAsync( using (responseStream) { - if (SetSpecialTypes(bytes, requestData.MemoryStreamFactory, out var r)) return r; + if (SetSpecialTypes(mimeType, bytes, requestData.MemoryStreamFactory, out var r)) return r; if (details.HttpStatusCode.HasValue && requestData.SkipDeserializationForStatusCodes.Contains(details.HttpStatusCode.Value)) return null; @@ -150,7 +150,7 @@ private static async Task SetBodyAsync( } } - private static bool SetSpecialTypes(byte[] bytes, IMemoryStreamFactory memoryStreamFactory, out TResponse cs) + private static bool SetSpecialTypes(string mimeType, byte[] bytes, IMemoryStreamFactory memoryStreamFactory, out TResponse cs) where TResponse : class, IElasticsearchResponse, new() { cs = null; @@ -165,10 +165,20 @@ private static bool SetSpecialTypes(byte[] bytes, IMemoryStreamFactor cs = new VoidResponse() as TResponse; else if (responseType == typeof(DynamicResponse)) { - using (var ms = memoryStreamFactory.Create(bytes)) + //if not json store the result under "body" + if (mimeType != RequestData.MimeType) { - var body = LowLevelRequestResponseSerializer.Instance.Deserialize(ms); - cs = new DynamicResponse(body) as TResponse; + var dictionary = new DynamicDictionary(); + dictionary["body"] = new DynamicValue(bytes.Utf8String()); + cs = new DynamicResponse(dictionary) as TResponse; + } + else + { + using (var ms = memoryStreamFactory.Create(bytes)) + { + var body = LowLevelRequestResponseSerializer.Instance.Deserialize(ms); + cs = new DynamicResponse(body) as TResponse; + } } } return cs != null; diff --git a/src/Elasticsearch.Net/Transport/PostData.cs b/src/Elasticsearch.Net/Transport/PostData.cs index c59b67363db..d6fd72024ae 100644 --- a/src/Elasticsearch.Net/Transport/PostData.cs +++ b/src/Elasticsearch.Net/Transport/PostData.cs @@ -8,7 +8,7 @@ namespace Elasticsearch.Net { // ReSharper disable once UnusedTypeParameter - public interface IPostData + public interface IPostData { void Write(Stream writableStream, IConnectionConfigurationValues settings); Task WriteAsync(Stream writableStream, IConnectionConfigurationValues settings, CancellationToken token); @@ -29,10 +29,13 @@ public abstract class PostData protected const string NewLineString = "\n"; protected static readonly byte[] NewLineByteArray = { (byte)'\n' }; + //TODO internal set?; public bool? DisableDirectStreaming { get; set; } public PostType Type { get; protected set; } public byte[] WrittenBytes { get; protected set; } + public static PostData Empty => new PostData(string.Empty); + public abstract void Write(Stream writableStream, IConnectionConfigurationValues settings); public abstract Task WriteAsync(Stream writableStream, IConnectionConfigurationValues settings, CancellationToken cancellationToken); diff --git a/src/Tests/Tests.YamlRunner/DoMapper.fs b/src/Tests/Tests.YamlRunner/DoMapper.fs index 372f38ac65b..0cb3cf1279e 100644 --- a/src/Tests/Tests.YamlRunner/DoMapper.fs +++ b/src/Tests/Tests.YamlRunner/DoMapper.fs @@ -13,7 +13,7 @@ open Elasticsearch.Net open Elasticsearch.Net open Tests.YamlRunner.Models -type ApiInvoke = delegate of Object * Object[] -> Task +type ApiInvoke = delegate of Object * Object[] -> Task type RequestParametersInvoke = delegate of unit -> IRequestParameters @@ -45,12 +45,12 @@ type FastApiInvoke(instance: Object, restName:string, pathParams:KeyedCollection let convert = Expression.Convert (index, p.ParameterType) argumentExpressions.Add convert ) - let x = [|typeof|] + let x = [|typeof|] let callExpression = let instance = Expression.Convert(instanceExpression, methodInfo.ReflectedType) Expression.Call(instance, methodInfo.Name, x, argumentExpressions.ToArray()) - let invokeExpression = Expression.Convert(callExpression, typeof>) + let invokeExpression = Expression.Convert(callExpression, typeof>) Expression.Lambda(invokeExpression, instanceExpression, argumentsExpression).Compile(); member private this.toMap (o:YamlMap) = o |> Seq.map (fun o -> o.Key :?> String , o.Value) |> Map.ofSeq @@ -107,9 +107,10 @@ type FastApiInvoke(instance: Object, restName:string, pathParams:KeyedCollection match body with | null -> null | :? List as e -> - - - PostData.MultiJson e + match e with + | e when e.All(fun i -> i.GetType() = typeof) -> + PostData.MultiJson(e.Cast()) + | e -> PostData.MultiJson e | :? String as s -> PostData.String s | value -> PostData.Serializable body :> PostData diff --git a/src/Tests/Tests.YamlRunner/Models.fs b/src/Tests/Tests.YamlRunner/Models.fs index f22eb7debeb..e1cb2ea05a0 100644 --- a/src/Tests/Tests.YamlRunner/Models.fs +++ b/src/Tests/Tests.YamlRunner/Models.fs @@ -41,7 +41,10 @@ type ResponseProperty = ResponseProperty of string type StashedId = private StashedId of string // TODO handle $ when already on s with - static member Create s = StashedId <| sprintf "$%s" s + static member Create (s:String) = + match s with + | s when s.StartsWith "$" -> StashedId s + | s -> StashedId <| sprintf "$%s" s static member Body = StashedId.Create "body" type SetTransformation = private SetTransformation of string diff --git a/src/Tests/Tests.YamlRunner/OperationExecutor.fs b/src/Tests/Tests.YamlRunner/OperationExecutor.fs index 6bf09eae44c..9c18393152d 100644 --- a/src/Tests/Tests.YamlRunner/OperationExecutor.fs +++ b/src/Tests/Tests.YamlRunner/OperationExecutor.fs @@ -1,15 +1,12 @@ module Tests.YamlRunner.OperationExecutor -open Elasticsearch.Net open System -open System.Collections.Generic open System.IO -open System.Text -open System.Threading open Tests.YamlRunner.DoMapper open Tests.YamlRunner.Models open Tests.YamlRunner.Stashes open ShellProgressBar +open Elasticsearch.Net type ExecutionContext = { Suite: TestSuite @@ -25,56 +22,65 @@ type ExecutionContext = { type ExecutionResult = | Succeeded of ExecutionContext | Skipped of ExecutionContext -| Failed of ExecutionContext +| Failed of ExecutionContext + + +let Set op s (progress:IProgressBar) = + let v (prop:ResponseProperty) id = + let stashes = op.Stashes + let (ResponseProperty prop) = prop + match stashes.Response with + | Some r -> + let v = stashes.GetResponseValue progress prop + stashes.[id] <- v + progress.WriteLine <| sprintf "%A %s %O" id prop v + Succeeded op + | None -> + progress.WriteLine <| sprintf "%A %s NOT FOUND" id prop + failwithf "Attempted to look up %s but no response was set prior" prop + Failed op + + let responses = s |> Map.map v + Succeeded op + +let Do op d progress = async { + let stashes = op.Stashes + let (name, data) = d.ApiCall + let found, lookup = DoMapper.DoMap.TryGetValue name + if found then + try + let invoke = lookup data + let resolvedData = stashes.Resolve progress data + let! r = Async.AwaitTask <| invoke.Invoke resolvedData + match r.ApiCall.ResponseMimeType with + //json + | RequestData.MimeType -> ignore() + // not json set $body to the response body string + | _ -> op.Stashes.[StashedId.Body] <- r.Get("body") + op.Stashes.Response <- Some r + + //progress.WriteLine <| sprintf "%s %s" (r.ApiCall.HttpMethod.ToString()) (r.Uri.PathAndQuery) + return Succeeded op + with + | ParamException e -> + match d.Catch with + | Some UnknownParameter -> return Succeeded op + | _ -> + printfn "%s %O" e d.Catch + return Failed op + + else + printfn "%s: %b" name found + return Failed op +} let Execute (op:ExecutionContext) (progress:IProgressBar) = async { let stashes = op.Stashes match op.Operation with | Unknown u -> return Skipped op | Skip s -> return Skipped op - | Do d -> - let (name, data) = d.ApiCall - let found, lookup = DoMapper.DoMap.TryGetValue name - if found then - try - let invoke = lookup data - let resolvedData = stashes.Resolve data - let! r = Async.AwaitTask <| invoke.Invoke resolvedData - - op.Stashes.[StashedId.Body] <- r.Body - op.Stashes.Response <- Some r - - //progress.WriteLine <| sprintf "%s %s" (r.ApiCall.HttpMethod.ToString()) (r.Uri.PathAndQuery) - return Succeeded op - with - | ParamException e -> - match d.Catch with - | Some UnknownParameter -> return Succeeded op - | _ -> - printfn "%s %O" e d.Catch - return Failed op - - else - printfn "%s: %b" name found - return Failed op - - | Set s -> - let v (prop:ResponseProperty) id = - let (ResponseProperty prop) = prop - match stashes.Response with - | Some r -> - let v = stashes.GetResponseValue prop - stashes.[id] <- v - progress.WriteLine <| sprintf "%A %s %O" id prop v - Succeeded op - | None -> - progress.WriteLine <| sprintf "%A %s NOT FOUND" id prop - failwithf "Attempted to look up %s but no response was set prior" prop - Failed op - - let responses = s |> Map.map v - - return Succeeded op + | Do d -> return! Do op d progress + | Set s -> return Set op s progress | TransformAndSet ts -> return Skipped op | Assert a -> return Skipped op } diff --git a/src/Tests/Tests.YamlRunner/Stashes.fs b/src/Tests/Tests.YamlRunner/Stashes.fs index 5af63bee5a6..65f216c5787 100644 --- a/src/Tests/Tests.YamlRunner/Stashes.fs +++ b/src/Tests/Tests.YamlRunner/Stashes.fs @@ -3,34 +3,57 @@ module Tests.YamlRunner.Stashes open Elasticsearch.Net open System open System.Collections.Generic +open System.Drawing open System.IO open System.Text open Tests.YamlRunner.Models +open ShellProgressBar type Stashes() = inherit Dictionary() - member val Response:StringResponse option = None with get, set + member val Response:DynamicResponse option = None with get, set - member this.Dictionary = lazy( - let r = this.Response.Value - - use s = new MemoryStream(Encoding.UTF8.GetBytes r.Body) - r.ConnectionConfiguration.RequestResponseSerializer.Deserialize s - ) + member this.Dictionary = lazy(this.Response.Value) - member this.GetResponseValue path = this.Dictionary.Force().Get path + member this.GetResponseValue (progress:IProgressBar) (path:String) = + let r = this.ResolveToken progress + let tokens = + path.Split('.') + |> Seq.map r + let path = String.Join('.', tokens) + this.Dictionary.Force().Get path - member this.Resolve (object:YamlMap) = + member this.Resolve (progress:IProgressBar) (object:YamlMap) = let rec resolve (o:Object) : Object = match o with + | :? List as list -> + let resolved = new List(); + list |> Seq.iter(fun i -> resolved.Add <| resolve i) + resolved :> Object | :? YamlMap as map -> let newDict = YamlMap() map |> Seq.iter (fun kv -> newDict.[kv.Key] <- resolve kv.Value) newDict :> Object - | :? String as value -> value :> Object + | :? String as value -> this.ResolveToken progress value | value -> value let resolved = resolve object :?> YamlMap resolved + + member this.ResolveToken (progress:IProgressBar) (s:String) : Object = + match s with + | s when s.StartsWith "$" -> + let found, value = this.TryGetValue <| StashedId.Create s + if not found then + let s = sprintf "Expected to resolve %s but no such value was stashed at this point" s + progress.WriteLine s + failwith s + progress.WriteLine <| sprintf "Found %s: %O" s value + value + | s -> s :> Object + + + + diff --git a/src/Tests/Tests.YamlRunner/TestsLocator.fs b/src/Tests/Tests.YamlRunner/TestsLocator.fs index eef42b7d616..772e660d4bf 100644 --- a/src/Tests/Tests.YamlRunner/TestsLocator.fs +++ b/src/Tests/Tests.YamlRunner/TestsLocator.fs @@ -28,6 +28,7 @@ let ListFolderFiles namedSuite revision folder = async { doc.CssSelect("td.content a.js-navigation-open") |> List.map(fun a -> a.InnerText()) |> List.filter(fun f -> f.EndsWith(".yml")) + |> List.filter(fun f -> f = "80_cas.yml") |> List.map fileUrl return yamlFiles } @@ -70,7 +71,7 @@ let DownloadTestsInFolder folder namedSuite revision (progress: IProgressBar) su let! localFiles = async { match yamlFiles.Length with | 0 -> - progress.WriteLine(sprintf "%s folder yielded no tests" folder) + //progress.WriteLine(sprintf "%s folder yielded no tests" folder) return List.empty | x -> let! result = downloadTestsInFolder yamlFiles folder revision progress subBarOptions diff --git a/src/Tests/Tests/ClientConcepts/LowLevel/LowLevelResponseTypes.doc.cs b/src/Tests/Tests/ClientConcepts/LowLevel/LowLevelResponseTypes.doc.cs new file mode 100644 index 00000000000..ea73fa6a5ff --- /dev/null +++ b/src/Tests/Tests/ClientConcepts/LowLevel/LowLevelResponseTypes.doc.cs @@ -0,0 +1,96 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Elasticsearch.Net; +using FluentAssertions; +using Nest; +using Tests.Framework; +using System.Threading; +using Elastic.Xunit.XunitPlumbing; +using Elasticsearch.Net.Extensions; +using Tests.Domain.Extensions; + +// ReSharper disable SuggestVarOrType_Elsewhere +// ReSharper disable SuggestVarOrType_BuiltInTypes +// ReSharper disable SuggestVarOrType_SimpleTypes + +namespace Tests.ClientConcepts.LowLevel +{ + public class LowLevelResponseTypes + { + /**[[low-level-response-types]] + * === Low Level Client Response Types + * + */ + + public static string Response() + { + return @"{ + ""boolean"" : true, + ""string"" : ""v"", + ""array"" : [1, 2, 3, 4], + ""object"" : { + ""first"" : ""value1"", + ""second"" : ""value2"", + ""nested"" : { ""x"" : ""value3"" } + }, + ""array_of_objects"" : [ + { + ""first"" : ""value11"", + ""second"" : ""value12"", + ""nested"" : { ""x"" : ""value4"" } + }, + { + ""first"" : ""value21"", + ""second"" : ""value22"", + ""nested"" : { ""x"" : ""value5"" }, + ""complex.nested"" : { ""x"" : ""value6"" } + } + ] + }"; + } + + public LowLevelResponseTypes() + { + var connection = new InMemoryConnection(Response().Utf8Bytes()); + this.Client = new ElasticClient(new ConnectionSettings(connection).ApplyDomainSettings()); + } + + private ElasticClient Client { get; } + + + [U] public void DynamicResponse() + { + /**[float] + * === DynamicResponse + * + */ + + var response = Client.LowLevel.Search(PostData.Empty); + + response.Get("object.first").Should() + .NotBeEmpty() + .And.Be("value1"); + + response.Get("object._arbitrary_key_").Should() + .NotBeEmpty() + .And.Be("value1"); + + response.Get("array.1").Should().Be(2); + response.Get("array.1").Should().Be(2); + + response.Get("array_of_objects.1.second").Should() + .NotBeEmpty() + .And.Be("value22"); + + response.Get("array_of_objects.1.complex\\.nested.x").Should() + .NotBeEmpty() + .And.Be("value6"); + + } + + } +} From 594d8a60108c5ede64922cd01741685528757893 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Mon, 16 Sep 2019 16:22:08 +0200 Subject: [PATCH 33/85] support _arbitrary_key_ --- .../Responses/Dynamic/DynamicDictionary.cs | 13 ++++++++++++- .../Responses/Dynamic/DynamicValue.cs | 11 ++++------- src/Tests/Tests.YamlRunner/TestsLocator.fs | 2 +- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs b/src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs index b4658cce92e..11e93b82b21 100644 --- a/src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs +++ b/src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs @@ -57,7 +57,10 @@ public bool IsReadOnly /// /// Traverses data using path notation. /// e.g some.deep.nested.json.path + /// /// A special lookup is available for ANY key _arbitrary_key_ e.g some.deep._arbitrary_key_.json.path which will traverse into the first key + /// If _arbitrary_key_ is the last value it will return the key name + /// /// /// path into the stored object, keys are separated with a dot and the last key is returned as T /// @@ -74,7 +77,15 @@ public T Get(string path) while (queue.Count > 0) { var key = queue.Dequeue().Replace(@"\.", "."); - if (key == "_arbitrary_key_") d = d[0]; + if (key == "_arbitrary_key_") + { + if (queue.Count > 0) d = d[0]; + else + { + var v = d?.ToDictionary()?.Keys?.FirstOrDefault(); + d = v != null ? new DynamicValue(v) : DynamicValue.NullValue; + } + } else if (int.TryParse(key, out var i)) d = d[i]; else d = d[key]; } diff --git a/src/Elasticsearch.Net/Responses/Dynamic/DynamicValue.cs b/src/Elasticsearch.Net/Responses/Dynamic/DynamicValue.cs index b580a4fe141..053013da587 100644 --- a/src/Elasticsearch.Net/Responses/Dynamic/DynamicValue.cs +++ b/src/Elasticsearch.Net/Responses/Dynamic/DynamicValue.cs @@ -483,25 +483,22 @@ private static object GetDynamicMember(object obj, string memberName) try { if (_value.GetType().IsAssignableFrom(typeof(T))) - { return (T)_value; - } - var type = typeof(T); - var stringValue = _value as string; + if (type == typeof(DateTime)) { - DateTime result; - - if (DateTime.TryParse(stringValue, CultureInfo.InvariantCulture, DateTimeStyles.None, out result)) + if (DateTime.TryParse(stringValue, CultureInfo.InvariantCulture, DateTimeStyles.None, out var result)) { return (T)(object)result; } } else if (stringValue != null) { + if (type == typeof(object)) return (T)Convert.ChangeType(_value, type); + var converter = TypeDescriptor.GetConverter(type); if (converter.IsValid(stringValue)) return (T)converter.ConvertFromInvariantString(stringValue); } diff --git a/src/Tests/Tests.YamlRunner/TestsLocator.fs b/src/Tests/Tests.YamlRunner/TestsLocator.fs index 772e660d4bf..844d3e22622 100644 --- a/src/Tests/Tests.YamlRunner/TestsLocator.fs +++ b/src/Tests/Tests.YamlRunner/TestsLocator.fs @@ -28,7 +28,7 @@ let ListFolderFiles namedSuite revision folder = async { doc.CssSelect("td.content a.js-navigation-open") |> List.map(fun a -> a.InnerText()) |> List.filter(fun f -> f.EndsWith(".yml")) - |> List.filter(fun f -> f = "80_cas.yml") + //|> List.filter(fun f -> f = "30_copy_settings.yml") |> List.map fileUrl return yamlFiles } From 56ae142f7f967386e8cb964004131349008ba329 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Thu, 19 Sep 2019 22:16:40 +0200 Subject: [PATCH 34/85] more assertions --- .../NameValueCollectionExtensions.cs | 14 +- .../Responses/Dynamic/DynamicValue.cs | 17 +-- src/Tests/Tests.YamlRunner/Models.fs | 106 +++++++++++--- .../Tests.YamlRunner/OperationExecutor.fs | 130 +++++++++++++++--- src/Tests/Tests.YamlRunner/Stashes.fs | 19 ++- src/Tests/Tests.YamlRunner/TestsLocator.fs | 3 +- src/Tests/Tests.YamlRunner/TestsReader.fs | 19 +-- src/Tests/Tests.YamlRunner/TestsRunner.fs | 13 +- 8 files changed, 250 insertions(+), 71 deletions(-) diff --git a/src/Elasticsearch.Net/Extensions/NameValueCollectionExtensions.cs b/src/Elasticsearch.Net/Extensions/NameValueCollectionExtensions.cs index 3421a43c507..d2498a748e3 100644 --- a/src/Elasticsearch.Net/Extensions/NameValueCollectionExtensions.cs +++ b/src/Elasticsearch.Net/Extensions/NameValueCollectionExtensions.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; -namespace Elasticsearch.Net.Extensions +namespace Elasticsearch.Net.Extensions { internal static class NameValueCollectionExtensions { @@ -21,8 +21,12 @@ internal static string ToQueryString(this NameValueCollection nv) var key = nv.AllKeys[i]; builder.Append(Uri.EscapeDataString(key)); - builder.Append("="); - builder.Append(Uri.EscapeDataString(nv[key])); + var value = nv[key]; + if (!value.IsNullOrEmpty()) + { + builder.Append("="); + builder.Append(Uri.EscapeDataString(nv[key])); + } } return builder.ToString(); @@ -43,11 +47,11 @@ ElasticsearchUrlFormatter provider continue; } var resolved = provider.CreateString(kv.Value); - if (!resolved.IsNullOrEmpty()) + if (resolved != null) queryString[kv.Key] = resolved; else queryString.Remove(kv.Key); } } } -} \ No newline at end of file +} diff --git a/src/Elasticsearch.Net/Responses/Dynamic/DynamicValue.cs b/src/Elasticsearch.Net/Responses/Dynamic/DynamicValue.cs index 053013da587..72f40452226 100644 --- a/src/Elasticsearch.Net/Responses/Dynamic/DynamicValue.cs +++ b/src/Elasticsearch.Net/Responses/Dynamic/DynamicValue.cs @@ -410,28 +410,24 @@ private bool Dispatch(out object result, string name) return true; } - var d = Value as IDictionary; - object r; - if (d != null && d.TryGetValue(name, out r)) + if (Value is IDictionary d) { - result = SelfOrNew(r); + result = d.TryGetValue(name, out var r) ? SelfOrNew(r) : NullValue; return true; } - var x = Value as IDynamicMetaObjectProvider; - if (x != null) + if (Value is IDynamicMetaObjectProvider x) { var dm = GetDynamicMember(Value, name); result = SelfOrNew(dm); return true; } - var ds = Value as IDictionary; - if (ds != null && ds.Contains(name)) + if (Value is IDictionary ds) { - result = SelfOrNew(ds[name]); + result = ds.Contains(name) ? SelfOrNew(ds[name]) : NullValue; return true; } - result = SelfOrNew(Value); + result = NullValue; return true; } @@ -507,6 +503,7 @@ private static object GetDynamicMember(object obj, string memberName) return (T)Convert.ChangeType(_value, TypeCode.String, CultureInfo.InvariantCulture); } else if (_value.GetType().IsValueType) return (T)Convert.ChangeType(_value, type); + else if (type == typeof(object)) return (T)_value; } catch { diff --git a/src/Tests/Tests.YamlRunner/Models.fs b/src/Tests/Tests.YamlRunner/Models.fs index e1cb2ea05a0..fc6adda3ca2 100644 --- a/src/Tests/Tests.YamlRunner/Models.fs +++ b/src/Tests/Tests.YamlRunner/Models.fs @@ -2,9 +2,16 @@ module Tests.YamlRunner.Models open System open System.Collections.Generic +open System.Text.RegularExpressions +open Microsoft.FSharp.Reflection + +let private getName a = match FSharpValue.GetUnionFields(a, a.GetType()) with | (case, _) -> case.Name type TestSuite = OpenSource | XPack +type YamlMap = Dictionary +type YamlValue = YamlDictionary of YamlMap | YamlString of string + type DoCatch = | BadRequest // bad_request, 400 response from ES | Unauthorized //unauthorized a 401 response from ES @@ -15,7 +22,7 @@ type DoCatch = | Unavailable//unavailable a 503 response from ES | UnknownParameter //param a client-side error indicating an unknown parameter has been passed to the method | OtherBadResponse //request 4xx-5xx error response from ES, not equal to any named response above - | Regex // /foo bar/ the text of the error message matches this regular expression + | CatchRegex // /foo bar/ the text of the error message matches this regular expression let (|IsDoCatch|_|) (s:string) = match s with @@ -28,7 +35,7 @@ let (|IsDoCatch|_|) (s:string) = | "unavailable" -> Some Unavailable | "param" -> Some UnknownParameter | "request" -> Some OtherBadResponse - | "regex" -> Some Regex + | "regex" -> Some CatchRegex | _ -> None type NodeSelector = @@ -38,34 +45,64 @@ type NodeSelector = type ResponseProperty = ResponseProperty of string -type StashedId = private StashedId of string - // TODO handle $ when already on s - with - static member Create (s:String) = - match s with - | s when s.StartsWith "$" -> StashedId s - | s -> StashedId <| sprintf "$%s" s - static member Body = StashedId.Create "body" +type StashedId = private StashedId of string with + static member Create (s:String) = + match s with + | s when s.StartsWith "$" -> StashedId s + | s -> StashedId <| sprintf "$%s" s + static member Body = StashedId.Create "body" + member this.Log = match this with | StashedId s -> s + +type SetTransformation = private SetTransformation of string with + static member Create s = SetTransformation <| sprintf "$%s" s + member this.Log = match this with | SetTransformation s -> s -type SetTransformation = private SetTransformation of string - with static member Create s = SetTransformation <| sprintf "$%s" s -type AssertPath = AssertPath of string +type AssertOn = private ResponsePath of string | WholeResponse with + static member Create s = + match s with + | null | "" -> WholeResponse + | s -> ResponsePath s + member this.Name = getName this + member this.Log = match this with | ResponsePath p -> p | WholeResponse -> "WholeResponse" + +let (|ResponsePath|WholeResponse|) input = + match input with + | ResponsePath str -> ResponsePath str + | WholeResponse -> WholeResponse type Set = Map type TransformAndSet = Map -type Match = Map -type NumericValue = Fixed of double | StashedId of StashedId -type NumericMatch = Map +type RegexAssertion = { Regex:Regex } +type AssertValue = + Id of StashedId | Value of Object | RegexAssertion of RegexAssertion + with + static member FromObject (s:Object) = + match s with + | :? String as id when id.StartsWith "$" -> Id <| StashedId.Create id + | :? String as regex when regex.StartsWith "/" -> + let expression = Regex.Replace(regex, @"(^[\s\r\n]*?\/|\/[\s\r\n]*?$)", ""); + let opts = RegexOptions.IgnorePatternWhitespace + RegexAssertion { Regex = new Regex(expression, opts) } + | s -> Value s + +type NumericValue = NumericId of StashedId | Long of int64 | Double of double with + member this.Name = getName this + override this.ToString() = + match this with + | Long i -> sprintf "%i" i + | Double d -> sprintf "%f" d + | NumericId id -> sprintf "%s" id.Log + +type Match = Map +type NumericMatch = Map -type YamlMap = Dictionary -type YamlValue = YamlDictionary of YamlMap | YamlString of string - type Do = { ApiCall: string * YamlMap Catch:DoCatch option Warnings:option NodeSelector:NodeSelector option } + with member this.Log () = sprintf "Api %s" <| fst this.ApiCall type Feature = | CatchUnauthorized // "catch_unauthorized", @@ -101,6 +138,7 @@ let (|ToFeature|) (s:string) = | s -> Unsupported s type Skip = { Version:string option; Reason:string option; Features: Feature list option } + with member this.Log = sprintf "Version %A Features:%A Reason: %A" this.Version this.Features this.Reason type NumericAssert = | LowerThan @@ -109,6 +147,7 @@ type NumericAssert = | LowerThanOrEqual | Equal | Length + with member this.Name = getName this let (|IsNumericAssert|_|) (s:string) = match s with @@ -121,10 +160,23 @@ let (|IsNumericAssert|_|) (s:string) = | _ -> None type Assert = - | IsTrue of AssertPath - | IsFalse of AssertPath + | IsTrue of AssertOn + | IsFalse of AssertOn | Match of Match | NumericAssert of NumericAssert * NumericMatch + with + member this.Name = getName this + member this.Log () = + match this with + | IsTrue s -> sprintf "%s %s" this.Name s.Log + | IsFalse s -> sprintf "%s %s" this.Name s.Log + | Match s -> + sprintf "%s %s" this.Name (s |> Seq.map (fun k -> sprintf "%s %20A" k.Key.Log k.Value) |> String.concat " ") + | NumericAssert (a, m) -> + sprintf "%s %s %s" + this.Name + a.Name + (m |> Seq.map (fun k -> sprintf "%s %A" k.Key.Log k.Value.Name) |> String.concat " ") type Operation = | Unknown of string @@ -133,6 +185,18 @@ type Operation = | Set of Set | TransformAndSet of TransformAndSet | Assert of Assert + with + member this.Name = getName this + member this.Log () = + match this with + | Assert s -> sprintf "%s operation %s" this.Name (s.Log()) + | Do s -> sprintf "%s operation %s" "Do" (s.Log()) + | Unknown s -> sprintf "%s operation %s" this.Name s + | Skip s -> sprintf "%s operation %s" this.Name s.Log + | Set s -> + sprintf "%s operation %s" this.Name (s |> Seq.map (fun k -> sprintf "%A %A" k.Key k.Value) |> String.concat " ") + | TransformAndSet s -> + sprintf "%s operation %s" this.Name (s |> Seq.map (fun k -> sprintf "%A %A" k.Key k.Value) |> String.concat " ") let (|IsOperation|_|) (s:string) = match s with diff --git a/src/Tests/Tests.YamlRunner/OperationExecutor.fs b/src/Tests/Tests.YamlRunner/OperationExecutor.fs index 9c18393152d..ecc586b7d2f 100644 --- a/src/Tests/Tests.YamlRunner/OperationExecutor.fs +++ b/src/Tests/Tests.YamlRunner/OperationExecutor.fs @@ -2,11 +2,17 @@ module Tests.YamlRunner.OperationExecutor open System open System.IO +open Microsoft.FSharp.Reflection open Tests.YamlRunner.DoMapper open Tests.YamlRunner.Models open Tests.YamlRunner.Stashes open ShellProgressBar open Elasticsearch.Net +open Legivel.Customization.Mapping +open Newtonsoft.Json +open Newtonsoft.Json.Linq +open System.Text +open System.Collections.Generic type ExecutionContext = { Suite: TestSuite @@ -19,17 +25,29 @@ type ExecutionContext = { } with member __.Throw message = failwithf "%s" message -type ExecutionResult = -| Succeeded of ExecutionContext -| Skipped of ExecutionContext -| Failed of ExecutionContext +type Fail = SeenException of ExecutionContext * Exception | ValidationFailure of ExecutionContext * string + with + member this.Context = match this with | SeenException (c, _) -> c | ValidationFailure (c, _) -> c + member this.Log () = + match this with + | SeenException (_, e) -> sprintf "Exception: %O" e + | ValidationFailure (_, r) -> sprintf "Reason: %s" r + static member private FormatFailure op fmt = ValidationFailure (op, sprintf "%s" fmt) + static member Create op fmt = Printf.kprintf (fun x -> Fail.FormatFailure op x) fmt +type ExecutionResult = + | Succeeded of ExecutionContext + | Skipped of ExecutionContext + | Failed of Fail + with + member this.Name = match FSharpValue.GetUnionFields(this, this.GetType()) with | (case, _) -> case.Name + member this.Context = match this with | Succeeded c -> c | Skipped c -> c | Failed f -> f.Context let Set op s (progress:IProgressBar) = let v (prop:ResponseProperty) id = let stashes = op.Stashes let (ResponseProperty prop) = prop - match stashes.Response with + match stashes.ResponseOption with | Some r -> let v = stashes.GetResponseValue progress prop stashes.[id] <- v @@ -37,8 +55,7 @@ let Set op s (progress:IProgressBar) = Succeeded op | None -> progress.WriteLine <| sprintf "%A %s NOT FOUND" id prop - failwithf "Attempted to look up %s but no response was set prior" prop - Failed op + Failed <| Fail.Create op "Attempted to look up %s but no response was set prior" prop let responses = s |> Map.map v Succeeded op @@ -52,12 +69,14 @@ let Do op d progress = async { let invoke = lookup data let resolvedData = stashes.Resolve progress data let! r = Async.AwaitTask <| invoke.Invoke resolvedData - match r.ApiCall.ResponseMimeType with - //json - | RequestData.MimeType -> ignore() + + let responseMimeType = r.ApiCall.ResponseMimeType + match responseMimeType with + | RequestData.MimeType -> ignore() //json // not json set $body to the response body string | _ -> op.Stashes.[StashedId.Body] <- r.Get("body") - op.Stashes.Response <- Some r + + op.Stashes.ResponseOption <- Some r //progress.WriteLine <| sprintf "%s %s" (r.ApiCall.HttpMethod.ToString()) (r.Uri.PathAndQuery) return Succeeded op @@ -66,21 +85,100 @@ let Do op d progress = async { match d.Catch with | Some UnknownParameter -> return Succeeded op | _ -> - printfn "%s %O" e d.Catch - return Failed op + return Failed <| Fail.Create op "%s %O" e d.Catch else printfn "%s: %b" name found - return Failed op + return Failed <| Fail.Create op "Api: %s not found on client" name } -let Execute (op:ExecutionContext) (progress:IProgressBar) = async { +///The specified key exists and has a true value (ie not 0, false, undefined, null or the empty string) +let IsTrue op (t:AssertOn) progress = let stashes = op.Stashes + match t with + | ResponsePath p -> + let v = stashes.GetResponseValue progress p :> Object + match v with + | null -> Failed <| Fail.Create op "resolved to null" + | :? string as s when String.IsNullOrEmpty s -> Failed <| Fail.Create op "string is null or empty" + | :? bool as s when not s -> Failed <| Fail.Create op "returned bool is false" + | :? int as s when s = 0 -> Failed <| Fail.Create op "int equals 0" + | :? int64 as s when s = 0L -> Failed <| Fail.Create op "long equals 0" + | _ -> Succeeded op + | WholeResponse -> + let r = stashes.Response() + match r.HttpMethod, r.ApiCall.Success, r.Dictionary with + | (HttpMethod.HEAD, true, _) -> Succeeded op + | (HttpMethod.HEAD, false, _) -> Failed <| Fail.Create op "HEAD request not successful" + | (_,_, b) when b = null -> Failed <| Fail.Create op "no body was returned" + | _ -> Succeeded op + +let IsFalse op (t:AssertOn) progress = + let isTrue = IsTrue op t progress + match isTrue with + | Skipped op -> Skipped op + | Failed f -> Succeeded f.Context + | Succeeded op -> + Failed <| Fail.Create op "Expected is_false but got is_true behavior" + +let IsMatch op (m:Match) progress = + let stashes = op.Stashes + let isMatch expected actual = + let toJtoken (t:Object) = + match t with + | null -> new JValue(t) :> JToken + | :? Dictionary as d -> JObject.FromObject(d) :> JToken + | _ -> JToken.FromObject t + let expected = toJtoken expected + let actual = toJtoken actual + match JToken.DeepEquals (expected, actual) with + | false -> + let a = actual.ToString(Formatting.None) + let e = expected.ToString(Formatting.None) + Failed <| Fail.Create op "expected: %s actual: %s" e a + | _ -> Succeeded op + let asserts = + m + |> Seq.map (fun kv -> + let assertOn, assertValue = (kv.Key, kv.Value) + match assertOn with + | ResponsePath path -> + let responseValue = stashes.GetResponseValue progress path :> Object + match assertValue with + | Value o -> + isMatch o responseValue + | Id id -> + let found, expected = stashes.TryGetValue id + match found with + | true -> isMatch expected responseValue + | false -> Failed <| Fail.Create op "%A not stashed at this point" id + | RegexAssertion re -> + let body = responseValue.ToString() + let matched = re.Regex.IsMatch(body) + match matched with + | true -> Succeeded op + | false -> Failed <| Fail.Create op "regex did not match body %s" body + | WholeResponse -> + Failed <| Fail.Create op "Can not call match on whole parsed response ('')" + ) + |> Seq.sortBy (fun ex -> match ex with | Succeeded o -> 3 | Skipped o -> 2 | Failed o -> 1) + |> Seq.toList + + asserts |> Seq.head + +let Execute (op:ExecutionContext) (progress:IProgressBar) = async { match op.Operation with | Unknown u -> return Skipped op | Skip s -> return Skipped op | Do d -> return! Do op d progress | Set s -> return Set op s progress | TransformAndSet ts -> return Skipped op - | Assert a -> return Skipped op + | Assert a -> + return + match a with + | IsTrue t -> IsTrue op t progress + | IsFalse t -> IsFalse op t progress + | Match m -> IsMatch op m progress + | NumericAssert (a, m) -> Skipped op + } diff --git a/src/Tests/Tests.YamlRunner/Stashes.fs b/src/Tests/Tests.YamlRunner/Stashes.fs index 65f216c5787..669b088b33b 100644 --- a/src/Tests/Tests.YamlRunner/Stashes.fs +++ b/src/Tests/Tests.YamlRunner/Stashes.fs @@ -12,17 +12,24 @@ open ShellProgressBar type Stashes() = inherit Dictionary() - member val Response:DynamicResponse option = None with get, set + member val ResponseOption:DynamicResponse option = None with get, set + member private this.LazyResponse = lazy(this.ResponseOption.Value) + member this.Response () = this.LazyResponse.Force() - member this.Dictionary = lazy(this.Response.Value) - - member this.GetResponseValue (progress:IProgressBar) (path:String) = + member this.ResolvePath (progress:IProgressBar) (path:String) = let r = this.ResolveToken progress let tokens = path.Split('.') |> Seq.map r - let path = String.Join('.', tokens) - this.Dictionary.Force().Get path + String.Join('.', tokens) + + member this.GetResponseValue (progress:IProgressBar) (path:String) = + let g = this.Response().Get + match path with + | "$body" -> g "body" + | _ -> + let path = this.ResolvePath progress path + g path member this.Resolve (progress:IProgressBar) (object:YamlMap) = let rec resolve (o:Object) : Object = diff --git a/src/Tests/Tests.YamlRunner/TestsLocator.fs b/src/Tests/Tests.YamlRunner/TestsLocator.fs index 844d3e22622..7890549d1c7 100644 --- a/src/Tests/Tests.YamlRunner/TestsLocator.fs +++ b/src/Tests/Tests.YamlRunner/TestsLocator.fs @@ -16,6 +16,7 @@ let ListFolders namedSuite revision = async { doc.CssSelect("td.content a.js-navigation-open") |> List.map (fun a -> a.InnerText()) |> List.filter (fun f -> not <| f.StartsWith("cluster")) + //|> List.filter (fun f -> f = "delete") |> List.filter (fun f -> not <| f.EndsWith(".asciidoc")) } @@ -28,7 +29,7 @@ let ListFolderFiles namedSuite revision folder = async { doc.CssSelect("td.content a.js-navigation-open") |> List.map(fun a -> a.InnerText()) |> List.filter(fun f -> f.EndsWith(".yml")) - //|> List.filter(fun f -> f = "30_copy_settings.yml") + //|> List.filter(fun f -> f = "51_refresh_with_types.yml") |> List.map fileUrl return yamlFiles } diff --git a/src/Tests/Tests.YamlRunner/TestsReader.fs b/src/Tests/Tests.YamlRunner/TestsReader.fs index e9de8e6a8cc..1600919187a 100644 --- a/src/Tests/Tests.YamlRunner/TestsReader.fs +++ b/src/Tests/Tests.YamlRunner/TestsReader.fs @@ -7,6 +7,7 @@ open System.Linq open System.IO open Tests.YamlRunner.Models +open Tests.YamlRunner.Models open Tests.YamlRunner.TestsLocator @@ -59,20 +60,20 @@ let private mapNumericAssert (operation:YamlMap) = |> Seq.map (fun (kv) -> let v = match kv.Value with - | :? int32 as i -> Fixed <| Convert.ToDouble i - | :? int64 as i -> Fixed <| Convert.ToDouble i - | :? double as i -> Fixed <| Convert.ToDouble i - | :? string as i -> StashedId <| StashedId.Create i + | :? int32 as i -> Long <| Convert.ToInt64 i + | :? int64 as i -> Long i + | :? double as i -> Double <| Convert.ToDouble i + | :? string as i -> NumericId <| StashedId.Create i | _ -> failwithf "unsupported %s" (kv.Value.GetType().Name) - AssertPath (kv.Key :?> string), v + AssertOn.Create (kv.Key :?> string), v ) |> Map.ofSeq -let private firstValueAsPath (operation:YamlMap) = AssertPath (operation.Values.First() :?> string) +let private firstValueAsPath (operation:YamlMap) = AssertOn.Create (operation.Values.First() :?> string) let private mapMatch (operation:YamlMap) = operation - |> Seq.map (fun (kv) -> AssertPath (kv.Key :?> string), kv.Value) + |> Seq.map (fun (kv) -> AssertOn.Create(kv.Key :?> string), AssertValue.FromObject kv.Value) |> Map.ofSeq let private mapTransformAndSet (operation:YamlMap) = @@ -142,8 +143,8 @@ let private mapOperation (operation:YamlMap) = | ("match", YamlDictionary map) -> Assert <| Match (mapMatch map) | ("is_false", YamlDictionary map) -> Assert <| IsFalse (firstValueAsPath map) | ("is_true", YamlDictionary map) -> Assert <| IsTrue (firstValueAsPath map) - | ("is_false", YamlString str) -> Assert <| IsFalse (AssertPath str) - | ("is_true", YamlString str) -> Assert <| IsTrue (AssertPath str) + | ("is_false", YamlString str) -> Assert <| IsFalse (AssertOn.Create str) + | ("is_true", YamlString str) -> Assert <| IsTrue (AssertOn.Create str) | (IsNumericAssert n, YamlDictionary map) -> Assert <| NumericAssert (n, mapNumericAssert map) | (k, v) -> failwithf "%s does not support %s" k (v.GetType().Name) | unknownOperation -> Unknown unknownOperation diff --git a/src/Tests/Tests.YamlRunner/TestsRunner.fs b/src/Tests/Tests.YamlRunner/TestsRunner.fs index 20884e4cd12..e9d079abab5 100644 --- a/src/Tests/Tests.YamlRunner/TestsRunner.fs +++ b/src/Tests/Tests.YamlRunner/TestsRunner.fs @@ -20,7 +20,13 @@ let RunOperation file section operation nth stashes (progress:IProgressBar) = as Operation= operation Stashes = stashes } - return! OperationExecutor.Execute executionContext progress + let! pass = OperationExecutor.Execute executionContext progress + match pass with + | Failed f -> + let c = pass.Context + progress.WriteLine <| sprintf "%s %s %s: %s %s" pass.Name c.Folder.Name c.File.Name (operation.Log()) (f.Log()) + | _ -> ignore() + return pass } let private createOperations m file (ops:Operations) progress = @@ -92,10 +98,11 @@ let RunTestsInFolder (progress:IProgressBar) (barOptions:ProgressBarOptions) mai progress.Tick(message) let message = sprintf "Inspecting file for sections" use p = progress.Spawn(0, message, barOptions) - let! result = RunTestFile p document let x = DoMapper.Client.Indices.Delete("*") - let x = DoMapper.Client.Indices.DeleteTemplateForAll("*") + let x = DoMapper.Client.Indices.DeleteTemplateForAll("*") + + let! result = RunTestFile p document return result } From ae4bd8ae76c5474cf3a3e6cac8e788fe4b4ac88e Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Fri, 20 Sep 2019 14:15:01 +0200 Subject: [PATCH 35/85] more assertions --- .../Responses/Dynamic/DynamicDictionary.cs | 6 ++++ src/Tests/Tests.YamlRunner/Commands.fs | 6 ++-- .../Tests.YamlRunner/OperationExecutor.fs | 26 +++++++++++----- src/Tests/Tests.YamlRunner/Program.fs | 30 +++++-------------- src/Tests/Tests.YamlRunner/TestsLocator.fs | 14 +++++---- src/Tests/Tests.YamlRunner/TestsReader.fs | 1 - 6 files changed, 44 insertions(+), 39 deletions(-) diff --git a/src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs b/src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs index 11e93b82b21..2e2753d7387 100644 --- a/src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs +++ b/src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs @@ -37,6 +37,12 @@ public int Count get { return _backingDictionary.Count; } } + /// + /// Create a regular dictionary as shallow copy + /// + /// + public Dictionary ToDictionary() => _backingDictionary.ToDictionary(kv => kv.Key, kv => kv.Value.Value); + /// /// Returns an empty dynamic dictionary. /// diff --git a/src/Tests/Tests.YamlRunner/Commands.fs b/src/Tests/Tests.YamlRunner/Commands.fs index e36c21d11b6..84bee1b2a7d 100644 --- a/src/Tests/Tests.YamlRunner/Commands.fs +++ b/src/Tests/Tests.YamlRunner/Commands.fs @@ -17,13 +17,13 @@ let private barOptions = let private subBarOptions = ProgressBarOptions(ForegroundColor = ConsoleColor.Yellow, ForegroundColorDone = Nullable ConsoleColor.DarkGreen, ProgressCharacter = '─') -let LocateTests namedSuite revision = async { - let! folders = TestsLocator.ListFolders namedSuite revision +let LocateTests namedSuite revision directoryFilter fileFilter = async { + let! folders = TestsLocator.ListFolders namedSuite revision directoryFilter let l = folders.Length use progress = new ProgressBar(l, sprintf "Listing %i folders" l, barOptions) let folderDownloads = folders - |> Seq.map(fun folder -> TestsLocator.DownloadTestsInFolder folder namedSuite revision progress subBarOptions) + |> Seq.map(fun folder -> TestsLocator.DownloadTestsInFolder folder fileFilter namedSuite revision progress subBarOptions) let! completed = Async.ForEachAsync 4 folderDownloads return completed } diff --git a/src/Tests/Tests.YamlRunner/OperationExecutor.fs b/src/Tests/Tests.YamlRunner/OperationExecutor.fs index ecc586b7d2f..00b13d683f5 100644 --- a/src/Tests/Tests.YamlRunner/OperationExecutor.fs +++ b/src/Tests/Tests.YamlRunner/OperationExecutor.fs @@ -8,10 +8,8 @@ open Tests.YamlRunner.Models open Tests.YamlRunner.Stashes open ShellProgressBar open Elasticsearch.Net -open Legivel.Customization.Mapping open Newtonsoft.Json open Newtonsoft.Json.Linq -open System.Text open System.Collections.Generic type ExecutionContext = { @@ -51,10 +49,9 @@ let Set op s (progress:IProgressBar) = | Some r -> let v = stashes.GetResponseValue progress prop stashes.[id] <- v - progress.WriteLine <| sprintf "%A %s %O" id prop v + //progress.WriteLine <| sprintf "%A %s %O" id prop v Succeeded op | None -> - progress.WriteLine <| sprintf "%A %s NOT FOUND" id prop Failed <| Fail.Create op "Attempted to look up %s but no response was set prior" prop let responses = s |> Map.map v @@ -88,7 +85,6 @@ let Do op d progress = async { return Failed <| Fail.Create op "%s %O" e d.Catch else - printfn "%s: %b" name found return Failed <| Fail.Create op "Api: %s not found on client" name } @@ -123,12 +119,18 @@ let IsFalse op (t:AssertOn) progress = let IsMatch op (m:Match) progress = let stashes = op.Stashes - let isMatch expected actual = + let isMatch expected actual = let toJtoken (t:Object) = match t with | null -> new JValue(t) :> JToken + // yaml test framework often compares ints with doubles, does not validate + // actual numeric types returned + | :? int + | :? int64 -> new JValue(Convert.ToDouble(t)) :> JToken | :? Dictionary as d -> JObject.FromObject(d) :> JToken + | :? IDictionary as d -> JObject.FromObject(d) :> JToken | _ -> JToken.FromObject t + let expected = toJtoken expected let actual = toJtoken actual match JToken.DeepEquals (expected, actual) with @@ -137,6 +139,7 @@ let IsMatch op (m:Match) progress = let e = expected.ToString(Formatting.None) Failed <| Fail.Create op "expected: %s actual: %s" e a | _ -> Succeeded op + let asserts = m |> Seq.map (fun kv -> @@ -159,7 +162,16 @@ let IsMatch op (m:Match) progress = | true -> Succeeded op | false -> Failed <| Fail.Create op "regex did not match body %s" body | WholeResponse -> - Failed <| Fail.Create op "Can not call match on whole parsed response ('')" + let response = stashes.Response().Dictionary.ToDictionary() + match assertValue with + | Value o -> isMatch o response + | Id id -> + let found, expected = stashes.TryGetValue id + match found with + | true -> isMatch expected response + | false -> Failed <| Fail.Create op "%A not stashed at this point" id + | RegexAssertion re -> + Failed <| Fail.Create op "regex can no t be called on the parsed body ('')" ) |> Seq.sortBy (fun ex -> match ex with | Succeeded o -> 3 | Skipped o -> 2 | Failed o -> 1) |> Seq.toList diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index 83a7e52b1e8..5fb2ca62c01 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -1,50 +1,34 @@ module Tests.YamlRunner.Main open Argu -open Elasticsearch.Net open Tests.YamlRunner open Tests.YamlRunner.Models -open Tests.YamlRunner.TestsReader -open Tests.YamlRunner.TestsLocator type Arguments = | [] NamedSuite of TestSuite | []Revision of string + | []Directory of string + | []File of string with interface IArgParserTemplate with member s.Usage = match s with | NamedSuite _ -> "specify a known yaml test suite. defaults to `opensource`." | Revision _ -> "The git revision to reference (commit/branch/tag). defaults to `master`" + | Directory _ -> "Only run tests in this folder" + | File _ -> "Only run tests starting with this filename" let runMain (parsed:ParseResults) = async { let namedSuite = parsed.TryGetResult NamedSuite |> Option.defaultValue OpenSource let revision = parsed.TryGetResult Revision |> Option.defaultValue "master" + let directory = parsed.TryGetResult Directory |> Option.defaultValue "get_source" |> Some + let file = parsed.TryGetResult File //|> Option.defaultValue "10_basic.yml" |> Some - -// let test = TestsLocator.TestLocalFile "/tmp/elastic/tests-master/bulk/60_deprecated.yml" -// let read = TestsReader.ReadYamlFile test - - - - let! locateResults = Commands.LocateTests namedSuite revision + let! locateResults = Commands.LocateTests namedSuite revision directory file let readResults = Commands.ReadTests locateResults let! runTesults = Commands.RunTests readResults -// -// printfn "folders: %O" locateResults.Length -// for folder in locateResults do -// printfn "folder: %O" folder.Folder -// for p in folder.Paths do -// printfn " %s" p.File - -// printfn "folders: %O" locateResults.Length -// for folder in readResults do -// printfn "folder: %O" folder.Folder -// for f in folder.Files do -// for t in f.Tests do -// printfn " %s (%i steps)" t.Name t.Operations.Length return 0 } diff --git a/src/Tests/Tests.YamlRunner/TestsLocator.fs b/src/Tests/Tests.YamlRunner/TestsLocator.fs index 7890549d1c7..ed658f1739a 100644 --- a/src/Tests/Tests.YamlRunner/TestsLocator.fs +++ b/src/Tests/Tests.YamlRunner/TestsLocator.fs @@ -1,13 +1,15 @@ module Tests.YamlRunner.TestsLocator open System +open System.Globalization +open System.IO open System.Threading open FSharp.Data open Tests.YamlRunner.AsyncExtensions open ShellProgressBar open Tests.YamlRunner -let ListFolders namedSuite revision = async { +let ListFolders namedSuite revision directory = async { let url = TestsDownloader.TestGithubRootUrl namedSuite revision let! (_, html) = TestsDownloader.CachedOrDownload revision "_root_" "index.html" url let doc = HtmlDocument.Parse(html) @@ -16,11 +18,12 @@ let ListFolders namedSuite revision = async { doc.CssSelect("td.content a.js-navigation-open") |> List.map (fun a -> a.InnerText()) |> List.filter (fun f -> not <| f.StartsWith("cluster")) - //|> List.filter (fun f -> f = "delete") + |> List.filter (fun f -> not <| f.StartsWith("cat")) + |> List.filter (fun f -> match directory with | Some s -> f = s | None -> true) |> List.filter (fun f -> not <| f.EndsWith(".asciidoc")) } -let ListFolderFiles namedSuite revision folder = async { +let ListFolderFiles namedSuite revision folder fileFilter = async { let url = TestsDownloader.FolderListUrl namedSuite revision folder let! (_, html) = TestsDownloader.CachedOrDownload revision folder "index.html" url let doc = HtmlDocument.Parse(html) @@ -29,6 +32,7 @@ let ListFolderFiles namedSuite revision folder = async { doc.CssSelect("td.content a.js-navigation-open") |> List.map(fun a -> a.InnerText()) |> List.filter(fun f -> f.EndsWith(".yml")) + |> List.filter (fun f -> match fileFilter with | Some s -> f.StartsWith(s, StringComparison.OrdinalIgnoreCase) | None -> true) //|> List.filter(fun f -> f = "51_refresh_with_types.yml") |> List.map fileUrl return yamlFiles @@ -66,8 +70,8 @@ let private downloadTestsInFolder (yamlFiles:list) folder revis type LocateResults = { Folder: string; Paths: YamlFileInfo list } -let DownloadTestsInFolder folder namedSuite revision (progress: IProgressBar) subBarOptions = async { - let! token = Async.StartChild <| ListFolderFiles namedSuite revision folder +let DownloadTestsInFolder folder fileFilter namedSuite revision (progress: IProgressBar) subBarOptions = async { + let! token = Async.StartChild <| ListFolderFiles namedSuite revision folder fileFilter let! yamlFiles = token let! localFiles = async { match yamlFiles.Length with diff --git a/src/Tests/Tests.YamlRunner/TestsReader.fs b/src/Tests/Tests.YamlRunner/TestsReader.fs index 1600919187a..269f3816585 100644 --- a/src/Tests/Tests.YamlRunner/TestsReader.fs +++ b/src/Tests/Tests.YamlRunner/TestsReader.fs @@ -7,7 +7,6 @@ open System.Linq open System.IO open Tests.YamlRunner.Models -open Tests.YamlRunner.Models open Tests.YamlRunner.TestsLocator From 169ff535cd79b865f231c043c489bfce0407187c Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Fri, 20 Sep 2019 15:45:24 +0200 Subject: [PATCH 36/85] more assertions --- .../Tests.YamlRunner/OperationExecutor.fs | 62 +++++++++---------- src/Tests/Tests.YamlRunner/Program.fs | 2 +- src/Tests/Tests.YamlRunner/Stashes.fs | 1 - 3 files changed, 29 insertions(+), 36 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/OperationExecutor.fs b/src/Tests/Tests.YamlRunner/OperationExecutor.fs index 00b13d683f5..2ecac2fd496 100644 --- a/src/Tests/Tests.YamlRunner/OperationExecutor.fs +++ b/src/Tests/Tests.YamlRunner/OperationExecutor.fs @@ -49,7 +49,6 @@ let Set op s (progress:IProgressBar) = | Some r -> let v = stashes.GetResponseValue progress prop stashes.[id] <- v - //progress.WriteLine <| sprintf "%A %s %O" id prop v Succeeded op | None -> Failed <| Fail.Create op "Attempted to look up %s but no response was set prior" prop @@ -117,7 +116,7 @@ let IsFalse op (t:AssertOn) progress = | Succeeded op -> Failed <| Fail.Create op "Expected is_false but got is_true behavior" -let IsMatch op (m:Match) progress = +let IsMatch op (matchOp:Match) progress = let stashes = op.Stashes let isMatch expected actual = let toJtoken (t:Object) = @@ -139,40 +138,35 @@ let IsMatch op (m:Match) progress = let e = expected.ToString(Formatting.None) Failed <| Fail.Create op "expected: %s actual: %s" e a | _ -> Succeeded op + + let doMatch assertOn assertValue = + let value = + match assertOn with + | ResponsePath path -> stashes.GetResponseValue progress path :> Object + | WholeResponse -> stashes.Response().Dictionary.ToDictionary() :> Object - let asserts = - m - |> Seq.map (fun kv -> - let assertOn, assertValue = (kv.Key, kv.Value) + match assertValue with + | Value o -> isMatch o value + | Id id -> + let found, expected = stashes.TryGetValue id + match found with + | true -> isMatch expected value + | false -> Failed <| Fail.Create op "%A not stashed at this point" id + | RegexAssertion re -> match assertOn with - | ResponsePath path -> - let responseValue = stashes.GetResponseValue progress path :> Object - match assertValue with - | Value o -> - isMatch o responseValue - | Id id -> - let found, expected = stashes.TryGetValue id - match found with - | true -> isMatch expected responseValue - | false -> Failed <| Fail.Create op "%A not stashed at this point" id - | RegexAssertion re -> - let body = responseValue.ToString() - let matched = re.Regex.IsMatch(body) - match matched with - | true -> Succeeded op - | false -> Failed <| Fail.Create op "regex did not match body %s" body - | WholeResponse -> - let response = stashes.Response().Dictionary.ToDictionary() - match assertValue with - | Value o -> isMatch o response - | Id id -> - let found, expected = stashes.TryGetValue id - match found with - | true -> isMatch expected response - | false -> Failed <| Fail.Create op "%A not stashed at this point" id - | RegexAssertion re -> - Failed <| Fail.Create op "regex can no t be called on the parsed body ('')" - ) + | WholeResponse -> + Failed <| Fail.Create op "regex can no t be called on the parsed body ('')" + | ResponsePath _ -> + let body = value.ToString() + let matched = re.Regex.IsMatch(body) + match matched with + | true -> Succeeded op + | false -> Failed <| Fail.Create op "regex did not match body %s" body + + let asserts = + matchOp + |> Map.toList + |> Seq.map (fun (k, v) -> doMatch k v) |> Seq.sortBy (fun ex -> match ex with | Succeeded o -> 3 | Skipped o -> 2 | Failed o -> 1) |> Seq.toList diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index 5fb2ca62c01..f4437ade071 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -23,7 +23,7 @@ let runMain (parsed:ParseResults) = async { let namedSuite = parsed.TryGetResult NamedSuite |> Option.defaultValue OpenSource let revision = parsed.TryGetResult Revision |> Option.defaultValue "master" - let directory = parsed.TryGetResult Directory |> Option.defaultValue "get_source" |> Some + let directory = parsed.TryGetResult Directory |> Option.defaultValue "indices.create" |> Some let file = parsed.TryGetResult File //|> Option.defaultValue "10_basic.yml" |> Some let! locateResults = Commands.LocateTests namedSuite revision directory file diff --git a/src/Tests/Tests.YamlRunner/Stashes.fs b/src/Tests/Tests.YamlRunner/Stashes.fs index 669b088b33b..d977728ab22 100644 --- a/src/Tests/Tests.YamlRunner/Stashes.fs +++ b/src/Tests/Tests.YamlRunner/Stashes.fs @@ -57,7 +57,6 @@ type Stashes() = let s = sprintf "Expected to resolve %s but no such value was stashed at this point" s progress.WriteLine s failwith s - progress.WriteLine <| sprintf "Found %s: %O" s value value | s -> s :> Object From bd1b73296deea7c823fcdcdac67b64482a4af6d3 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 1 Oct 2019 13:28:29 +0200 Subject: [PATCH 37/85] gh workflow, some changes to allow client url to be passed on commandlie --- .github/workflows/yaml-runner.yml | 39 +++ build/scripts/scripts.fsproj | 3 + src/Tests/Tests.YamlRunner/Commands.fs | 8 +- src/Tests/Tests.YamlRunner/DoMapper.fs | 11 +- .../Tests.YamlRunner/OperationExecutor.fs | 245 +++++++++--------- src/Tests/Tests.YamlRunner/Program.fs | 46 +++- .../Tests.YamlRunner/Tests.YamlRunner.fsproj | 3 +- src/Tests/Tests.YamlRunner/TestsRunner.fs | 197 +++++++------- 8 files changed, 313 insertions(+), 239 deletions(-) create mode 100644 .github/workflows/yaml-runner.yml diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml new file mode 100644 index 00000000000..638c27f2592 --- /dev/null +++ b/.github/workflows/yaml-runner.yml @@ -0,0 +1,39 @@ +name: Yaml integration tests + +on: + push: + branches: + - spike/master/gh-actions + pull_request: + branches: + - spike/master/gh-actions + +jobs: + container-job: + runs-on: ubuntu-latest + + container: + image: mcr.microsoft.com/dotnet/core/sdk:3.0 + + services: + elasticsearch: + image: docker.elastic.co/elasticsearch/8.0.0-SNAPSHOT + env: + node.name: es1 + cluster.name: elasticsearch-gh-actions + cluster.initial_master_nodes: es1 + discovery.seed_hosts: es1 + cluster.routing.allocation.disk.threshold_enabled: false + bootstrap.memory_lock: true + node.attr.testattr: test + path.repo: tmp + repositories.url.allowed_urls: http://snapshot.test + ports: + - 9200:9200 + # needed because the postgres container does not provide a healthcheck + options: --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=10 + + steps: + - uses: actions/checkout@v1 + - run: dotnet-run -f create -e http://elasticsearch:${{ job.services.elasticsearch.ports[9200] }} + working-directory: ./src/Tests/Tests.YamlRunner diff --git a/build/scripts/scripts.fsproj b/build/scripts/scripts.fsproj index da63857208c..8f1c5182226 100644 --- a/build/scripts/scripts.fsproj +++ b/build/scripts/scripts.fsproj @@ -28,6 +28,9 @@ build.bat appveyor.yml azure-pipelines.yml + + yaml-runner.yml + diff --git a/src/Tests/Tests.YamlRunner/Commands.fs b/src/Tests/Tests.YamlRunner/Commands.fs index 84bee1b2a7d..ecbc376ddd2 100644 --- a/src/Tests/Tests.YamlRunner/Commands.fs +++ b/src/Tests/Tests.YamlRunner/Commands.fs @@ -1,11 +1,11 @@ module Tests.YamlRunner.Commands open System -open System.Threading open ShellProgressBar open Tests.YamlRunner.AsyncExtensions open Tests.YamlRunner.TestsLocator open Tests.YamlRunner.TestsReader +open Elasticsearch.Net let private barOptions = ProgressBarOptions( @@ -34,14 +34,16 @@ let ReadTests (tests:LocateResults list) = tests |> List.map (fun t -> { Folder= t.Folder; Files = readPaths t.Paths}) -let RunTests (tests:YamlTestFolder list) = async { +let RunTests (tests:YamlTestFolder list) client = async { do! Async.SwitchToNewThread() + let f = tests.Length let l = tests |> List.sumBy (fun t -> t.Files.Length) use progress = new ProgressBar(l, sprintf "Folders [0/%i]" l, barOptions) + let runner = TestRunner(client, progress, subBarOptions) let a (i, v) = async { let mainMessage = sprintf "[%i/%i] Folders : %s | " (i+1) f v.Folder - let! op = TestsRunner.RunTestsInFolder progress subBarOptions mainMessage v + let! op = runner.RunTestsInFolder mainMessage v return op |> Seq.toList } let x = diff --git a/src/Tests/Tests.YamlRunner/DoMapper.fs b/src/Tests/Tests.YamlRunner/DoMapper.fs index 0cb3cf1279e..36fae94a2d3 100644 --- a/src/Tests/Tests.YamlRunner/DoMapper.fs +++ b/src/Tests/Tests.YamlRunner/DoMapper.fs @@ -9,9 +9,8 @@ open System.IO open System.Linq open System.Linq.Expressions open System.Threading.Tasks -open Elasticsearch.Net -open Elasticsearch.Net open Tests.YamlRunner.Models +open Elasticsearch.Net type ApiInvoke = delegate of Object * Object[] -> Task @@ -163,7 +162,7 @@ let createApiLookup (invokers: FastApiInvoke list) : (YamlMap -> FastApiInvoke) lookup -let clientApiDispatch (client:IElasticLowLevelClient) = +let createDoMap (client:IElasticLowLevelClient) = let t = client.GetType() let mapsApiAttribute = t.Assembly.GetType("Elasticsearch.Net.MapsApiAttribute") @@ -181,12 +180,6 @@ let clientApiDispatch (client:IElasticLowLevelClient) = |> Map.ofList |> Map.map FastApiInvoke)>(fun k v -> createApiLookup v) -let Client = - let settings = new ConnectionConfiguration(new Uri("http://ipv4.fiddler:9200")) - let x = settings.Proxy(Uri("http://ipv4.fiddler:8080"), String(null), String(null)) - new ElasticLowLevelClient(x) -let DoMap = - clientApiDispatch Client diff --git a/src/Tests/Tests.YamlRunner/OperationExecutor.fs b/src/Tests/Tests.YamlRunner/OperationExecutor.fs index 2ecac2fd496..8607c1c1cf5 100644 --- a/src/Tests/Tests.YamlRunner/OperationExecutor.fs +++ b/src/Tests/Tests.YamlRunner/OperationExecutor.fs @@ -41,27 +41,30 @@ type ExecutionResult = member this.Name = match FSharpValue.GetUnionFields(this, this.GetType()) with | (case, _) -> case.Name member this.Context = match this with | Succeeded c -> c | Skipped c -> c | Failed f -> f.Context -let Set op s (progress:IProgressBar) = - let v (prop:ResponseProperty) id = - let stashes = op.Stashes - let (ResponseProperty prop) = prop - match stashes.ResponseOption with - | Some r -> - let v = stashes.GetResponseValue progress prop - stashes.[id] <- v - Succeeded op - | None -> - Failed <| Fail.Create op "Attempted to look up %s but no response was set prior" prop + +type OperationExecutor(client:IElasticLowLevelClient) = + + member private this.OpMap = DoMapper.createDoMap client - let responses = s |> Map.map v - Succeeded op + static member Set op s (progress:IProgressBar) = + let v (prop:ResponseProperty) id = + let stashes = op.Stashes + let (ResponseProperty prop) = prop + match stashes.ResponseOption with + | Some r -> + let v = stashes.GetResponseValue progress prop + stashes.[id] <- v + Succeeded op + | None -> + Failed <| Fail.Create op "Attempted to look up %s but no response was set prior" prop + + let responses = s |> Map.map v + Succeeded op -let Do op d progress = async { - let stashes = op.Stashes - let (name, data) = d.ApiCall - let found, lookup = DoMapper.DoMap.TryGetValue name - if found then - try + static member Do op d (lookup:YamlMap -> FastApiInvoke) progress = async { + let stashes = op.Stashes + let (_, data) = d.ApiCall + try let invoke = lookup data let resolvedData = stashes.Resolve progress data let! r = Async.AwaitTask <| invoke.Invoke resolvedData @@ -82,109 +85,113 @@ let Do op d progress = async { | Some UnknownParameter -> return Succeeded op | _ -> return Failed <| Fail.Create op "%s %O" e d.Catch - - else - return Failed <| Fail.Create op "Api: %s not found on client" name -} + + } -///The specified key exists and has a true value (ie not 0, false, undefined, null or the empty string) -let IsTrue op (t:AssertOn) progress = - let stashes = op.Stashes - match t with - | ResponsePath p -> - let v = stashes.GetResponseValue progress p :> Object - match v with - | null -> Failed <| Fail.Create op "resolved to null" - | :? string as s when String.IsNullOrEmpty s -> Failed <| Fail.Create op "string is null or empty" - | :? bool as s when not s -> Failed <| Fail.Create op "returned bool is false" - | :? int as s when s = 0 -> Failed <| Fail.Create op "int equals 0" - | :? int64 as s when s = 0L -> Failed <| Fail.Create op "long equals 0" - | _ -> Succeeded op - | WholeResponse -> - let r = stashes.Response() - match r.HttpMethod, r.ApiCall.Success, r.Dictionary with - | (HttpMethod.HEAD, true, _) -> Succeeded op - | (HttpMethod.HEAD, false, _) -> Failed <| Fail.Create op "HEAD request not successful" - | (_,_, b) when b = null -> Failed <| Fail.Create op "no body was returned" - | _ -> Succeeded op - -let IsFalse op (t:AssertOn) progress = - let isTrue = IsTrue op t progress - match isTrue with - | Skipped op -> Skipped op - | Failed f -> Succeeded f.Context - | Succeeded op -> - Failed <| Fail.Create op "Expected is_false but got is_true behavior" - -let IsMatch op (matchOp:Match) progress = - let stashes = op.Stashes - let isMatch expected actual = - let toJtoken (t:Object) = - match t with - | null -> new JValue(t) :> JToken - // yaml test framework often compares ints with doubles, does not validate - // actual numeric types returned - | :? int - | :? int64 -> new JValue(Convert.ToDouble(t)) :> JToken - | :? Dictionary as d -> JObject.FromObject(d) :> JToken - | :? IDictionary as d -> JObject.FromObject(d) :> JToken - | _ -> JToken.FromObject t + ///The specified key exists and has a true value (ie not 0, false, undefined, null or the empty string) + static member IsTrue op (t:AssertOn) progress = + let stashes = op.Stashes + match t with + | ResponsePath p -> + let v = stashes.GetResponseValue progress p :> Object + match v with + | null -> Failed <| Fail.Create op "resolved to null" + | :? string as s when String.IsNullOrEmpty s -> Failed <| Fail.Create op "string is null or empty" + | :? bool as s when not s -> Failed <| Fail.Create op "returned bool is false" + | :? int as s when s = 0 -> Failed <| Fail.Create op "int equals 0" + | :? int64 as s when s = 0L -> Failed <| Fail.Create op "long equals 0" + | _ -> Succeeded op + | WholeResponse -> + let r = stashes.Response() + match r.HttpMethod, r.ApiCall.Success, r.Dictionary with + | (HttpMethod.HEAD, true, _) -> Succeeded op + | (HttpMethod.HEAD, false, _) -> Failed <| Fail.Create op "HEAD request not successful" + | (_,_, b) when b = null -> Failed <| Fail.Create op "no body was returned" + | _ -> Succeeded op - let expected = toJtoken expected - let actual = toJtoken actual - match JToken.DeepEquals (expected, actual) with - | false -> - let a = actual.ToString(Formatting.None) - let e = expected.ToString(Formatting.None) - Failed <| Fail.Create op "expected: %s actual: %s" e a - | _ -> Succeeded op - - let doMatch assertOn assertValue = - let value = - match assertOn with - | ResponsePath path -> stashes.GetResponseValue progress path :> Object - | WholeResponse -> stashes.Response().Dictionary.ToDictionary() :> Object + static member IsFalse op (t:AssertOn) progress = + let isTrue = OperationExecutor.IsTrue op t progress + match isTrue with + | Skipped op -> Skipped op + | Failed f -> Succeeded f.Context + | Succeeded op -> + Failed <| Fail.Create op "Expected is_false but got is_true behavior" - match assertValue with - | Value o -> isMatch o value - | Id id -> - let found, expected = stashes.TryGetValue id - match found with - | true -> isMatch expected value - | false -> Failed <| Fail.Create op "%A not stashed at this point" id - | RegexAssertion re -> - match assertOn with - | WholeResponse -> - Failed <| Fail.Create op "regex can no t be called on the parsed body ('')" - | ResponsePath _ -> - let body = value.ToString() - let matched = re.Regex.IsMatch(body) - match matched with - | true -> Succeeded op - | false -> Failed <| Fail.Create op "regex did not match body %s" body + static member IsMatch op (matchOp:Match) progress = + let stashes = op.Stashes + let isMatch expected actual = + let toJtoken (t:Object) = + match t with + | null -> new JValue(t) :> JToken + // yaml test framework often compares ints with doubles, does not validate + // actual numeric types returned + | :? int + | :? int64 -> new JValue(Convert.ToDouble(t)) :> JToken + | :? Dictionary as d -> JObject.FromObject(d) :> JToken + | :? IDictionary as d -> JObject.FromObject(d) :> JToken + | _ -> JToken.FromObject t - let asserts = - matchOp - |> Map.toList - |> Seq.map (fun (k, v) -> doMatch k v) - |> Seq.sortBy (fun ex -> match ex with | Succeeded o -> 3 | Skipped o -> 2 | Failed o -> 1) - |> Seq.toList + let expected = toJtoken expected + let actual = toJtoken actual + match JToken.DeepEquals (expected, actual) with + | false -> + let a = actual.ToString(Formatting.None) + let e = expected.ToString(Formatting.None) + Failed <| Fail.Create op "expected: %s actual: %s" e a + | _ -> Succeeded op - asserts |> Seq.head + let doMatch assertOn assertValue = + let value = + match assertOn with + | ResponsePath path -> stashes.GetResponseValue progress path :> Object + | WholeResponse -> stashes.Response().Dictionary.ToDictionary() :> Object + + match assertValue with + | Value o -> isMatch o value + | Id id -> + let found, expected = stashes.TryGetValue id + match found with + | true -> isMatch expected value + | false -> Failed <| Fail.Create op "%A not stashed at this point" id + | RegexAssertion re -> + match assertOn with + | WholeResponse -> + Failed <| Fail.Create op "regex can no t be called on the parsed body ('')" + | ResponsePath _ -> + let body = value.ToString() + let matched = re.Regex.IsMatch(body) + match matched with + | true -> Succeeded op + | false -> Failed <| Fail.Create op "regex did not match body %s" body + + let asserts = + matchOp + |> Map.toList + |> Seq.map (fun (k, v) -> doMatch k v) + |> Seq.sortBy (fun ex -> match ex with | Succeeded o -> 3 | Skipped o -> 2 | Failed o -> 1) + |> Seq.toList + + asserts |> Seq.head -let Execute (op:ExecutionContext) (progress:IProgressBar) = async { - match op.Operation with - | Unknown u -> return Skipped op - | Skip s -> return Skipped op - | Do d -> return! Do op d progress - | Set s -> return Set op s progress - | TransformAndSet ts -> return Skipped op - | Assert a -> - return - match a with - | IsTrue t -> IsTrue op t progress - | IsFalse t -> IsFalse op t progress - | Match m -> IsMatch op m progress - | NumericAssert (a, m) -> Skipped op - -} + member this.Execute (op:ExecutionContext) (progress:IProgressBar) = async { + match op.Operation with + | Unknown u -> return Skipped op + | Skip s -> return Skipped op + | Do d -> + let (name, _) = d.ApiCall + let found, lookup = this.OpMap.TryGetValue name + if found then + return! OperationExecutor.Do op d lookup progress + else + return Failed <| Fail.Create op "Api: %s not found on client" name + | Set s -> return OperationExecutor.Set op s progress + | TransformAndSet ts -> return Skipped op + | Assert a -> + return + match a with + | IsTrue t -> OperationExecutor.IsTrue op t progress + | IsFalse t -> OperationExecutor.IsFalse op t progress + | Match m -> OperationExecutor.IsMatch op m progress + | NumericAssert (a, m) -> Skipped op + + } diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index f4437ade071..b5668341e28 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -1,36 +1,62 @@ module Tests.YamlRunner.Main +open System +open System.Diagnostics open Argu open Tests.YamlRunner open Tests.YamlRunner.Models +open Elasticsearch.Net type Arguments = | [] NamedSuite of TestSuite + | []Folder of string + | []TestFile of string + | []Endpoint of string | []Revision of string - | []Directory of string - | []File of string + | []DownloadOnly of bool with interface IArgParserTemplate with member s.Usage = match s with | NamedSuite _ -> "specify a known yaml test suite. defaults to `opensource`." | Revision _ -> "The git revision to reference (commit/branch/tag). defaults to `master`" - | Directory _ -> "Only run tests in this folder" - | File _ -> "Only run tests starting with this filename" + | Folder _ -> "Only run tests in this folder" + | TestFile _ -> "Only run tests starting with this filename" + | Endpoint _ -> "The elasticsearch endpoint to run tests against" + | DownloadOnly _ -> "Only download the tests, do not attempt to run them" +let private createClient endpoint = + let runningProxy = Process.GetProcessesByName("fiddler").Length + Process.GetProcessesByName("mitmproxy").Length > 0 + let defaultHost = if runningProxy then "ipv4.fiddler" else "localhost"; + let defaultUrl = sprintf "http://%s:9200" defaultHost; + let uri = match endpoint with | Some s -> new Uri(s) | _ -> new Uri(defaultUrl) + let settings = new ConnectionConfiguration(uri) + let settings = + match runningProxy with + | true -> settings.Proxy(Uri("http://ipv4.fiddler:8080"), String(null), String(null)) + | _ -> settings + new ElasticLowLevelClient(settings) let runMain (parsed:ParseResults) = async { let namedSuite = parsed.TryGetResult NamedSuite |> Option.defaultValue OpenSource let revision = parsed.TryGetResult Revision |> Option.defaultValue "master" - let directory = parsed.TryGetResult Directory |> Option.defaultValue "indices.create" |> Some - let file = parsed.TryGetResult File //|> Option.defaultValue "10_basic.yml" |> Some + let directory = parsed.TryGetResult Folder //|> Option.defaultValue "indices.create" |> Some + let file = parsed.TryGetResult TestFile //|> Option.defaultValue "10_basic.yml" |> Some + let endpoint = parsed.TryGetResult Endpoint + let downloadOnly = parsed.TryGetResult DownloadOnly |> Option.defaultValue false - let! locateResults = Commands.LocateTests namedSuite revision directory file - let readResults = Commands.ReadTests locateResults - let! runTesults = Commands.RunTests readResults + let client = createClient endpoint - return 0 + let! locateResults = Commands.LocateTests namedSuite revision directory file + match downloadOnly with + | true -> + let exitCode = if locateResults.Length > 0 then 0 else 1; + return exitCode + | false -> + let readResults = Commands.ReadTests locateResults + let! runTesults = Commands.RunTests readResults client + return 0 } [] diff --git a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj index 27235d357d6..e9c3abd249e 100644 --- a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj +++ b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj @@ -2,7 +2,8 @@ Exe - netcoreapp2.2 + netcoreapp3.0 + latest diff --git a/src/Tests/Tests.YamlRunner/TestsRunner.fs b/src/Tests/Tests.YamlRunner/TestsRunner.fs index e9d079abab5..6f79f88ffa2 100644 --- a/src/Tests/Tests.YamlRunner/TestsRunner.fs +++ b/src/Tests/Tests.YamlRunner/TestsRunner.fs @@ -1,4 +1,4 @@ -module Tests.YamlRunner.TestsRunner +namespace Tests.YamlRunner open System open ShellProgressBar @@ -8,110 +8,113 @@ open Tests.YamlRunner.OperationExecutor open Tests.YamlRunner.Stashes open Elasticsearch.Net -let private randomTime = Random() - -let RunOperation file section operation nth stashes (progress:IProgressBar) = async { - let executionContext = { - Suite= OpenSource - File= file - Folder= file.Directory - Section= section - NthOperation= nth - Operation= operation - Stashes = stashes - } - let! pass = OperationExecutor.Execute executionContext progress - match pass with - | Failed f -> - let c = pass.Context - progress.WriteLine <| sprintf "%s %s %s: %s %s" pass.Name c.Folder.Name c.File.Name (operation.Log()) (f.Log()) - | _ -> ignore() - return pass -} - -let private createOperations m file (ops:Operations) progress = - let executedOperations = - let stashes = Stashes() - ops - |> List.indexed - |> List.map (fun (i, op) -> async { - let! pass = RunOperation file m op i stashes progress - //let! x = Async.Sleep <| randomTime.Next(0, 10) - return pass - }) - (m, executedOperations) - -let RunTestFile progress (file:YamlTestDocument) = async { - - let m section ops = createOperations section file.FileInfo ops progress - - let setup = file.Setup |> Option.map (m "Setup") |> Option.toList - let teardown = file.Teardown |> Option.map (m "Teardown") |> Option.toList - let passed = file.Tests |> List.map (fun s -> s.Operations |> m s.Name) +type TestRunner(client:IElasticLowLevelClient, progress:IProgressBar, barOptions:ProgressBarOptions) = - let sections = setup @ passed @ teardown + member this.OperationExecutor = OperationExecutor(client) - let l = sections.Length - let ops = sections |> List.sumBy (fun (_, i) -> i.Length) - progress.MaxTicks <- ops + member private this.RunOperation file section operation nth stashes (subProgressBar:IProgressBar) = async { + let executionContext = { + Suite= OpenSource + File= file + Folder= file.Directory + Section= section + NthOperation= nth + Operation= operation + Stashes = stashes + } + let! pass = this.OperationExecutor.Execute executionContext subProgressBar + match pass with + | Failed f -> + let c = pass.Context + subProgressBar.WriteLine <| sprintf "%s %s %s: %s %s" pass.Name c.Folder.Name c.File.Name (operation.Log()) (f.Log()) + | _ -> ignore() + return pass + } - let runSection progressHeader sectionHeader (ops: Async list) = async { - let l = ops |> List.length - let result = + member private this.CreateOperations m file (ops:Operations) subProgressBar = + let executedOperations = + let stashes = Stashes() ops |> List.indexed - |> Seq.unfold (fun ms -> - match ms with - | (i, op) :: tl -> - let operations = sprintf "%s [%i/%i] operations: %s" progressHeader (i+1) l sectionHeader - progress.Tick(operations) - let r = Async.RunSynchronously op - match r with - | Succeeded context -> Some (r, tl) - | Skipped context -> Some (r, tl) - | Failed context -> Some (r, []) - | [] -> None - ) - |> List.ofSeq - return result - } - - let runAllSections = - sections - |> Seq.indexed - |> Seq.map (fun (i, suite) -> - let progressHeader = sprintf "[%i/%i] sections" (i+1) l - let (sectionHeader, ops) = suite - runSection progressHeader sectionHeader ops - ) - |> Seq.map Async.RunSynchronously - - return runAllSections |> Seq.toList - -} + |> List.map (fun (i, op) -> async { + let! pass = this.RunOperation file m op i stashes subProgressBar + //let! x = Async.Sleep <| randomTime.Next(0, 10) + return pass + }) + (m, executedOperations) + -let RunTestsInFolder (progress:IProgressBar) (barOptions:ProgressBarOptions) mainMessage (folder:YamlTestFolder) = async { - let l = folder.Files.Length - let run (i, document) = async { - let file = sprintf "%s/%s" document.FileInfo.Directory.Name document.FileInfo.Name - let message = sprintf "%s [%i/%i] Files : %s" mainMessage (i+1) l file - progress.Tick(message) - let message = sprintf "Inspecting file for sections" - use p = progress.Spawn(0, message, barOptions) + member private this.RunTestFile subProgressbar (file:YamlTestDocument) = async { - let x = DoMapper.Client.Indices.Delete("*") - let x = DoMapper.Client.Indices.DeleteTemplateForAll("*") + let m section ops = this.CreateOperations section file.FileInfo ops subProgressbar - let! result = RunTestFile p document + let setup = file.Setup |> Option.map (m "Setup") |> Option.toList + let teardown = file.Teardown |> Option.map (m "Teardown") |> Option.toList + let passed = file.Tests |> List.map (fun s -> s.Operations |> m s.Name) - return result - } + let sections = setup @ passed @ teardown - let actions = - folder.Files - |> Seq.indexed - |> Seq.map run - |> Seq.map Async.RunSynchronously - return actions -} + let l = sections.Length + let ops = sections |> List.sumBy (fun (_, i) -> i.Length) + subProgressbar.MaxTicks <- ops + + let runSection progressHeader sectionHeader (ops: Async list) = async { + let l = ops |> List.length + let result = + ops + |> List.indexed + |> Seq.unfold (fun ms -> + match ms with + | (i, op) :: tl -> + let operations = sprintf "%s [%i/%i] operations: %s" progressHeader (i+1) l sectionHeader + subProgressbar.Tick(operations) + let r = Async.RunSynchronously op + match r with + | Succeeded context -> Some (r, tl) + | Skipped context -> Some (r, tl) + | Failed context -> Some (r, []) + | [] -> None + ) + |> List.ofSeq + return result + } + + let runAllSections = + sections + |> Seq.indexed + |> Seq.map (fun (i, suite) -> + let progressHeader = sprintf "[%i/%i] sections" (i+1) l + let (sectionHeader, ops) = suite + runSection progressHeader sectionHeader ops + ) + |> Seq.map Async.RunSynchronously + + return runAllSections |> Seq.toList + + } + + member this.RunTestsInFolder mainMessage (folder:YamlTestFolder) = async { + let l = folder.Files.Length + let run (i, document) = async { + let file = sprintf "%s/%s" document.FileInfo.Directory.Name document.FileInfo.Name + let message = sprintf "%s [%i/%i] Files : %s" mainMessage (i+1) l file + progress.Tick(message) + let message = sprintf "Inspecting file for sections" + use p = progress.Spawn(0, message, barOptions) + + let x = client.Indices.Delete("*") + let x = client.Indices.DeleteTemplateForAll("*") + + let! result = this.RunTestFile p document + + return result + } + + let actions = + folder.Files + |> Seq.indexed + |> Seq.map run + |> Seq.map Async.RunSynchronously + return actions + } From 498be91a1b5fdc42e5fa6140c87b57ebb28e9b70 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 1 Oct 2019 13:29:51 +0200 Subject: [PATCH 38/85] update workflow --- .github/workflows/yaml-runner.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index 638c27f2592..7b7945c5e06 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -3,10 +3,10 @@ name: Yaml integration tests on: push: branches: - - spike/master/gh-actions + - feature/master/yaml-test-runner pull_request: branches: - - spike/master/gh-actions + - feature/master/yaml-test-runner jobs: container-job: @@ -30,7 +30,6 @@ jobs: repositories.url.allowed_urls: http://snapshot.test ports: - 9200:9200 - # needed because the postgres container does not provide a healthcheck options: --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=10 steps: From bc844b0128a05e2204d483af42d6587ce174de0b Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 1 Oct 2019 13:36:29 +0200 Subject: [PATCH 39/85] update docker image ref --- .github/workflows/yaml-runner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index 7b7945c5e06..fe9f1b489ae 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -17,7 +17,7 @@ jobs: services: elasticsearch: - image: docker.elastic.co/elasticsearch/8.0.0-SNAPSHOT + image: docker.elastic.co/elasticsearch:8.0.0-SNAPSHOT env: node.name: es1 cluster.name: elasticsearch-gh-actions From 5290461e268c79507691961f5ce05ec494910f8f Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 1 Oct 2019 13:38:17 +0200 Subject: [PATCH 40/85] update docker image ref --- .github/workflows/yaml-runner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index fe9f1b489ae..eeb1bd3604a 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -17,7 +17,7 @@ jobs: services: elasticsearch: - image: docker.elastic.co/elasticsearch:8.0.0-SNAPSHOT + image: docker.elastic.co/elasticsearch/elasticsearch:8.0.0-SNAPSHOT env: node.name: es1 cluster.name: elasticsearch-gh-actions From f6af05550048aecd71977134461f981fcfaca11d Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 1 Oct 2019 14:28:43 +0200 Subject: [PATCH 41/85] update health checks --- .github/workflows/yaml-runner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index eeb1bd3604a..51e9af8edb1 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -30,7 +30,7 @@ jobs: repositories.url.allowed_urls: http://snapshot.test ports: - 9200:9200 - options: --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=10 + options: --health-cmd="curl --silent --fail localhost:9200/_cluster/health || exit 1" --health-interval=5s --health-retries=12 --health-timeout=2s steps: - uses: actions/checkout@v1 From 55b739c74c9d8f0b573d688921a114854e8d5910 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 1 Oct 2019 14:33:17 +0200 Subject: [PATCH 42/85] attach for visibility --- .github/workflows/yaml-runner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index 51e9af8edb1..9ac65212f77 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -30,7 +30,7 @@ jobs: repositories.url.allowed_urls: http://snapshot.test ports: - 9200:9200 - options: --health-cmd="curl --silent --fail localhost:9200/_cluster/health || exit 1" --health-interval=5s --health-retries=12 --health-timeout=2s + options: --attach --no-healthcheck steps: - uses: actions/checkout@v1 From 58131f8800e335630f66a743fd4d3b498db6ce72 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 1 Oct 2019 14:35:32 +0200 Subject: [PATCH 43/85] --no-healthcheck not valid with -a --- .github/workflows/yaml-runner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index 9ac65212f77..ca4190cd9e9 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -30,7 +30,7 @@ jobs: repositories.url.allowed_urls: http://snapshot.test ports: - 9200:9200 - options: --attach --no-healthcheck + options: --attach steps: - uses: actions/checkout@v1 From 11345d6ac5455cd93abd64aff9a2bf8e392a71bb Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 1 Oct 2019 14:53:12 +0200 Subject: [PATCH 44/85] no health check --- .github/workflows/yaml-runner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index ca4190cd9e9..f77a2ad0713 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -30,7 +30,7 @@ jobs: repositories.url.allowed_urls: http://snapshot.test ports: - 9200:9200 - options: --attach + options: --no-healthcheck steps: - uses: actions/checkout@v1 From a81cc098655940bcd091d427f5c83e4ddecaa128 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 1 Oct 2019 14:58:31 +0200 Subject: [PATCH 45/85] add limits --- .github/workflows/yaml-runner.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index f77a2ad0713..1f85448a4d3 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -27,11 +27,12 @@ jobs: bootstrap.memory_lock: true node.attr.testattr: test path.repo: tmp - repositories.url.allowed_urls: http://snapshot.test + repositories.url.allowed_urls: http://snapshot.test + ES_JAVA_OPTS: Xms1g -Xmx1g ports: - 9200:9200 - options: --no-healthcheck - + options: --health-cmd="curl -fsSL http://localhost:9200/_cat/health?h=status" --health-interval=5s --health-retries=12 --health-timeout=2s --ulimit nofile=65536:65536 --ulimit memlock=-1:-1 + steps: - uses: actions/checkout@v1 - run: dotnet-run -f create -e http://elasticsearch:${{ job.services.elasticsearch.ports[9200] }} From ced791e079e0aa5efe0d3836c0683f3989cc6f66 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 1 Oct 2019 15:08:21 +0200 Subject: [PATCH 46/85] explicit hostname --- .github/workflows/yaml-runner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index 1f85448a4d3..850c031ecab 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -31,7 +31,7 @@ jobs: ES_JAVA_OPTS: Xms1g -Xmx1g ports: - 9200:9200 - options: --health-cmd="curl -fsSL http://localhost:9200/_cat/health?h=status" --health-interval=5s --health-retries=12 --health-timeout=2s --ulimit nofile=65536:65536 --ulimit memlock=-1:-1 + options: -h es1 --health-cmd="curl -fsSL http://localhost:9200/_cat/health?h=status" --health-interval=5s --health-retries=12 --health-timeout=2s --ulimit nofile=65536:65536 --ulimit memlock=-1:-1 steps: - uses: actions/checkout@v1 From fddba01523f7ef4cfe2ca654698ddc9a301de5df Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 1 Oct 2019 16:16:13 +0200 Subject: [PATCH 47/85] single node discovery --- .github/workflows/yaml-runner.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index 850c031ecab..f8b4e7b0a0b 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -9,11 +9,8 @@ on: - feature/master/yaml-test-runner jobs: - container-job: + yaml-tests: runs-on: ubuntu-latest - - container: - image: mcr.microsoft.com/dotnet/core/sdk:3.0 services: elasticsearch: @@ -21,8 +18,9 @@ jobs: env: node.name: es1 cluster.name: elasticsearch-gh-actions - cluster.initial_master_nodes: es1 - discovery.seed_hosts: es1 + discovery.type: single-node + #cluster.initial_master_nodes: es1 + #discovery.seed_hosts: es1 cluster.routing.allocation.disk.threshold_enabled: false bootstrap.memory_lock: true node.attr.testattr: test @@ -35,5 +33,8 @@ jobs: steps: - uses: actions/checkout@v1 + - uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.100' - run: dotnet-run -f create -e http://elasticsearch:${{ job.services.elasticsearch.ports[9200] }} working-directory: ./src/Tests/Tests.YamlRunner From 2dbb3c7cbe0b6cffb495f7a2a58f71fb0c8e70cc Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 1 Oct 2019 16:39:26 +0200 Subject: [PATCH 48/85] minimize options --- .github/workflows/yaml-runner.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index f8b4e7b0a0b..f8969a25746 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -17,19 +17,19 @@ jobs: image: docker.elastic.co/elasticsearch/elasticsearch:8.0.0-SNAPSHOT env: node.name: es1 - cluster.name: elasticsearch-gh-actions + #cluster.name: elasticsearch-gh-actions discovery.type: single-node #cluster.initial_master_nodes: es1 #discovery.seed_hosts: es1 - cluster.routing.allocation.disk.threshold_enabled: false - bootstrap.memory_lock: true + #cluster.routing.allocation.disk.threshold_enabled: false + #bootstrap.memory_lock: true node.attr.testattr: test - path.repo: tmp - repositories.url.allowed_urls: http://snapshot.test - ES_JAVA_OPTS: Xms1g -Xmx1g + #path.repo: tmp + #repositories.url.allowed_urls: http://snapshot.test + #ES_JAVA_OPTS: Xms1g -Xmx1g ports: - 9200:9200 - options: -h es1 --health-cmd="curl -fsSL http://localhost:9200/_cat/health?h=status" --health-interval=5s --health-retries=12 --health-timeout=2s --ulimit nofile=65536:65536 --ulimit memlock=-1:-1 + options: -h es1 --health-cmd="curl -fsSL http://localhost:9200/_cat/health?h=status" --health-interval=5s --health-retries=12 --health-timeout=5s --ulimit nofile=65536:65536 --ulimit memlock=-1:-1 steps: - uses: actions/checkout@v1 From 6fb986bdea740c2a937f30c3080aab5a7a5d3440 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 1 Oct 2019 16:42:04 +0200 Subject: [PATCH 49/85] wrong .NET sdk --- .github/workflows/yaml-runner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index f8969a25746..3d5723e12a0 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -35,6 +35,6 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-dotnet@v1 with: - dotnet-version: '3.1.100' + dotnet-version: '3.0.100' - run: dotnet-run -f create -e http://elasticsearch:${{ job.services.elasticsearch.ports[9200] }} working-directory: ./src/Tests/Tests.YamlRunner From aedc9f4f77803e6af96bbdf4c08039d337990ed9 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 1 Oct 2019 16:44:42 +0200 Subject: [PATCH 50/85] dotnet-run should have been dotnet run --- .github/workflows/yaml-runner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index 3d5723e12a0..e010fe79df7 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -36,5 +36,5 @@ jobs: - uses: actions/setup-dotnet@v1 with: dotnet-version: '3.0.100' - - run: dotnet-run -f create -e http://elasticsearch:${{ job.services.elasticsearch.ports[9200] }} + - run: dotnet run -f create -e http://elasticsearch:${{ job.services.elasticsearch.ports[9200] }} working-directory: ./src/Tests/Tests.YamlRunner From ed3a5b6241f98cc19a84fe89243f3ef3cb05fd77 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 1 Oct 2019 16:48:24 +0200 Subject: [PATCH 51/85] need -- to separate args --- .github/workflows/yaml-runner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index e010fe79df7..aa00f2d4761 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -36,5 +36,5 @@ jobs: - uses: actions/setup-dotnet@v1 with: dotnet-version: '3.0.100' - - run: dotnet run -f create -e http://elasticsearch:${{ job.services.elasticsearch.ports[9200] }} + - run: dotnet run -- -f create -e http://elasticsearch:${{ job.services.elasticsearch.ports[9200] }} working-directory: ./src/Tests/Tests.YamlRunner From ff1907ac359ce7279f1251d03edbae2070591bc5 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 1 Oct 2019 17:01:07 +0200 Subject: [PATCH 52/85] https://github.com/actions/setup-dotnet/issues/29 :sadpanda: --- .github/workflows/yaml-runner.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index aa00f2d4761..af4997d9a2d 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -38,3 +38,5 @@ jobs: dotnet-version: '3.0.100' - run: dotnet run -- -f create -e http://elasticsearch:${{ job.services.elasticsearch.ports[9200] }} working-directory: ./src/Tests/Tests.YamlRunner + env: + DOTNET_ROOT: /opt/hostedtoolcache/dncs/3.0.100/x64 From e14841f2892f3b2b0315a58f6b0b84f1248d3f82 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Wed, 2 Oct 2019 09:01:20 +0200 Subject: [PATCH 53/85] print some info to assert container information --- .github/workflows/yaml-runner.yml | 2 +- src/Tests/Tests.YamlRunner/Program.fs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index af4997d9a2d..c7535243858 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -36,7 +36,7 @@ jobs: - uses: actions/setup-dotnet@v1 with: dotnet-version: '3.0.100' - - run: dotnet run -- -f create -e http://elasticsearch:${{ job.services.elasticsearch.ports[9200] }} + - run: dotnet run -- -f create -e http://localhost:${{ job.services.elasticsearch.ports[9200] }} working-directory: ./src/Tests/Tests.YamlRunner env: DOTNET_ROOT: /opt/hostedtoolcache/dncs/3.0.100/x64 diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index b5668341e28..24287bbc4c7 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -48,6 +48,9 @@ let runMain (parsed:ParseResults) = async { let client = createClient endpoint + let r = client.RootNodeInfo() + printfn "%s" r.DebugInformation + let! locateResults = Commands.LocateTests namedSuite revision directory file match downloadOnly with | true -> From 78dd18cb10d319e15375d9fa6f64b0ea21437840 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Wed, 2 Oct 2019 13:17:24 +0200 Subject: [PATCH 54/85] cleaned up program a bit now discovers revision to download from running elasticsearch version --- src/Tests/Tests.YamlRunner/Program.fs | 56 +++++++++++++++++---------- 1 file changed, 36 insertions(+), 20 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index 24287bbc4c7..82ea52dd142 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -13,7 +13,6 @@ type Arguments = | []TestFile of string | []Endpoint of string | []Revision of string - | []DownloadOnly of bool with interface IArgParserTemplate with member s.Usage = @@ -23,43 +22,60 @@ type Arguments = | Folder _ -> "Only run tests in this folder" | TestFile _ -> "Only run tests starting with this filename" | Endpoint _ -> "The elasticsearch endpoint to run tests against" - | DownloadOnly _ -> "Only download the tests, do not attempt to run them" -let private createClient endpoint = - let runningProxy = Process.GetProcessesByName("fiddler").Length + Process.GetProcessesByName("mitmproxy").Length > 0 +let private runningProxy = Process.GetProcessesByName("fiddler").Length + Process.GetProcessesByName("mitmproxy").Length > 0 +let private defaultEndpoint = let defaultHost = if runningProxy then "ipv4.fiddler" else "localhost"; - let defaultUrl = sprintf "http://%s:9200" defaultHost; - let uri = match endpoint with | Some s -> new Uri(s) | _ -> new Uri(defaultUrl) + sprintf "http://%s:9200" defaultHost; + +let private createClient endpoint = + let uri = new Uri(endpoint) let settings = new ConnectionConfiguration(uri) let settings = match runningProxy with | true -> settings.Proxy(Uri("http://ipv4.fiddler:8080"), String(null), String(null)) | _ -> settings new ElasticLowLevelClient(settings) + +let validateRevisionParams endpoint passedRevision = + let client = createClient endpoint + let r = + let config = new RequestConfiguration(DisableDirectStreaming=Nullable(true)) + let p = new RootNodeInfoRequestParameters(RequestConfiguration = config) + client.RootNodeInfo(p) + + printfn "%s" r.DebugInformation + if not r.Success then + failwithf "No running elasticsearch found at %s" endpoint + + let version = r.Get("version.number") + let runningRevision = r.Get("version.build_hash") + + // TODO validate the endpoint running confirms to expected `passedRevision` + // needs to handle tags (7.4.0) and branches (7.x, 7.4, master) + // not quite sure whats the rules are + let revision = runningRevision + + (client, revision, version) + + let runMain (parsed:ParseResults) = async { let namedSuite = parsed.TryGetResult NamedSuite |> Option.defaultValue OpenSource - let revision = parsed.TryGetResult Revision |> Option.defaultValue "master" let directory = parsed.TryGetResult Folder //|> Option.defaultValue "indices.create" |> Some let file = parsed.TryGetResult TestFile //|> Option.defaultValue "10_basic.yml" |> Some - let endpoint = parsed.TryGetResult Endpoint - let downloadOnly = parsed.TryGetResult DownloadOnly |> Option.defaultValue false + let endpoint = parsed.TryGetResult Endpoint |> Option.defaultValue defaultEndpoint + let passedRevision = parsed.TryGetResult Revision - let client = createClient endpoint + let (client, revision, version) = validateRevisionParams endpoint passedRevision - let r = client.RootNodeInfo() - printfn "%s" r.DebugInformation + printfn "Found version %s downloading specs from: %s" version revision let! locateResults = Commands.LocateTests namedSuite revision directory file - match downloadOnly with - | true -> - let exitCode = if locateResults.Length > 0 then 0 else 1; - return exitCode - | false -> - let readResults = Commands.ReadTests locateResults - let! runTesults = Commands.RunTests readResults client - return 0 + let readResults = Commands.ReadTests locateResults + let! runTesults = Commands.RunTests readResults client + return 0 } [] From a5fb658b4f5e29d334de6101415e5cab45b26ee1 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Sun, 6 Oct 2019 14:53:44 +0200 Subject: [PATCH 55/85] junit xml exporter --- src/Tests/Tests.YamlRunner/Commands.fs | 6 +- .../Tests.YamlRunner/OperationExecutor.fs | 8 +- src/Tests/Tests.YamlRunner/Program.fs | 10 +- .../Tests.YamlRunner/Tests.YamlRunner.fsproj | 1 + src/Tests/Tests.YamlRunner/TestsExporter.fs | 106 ++++++++++++++++++ src/Tests/Tests.YamlRunner/TestsRunner.fs | 8 +- 6 files changed, 133 insertions(+), 6 deletions(-) create mode 100644 src/Tests/Tests.YamlRunner/TestsExporter.fs diff --git a/src/Tests/Tests.YamlRunner/Commands.fs b/src/Tests/Tests.YamlRunner/Commands.fs index ecbc376ddd2..614ff27ba4a 100644 --- a/src/Tests/Tests.YamlRunner/Commands.fs +++ b/src/Tests/Tests.YamlRunner/Commands.fs @@ -6,6 +6,7 @@ open Tests.YamlRunner.AsyncExtensions open Tests.YamlRunner.TestsLocator open Tests.YamlRunner.TestsReader open Elasticsearch.Net +open Tests.YamlRunner let private barOptions = ProgressBarOptions( @@ -37,6 +38,7 @@ let ReadTests (tests:LocateResults list) = let RunTests (tests:YamlTestFolder list) client = async { do! Async.SwitchToNewThread() + let f = tests.Length let l = tests |> List.sumBy (fun t -> t.Files.Length) use progress = new ProgressBar(l, sprintf "Folders [0/%i]" l, barOptions) @@ -44,7 +46,7 @@ let RunTests (tests:YamlTestFolder list) client = async { let a (i, v) = async { let mainMessage = sprintf "[%i/%i] Folders : %s | " (i+1) f v.Folder let! op = runner.RunTestsInFolder mainMessage v - return op |> Seq.toList + return v, op |> Seq.toList } let x = tests @@ -58,3 +60,5 @@ let RunTests (tests:YamlTestFolder list) client = async { return x } +let ExportTests = TestsExporter.Export + diff --git a/src/Tests/Tests.YamlRunner/OperationExecutor.fs b/src/Tests/Tests.YamlRunner/OperationExecutor.fs index 8607c1c1cf5..293c321bd04 100644 --- a/src/Tests/Tests.YamlRunner/OperationExecutor.fs +++ b/src/Tests/Tests.YamlRunner/OperationExecutor.fs @@ -11,6 +11,7 @@ open Elasticsearch.Net open Newtonsoft.Json open Newtonsoft.Json.Linq open System.Collections.Generic +open System.Diagnostics type ExecutionContext = { Suite: TestSuite @@ -20,10 +21,13 @@ type ExecutionContext = { NthOperation: int Operation: Operation Stashes: Stashes + Elapsed: int64 ref } with member __.Throw message = failwithf "%s" message -type Fail = SeenException of ExecutionContext * Exception | ValidationFailure of ExecutionContext * string +type Fail = + | SeenException of ExecutionContext * Exception + | ValidationFailure of ExecutionContext * string with member this.Context = match this with | SeenException (c, _) -> c | ValidationFailure (c, _) -> c member this.Log () = @@ -42,7 +46,7 @@ type ExecutionResult = member this.Context = match this with | Succeeded c -> c | Skipped c -> c | Failed f -> f.Context -type OperationExecutor(client:IElasticLowLevelClient) = +type OperationExecutor(client:IElasticLowLevelClient) = member private this.OpMap = DoMapper.createDoMap client diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index 82ea52dd142..96dec3f06b4 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -2,9 +2,11 @@ open System open System.Diagnostics +open System.Xml.Linq open Argu open Tests.YamlRunner open Tests.YamlRunner.Models +open Tests.YamlRunner.OperationExecutor open Elasticsearch.Net type Arguments = @@ -74,7 +76,13 @@ let runMain (parsed:ParseResults) = async { let! locateResults = Commands.LocateTests namedSuite revision directory file let readResults = Commands.ReadTests locateResults - let! runTesults = Commands.RunTests readResults client + let! runResults = Commands.RunTests readResults client + let testsFile = Commands.ExportTests runResults + + printfn "--> %s" testsFile + + let contents = System.IO.File.ReadAllText testsFile + printfn "%s" contents return 0 } diff --git a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj index e9c3abd249e..7a978be268d 100644 --- a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj +++ b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj @@ -18,6 +18,7 @@ + diff --git a/src/Tests/Tests.YamlRunner/TestsExporter.fs b/src/Tests/Tests.YamlRunner/TestsExporter.fs new file mode 100644 index 00000000000..002af30c8b6 --- /dev/null +++ b/src/Tests/Tests.YamlRunner/TestsExporter.fs @@ -0,0 +1,106 @@ +module Tests.YamlRunner.TestsExporter + +open System +open System.Globalization +open Tests.YamlRunner.OperationExecutor +open Tests.YamlRunner.TestsReader +open System.Xml.Linq +open System.Xml.XPath + +type SectionResults = string * ExecutionResult list +type FileResults = SectionResults list +type FolderResults = (YamlTestDocument * FileResults) list +type RunResults = (YamlTestFolder * FolderResults) list + +let XElement(name, content: 'a list) = new XElement(XName.Get name, Seq.toArray content) +let XAttribute(name, value) = new XAttribute(XName.Get name, value) + +let mapExecutionResult result = + match result with + | ExecutionResult.Succeeded f -> None + | ExecutionResult.Failed f -> + let c = f.Context + let message = + let m = sprintf "%s: %s %s" result.Name (c.Operation.Log()) (f.Log()) + XAttribute("message", m) + match f with + | SeenException (c, e) -> + let error = XElement("error", [message]) + error.Value <- e.ToString() + Some error + | ValidationFailure (c, f) -> + let failure = XElement("failure", [message]) + failure.Value <- c.Stashes.Response().DebugInformation + Some failure + | ExecutionResult.Skipped s -> + Some <| XElement("skipped", []) + +let private timeOf result = + match result with + | ExecutionResult.Succeeded f -> !f.Elapsed + | ExecutionResult.Failed f -> !f.Context.Elapsed + | ExecutionResult.Skipped s -> !s.Elapsed + +let testCasesSection document (results: FileResults) = + results + |> List.map (fun (section, results) -> + let name = sprintf "%s - %s" document.FileInfo.Name section + let time = + let totalMs = results |> List.sumBy timeOf + Convert.ToDouble(totalMs) / 1000.0 + let results = + results + |> List.map(fun r -> mapExecutionResult r) + |> List.choose id + let name = XAttribute("name", name) + let time = XAttribute("time", time.ToString(CultureInfo.InvariantCulture)) + + let testCase = XElement("testcase", []) + testCase.Add(results, name, time) + testCase + ) + +let testCases (results: FolderResults) = + results + |> List.map (fun (document, sections) -> + testCasesSection document sections + ) + |> List.concat + +let countTests (xElement:XElement) = + let testCases = xElement.XPathSelectElements "//testcase" + let errors = xElement.XPathSelectElements "//testcase[errors]" + let failed = xElement.XPathSelectElements "//testcase[failure]" + let skipped = xElement.XPathSelectElements "//testcase[skipped]" + let time = + xElement.XPathSelectElements "//testcase[@time]" + |> Seq.map (fun a -> Double.Parse (a.Attribute(XName.Get "time")).Value) + |> Seq.sum + + let tests = XAttribute("tests", testCases |> Seq.length) + let failed = XAttribute("failures", failed |> Seq.length) + let errors = XAttribute("errors", errors |> Seq.length) + let skipped = XAttribute("disabled", skipped |> Seq.length) + let time = XAttribute("time", time) + xElement.Add(tests, failed, errors, skipped, time) + +let testSuites (results: RunResults) = + results + |> List.map (fun (folder, documents) -> + let name = XAttribute("name", folder.Folder) + let testCases = testCases documents + let suite = XElement("testsuite", [name]) + suite.Add(testCases) + countTests suite + suite + ) + +let Export (results: RunResults) = + let suites = testSuites results + + let xml = XElement("testsuites", suites) + countTests xml + + let fileName = System.IO.Path.GetTempFileName() + xml.Save(fileName) + fileName diff --git a/src/Tests/Tests.YamlRunner/TestsRunner.fs b/src/Tests/Tests.YamlRunner/TestsRunner.fs index 6f79f88ffa2..ed18d64cd10 100644 --- a/src/Tests/Tests.YamlRunner/TestsRunner.fs +++ b/src/Tests/Tests.YamlRunner/TestsRunner.fs @@ -1,6 +1,7 @@ namespace Tests.YamlRunner open System +open System.Diagnostics open ShellProgressBar open Tests.YamlRunner.Models open Tests.YamlRunner.TestsReader @@ -21,8 +22,11 @@ type TestRunner(client:IElasticLowLevelClient, progress:IProgressBar, barOptions NthOperation= nth Operation= operation Stashes = stashes + Elapsed = ref 0L } + let sw = Stopwatch.StartNew() let! pass = this.OperationExecutor.Execute executionContext subProgressBar + executionContext.Elapsed := sw.ElapsedMilliseconds match pass with | Failed f -> let c = pass.Context @@ -76,7 +80,7 @@ type TestRunner(client:IElasticLowLevelClient, progress:IProgressBar, barOptions | [] -> None ) |> List.ofSeq - return result + return sectionHeader, result } let runAllSections = @@ -107,7 +111,7 @@ type TestRunner(client:IElasticLowLevelClient, progress:IProgressBar, barOptions let! result = this.RunTestFile p document - return result + return document, result } let actions = From 9e75865d089d8c0576bc66b0b2fd3f9e4cbfc3ef Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Sun, 6 Oct 2019 17:33:39 +0200 Subject: [PATCH 56/85] can now pass in output file as arg, report totals on stdout --- src/Tests/Tests.YamlRunner/Program.fs | 20 +++++---- src/Tests/Tests.YamlRunner/TestsExporter.fs | 45 ++++++++++++--------- 2 files changed, 40 insertions(+), 25 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index 96dec3f06b4..e51114ffaa7 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -15,6 +15,7 @@ type Arguments = | []TestFile of string | []Endpoint of string | []Revision of string + | []JUnitOutputFile of string with interface IArgParserTemplate with member s.Usage = @@ -24,6 +25,7 @@ type Arguments = | Folder _ -> "Only run tests in this folder" | TestFile _ -> "Only run tests starting with this filename" | Endpoint _ -> "The elasticsearch endpoint to run tests against" + | JUnitOutputFile _ -> "The path and file name to use for the junit xml output, defaults to a random tmp filename" let private runningProxy = Process.GetProcessesByName("fiddler").Length + Process.GetProcessesByName("mitmproxy").Length > 0 let private defaultEndpoint = @@ -60,8 +62,6 @@ let validateRevisionParams endpoint passedRevision = (client, revision, version) - - let runMain (parsed:ParseResults) = async { let namedSuite = parsed.TryGetResult NamedSuite |> Option.defaultValue OpenSource @@ -69,6 +69,9 @@ let runMain (parsed:ParseResults) = async { let file = parsed.TryGetResult TestFile //|> Option.defaultValue "10_basic.yml" |> Some let endpoint = parsed.TryGetResult Endpoint |> Option.defaultValue defaultEndpoint let passedRevision = parsed.TryGetResult Revision + let outputFile = + parsed.TryGetResult JUnitOutputFile + |> Option.defaultValue (System.IO.Path.GetTempFileName()) let (client, revision, version) = validateRevisionParams endpoint passedRevision @@ -77,13 +80,16 @@ let runMain (parsed:ParseResults) = async { let! locateResults = Commands.LocateTests namedSuite revision directory file let readResults = Commands.ReadTests locateResults let! runResults = Commands.RunTests readResults client - let testsFile = Commands.ExportTests runResults - - printfn "--> %s" testsFile + let summary = Commands.ExportTests runResults outputFile - let contents = System.IO.File.ReadAllText testsFile + let contents = System.IO.File.ReadAllText outputFile printfn "%s" contents - return 0 + + printfn "Total Tests: %i Failed: %i Errors: %i Skipped: %i" + summary.Tests summary.Failed summary.Errors summary.Skipped + printfn "Total Time %O" <| TimeSpan.FromSeconds summary.Time + + return summary.Failed + summary.Errors } [] diff --git a/src/Tests/Tests.YamlRunner/TestsExporter.fs b/src/Tests/Tests.YamlRunner/TestsExporter.fs index 002af30c8b6..e5c6b3b8e7a 100644 --- a/src/Tests/Tests.YamlRunner/TestsExporter.fs +++ b/src/Tests/Tests.YamlRunner/TestsExporter.fs @@ -68,21 +68,32 @@ let testCases (results: FolderResults) = |> List.concat let countTests (xElement:XElement) = - let testCases = xElement.XPathSelectElements "//testcase" - let errors = xElement.XPathSelectElements "//testcase[errors]" - let failed = xElement.XPathSelectElements "//testcase[failure]" - let skipped = xElement.XPathSelectElements "//testcase[skipped]" + let xp = xElement.XPathSelectElements + let x s = xp s |> Seq.length + let testCases = x "//testcase" + let errors = x "//testcase[errors]" + let failed = x "//testcase[failure]" + let skipped = x "//testcase[skipped]" let time = - xElement.XPathSelectElements "//testcase[@time]" + xp "//testcase[@time]" |> Seq.map (fun a -> Double.Parse (a.Attribute(XName.Get "time")).Value) |> Seq.sum - let tests = XAttribute("tests", testCases |> Seq.length) - let failed = XAttribute("failures", failed |> Seq.length) - let errors = XAttribute("errors", errors |> Seq.length) - let skipped = XAttribute("disabled", skipped |> Seq.length) - let time = XAttribute("time", time) - xElement.Add(tests, failed, errors, skipped, time) + xElement.Add + ( + XAttribute("tests", testCases), + XAttribute("failures", failed), + XAttribute("errors", errors), + XAttribute("disabled", skipped), + XAttribute("time", time) + ) + {| + Tests = testCases; + Failed = failed; + Errors=errors; + Skipped= skipped; + Time = time + |} let testSuites (results: RunResults) = results @@ -91,16 +102,14 @@ let testSuites (results: RunResults) = let testCases = testCases documents let suite = XElement("testsuite", [name]) suite.Add(testCases) - countTests suite + let summary = countTests suite suite ) -let Export (results: RunResults) = +let Export (results: RunResults) (outputFile:string) = let suites = testSuites results - let xml = XElement("testsuites", suites) - countTests xml + let summary = countTests xml - let fileName = System.IO.Path.GetTempFileName() - xml.Save(fileName) - fileName + xml.Save(outputFile) + summary From 40d7151c754a6904bedcf73791806dce4075d9f4 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Sun, 6 Oct 2019 17:54:51 +0200 Subject: [PATCH 57/85] export to artifacts --- .github/workflows/yaml-runner.yml | 8 ++++++-- src/Tests/Tests.YamlRunner/Program.fs | 2 -- src/Tests/Tests.YamlRunner/TestsExporter.fs | 3 +++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index c7535243858..f2a4f0c3f8f 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -35,8 +35,12 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-dotnet@v1 with: - dotnet-version: '3.0.100' - - run: dotnet run -- -f create -e http://localhost:${{ job.services.elasticsearch.ports[9200] }} + dotnet-version: '3.0.100' + - run: dotnet run -- -o ../../build/output/junit-yaml-integration.xml -f create -e http://localhost:${{ job.services.elasticsearch.ports[9200] }} working-directory: ./src/Tests/Tests.YamlRunner env: DOTNET_ROOT: /opt/hostedtoolcache/dncs/3.0.100/x64 + - uses: actions/upload-artifact@master + with: + name: junit-yaml-integration.xml + path: build/output/junit-yaml-integration.xml diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index e51114ffaa7..066d16d9363 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -2,11 +2,9 @@ open System open System.Diagnostics -open System.Xml.Linq open Argu open Tests.YamlRunner open Tests.YamlRunner.Models -open Tests.YamlRunner.OperationExecutor open Elasticsearch.Net type Arguments = diff --git a/src/Tests/Tests.YamlRunner/TestsExporter.fs b/src/Tests/Tests.YamlRunner/TestsExporter.fs index e5c6b3b8e7a..a37116702b2 100644 --- a/src/Tests/Tests.YamlRunner/TestsExporter.fs +++ b/src/Tests/Tests.YamlRunner/TestsExporter.fs @@ -111,5 +111,8 @@ let Export (results: RunResults) (outputFile:string) = let xml = XElement("testsuites", suites) let summary = countTests xml + let fullPath = System.IO.Path.GetFullPath outputFile + printfn "Persisting junit file to :%s" fullPath + xml.Save(outputFile) summary From ba2e195c36206438494dcf2b2868f18e65780493 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Sun, 6 Oct 2019 17:56:43 +0200 Subject: [PATCH 58/85] yaml --- .github/workflows/yaml-runner.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index f2a4f0c3f8f..4536e22803b 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -35,12 +35,12 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-dotnet@v1 with: - dotnet-version: '3.0.100' + dotnet-version: '3.0.100' - run: dotnet run -- -o ../../build/output/junit-yaml-integration.xml -f create -e http://localhost:${{ job.services.elasticsearch.ports[9200] }} working-directory: ./src/Tests/Tests.YamlRunner env: - DOTNET_ROOT: /opt/hostedtoolcache/dncs/3.0.100/x64 + DOTNET_ROOT: /opt/hostedtoolcache/dncs/3.0.100/x64 - uses: actions/upload-artifact@master with: - name: junit-yaml-integration.xml - path: build/output/junit-yaml-integration.xml + name: junit-yaml-integration.xml + path: build/output/junit-yaml-integration.xml From 53f2064ab23d00baa0831b68e38264d79b7601c6 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Sun, 6 Oct 2019 18:02:16 +0200 Subject: [PATCH 59/85] yaml spacing --- .github/workflows/yaml-runner.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index 4536e22803b..45a3e70588e 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -35,12 +35,12 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-dotnet@v1 with: - dotnet-version: '3.0.100' + dotnet-version: '3.0.100' - run: dotnet run -- -o ../../build/output/junit-yaml-integration.xml -f create -e http://localhost:${{ job.services.elasticsearch.ports[9200] }} working-directory: ./src/Tests/Tests.YamlRunner env: - DOTNET_ROOT: /opt/hostedtoolcache/dncs/3.0.100/x64 - - uses: actions/upload-artifact@master - with: - name: junit-yaml-integration.xml - path: build/output/junit-yaml-integration.xml + DOTNET_ROOT: /opt/hostedtoolcache/dncs/3.0.100/x64 + - uses: actions/upload-artifact@master + with: + name: junit-yaml-integration.xml + path: build/output/junit-yaml-integration.xml From af63bca989e91e9b8b1612c4bee474accb81136a Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Sun, 6 Oct 2019 18:09:52 +0200 Subject: [PATCH 60/85] make sure build/output exists --- .github/workflows/yaml-runner.yml | 3 ++- src/Tests/Tests.YamlRunner/TestsExporter.fs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index 45a3e70588e..c5e00b62a13 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -36,7 +36,8 @@ jobs: - uses: actions/setup-dotnet@v1 with: dotnet-version: '3.0.100' - - run: dotnet run -- -o ../../build/output/junit-yaml-integration.xml -f create -e http://localhost:${{ job.services.elasticsearch.ports[9200] }} + - run: mkdir -p build/output + - run: dotnet run -- -o ../../../build/output/junit-yaml-integration.xml -f create -e http://localhost:${{ job.services.elasticsearch.ports[9200] }} working-directory: ./src/Tests/Tests.YamlRunner env: DOTNET_ROOT: /opt/hostedtoolcache/dncs/3.0.100/x64 diff --git a/src/Tests/Tests.YamlRunner/TestsExporter.fs b/src/Tests/Tests.YamlRunner/TestsExporter.fs index a37116702b2..f8dc6657c1e 100644 --- a/src/Tests/Tests.YamlRunner/TestsExporter.fs +++ b/src/Tests/Tests.YamlRunner/TestsExporter.fs @@ -112,7 +112,7 @@ let Export (results: RunResults) (outputFile:string) = let summary = countTests xml let fullPath = System.IO.Path.GetFullPath outputFile - printfn "Persisting junit file to :%s" fullPath + printfn "Persisting junit file to %s" fullPath xml.Save(outputFile) summary From be1e6b5e3ad13f306bbb062efa3384c6fc97ff9f Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Sun, 6 Oct 2019 18:20:43 +0200 Subject: [PATCH 61/85] always upload artifact --- .github/workflows/yaml-runner.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index c5e00b62a13..e37c2eebd60 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -42,6 +42,7 @@ jobs: env: DOTNET_ROOT: /opt/hostedtoolcache/dncs/3.0.100/x64 - uses: actions/upload-artifact@master + if: always() with: name: junit-yaml-integration.xml path: build/output/junit-yaml-integration.xml From 4ec1995566894b55d44bfe12427d4c4d7001e0b8 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Sun, 6 Oct 2019 18:48:46 +0200 Subject: [PATCH 62/85] test out logging commands --- .github/workflows/yaml-runner.yml | 3 +++ azure-pipelines.yml | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index e37c2eebd60..81cd5ef9af2 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -36,6 +36,9 @@ jobs: - uses: actions/setup-dotnet@v1 with: dotnet-version: '3.0.100' + - run: echo ::debug file=app.js,line=1::Entered octocatAddition method + - run: echo ::warning file=x,line=1,col=2::message + - run: echo ::error file=app.js,line=10,col=15::Something went wrong - run: mkdir -p build/output - run: dotnet run -- -o ../../../build/output/junit-yaml-integration.xml -f create -e http://localhost:${{ job.services.elasticsearch.ports[9200] }} working-directory: ./src/Tests/Tests.YamlRunner diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 70001a8e897..75b43611ec8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,6 +28,21 @@ jobs: testRunner: VSTest testResultsFiles: 'src/Tests/Tests/**/*.trx' testRunTitle: Windows Unit Tests + +- job: LinuxUnitTests + pool: + vmImage: 'ubuntu-16.04' + steps: + - task: UseDotNet@2 + inputs: + version: '3.0.100' + - script: ./build.sh test-one + displayName: 'build and unit test' + - task: PublishTestResults@2 + inputs: + testRunner: VSTest + testResultsFiles: 'src/Tests/Tests/**/*.trx' + testRunTitle: Linux Unit Tests - job: WindowsIntegrationTests dependsOn: WindowsCanaryTests From d0ae397a5fdd15ae59bbcd1564570e573b611c84 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Sun, 6 Oct 2019 18:58:10 +0200 Subject: [PATCH 63/85] update es container config --- .github/workflows/yaml-runner.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index 81cd5ef9af2..b49532078b8 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -17,15 +17,15 @@ jobs: image: docker.elastic.co/elasticsearch/elasticsearch:8.0.0-SNAPSHOT env: node.name: es1 - #cluster.name: elasticsearch-gh-actions + cluster.name: elasticsearch-gh-actions discovery.type: single-node #cluster.initial_master_nodes: es1 #discovery.seed_hosts: es1 - #cluster.routing.allocation.disk.threshold_enabled: false + cluster.routing.allocation.disk.threshold_enabled: false #bootstrap.memory_lock: true node.attr.testattr: test #path.repo: tmp - #repositories.url.allowed_urls: http://snapshot.test + repositories.url.allowed_urls: http://snapshot.test #ES_JAVA_OPTS: Xms1g -Xmx1g ports: - 9200:9200 @@ -36,9 +36,6 @@ jobs: - uses: actions/setup-dotnet@v1 with: dotnet-version: '3.0.100' - - run: echo ::debug file=app.js,line=1::Entered octocatAddition method - - run: echo ::warning file=x,line=1,col=2::message - - run: echo ::error file=app.js,line=10,col=15::Something went wrong - run: mkdir -p build/output - run: dotnet run -- -o ../../../build/output/junit-yaml-integration.xml -f create -e http://localhost:${{ job.services.elasticsearch.ports[9200] }} working-directory: ./src/Tests/Tests.YamlRunner From 89a385e54f6fb297aff096acfb9ce4081fab651e Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Sun, 6 Oct 2019 19:08:40 +0200 Subject: [PATCH 64/85] reenable ES_JAVA_OPTS --- .github/workflows/yaml-runner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index b49532078b8..476fdfdad08 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -26,7 +26,7 @@ jobs: node.attr.testattr: test #path.repo: tmp repositories.url.allowed_urls: http://snapshot.test - #ES_JAVA_OPTS: Xms1g -Xmx1g + ES_JAVA_OPTS: Xms1g -Xmx1g ports: - 9200:9200 options: -h es1 --health-cmd="curl -fsSL http://localhost:9200/_cat/health?h=status" --health-interval=5s --health-retries=12 --health-timeout=5s --ulimit nofile=65536:65536 --ulimit memlock=-1:-1 From 4571ad1c68c4642a7932e94137eddcd931689d44 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Sun, 6 Oct 2019 19:12:02 +0200 Subject: [PATCH 65/85] java opts not able to set to 1g enable memory_lock --- .github/workflows/yaml-runner.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index 476fdfdad08..622f4b83c1f 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -22,11 +22,11 @@ jobs: #cluster.initial_master_nodes: es1 #discovery.seed_hosts: es1 cluster.routing.allocation.disk.threshold_enabled: false - #bootstrap.memory_lock: true + bootstrap.memory_lock: true node.attr.testattr: test #path.repo: tmp repositories.url.allowed_urls: http://snapshot.test - ES_JAVA_OPTS: Xms1g -Xmx1g + #ES_JAVA_OPTS: Xms1g -Xmx1g ports: - 9200:9200 options: -h es1 --health-cmd="curl -fsSL http://localhost:9200/_cat/health?h=status" --health-interval=5s --health-retries=12 --health-timeout=5s --ulimit nofile=65536:65536 --ulimit memlock=-1:-1 From 7a83f74428432cba0ad026b1dcc41656e4cd8c34 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Sun, 6 Oct 2019 19:16:04 +0200 Subject: [PATCH 66/85] drop single-node discovery-type --- .github/workflows/yaml-runner.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index 622f4b83c1f..e7807701cdd 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -18,9 +18,9 @@ jobs: env: node.name: es1 cluster.name: elasticsearch-gh-actions - discovery.type: single-node - #cluster.initial_master_nodes: es1 - #discovery.seed_hosts: es1 + #discovery.type: single-node + cluster.initial_master_nodes: es1 + discovery.seed_hosts: es1 cluster.routing.allocation.disk.threshold_enabled: false bootstrap.memory_lock: true node.attr.testattr: test From 2c35dc82b1886599e873ab5f284e497df72df1f5 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Sun, 6 Oct 2019 19:21:00 +0200 Subject: [PATCH 67/85] back to single node --- .github/workflows/yaml-runner.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index e7807701cdd..622f4b83c1f 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -18,9 +18,9 @@ jobs: env: node.name: es1 cluster.name: elasticsearch-gh-actions - #discovery.type: single-node - cluster.initial_master_nodes: es1 - discovery.seed_hosts: es1 + discovery.type: single-node + #cluster.initial_master_nodes: es1 + #discovery.seed_hosts: es1 cluster.routing.allocation.disk.threshold_enabled: false bootstrap.memory_lock: true node.attr.testattr: test From 438a4efb5e232733aee57d41e01c6f04516dcc17 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Mon, 7 Oct 2019 18:39:36 +0200 Subject: [PATCH 68/85] stage --- .jenkins/Jenkins.csproj | 7 + .jenkins/certs/ca.crt | 20 ++ .jenkins/certs/testnode.crt | 19 ++ .jenkins/certs/testnode.key | 27 +++ .jenkins/jobs/defaults.yml | 78 ++++++++ .../jobs/elastic+go-elasticsearch+5.x.yml | 14 ++ .../jobs/elastic+go-elasticsearch+6.x.yml | 14 ++ .../jobs/elastic+go-elasticsearch+7.x.yml | 14 ++ .../jobs/elastic+go-elasticsearch+master.yml | 14 ++ .jenkins/run-elasticsearch.sh | 172 ++++++++++++++++++ .jenkins/run-tests | 102 +++++++++++ .jenkins/test-matrix.yml | 13 ++ .jenkins/tests-core.sh | 25 +++ .jenkins/tests-xpack.sh | 53 ++++++ azure-pipelines.yml | 15 -- src/Elasticsearch.sln | 7 + .../Tests.YamlRunner/Tests.YamlRunner.fsproj | 4 +- 17 files changed, 581 insertions(+), 17 deletions(-) create mode 100644 .jenkins/Jenkins.csproj create mode 100755 .jenkins/certs/ca.crt create mode 100755 .jenkins/certs/testnode.crt create mode 100755 .jenkins/certs/testnode.key create mode 100755 .jenkins/jobs/defaults.yml create mode 100755 .jenkins/jobs/elastic+go-elasticsearch+5.x.yml create mode 100755 .jenkins/jobs/elastic+go-elasticsearch+6.x.yml create mode 100755 .jenkins/jobs/elastic+go-elasticsearch+7.x.yml create mode 100755 .jenkins/jobs/elastic+go-elasticsearch+master.yml create mode 100755 .jenkins/run-elasticsearch.sh create mode 100755 .jenkins/run-tests create mode 100755 .jenkins/test-matrix.yml create mode 100755 .jenkins/tests-core.sh create mode 100644 .jenkins/tests-xpack.sh diff --git a/.jenkins/Jenkins.csproj b/.jenkins/Jenkins.csproj new file mode 100644 index 00000000000..17ca88b06a7 --- /dev/null +++ b/.jenkins/Jenkins.csproj @@ -0,0 +1,7 @@ + + + + netcoreapp2.2 + + + diff --git a/.jenkins/certs/ca.crt b/.jenkins/certs/ca.crt new file mode 100755 index 00000000000..6402874d50a --- /dev/null +++ b/.jenkins/certs/ca.crt @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDSTCCAjGgAwIBAgIUIwN+0zglsexRKwE1RGHvlCcmrdwwDQYJKoZIhvcNAQEL +BQAwNDEyMDAGA1UEAxMpRWxhc3RpYyBDZXJ0aWZpY2F0ZSBUb29sIEF1dG9nZW5l +cmF0ZWQgQ0EwHhcNMTkwMjEzMDcyMjQwWhcNMjIwMjEyMDcyMjQwWjA0MTIwMAYD +VQQDEylFbGFzdGljIENlcnRpZmljYXRlIFRvb2wgQXV0b2dlbmVyYXRlZCBDQTCC +ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANILs0JO0e7x29zeVx21qalK +XKdX+AMlGJPH75wWO/Jq6YHtxt1wYIg762krOBXfG6JsFSOIwIv5VrzGGRGjSPt9 +OXQyXrDDiQvsBT3rpzLNdDs7KMl2tZswwv7w9ujgud0cYnS1MOpn81rfPc73DvMg +xuhplofDx6fn3++PjVRU2FNiIVWyEoaxRjCeGPMBubKZYaYbQA6vYM4Z+ByG727B +AyAER3t7xmvYti/EoO2hv2HQk5zgcj/Oq3AJKhnt8LH8fnfm3TnYNM1htvXqhN05 +vsvhvm2PHfnA5qLlSr/3W0aI/U/PqfsFDCgyRV097sMIaKkmavb0Ue7aQ7lgtp0C +AwEAAaNTMFEwHQYDVR0OBBYEFDRKlCMowWR1rwxE0d1lTEQe5O71MB8GA1UdIwQY +MBaAFDRKlCMowWR1rwxE0d1lTEQe5O71MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI +hvcNAQELBQADggEBAKbCJ95EBpeuvF70KEt6QU70k/SH1NRvM9YzKryV0D975Jvu +HOSm9HgSTULeAUFZIa4oYyf3QUfVoI+2T/aQrfXA3gfrJWsHURkyNmiHOFAbYHqi +xA6i249G2GTEjc1+le/M2N2CcDKAmurW6vSGK4upXQbPd6KmnhHREX74zkWjnOa+ ++tibbSSOCT4Tmja2DbBxAPuivU9IB1g/hIUmbYQqKffQrBJA0658tz6w63a/Q7xN +pCvvbSgiMZ6qcVIcJkBT2IooYie+ax45pQECHthgIUcQAzfmIfqlU0Qfl8rDgAmn +0c1o6HQjKGU2aVGgSRuaaiHaSZjbPIZVS51sOoI= +-----END CERTIFICATE----- diff --git a/.jenkins/certs/testnode.crt b/.jenkins/certs/testnode.crt new file mode 100755 index 00000000000..ff3bcb37f3b --- /dev/null +++ b/.jenkins/certs/testnode.crt @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDIjCCAgqgAwIBAgIUI4QU6jA1dYSCbdIA6oAb2TBEluowDQYJKoZIhvcNAQEL +BQAwNDEyMDAGA1UEAxMpRWxhc3RpYyBDZXJ0aWZpY2F0ZSBUb29sIEF1dG9nZW5l +cmF0ZWQgQ0EwHhcNMTkwMjEzMDcyMzEzWhcNMjIwMjEyMDcyMzEzWjATMREwDwYD +VQQDEwhpbnN0YW5jZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJeT +yOy6EAScZxrULKjHePciiz38grivCrhFFV+dThaRCcl3DhDzb9Eny5q5iEw3WvLQ +Rqmf01jncNIhaocTt66VqveXaMubbE8O0LcG6e4kpFO+JtnVF8JTARTc+ux/1uD6 +hO1VG/HItM7WQrQxh4hfB2u1AX2YQtoqEtXXEC+UHWfl4QzuzXjBnKCkO/L9/6Tf +yNFQWXxKnIiTs8Xm9sEhhSCBJPlLTQu+MX4vR2Uwj5XZmflDUr+ZTenl9qYxL6b3 +SWhh/qEl4GAj1+tS7ZZOxE0237mUh3IIFYSWSaMm8K2m/BYHkLNWL5B1dMic0lsv +osSoYrQuCef4HQMCitsCAwEAAaNNMEswHQYDVR0OBBYEFFMg4l1GLW8lYbwASY+r +YeWYRzIiMB8GA1UdIwQYMBaAFDRKlCMowWR1rwxE0d1lTEQe5O71MAkGA1UdEwQC +MAAwDQYJKoZIhvcNAQELBQADggEBAEQrgh1xALpumQTzsjxFRGque/vlKTgRs5Kh +xtgapr6wjIbdq7dagee+4yNOKzS5lGVXCgwrJlHESv9qY0uumT/33vK2uduJ7NAd +fR2ZzyBnhMX+mkYhmGrGYCTUMUIwOIQYa4Evis4W+LHmCIDG03l7gLHfdIBe9VMO +pDZum8f6ng0MM49s8/rXODNYKw8kFyUhnfChqMi/2yggb1uUIfKlJJIchkgYjE13 +zuC+fjo029Pq1jeMIdxugLf/7I/8NiW1Yj9aCXevUXG1qzHFEuKAinBXYOZO/vWS +LaEqOhwrzNynwgGpYAr7Rfgv4AflltYIIav4PZT03P7fbyAAf8s= +-----END CERTIFICATE----- diff --git a/.jenkins/certs/testnode.key b/.jenkins/certs/testnode.key new file mode 100755 index 00000000000..c35b4bc839e --- /dev/null +++ b/.jenkins/certs/testnode.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpQIBAAKCAQEAl5PI7LoQBJxnGtQsqMd49yKLPfyCuK8KuEUVX51OFpEJyXcO +EPNv0SfLmrmITDda8tBGqZ/TWOdw0iFqhxO3rpWq95doy5tsTw7Qtwbp7iSkU74m +2dUXwlMBFNz67H/W4PqE7VUb8ci0ztZCtDGHiF8Ha7UBfZhC2ioS1dcQL5QdZ+Xh +DO7NeMGcoKQ78v3/pN/I0VBZfEqciJOzxeb2wSGFIIEk+UtNC74xfi9HZTCPldmZ ++UNSv5lN6eX2pjEvpvdJaGH+oSXgYCPX61Ltlk7ETTbfuZSHcggVhJZJoybwrab8 +FgeQs1YvkHV0yJzSWy+ixKhitC4J5/gdAwKK2wIDAQABAoIBAQCRFTJna/xy/WUu +59FLR4qAOj8++JgCwACpue4oU7/vl6nffSYokWoAr2+RzG4qTX2vFi3cpA8+dGCn +sLZvTi8tWzKGxBTZdg2oakzaMzLr74SeZ052iCGyrZJGbvF6Ny7srr1XEXSq6+os +ZCb6pMHOhO7saBdiKMAsY8MdjTl/33AduuE6ztqv+L92xTr2g4QlbT1KvWlEgppU +k4Gy7zdETkPBTSH/17ZwyGJoJICIAhbL4IpmOM4dPIg8nFkVPPpy6p0z4uGjtgnK +nreZ2EKMzCafBaHn7A77gpi0OrQdl6pe0fsGqv/323YjCJPbwwl5TsoNq44DzwiX +3M7XiVJxAoGBAOCne56vdN4uZmCgLVGT2JSUNVPOu4bfjrxWH6cslzrPT2Zhp3lO +M4axZ3gmcervV252YEZXntXDHHCSfrECllRN1WFD63XmyQ/CkhuvZkkeRHfzL1TE +EdqHOTqs4sRETZ7+RITFC81DZQkWWOKeyXMjyPBqd7RnThQHijB1c8Y5AoGBAKy6 +CVKBx+zz5crVD0tz4UhOmz1wRNN0CL0l+FXRuFSgbzMIvwpfiqe25crgeLHe2M2/ +TogdWbjZ2nUZQTzoRsSkQ6cKHpj+G/gWurp/UcHHXFVwgLSPF7c3KHDtiYq7Vqw0 +bvmhM03LI6+ZIPRV7hLBr7WP7UmpAiREMF7tTnmzAoGBAIkx3w3WywFQxtblmyeB +qbd7F2IaE23XoxyjX+tBEQ4qQqwcoSE0v8TXHIBEwjceeX+NLVhn9ClJYVniLRq+ +oL3VVqVyzB4RleJZCc98e3PV1yyFx/b1Uo3pHOsXX9lKeTjKwV9v0rhFGzPEgP3M +yOvXA8TG0FnM6OLUg/D6GX0JAoGAMuHS4TVOGeV3ahr9mHKYiN5vKNgrzka+VEod +L9rJ/FQOrfADpyCiDen5I5ygsXU+VM3oanyK88NpcVlxOGoMft0M+OYoQVWKE7lO +ZKYhBX6fGqQ7pfUJPXXIOgwfmni5fZ0sm+j63g3bg10OsiumKGxaQJgXhL1+3gQg +Y7ZwibUCgYEAlZoFFvkMLjpOSaHk1z5ZZnt19X0QUIultBwkumSqMPm+Ks7+uDrx +thGUCoz4ecr/ci4bIUY7mB+zfAbqnBOMxreJqCRbAIuRypo1IlWkTp8DywoDOfMW +NfzjVmzJ7EJu44nGmVAi1jw4Pbseivvi1ujMCoPgaE8I1uSh144bwN8= +-----END RSA PRIVATE KEY----- diff --git a/.jenkins/jobs/defaults.yml b/.jenkins/jobs/defaults.yml new file mode 100755 index 00000000000..b2bb8f1c010 --- /dev/null +++ b/.jenkins/jobs/defaults.yml @@ -0,0 +1,78 @@ +--- + +##### GLOBAL METADATA + +- meta: + cluster: clients-ci + +##### JOB DEFAULTS + +- job: + project-type: matrix + logrotate: + daysToKeep: 30 + numToKeep: 100 + parameters: + - string: + name: branch_specifier + default: refs/heads/master + description: the Git branch specifier to build (<branchName>, <tagName>, + <commitId>, etc.) + properties: + - github: + url: https://github.com/elastic/go-elasticsearch/ + - inject: + properties-content: HOME=$JENKINS_HOME + concurrent: true + node: flyweight + scm: + - git: + name: origin + credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba + reference-repo: /var/lib/jenkins/.git-references/go-elasticsearch.git + branches: + - ${branch_specifier} + url: git@github.com:elastic/go-elasticsearch.git + basedir: '' + wipe-workspace: 'True' + triggers: + - github + axes: + - axis: + type: slave + name: label + values: + - linux + - axis: + type: yaml + filename: .jenkins/test-matrix.yml + name: ELASTICSEARCH_VERSION + - axis: + type: yaml + filename: .jenkins/test-matrix.yml + name: GO_VERSION + - axis: + type: yaml + filename: .jenkins/test-matrix.yml + name: TEST_SUITE + yaml-strategy: + exclude-key: exclude + filename: .jenkins/test-matrix.yml + wrappers: + - ansicolor + - timeout: + type: absolute + timeout: 120 + fail: true + - timestamps + - workspace-cleanup + builders: + - shell: |- + #!/usr/local/bin/runbld + .jenkins/run-tests + publishers: + - email: + recipients: infra-root+build@elastic.co + - junit: + results: "*-junit.xml" + allow-empty-results: true diff --git a/.jenkins/jobs/elastic+go-elasticsearch+5.x.yml b/.jenkins/jobs/elastic+go-elasticsearch+5.x.yml new file mode 100755 index 00000000000..bff81cf84b3 --- /dev/null +++ b/.jenkins/jobs/elastic+go-elasticsearch+5.x.yml @@ -0,0 +1,14 @@ +--- +- job: + name: elastic+go-elasticsearch+5.x + display-name: 'elastic / go-elasticsearch # 5.x' + description: Testing the go-elasticsearch 5.x branch. + junit_results: "*-junit.xml" + parameters: + - string: + name: branch_specifier + default: refs/heads/5.x + description: The Git branch specifier to build + triggers: + - github + - timed: '@daily' diff --git a/.jenkins/jobs/elastic+go-elasticsearch+6.x.yml b/.jenkins/jobs/elastic+go-elasticsearch+6.x.yml new file mode 100755 index 00000000000..4175ed2a5b6 --- /dev/null +++ b/.jenkins/jobs/elastic+go-elasticsearch+6.x.yml @@ -0,0 +1,14 @@ +--- +- job: + name: elastic+go-elasticsearch+6.x + display-name: 'elastic / go-elasticsearch # 6.x' + description: Testing the go-elasticsearch 6.x branch. + junit_results: "*-junit.xml" + parameters: + - string: + name: branch_specifier + default: refs/heads/6.x + description: The Git branch specifier to build + triggers: + - github + - timed: '@daily' diff --git a/.jenkins/jobs/elastic+go-elasticsearch+7.x.yml b/.jenkins/jobs/elastic+go-elasticsearch+7.x.yml new file mode 100755 index 00000000000..4a34e342e0a --- /dev/null +++ b/.jenkins/jobs/elastic+go-elasticsearch+7.x.yml @@ -0,0 +1,14 @@ +--- +- job: + name: elastic+go-elasticsearch+7.x + display-name: 'elastic / go-elasticsearch # 7.x' + description: Testing the go-elasticsearch 7.x branch. + junit_results: "*-junit.xml" + parameters: + - string: + name: branch_specifier + default: refs/heads/7.x + description: The Git branch specifier to build + triggers: + - github + - timed: '@daily' diff --git a/.jenkins/jobs/elastic+go-elasticsearch+master.yml b/.jenkins/jobs/elastic+go-elasticsearch+master.yml new file mode 100755 index 00000000000..1184437da1e --- /dev/null +++ b/.jenkins/jobs/elastic+go-elasticsearch+master.yml @@ -0,0 +1,14 @@ +--- +- job: + name: elastic+go-elasticsearch+master + display-name: 'elastic / go-elasticsearch # master' + description: Testing the go-elasticsearch master branch. + junit_results: "*-junit.xml" + parameters: + - string: + name: branch_specifier + default: refs/heads/master + description: The Git branch specifier to build + triggers: + - github + - timed: '@daily' diff --git a/.jenkins/run-elasticsearch.sh b/.jenkins/run-elasticsearch.sh new file mode 100755 index 00000000000..cac4a0d6c8f --- /dev/null +++ b/.jenkins/run-elasticsearch.sh @@ -0,0 +1,172 @@ +#!/usr/bin/env bash +# +# Launch one or more Elasticsearch nodes via the Docker image, +# to form a cluster suitable for running the REST API tests. +# +# Export the ELASTICSEARCH_VERSION variable, eg. 'elasticsearch:8.0.0-SNAPSHOT'. + +if [[ -z "$ELASTICSEARCH_VERSION" ]]; then + echo -e "\033[31;1mERROR:\033[0m Required environment variable [ELASTICSEARCH_VERSION] not set\033[0m" + exit 1 +fi + +set -euxo pipefail + +moniker=$(echo "$ELASTICSEARCH_VERSION" | tr -C "[:alnum:]" '-') + +NODE_NAME=${moniker}${NODE_NAME-node1} +MASTER_NODE_NAME=${MASTER_NODE_NAME-${moniker}node1} +CLUSTER_NAME=${CLUSTER_NAME-${moniker}yaml} +HTTP_PORT=${HTTP_PORT-9200} + +ELASTIC_PASSWORD=${ELASTIC_PASSWORD-changeme} +SSL_CERT=${SSL_CERT-"$PWD/certs/testnode.crt"} +SSL_KEY=${SSL_KEY-"$PWD/certs/testnode.key"} +SSL_CA=${SSL_CA-"$PWD/certs/ca.crt"} + +DETACH=${DETACH-false} +CLEANUP=${CLEANUP-false} + +volume_name=${NODE_NAME}-yaml-data +network_name=${moniker}yaml + +set +x + +function cleanup_volume { + if [[ "$(docker volume ls -q -f name=$1)" ]]; then + echo -e "\033[34;1mINFO:\033[0m Removing volume $1\033[0m" + (docker volume rm "$1") || true + fi +} +function cleanup_node { + if [[ "$(docker ps -q -f name=$1)" ]]; then + cleanup_volume "$1-yaml-data" + echo -e "\033[34;1mINFO:\033[0m Removing container $1\033[0m" + (docker container rm --force --volumes "$1") || true + fi +} +function cleanup_network { + if [[ "$(docker network ls -q -f name=$1)" ]]; then + echo -e "\033[34;1mINFO:\033[0m Removing network $1\033[0m" + (docker network rm "$1") || true + fi +} + +function cleanup { + if [[ "$DETACH" != "true" ]] || [[ "$1" == "1" ]]; then + echo -e "\033[34;1mINFO:\033[0m clean the node and volume on startup (1) OR on exit if not detached\033[0m" + cleanup_node "$NODE_NAME" + fi + if [[ "$DETACH" != "true" ]]; then + echo -e "\033[34;1mINFO:\033[0m clean the network if not detached (start and exit)\033[0m" + cleanup_network "$network_name" + fi +}; +trap "cleanup 0" EXIT + +if [[ "$CLEANUP" == "true" ]]; then + trap - EXIT + containers=$(docker network inspect -f '{{ range $key, $value := .Containers }}{{ printf "%s\n" .Name}}{{ end }}' ${network_name}) + while read -r container; do + cleanup_node "$container" + done <<< "$containers" + cleanup_network "$network_name" + echo -e "\033[32;1mSUCCESS:\033[0m Cleaned up and exiting\033[0m" + exit 0 +fi + +echo -e "\033[34;1mINFO:\033[0m Making sure previous run leftover infrastructure is removed \033[0m" +cleanup 1 + +echo -e "\033[34;1mINFO:\033[0m Creating network $network_name if it does not exist already \033[0m" +docker network inspect "$network_name" > /dev/null 2>&1 || docker network create "$network_name" + +environment=($(cat <<-END + --env node.name=$NODE_NAME + --env cluster.name=$CLUSTER_NAME + --env cluster.initial_master_nodes=$MASTER_NODE_NAME + --env discovery.seed_hosts=$MASTER_NODE_NAME + --env cluster.routing.allocation.disk.threshold_enabled=false + --env bootstrap.memory_lock=true + --env node.attr.testattr=test + --env path.repo=/tmp + --env repositories.url.allowed_urls=http://snapshot.test* +END +)) + +volumes=($(cat <<-END + --volume $volume_name:/usr/share/elasticsearch/data +END +)) + +if [[ "$ELASTICSEARCH_VERSION" != *oss* ]]; then + environment+=($(cat <<-END + --env ELASTIC_PASSWORD=$ELASTIC_PASSWORD + --env xpack.license.self_generated.type=trial + --env xpack.security.enabled=true + --env xpack.security.http.ssl.enabled=true + --env xpack.security.http.ssl.verification_mode=certificate + --env xpack.security.http.ssl.key=certs/testnode.key + --env xpack.security.http.ssl.certificate=certs/testnode.crt + --env xpack.security.http.ssl.certificate_authorities=certs/ca.crt + --env xpack.security.transport.ssl.enabled=true + --env xpack.security.transport.ssl.key=certs/testnode.key + --env xpack.security.transport.ssl.certificate=certs/testnode.crt + --env xpack.security.transport.ssl.certificate_authorities=certs/ca.crt +END +)) + volumes+=($(cat <<-END + --volume $SSL_CERT:/usr/share/elasticsearch/config/certs/testnode.crt + --volume $SSL_KEY:/usr/share/elasticsearch/config/certs/testnode.key + --volume $SSL_CA:/usr/share/elasticsearch/config/certs/ca.crt +END +)) +fi + +url="http://$NODE_NAME" +if [[ "$ELASTICSEARCH_VERSION" != *oss* ]]; then + url="https://elastic:$ELASTIC_PASSWORD@$NODE_NAME" +fi + +echo -e "\033[34;1mINFO:\033[0m Starting container $NODE_NAME \033[0m" +set -x +docker run \ + -h "$NODE_NAME" \ + --name "$NODE_NAME" \ + --network "$network_name" \ + --env ES_JAVA_OPTS=-"Xms1g -Xmx1g" \ + "${environment[@]}" \ + "${volumes[@]}" \ + --publish "$HTTP_PORT":9200 \ + --ulimit nofile=65536:65536 \ + --ulimit memlock=-1:-1 \ + --detach="$DETACH" \ + --health-cmd="curl --silent --fail $url:9200/_cluster/health || exit 1" \ + --health-interval=2s \ + --health-retries=20 \ + --health-timeout=2s \ + --rm \ + docker.elastic.co/elasticsearch/"$ELASTICSEARCH_VERSION"; +set +x + +if [[ "$DETACH" == "true" ]]; then + until [[ "$(docker inspect -f "{{.State.Health.Status}}" ${NODE_NAME})" != "starting" ]]; do + sleep 2; + echo "" + echo -e "\033[34;1mINFO:\033[0m waiting for node $NODE_NAME to be up\033[0m" + done; + # Always show the node getting started logs, this is very useful both on CI as well as while developing + docker logs "$NODE_NAME" + if [[ "$(docker inspect -f "{{.State.Health.Status}}" ${NODE_NAME})" != "healthy" ]]; then + cleanup 1 + echo + echo -e "\033[31;1mERROR:\033[0m Failed to start ${ELASTICSEARCH_VERSION} in detached mode beyond health checks\033[0m" + echo -e "\033[31;1mERROR:\033[0m dumped the docker log before shutting the node down\033[0m" + exit 1 + else + echo + echo -e "\033[32;1mSUCCESS:\033[0m Detached and healthy: ${NODE_NAME} on docker network: ${network_name}\033[0m" + echo -e "\033[32;1mSUCCESS:\033[0m Running on: ${url/$NODE_NAME/localhost}:${HTTP_PORT}\033[0m" + exit 0 + fi +fi diff --git a/.jenkins/run-tests b/.jenkins/run-tests new file mode 100755 index 00000000000..c4c87fbafef --- /dev/null +++ b/.jenkins/run-tests @@ -0,0 +1,102 @@ +#!/usr/bin/env bash + +set -eo pipefail + +if [[ -z $TEST_SUITE ]]; then + echo -e "\033[31;1mERROR:\033[0m Required environment variable [TEST_SUITE] not set\033[0m" + exit 1 +fi + +if [[ $TEST_SUITE != "oss" && $TEST_SUITE != "xpack" ]]; then + echo -e "\033[31;1mERROR:\033[0m Unknown value [$TEST_SUITE] for [TEST_SUITE]\033[0m" + exit 1 +fi + +if [[ $TEST_SUITE == "oss" ]]; then + elasticsearch_image=elasticsearch-oss:8.0.0-SNAPSHOT + elasticsearch_url=http://es1:9200 +fi + +if [[ $TEST_SUITE == "xpack" ]]; then + elasticsearch_image=elasticsearch:8.0.0-SNAPSHOT + elasticsearch_url=https://elastic:elastic@es1:9200 +fi + +function cleanup { + docker container rm --force --volumes es1 > /dev/null 2>&1 || true + docker container rm --force --volumes elasticsearch-source > /dev/null 2>&1 || true + docker container rm --force --volumes go-elasticsearch > /dev/null 2>&1 || true +} + +trap cleanup EXIT + +TIMEFORMAT="(Duration: %0lR)" + +echo -e "\033[1m>>>>> SETUP [$TEST_SUITE] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" + +# Build the go-elasticsearch image +docker build --file Dockerfile --tag elastic/go-elasticsearch . + +# Launch a single Elasticsearch node +(make cluster detached=true version=$elasticsearch_image) + +# Store the Elasticsearch version and build hash +ELASTICSEARCH_VERSION=$(docker run --network elasticsearch --rm appropriate/curl -sSk $elasticsearch_url | docker run -i --rm stedolan/jq -r '.version.number') +ELASTICSEARCH_BUILD_HASH=$(docker run --network elasticsearch --rm appropriate/curl -sSk $elasticsearch_url | docker run -i --rm stedolan/jq -r '.version.build_hash') + +# Download Elasticsearch source code at ELASTICSEARCH_BUILD_HASH and store it in a container +echo -e ">>>>> Downloading Elasticsearch repository @ $ELASTICSEARCH_BUILD_HASH..." +time docker run --rm appropriate/curl --retry 3 -sSL "https://github.com/elastic/elasticsearch/archive/$ELASTICSEARCH_BUILD_HASH.zip" > "/tmp/elasticsearch-$ELASTICSEARCH_BUILD_HASH.zip" +echo -e ">>>>> Extracting and storing to [elasticsearch-source] container..." +time docker run --volume=/tmp:/tmp --workdir=/tmp --rm elastic/go-elasticsearch unzip -q -o "elasticsearch-$ELASTICSEARCH_BUILD_HASH.zip" '*.properties' '*.json' '*.y*ml' +docker run --volume=/tmp:/tmp --workdir=/tmp --rm elastic/go-elasticsearch /bin/sh -c " + rm -rf /tmp/elasticsearch-$ELASTICSEARCH_BUILD_HASH.zip + rm -rf /tmp/elasticsearch/ + mv /tmp/elasticsearch-$ELASTICSEARCH_BUILD_HASH* /tmp/elasticsearch/ +" +docker create --name elasticsearch-source --volume /elasticsearch-source --name elasticsearch-source alpine /bin/true +docker cp /tmp/elasticsearch elasticsearch-source:/elasticsearch-source + +# Launch the container; actual commands are called with "docker exec" +docker run \ + --name go-elasticsearch \ + --network elasticsearch \ + --env "ELASTICSEARCH_URL=$elasticsearch_url" \ + --env "ELASTICSEARCH_VERSION=$ELASTICSEARCH_VERSION" \ + --env "ELASTICSEARCH_BUILD_HASH=$ELASTICSEARCH_BUILD_HASH" \ + --env "WORKSPACE=${WORKSPACE:-/workspace}" \ + --volume "/go-elasticsearch" \ + --volume "${WORKSPACE:-workspace}:${WORKSPACE:-/workspace}" \ + --volumes-from "elasticsearch-source" \ + --rm \ + --detach \ + elastic/go-elasticsearch sleep 3600 + +# Run the tests +# NOTE: Conditions needed to prevent early exit due to the 'set -e' option +status=100 +case $TEST_SUITE in + "core" ) + if bash .jenkins/tests-core.sh; then + status=$? + else + status=$? + fi + ;; + "xpack" ) + if bash .jenkins/tests-xpack.sh; then + status=$? + else + status=$? + fi + ;; +esac + +# Report status and exit +if [[ $status == "0" ]]; then + echo -e "\n\033[32;1mSUCCESS\033[0m" + exit 0 +else + echo -e "\n\033[31;1mFAILURE\033[0m" + exit $status +fi diff --git a/.jenkins/test-matrix.yml b/.jenkins/test-matrix.yml new file mode 100755 index 00000000000..84149d54515 --- /dev/null +++ b/.jenkins/test-matrix.yml @@ -0,0 +1,13 @@ +--- + +ELASTICSEARCH_VERSION: + - 8.0.0-SNAPSHOT + +DOTNET_VERSION: + - 3.0.100 + +TEST_SUITE: + - oss + - xpack + +exclude: ~ diff --git a/.jenkins/tests-core.sh b/.jenkins/tests-core.sh new file mode 100755 index 00000000000..34d4300d47c --- /dev/null +++ b/.jenkins/tests-core.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +set -euo pipefail + +TIMEFORMAT="(Duration: %0lR)" + +echo -e "\033[1m>>>>> Cleaning up test files\033[0m" + +docker exec go-elasticsearch /bin/sh -c 'rm -rf esapi/test/*_test.go' +docker exec go-elasticsearch /bin/sh -c 'rm -rf esapi/test/xpack' + +echo -e "\033[1m>>>>> Generating the API registry\033[0m" + +docker exec --workdir=/go-elasticsearch/internal/cmd/generate --env PACKAGE_PATH=/go-elasticsearch/esapi go-elasticsearch go generate ./... + +echo -e "\033[1m>>>>> Generating the test files\033[0m" + +time docker exec --tty --workdir=/go-elasticsearch/internal/cmd/generate go-elasticsearch go run main.go apitests --output '/go-elasticsearch/esapi/test' --input '/elasticsearch-source/elasticsearch/rest-api-spec/src/main/resources/rest-api-spec/test/**/*.y*ml' + +echo -e "\033[1m>>>>> Running the tests\033[0m" + +time docker exec --tty --workdir=/go-elasticsearch/esapi/test go-elasticsearch /bin/sh -c 'gotestsum --format=short-verbose --junitfile=$WORKSPACE/TEST-integration-api-junit.xml -- -tags=integration -timeout=1h *_test.go' +status=$? + +exit $status diff --git a/.jenkins/tests-xpack.sh b/.jenkins/tests-xpack.sh new file mode 100644 index 00000000000..64ba4e83021 --- /dev/null +++ b/.jenkins/tests-xpack.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash + +set -euo pipefail + +TIMEFORMAT="(Duration: %0lR)" + +echo -e "\033[1m>>>>> Cleaning up test files\033[0m" + +docker exec go-elasticsearch /bin/sh -c 'rm -rf esapi/test/*_test.go' +docker exec go-elasticsearch /bin/sh -c 'rm -rf rm -rf esapi/test/ml*' + +echo -e "\033[1m>>>>> Generating the API registry\033[0m" + +docker exec --workdir=/go-elasticsearch/internal/cmd/generate --env PACKAGE_PATH=/go-elasticsearch/esapi go-elasticsearch go generate ./... + +echo -e "\033[1m>>>>> Generating the test files\033[0m" + +time docker exec --tty --workdir=/go-elasticsearch/internal/cmd/generate go-elasticsearch go run main.go apitests --output '/go-elasticsearch/esapi/test/xpack' --input '/elasticsearch-source/elasticsearch/x-pack/plugin/src/test/resources/rest-api-spec/test/**/*.yml' + +time docker exec --tty --workdir=/go-elasticsearch/internal/cmd/generate go-elasticsearch go run main.go apitests --output '/go-elasticsearch/esapi/test/xpack' --input '/elasticsearch-source/elasticsearch/x-pack/plugin/src/test/resources/rest-api-spec/test/**/**/*.yml' + +docker exec go-elasticsearch mkdir -p esapi/test/xpack/ml +docker exec go-elasticsearch mkdir -p esapi/test/xpack/ml-crud + +docker exec go-elasticsearch /bin/sh -c 'mv esapi/test/xpack/xpack_ml* esapi/test/xpack/ml/' +docker exec go-elasticsearch mv esapi/test/xpack/ml/xpack_ml__jobs_crud_test.go esapi/test/xpack/ml-crud/ + +echo -e "\033[1m>>>>> Running tests: XPACK >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" + +time docker exec --tty --workdir=/go-elasticsearch/esapi/test go-elasticsearch /bin/sh -c 'gotestsum --format=short-verbose --junitfile=$WORKSPACE/TEST-integration-api-xpack-junit.xml -- --tags=integration --timeout=1h -v xpack/*_test.go' +status1=$? + +docker container rm --force --volumes es1 > /dev/null 2>&1 +make cluster-clean cluster version=elasticsearch:8.0.0-SNAPSHOT detached=true + +echo -e "\033[1m>>>>> Running tests: XPACK ML >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" + +time docker exec --tty --workdir=/go-elasticsearch/esapi/test go-elasticsearch /bin/sh -c 'gotestsum --format=short-verbose --junitfile=$WORKSPACE/TEST-integration-api-xpack-ml-junit.xml -- --tags=integration --timeout=1h -v ./xpack/ml/*_test.go' +status2=$? + +docker container rm --force --volumes es1 > /dev/null 2>&1 +make cluster-clean cluster version=elasticsearch:8.0.0-SNAPSHOT detached=true + +echo -e "\033[1m>>>>> Running tests: XPACK ML CRUD >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" + +time docker exec --tty --workdir=/go-elasticsearch/esapi/test go-elasticsearch /bin/sh -c 'gotestsum --format=short-verbose --junitfile=$WORKSPACE/TEST-integration-api-xpack-ml-crud-junit.xml -- --tags=integration --timeout=1h -v ./xpack/ml-crud/*_test.go' +status3=$? + +if [[ $status1 == 0 && $status2 == 0 || $status3 == 0 ]]; then + exit 0 +else + exit 0 +fi diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 75b43611ec8..9005d5c6023 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -29,21 +29,6 @@ jobs: testResultsFiles: 'src/Tests/Tests/**/*.trx' testRunTitle: Windows Unit Tests -- job: LinuxUnitTests - pool: - vmImage: 'ubuntu-16.04' - steps: - - task: UseDotNet@2 - inputs: - version: '3.0.100' - - script: ./build.sh test-one - displayName: 'build and unit test' - - task: PublishTestResults@2 - inputs: - testRunner: VSTest - testResultsFiles: 'src/Tests/Tests/**/*.trx' - testRunTitle: Linux Unit Tests - - job: WindowsIntegrationTests dependsOn: WindowsCanaryTests pool: diff --git a/src/Elasticsearch.sln b/src/Elasticsearch.sln index f160ec9b3d6..9c48e2911fe 100644 --- a/src/Elasticsearch.sln +++ b/src/Elasticsearch.sln @@ -85,6 +85,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExamplesGenerator", "Exampl EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Tests.YamlRunner", "Tests\Tests.YamlRunner\Tests.YamlRunner.fsproj", "{81473437-5722-4829-A5CD-125B17CCA238}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jenkins", "..\.jenkins\Jenkins.csproj", "{5A9C1B95-9280-433E-8D1B-1F5396126166}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -115,6 +117,7 @@ Global {27BFE628-6BE9-48E7-891F-E228DBF0E294} = {40A4ECFA-F8A7-4560-861E-0B8A1DE1C49D} {78B04D5D-FBB1-4E4D-B484-45953B9480C8} = {40A4ECFA-F8A7-4560-861E-0B8A1DE1C49D} {81473437-5722-4829-A5CD-125B17CCA238} = {6C4A2627-AF22-4388-9DF7-7A9AEACFD635} + {5A9C1B95-9280-433E-8D1B-1F5396126166} = {432D5575-2347-4D3C-BF8C-3E38410C46CA} EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {5B393962-7586-49BA-BD99-3B1E35F48E94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU @@ -189,5 +192,9 @@ Global {81473437-5722-4829-A5CD-125B17CCA238}.Debug|Any CPU.Build.0 = Debug|Any CPU {81473437-5722-4829-A5CD-125B17CCA238}.Release|Any CPU.ActiveCfg = Release|Any CPU {81473437-5722-4829-A5CD-125B17CCA238}.Release|Any CPU.Build.0 = Release|Any CPU + {5A9C1B95-9280-433E-8D1B-1F5396126166}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5A9C1B95-9280-433E-8D1B-1F5396126166}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5A9C1B95-9280-433E-8D1B-1F5396126166}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5A9C1B95-9280-433E-8D1B-1F5396126166}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj index 7a978be268d..e9e4f1e194b 100644 --- a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj +++ b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj @@ -24,13 +24,13 @@ + + - - From b59f1aab9566d54848b27160d6c91d40c657d793 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 8 Oct 2019 15:06:25 +0200 Subject: [PATCH 69/85] .jenkins build --- .dockerignore | 50 +++++++++++++++++++++++++++++++++++ .jenkins/DockerFile | 31 ++++++++++++++++++++++ .jenkins/jobs/defaults.yml | 10 +++---- .jenkins/run-elasticsearch.sh | 29 +++++++++++--------- .jenkins/run-tests | 36 ++++++++++++++----------- .jenkins/test-matrix.yml | 6 ++--- build/scripts/Commandline.fs | 1 + build/scripts/Paths.fs | 3 ++- build/scripts/Projects.fs | 2 ++ build/scripts/ReposTooling.fs | 5 ++++ build/scripts/Targets.fs | 2 ++ 11 files changed, 137 insertions(+), 38 deletions(-) create mode 100644 .dockerignore create mode 100644 .jenkins/DockerFile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000000..d11d281070c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,50 @@ +scripts/output +.git + + +.git + +**/Obj/ +**/obj/ +**/bin/ +**/Bin/ +.vs/ +*.xap +*.user +/TestResults +*.vspscc +*.vssscc +*.suo +*.cache +*.docstates +_ReSharper.* +*.csproj.user +*[Rr]e[Ss]harper.user +_ReSharper.*/ +packages/* +artifacts/* +msbuild.log +PublishProfiles/ +*.psess +*.vsp +*.pidb +*.userprefs +*DS_Store +*.ncrunchsolution +*.log +*.vspx +/.symbols +nuget.exe +*net45.csproj +*k10.csproj +App_Data/ +bower_components +node_modules +*.sln.ide +*.ng.ts +*.sln.ide +.build/ +.testpublish/ +launchSettings.json +bin +obj diff --git a/.jenkins/DockerFile b/.jenkins/DockerFile new file mode 100644 index 00000000000..7b3f643830a --- /dev/null +++ b/.jenkins/DockerFile @@ -0,0 +1,31 @@ +ARG DOTNET_VERSION=3.0.100 +FROM mcr.microsoft.com/dotnet/core/sdk:${DOTNET_VERSION} AS elasticsearch-net-build + +WORKDIR /sln + +COPY ./*.sln ./nuget.config ./ +COPY ./src/*.sln ./src/ + +# todo standardize on Build.props as Directory.Build.props needs that form +COPY ./src/*.Build.props ./src/*.build.props ./src/ + +# consider flattening our repos to just projects under ./src and ./test + +# Copy the main source project files +COPY src/*/*.?sproj ./src/ +COPY src/Auxiliary/*/*.?sproj ./src/Auxiliary/ +COPY src/CodeGeneration/*/*.?sproj ./src/CodeGeneration/ +COPY src/Examples/*/*.?sproj ./src/Examples/ +COPY src/Tests/*/*.?sproj ./src/Tests/ +RUN ls -al +RUN find . -name "*.?sproj" +# RUN for file in $(find . -name "*.?sproj"); do echo "$file => $(dirname $file)/$(basename ${file%.*})/"; done +RUN for file in $(find . -name "*.?sproj"); do mkdir -p $(dirname $file)/$(basename ${file%.*})/ && mv $file $(dirname $file)/$(basename ${file%.*})/; done +COPY build/scripts/scripts.fsproj ./build/scripts/ +COPY .jenkins/Jenkins.csproj ./.jenkins/ + +RUN dotnet restore src/Elasticsearch.sln + +# Install app dependencies + +COPY . . \ No newline at end of file diff --git a/.jenkins/jobs/defaults.yml b/.jenkins/jobs/defaults.yml index b2bb8f1c010..40100bf56a9 100755 --- a/.jenkins/jobs/defaults.yml +++ b/.jenkins/jobs/defaults.yml @@ -20,7 +20,7 @@ <commitId>, etc.) properties: - github: - url: https://github.com/elastic/go-elasticsearch/ + url: https://github.com/elastic/elasticsearch-net/ - inject: properties-content: HOME=$JENKINS_HOME concurrent: true @@ -29,10 +29,10 @@ - git: name: origin credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba - reference-repo: /var/lib/jenkins/.git-references/go-elasticsearch.git + reference-repo: /var/lib/jenkins/.git-references/elasticsearch-net.git branches: - ${branch_specifier} - url: git@github.com:elastic/go-elasticsearch.git + url: git@github.com:elastic/elasticsearch-net.git basedir: '' wipe-workspace: 'True' triggers: @@ -47,10 +47,6 @@ type: yaml filename: .jenkins/test-matrix.yml name: ELASTICSEARCH_VERSION - - axis: - type: yaml - filename: .jenkins/test-matrix.yml - name: GO_VERSION - axis: type: yaml filename: .jenkins/test-matrix.yml diff --git a/.jenkins/run-elasticsearch.sh b/.jenkins/run-elasticsearch.sh index cac4a0d6c8f..ebbe285f78d 100755 --- a/.jenkins/run-elasticsearch.sh +++ b/.jenkins/run-elasticsearch.sh @@ -13,10 +13,11 @@ fi set -euxo pipefail moniker=$(echo "$ELASTICSEARCH_VERSION" | tr -C "[:alnum:]" '-') +suffix=rest-test NODE_NAME=${moniker}${NODE_NAME-node1} MASTER_NODE_NAME=${MASTER_NODE_NAME-${moniker}node1} -CLUSTER_NAME=${CLUSTER_NAME-${moniker}yaml} +CLUSTER_NAME=${CLUSTER_NAME-${moniker}${suffix}} HTTP_PORT=${HTTP_PORT-9200} ELASTIC_PASSWORD=${ELASTIC_PASSWORD-changeme} @@ -27,8 +28,9 @@ SSL_CA=${SSL_CA-"$PWD/certs/ca.crt"} DETACH=${DETACH-false} CLEANUP=${CLEANUP-false} -volume_name=${NODE_NAME}-yaml-data -network_name=${moniker}yaml +volume_name=${NODE_NAME}-${suffix}-data +network_default=${moniker}${suffix} +NETWORK_NAME=${NETWORK_NAME-"$network_default"} set +x @@ -40,9 +42,9 @@ function cleanup_volume { } function cleanup_node { if [[ "$(docker ps -q -f name=$1)" ]]; then - cleanup_volume "$1-yaml-data" echo -e "\033[34;1mINFO:\033[0m Removing container $1\033[0m" (docker container rm --force --volumes "$1") || true + cleanup_volume "$1-${suffix}-data" fi } function cleanup_network { @@ -59,18 +61,22 @@ function cleanup { fi if [[ "$DETACH" != "true" ]]; then echo -e "\033[34;1mINFO:\033[0m clean the network if not detached (start and exit)\033[0m" - cleanup_network "$network_name" + cleanup_network "$NETWORK_NAME" fi }; trap "cleanup 0" EXIT if [[ "$CLEANUP" == "true" ]]; then trap - EXIT - containers=$(docker network inspect -f '{{ range $key, $value := .Containers }}{{ printf "%s\n" .Name}}{{ end }}' ${network_name}) + if [[ -z "$(docker network ls -q -f name=${NETWORK_NAME})" ]]; then + echo -e "\033[34;1mINFO:\033[0m $NETWORK_NAME is already deleted\033[0m" + exit 0 + fi + containers=$(docker network inspect -f '{{ range $key, $value := .Containers }}{{ printf "%s\n" .Name}}{{ end }}' ${NETWORK_NAME}) while read -r container; do cleanup_node "$container" done <<< "$containers" - cleanup_network "$network_name" + cleanup_network "$NETWORK_NAME" echo -e "\033[32;1mSUCCESS:\033[0m Cleaned up and exiting\033[0m" exit 0 fi @@ -78,8 +84,8 @@ fi echo -e "\033[34;1mINFO:\033[0m Making sure previous run leftover infrastructure is removed \033[0m" cleanup 1 -echo -e "\033[34;1mINFO:\033[0m Creating network $network_name if it does not exist already \033[0m" -docker network inspect "$network_name" > /dev/null 2>&1 || docker network create "$network_name" +echo -e "\033[34;1mINFO:\033[0m Creating network $NETWORK_NAME if it does not exist already \033[0m" +docker network inspect "$NETWORK_NAME" > /dev/null 2>&1 || docker network create "$NETWORK_NAME" environment=($(cat <<-END --env node.name=$NODE_NAME @@ -131,9 +137,8 @@ fi echo -e "\033[34;1mINFO:\033[0m Starting container $NODE_NAME \033[0m" set -x docker run \ - -h "$NODE_NAME" \ --name "$NODE_NAME" \ - --network "$network_name" \ + --network "$NETWORK_NAME" \ --env ES_JAVA_OPTS=-"Xms1g -Xmx1g" \ "${environment[@]}" \ "${volumes[@]}" \ @@ -165,7 +170,7 @@ if [[ "$DETACH" == "true" ]]; then exit 1 else echo - echo -e "\033[32;1mSUCCESS:\033[0m Detached and healthy: ${NODE_NAME} on docker network: ${network_name}\033[0m" + echo -e "\033[32;1mSUCCESS:\033[0m Detached and healthy: ${NODE_NAME} on docker network: ${NETWORK_NAME}\033[0m" echo -e "\033[32;1mSUCCESS:\033[0m Running on: ${url/$NODE_NAME/localhost}:${HTTP_PORT}\033[0m" exit 0 fi diff --git a/.jenkins/run-tests b/.jenkins/run-tests index c4c87fbafef..3ea086f4705 100755 --- a/.jenkins/run-tests +++ b/.jenkins/run-tests @@ -1,26 +1,32 @@ #!/usr/bin/env bash -set -eo pipefail - -if [[ -z $TEST_SUITE ]]; then - echo -e "\033[31;1mERROR:\033[0m Required environment variable [TEST_SUITE] not set\033[0m" +if [[ -z $ELASTICSEARCH_VERSION ]]; then + echo -e "\033[31;1mERROR:\033[0m Required environment variable [ELASTICSEARCH_VERSION] not set\033[0m" exit 1 fi -if [[ $TEST_SUITE != "oss" && $TEST_SUITE != "xpack" ]]; then - echo -e "\033[31;1mERROR:\033[0m Unknown value [$TEST_SUITE] for [TEST_SUITE]\033[0m" - exit 1 -fi +set -euxo pipefail -if [[ $TEST_SUITE == "oss" ]]; then - elasticsearch_image=elasticsearch-oss:8.0.0-SNAPSHOT - elasticsearch_url=http://es1:9200 +TEST_SUITE=${TEST_SUITE-oss} +elasticsearch_image=elasticsearch +elasticsearch_url=https://elastic:changeme@localhost:9200 +if [[ $TEST_SUITE != "xpack" ]]; then + elasticsearch_image=elasticsearch-${TEST_SUITE} + elasticsearch_url=http://localhost:9200 fi -if [[ $TEST_SUITE == "xpack" ]]; then - elasticsearch_image=elasticsearch:8.0.0-SNAPSHOT - elasticsearch_url=https://elastic:elastic@es1:9200 -fi +echo -e "\033[1m>>>>> Start [$ELASTICSEARCH_VERSION container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" + +ELASTICSEARCH_VERSION=$(elasticsearch_image):$(ELASTICSEARCH_VERSION) +NETWORK_NAME=elasticsearch +bash ./run-elasticsearch.sh + +echo -e "\033[1m>>>>> Start [dotnet $DOTNET_VERSION container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" + +docker run --rm "mcr.microsoft.com/dotnet/core/sdk:DOTNET_VERSION" + +docker build --file .jenkins/DockerFile --tag elastic/elasticsearch-net . + function cleanup { docker container rm --force --volumes es1 > /dev/null 2>&1 || true diff --git a/.jenkins/test-matrix.yml b/.jenkins/test-matrix.yml index 84149d54515..1f285c7edf0 100755 --- a/.jenkins/test-matrix.yml +++ b/.jenkins/test-matrix.yml @@ -3,11 +3,11 @@ ELASTICSEARCH_VERSION: - 8.0.0-SNAPSHOT -DOTNET_VERSION: - - 3.0.100 - TEST_SUITE: - oss - xpack + - +DOTNET_VERSION: + - 3.0.100 exclude: ~ diff --git a/build/scripts/Commandline.fs b/build/scripts/Commandline.fs index ccecfce4116..40af4e93025 100644 --- a/build/scripts/Commandline.fs +++ b/build/scripts/Commandline.fs @@ -200,6 +200,7 @@ Execution hints can be provided anywhere on the command line | ["touch"; ] -> parsed | ["temp"; ] -> parsed | "diff" :: tail -> { parsed with RemainingArguments = tail } + | "rest-spec-tests" :: tail -> { parsed with RemainingArguments = tail } | ["canary"; ] -> parsed | ["codegen"; ] -> parsed diff --git a/build/scripts/Paths.fs b/build/scripts/Paths.fs index 733e948b5a6..88ed42ea199 100644 --- a/build/scripts/Paths.fs +++ b/build/scripts/Paths.fs @@ -38,7 +38,8 @@ module Paths = | _ -> sprintf "%s/%s/%s.csproj" SourceFolder project.Name project.Name | PrivateProject p -> match p with - | Tests -> sprintf "%s/%s/%s.csproj" SourceFolder project.Name project.Name + | Tests -> sprintf "%s/Tests/%s/%s.csproj" SourceFolder project.Name project.Name + | RestSpecTestRunner -> sprintf "%s/Tests/%s/%s.csproj" SourceFolder project.Name project.Name | DocGenerator -> sprintf "%s/CodeGeneration/%s/%s.csproj" SourceFolder project.Name project.Name | ApiGenerator -> sprintf "%s/CodeGeneration/%s/%s.csproj" SourceFolder project.Name project.Name diff --git a/build/scripts/Projects.fs b/build/scripts/Projects.fs index ece40dede52..57e62fc2d22 100644 --- a/build/scripts/Projects.fs +++ b/build/scripts/Projects.fs @@ -26,6 +26,7 @@ module Projects = | Tests | DocGenerator | ApiGenerator + | RestSpecTestRunner type DotNetProject = | Project of Project @@ -65,6 +66,7 @@ module Projects = | PrivateProject Tests -> "Tests" | PrivateProject DocGenerator -> "DocGenerator" | PrivateProject ApiGenerator -> "ApiGenerator" + | PrivateProject RestSpecTestRunner -> "Tests.YamlRunner" member this.NugetId = match this with diff --git a/build/scripts/ReposTooling.fs b/build/scripts/ReposTooling.fs index 4b132816fb2..fd6da1d040e 100644 --- a/build/scripts/ReposTooling.fs +++ b/build/scripts/ReposTooling.fs @@ -30,4 +30,9 @@ module ReposTooling = let folder = Path.getDirectory (Paths.ProjFile <| DotNetProject.PrivateProject PrivateProject.ApiGenerator) let timeout = TimeSpan.FromMinutes(120.) Tooling.DotNet.ExecInWithTimeout folder ["run"; ] timeout |> ignore + + let RestSpecTests args = + let folder = Path.getDirectory (Paths.ProjFile <| DotNetProject.PrivateProject PrivateProject.RestSpecTestRunner) + let timeout = TimeSpan.FromMinutes(120.) + Tooling.DotNet.ExecInWithTimeout folder (["run"; "--" ] @ args) timeout |> ignore diff --git a/build/scripts/Targets.fs b/build/scripts/Targets.fs index dd527f6309a..67521c4be27 100644 --- a/build/scripts/Targets.fs +++ b/build/scripts/Targets.fs @@ -98,6 +98,8 @@ module Main = ] (fun _ -> printfn "Finished Release Build %O" artifactsVersion) command "diff" [ "clean"; ] <| fun _ -> Differ.Run parsed + + command "rest-spec-tests" [ ] <| fun _ -> ReposTooling.RestSpecTests parsed.RemainingArguments command "cluster" [ "restore"; "full-build" ] <| fun _ -> ReposTooling.LaunchCluster parsed From efb7bd646b52a596bd0e20f653b7b73a323fa932 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 8 Oct 2019 16:47:50 +0200 Subject: [PATCH 70/85] update our .jenkins folder --- .jenkins/DockerFile | 9 +- .jenkins/jobs/defaults.yml | 6 +- ....yml => elastic+elasticsearch-net+7.x.yml} | 0 ...l => elastic+elasticsearch-net+master.yml} | 0 .../jobs/elastic+go-elasticsearch+5.x.yml | 14 --- .../jobs/elastic+go-elasticsearch+6.x.yml | 14 --- .jenkins/run-elasticsearch.sh | 4 +- .jenkins/run-tests | 119 ++++++------------ .jenkins/tests-core.sh | 25 ---- .jenkins/tests-xpack.sh | 53 -------- 10 files changed, 48 insertions(+), 196 deletions(-) rename .jenkins/jobs/{elastic+go-elasticsearch+7.x.yml => elastic+elasticsearch-net+7.x.yml} (100%) rename .jenkins/jobs/{elastic+go-elasticsearch+master.yml => elastic+elasticsearch-net+master.yml} (100%) delete mode 100755 .jenkins/jobs/elastic+go-elasticsearch+5.x.yml delete mode 100755 .jenkins/jobs/elastic+go-elasticsearch+6.x.yml delete mode 100755 .jenkins/tests-core.sh delete mode 100644 .jenkins/tests-xpack.sh diff --git a/.jenkins/DockerFile b/.jenkins/DockerFile index 7b3f643830a..fdafec19c91 100644 --- a/.jenkins/DockerFile +++ b/.jenkins/DockerFile @@ -13,14 +13,15 @@ COPY ./src/*.Build.props ./src/*.build.props ./src/ # Copy the main source project files COPY src/*/*.?sproj ./src/ +COPY src/Tests/*/*.?sproj ./src/Tests/ COPY src/Auxiliary/*/*.?sproj ./src/Auxiliary/ COPY src/CodeGeneration/*/*.?sproj ./src/CodeGeneration/ COPY src/Examples/*/*.?sproj ./src/Examples/ -COPY src/Tests/*/*.?sproj ./src/Tests/ -RUN ls -al -RUN find . -name "*.?sproj" -# RUN for file in $(find . -name "*.?sproj"); do echo "$file => $(dirname $file)/$(basename ${file%.*})/"; done + +# this puts the project files back into original location since COPY flattens RUN for file in $(find . -name "*.?sproj"); do mkdir -p $(dirname $file)/$(basename ${file%.*})/ && mv $file $(dirname $file)/$(basename ${file%.*})/; done + +# copy these manually since these do not follow a pattern under src COPY build/scripts/scripts.fsproj ./build/scripts/ COPY .jenkins/Jenkins.csproj ./.jenkins/ diff --git a/.jenkins/jobs/defaults.yml b/.jenkins/jobs/defaults.yml index 40100bf56a9..65f7963e9ae 100755 --- a/.jenkins/jobs/defaults.yml +++ b/.jenkins/jobs/defaults.yml @@ -47,6 +47,10 @@ type: yaml filename: .jenkins/test-matrix.yml name: ELASTICSEARCH_VERSION + - axis: + type: yaml + filename: .jenkins/test-matrix.yml + name: DOTNET_VERSION - axis: type: yaml filename: .jenkins/test-matrix.yml @@ -70,5 +74,5 @@ - email: recipients: infra-root+build@elastic.co - junit: - results: "*-junit.xml" + results: "build/output/*-junit.xml" allow-empty-results: true diff --git a/.jenkins/jobs/elastic+go-elasticsearch+7.x.yml b/.jenkins/jobs/elastic+elasticsearch-net+7.x.yml similarity index 100% rename from .jenkins/jobs/elastic+go-elasticsearch+7.x.yml rename to .jenkins/jobs/elastic+elasticsearch-net+7.x.yml diff --git a/.jenkins/jobs/elastic+go-elasticsearch+master.yml b/.jenkins/jobs/elastic+elasticsearch-net+master.yml similarity index 100% rename from .jenkins/jobs/elastic+go-elasticsearch+master.yml rename to .jenkins/jobs/elastic+elasticsearch-net+master.yml diff --git a/.jenkins/jobs/elastic+go-elasticsearch+5.x.yml b/.jenkins/jobs/elastic+go-elasticsearch+5.x.yml deleted file mode 100755 index bff81cf84b3..00000000000 --- a/.jenkins/jobs/elastic+go-elasticsearch+5.x.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- job: - name: elastic+go-elasticsearch+5.x - display-name: 'elastic / go-elasticsearch # 5.x' - description: Testing the go-elasticsearch 5.x branch. - junit_results: "*-junit.xml" - parameters: - - string: - name: branch_specifier - default: refs/heads/5.x - description: The Git branch specifier to build - triggers: - - github - - timed: '@daily' diff --git a/.jenkins/jobs/elastic+go-elasticsearch+6.x.yml b/.jenkins/jobs/elastic+go-elasticsearch+6.x.yml deleted file mode 100755 index 4175ed2a5b6..00000000000 --- a/.jenkins/jobs/elastic+go-elasticsearch+6.x.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- job: - name: elastic+go-elasticsearch+6.x - display-name: 'elastic / go-elasticsearch # 6.x' - description: Testing the go-elasticsearch 6.x branch. - junit_results: "*-junit.xml" - parameters: - - string: - name: branch_specifier - default: refs/heads/6.x - description: The Git branch specifier to build - triggers: - - github - - timed: '@daily' diff --git a/.jenkins/run-elasticsearch.sh b/.jenkins/run-elasticsearch.sh index ebbe285f78d..c965f39851e 100755 --- a/.jenkins/run-elasticsearch.sh +++ b/.jenkins/run-elasticsearch.sh @@ -15,8 +15,8 @@ set -euxo pipefail moniker=$(echo "$ELASTICSEARCH_VERSION" | tr -C "[:alnum:]" '-') suffix=rest-test -NODE_NAME=${moniker}${NODE_NAME-node1} -MASTER_NODE_NAME=${MASTER_NODE_NAME-${moniker}node1} +NODE_NAME=${NODE_NAME-${moniker}node1} +MASTER_NODE_NAME=${MASTER_NODE_NAME-${NODE_NAME}} CLUSTER_NAME=${CLUSTER_NAME-${moniker}${suffix}} HTTP_PORT=${HTTP_PORT-9200} diff --git a/.jenkins/run-tests b/.jenkins/run-tests index 3ea086f4705..343db8ae3bb 100755 --- a/.jenkins/run-tests +++ b/.jenkins/run-tests @@ -4,105 +4,58 @@ if [[ -z $ELASTICSEARCH_VERSION ]]; then echo -e "\033[31;1mERROR:\033[0m Required environment variable [ELASTICSEARCH_VERSION] not set\033[0m" exit 1 fi - set -euxo pipefail TEST_SUITE=${TEST_SUITE-oss} +DOTNET_VERSION=${TEST_SUITE-3.0.100} +NODE_NAME=es1 + +repo=$(pwd) elasticsearch_image=elasticsearch -elasticsearch_url=https://elastic:changeme@localhost:9200 +elasticsearch_url=https://elastic:changeme@${NODE_NAME}:9200 if [[ $TEST_SUITE != "xpack" ]]; then elasticsearch_image=elasticsearch-${TEST_SUITE} - elasticsearch_url=http://localhost:9200 + elasticsearch_url=http://${NODE_NAME}:9200 fi -echo -e "\033[1m>>>>> Start [$ELASTICSEARCH_VERSION container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" - -ELASTICSEARCH_VERSION=$(elasticsearch_image):$(ELASTICSEARCH_VERSION) -NETWORK_NAME=elasticsearch -bash ./run-elasticsearch.sh - -echo -e "\033[1m>>>>> Start [dotnet $DOTNET_VERSION container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" - -docker run --rm "mcr.microsoft.com/dotnet/core/sdk:DOTNET_VERSION" - -docker build --file .jenkins/DockerFile --tag elastic/elasticsearch-net . - - function cleanup { - docker container rm --force --volumes es1 > /dev/null 2>&1 || true - docker container rm --force --volumes elasticsearch-source > /dev/null 2>&1 || true - docker container rm --force --volumes go-elasticsearch > /dev/null 2>&1 || true + status=$? + set +x + ELASTICSEARCH_VERSION=${elasticsearch_image}:${ELASTICSEARCH_VERSION} \ + NODE_NAME=${NODE_NAME} \ + NETWORK_NAME=elasticsearch \ + CLEANUP=true \ + bash ./.jenkins/run-elasticsearch.sh + # Report status and exit + if [[ "$status" == "0" ]]; then + echo -e "\n\033[32;1mSUCCESS run-tests\033[0m" + exit 0 + else + echo -e "\n\033[31;1mFAILURE during run-tests\033[0m" + exit ${status} + fi } - trap cleanup EXIT -TIMEFORMAT="(Duration: %0lR)" - -echo -e "\033[1m>>>>> SETUP [$TEST_SUITE] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" +echo -e "\033[1m>>>>> Start [$ELASTICSEARCH_VERSION container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" -# Build the go-elasticsearch image -docker build --file Dockerfile --tag elastic/go-elasticsearch . +ELASTICSEARCH_VERSION=${elasticsearch_image}:${ELASTICSEARCH_VERSION} \ + NODE_NAME=${NODE_NAME} \ + NETWORK_NAME=elasticsearch \ + DETACH=true \ + bash ./.jenkins/run-elasticsearch.sh -# Launch a single Elasticsearch node -(make cluster detached=true version=$elasticsearch_image) +echo -e "\033[1m>>>>> Build [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" -# Store the Elasticsearch version and build hash -ELASTICSEARCH_VERSION=$(docker run --network elasticsearch --rm appropriate/curl -sSk $elasticsearch_url | docker run -i --rm stedolan/jq -r '.version.number') -ELASTICSEARCH_BUILD_HASH=$(docker run --network elasticsearch --rm appropriate/curl -sSk $elasticsearch_url | docker run -i --rm stedolan/jq -r '.version.build_hash') +docker build --file .jenkins/DockerFile --tag elastic/elasticsearch-net . -# Download Elasticsearch source code at ELASTICSEARCH_BUILD_HASH and store it in a container -echo -e ">>>>> Downloading Elasticsearch repository @ $ELASTICSEARCH_BUILD_HASH..." -time docker run --rm appropriate/curl --retry 3 -sSL "https://github.com/elastic/elasticsearch/archive/$ELASTICSEARCH_BUILD_HASH.zip" > "/tmp/elasticsearch-$ELASTICSEARCH_BUILD_HASH.zip" -echo -e ">>>>> Extracting and storing to [elasticsearch-source] container..." -time docker run --volume=/tmp:/tmp --workdir=/tmp --rm elastic/go-elasticsearch unzip -q -o "elasticsearch-$ELASTICSEARCH_BUILD_HASH.zip" '*.properties' '*.json' '*.y*ml' -docker run --volume=/tmp:/tmp --workdir=/tmp --rm elastic/go-elasticsearch /bin/sh -c " - rm -rf /tmp/elasticsearch-$ELASTICSEARCH_BUILD_HASH.zip - rm -rf /tmp/elasticsearch/ - mv /tmp/elasticsearch-$ELASTICSEARCH_BUILD_HASH* /tmp/elasticsearch/ -" -docker create --name elasticsearch-source --volume /elasticsearch-source --name elasticsearch-source alpine /bin/true -docker cp /tmp/elasticsearch elasticsearch-source:/elasticsearch-source +echo -e "\033[1m>>>>> Run [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" -# Launch the container; actual commands are called with "docker exec" docker run \ - --name go-elasticsearch \ - --network elasticsearch \ - --env "ELASTICSEARCH_URL=$elasticsearch_url" \ - --env "ELASTICSEARCH_VERSION=$ELASTICSEARCH_VERSION" \ - --env "ELASTICSEARCH_BUILD_HASH=$ELASTICSEARCH_BUILD_HASH" \ - --env "WORKSPACE=${WORKSPACE:-/workspace}" \ - --volume "/go-elasticsearch" \ - --volume "${WORKSPACE:-workspace}:${WORKSPACE:-/workspace}" \ - --volumes-from "elasticsearch-source" \ + --network=elasticsearch \ + --env "DOTNET_VERSION" \ + --name test-runner \ + --volume ${repo}:/sln \ --rm \ - --detach \ - elastic/go-elasticsearch sleep 3600 - -# Run the tests -# NOTE: Conditions needed to prevent early exit due to the 'set -e' option -status=100 -case $TEST_SUITE in - "core" ) - if bash .jenkins/tests-core.sh; then - status=$? - else - status=$? - fi - ;; - "xpack" ) - if bash .jenkins/tests-xpack.sh; then - status=$? - else - status=$? - fi - ;; -esac - -# Report status and exit -if [[ $status == "0" ]]; then - echo -e "\n\033[32;1mSUCCESS\033[0m" - exit 0 -else - echo -e "\n\033[31;1mFAILURE\033[0m" - exit $status -fi + elastic/elasticsearch-net \ + ./build.sh rest-spec-tests -f create -e ${elasticsearch_url} -o /sln/build/output/rest-spec-junit.xml diff --git a/.jenkins/tests-core.sh b/.jenkins/tests-core.sh deleted file mode 100755 index 34d4300d47c..00000000000 --- a/.jenkins/tests-core.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -TIMEFORMAT="(Duration: %0lR)" - -echo -e "\033[1m>>>>> Cleaning up test files\033[0m" - -docker exec go-elasticsearch /bin/sh -c 'rm -rf esapi/test/*_test.go' -docker exec go-elasticsearch /bin/sh -c 'rm -rf esapi/test/xpack' - -echo -e "\033[1m>>>>> Generating the API registry\033[0m" - -docker exec --workdir=/go-elasticsearch/internal/cmd/generate --env PACKAGE_PATH=/go-elasticsearch/esapi go-elasticsearch go generate ./... - -echo -e "\033[1m>>>>> Generating the test files\033[0m" - -time docker exec --tty --workdir=/go-elasticsearch/internal/cmd/generate go-elasticsearch go run main.go apitests --output '/go-elasticsearch/esapi/test' --input '/elasticsearch-source/elasticsearch/rest-api-spec/src/main/resources/rest-api-spec/test/**/*.y*ml' - -echo -e "\033[1m>>>>> Running the tests\033[0m" - -time docker exec --tty --workdir=/go-elasticsearch/esapi/test go-elasticsearch /bin/sh -c 'gotestsum --format=short-verbose --junitfile=$WORKSPACE/TEST-integration-api-junit.xml -- -tags=integration -timeout=1h *_test.go' -status=$? - -exit $status diff --git a/.jenkins/tests-xpack.sh b/.jenkins/tests-xpack.sh deleted file mode 100644 index 64ba4e83021..00000000000 --- a/.jenkins/tests-xpack.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -TIMEFORMAT="(Duration: %0lR)" - -echo -e "\033[1m>>>>> Cleaning up test files\033[0m" - -docker exec go-elasticsearch /bin/sh -c 'rm -rf esapi/test/*_test.go' -docker exec go-elasticsearch /bin/sh -c 'rm -rf rm -rf esapi/test/ml*' - -echo -e "\033[1m>>>>> Generating the API registry\033[0m" - -docker exec --workdir=/go-elasticsearch/internal/cmd/generate --env PACKAGE_PATH=/go-elasticsearch/esapi go-elasticsearch go generate ./... - -echo -e "\033[1m>>>>> Generating the test files\033[0m" - -time docker exec --tty --workdir=/go-elasticsearch/internal/cmd/generate go-elasticsearch go run main.go apitests --output '/go-elasticsearch/esapi/test/xpack' --input '/elasticsearch-source/elasticsearch/x-pack/plugin/src/test/resources/rest-api-spec/test/**/*.yml' - -time docker exec --tty --workdir=/go-elasticsearch/internal/cmd/generate go-elasticsearch go run main.go apitests --output '/go-elasticsearch/esapi/test/xpack' --input '/elasticsearch-source/elasticsearch/x-pack/plugin/src/test/resources/rest-api-spec/test/**/**/*.yml' - -docker exec go-elasticsearch mkdir -p esapi/test/xpack/ml -docker exec go-elasticsearch mkdir -p esapi/test/xpack/ml-crud - -docker exec go-elasticsearch /bin/sh -c 'mv esapi/test/xpack/xpack_ml* esapi/test/xpack/ml/' -docker exec go-elasticsearch mv esapi/test/xpack/ml/xpack_ml__jobs_crud_test.go esapi/test/xpack/ml-crud/ - -echo -e "\033[1m>>>>> Running tests: XPACK >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" - -time docker exec --tty --workdir=/go-elasticsearch/esapi/test go-elasticsearch /bin/sh -c 'gotestsum --format=short-verbose --junitfile=$WORKSPACE/TEST-integration-api-xpack-junit.xml -- --tags=integration --timeout=1h -v xpack/*_test.go' -status1=$? - -docker container rm --force --volumes es1 > /dev/null 2>&1 -make cluster-clean cluster version=elasticsearch:8.0.0-SNAPSHOT detached=true - -echo -e "\033[1m>>>>> Running tests: XPACK ML >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" - -time docker exec --tty --workdir=/go-elasticsearch/esapi/test go-elasticsearch /bin/sh -c 'gotestsum --format=short-verbose --junitfile=$WORKSPACE/TEST-integration-api-xpack-ml-junit.xml -- --tags=integration --timeout=1h -v ./xpack/ml/*_test.go' -status2=$? - -docker container rm --force --volumes es1 > /dev/null 2>&1 -make cluster-clean cluster version=elasticsearch:8.0.0-SNAPSHOT detached=true - -echo -e "\033[1m>>>>> Running tests: XPACK ML CRUD >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" - -time docker exec --tty --workdir=/go-elasticsearch/esapi/test go-elasticsearch /bin/sh -c 'gotestsum --format=short-verbose --junitfile=$WORKSPACE/TEST-integration-api-xpack-ml-crud-junit.xml -- --tags=integration --timeout=1h -v ./xpack/ml-crud/*_test.go' -status3=$? - -if [[ $status1 == 0 && $status2 == 0 || $status3 == 0 ]]; then - exit 0 -else - exit 0 -fi From 9c8f11451b1660343ec45db4ee5f756ef62ba020 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 8 Oct 2019 20:08:06 +0200 Subject: [PATCH 71/85] update runner to pretty print failures --- .jenkins/run-tests | 4 +++- src/Tests/Tests.YamlRunner/Commands.fs | 4 +++- src/Tests/Tests.YamlRunner/Program.fs | 4 ++-- src/Tests/Tests.YamlRunner/TestsExporter.fs | 15 +++++++++++++++ 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/.jenkins/run-tests b/.jenkins/run-tests index 343db8ae3bb..a7aa9e91324 100755 --- a/.jenkins/run-tests +++ b/.jenkins/run-tests @@ -51,11 +51,13 @@ docker build --file .jenkins/DockerFile --tag elastic/elasticsearch-net . echo -e "\033[1m>>>>> Run [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" +mkdir -p build/output + docker run \ --network=elasticsearch \ --env "DOTNET_VERSION" \ --name test-runner \ - --volume ${repo}:/sln \ + --volume ${repo}/build/output:/sln/build/output \ --rm \ elastic/elasticsearch-net \ ./build.sh rest-spec-tests -f create -e ${elasticsearch_url} -o /sln/build/output/rest-spec-junit.xml diff --git a/src/Tests/Tests.YamlRunner/Commands.fs b/src/Tests/Tests.YamlRunner/Commands.fs index 614ff27ba4a..367426c1413 100644 --- a/src/Tests/Tests.YamlRunner/Commands.fs +++ b/src/Tests/Tests.YamlRunner/Commands.fs @@ -60,5 +60,7 @@ let RunTests (tests:YamlTestFolder list) client = async { return x } -let ExportTests = TestsExporter.Export +let ExportTests = TestsExporter.Export + +let PrettyPrintResults = TestsExporter.PrettyPrintResults diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index 066d16d9363..928da49a18d 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -80,9 +80,9 @@ let runMain (parsed:ParseResults) = async { let! runResults = Commands.RunTests readResults client let summary = Commands.ExportTests runResults outputFile - let contents = System.IO.File.ReadAllText outputFile - printfn "%s" contents + Commands.PrettyPrintResults outputFile + printfn "JUnit output: %s" outputFile printfn "Total Tests: %i Failed: %i Errors: %i Skipped: %i" summary.Tests summary.Failed summary.Errors summary.Skipped printfn "Total Time %O" <| TimeSpan.FromSeconds summary.Time diff --git a/src/Tests/Tests.YamlRunner/TestsExporter.fs b/src/Tests/Tests.YamlRunner/TestsExporter.fs index f8dc6657c1e..927d6f4dd41 100644 --- a/src/Tests/Tests.YamlRunner/TestsExporter.fs +++ b/src/Tests/Tests.YamlRunner/TestsExporter.fs @@ -116,3 +116,18 @@ let Export (results: RunResults) (outputFile:string) = xml.Save(outputFile) summary + +let PrettyPrintResults (outputFile:string) = + let fullPath = System.IO.Path.GetFullPath outputFile + + let xml = XDocument.Load fullPath + let xp (e:XElement) = e.XPathSelectElements + + for suite in (xp xml.Root "//testsuite[testcase[failure|error]]") do + printfn "%s" <| suite.Attribute(XName.Get "name").Value + for testcase in (xp suite "testcase[failure|error]") do + printfn " %s" <| testcase.Attribute(XName.Get "name").Value + for error in (xp testcase "failure|error") do + printfn " %s" <| error.Attribute(XName.Get "message").Value + + From ebba665a52228be8447e1054d0fd571d63c7d483 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 8 Oct 2019 20:10:57 +0200 Subject: [PATCH 72/85] move from .jenkins folder to .ci --- {.jenkins => .ci}/DockerFile | 2 +- {.jenkins => .ci}/Jenkins.csproj | 0 {.jenkins => .ci}/certs/ca.crt | 0 {.jenkins => .ci}/certs/testnode.crt | 0 {.jenkins => .ci}/certs/testnode.key | 0 {.jenkins => .ci}/jobs/defaults.yml | 10 +++++----- .../jobs/elastic+elasticsearch-net+7.x.yml | 0 .../jobs/elastic+elasticsearch-net+master.yml | 0 {.jenkins => .ci}/run-elasticsearch.sh | 0 {.jenkins => .ci}/run-tests | 6 +++--- {.jenkins => .ci}/test-matrix.yml | 0 src/Elasticsearch.sln | 2 +- 12 files changed, 10 insertions(+), 10 deletions(-) rename {.jenkins => .ci}/DockerFile (96%) rename {.jenkins => .ci}/Jenkins.csproj (100%) rename {.jenkins => .ci}/certs/ca.crt (100%) rename {.jenkins => .ci}/certs/testnode.crt (100%) rename {.jenkins => .ci}/certs/testnode.key (100%) rename {.jenkins => .ci}/jobs/defaults.yml (89%) rename {.jenkins => .ci}/jobs/elastic+elasticsearch-net+7.x.yml (100%) rename {.jenkins => .ci}/jobs/elastic+elasticsearch-net+master.yml (100%) rename {.jenkins => .ci}/run-elasticsearch.sh (100%) rename {.jenkins => .ci}/run-tests (91%) rename {.jenkins => .ci}/test-matrix.yml (100%) diff --git a/.jenkins/DockerFile b/.ci/DockerFile similarity index 96% rename from .jenkins/DockerFile rename to .ci/DockerFile index fdafec19c91..09acc2f0b9f 100644 --- a/.jenkins/DockerFile +++ b/.ci/DockerFile @@ -23,7 +23,7 @@ RUN for file in $(find . -name "*.?sproj"); do mkdir -p $(dirname $file)/$(basen # copy these manually since these do not follow a pattern under src COPY build/scripts/scripts.fsproj ./build/scripts/ -COPY .jenkins/Jenkins.csproj ./.jenkins/ +COPY .ci/Jenkins.csproj ./.ci/ RUN dotnet restore src/Elasticsearch.sln diff --git a/.jenkins/Jenkins.csproj b/.ci/Jenkins.csproj similarity index 100% rename from .jenkins/Jenkins.csproj rename to .ci/Jenkins.csproj diff --git a/.jenkins/certs/ca.crt b/.ci/certs/ca.crt similarity index 100% rename from .jenkins/certs/ca.crt rename to .ci/certs/ca.crt diff --git a/.jenkins/certs/testnode.crt b/.ci/certs/testnode.crt similarity index 100% rename from .jenkins/certs/testnode.crt rename to .ci/certs/testnode.crt diff --git a/.jenkins/certs/testnode.key b/.ci/certs/testnode.key similarity index 100% rename from .jenkins/certs/testnode.key rename to .ci/certs/testnode.key diff --git a/.jenkins/jobs/defaults.yml b/.ci/jobs/defaults.yml similarity index 89% rename from .jenkins/jobs/defaults.yml rename to .ci/jobs/defaults.yml index 65f7963e9ae..24cd03a52f9 100755 --- a/.jenkins/jobs/defaults.yml +++ b/.ci/jobs/defaults.yml @@ -45,19 +45,19 @@ - linux - axis: type: yaml - filename: .jenkins/test-matrix.yml + filename: .ci/test-matrix.yml name: ELASTICSEARCH_VERSION - axis: type: yaml - filename: .jenkins/test-matrix.yml + filename: .ci/test-matrix.yml name: DOTNET_VERSION - axis: type: yaml - filename: .jenkins/test-matrix.yml + filename: .ci/test-matrix.yml name: TEST_SUITE yaml-strategy: exclude-key: exclude - filename: .jenkins/test-matrix.yml + filename: .ci/test-matrix.yml wrappers: - ansicolor - timeout: @@ -69,7 +69,7 @@ builders: - shell: |- #!/usr/local/bin/runbld - .jenkins/run-tests + .ci/run-tests publishers: - email: recipients: infra-root+build@elastic.co diff --git a/.jenkins/jobs/elastic+elasticsearch-net+7.x.yml b/.ci/jobs/elastic+elasticsearch-net+7.x.yml similarity index 100% rename from .jenkins/jobs/elastic+elasticsearch-net+7.x.yml rename to .ci/jobs/elastic+elasticsearch-net+7.x.yml diff --git a/.jenkins/jobs/elastic+elasticsearch-net+master.yml b/.ci/jobs/elastic+elasticsearch-net+master.yml similarity index 100% rename from .jenkins/jobs/elastic+elasticsearch-net+master.yml rename to .ci/jobs/elastic+elasticsearch-net+master.yml diff --git a/.jenkins/run-elasticsearch.sh b/.ci/run-elasticsearch.sh similarity index 100% rename from .jenkins/run-elasticsearch.sh rename to .ci/run-elasticsearch.sh diff --git a/.jenkins/run-tests b/.ci/run-tests similarity index 91% rename from .jenkins/run-tests rename to .ci/run-tests index a7aa9e91324..64bb2684f0c 100755 --- a/.jenkins/run-tests +++ b/.ci/run-tests @@ -25,7 +25,7 @@ function cleanup { NODE_NAME=${NODE_NAME} \ NETWORK_NAME=elasticsearch \ CLEANUP=true \ - bash ./.jenkins/run-elasticsearch.sh + bash ./.ci/run-elasticsearch.sh # Report status and exit if [[ "$status" == "0" ]]; then echo -e "\n\033[32;1mSUCCESS run-tests\033[0m" @@ -43,11 +43,11 @@ ELASTICSEARCH_VERSION=${elasticsearch_image}:${ELASTICSEARCH_VERSION} \ NODE_NAME=${NODE_NAME} \ NETWORK_NAME=elasticsearch \ DETACH=true \ - bash ./.jenkins/run-elasticsearch.sh + bash ./.ci/run-elasticsearch.sh echo -e "\033[1m>>>>> Build [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" -docker build --file .jenkins/DockerFile --tag elastic/elasticsearch-net . +docker build --file .ci/DockerFile --tag elastic/elasticsearch-net . echo -e "\033[1m>>>>> Run [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m" diff --git a/.jenkins/test-matrix.yml b/.ci/test-matrix.yml similarity index 100% rename from .jenkins/test-matrix.yml rename to .ci/test-matrix.yml diff --git a/src/Elasticsearch.sln b/src/Elasticsearch.sln index 9c48e2911fe..c7262b00157 100644 --- a/src/Elasticsearch.sln +++ b/src/Elasticsearch.sln @@ -85,7 +85,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExamplesGenerator", "Exampl EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Tests.YamlRunner", "Tests\Tests.YamlRunner\Tests.YamlRunner.fsproj", "{81473437-5722-4829-A5CD-125B17CCA238}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jenkins", "..\.jenkins\Jenkins.csproj", "{5A9C1B95-9280-433E-8D1B-1F5396126166}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jenkins", "..\.ci\Jenkins.csproj", "{5A9C1B95-9280-433E-8D1B-1F5396126166}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution From ce658499555f92cd2c4d5ddafdc9cbf425318734 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 8 Oct 2019 20:41:01 +0200 Subject: [PATCH 73/85] add readme to the .ci folder --- .ci/readme.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .ci/readme.md diff --git a/.ci/readme.md b/.ci/readme.md new file mode 100644 index 00000000000..fd2abd97729 --- /dev/null +++ b/.ci/readme.md @@ -0,0 +1,67 @@ +## Jenkins test folder + +This `.ci` folder is used by https://clients-ci.elastic.co + +Where each Elasticsearch client runs the [rest api spec test](https://github.com/elastic/elasticsearch/tree/master/rest-api-spec/src/main/resources/rest-api-spec/test) +as defined by the Elasticsearch team. + +Each client starts the cluster using the same `.ci/run-elasticsearch` from `run-tests` and then bootstraps there own `rest api test runner`.api + +The .NET rest api spec runner lives under `src/Tests/Test.YamlRunner`. This runner takes the test yaml files and turns them into .NET instructions.api + +Each `do` section in the yaml is mapped to a low level client method. To aid with assertions the tests ask for `DynamicResponse` which is a great +way to deal with elasticsearch responses in a semi typed fashion. + +These `rest-api-spec` tests are in addition to the unit and integration tests that live under `src/Tests/Tests` which for 90% of the cases focuses +more on the high level client `NEST` where as these `rest-api-spec` test fully focus on the low level client `Elasticsearch.Net` + +The `DockerFile` in this folder sets up this repos inside a docker container ready to run our build. + +The `rest-api-spec` runner expects Elasticsearch to be started before invocation and uses the endpoint its passed to discover the current Elasticsearch +`build hash` that is running and downloads the tests matching that `build hash`. + +If you want to run the tests the same that the Jenkins instance on elastic.co does you can call + +```bash +$ ELASTICSEARCH_VERSION=8.0.0-SNAPSHOT ./.ci/run-tests +``` + +| Variable Name | Default | Description | +|-------------------------|-------------|-------------| +| `ELASTICSEARCH_VERSION` | `N/A` | The elasticsearch version to target +| `TEST_SUITE` | `oss` | `oss` or `xpack` sets which test suite to run and which container to run against. | +| `DOTNET_VERSION` | `3.0.100` | The .NET sdk version used to grab the proper container | + + +If you want to manually spin up elasticsearch for this tests and call the runner afterwards you can use + +```bash +$ ELASTICSEARCH_VERSION=elasticsearch-oss:8.0.0-SNAPSHOT DETACH=true bash .ci/run-elasticsearch.sh +``` + +Note that `ELASTICSEARCH_VERSION` here is the full docker reference, `.ci/run-tests` is smart enough to compose this based on `TEST_SUITE` + +Spinning down the cluster can be done by passing `CLEANUP=true` using the same args + +```bash +$ ELASTICSEARCH_VERSION=elasticsearch-oss:8.0.0-SNAPSHOT CLEANUP=true bash .ci/run-elasticsearch.sh +``` + +To kick off the `rest-api-spec` tests manually after starting the cluster manually: + +```bash +$ ./build.sh rest-spec-tests -f create -e http://localhost:9200 -o /sln/build/output/rest-spec-junit.xml +``` + +See `--help` for a full command line reference + +```bash +$ ./build.sh rest-spec-tests -f --help +``` + +Against in most cases running through `./ci/run-tests` is all you need: + +```bash +$ ELASTICSEARCH_VERSION=8.0.0-SNAPSHOT ./.ci/run-tests +``` + From 857cea503a29ba379bc46af64e22524348159e0a Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 8 Oct 2019 20:42:30 +0200 Subject: [PATCH 74/85] attempt to show logs in github actions --- .github/workflows/yaml-runner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index 622f4b83c1f..0dd5df8fbeb 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -32,7 +32,7 @@ jobs: options: -h es1 --health-cmd="curl -fsSL http://localhost:9200/_cat/health?h=status" --health-interval=5s --health-retries=12 --health-timeout=5s --ulimit nofile=65536:65536 --ulimit memlock=-1:-1 steps: - - uses: actions/checkout@v1 + - run: docker logs es1 - uses: actions/setup-dotnet@v1 with: dotnet-version: '3.0.100' From 5ed11e51c919cd6854ae35176b58c7de6e3d907a Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 8 Oct 2019 20:47:25 +0200 Subject: [PATCH 75/85] disable github actions for now --- .github/workflows/yaml-runner.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/yaml-runner.yml b/.github/workflows/yaml-runner.yml index 0dd5df8fbeb..3657652766f 100644 --- a/.github/workflows/yaml-runner.yml +++ b/.github/workflows/yaml-runner.yml @@ -3,10 +3,10 @@ name: Yaml integration tests on: push: branches: - - feature/master/yaml-test-runner + - feature/master/yaml-test-runner-disabled pull_request: branches: - - feature/master/yaml-test-runner + - feature/master/yaml-test-runner-disabled jobs: yaml-tests: @@ -32,7 +32,6 @@ jobs: options: -h es1 --health-cmd="curl -fsSL http://localhost:9200/_cat/health?h=status" --health-interval=5s --health-retries=12 --health-timeout=5s --ulimit nofile=65536:65536 --ulimit memlock=-1:-1 steps: - - run: docker logs es1 - uses: actions/setup-dotnet@v1 with: dotnet-version: '3.0.100' From 3e8129778c55ad5eb1ec6f4a3a844f831e0b9ac2 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 8 Oct 2019 20:57:15 +0200 Subject: [PATCH 76/85] regenerate code after rebase --- .../RequestParameters.Cat.cs | 40 +- .../RequestParameters.Cluster.cs | 18 +- ...questParameters.CrossClusterReplication.cs | 22 +- .../RequestParameters.Graph.cs | 2 +- .../RequestParameters.Indices.cs | 74 +- .../RequestParameters.Ingest.cs | 10 +- .../RequestParameters.License.cs | 14 +- .../RequestParameters.MachineLearning.cs | 88 +- .../RequestParameters.NoNamespace.cs | 70 +- .../RequestParameters.Nodes.cs | 10 +- .../RequestParameters.Rollup.cs | 16 +- .../RequestParameters.Security.cs | 52 +- .../RequestParameters.Snapshot.cs | 18 +- .../RequestParameters.Sql.cs | 6 +- .../RequestParameters.Tasks.cs | 6 +- .../RequestParameters.Watcher.cs | 20 +- .../RequestParameters.XPack.cs | 4 +- .../ElasticLowLevelClient.Graph.cs | 10 +- .../ElasticLowLevelClient.Indices.cs | 10 +- .../ElasticLowLevelClient.NoNamespace.cs | 352 +++---- .../ElasticLowLevelClient.Rollup.cs | 72 +- src/Nest/Descriptors.Cat.cs | 376 ++++---- src/Nest/Descriptors.Cluster.cs | 110 +-- .../Descriptors.CrossClusterReplication.cs | 58 +- src/Nest/Descriptors.Graph.cs | 16 +- .../Descriptors.IndexLifecycleManagement.cs | 42 +- src/Nest/Descriptors.Indices.cs | 620 ++++++------- src/Nest/Descriptors.Ingest.cs | 26 +- src/Nest/Descriptors.MachineLearning.cs | 148 +-- src/Nest/Descriptors.Migration.cs | 6 +- src/Nest/Descriptors.NoNamespace.cs | 868 +++++++++--------- src/Nest/Descriptors.Nodes.cs | 70 +- src/Nest/Descriptors.Rollup.cs | 38 +- src/Nest/Descriptors.Security.cs | 100 +- src/Nest/Descriptors.Snapshot.cs | 62 +- src/Nest/Descriptors.Tasks.cs | 32 +- src/Nest/Descriptors.Watcher.cs | 38 +- src/Nest/Requests.Cat.cs | 40 +- src/Nest/Requests.Cluster.cs | 18 +- src/Nest/Requests.CrossClusterReplication.cs | 22 +- src/Nest/Requests.Graph.cs | 2 +- src/Nest/Requests.IndexLifecycleManagement.cs | 20 +- src/Nest/Requests.Indices.cs | 74 +- src/Nest/Requests.Ingest.cs | 10 +- src/Nest/Requests.License.cs | 14 +- src/Nest/Requests.MachineLearning.cs | 88 +- src/Nest/Requests.Migration.cs | 2 +- src/Nest/Requests.NoNamespace.cs | 72 +- src/Nest/Requests.Nodes.cs | 10 +- src/Nest/Requests.Rollup.cs | 32 +- src/Nest/Requests.Security.cs | 52 +- src/Nest/Requests.Snapshot.cs | 18 +- src/Nest/Requests.Sql.cs | 6 +- src/Nest/Requests.Tasks.cs | 6 +- src/Nest/Requests.Watcher.cs | 20 +- src/Nest/Requests.XPack.cs | 4 +- 56 files changed, 2029 insertions(+), 2005 deletions(-) diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Cat.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Cat.cs index 7e292f543b5..0a9afc12422 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Cat.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Cat.cs @@ -24,7 +24,7 @@ // ReSharper disable once CheckNamespace namespace Elasticsearch.Net.Specification.CatApi { - ///Request options for Aliases https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html + ///Request options for Aliases https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html public class CatAliasesRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -79,7 +79,7 @@ public bool? Verbose } } - ///Request options for Allocation https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html + ///Request options for Allocation https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html public class CatAllocationRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -141,7 +141,7 @@ public bool? Verbose } } - ///Request options for Count https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html + ///Request options for Count https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html public class CatCountRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -196,7 +196,7 @@ public bool? Verbose } } - ///Request options for Fielddata https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html + ///Request options for Fielddata https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html public class CatFielddataRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -265,7 +265,7 @@ public bool? Verbose } } - ///Request options for Health https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html + ///Request options for Health https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html public class CatHealthRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -327,7 +327,7 @@ public bool? Verbose } } - ///Request options for Help https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html + ///Request options for Help https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html public class CatHelpRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -347,7 +347,7 @@ public string[] SortByColumns } } - ///Request options for Indices https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html + ///Request options for Indices https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html public class CatIndicesRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -430,7 +430,7 @@ public bool? Verbose } } - ///Request options for Master https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html + ///Request options for Master https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html public class CatMasterRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -485,7 +485,7 @@ public bool? Verbose } } - ///Request options for NodeAttributes https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html + ///Request options for NodeAttributes https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html public class CatNodeAttributesRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -540,7 +540,7 @@ public bool? Verbose } } - ///Request options for Nodes https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html + ///Request options for Nodes https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html public class CatNodesRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -602,7 +602,7 @@ public bool? Verbose } } - ///Request options for PendingTasks https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html + ///Request options for PendingTasks https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html public class CatPendingTasksRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -657,7 +657,7 @@ public bool? Verbose } } - ///Request options for Plugins https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html + ///Request options for Plugins https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html public class CatPluginsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -712,7 +712,7 @@ public bool? Verbose } } - ///Request options for Recovery https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html + ///Request options for Recovery https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html public class CatRecoveryRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -767,7 +767,7 @@ public bool? Verbose } } - ///Request options for Repositories https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html + ///Request options for Repositories https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html public class CatRepositoriesRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -822,7 +822,7 @@ public bool? Verbose } } - ///Request options for Segments https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html + ///Request options for Segments https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html public class CatSegmentsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -870,7 +870,7 @@ public bool? Verbose } } - ///Request options for Shards https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html + ///Request options for Shards https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html public class CatShardsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -932,7 +932,7 @@ public bool? Verbose } } - ///Request options for Snapshots https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html + ///Request options for Snapshots https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html public class CatSnapshotsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -987,7 +987,7 @@ public bool? Verbose } } - ///Request options for Tasks https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + ///Request options for Tasks https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html public class CatTasksRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -1059,7 +1059,7 @@ public bool? Verbose } } - ///Request options for Templates https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html + ///Request options for Templates https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html public class CatTemplatesRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -1114,7 +1114,7 @@ public bool? Verbose } } - ///Request options for ThreadPool https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html + ///Request options for ThreadPool https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html public class CatThreadPoolRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Cluster.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Cluster.cs index bd81d896c42..735617d7a8d 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Cluster.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Cluster.cs @@ -24,7 +24,7 @@ // ReSharper disable once CheckNamespace namespace Elasticsearch.Net.Specification.ClusterApi { - ///Request options for AllocationExplain https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html + ///Request options for AllocationExplain https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html public class ClusterAllocationExplainRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -44,7 +44,7 @@ public bool? IncludeYesDecisions } } - ///Request options for GetSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html + ///Request options for GetSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html public class ClusterGetSettingsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -78,7 +78,7 @@ public TimeSpan Timeout } } - ///Request options for Health https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html + ///Request options for Health https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html public class ClusterHealthRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -161,7 +161,7 @@ public WaitForStatus? WaitForStatus } } - ///Request options for PendingTasks https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html + ///Request options for PendingTasks https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html public class ClusterPendingTasksRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -181,7 +181,7 @@ public TimeSpan MasterTimeout } } - ///Request options for PutSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html + ///Request options for PutSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html public class ClusterPutSettingsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -208,14 +208,14 @@ public TimeSpan Timeout } } - ///Request options for RemoteInfo https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html + ///Request options for RemoteInfo https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html public class RemoteInfoRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for Reroute https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html + ///Request options for Reroute https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html public class ClusterRerouteRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -263,7 +263,7 @@ public TimeSpan Timeout } } - ///Request options for State https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html + ///Request options for State https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html public class ClusterStateRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -328,7 +328,7 @@ public TimeSpan WaitForTimeout } } - ///Request options for Stats https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html + ///Request options for Stats https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html public class ClusterStatsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.CrossClusterReplication.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.CrossClusterReplication.cs index 307fb1d8c7a..3515a54fef8 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.CrossClusterReplication.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.CrossClusterReplication.cs @@ -24,14 +24,14 @@ // ReSharper disable once CheckNamespace namespace Elasticsearch.Net.Specification.CrossClusterReplicationApi { - ///Request options for DeleteAutoFollowPattern https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html + ///Request options for DeleteAutoFollowPattern https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html public class DeleteAutoFollowPatternRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; public override bool SupportsBody => false; } - ///Request options for CreateFollowIndex https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html + ///Request options for CreateFollowIndex https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html public class CreateFollowIndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -47,63 +47,63 @@ public string WaitForActiveShards } } - ///Request options for FollowInfo https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html + ///Request options for FollowInfo https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html public class FollowInfoRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for FollowIndexStats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html + ///Request options for FollowIndexStats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html public class FollowIndexStatsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for ForgetFollowerIndex http://www.elastic.co/guide/en/elasticsearch/reference/current + ///Request options for ForgetFollowerIndex http://www.elastic.co/guide/en/elasticsearch/reference/current public class ForgetFollowerIndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for GetAutoFollowPattern https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html + ///Request options for GetAutoFollowPattern https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html public class GetAutoFollowPatternRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for PauseFollowIndex https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html + ///Request options for PauseFollowIndex https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html public class PauseFollowIndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => false; } - ///Request options for CreateAutoFollowPattern https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html + ///Request options for CreateAutoFollowPattern https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html public class CreateAutoFollowPatternRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; public override bool SupportsBody => true; } - ///Request options for ResumeFollowIndex https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html + ///Request options for ResumeFollowIndex https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html public class ResumeFollowIndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for Stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html + ///Request options for Stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html public class CcrStatsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for UnfollowIndex http://www.elastic.co/guide/en/elasticsearch/reference/current + ///Request options for UnfollowIndex http://www.elastic.co/guide/en/elasticsearch/reference/current public class UnfollowIndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Graph.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Graph.cs index 371f80675e8..6799d354042 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Graph.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Graph.cs @@ -24,7 +24,7 @@ // ReSharper disable once CheckNamespace namespace Elasticsearch.Net.Specification.GraphApi { - ///Request options for Explore https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html + ///Request options for Explore https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html public class GraphExploreRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Indices.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Indices.cs index 4ce5bdf1907..f351badca4b 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Indices.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Indices.cs @@ -24,7 +24,7 @@ // ReSharper disable once CheckNamespace namespace Elasticsearch.Net.Specification.IndicesApi { - ///Request options for Analyze https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html + ///Request options for Analyze https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html public class AnalyzeRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -37,7 +37,7 @@ public string IndexQueryString } } - ///Request options for ClearCache https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html + ///Request options for ClearCache https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html public class ClearCacheRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -102,7 +102,7 @@ public bool? Request } } - ///Request options for Close https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html + ///Request options for Close https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html public class CloseIndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -153,7 +153,7 @@ public string WaitForActiveShards } } - ///Request options for Create https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html + ///Request options for Create https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html public class CreateIndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -187,7 +187,7 @@ public string WaitForActiveShards } } - ///Request options for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html + ///Request options for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html public class DeleteIndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; @@ -228,7 +228,7 @@ public TimeSpan Timeout } } - ///Request options for DeleteAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + ///Request options for DeleteAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html public class DeleteAliasRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; @@ -248,7 +248,7 @@ public TimeSpan Timeout } } - ///Request options for DeleteTemplate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html + ///Request options for DeleteTemplate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html public class DeleteIndexTemplateRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; @@ -268,7 +268,7 @@ public TimeSpan Timeout } } - ///Request options for Exists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html + ///Request options for Exists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html public class IndexExistsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.HEAD; @@ -316,7 +316,7 @@ public bool? Local } } - ///Request options for AliasExists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + ///Request options for AliasExists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html public class AliasExistsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.HEAD; @@ -353,7 +353,7 @@ public bool? Local } } - ///Request options for TemplateExists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html + ///Request options for TemplateExists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html public class IndexTemplateExistsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.HEAD; @@ -380,7 +380,7 @@ public TimeSpan MasterTimeout } } - ///Request options for TypeExists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html + ///Request options for TypeExists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html public class TypeExistsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.HEAD; @@ -417,7 +417,7 @@ public bool? Local } } - ///Request options for Flush https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html + ///Request options for Flush https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html public class FlushRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -467,7 +467,7 @@ public bool? WaitIfOngoing } } - ///Request options for SyncedFlush https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush-api.html + ///Request options for SyncedFlush https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush-api.html public class SyncedFlushRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -497,7 +497,7 @@ public bool? IgnoreUnavailable } } - ///Request options for ForceMerge https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html + ///Request options for ForceMerge https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html public class ForceMergeRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -548,7 +548,7 @@ public bool? OnlyExpungeDeletes } } - ///Request options for Freeze https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html + ///Request options for Freeze https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html public class FreezeIndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -599,7 +599,7 @@ public string WaitForActiveShards } } - ///Request options for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html + ///Request options for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html public class GetIndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -661,7 +661,7 @@ public TimeSpan MasterTimeout } } - ///Request options for GetAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + ///Request options for GetAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html public class GetAliasRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -698,7 +698,7 @@ public bool? Local } } - ///Request options for GetFieldMapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html + ///Request options for GetFieldMapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html public class GetFieldMappingRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -749,7 +749,7 @@ public bool? Local } } - ///Request options for GetMapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html + ///Request options for GetMapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html public class GetMappingRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -800,7 +800,7 @@ public TimeSpan MasterTimeout } } - ///Request options for GetSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html + ///Request options for GetSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html public class GetIndexSettingsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -858,7 +858,7 @@ public TimeSpan MasterTimeout } } - ///Request options for GetTemplate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html + ///Request options for GetTemplate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html public class GetIndexTemplateRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -892,7 +892,7 @@ public TimeSpan MasterTimeout } } - ///Request options for Open https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html + ///Request options for Open https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html public class OpenIndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -943,7 +943,7 @@ public string WaitForActiveShards } } - ///Request options for PutAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + ///Request options for PutAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html public class PutAliasRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -963,7 +963,7 @@ public TimeSpan Timeout } } - ///Request options for PutMapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html + ///Request options for PutMapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html public class PutMappingRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -1014,7 +1014,7 @@ public TimeSpan Timeout } } - ///Request options for UpdateSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html + ///Request options for UpdateSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html public class UpdateIndexSettingsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -1072,7 +1072,7 @@ public TimeSpan Timeout } } - ///Request options for PutTemplate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html + ///Request options for PutTemplate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html public class PutIndexTemplateRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -1113,7 +1113,7 @@ public TimeSpan Timeout } } - ///Request options for RecoveryStatus https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html + ///Request options for RecoveryStatus https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html public class RecoveryStatusRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -1133,7 +1133,7 @@ public bool? Detailed } } - ///Request options for Refresh https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html + ///Request options for Refresh https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html public class RefreshRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -1163,7 +1163,7 @@ public bool? IgnoreUnavailable } } - ///Request options for Rollover https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html + ///Request options for Rollover https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html public class RolloverIndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -1204,7 +1204,7 @@ public string WaitForActiveShards } } - ///Request options for Segments https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html + ///Request options for Segments https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html public class SegmentsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -1241,7 +1241,7 @@ public bool? Verbose } } - ///Request options for ShardStores https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html + ///Request options for ShardStores https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html public class IndicesShardStoresRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -1278,7 +1278,7 @@ public string[] Status } } - ///Request options for Shrink https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html + ///Request options for Shrink https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html public class ShrinkIndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -1305,7 +1305,7 @@ public string WaitForActiveShards } } - ///Request options for Split https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html + ///Request options for Split https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html public class SplitIndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -1332,7 +1332,7 @@ public string WaitForActiveShards } } - ///Request options for Stats https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html + ///Request options for Stats https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html public class IndicesStatsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -1401,7 +1401,7 @@ public Level? Level } } - ///Request options for Unfreeze https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html + ///Request options for Unfreeze https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html public class UnfreezeIndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -1452,7 +1452,7 @@ public string WaitForActiveShards } } - ///Request options for BulkAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + ///Request options for BulkAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html public class BulkAliasRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -1472,7 +1472,7 @@ public TimeSpan Timeout } } - ///Request options for ValidateQuery https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html + ///Request options for ValidateQuery https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html public class ValidateQueryRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Ingest.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Ingest.cs index 8283c218585..1be234b42b8 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Ingest.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Ingest.cs @@ -24,7 +24,7 @@ // ReSharper disable once CheckNamespace namespace Elasticsearch.Net.Specification.IngestApi { - ///Request options for DeletePipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html + ///Request options for DeletePipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html public class DeletePipelineRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; @@ -44,7 +44,7 @@ public TimeSpan Timeout } } - ///Request options for GetPipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html + ///Request options for GetPipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html public class GetPipelineRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -57,14 +57,14 @@ public TimeSpan MasterTimeout } } - ///Request options for GrokProcessorPatterns https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get + ///Request options for GrokProcessorPatterns https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get public class GrokProcessorPatternsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for PutPipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html + ///Request options for PutPipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html public class PutPipelineRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -84,7 +84,7 @@ public TimeSpan Timeout } } - ///Request options for SimulatePipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html + ///Request options for SimulatePipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html public class SimulatePipelineRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.License.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.License.cs index def521a0e8a..94380abc40d 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.License.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.License.cs @@ -24,14 +24,14 @@ // ReSharper disable once CheckNamespace namespace Elasticsearch.Net.Specification.LicenseApi { - ///Request options for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-license.html + ///Request options for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-license.html public class DeleteLicenseRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; public override bool SupportsBody => false; } - ///Request options for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/get-license.html + ///Request options for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/get-license.html public class GetLicenseRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -44,21 +44,21 @@ public bool? Local } } - ///Request options for GetBasicStatus https://www.elastic.co/guide/en/elasticsearch/reference/master/get-basic-status.html + ///Request options for GetBasicStatus https://www.elastic.co/guide/en/elasticsearch/reference/master/get-basic-status.html public class GetBasicLicenseStatusRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for GetTrialStatus https://www.elastic.co/guide/en/elasticsearch/reference/master/get-trial-status.html + ///Request options for GetTrialStatus https://www.elastic.co/guide/en/elasticsearch/reference/master/get-trial-status.html public class GetTrialLicenseStatusRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for Post https://www.elastic.co/guide/en/elasticsearch/reference/master/update-license.html + ///Request options for Post https://www.elastic.co/guide/en/elasticsearch/reference/master/update-license.html public class PostLicenseRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -71,7 +71,7 @@ public bool? Acknowledge } } - ///Request options for StartBasic https://www.elastic.co/guide/en/elasticsearch/reference/master/start-basic.html + ///Request options for StartBasic https://www.elastic.co/guide/en/elasticsearch/reference/master/start-basic.html public class StartBasicLicenseRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -84,7 +84,7 @@ public bool? Acknowledge } } - ///Request options for StartTrial https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trial.html + ///Request options for StartTrial https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trial.html public class StartTrialLicenseRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.MachineLearning.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.MachineLearning.cs index 43e0ec0e778..0721f30ce12 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.MachineLearning.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.MachineLearning.cs @@ -24,7 +24,7 @@ // ReSharper disable once CheckNamespace namespace Elasticsearch.Net.Specification.MachineLearningApi { - ///Request options for CloseJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html + ///Request options for CloseJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html public class CloseJobRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -51,28 +51,28 @@ public TimeSpan Timeout } } - ///Request options for DeleteCalendar + ///Request options for DeleteCalendar public class DeleteCalendarRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; public override bool SupportsBody => false; } - ///Request options for DeleteCalendarEvent + ///Request options for DeleteCalendarEvent public class DeleteCalendarEventRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; public override bool SupportsBody => false; } - ///Request options for DeleteCalendarJob + ///Request options for DeleteCalendarJob public class DeleteCalendarJobRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; public override bool SupportsBody => false; } - ///Request options for DeleteDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html + ///Request options for DeleteDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html public class DeleteDatafeedRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; @@ -85,21 +85,21 @@ public bool? Force } } - ///Request options for DeleteExpiredData + ///Request options for DeleteExpiredData public class DeleteExpiredDataRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; public override bool SupportsBody => false; } - ///Request options for DeleteFilter + ///Request options for DeleteFilter public class DeleteFilterRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; public override bool SupportsBody => false; } - ///Request options for DeleteForecast http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html + ///Request options for DeleteForecast http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html public class DeleteForecastRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; @@ -119,7 +119,7 @@ public TimeSpan Timeout } } - ///Request options for DeleteJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html + ///Request options for DeleteJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html public class DeleteJobRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; @@ -139,14 +139,14 @@ public bool? WaitForCompletion } } - ///Request options for DeleteModelSnapshot http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html + ///Request options for DeleteModelSnapshot http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html public class DeleteModelSnapshotRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; public override bool SupportsBody => false; } - ///Request options for FlushJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html + ///Request options for FlushJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html public class FlushJobRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -159,21 +159,21 @@ public string SkipTime } } - ///Request options for ForecastJob + ///Request options for ForecastJob public class ForecastJobRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => false; } - ///Request options for GetBuckets http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html + ///Request options for GetBuckets http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html public class GetBucketsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for GetCalendarEvents + ///Request options for GetCalendarEvents public class GetCalendarEventsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -200,21 +200,21 @@ public string Start } } - ///Request options for GetCalendars + ///Request options for GetCalendars public class GetCalendarsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for GetCategories http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html + ///Request options for GetCategories http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html public class GetCategoriesRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for GetDatafeedStats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html + ///Request options for GetDatafeedStats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html public class GetDatafeedStatsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -227,7 +227,7 @@ public bool? AllowNoDatafeeds } } - ///Request options for GetDatafeeds http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html + ///Request options for GetDatafeeds http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html public class GetDatafeedsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -240,7 +240,7 @@ public bool? AllowNoDatafeeds } } - ///Request options for GetFilters + ///Request options for GetFilters public class GetFiltersRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -260,14 +260,14 @@ public int? Size } } - ///Request options for GetInfluencers http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html + ///Request options for GetInfluencers http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html public class GetInfluencersRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for GetJobStats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html + ///Request options for GetJobStats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html public class GetJobStatsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -280,7 +280,7 @@ public bool? AllowNoJobs } } - ///Request options for GetJobs http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html + ///Request options for GetJobs http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html public class GetJobsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -293,49 +293,49 @@ public bool? AllowNoJobs } } - ///Request options for GetModelSnapshots http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html + ///Request options for GetModelSnapshots http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html public class GetModelSnapshotsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for GetOverallBuckets http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html + ///Request options for GetOverallBuckets http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html public class GetOverallBucketsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for GetAnomalyRecords http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html + ///Request options for GetAnomalyRecords http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html public class GetAnomalyRecordsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for Info + ///Request options for Info public class MachineLearningInfoRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for OpenJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html + ///Request options for OpenJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html public class OpenJobRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => false; } - ///Request options for PostCalendarEvents + ///Request options for PostCalendarEvents public class PostCalendarEventsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for PostJobData http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html + ///Request options for PostJobData http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html public class PostJobDataRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -355,63 +355,63 @@ public DateTimeOffset? ResetStart } } - ///Request options for PreviewDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html + ///Request options for PreviewDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html public class PreviewDatafeedRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for PutCalendar + ///Request options for PutCalendar public class PutCalendarRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; public override bool SupportsBody => true; } - ///Request options for PutCalendarJob + ///Request options for PutCalendarJob public class PutCalendarJobRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; public override bool SupportsBody => false; } - ///Request options for PutDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html + ///Request options for PutDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html public class PutDatafeedRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; public override bool SupportsBody => true; } - ///Request options for PutFilter + ///Request options for PutFilter public class PutFilterRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; public override bool SupportsBody => true; } - ///Request options for PutJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html + ///Request options for PutJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html public class PutJobRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; public override bool SupportsBody => true; } - ///Request options for RevertModelSnapshot http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html + ///Request options for RevertModelSnapshot http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html public class RevertModelSnapshotRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for StartDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html + ///Request options for StartDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html public class StartDatafeedRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for StopDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html + ///Request options for StopDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html public class StopDatafeedRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -424,42 +424,42 @@ public bool? AllowNoDatafeeds } } - ///Request options for UpdateDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html + ///Request options for UpdateDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html public class UpdateDatafeedRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for UpdateFilter + ///Request options for UpdateFilter public class UpdateFilterRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for UpdateJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html + ///Request options for UpdateJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html public class UpdateJobRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for UpdateModelSnapshot http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html + ///Request options for UpdateModelSnapshot http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html public class UpdateModelSnapshotRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for ValidateJob + ///Request options for ValidateJob public class ValidateJobRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for ValidateDetector + ///Request options for ValidateDetector public class ValidateDetectorRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.NoNamespace.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.NoNamespace.cs index ab033db5d50..b3502f4f696 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.NoNamespace.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.NoNamespace.cs @@ -24,7 +24,7 @@ // ReSharper disable once CheckNamespace namespace Elasticsearch.Net { - ///Request options for Bulk https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html + ///Request options for Bulk https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html public class BulkRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -100,14 +100,14 @@ public string WaitForActiveShards } } - ///Request options for ClearScroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api + ///Request options for ClearScroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api public class ClearScrollRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; public override bool SupportsBody => true; } - ///Request options for Count https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html + ///Request options for Count https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html public class CountRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -214,7 +214,7 @@ public long? TerminateAfter } } - ///Request options for Create https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///Request options for Create https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html public class CreateRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -276,7 +276,7 @@ public string WaitForActiveShards } } - ///Request options for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html + ///Request options for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html public class DeleteRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; @@ -345,7 +345,7 @@ public string WaitForActiveShards } } - ///Request options for DeleteByQuery https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html + ///Request options for DeleteByQuery https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html public class DeleteByQueryRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -582,7 +582,7 @@ public bool? WaitForCompletion } } - ///Request options for DeleteByQueryRethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html + ///Request options for DeleteByQueryRethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html public class DeleteByQueryRethrottleRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -595,7 +595,7 @@ public long? RequestsPerSecond } } - ///Request options for DeleteScript https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///Request options for DeleteScript https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html public class DeleteScriptRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; @@ -615,7 +615,7 @@ public TimeSpan Timeout } } - ///Request options for DocumentExists https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///Request options for DocumentExists https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html public class DocumentExistsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.HEAD; @@ -691,7 +691,7 @@ public VersionType? VersionType } } - ///Request options for SourceExists https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///Request options for SourceExists https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html public class SourceExistsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.HEAD; @@ -760,7 +760,7 @@ public VersionType? VersionType } } - ///Request options for Explain https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html + ///Request options for Explain https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html public class ExplainRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -850,7 +850,7 @@ public string[] StoredFields } } - ///Request options for FieldCapabilities https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html + ///Request options for FieldCapabilities https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html public class FieldCapabilitiesRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -894,7 +894,7 @@ public bool? IncludeUnmapped } } - ///Request options for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///Request options for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html public class GetRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -970,7 +970,7 @@ public VersionType? VersionType } } - ///Request options for GetScript https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///Request options for GetScript https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html public class GetScriptRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -983,7 +983,7 @@ public TimeSpan MasterTimeout } } - ///Request options for Source https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///Request options for Source https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html public class SourceRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -1052,7 +1052,7 @@ public VersionType? VersionType } } - ///Request options for Index https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///Request options for Index https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html public class IndexRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -1135,14 +1135,14 @@ public string WaitForActiveShards } } - ///Request options for RootNodeInfo https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + ///Request options for RootNodeInfo https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html public class RootNodeInfoRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for MultiGet https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html + ///Request options for MultiGet https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html public class MultiGetRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -1204,7 +1204,7 @@ public string[] StoredFields } } - ///Request options for MultiSearch https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html + ///Request options for MultiSearch https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html public class MultiSearchRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -1267,7 +1267,7 @@ public bool? TypedKeys } } - ///Request options for MultiSearchTemplate https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + ///Request options for MultiSearchTemplate https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html public class MultiSearchTemplateRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -1308,7 +1308,7 @@ public bool? TypedKeys } } - ///Request options for MultiTermVectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html + ///Request options for MultiTermVectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html public class MultiTermVectorsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -1400,14 +1400,14 @@ public VersionType? VersionType } } - ///Request options for Ping https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + ///Request options for Ping https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html public class PingRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.HEAD; public override bool SupportsBody => false; } - ///Request options for PutScript https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///Request options for PutScript https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html public class PutScriptRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -1434,7 +1434,7 @@ public TimeSpan Timeout } } - ///Request options for ReindexOnServer https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html + ///Request options for ReindexOnServer https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html public class ReindexOnServerRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -1493,7 +1493,7 @@ public bool? WaitForCompletion } } - ///Request options for ReindexRethrottle https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html + ///Request options for ReindexRethrottle https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html public class ReindexRethrottleRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -1506,21 +1506,21 @@ public long? RequestsPerSecond } } - ///Request options for RenderSearchTemplate https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates + ///Request options for RenderSearchTemplate https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates public class RenderSearchTemplateRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for ExecutePainlessScript https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html + ///Request options for ExecutePainlessScript https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html public class ExecutePainlessScriptRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for Scroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll + ///Request options for Scroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll public class ScrollRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -1533,7 +1533,7 @@ public bool? TotalHitsAsInteger } } - ///Request options for Search https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html + ///Request options for Search https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html public class SearchRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -1763,7 +1763,7 @@ public bool? TypedKeys } } - ///Request options for SearchShards https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html + ///Request options for SearchShards https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html public class SearchShardsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -1814,7 +1814,7 @@ public string Routing } } - ///Request options for SearchTemplate https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html + ///Request options for SearchTemplate https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html public class SearchTemplateRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -1914,7 +1914,7 @@ public bool? TypedKeys } } - ///Request options for TermVectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + ///Request options for TermVectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html public class TermVectorsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -1997,7 +1997,7 @@ public VersionType? VersionType } } - ///Request options for Update https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html + ///Request options for Update https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html public class UpdateRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -2073,7 +2073,7 @@ public string WaitForActiveShards } } - ///Request options for UpdateByQuery https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html + ///Request options for UpdateByQuery https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html public class UpdateByQueryRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -2324,7 +2324,7 @@ public bool? WaitForCompletion } } - ///Request options for UpdateByQueryRethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html + ///Request options for UpdateByQueryRethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html public class UpdateByQueryRethrottleRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Nodes.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Nodes.cs index f21f6169cd2..27ff3b0a06b 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Nodes.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Nodes.cs @@ -24,7 +24,7 @@ // ReSharper disable once CheckNamespace namespace Elasticsearch.Net.Specification.NodesApi { - ///Request options for HotThreads https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html + ///Request options for HotThreads https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html public class NodesHotThreadsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -72,7 +72,7 @@ public TimeSpan Timeout } } - ///Request options for Info https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html + ///Request options for Info https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html public class NodesInfoRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -92,7 +92,7 @@ public TimeSpan Timeout } } - ///Request options for ReloadSecureSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings + ///Request options for ReloadSecureSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings public class ReloadSecureSettingsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -105,7 +105,7 @@ public TimeSpan Timeout } } - ///Request options for Stats https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html + ///Request options for Stats https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html public class NodesStatsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -167,7 +167,7 @@ public string[] Types } } - ///Request options for Usage https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html + ///Request options for Usage https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html public class NodesUsageRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Rollup.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Rollup.cs index 64f50aeca93..07b25992695 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Rollup.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Rollup.cs @@ -24,42 +24,42 @@ // ReSharper disable once CheckNamespace namespace Elasticsearch.Net.Specification.RollupApi { - ///Request options for DeleteJob + ///Request options for DeleteJob public class DeleteRollupJobRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; public override bool SupportsBody => false; } - ///Request options for GetJob + ///Request options for GetJob public class GetRollupJobRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for GetCapabilities + ///Request options for GetCapabilities public class GetRollupCapabilitiesRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for GetIndexCapabilities + ///Request options for GetIndexCapabilities public class GetRollupIndexCapabilitiesRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for CreateJob + ///Request options for CreateJob public class CreateRollupJobRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; public override bool SupportsBody => true; } - ///Request options for Search + ///Request options for Search public class RollupSearchRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -79,14 +79,14 @@ public bool? TypedKeys } } - ///Request options for StartJob + ///Request options for StartJob public class StartRollupJobRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => false; } - ///Request options for StopJob + ///Request options for StopJob public class StopRollupJobRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Security.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Security.cs index e02a3aa16a5..b1ed1833bd9 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Security.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Security.cs @@ -24,14 +24,14 @@ // ReSharper disable once CheckNamespace namespace Elasticsearch.Net.Specification.SecurityApi { - ///Request options for Authenticate https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html + ///Request options for Authenticate https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html public class AuthenticateRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for ChangePassword https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html + ///Request options for ChangePassword https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html public class ChangePasswordRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -47,7 +47,7 @@ public Refresh? Refresh } } - ///Request options for ClearCachedRealms https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html + ///Request options for ClearCachedRealms https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html public class ClearCachedRealmsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -60,14 +60,14 @@ public string[] Usernames } } - ///Request options for ClearCachedRoles https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html + ///Request options for ClearCachedRoles https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html public class ClearCachedRolesRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => false; } - ///Request options for CreateApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html + ///Request options for CreateApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html public class CreateApiKeyRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -83,7 +83,7 @@ public Refresh? Refresh } } - ///Request options for DeletePrivileges TODO + ///Request options for DeletePrivileges TODO public class DeletePrivilegesRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; @@ -99,7 +99,7 @@ public Refresh? Refresh } } - ///Request options for DeleteRole https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html + ///Request options for DeleteRole https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html public class DeleteRoleRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; @@ -115,7 +115,7 @@ public Refresh? Refresh } } - ///Request options for DeleteRoleMapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html + ///Request options for DeleteRoleMapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html public class DeleteRoleMappingRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; @@ -131,7 +131,7 @@ public Refresh? Refresh } } - ///Request options for DeleteUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html + ///Request options for DeleteUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html public class DeleteUserRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; @@ -147,7 +147,7 @@ public Refresh? Refresh } } - ///Request options for DisableUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html + ///Request options for DisableUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html public class DisableUserRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -163,7 +163,7 @@ public Refresh? Refresh } } - ///Request options for EnableUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html + ///Request options for EnableUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html public class EnableUserRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -179,7 +179,7 @@ public Refresh? Refresh } } - ///Request options for GetApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html + ///Request options for GetApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html public class GetApiKeyRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -213,70 +213,70 @@ public string Username } } - ///Request options for GetPrivileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html + ///Request options for GetPrivileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html public class GetPrivilegesRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for GetRole https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html + ///Request options for GetRole https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html public class GetRoleRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for GetRoleMapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html + ///Request options for GetRoleMapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html public class GetRoleMappingRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for GetUserAccessToken https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html + ///Request options for GetUserAccessToken https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html public class GetUserAccessTokenRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for GetUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html + ///Request options for GetUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html public class GetUserRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for GetUserPrivileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html + ///Request options for GetUserPrivileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html public class GetUserPrivilegesRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for HasPrivileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html + ///Request options for HasPrivileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html public class HasPrivilegesRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for InvalidateApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html + ///Request options for InvalidateApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html public class InvalidateApiKeyRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; public override bool SupportsBody => true; } - ///Request options for InvalidateUserAccessToken https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html + ///Request options for InvalidateUserAccessToken https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html public class InvalidateUserAccessTokenRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; public override bool SupportsBody => true; } - ///Request options for PutPrivileges TODO + ///Request options for PutPrivileges TODO public class PutPrivilegesRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -292,7 +292,7 @@ public Refresh? Refresh } } - ///Request options for PutRole https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html + ///Request options for PutRole https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html public class PutRoleRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -308,7 +308,7 @@ public Refresh? Refresh } } - ///Request options for PutRoleMapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html + ///Request options for PutRoleMapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html public class PutRoleMappingRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -324,7 +324,7 @@ public Refresh? Refresh } } - ///Request options for PutUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html + ///Request options for PutUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html public class PutUserRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -340,7 +340,7 @@ public Refresh? Refresh } } - ///Request options for GetCertificates https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html + ///Request options for GetCertificates https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html public class GetCertificatesRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Snapshot.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Snapshot.cs index 720e1691d50..d794fa8d6bd 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Snapshot.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Snapshot.cs @@ -24,7 +24,7 @@ // ReSharper disable once CheckNamespace namespace Elasticsearch.Net.Specification.SnapshotApi { - ///Request options for Snapshot https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request options for Snapshot https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public class SnapshotRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -44,7 +44,7 @@ public bool? WaitForCompletion } } - ///Request options for CreateRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request options for CreateRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public class CreateRepositoryRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -71,7 +71,7 @@ public bool? Verify } } - ///Request options for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request options for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public class DeleteSnapshotRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; @@ -84,7 +84,7 @@ public TimeSpan MasterTimeout } } - ///Request options for DeleteRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request options for DeleteRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public class DeleteRepositoryRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; @@ -104,7 +104,7 @@ public TimeSpan Timeout } } - ///Request options for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request options for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public class GetSnapshotRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -131,7 +131,7 @@ public bool? Verbose } } - ///Request options for GetRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request options for GetRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public class GetRepositoryRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -151,7 +151,7 @@ public TimeSpan MasterTimeout } } - ///Request options for Restore https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request options for Restore https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public class RestoreRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -171,7 +171,7 @@ public bool? WaitForCompletion } } - ///Request options for Status https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request options for Status https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public class SnapshotStatusRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -191,7 +191,7 @@ public TimeSpan MasterTimeout } } - ///Request options for VerifyRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request options for VerifyRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public class VerifyRepositoryRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Sql.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Sql.cs index a7e55c4ac7e..494f5139cb9 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Sql.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Sql.cs @@ -24,14 +24,14 @@ // ReSharper disable once CheckNamespace namespace Elasticsearch.Net.Specification.SqlApi { - ///Request options for ClearCursor Clear SQL cursor + ///Request options for ClearCursor Clear SQL cursor public class ClearSqlCursorRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => true; } - ///Request options for Query Execute SQL + ///Request options for Query Execute SQL public class QuerySqlRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -44,7 +44,7 @@ public string Format } } - ///Request options for Translate Translate SQL into Elasticsearch queries + ///Request options for Translate Translate SQL into Elasticsearch queries public class TranslateSqlRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Tasks.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Tasks.cs index bad258077e9..de574728493 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Tasks.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Tasks.cs @@ -24,7 +24,7 @@ // ReSharper disable once CheckNamespace namespace Elasticsearch.Net.Specification.TasksApi { - ///Request options for Cancel https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + ///Request options for Cancel https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html public class CancelTasksRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; @@ -54,7 +54,7 @@ public string ParentTaskId } } - ///Request options for GetTask https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + ///Request options for GetTask https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html public class GetTaskRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -74,7 +74,7 @@ public bool? WaitForCompletion } } - ///Request options for List https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + ///Request options for List https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html public class ListTasksRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Watcher.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Watcher.cs index 0c76fe3c135..e6e2ef1844a 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Watcher.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Watcher.cs @@ -24,35 +24,35 @@ // ReSharper disable once CheckNamespace namespace Elasticsearch.Net.Specification.WatcherApi { - ///Request options for Acknowledge http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html + ///Request options for Acknowledge http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html public class AcknowledgeWatchRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; public override bool SupportsBody => false; } - ///Request options for Activate https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html + ///Request options for Activate https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html public class ActivateWatchRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; public override bool SupportsBody => false; } - ///Request options for Deactivate https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html + ///Request options for Deactivate https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html public class DeactivateWatchRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; public override bool SupportsBody => false; } - ///Request options for Delete http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html + ///Request options for Delete http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html public class DeleteWatchRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE; public override bool SupportsBody => false; } - ///Request options for Execute http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html + ///Request options for Execute http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html public class ExecuteWatchRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -65,14 +65,14 @@ public bool? Debug } } - ///Request options for Get http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html + ///Request options for Get http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html public class GetWatchRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; public override bool SupportsBody => false; } - ///Request options for Put http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html + ///Request options for Put http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html public class PutWatchRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.PUT; @@ -106,14 +106,14 @@ public long? Version } } - ///Request options for Start http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html + ///Request options for Start http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html public class StartWatcherRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; public override bool SupportsBody => false; } - ///Request options for Stats http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html + ///Request options for Stats http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html public class WatcherStatsRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -126,7 +126,7 @@ public bool? EmitStacktraces } } - ///Request options for Stop http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html + ///Request options for Stop http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html public class StopWatcherRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.POST; diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.XPack.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.XPack.cs index c5fca11bed4..41e09a74339 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.XPack.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.XPack.cs @@ -24,7 +24,7 @@ // ReSharper disable once CheckNamespace namespace Elasticsearch.Net.Specification.XPackApi { - ///Request options for Info https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html + ///Request options for Info https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html public class XPackInfoRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; @@ -37,7 +37,7 @@ public string[] Categories } } - ///Request options for Usage Retrieve information about xpack features usage + ///Request options for Usage Retrieve information about xpack features usage public class XPackUsageRequestParameters : RequestParameters { public override HttpMethod DefaultHttpMethod => HttpMethod.GET; diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Graph.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Graph.cs index 21528f1f835..5898885ca3e 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Graph.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Graph.cs @@ -1,12 +1,12 @@ // ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ // ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ // ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ // ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ // ----------------------------------------------- -// -// This file is automatically generated +// +// This file is automatically generated // Please do not edit these files manually // Run the following in the root of the repos: // @@ -74,4 +74,4 @@ public TResponse ExploreUsingType(string index, string type, PostData public Task ExploreUsingTypeAsync(string index, string type, PostData body, GraphExploreRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_graph/explore"), ctx, body, RequestParams(requestParameters)); } -} +} \ No newline at end of file diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Indices.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Indices.cs index 46b212777cb..2abc10384a1 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Indices.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Indices.cs @@ -1,12 +1,12 @@ // ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ // ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ // ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ // ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ // ----------------------------------------------- -// -// This file is automatically generated +// +// This file is automatically generated // Please do not edit these files manually // Run the following in the root of the repos: // @@ -853,4 +853,4 @@ public TResponse ValidateQueryUsingType(string index, string type, Po public Task ValidateQueryUsingTypeAsync(string index, string type, PostData body, ValidateQueryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_validate/query"), ctx, body, RequestParams(requestParameters)); } -} +} \ No newline at end of file diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs index 8eed21f324f..fff68f5b757 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs @@ -182,31 +182,31 @@ partial void SetupNamespaces() XPack = new LowLevelXPackNamespace(this); } - ///POST on /_bulk http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html + ///POST on /_bulk https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html ///The operation definition and data (action-data pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Bulk(PostData body, BulkRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_bulk", body, RequestParams(requestParameters)); - ///POST on /_bulk http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html + ///POST on /_bulk https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html ///The operation definition and data (action-data pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("bulk", "body")] public Task BulkAsync(PostData body, BulkRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_bulk", ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_bulk http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html + ///POST on /{index}/_bulk https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html ///Default index for items which don't provide one ///The operation definition and data (action-data pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Bulk(string index, PostData body, BulkRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_bulk"), body, RequestParams(requestParameters)); - ///POST on /{index}/_bulk http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html + ///POST on /{index}/_bulk https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html ///Default index for items which don't provide one ///The operation definition and data (action-data pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("bulk", "index, body")] public Task BulkAsync(string index, PostData body, BulkRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_bulk"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_bulk http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html + ///POST on /{index}/{type}/_bulk https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html ///Default index for items which don't provide one ///Default document type for items which don't provide one ///The operation definition and data (action-data pairs), separated by newlines @@ -214,7 +214,7 @@ public Task BulkAsync(string index, PostData body, BulkReq [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] public TResponse BulkUsingType(string index, string type, PostData body, BulkRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_bulk"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_bulk http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html + ///POST on /{index}/{type}/_bulk https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html ///Default index for items which don't provide one ///Default document type for items which don't provide one ///The operation definition and data (action-data pairs), separated by newlines @@ -223,81 +223,81 @@ public TResponse BulkUsingType(string index, string type, PostData bo [MapsApi("bulk", "index, type, body")] public Task BulkUsingTypeAsync(string index, string type, PostData body, BulkRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_bulk"), ctx, body, RequestParams(requestParameters)); - ///DELETE on /_search/scroll http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html + ///DELETE on /_search/scroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api ///A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse ClearScroll(PostData body, ClearScrollRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(DELETE, "_search/scroll", body, RequestParams(requestParameters)); - ///DELETE on /_search/scroll http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html + ///DELETE on /_search/scroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api ///A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("clear_scroll", "body")] public Task ClearScrollAsync(PostData body, ClearScrollRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, "_search/scroll", ctx, body, RequestParams(requestParameters)); - ///DELETE on /_search/scroll/{scroll_id} http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html + ///DELETE on /_search/scroll/{scroll_id} https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api ///A comma-separated list of scroll IDs to clear ///A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: A scroll id can be quite large and should be specified as part of the body")] + [Obsolete("Deprecated in version 7.0.0: A scroll id can be quite large and should be specified as part of the body")] public TResponse ClearScroll(string scrollId, PostData body, ClearScrollRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(DELETE, Url($"_search/scroll/{scrollId:scrollId}"), body, RequestParams(requestParameters)); - ///DELETE on /_search/scroll/{scroll_id} http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html + ///DELETE on /_search/scroll/{scroll_id} https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api ///A comma-separated list of scroll IDs to clear ///A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: A scroll id can be quite large and should be specified as part of the body")] + [Obsolete("Deprecated in version 7.0.0: A scroll id can be quite large and should be specified as part of the body")] [MapsApi("clear_scroll", "scroll_id, body")] public Task ClearScrollAsync(string scrollId, PostData body, ClearScrollRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_search/scroll/{scrollId:scrollId}"), ctx, body, RequestParams(requestParameters)); - ///POST on /_count http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html + ///POST on /_count https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html ///A query to restrict the results specified with the Query DSL (optional) ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Count(PostData body, CountRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_count", body, RequestParams(requestParameters)); - ///POST on /_count http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html + ///POST on /_count https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html ///A query to restrict the results specified with the Query DSL (optional) ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("count", "body")] public Task CountAsync(PostData body, CountRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_count", ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_count http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html + ///POST on /{index}/_count https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html ///A comma-separated list of indices to restrict the results ///A query to restrict the results specified with the Query DSL (optional) ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Count(string index, PostData body, CountRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_count"), body, RequestParams(requestParameters)); - ///POST on /{index}/_count http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html + ///POST on /{index}/_count https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html ///A comma-separated list of indices to restrict the results ///A query to restrict the results specified with the Query DSL (optional) ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("count", "index, body")] public Task CountAsync(string index, PostData body, CountRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_count"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_count http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html + ///POST on /{index}/{type}/_count https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html ///A comma-separated list of indices to restrict the results ///A comma-separated list of types to restrict the results ///A query to restrict the results specified with the Query DSL (optional) ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse CountUsingType(string index, string type, PostData body, CountRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_count"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_count http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html + ///POST on /{index}/{type}/_count https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html ///A comma-separated list of indices to restrict the results ///A comma-separated list of types to restrict the results ///A query to restrict the results specified with the Query DSL (optional) ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("count", "index, type, body")] public Task CountUsingTypeAsync(string index, string type, PostData body, CountRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_count"), ctx, body, RequestParams(requestParameters)); - ///PUT on /{index}/_create/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///PUT on /{index}/_create/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Create(string index, string id, PostData body, CreateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(PUT, Url($"{index:index}/_create/{id:id}"), body, RequestParams(requestParameters)); - ///PUT on /{index}/_create/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///PUT on /{index}/_create/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///Document ID ///The document @@ -305,52 +305,52 @@ public TResponse Create(string index, string id, PostData body, Creat [MapsApi("create", "index, id, body")] public Task CreateAsync(string index, string id, PostData body, CreateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"{index:index}/_create/{id:id}"), ctx, body, RequestParams(requestParameters)); - ///PUT on /{index}/{type}/{id}/_create http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///PUT on /{index}/{type}/{id}/_create https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///The type of the document ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse CreateUsingType(string index, string type, string id, PostData body, CreateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(PUT, Url($"{index:index}/{type:type}/{id:id}/_create"), body, RequestParams(requestParameters)); - ///PUT on /{index}/{type}/{id}/_create http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///PUT on /{index}/{type}/{id}/_create https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///The type of the document ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("create", "index, type, id, body")] public Task CreateUsingTypeAsync(string index, string type, string id, PostData body, CreateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"{index:index}/{type:type}/{id:id}/_create"), ctx, body, RequestParams(requestParameters)); - ///DELETE on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html + ///DELETE on /{index}/_doc/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Delete(string index, string id, DeleteRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(DELETE, Url($"{index:index}/_doc/{id:id}"), null, RequestParams(requestParameters)); - ///DELETE on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html + ///DELETE on /{index}/_doc/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("delete", "index, id")] public Task DeleteAsync(string index, string id, DeleteRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"{index:index}/_doc/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///DELETE on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html + ///DELETE on /{index}/{type}/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html ///The name of the index ///The type of the document ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse DeleteUsingType(string index, string type, string id, DeleteRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(DELETE, Url($"{index:index}/{type:type}/{id:id}"), null, RequestParams(requestParameters)); - ///DELETE on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html + ///DELETE on /{index}/{type}/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html ///The name of the index ///The type of the document ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("delete", "index, type, id")] public Task DeleteUsingTypeAsync(string index, string type, string id, DeleteRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"{index:index}/{type:type}/{id:id}"), ctx, null, RequestParams(requestParameters)); @@ -372,7 +372,7 @@ public Task DeleteByQueryAsync(string index, PostData body ///A comma-separated list of document types to search; leave empty to perform the operation on all types ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse DeleteByQueryUsingType(string index, string type, PostData body, DeleteByQueryRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_delete_by_query"), body, RequestParams(requestParameters)); ///POST on /{index}/{type}/_delete_by_query https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html @@ -380,7 +380,7 @@ public TResponse DeleteByQueryUsingType(string index, string type, Po ///A comma-separated list of document types to search; leave empty to perform the operation on all types ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("delete_by_query", "index, type, body")] public Task DeleteByQueryUsingTypeAsync(string index, string type, PostData body, DeleteByQueryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_delete_by_query"), ctx, body, RequestParams(requestParameters)); @@ -395,85 +395,85 @@ public TResponse DeleteByQueryRethrottle(string taskId, DeleteByQuery [MapsApi("delete_by_query_rethrottle", "task_id")] public Task DeleteByQueryRethrottleAsync(string taskId, DeleteByQueryRethrottleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_delete_by_query/{taskId:taskId}/_rethrottle"), ctx, null, RequestParams(requestParameters)); - ///DELETE on /_scripts/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///DELETE on /_scripts/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html ///Script ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse DeleteScript(string id, DeleteScriptRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(DELETE, Url($"_scripts/{id:id}"), null, RequestParams(requestParameters)); - ///DELETE on /_scripts/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///DELETE on /_scripts/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html ///Script ID ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("delete_script", "id")] public Task DeleteScriptAsync(string id, DeleteScriptRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_scripts/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///HEAD on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///HEAD on /{index}/_doc/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse DocumentExists(string index, string id, DocumentExistsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(HEAD, Url($"{index:index}/_doc/{id:id}"), null, RequestParams(requestParameters)); - ///HEAD on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///HEAD on /{index}/_doc/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("exists", "index, id")] public Task DocumentExistsAsync(string index, string id, DocumentExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, Url($"{index:index}/_doc/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///HEAD on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///HEAD on /{index}/{type}/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The type of the document (use `_all` to fetch the first document matching the ID across all types) ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse DocumentExistsUsingType(string index, string type, string id, DocumentExistsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(HEAD, Url($"{index:index}/{type:type}/{id:id}"), null, RequestParams(requestParameters)); - ///HEAD on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///HEAD on /{index}/{type}/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The type of the document (use `_all` to fetch the first document matching the ID across all types) ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("exists", "index, type, id")] public Task DocumentExistsUsingTypeAsync(string index, string type, string id, DocumentExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, Url($"{index:index}/{type:type}/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///HEAD on /{index}/_source/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///HEAD on /{index}/_source/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse SourceExists(string index, string id, SourceExistsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(HEAD, Url($"{index:index}/_source/{id:id}"), null, RequestParams(requestParameters)); - ///HEAD on /{index}/_source/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///HEAD on /{index}/_source/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("exists_source", "index, id")] public Task SourceExistsAsync(string index, string id, SourceExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, Url($"{index:index}/_source/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///HEAD on /{index}/{type}/{id}/_source http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///HEAD on /{index}/{type}/{id}/_source https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The type of the document; deprecated and optional starting with 7.0 ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse SourceExistsUsingType(string index, string type, string id, SourceExistsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(HEAD, Url($"{index:index}/{type:type}/{id:id}/_source"), null, RequestParams(requestParameters)); - ///HEAD on /{index}/{type}/{id}/_source http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///HEAD on /{index}/{type}/{id}/_source https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The type of the document; deprecated and optional starting with 7.0 ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("exists_source", "index, type, id")] public Task SourceExistsUsingTypeAsync(string index, string type, string id, SourceExistsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, Url($"{index:index}/{type:type}/{id:id}/_source"), ctx, null, RequestParams(requestParameters)); - ///POST on /{index}/_explain/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html + ///POST on /{index}/_explain/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html ///The name of the index ///The document ID ///The query definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Explain(string index, string id, PostData body, ExplainRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_explain/{id:id}"), body, RequestParams(requestParameters)); - ///POST on /{index}/_explain/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html + ///POST on /{index}/_explain/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html ///The name of the index ///The document ID ///The query definition using the Query DSL @@ -481,124 +481,124 @@ public TResponse Explain(string index, string id, PostData body, Expl [MapsApi("explain", "index, id, body")] public Task ExplainAsync(string index, string id, PostData body, ExplainRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_explain/{id:id}"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/{id}/_explain http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html + ///POST on /{index}/{type}/{id}/_explain https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html ///The name of the index ///The type of the document ///The document ID ///The query definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse ExplainUsingType(string index, string type, string id, PostData body, ExplainRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/{id:id}/_explain"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/{id}/_explain http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html + ///POST on /{index}/{type}/{id}/_explain https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html ///The name of the index ///The type of the document ///The document ID ///The query definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("explain", "index, type, id, body")] public Task ExplainUsingTypeAsync(string index, string type, string id, PostData body, ExplainRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/{id:id}/_explain"), ctx, body, RequestParams(requestParameters)); - ///POST on /_field_caps http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html + ///POST on /_field_caps https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse FieldCapabilities(FieldCapabilitiesRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_field_caps", null, RequestParams(requestParameters)); - ///POST on /_field_caps http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html + ///POST on /_field_caps https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("field_caps", "")] public Task FieldCapabilitiesAsync(FieldCapabilitiesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_field_caps", ctx, null, RequestParams(requestParameters)); - ///POST on /{index}/_field_caps http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html + ///POST on /{index}/_field_caps https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse FieldCapabilities(string index, FieldCapabilitiesRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_field_caps"), null, RequestParams(requestParameters)); - ///POST on /{index}/_field_caps http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html + ///POST on /{index}/_field_caps https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("field_caps", "index")] public Task FieldCapabilitiesAsync(string index, FieldCapabilitiesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_field_caps"), ctx, null, RequestParams(requestParameters)); - ///GET on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///GET on /{index}/_doc/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Get(string index, string id, GetRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"{index:index}/_doc/{id:id}"), null, RequestParams(requestParameters)); - ///GET on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///GET on /{index}/_doc/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("get", "index, id")] public Task GetAsync(string index, string id, GetRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_doc/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///GET on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///GET on /{index}/{type}/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The type of the document (use `_all` to fetch the first document matching the ID across all types) ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse GetUsingType(string index, string type, string id, GetRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"{index:index}/{type:type}/{id:id}"), null, RequestParams(requestParameters)); - ///GET on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///GET on /{index}/{type}/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The type of the document (use `_all` to fetch the first document matching the ID across all types) ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("get", "index, type, id")] public Task GetUsingTypeAsync(string index, string type, string id, GetRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/{type:type}/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///GET on /_scripts/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///GET on /_scripts/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html ///Script ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse GetScript(string id, GetScriptRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"_scripts/{id:id}"), null, RequestParams(requestParameters)); - ///GET on /_scripts/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///GET on /_scripts/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html ///Script ID ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("get_script", "id")] public Task GetScriptAsync(string id, GetScriptRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_scripts/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///GET on /{index}/_source/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///GET on /{index}/_source/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Source(string index, string id, SourceRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"{index:index}/_source/{id:id}"), null, RequestParams(requestParameters)); - ///GET on /{index}/_source/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///GET on /{index}/_source/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("get_source", "index, id")] public Task SourceAsync(string index, string id, SourceRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_source/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///GET on /{index}/{type}/{id}/_source http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///GET on /{index}/{type}/{id}/_source https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The type of the document; deprecated and optional starting with 7.0 ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse SourceUsingType(string index, string type, string id, SourceRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"{index:index}/{type:type}/{id:id}/_source"), null, RequestParams(requestParameters)); - ///GET on /{index}/{type}/{id}/_source http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///GET on /{index}/{type}/{id}/_source https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html ///The name of the index ///The type of the document; deprecated and optional starting with 7.0 ///The document ID ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("get_source", "index, type, id")] public Task SourceUsingTypeAsync(string index, string type, string id, SourceRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/{type:type}/{id:id}/_source"), ctx, null, RequestParams(requestParameters)); - ///POST on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///POST on /{index}/_doc/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Index(string index, string id, PostData body, IndexRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_doc/{id:id}"), body, RequestParams(requestParameters)); - ///POST on /{index}/_doc/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///POST on /{index}/_doc/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///Document ID ///The document @@ -606,258 +606,258 @@ public TResponse Index(string index, string id, PostData body, IndexR [MapsApi("index", "index, id, body")] public Task IndexAsync(string index, string id, PostData body, IndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_doc/{id:id}"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_doc http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///POST on /{index}/_doc https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Index(string index, PostData body, IndexRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_doc"), body, RequestParams(requestParameters)); - ///POST on /{index}/_doc http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///POST on /{index}/_doc https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("index", "index, body")] public Task IndexAsync(string index, PostData body, IndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_doc"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///POST on /{index}/{type} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///The type of the document ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse IndexUsingType(string index, string type, PostData body, IndexRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///POST on /{index}/{type} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///The type of the document ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("index", "index, type, body")] public Task IndexUsingTypeAsync(string index, string type, PostData body, IndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///POST on /{index}/{type}/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///The type of the document ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse IndexUsingType(string index, string type, string id, PostData body, IndexRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/{id:id}"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///POST on /{index}/{type}/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html ///The name of the index ///The type of the document ///Document ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("index", "index, type, id, body")] public Task IndexUsingTypeAsync(string index, string type, string id, PostData body, IndexRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/{id:id}"), ctx, body, RequestParams(requestParameters)); - ///GET on / http://www.elastic.co/guide/ + ///GET on / https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse RootNodeInfo(RootNodeInfoRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "", null, RequestParams(requestParameters)); - ///GET on / http://www.elastic.co/guide/ + ///GET on / https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("info", "")] public Task RootNodeInfoAsync(RootNodeInfoRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "", ctx, null, RequestParams(requestParameters)); - ///POST on /_mget http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html + ///POST on /_mget https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html ///Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiGet(PostData body, MultiGetRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_mget", body, RequestParams(requestParameters)); - ///POST on /_mget http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html + ///POST on /_mget https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html ///Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("mget", "body")] public Task MultiGetAsync(PostData body, MultiGetRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_mget", ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_mget http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html + ///POST on /{index}/_mget https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html ///The name of the index ///Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiGet(string index, PostData body, MultiGetRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_mget"), body, RequestParams(requestParameters)); - ///POST on /{index}/_mget http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html + ///POST on /{index}/_mget https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html ///The name of the index ///Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("mget", "index, body")] public Task MultiGetAsync(string index, PostData body, MultiGetRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_mget"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_mget http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html + ///POST on /{index}/{type}/_mget https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html ///The name of the index ///The type of the document ///Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse MultiGetUsingType(string index, string type, PostData body, MultiGetRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_mget"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_mget http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html + ///POST on /{index}/{type}/_mget https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html ///The name of the index ///The type of the document ///Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("mget", "index, type, body")] public Task MultiGetUsingTypeAsync(string index, string type, PostData body, MultiGetRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_mget"), ctx, body, RequestParams(requestParameters)); - ///POST on /_msearch http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html + ///POST on /_msearch https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiSearch(PostData body, MultiSearchRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_msearch", body, RequestParams(requestParameters)); - ///POST on /_msearch http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html + ///POST on /_msearch https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("msearch", "body")] public Task MultiSearchAsync(PostData body, MultiSearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_msearch", ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_msearch http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html + ///POST on /{index}/_msearch https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html ///A comma-separated list of index names to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiSearch(string index, PostData body, MultiSearchRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_msearch"), body, RequestParams(requestParameters)); - ///POST on /{index}/_msearch http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html + ///POST on /{index}/_msearch https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html ///A comma-separated list of index names to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("msearch", "index, body")] public Task MultiSearchAsync(string index, PostData body, MultiSearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_msearch"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_msearch http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html + ///POST on /{index}/{type}/_msearch https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html ///A comma-separated list of index names to use as default ///A comma-separated list of document types to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse MultiSearchUsingType(string index, string type, PostData body, MultiSearchRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_msearch"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_msearch http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html + ///POST on /{index}/{type}/_msearch https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html ///A comma-separated list of index names to use as default ///A comma-separated list of document types to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("msearch", "index, type, body")] public Task MultiSearchUsingTypeAsync(string index, string type, PostData body, MultiSearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_msearch"), ctx, body, RequestParams(requestParameters)); - ///POST on /_msearch/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + ///POST on /_msearch/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiSearchTemplate(PostData body, MultiSearchTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_msearch/template", body, RequestParams(requestParameters)); - ///POST on /_msearch/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + ///POST on /_msearch/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("msearch_template", "body")] public Task MultiSearchTemplateAsync(PostData body, MultiSearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_msearch/template", ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_msearch/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + ///POST on /{index}/_msearch/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html ///A comma-separated list of index names to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiSearchTemplate(string index, PostData body, MultiSearchTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_msearch/template"), body, RequestParams(requestParameters)); - ///POST on /{index}/_msearch/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + ///POST on /{index}/_msearch/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html ///A comma-separated list of index names to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("msearch_template", "index, body")] public Task MultiSearchTemplateAsync(string index, PostData body, MultiSearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_msearch/template"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_msearch/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + ///POST on /{index}/{type}/_msearch/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html ///A comma-separated list of index names to use as default ///A comma-separated list of document types to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse MultiSearchTemplateUsingType(string index, string type, PostData body, MultiSearchTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_msearch/template"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_msearch/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + ///POST on /{index}/{type}/_msearch/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html ///A comma-separated list of index names to use as default ///A comma-separated list of document types to use as default ///The request definitions (metadata-search request definition pairs), separated by newlines ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("msearch_template", "index, type, body")] public Task MultiSearchTemplateUsingTypeAsync(string index, string type, PostData body, MultiSearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_msearch/template"), ctx, body, RequestParams(requestParameters)); - ///POST on /_mtermvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html + ///POST on /_mtermvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html ///Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiTermVectors(PostData body, MultiTermVectorsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_mtermvectors", body, RequestParams(requestParameters)); - ///POST on /_mtermvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html + ///POST on /_mtermvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html ///Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("mtermvectors", "body")] public Task MultiTermVectorsAsync(PostData body, MultiTermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_mtermvectors", ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_mtermvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html + ///POST on /{index}/_mtermvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html ///The index in which the document resides. ///Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse MultiTermVectors(string index, PostData body, MultiTermVectorsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_mtermvectors"), body, RequestParams(requestParameters)); - ///POST on /{index}/_mtermvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html + ///POST on /{index}/_mtermvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html ///The index in which the document resides. ///Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("mtermvectors", "index, body")] public Task MultiTermVectorsAsync(string index, PostData body, MultiTermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_mtermvectors"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_mtermvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html + ///POST on /{index}/{type}/_mtermvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html ///The index in which the document resides. ///The type of the document. ///Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse MultiTermVectorsUsingType(string index, string type, PostData body, MultiTermVectorsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_mtermvectors"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_mtermvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html + ///POST on /{index}/{type}/_mtermvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html ///The index in which the document resides. ///The type of the document. ///Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("mtermvectors", "index, type, body")] public Task MultiTermVectorsUsingTypeAsync(string index, string type, PostData body, MultiTermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_mtermvectors"), ctx, body, RequestParams(requestParameters)); - ///HEAD on / http://www.elastic.co/guide/ + ///HEAD on / https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Ping(PingRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(HEAD, "", null, RequestParams(requestParameters)); - ///HEAD on / http://www.elastic.co/guide/ + ///HEAD on / https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("ping", "")] public Task PingAsync(PingRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, "", ctx, null, RequestParams(requestParameters)); - ///PUT on /_scripts/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///PUT on /_scripts/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html ///Script ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse PutScript(string id, PostData body, PutScriptRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(PUT, Url($"_scripts/{id:id}"), body, RequestParams(requestParameters)); - ///PUT on /_scripts/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///PUT on /_scripts/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html ///Script ID ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("put_script", "id, body")] public Task PutScriptAsync(string id, PostData body, PutScriptRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_scripts/{id:id}"), ctx, body, RequestParams(requestParameters)); - ///PUT on /_scripts/{id}/{context} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///PUT on /_scripts/{id}/{context} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html ///Script ID ///Script context ///The document ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse PutScript(string id, string context, PostData body, PutScriptRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(PUT, Url($"_scripts/{id:id}/{context:context}"), body, RequestParams(requestParameters)); - ///PUT on /_scripts/{id}/{context} http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///PUT on /_scripts/{id}/{context} https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html ///Script ID ///Script context ///The document @@ -887,24 +887,24 @@ public TResponse ReindexRethrottle(string taskId, ReindexRethrottleRe [MapsApi("reindex_rethrottle", "task_id")] public Task ReindexRethrottleAsync(string taskId, ReindexRethrottleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_reindex/{taskId:taskId}/_rethrottle"), ctx, null, RequestParams(requestParameters)); - ///POST on /_render/template http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html + ///POST on /_render/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse RenderSearchTemplate(PostData body, RenderSearchTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_render/template", body, RequestParams(requestParameters)); - ///POST on /_render/template http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html + ///POST on /_render/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("render_search_template", "body")] public Task RenderSearchTemplateAsync(PostData body, RenderSearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_render/template", ctx, body, RequestParams(requestParameters)); - ///POST on /_render/template/{id} http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html + ///POST on /_render/template/{id} https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates ///The id of the stored search template ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse RenderSearchTemplate(string id, PostData body, RenderSearchTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"_render/template/{id:id}"), body, RequestParams(requestParameters)); - ///POST on /_render/template/{id} http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html + ///POST on /_render/template/{id} https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates ///The id of the stored search template ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. @@ -914,150 +914,152 @@ public Task RenderSearchTemplateAsync(string id, PostData ///POST on /_scripts/painless/_execute https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html ///The script to execute ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse ExecutePainlessScript(PostData body, ExecutePainlessScriptRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_scripts/painless/_execute", body, RequestParams(requestParameters)); ///POST on /_scripts/painless/_execute https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html ///The script to execute ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. [MapsApi("scripts_painless_execute", "body")] public Task ExecutePainlessScriptAsync(PostData body, ExecutePainlessScriptRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_scripts/painless/_execute", ctx, body, RequestParams(requestParameters)); - ///POST on /_search/scroll http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html + ///POST on /_search/scroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll ///The scroll ID if not passed by URL or query parameter. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Scroll(PostData body, ScrollRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_search/scroll", body, RequestParams(requestParameters)); - ///POST on /_search/scroll http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html + ///POST on /_search/scroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll ///The scroll ID if not passed by URL or query parameter. ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("scroll", "body")] public Task ScrollAsync(PostData body, ScrollRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_search/scroll", ctx, body, RequestParams(requestParameters)); - ///POST on /_search/scroll/{scroll_id} http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html + ///POST on /_search/scroll/{scroll_id} https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll ///The scroll ID ///The scroll ID if not passed by URL or query parameter. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: A scroll id can be quite large and should be specified as part of the body")] + [Obsolete("Deprecated in version 7.0.0: A scroll id can be quite large and should be specified as part of the body")] public TResponse Scroll(string scrollId, PostData body, ScrollRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"_search/scroll/{scrollId:scrollId}"), body, RequestParams(requestParameters)); - ///POST on /_search/scroll/{scroll_id} http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html + ///POST on /_search/scroll/{scroll_id} https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll ///The scroll ID ///The scroll ID if not passed by URL or query parameter. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: A scroll id can be quite large and should be specified as part of the body")] + [Obsolete("Deprecated in version 7.0.0: A scroll id can be quite large and should be specified as part of the body")] [MapsApi("scroll", "scroll_id, body")] public Task ScrollAsync(string scrollId, PostData body, ScrollRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_search/scroll/{scrollId:scrollId}"), ctx, body, RequestParams(requestParameters)); - ///POST on /_search http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html + ///POST on /_search https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Search(PostData body, SearchRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_search", body, RequestParams(requestParameters)); - ///POST on /_search http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html + ///POST on /_search https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("search", "body")] public Task SearchAsync(PostData body, SearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_search", ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_search http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html + ///POST on /{index}/_search https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Search(string index, PostData body, SearchRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_search"), body, RequestParams(requestParameters)); - ///POST on /{index}/_search http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html + ///POST on /{index}/_search https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("search", "index, body")] public Task SearchAsync(string index, PostData body, SearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_search"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_search http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html + ///POST on /{index}/{type}/_search https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///A comma-separated list of document types to search; leave empty to perform the operation on all types ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse SearchUsingType(string index, string type, PostData body, SearchRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_search"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_search http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html + ///POST on /{index}/{type}/_search https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///A comma-separated list of document types to search; leave empty to perform the operation on all types ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("search", "index, type, body")] public Task SearchUsingTypeAsync(string index, string type, PostData body, SearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_search"), ctx, body, RequestParams(requestParameters)); - ///POST on /_search_shards http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html + ///POST on /_search_shards https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse SearchShards(SearchShardsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_search_shards", null, RequestParams(requestParameters)); - ///POST on /_search_shards http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html + ///POST on /_search_shards https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("search_shards", "")] public Task SearchShardsAsync(SearchShardsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_search_shards", ctx, null, RequestParams(requestParameters)); - ///POST on /{index}/_search_shards http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html + ///POST on /{index}/_search_shards https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse SearchShards(string index, SearchShardsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_search_shards"), null, RequestParams(requestParameters)); - ///POST on /{index}/_search_shards http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html + ///POST on /{index}/_search_shards https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("search_shards", "index")] public Task SearchShardsAsync(string index, SearchShardsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_search_shards"), ctx, null, RequestParams(requestParameters)); - ///POST on /_search/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html + ///POST on /_search/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse SearchTemplate(PostData body, SearchTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_search/template", body, RequestParams(requestParameters)); - ///POST on /_search/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html + ///POST on /_search/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("search_template", "body")] public Task SearchTemplateAsync(PostData body, SearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_search/template", ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_search/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html + ///POST on /{index}/_search/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse SearchTemplate(string index, PostData body, SearchTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_search/template"), body, RequestParams(requestParameters)); - ///POST on /{index}/_search/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html + ///POST on /{index}/_search/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("search_template", "index, body")] public Task SearchTemplateAsync(string index, PostData body, SearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_search/template"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_search/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html + ///POST on /{index}/{type}/_search/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///A comma-separated list of document types to search; leave empty to perform the operation on all types ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse SearchTemplateUsingType(string index, string type, PostData body, SearchTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_search/template"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_search/template http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html + ///POST on /{index}/{type}/_search/template https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices ///A comma-separated list of document types to search; leave empty to perform the operation on all types ///The search definition template and its params ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("search_template", "index, type, body")] public Task SearchTemplateUsingTypeAsync(string index, string type, PostData body, SearchTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_search/template"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_termvectors/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + ///POST on /{index}/_termvectors/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html ///The index in which the document resides. ///The id of the document, when not specified a doc param should be supplied. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse TermVectors(string index, string id, PostData body, TermVectorsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_termvectors/{id:id}"), body, RequestParams(requestParameters)); - ///POST on /{index}/_termvectors/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + ///POST on /{index}/_termvectors/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html ///The index in which the document resides. ///The id of the document, when not specified a doc param should be supplied. ///Define parameters and or supply a document to get termvectors for. See documentation. @@ -1065,63 +1067,63 @@ public TResponse TermVectors(string index, string id, PostData body, [MapsApi("termvectors", "index, id, body")] public Task TermVectorsAsync(string index, string id, PostData body, TermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_termvectors/{id:id}"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_termvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + ///POST on /{index}/_termvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html ///The index in which the document resides. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse TermVectors(string index, PostData body, TermVectorsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_termvectors"), body, RequestParams(requestParameters)); - ///POST on /{index}/_termvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + ///POST on /{index}/_termvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html ///The index in which the document resides. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("termvectors", "index, body")] public Task TermVectorsAsync(string index, PostData body, TermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_termvectors"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/{id}/_termvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + ///POST on /{index}/{type}/{id}/_termvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html ///The index in which the document resides. ///The type of the document. ///The id of the document, when not specified a doc param should be supplied. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse TermVectorsUsingType(string index, string type, string id, PostData body, TermVectorsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/{id:id}/_termvectors"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/{id}/_termvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + ///POST on /{index}/{type}/{id}/_termvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html ///The index in which the document resides. ///The type of the document. ///The id of the document, when not specified a doc param should be supplied. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("termvectors", "index, type, id, body")] public Task TermVectorsUsingTypeAsync(string index, string type, string id, PostData body, TermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/{id:id}/_termvectors"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_termvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + ///POST on /{index}/{type}/_termvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html ///The index in which the document resides. ///The type of the document. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse TermVectorsUsingType(string index, string type, PostData body, TermVectorsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_termvectors"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_termvectors http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + ///POST on /{index}/{type}/_termvectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html ///The index in which the document resides. ///The type of the document. ///Define parameters and or supply a document to get termvectors for. See documentation. ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("termvectors", "index, type, body")] public Task TermVectorsUsingTypeAsync(string index, string type, PostData body, TermVectorsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_termvectors"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_update/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html + ///POST on /{index}/_update/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html ///The name of the index ///Document ID ///The request definition requires either `script` or partial `doc` ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse Update(string index, string id, PostData body, UpdateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_update/{id:id}"), body, RequestParams(requestParameters)); - ///POST on /{index}/_update/{id} http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html + ///POST on /{index}/_update/{id} https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html ///The name of the index ///Document ID ///The request definition requires either `script` or partial `doc` @@ -1129,22 +1131,22 @@ public TResponse Update(string index, string id, PostData body, Updat [MapsApi("update", "index, id, body")] public Task UpdateAsync(string index, string id, PostData body, UpdateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_update/{id:id}"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/{id}/_update http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html + ///POST on /{index}/{type}/{id}/_update https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html ///The name of the index ///The type of the document ///Document ID ///The request definition requires either `script` or partial `doc` ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse UpdateUsingType(string index, string type, string id, PostData body, UpdateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/{id:id}/_update"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/{id}/_update http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html + ///POST on /{index}/{type}/{id}/_update https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html ///The name of the index ///The type of the document ///Document ID ///The request definition requires either `script` or partial `doc` ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("update", "index, type, id, body")] public Task UpdateUsingTypeAsync(string index, string type, string id, PostData body, UpdateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/{id:id}/_update"), ctx, body, RequestParams(requestParameters)); @@ -1166,7 +1168,7 @@ public Task UpdateByQueryAsync(string index, PostData body ///A comma-separated list of document types to search; leave empty to perform the operation on all types ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse UpdateByQueryUsingType(string index, string type, PostData body, UpdateByQueryRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_update_by_query"), body, RequestParams(requestParameters)); ///POST on /{index}/{type}/_update_by_query https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html @@ -1174,7 +1176,7 @@ public TResponse UpdateByQueryUsingType(string index, string type, Po ///A comma-separated list of document types to search; leave empty to perform the operation on all types ///The search definition using the Query DSL ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("update_by_query", "index, type, body")] public Task UpdateByQueryUsingTypeAsync(string index, string type, PostData body, UpdateByQueryRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_update_by_query"), ctx, body, RequestParams(requestParameters)); @@ -1190,4 +1192,4 @@ public TResponse UpdateByQueryRethrottle(string taskId, UpdateByQuery public Task UpdateByQueryRethrottleAsync(string taskId, UpdateByQueryRethrottleRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_update_by_query/{taskId:taskId}/_rethrottle"), ctx, null, RequestParams(requestParameters)); } -} +} \ No newline at end of file diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Rollup.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Rollup.cs index 29d781c3b97..4192fcc383a 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Rollup.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Rollup.cs @@ -43,132 +43,154 @@ internal LowLevelRollupNamespace(ElasticLowLevelClient client): base(client) { } - ///DELETE on /_rollup/job/{id} + ///DELETE on /_rollup/job/{id} ///The ID of the job to delete ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse DeleteJob(string id, DeleteRollupJobRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(DELETE, Url($"_rollup/job/{id:id}"), null, RequestParams(requestParameters)); - ///DELETE on /_rollup/job/{id} + ///DELETE on /_rollup/job/{id} ///The ID of the job to delete ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. [MapsApi("rollup.delete_job", "id")] public Task DeleteJobAsync(string id, DeleteRollupJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_rollup/job/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///GET on /_rollup/job/{id} + ///GET on /_rollup/job/{id} ///The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse GetJob(string id, GetRollupJobRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"_rollup/job/{id:id}"), null, RequestParams(requestParameters)); - ///GET on /_rollup/job/{id} + ///GET on /_rollup/job/{id} ///The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. [MapsApi("rollup.get_jobs", "id")] public Task GetJobAsync(string id, GetRollupJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_rollup/job/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///GET on /_rollup/job/ + ///GET on /_rollup/job/ ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse GetJob(GetRollupJobRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_rollup/job/", null, RequestParams(requestParameters)); - ///GET on /_rollup/job/ + ///GET on /_rollup/job/ ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. [MapsApi("rollup.get_jobs", "")] public Task GetJobAsync(GetRollupJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_rollup/job/", ctx, null, RequestParams(requestParameters)); - ///GET on /_rollup/data/{id} + ///GET on /_rollup/data/{id} ///The ID of the index to check rollup capabilities on, or left blank for all jobs ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse GetCapabilities(string id, GetRollupCapabilitiesRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"_rollup/data/{id:id}"), null, RequestParams(requestParameters)); - ///GET on /_rollup/data/{id} + ///GET on /_rollup/data/{id} ///The ID of the index to check rollup capabilities on, or left blank for all jobs ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. [MapsApi("rollup.get_rollup_caps", "id")] public Task GetCapabilitiesAsync(string id, GetRollupCapabilitiesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_rollup/data/{id:id}"), ctx, null, RequestParams(requestParameters)); - ///GET on /_rollup/data/ + ///GET on /_rollup/data/ ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse GetCapabilities(GetRollupCapabilitiesRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_rollup/data/", null, RequestParams(requestParameters)); - ///GET on /_rollup/data/ + ///GET on /_rollup/data/ ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. [MapsApi("rollup.get_rollup_caps", "")] public Task GetCapabilitiesAsync(GetRollupCapabilitiesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_rollup/data/", ctx, null, RequestParams(requestParameters)); - ///GET on /{index}/_rollup/data + ///GET on /{index}/_rollup/data ///The rollup index or index pattern to obtain rollup capabilities from. ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse GetIndexCapabilities(string index, GetRollupIndexCapabilitiesRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"{index:index}/_rollup/data"), null, RequestParams(requestParameters)); - ///GET on /{index}/_rollup/data + ///GET on /{index}/_rollup/data ///The rollup index or index pattern to obtain rollup capabilities from. ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. [MapsApi("rollup.get_rollup_index_caps", "index")] public Task GetIndexCapabilitiesAsync(string index, GetRollupIndexCapabilitiesRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_rollup/data"), ctx, null, RequestParams(requestParameters)); - ///PUT on /_rollup/job/{id} + ///PUT on /_rollup/job/{id} ///The ID of the job to create ///The job configuration ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse CreateJob(string id, PostData body, CreateRollupJobRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(PUT, Url($"_rollup/job/{id:id}"), body, RequestParams(requestParameters)); - ///PUT on /_rollup/job/{id} + ///PUT on /_rollup/job/{id} ///The ID of the job to create ///The job configuration ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. [MapsApi("rollup.put_job", "id, body")] public Task CreateJobAsync(string id, PostData body, CreateRollupJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_rollup/job/{id:id}"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/_rollup_search + ///POST on /{index}/_rollup_search ///The indices or index-pattern(s) (containing rollup or regular data) that should be searched ///The search request body ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse Search(string index, PostData body, RollupSearchRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/_rollup_search"), body, RequestParams(requestParameters)); - ///POST on /{index}/_rollup_search + ///POST on /{index}/_rollup_search ///The indices or index-pattern(s) (containing rollup or regular data) that should be searched ///The search request body ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. [MapsApi("rollup.rollup_search", "index, body")] public Task SearchAsync(string index, PostData body, RollupSearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/_rollup_search"), ctx, body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_rollup_search + ///POST on /{index}/{type}/_rollup_search ///The indices or index-pattern(s) (containing rollup or regular data) that should be searched ///The doc type inside the index ///The search request body ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] public TResponse SearchUsingType(string index, string type, PostData body, RollupSearchRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"{index:index}/{type:type}/_rollup_search"), body, RequestParams(requestParameters)); - ///POST on /{index}/{type}/_rollup_search + ///POST on /{index}/{type}/_rollup_search ///The indices or index-pattern(s) (containing rollup or regular data) that should be searched ///The doc type inside the index ///The search request body ///Request specific configuration such as querystring parameters & request specific connection settings. - [Obsolete("Deprecated in version 7.0: Specifying types in urls has been deprecated")] + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + [Obsolete("Deprecated in version 7.0.0: Specifying types in urls has been deprecated")] [MapsApi("rollup.rollup_search", "index, type, body")] public Task SearchUsingTypeAsync(string index, string type, PostData body, RollupSearchRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"{index:index}/{type:type}/_rollup_search"), ctx, body, RequestParams(requestParameters)); - ///POST on /_rollup/job/{id}/_start + ///POST on /_rollup/job/{id}/_start ///The ID of the job to start ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse StartJob(string id, StartRollupJobRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"_rollup/job/{id:id}/_start"), null, RequestParams(requestParameters)); - ///POST on /_rollup/job/{id}/_start + ///POST on /_rollup/job/{id}/_start ///The ID of the job to start ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. [MapsApi("rollup.start_job", "id")] public Task StartJobAsync(string id, StartRollupJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_rollup/job/{id:id}/_start"), ctx, null, RequestParams(requestParameters)); - ///POST on /_rollup/job/{id}/_stop + ///POST on /_rollup/job/{id}/_stop ///The ID of the job to stop ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public TResponse StopJob(string id, StopRollupJobRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"_rollup/job/{id:id}/_stop"), null, RequestParams(requestParameters)); - ///POST on /_rollup/job/{id}/_stop + ///POST on /_rollup/job/{id}/_stop ///The ID of the job to stop ///Request specific configuration such as querystring parameters & request specific connection settings. + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. [MapsApi("rollup.stop_job", "id")] public Task StopJobAsync(string id, StopRollupJobRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_rollup/job/{id:id}/_stop"), ctx, null, RequestParams(requestParameters)); } -} +} \ No newline at end of file diff --git a/src/Nest/Descriptors.Cat.cs b/src/Nest/Descriptors.Cat.cs index 8926329e63e..ecdd78fc4bb 100644 --- a/src/Nest/Descriptors.Cat.cs +++ b/src/Nest/Descriptors.Cat.cs @@ -30,7 +30,7 @@ // ReSharper disable RedundantNameQualifier namespace Nest { - ///Descriptor for Aliases https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html + ///Descriptor for Aliases https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html public partial class CatAliasesDescriptor : RequestDescriptorBase, ICatAliasesRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatAliases; @@ -47,26 +47,26 @@ public CatAliasesDescriptor(Names name): base(r => r.Optional("name", name)) // values part of the url path Names ICatAliasesRequest.Name => Self.RouteValues.Get("name"); - ///A comma-separated list of alias names to return + ///A comma-separated list of alias names to return public CatAliasesDescriptor Name(Names name) => Assign(name, (a, v) => a.RouteValues.Optional("name", v)); // Request parameters - ///a short version of the Accept header, e.g. json, yaml + ///a short version of the Accept header, e.g. json, yaml public CatAliasesDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display + ///Comma-separated list of column names to display public CatAliasesDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information + ///Return help information public CatAliasesDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public CatAliasesDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public CatAliasesDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatAliasesDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers + ///Verbose mode. Display column headers public CatAliasesDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); } - ///Descriptor for Allocation https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html + ///Descriptor for Allocation https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html public partial class CatAllocationDescriptor : RequestDescriptorBase, ICatAllocationRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatAllocation; @@ -83,28 +83,28 @@ public CatAllocationDescriptor(NodeIds nodeId): base(r => r.Optional("node_id", // values part of the url path NodeIds ICatAllocationRequest.NodeId => Self.RouteValues.Get("node_id"); - ///A comma-separated list of node IDs or names to limit the returned information + ///A comma-separated list of node IDs or names to limit the returned information public CatAllocationDescriptor NodeId(NodeIds nodeId) => Assign(nodeId, (a, v) => a.RouteValues.Optional("node_id", v)); // Request parameters - ///The unit in which to display byte values + ///The unit in which to display byte values public CatAllocationDescriptor Bytes(Bytes? bytes) => Qs("bytes", bytes); - ///a short version of the Accept header, e.g. json, yaml + ///a short version of the Accept header, e.g. json, yaml public CatAllocationDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display + ///Comma-separated list of column names to display public CatAllocationDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information + ///Return help information public CatAllocationDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public CatAllocationDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public CatAllocationDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatAllocationDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers + ///Verbose mode. Display column headers public CatAllocationDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); } - ///Descriptor for Count https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html + ///Descriptor for Count https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html public partial class CatCountDescriptor : RequestDescriptorBase, ICatCountRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatCount; @@ -121,31 +121,31 @@ public CatCountDescriptor(Indices index): base(r => r.Optional("index", index)) // values part of the url path Indices ICatCountRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names to limit the returned information + ///A comma-separated list of index names to limit the returned information public CatCountDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public CatCountDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public CatCountDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///a short version of the Accept header, e.g. json, yaml + ///a short version of the Accept header, e.g. json, yaml public CatCountDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display + ///Comma-separated list of column names to display public CatCountDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information + ///Return help information public CatCountDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public CatCountDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public CatCountDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatCountDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers + ///Verbose mode. Display column headers public CatCountDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); } - ///Descriptor for Fielddata https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html + ///Descriptor for Fielddata https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html public partial class CatFielddataDescriptor : RequestDescriptorBase, ICatFielddataRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatFielddata; @@ -162,66 +162,66 @@ public CatFielddataDescriptor(Fields fields): base(r => r.Optional("fields", fie // values part of the url path Fields ICatFielddataRequest.Fields => Self.RouteValues.Get("fields"); - ///A comma-separated list of fields to return the fielddata size + ///A comma-separated list of fields to return the fielddata size public CatFielddataDescriptor Fields(Fields fields) => Assign(fields, (a, v) => a.RouteValues.Optional("fields", v)); - ///A comma-separated list of fields to return the fielddata size + ///A comma-separated list of fields to return the fielddata size public CatFielddataDescriptor Fields(params Expression>[] fields) => Assign(fields, (a, v) => a.RouteValues.Optional("fields", (Fields)v)); // Request parameters - ///The unit in which to display byte values + ///The unit in which to display byte values public CatFielddataDescriptor Bytes(Bytes? bytes) => Qs("bytes", bytes); - ///a short version of the Accept header, e.g. json, yaml + ///a short version of the Accept header, e.g. json, yaml public CatFielddataDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display + ///Comma-separated list of column names to display public CatFielddataDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information + ///Return help information public CatFielddataDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public CatFielddataDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public CatFielddataDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatFielddataDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers + ///Verbose mode. Display column headers public CatFielddataDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); } - ///Descriptor for Health https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html + ///Descriptor for Health https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html public partial class CatHealthDescriptor : RequestDescriptorBase, ICatHealthRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatHealth; // values part of the url path // Request parameters - ///a short version of the Accept header, e.g. json, yaml + ///a short version of the Accept header, e.g. json, yaml public CatHealthDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display + ///Comma-separated list of column names to display public CatHealthDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information + ///Return help information public CatHealthDescriptor Help(bool? help = true) => Qs("help", help); - ///Set to false to disable timestamping + ///Set to false to disable timestamping public CatHealthDescriptor IncludeTimestamp(bool? includetimestamp = true) => Qs("ts", includetimestamp); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public CatHealthDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public CatHealthDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatHealthDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers + ///Verbose mode. Display column headers public CatHealthDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); } - ///Descriptor for Help https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html + ///Descriptor for Help https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html public partial class CatHelpDescriptor : RequestDescriptorBase, ICatHelpRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatHelp; // values part of the url path // Request parameters - ///Return help information + ///Return help information public CatHelpDescriptor Help(bool? help = true) => Qs("help", help); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatHelpDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); } - ///Descriptor for Indices https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html + ///Descriptor for Indices https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html public partial class CatIndicesDescriptor : RequestDescriptorBase, ICatIndicesRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatIndices; @@ -238,151 +238,151 @@ public CatIndicesDescriptor(Indices index): base(r => r.Optional("index", index) // values part of the url path Indices ICatIndicesRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names to limit the returned information + ///A comma-separated list of index names to limit the returned information public CatIndicesDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public CatIndicesDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public CatIndicesDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///The unit in which to display byte values + ///The unit in which to display byte values public CatIndicesDescriptor Bytes(Bytes? bytes) => Qs("bytes", bytes); - ///a short version of the Accept header, e.g. json, yaml + ///a short version of the Accept header, e.g. json, yaml public CatIndicesDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display + ///Comma-separated list of column names to display public CatIndicesDescriptor Headers(params string[] headers) => Qs("h", headers); - ///A health status ("green", "yellow", or "red" to filter only indices matching the specified health status + ///A health status ("green", "yellow", or "red" to filter only indices matching the specified health status public CatIndicesDescriptor Health(Health? health) => Qs("health", health); - ///Return help information + ///Return help information public CatIndicesDescriptor Help(bool? help = true) => Qs("help", help); - ///If set to true segment stats will include stats for segments that are not currently loaded into memory + ///If set to true segment stats will include stats for segments that are not currently loaded into memory public CatIndicesDescriptor IncludeUnloadedSegments(bool? includeunloadedsegments = true) => Qs("include_unloaded_segments", includeunloadedsegments); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public CatIndicesDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public CatIndicesDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Set to true to return stats only for primary shards + ///Set to true to return stats only for primary shards public CatIndicesDescriptor Pri(bool? pri = true) => Qs("pri", pri); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatIndicesDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers + ///Verbose mode. Display column headers public CatIndicesDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); } - ///Descriptor for Master https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html + ///Descriptor for Master https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html public partial class CatMasterDescriptor : RequestDescriptorBase, ICatMasterRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatMaster; // values part of the url path // Request parameters - ///a short version of the Accept header, e.g. json, yaml + ///a short version of the Accept header, e.g. json, yaml public CatMasterDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display + ///Comma-separated list of column names to display public CatMasterDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information + ///Return help information public CatMasterDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public CatMasterDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public CatMasterDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatMasterDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers + ///Verbose mode. Display column headers public CatMasterDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); } - ///Descriptor for NodeAttributes https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html + ///Descriptor for NodeAttributes https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html public partial class CatNodeAttributesDescriptor : RequestDescriptorBase, ICatNodeAttributesRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatNodeAttributes; // values part of the url path // Request parameters - ///a short version of the Accept header, e.g. json, yaml + ///a short version of the Accept header, e.g. json, yaml public CatNodeAttributesDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display + ///Comma-separated list of column names to display public CatNodeAttributesDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information + ///Return help information public CatNodeAttributesDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public CatNodeAttributesDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public CatNodeAttributesDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatNodeAttributesDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers + ///Verbose mode. Display column headers public CatNodeAttributesDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); } - ///Descriptor for Nodes https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html + ///Descriptor for Nodes https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html public partial class CatNodesDescriptor : RequestDescriptorBase, ICatNodesRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatNodes; // values part of the url path // Request parameters - ///a short version of the Accept header, e.g. json, yaml + ///a short version of the Accept header, e.g. json, yaml public CatNodesDescriptor Format(string format) => Qs("format", format); - ///Return the full node ID instead of the shortened version (default: false) + ///Return the full node ID instead of the shortened version (default: false) public CatNodesDescriptor FullId(bool? fullid = true) => Qs("full_id", fullid); - ///Comma-separated list of column names to display + ///Comma-separated list of column names to display public CatNodesDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information + ///Return help information public CatNodesDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public CatNodesDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public CatNodesDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatNodesDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers + ///Verbose mode. Display column headers public CatNodesDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); } - ///Descriptor for PendingTasks https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html + ///Descriptor for PendingTasks https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html public partial class CatPendingTasksDescriptor : RequestDescriptorBase, ICatPendingTasksRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatPendingTasks; // values part of the url path // Request parameters - ///a short version of the Accept header, e.g. json, yaml + ///a short version of the Accept header, e.g. json, yaml public CatPendingTasksDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display + ///Comma-separated list of column names to display public CatPendingTasksDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information + ///Return help information public CatPendingTasksDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public CatPendingTasksDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public CatPendingTasksDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatPendingTasksDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers + ///Verbose mode. Display column headers public CatPendingTasksDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); } - ///Descriptor for Plugins https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html + ///Descriptor for Plugins https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html public partial class CatPluginsDescriptor : RequestDescriptorBase, ICatPluginsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatPlugins; // values part of the url path // Request parameters - ///a short version of the Accept header, e.g. json, yaml + ///a short version of the Accept header, e.g. json, yaml public CatPluginsDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display + ///Comma-separated list of column names to display public CatPluginsDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information + ///Return help information public CatPluginsDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public CatPluginsDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public CatPluginsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatPluginsDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers + ///Verbose mode. Display column headers public CatPluginsDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); } - ///Descriptor for Recovery https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html + ///Descriptor for Recovery https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html public partial class CatRecoveryDescriptor : RequestDescriptorBase, ICatRecoveryRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatRecovery; @@ -399,53 +399,53 @@ public CatRecoveryDescriptor(Indices index): base(r => r.Optional("index", index // values part of the url path Indices ICatRecoveryRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names to limit the returned information + ///A comma-separated list of index names to limit the returned information public CatRecoveryDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public CatRecoveryDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public CatRecoveryDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///The unit in which to display byte values + ///The unit in which to display byte values public CatRecoveryDescriptor Bytes(Bytes? bytes) => Qs("bytes", bytes); - ///a short version of the Accept header, e.g. json, yaml + ///a short version of the Accept header, e.g. json, yaml public CatRecoveryDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display + ///Comma-separated list of column names to display public CatRecoveryDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information + ///Return help information public CatRecoveryDescriptor Help(bool? help = true) => Qs("help", help); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public CatRecoveryDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatRecoveryDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers + ///Verbose mode. Display column headers public CatRecoveryDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); } - ///Descriptor for Repositories https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html + ///Descriptor for Repositories https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html public partial class CatRepositoriesDescriptor : RequestDescriptorBase, ICatRepositoriesRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatRepositories; // values part of the url path // Request parameters - ///a short version of the Accept header, e.g. json, yaml + ///a short version of the Accept header, e.g. json, yaml public CatRepositoriesDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display + ///Comma-separated list of column names to display public CatRepositoriesDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information + ///Return help information public CatRepositoriesDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from master node + ///Return local information, do not retrieve the state from master node public CatRepositoriesDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public CatRepositoriesDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatRepositoriesDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers + ///Verbose mode. Display column headers public CatRepositoriesDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); } - ///Descriptor for Segments https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html + ///Descriptor for Segments https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html public partial class CatSegmentsDescriptor : RequestDescriptorBase, ICatSegmentsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatSegments; @@ -462,29 +462,29 @@ public CatSegmentsDescriptor(Indices index): base(r => r.Optional("index", index // values part of the url path Indices ICatSegmentsRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names to limit the returned information + ///A comma-separated list of index names to limit the returned information public CatSegmentsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public CatSegmentsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public CatSegmentsDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///The unit in which to display byte values + ///The unit in which to display byte values public CatSegmentsDescriptor Bytes(Bytes? bytes) => Qs("bytes", bytes); - ///a short version of the Accept header, e.g. json, yaml + ///a short version of the Accept header, e.g. json, yaml public CatSegmentsDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display + ///Comma-separated list of column names to display public CatSegmentsDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information + ///Return help information public CatSegmentsDescriptor Help(bool? help = true) => Qs("help", help); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatSegmentsDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers + ///Verbose mode. Display column headers public CatSegmentsDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); } - ///Descriptor for Shards https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html + ///Descriptor for Shards https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html public partial class CatShardsDescriptor : RequestDescriptorBase, ICatShardsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatShards; @@ -501,33 +501,33 @@ public CatShardsDescriptor(Indices index): base(r => r.Optional("index", index)) // values part of the url path Indices ICatShardsRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names to limit the returned information + ///A comma-separated list of index names to limit the returned information public CatShardsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public CatShardsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public CatShardsDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///The unit in which to display byte values + ///The unit in which to display byte values public CatShardsDescriptor Bytes(Bytes? bytes) => Qs("bytes", bytes); - ///a short version of the Accept header, e.g. json, yaml + ///a short version of the Accept header, e.g. json, yaml public CatShardsDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display + ///Comma-separated list of column names to display public CatShardsDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information + ///Return help information public CatShardsDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public CatShardsDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public CatShardsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatShardsDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers + ///Verbose mode. Display column headers public CatShardsDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); } - ///Descriptor for Snapshots https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html + ///Descriptor for Snapshots https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html public partial class CatSnapshotsDescriptor : RequestDescriptorBase, ICatSnapshotsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatSnapshots; @@ -544,52 +544,52 @@ public CatSnapshotsDescriptor(Names repository): base(r => r.Optional("repositor // values part of the url path Names ICatSnapshotsRequest.RepositoryName => Self.RouteValues.Get("repository"); - ///Name of repository from which to fetch the snapshot information + ///Name of repository from which to fetch the snapshot information public CatSnapshotsDescriptor RepositoryName(Names repository) => Assign(repository, (a, v) => a.RouteValues.Optional("repository", v)); // Request parameters - ///a short version of the Accept header, e.g. json, yaml + ///a short version of the Accept header, e.g. json, yaml public CatSnapshotsDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display + ///Comma-separated list of column names to display public CatSnapshotsDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information + ///Return help information public CatSnapshotsDescriptor Help(bool? help = true) => Qs("help", help); - ///Set to true to ignore unavailable snapshots + ///Set to true to ignore unavailable snapshots public CatSnapshotsDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public CatSnapshotsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatSnapshotsDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers + ///Verbose mode. Display column headers public CatSnapshotsDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); } - ///Descriptor for Tasks https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + ///Descriptor for Tasks https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html public partial class CatTasksDescriptor : RequestDescriptorBase, ICatTasksRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatTasks; // values part of the url path // Request parameters - ///A comma-separated list of actions that should be returned. Leave empty to return all. + ///A comma-separated list of actions that should be returned. Leave empty to return all. public CatTasksDescriptor Actions(params string[] actions) => Qs("actions", actions); - ///Return detailed task information (default: false) + ///Return detailed task information (default: false) public CatTasksDescriptor Detailed(bool? detailed = true) => Qs("detailed", detailed); - ///a short version of the Accept header, e.g. json, yaml + ///a short version of the Accept header, e.g. json, yaml public CatTasksDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display + ///Comma-separated list of column names to display public CatTasksDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information + ///Return help information public CatTasksDescriptor Help(bool? help = true) => Qs("help", help); - ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes public CatTasksDescriptor NodeId(params string[] nodeid) => Qs("node_id", nodeid); - ///Return tasks with specified parent task id. Set to -1 to return all. + ///Return tasks with specified parent task id. Set to -1 to return all. public CatTasksDescriptor ParentTask(long? parenttask) => Qs("parent_task", parenttask); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatTasksDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers + ///Verbose mode. Display column headers public CatTasksDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); } - ///Descriptor for Templates https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html + ///Descriptor for Templates https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html public partial class CatTemplatesDescriptor : RequestDescriptorBase, ICatTemplatesRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatTemplates; @@ -606,26 +606,26 @@ public CatTemplatesDescriptor(Name name): base(r => r.Optional("name", name)) // values part of the url path Name ICatTemplatesRequest.Name => Self.RouteValues.Get("name"); - ///A pattern that returned template names must match + ///A pattern that returned template names must match public CatTemplatesDescriptor Name(Name name) => Assign(name, (a, v) => a.RouteValues.Optional("name", v)); // Request parameters - ///a short version of the Accept header, e.g. json, yaml + ///a short version of the Accept header, e.g. json, yaml public CatTemplatesDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display + ///Comma-separated list of column names to display public CatTemplatesDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information + ///Return help information public CatTemplatesDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public CatTemplatesDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public CatTemplatesDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatTemplatesDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers + ///Verbose mode. Display column headers public CatTemplatesDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); } - ///Descriptor for ThreadPool https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html + ///Descriptor for ThreadPool https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html public partial class CatThreadPoolDescriptor : RequestDescriptorBase, ICatThreadPoolRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CatThreadPool; @@ -642,24 +642,24 @@ public CatThreadPoolDescriptor(Names threadPoolPatterns): base(r => r.Optional(" // values part of the url path Names ICatThreadPoolRequest.ThreadPoolPatterns => Self.RouteValues.Get("thread_pool_patterns"); - ///A comma-separated list of regular-expressions to filter the thread pools in the output + ///A comma-separated list of regular-expressions to filter the thread pools in the output public CatThreadPoolDescriptor ThreadPoolPatterns(Names threadPoolPatterns) => Assign(threadPoolPatterns, (a, v) => a.RouteValues.Optional("thread_pool_patterns", v)); // Request parameters - ///a short version of the Accept header, e.g. json, yaml + ///a short version of the Accept header, e.g. json, yaml public CatThreadPoolDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display + ///Comma-separated list of column names to display public CatThreadPoolDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information + ///Return help information public CatThreadPoolDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public CatThreadPoolDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public CatThreadPoolDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///The multiplier in which to display values + ///The multiplier in which to display values public CatThreadPoolDescriptor Size(Size? size) => Qs("size", size); - ///Comma-separated list of column names or column aliases to sort by + ///Comma-separated list of column names or column aliases to sort by public CatThreadPoolDescriptor SortByColumns(params string[] sortbycolumns) => Qs("s", sortbycolumns); - ///Verbose mode. Display column headers + ///Verbose mode. Display column headers public CatThreadPoolDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); } } \ No newline at end of file diff --git a/src/Nest/Descriptors.Cluster.cs b/src/Nest/Descriptors.Cluster.cs index 430a0563ff6..4874edf1408 100644 --- a/src/Nest/Descriptors.Cluster.cs +++ b/src/Nest/Descriptors.Cluster.cs @@ -30,35 +30,35 @@ // ReSharper disable RedundantNameQualifier namespace Nest { - ///Descriptor for AllocationExplain https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html + ///Descriptor for AllocationExplain https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html public partial class ClusterAllocationExplainDescriptor : RequestDescriptorBase, IClusterAllocationExplainRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterAllocationExplain; // values part of the url path // Request parameters - ///Return information about disk usage and shard sizes (default: false) + ///Return information about disk usage and shard sizes (default: false) public ClusterAllocationExplainDescriptor IncludeDiskInfo(bool? includediskinfo = true) => Qs("include_disk_info", includediskinfo); - ///Return 'YES' decisions in explanation (default: false) + ///Return 'YES' decisions in explanation (default: false) public ClusterAllocationExplainDescriptor IncludeYesDecisions(bool? includeyesdecisions = true) => Qs("include_yes_decisions", includeyesdecisions); } - ///Descriptor for GetSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html + ///Descriptor for GetSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html public partial class ClusterGetSettingsDescriptor : RequestDescriptorBase, IClusterGetSettingsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterGetSettings; // values part of the url path // Request parameters - ///Return settings in flat format (default: false) + ///Return settings in flat format (default: false) public ClusterGetSettingsDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings); - ///Whether to return all default clusters setting. + ///Whether to return all default clusters setting. public ClusterGetSettingsDescriptor IncludeDefaults(bool? includedefaults = true) => Qs("include_defaults", includedefaults); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public ClusterGetSettingsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public ClusterGetSettingsDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for Health https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html + ///Descriptor for Health https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html public partial class ClusterHealthDescriptor : RequestDescriptorBase, IClusterHealthRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterHealth; @@ -75,65 +75,65 @@ public ClusterHealthDescriptor(Indices index): base(r => r.Optional("index", ind // values part of the url path Indices IClusterHealthRequest.Index => Self.RouteValues.Get("index"); - ///Limit the information returned to a specific index + ///Limit the information returned to a specific index public ClusterHealthDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public ClusterHealthDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public ClusterHealthDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public ClusterHealthDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Specify the level of detail for returned information + ///Specify the level of detail for returned information public ClusterHealthDescriptor Level(Level? level) => Qs("level", level); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public ClusterHealthDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public ClusterHealthDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public ClusterHealthDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Wait until the specified number of shards is active + ///Wait until the specified number of shards is active public ClusterHealthDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); - ///Wait until all currently queued events with the given priority are processed + ///Wait until all currently queued events with the given priority are processed public ClusterHealthDescriptor WaitForEvents(WaitForEvents? waitforevents) => Qs("wait_for_events", waitforevents); - ///Whether to wait until there are no initializing shards in the cluster + ///Whether to wait until there are no initializing shards in the cluster public ClusterHealthDescriptor WaitForNoInitializingShards(bool? waitfornoinitializingshards = true) => Qs("wait_for_no_initializing_shards", waitfornoinitializingshards); - ///Whether to wait until there are no relocating shards in the cluster + ///Whether to wait until there are no relocating shards in the cluster public ClusterHealthDescriptor WaitForNoRelocatingShards(bool? waitfornorelocatingshards = true) => Qs("wait_for_no_relocating_shards", waitfornorelocatingshards); - ///Wait until the specified number of nodes is available + ///Wait until the specified number of nodes is available public ClusterHealthDescriptor WaitForNodes(string waitfornodes) => Qs("wait_for_nodes", waitfornodes); - ///Wait until cluster is in a specific state + ///Wait until cluster is in a specific state public ClusterHealthDescriptor WaitForStatus(WaitForStatus? waitforstatus) => Qs("wait_for_status", waitforstatus); } - ///Descriptor for PendingTasks https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html + ///Descriptor for PendingTasks https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html public partial class ClusterPendingTasksDescriptor : RequestDescriptorBase, IClusterPendingTasksRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterPendingTasks; // values part of the url path // Request parameters - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public ClusterPendingTasksDescriptor Local(bool? local = true) => Qs("local", local); - ///Specify timeout for connection to master + ///Specify timeout for connection to master public ClusterPendingTasksDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); } - ///Descriptor for PutSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html + ///Descriptor for PutSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html public partial class ClusterPutSettingsDescriptor : RequestDescriptorBase, IClusterPutSettingsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterPutSettings; // values part of the url path // Request parameters - ///Return settings in flat format (default: false) + ///Return settings in flat format (default: false) public ClusterPutSettingsDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public ClusterPutSettingsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public ClusterPutSettingsDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for RemoteInfo https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html + ///Descriptor for RemoteInfo https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html public partial class RemoteInfoDescriptor : RequestDescriptorBase, IRemoteInfoRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterRemoteInfo; @@ -141,27 +141,27 @@ public partial class RemoteInfoDescriptor : RequestDescriptorBaseDescriptor for Reroute https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html + ///Descriptor for Reroute https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html public partial class ClusterRerouteDescriptor : RequestDescriptorBase, IClusterRerouteRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterReroute; // values part of the url path // Request parameters - ///Simulate the operation only and return the resulting state + ///Simulate the operation only and return the resulting state public ClusterRerouteDescriptor DryRun(bool? dryrun = true) => Qs("dry_run", dryrun); - ///Return an explanation of why the commands can or cannot be executed + ///Return an explanation of why the commands can or cannot be executed public ClusterRerouteDescriptor Explain(bool? explain = true) => Qs("explain", explain); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public ClusterRerouteDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Limit the information returned to the specified metrics. Defaults to all but metadata + ///Limit the information returned to the specified metrics. Defaults to all but metadata public ClusterRerouteDescriptor Metric(params string[] metric) => Qs("metric", metric); - ///Retries allocation of shards that are blocked due to too many subsequent allocation failures + ///Retries allocation of shards that are blocked due to too many subsequent allocation failures public ClusterRerouteDescriptor RetryFailed(bool? retryfailed = true) => Qs("retry_failed", retryfailed); - ///Explicit operation timeout + ///Explicit operation timeout public ClusterRerouteDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for State https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html + ///Descriptor for State https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html public partial class ClusterStateDescriptor : RequestDescriptorBase, IClusterStateRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterState; @@ -186,35 +186,35 @@ public ClusterStateDescriptor(Metrics metric, Indices index): base(r => r.Option // values part of the url path Metrics IClusterStateRequest.Metric => Self.RouteValues.Get("metric"); Indices IClusterStateRequest.Index => Self.RouteValues.Get("index"); - ///Limit the information returned to the specified metrics + ///Limit the information returned to the specified metrics public ClusterStateDescriptor Metric(Metrics metric) => Assign(metric, (a, v) => a.RouteValues.Optional("metric", v)); - ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices + ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices public ClusterStateDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public ClusterStateDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public ClusterStateDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public ClusterStateDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public ClusterStateDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Return settings in flat format (default: false) + ///Return settings in flat format (default: false) public ClusterStateDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public ClusterStateDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public ClusterStateDescriptor Local(bool? local = true) => Qs("local", local); - ///Specify timeout for connection to master + ///Specify timeout for connection to master public ClusterStateDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Wait for the metadata version to be equal or greater than the specified metadata version + ///Wait for the metadata version to be equal or greater than the specified metadata version public ClusterStateDescriptor WaitForMetadataVersion(long? waitformetadataversion) => Qs("wait_for_metadata_version", waitformetadataversion); - ///The maximum time to wait for wait_for_metadata_version before timing out + ///The maximum time to wait for wait_for_metadata_version before timing out public ClusterStateDescriptor WaitForTimeout(Time waitfortimeout) => Qs("wait_for_timeout", waitfortimeout); } - ///Descriptor for Stats https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html + ///Descriptor for Stats https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html public partial class ClusterStatsDescriptor : RequestDescriptorBase, IClusterStatsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterStats; @@ -231,12 +231,12 @@ public ClusterStatsDescriptor(NodeIds nodeId): base(r => r.Optional("node_id", n // values part of the url path NodeIds IClusterStatsRequest.NodeId => Self.RouteValues.Get("node_id"); - ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes public ClusterStatsDescriptor NodeId(NodeIds nodeId) => Assign(nodeId, (a, v) => a.RouteValues.Optional("node_id", v)); // Request parameters - ///Return settings in flat format (default: false) + ///Return settings in flat format (default: false) public ClusterStatsDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings); - ///Explicit operation timeout + ///Explicit operation timeout public ClusterStatsDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } } \ No newline at end of file diff --git a/src/Nest/Descriptors.CrossClusterReplication.cs b/src/Nest/Descriptors.CrossClusterReplication.cs index 4771664e5f2..7c730993241 100644 --- a/src/Nest/Descriptors.CrossClusterReplication.cs +++ b/src/Nest/Descriptors.CrossClusterReplication.cs @@ -30,7 +30,7 @@ // ReSharper disable RedundantNameQualifier namespace Nest { - ///Descriptor for DeleteAutoFollowPattern https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html + ///Descriptor for DeleteAutoFollowPattern https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html public partial class DeleteAutoFollowPatternDescriptor : RequestDescriptorBase, IDeleteAutoFollowPatternRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CrossClusterReplicationDeleteAutoFollowPattern; @@ -51,7 +51,7 @@ protected DeleteAutoFollowPatternDescriptor(): base() // Request parameters } - ///Descriptor for CreateFollowIndex https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html + ///Descriptor for CreateFollowIndex https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html public partial class CreateFollowIndexDescriptor : RequestDescriptorBase, ICreateFollowIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CrossClusterReplicationCreateFollowIndex; @@ -69,17 +69,17 @@ protected CreateFollowIndexDescriptor(): base() // values part of the url path IndexName ICreateFollowIndexRequest.Index => Self.RouteValues.Get("index"); - ///The name of the follower index + ///The name of the follower index public CreateFollowIndexDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public CreateFollowIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters - ///Sets the number of shard copies that must be active before returning. Defaults to 0. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + ///Sets the number of shard copies that must be active before returning. Defaults to 0. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) public CreateFollowIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } - ///Descriptor for FollowInfo https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html + ///Descriptor for FollowInfo https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html public partial class FollowInfoDescriptor : RequestDescriptorBase, IFollowInfoRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CrossClusterReplicationFollowInfo; @@ -97,17 +97,17 @@ protected FollowInfoDescriptor(): base() // values part of the url path Indices IFollowInfoRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index patterns; use `_all` to perform the operation on all indices + ///A comma-separated list of index patterns; use `_all` to perform the operation on all indices public FollowInfoDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public FollowInfoDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public FollowInfoDescriptor AllIndices() => Index(Indices.All); // Request parameters } - ///Descriptor for FollowIndexStats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html + ///Descriptor for FollowIndexStats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html public partial class FollowIndexStatsDescriptor : RequestDescriptorBase, IFollowIndexStatsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CrossClusterReplicationFollowIndexStats; @@ -125,17 +125,17 @@ protected FollowIndexStatsDescriptor(): base() // values part of the url path Indices IFollowIndexStatsRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index patterns; use `_all` to perform the operation on all indices + ///A comma-separated list of index patterns; use `_all` to perform the operation on all indices public FollowIndexStatsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public FollowIndexStatsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public FollowIndexStatsDescriptor AllIndices() => Index(Indices.All); // Request parameters } - ///Descriptor for ForgetFollowerIndex http://www.elastic.co/guide/en/elasticsearch/reference/current + ///Descriptor for ForgetFollowerIndex http://www.elastic.co/guide/en/elasticsearch/reference/current public partial class ForgetFollowerIndexDescriptor : RequestDescriptorBase, IForgetFollowerIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CrossClusterReplicationForgetFollowerIndex; @@ -153,15 +153,15 @@ protected ForgetFollowerIndexDescriptor(): base() // values part of the url path IndexName IForgetFollowerIndexRequest.Index => Self.RouteValues.Get("index"); - ///the name of the leader index for which specified follower retention leases should be removed + ///the name of the leader index for which specified follower retention leases should be removed public ForgetFollowerIndexDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public ForgetFollowerIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters } - ///Descriptor for GetAutoFollowPattern https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html + ///Descriptor for GetAutoFollowPattern https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html public partial class GetAutoFollowPatternDescriptor : RequestDescriptorBase, IGetAutoFollowPatternRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CrossClusterReplicationGetAutoFollowPattern; @@ -178,12 +178,12 @@ public GetAutoFollowPatternDescriptor(Name name): base(r => r.Optional("name", n // values part of the url path Name IGetAutoFollowPatternRequest.Name => Self.RouteValues.Get("name"); - ///The name of the auto follow pattern. + ///The name of the auto follow pattern. public GetAutoFollowPatternDescriptor Name(Name name) => Assign(name, (a, v) => a.RouteValues.Optional("name", v)); // Request parameters } - ///Descriptor for PauseFollowIndex https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html + ///Descriptor for PauseFollowIndex https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html public partial class PauseFollowIndexDescriptor : RequestDescriptorBase, IPauseFollowIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CrossClusterReplicationPauseFollowIndex; @@ -201,15 +201,15 @@ protected PauseFollowIndexDescriptor(): base() // values part of the url path IndexName IPauseFollowIndexRequest.Index => Self.RouteValues.Get("index"); - ///The name of the follower index that should pause following its leader index. + ///The name of the follower index that should pause following its leader index. public PauseFollowIndexDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public PauseFollowIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters } - ///Descriptor for CreateAutoFollowPattern https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html + ///Descriptor for CreateAutoFollowPattern https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html public partial class CreateAutoFollowPatternDescriptor : RequestDescriptorBase, ICreateAutoFollowPatternRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CrossClusterReplicationCreateAutoFollowPattern; @@ -230,7 +230,7 @@ protected CreateAutoFollowPatternDescriptor(): base() // Request parameters } - ///Descriptor for ResumeFollowIndex https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html + ///Descriptor for ResumeFollowIndex https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html public partial class ResumeFollowIndexDescriptor : RequestDescriptorBase, IResumeFollowIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CrossClusterReplicationResumeFollowIndex; @@ -248,15 +248,15 @@ protected ResumeFollowIndexDescriptor(): base() // values part of the url path IndexName IResumeFollowIndexRequest.Index => Self.RouteValues.Get("index"); - ///The name of the follow index to resume following. + ///The name of the follow index to resume following. public ResumeFollowIndexDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public ResumeFollowIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters } - ///Descriptor for Stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html + ///Descriptor for Stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html public partial class CcrStatsDescriptor : RequestDescriptorBase, ICcrStatsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CrossClusterReplicationStats; @@ -264,7 +264,7 @@ public partial class CcrStatsDescriptor : RequestDescriptorBaseDescriptor for UnfollowIndex http://www.elastic.co/guide/en/elasticsearch/reference/current + ///Descriptor for UnfollowIndex http://www.elastic.co/guide/en/elasticsearch/reference/current public partial class UnfollowIndexDescriptor : RequestDescriptorBase, IUnfollowIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.CrossClusterReplicationUnfollowIndex; @@ -282,9 +282,9 @@ protected UnfollowIndexDescriptor(): base() // values part of the url path IndexName IUnfollowIndexRequest.Index => Self.RouteValues.Get("index"); - ///The name of the follower index that should be turned into a regular index. + ///The name of the follower index that should be turned into a regular index. public UnfollowIndexDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public UnfollowIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters diff --git a/src/Nest/Descriptors.Graph.cs b/src/Nest/Descriptors.Graph.cs index 4540f4cc7ec..ffe33c5efbc 100644 --- a/src/Nest/Descriptors.Graph.cs +++ b/src/Nest/Descriptors.Graph.cs @@ -30,7 +30,7 @@ // ReSharper disable RedundantNameQualifier namespace Nest { - ///Descriptor for Explore https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html + ///Descriptor for Explore https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html public partial class GraphExploreDescriptor : RequestDescriptorBase, GraphExploreRequestParameters, IGraphExploreRequest>, IGraphExploreRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.GraphExplore; @@ -47,23 +47,23 @@ public GraphExploreDescriptor(): this(typeof(TDocument)) // values part of the url path Indices IGraphExploreRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices + ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices public GraphExploreDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public GraphExploreDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public GraphExploreDescriptor AllIndices() => Index(Indices.All); // Request parameters - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public GraphExploreDescriptor Routing(Routing routing) => Qs("routing", routing); - ///Explicit operation timeout + ///Explicit operation timeout public GraphExploreDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } } \ No newline at end of file diff --git a/src/Nest/Descriptors.IndexLifecycleManagement.cs b/src/Nest/Descriptors.IndexLifecycleManagement.cs index ba8ec80899f..b314c381059 100644 --- a/src/Nest/Descriptors.IndexLifecycleManagement.cs +++ b/src/Nest/Descriptors.IndexLifecycleManagement.cs @@ -30,7 +30,7 @@ // ReSharper disable RedundantNameQualifier namespace Nest { - ///Descriptor for DeleteLifecycle https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html + ///Descriptor for DeleteLifecycle https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html public partial class DeleteLifecycleDescriptor : RequestDescriptorBase, IDeleteLifecycleRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexLifecycleManagementDeleteLifecycle; @@ -51,7 +51,7 @@ protected DeleteLifecycleDescriptor(): base() // Request parameters } - ///Descriptor for ExplainLifecycle https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html + ///Descriptor for ExplainLifecycle https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html public partial class ExplainLifecycleDescriptor : RequestDescriptorBase, IExplainLifecycleRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexLifecycleManagementExplainLifecycle; @@ -69,19 +69,19 @@ protected ExplainLifecycleDescriptor(): base() // values part of the url path IndexName IExplainLifecycleRequest.Index => Self.RouteValues.Get("index"); - ///The name of the index to explain + ///The name of the index to explain public ExplainLifecycleDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public ExplainLifecycleDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters - ///filters the indices included in the response to ones in an ILM error state, implies only_managed + ///filters the indices included in the response to ones in an ILM error state, implies only_managed public ExplainLifecycleDescriptor OnlyErrors(bool? onlyerrors = true) => Qs("only_errors", onlyerrors); - ///filters the indices included in the response to ones managed by ILM + ///filters the indices included in the response to ones managed by ILM public ExplainLifecycleDescriptor OnlyManaged(bool? onlymanaged = true) => Qs("only_managed", onlymanaged); } - ///Descriptor for GetLifecycle https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html + ///Descriptor for GetLifecycle https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html public partial class GetLifecycleDescriptor : RequestDescriptorBase, IGetLifecycleRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexLifecycleManagementGetLifecycle; @@ -98,12 +98,12 @@ public GetLifecycleDescriptor(): base() // values part of the url path Id IGetLifecycleRequest.PolicyId => Self.RouteValues.Get("policy_id"); - ///The name of the index lifecycle policy + ///The name of the index lifecycle policy public GetLifecycleDescriptor PolicyId(Id policyId) => Assign(policyId, (a, v) => a.RouteValues.Optional("policy_id", v)); // Request parameters } - ///Descriptor for GetStatus https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html + ///Descriptor for GetStatus https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html public partial class GetIlmStatusDescriptor : RequestDescriptorBase, IGetIlmStatusRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexLifecycleManagementGetStatus; @@ -111,7 +111,7 @@ public partial class GetIlmStatusDescriptor : RequestDescriptorBaseDescriptor for MoveToStep https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html + ///Descriptor for MoveToStep https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html public partial class MoveToStepDescriptor : RequestDescriptorBase, IMoveToStepRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexLifecycleManagementMoveToStep; @@ -129,15 +129,15 @@ protected MoveToStepDescriptor(): base() // values part of the url path IndexName IMoveToStepRequest.Index => Self.RouteValues.Get("index"); - ///The name of the index whose lifecycle step is to change + ///The name of the index whose lifecycle step is to change public MoveToStepDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public MoveToStepDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters } - ///Descriptor for PutLifecycle https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html + ///Descriptor for PutLifecycle https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html public partial class PutLifecycleDescriptor : RequestDescriptorBase, IPutLifecycleRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexLifecycleManagementPutLifecycle; @@ -158,7 +158,7 @@ protected PutLifecycleDescriptor(): base() // Request parameters } - ///Descriptor for RemovePolicy https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html + ///Descriptor for RemovePolicy https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html public partial class RemovePolicyDescriptor : RequestDescriptorBase, IRemovePolicyRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexLifecycleManagementRemovePolicy; @@ -176,15 +176,15 @@ protected RemovePolicyDescriptor(): base() // values part of the url path IndexName IRemovePolicyRequest.Index => Self.RouteValues.Get("index"); - ///The name of the index to remove policy on + ///The name of the index to remove policy on public RemovePolicyDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public RemovePolicyDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters } - ///Descriptor for Retry https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html + ///Descriptor for Retry https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html public partial class RetryIlmDescriptor : RequestDescriptorBase, IRetryIlmRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexLifecycleManagementRetry; @@ -202,15 +202,15 @@ protected RetryIlmDescriptor(): base() // values part of the url path IndexName IRetryIlmRequest.Index => Self.RouteValues.Get("index"); - ///The name of the indices (comma-separated) whose failed lifecycle step is to be retry + ///The name of the indices (comma-separated) whose failed lifecycle step is to be retry public RetryIlmDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public RetryIlmDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters } - ///Descriptor for Start https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html + ///Descriptor for Start https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html public partial class StartIlmDescriptor : RequestDescriptorBase, IStartIlmRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexLifecycleManagementStart; @@ -218,7 +218,7 @@ public partial class StartIlmDescriptor : RequestDescriptorBaseDescriptor for Stop https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html + ///Descriptor for Stop https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html public partial class StopIlmDescriptor : RequestDescriptorBase, IStopIlmRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndexLifecycleManagementStop; diff --git a/src/Nest/Descriptors.Indices.cs b/src/Nest/Descriptors.Indices.cs index 63ad36bb009..cbe73f9fbe0 100644 --- a/src/Nest/Descriptors.Indices.cs +++ b/src/Nest/Descriptors.Indices.cs @@ -30,7 +30,7 @@ // ReSharper disable RedundantNameQualifier namespace Nest { - ///Descriptor for Analyze https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html + ///Descriptor for Analyze https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html public partial class AnalyzeDescriptor : RequestDescriptorBase, IAnalyzeRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesAnalyze; @@ -47,15 +47,15 @@ public AnalyzeDescriptor(IndexName index): base(r => r.Optional("index", index)) // values part of the url path IndexName IAnalyzeRequest.Index => Self.RouteValues.Get("index"); - ///The name of the index to scope the operation + ///The name of the index to scope the operation public AnalyzeDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public AnalyzeDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (IndexName)v)); // Request parameters } - ///Descriptor for ClearCache https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html + ///Descriptor for ClearCache https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html public partial class ClearCacheDescriptor : RequestDescriptorBase, IClearCacheRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesClearCache; @@ -72,34 +72,34 @@ public ClearCacheDescriptor(Indices index): base(r => r.Optional("index", index) // values part of the url path Indices IClearCacheRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index name to limit the operation + ///A comma-separated list of index name to limit the operation public ClearCacheDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public ClearCacheDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public ClearCacheDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public ClearCacheDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public ClearCacheDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Clear field data + ///Clear field data public ClearCacheDescriptor Fielddata(bool? fielddata = true) => Qs("fielddata", fielddata); - ///A comma-separated list of fields to clear when using the `fielddata` parameter (default: all) + ///A comma-separated list of fields to clear when using the `fielddata` parameter (default: all) public ClearCacheDescriptor Fields(Fields fields) => Qs("fields", fields); - ///A comma-separated list of fields to clear when using the `fielddata` parameter (default: all) + ///A comma-separated list of fields to clear when using the `fielddata` parameter (default: all) public ClearCacheDescriptor Fields(params Expression>[] fields) where T : class => Qs("fields", fields?.Select(e => (Field)e)); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public ClearCacheDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Clear query caches + ///Clear query caches public ClearCacheDescriptor Query(bool? query = true) => Qs("query", query); - ///Clear request cache + ///Clear request cache public ClearCacheDescriptor Request(bool? request = true) => Qs("request", request); } - ///Descriptor for Close https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html + ///Descriptor for Close https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html public partial class CloseIndexDescriptor : RequestDescriptorBase, ICloseIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesClose; @@ -117,29 +117,29 @@ protected CloseIndexDescriptor(): base() // values part of the url path Indices ICloseIndexRequest.Index => Self.RouteValues.Get("index"); - ///A comma separated list of indices to close + ///A comma separated list of indices to close public CloseIndexDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public CloseIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public CloseIndexDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public CloseIndexDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public CloseIndexDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public CloseIndexDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Specify timeout for connection to master + ///Specify timeout for connection to master public CloseIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public CloseIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Sets the number of active shards to wait for before the operation returns. + ///Sets the number of active shards to wait for before the operation returns. public CloseIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } - ///Descriptor for Create https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html + ///Descriptor for Create https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html public partial class CreateIndexDescriptor : RequestDescriptorBase, ICreateIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesCreate; @@ -157,23 +157,23 @@ protected CreateIndexDescriptor(): base() // values part of the url path IndexName ICreateIndexRequest.Index => Self.RouteValues.Get("index"); - ///The name of the index + ///The name of the index public CreateIndexDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public CreateIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters - ///Whether a type should be expected in the body of the mappings. + ///Whether a type should be expected in the body of the mappings. public CreateIndexDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename); - ///Specify timeout for connection to master + ///Specify timeout for connection to master public CreateIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public CreateIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Set the number of active shards to wait for before the operation returns. + ///Set the number of active shards to wait for before the operation returns. public CreateIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } - ///Descriptor for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html + ///Descriptor for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html public partial class DeleteIndexDescriptor : RequestDescriptorBase, IDeleteIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesDelete; @@ -191,27 +191,27 @@ protected DeleteIndexDescriptor(): base() // values part of the url path Indices IDeleteIndexRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices + ///A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices public DeleteIndexDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public DeleteIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public DeleteIndexDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Ignore if a wildcard expression resolves to no concrete indices (default: false) + ///Ignore if a wildcard expression resolves to no concrete indices (default: false) public DeleteIndexDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether wildcard expressions should get expanded to open or closed indices (default: open) + ///Whether wildcard expressions should get expanded to open or closed indices (default: open) public DeleteIndexDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Ignore unavailable indexes (default: false) + ///Ignore unavailable indexes (default: false) public DeleteIndexDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Specify timeout for connection to master + ///Specify timeout for connection to master public DeleteIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public DeleteIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for DeleteAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + ///Descriptor for DeleteAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html public partial class DeleteAliasDescriptor : RequestDescriptorBase, IDeleteAliasRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesDeleteAlias; @@ -231,21 +231,21 @@ protected DeleteAliasDescriptor(): base() // values part of the url path Indices IDeleteAliasRequest.Index => Self.RouteValues.Get("index"); Names IDeleteAliasRequest.Name => Self.RouteValues.Get("name"); - ///A comma-separated list of index names (supports wildcards); use `_all` for all indices + ///A comma-separated list of index names (supports wildcards); use `_all` for all indices public DeleteAliasDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public DeleteAliasDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public DeleteAliasDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Specify timeout for connection to master + ///Specify timeout for connection to master public DeleteAliasDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit timestamp for the document + ///Explicit timestamp for the document public DeleteAliasDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for DeleteTemplate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html + ///Descriptor for DeleteTemplate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html public partial class DeleteIndexTemplateDescriptor : RequestDescriptorBase, IDeleteIndexTemplateRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesDeleteTemplate; @@ -264,13 +264,13 @@ protected DeleteIndexTemplateDescriptor(): base() // values part of the url path Name IDeleteIndexTemplateRequest.Name => Self.RouteValues.Get("name"); // Request parameters - ///Specify timeout for connection to master + ///Specify timeout for connection to master public DeleteIndexTemplateDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public DeleteIndexTemplateDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for Exists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html + ///Descriptor for Exists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html public partial class IndexExistsDescriptor : RequestDescriptorBase, IIndexExistsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesExists; @@ -288,29 +288,29 @@ protected IndexExistsDescriptor(): base() // values part of the url path Indices IIndexExistsRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names + ///A comma-separated list of index names public IndexExistsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public IndexExistsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public IndexExistsDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Ignore if a wildcard expression resolves to no concrete indices (default: false) + ///Ignore if a wildcard expression resolves to no concrete indices (default: false) public IndexExistsDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether wildcard expressions should get expanded to open or closed indices (default: open) + ///Whether wildcard expressions should get expanded to open or closed indices (default: open) public IndexExistsDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Return settings in flat format (default: false) + ///Return settings in flat format (default: false) public IndexExistsDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings); - ///Ignore unavailable indexes (default: false) + ///Ignore unavailable indexes (default: false) public IndexExistsDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Whether to return all default setting for each of the indices. + ///Whether to return all default setting for each of the indices. public IndexExistsDescriptor IncludeDefaults(bool? includedefaults = true) => Qs("include_defaults", includedefaults); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public IndexExistsDescriptor Local(bool? local = true) => Qs("local", local); } - ///Descriptor for AliasExists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + ///Descriptor for AliasExists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html public partial class AliasExistsDescriptor : RequestDescriptorBase, IAliasExistsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesAliasExists; @@ -336,25 +336,25 @@ protected AliasExistsDescriptor(): base() // values part of the url path Names IAliasExistsRequest.Name => Self.RouteValues.Get("name"); Indices IAliasExistsRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names to filter aliases + ///A comma-separated list of index names to filter aliases public AliasExistsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public AliasExistsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public AliasExistsDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public AliasExistsDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public AliasExistsDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public AliasExistsDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public AliasExistsDescriptor Local(bool? local = true) => Qs("local", local); } - ///Descriptor for TemplateExists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html + ///Descriptor for TemplateExists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html public partial class IndexTemplateExistsDescriptor : RequestDescriptorBase, IIndexTemplateExistsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesTemplateExists; @@ -373,15 +373,15 @@ protected IndexTemplateExistsDescriptor(): base() // values part of the url path Names IIndexTemplateExistsRequest.Name => Self.RouteValues.Get("name"); // Request parameters - ///Return settings in flat format (default: false) + ///Return settings in flat format (default: false) public IndexTemplateExistsDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public IndexTemplateExistsDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public IndexTemplateExistsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); } - ///Descriptor for TypeExists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html + ///Descriptor for TypeExists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html public partial class TypeExistsDescriptor : RequestDescriptorBase, ITypeExistsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesTypeExists; @@ -401,25 +401,25 @@ protected TypeExistsDescriptor(): base() // values part of the url path Indices ITypeExistsRequest.Index => Self.RouteValues.Get("index"); Names ITypeExistsRequest.Type => Self.RouteValues.Get("type"); - ///A comma-separated list of index names; use `_all` to check the types across all indices + ///A comma-separated list of index names; use `_all` to check the types across all indices public TypeExistsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public TypeExistsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public TypeExistsDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public TypeExistsDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public TypeExistsDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public TypeExistsDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public TypeExistsDescriptor Local(bool? local = true) => Qs("local", local); } - ///Descriptor for Flush https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html + ///Descriptor for Flush https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html public partial class FlushDescriptor : RequestDescriptorBase, IFlushRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesFlush; @@ -436,27 +436,27 @@ public FlushDescriptor(Indices index): base(r => r.Optional("index", index)) // values part of the url path Indices IFlushRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names; use the special string `_all` or Indices.All for all indices + ///A comma-separated list of index names; use the special string `_all` or Indices.All for all indices public FlushDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public FlushDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public FlushDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public FlushDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public FlushDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal) + ///Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal) public FlushDescriptor Force(bool? force = true) => Qs("force", force); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public FlushDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running. + ///If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running. public FlushDescriptor WaitIfOngoing(bool? waitifongoing = true) => Qs("wait_if_ongoing", waitifongoing); } - ///Descriptor for SyncedFlush https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush-api.html + ///Descriptor for SyncedFlush https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush-api.html public partial class SyncedFlushDescriptor : RequestDescriptorBase, ISyncedFlushRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesSyncedFlush; @@ -473,23 +473,23 @@ public SyncedFlushDescriptor(Indices index): base(r => r.Optional("index", index // values part of the url path Indices ISyncedFlushRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names; use the special string `_all` or Indices.All for all indices + ///A comma-separated list of index names; use the special string `_all` or Indices.All for all indices public SyncedFlushDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public SyncedFlushDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public SyncedFlushDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public SyncedFlushDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public SyncedFlushDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public SyncedFlushDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); } - ///Descriptor for ForceMerge https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html + ///Descriptor for ForceMerge https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html public partial class ForceMergeDescriptor : RequestDescriptorBase, IForceMergeRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesForceMerge; @@ -506,29 +506,29 @@ public ForceMergeDescriptor(Indices index): base(r => r.Optional("index", index) // values part of the url path Indices IForceMergeRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices + ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices public ForceMergeDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public ForceMergeDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public ForceMergeDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public ForceMergeDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public ForceMergeDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Specify whether the index should be flushed after performing the operation (default: true) + ///Specify whether the index should be flushed after performing the operation (default: true) public ForceMergeDescriptor Flush(bool? flush = true) => Qs("flush", flush); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public ForceMergeDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///The number of segments the index should be merged into (default: dynamic) + ///The number of segments the index should be merged into (default: dynamic) public ForceMergeDescriptor MaxNumSegments(long? maxnumsegments) => Qs("max_num_segments", maxnumsegments); - ///Specify whether the operation should only expunge deleted documents + ///Specify whether the operation should only expunge deleted documents public ForceMergeDescriptor OnlyExpungeDeletes(bool? onlyexpungedeletes = true) => Qs("only_expunge_deletes", onlyexpungedeletes); } - ///Descriptor for Freeze https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html + ///Descriptor for Freeze https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html public partial class FreezeIndexDescriptor : RequestDescriptorBase, IFreezeIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesFreeze; @@ -546,27 +546,27 @@ protected FreezeIndexDescriptor(): base() // values part of the url path IndexName IFreezeIndexRequest.Index => Self.RouteValues.Get("index"); - ///The name of the index to freeze + ///The name of the index to freeze public FreezeIndexDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public FreezeIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public FreezeIndexDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public FreezeIndexDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public FreezeIndexDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Specify timeout for connection to master + ///Specify timeout for connection to master public FreezeIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public FreezeIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Sets the number of active shards to wait for before the operation returns. + ///Sets the number of active shards to wait for before the operation returns. public FreezeIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } - ///Descriptor for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html + ///Descriptor for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html public partial class GetIndexDescriptor : RequestDescriptorBase, IGetIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesGet; @@ -584,33 +584,33 @@ protected GetIndexDescriptor(): base() // values part of the url path Indices IGetIndexRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names + ///A comma-separated list of index names public GetIndexDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public GetIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public GetIndexDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Ignore if a wildcard expression resolves to no concrete indices (default: false) + ///Ignore if a wildcard expression resolves to no concrete indices (default: false) public GetIndexDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether wildcard expressions should get expanded to open or closed indices (default: open) + ///Whether wildcard expressions should get expanded to open or closed indices (default: open) public GetIndexDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Return settings in flat format (default: false) + ///Return settings in flat format (default: false) public GetIndexDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings); - ///Ignore unavailable indexes (default: false) + ///Ignore unavailable indexes (default: false) public GetIndexDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Whether to return all default setting for each of the indices. + ///Whether to return all default setting for each of the indices. public GetIndexDescriptor IncludeDefaults(bool? includedefaults = true) => Qs("include_defaults", includedefaults); - ///Whether to add the type name to the response (default: false) + ///Whether to add the type name to the response (default: false) public GetIndexDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public GetIndexDescriptor Local(bool? local = true) => Qs("local", local); - ///Specify timeout for connection to master + ///Specify timeout for connection to master public GetIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); } - ///Descriptor for GetAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + ///Descriptor for GetAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html public partial class GetAliasDescriptor : RequestDescriptorBase, IGetAliasRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesGetAlias; @@ -641,27 +641,27 @@ public GetAliasDescriptor(Indices index): base(r => r.Optional("index", index)) // values part of the url path Names IGetAliasRequest.Name => Self.RouteValues.Get("name"); Indices IGetAliasRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of alias names to return + ///A comma-separated list of alias names to return public GetAliasDescriptor Name(Names name) => Assign(name, (a, v) => a.RouteValues.Optional("name", v)); - ///A comma-separated list of index names to filter aliases + ///A comma-separated list of index names to filter aliases public GetAliasDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public GetAliasDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public GetAliasDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public GetAliasDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public GetAliasDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public GetAliasDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public GetAliasDescriptor Local(bool? local = true) => Qs("local", local); } - ///Descriptor for GetFieldMapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html + ///Descriptor for GetFieldMapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html public partial class GetFieldMappingDescriptor : RequestDescriptorBase, GetFieldMappingRequestParameters, IGetFieldMappingRequest>, IGetFieldMappingRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesGetFieldMapping; @@ -687,29 +687,29 @@ protected GetFieldMappingDescriptor(): base() // values part of the url path Fields IGetFieldMappingRequest.Fields => Self.RouteValues.Get("fields"); Indices IGetFieldMappingRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names + ///A comma-separated list of index names public GetFieldMappingDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public GetFieldMappingDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public GetFieldMappingDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public GetFieldMappingDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public GetFieldMappingDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public GetFieldMappingDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Whether the default mapping values should be returned as well + ///Whether the default mapping values should be returned as well public GetFieldMappingDescriptor IncludeDefaults(bool? includedefaults = true) => Qs("include_defaults", includedefaults); - ///Whether a type should be returned in the body of the mappings. + ///Whether a type should be returned in the body of the mappings. public GetFieldMappingDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public GetFieldMappingDescriptor Local(bool? local = true) => Qs("local", local); } - ///Descriptor for GetMapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html + ///Descriptor for GetMapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html public partial class GetMappingDescriptor : RequestDescriptorBase, GetMappingRequestParameters, IGetMappingRequest>, IGetMappingRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesGetMapping; @@ -726,29 +726,29 @@ public GetMappingDescriptor(Indices index): base(r => r.Optional("index", index) // values part of the url path Indices IGetMappingRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names + ///A comma-separated list of index names public GetMappingDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public GetMappingDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public GetMappingDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public GetMappingDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public GetMappingDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public GetMappingDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Whether to add the type name to the response (default: false) + ///Whether to add the type name to the response (default: false) public GetMappingDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public GetMappingDescriptor Local(bool? local = true) => Qs("local", local); - ///Specify timeout for connection to master + ///Specify timeout for connection to master public GetMappingDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); } - ///Descriptor for GetSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html + ///Descriptor for GetSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html public partial class GetIndexSettingsDescriptor : RequestDescriptorBase, IGetIndexSettingsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesGetSettings; @@ -779,33 +779,33 @@ public GetIndexSettingsDescriptor(Names name): base(r => r.Optional("name", name // values part of the url path Indices IGetIndexSettingsRequest.Index => Self.RouteValues.Get("index"); Names IGetIndexSettingsRequest.Name => Self.RouteValues.Get("name"); - ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices + ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices public GetIndexSettingsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public GetIndexSettingsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public GetIndexSettingsDescriptor AllIndices() => Index(Indices.All); - ///The name of the settings that should be included + ///The name of the settings that should be included public GetIndexSettingsDescriptor Name(Names name) => Assign(name, (a, v) => a.RouteValues.Optional("name", v)); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public GetIndexSettingsDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public GetIndexSettingsDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Return settings in flat format (default: false) + ///Return settings in flat format (default: false) public GetIndexSettingsDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public GetIndexSettingsDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Whether to return all default setting for each of the indices. + ///Whether to return all default setting for each of the indices. public GetIndexSettingsDescriptor IncludeDefaults(bool? includedefaults = true) => Qs("include_defaults", includedefaults); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public GetIndexSettingsDescriptor Local(bool? local = true) => Qs("local", local); - ///Specify timeout for connection to master + ///Specify timeout for connection to master public GetIndexSettingsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); } - ///Descriptor for GetTemplate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html + ///Descriptor for GetTemplate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html public partial class GetIndexTemplateDescriptor : RequestDescriptorBase, IGetIndexTemplateRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesGetTemplate; @@ -822,20 +822,20 @@ public GetIndexTemplateDescriptor(Names name): base(r => r.Optional("name", name // values part of the url path Names IGetIndexTemplateRequest.Name => Self.RouteValues.Get("name"); - ///The comma separated names of the index templates + ///The comma separated names of the index templates public GetIndexTemplateDescriptor Name(Names name) => Assign(name, (a, v) => a.RouteValues.Optional("name", v)); // Request parameters - ///Return settings in flat format (default: false) + ///Return settings in flat format (default: false) public GetIndexTemplateDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings); - ///Whether a type should be returned in the body of the mappings. + ///Whether a type should be returned in the body of the mappings. public GetIndexTemplateDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public GetIndexTemplateDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public GetIndexTemplateDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); } - ///Descriptor for Open https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html + ///Descriptor for Open https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html public partial class OpenIndexDescriptor : RequestDescriptorBase, IOpenIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesOpen; @@ -853,29 +853,29 @@ protected OpenIndexDescriptor(): base() // values part of the url path Indices IOpenIndexRequest.Index => Self.RouteValues.Get("index"); - ///A comma separated list of indices to open + ///A comma separated list of indices to open public OpenIndexDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public OpenIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public OpenIndexDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public OpenIndexDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public OpenIndexDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public OpenIndexDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Specify timeout for connection to master + ///Specify timeout for connection to master public OpenIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public OpenIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Sets the number of active shards to wait for before the operation returns. + ///Sets the number of active shards to wait for before the operation returns. public OpenIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } - ///Descriptor for PutAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + ///Descriptor for PutAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html public partial class PutAliasDescriptor : RequestDescriptorBase, IPutAliasRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesPutAlias; @@ -895,21 +895,21 @@ protected PutAliasDescriptor(): base() // values part of the url path Indices IPutAliasRequest.Index => Self.RouteValues.Get("index"); Name IPutAliasRequest.Name => Self.RouteValues.Get("name"); - ///A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices. + ///A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices. public PutAliasDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public PutAliasDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public PutAliasDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Specify timeout for connection to master + ///Specify timeout for connection to master public PutAliasDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit timestamp for the document + ///Explicit timestamp for the document public PutAliasDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for PutMapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html + ///Descriptor for PutMapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html public partial class PutMappingDescriptor : RequestDescriptorBase, PutMappingRequestParameters, IPutMappingRequest>, IPutMappingRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesPutMapping; @@ -926,29 +926,29 @@ public PutMappingDescriptor(): this(typeof(TDocument)) // values part of the url path Indices IPutMappingRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. + ///A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. public PutMappingDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public PutMappingDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public PutMappingDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public PutMappingDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public PutMappingDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public PutMappingDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Whether a type should be expected in the body of the mappings. + ///Whether a type should be expected in the body of the mappings. public PutMappingDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename); - ///Specify timeout for connection to master + ///Specify timeout for connection to master public PutMappingDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public PutMappingDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for UpdateSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html + ///Descriptor for UpdateSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html public partial class UpdateIndexSettingsDescriptor : RequestDescriptorBase, IUpdateIndexSettingsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesUpdateSettings; @@ -965,31 +965,31 @@ public UpdateIndexSettingsDescriptor(Indices index): base(r => r.Optional("index // values part of the url path Indices IUpdateIndexSettingsRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices + ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices public UpdateIndexSettingsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public UpdateIndexSettingsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public UpdateIndexSettingsDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public UpdateIndexSettingsDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public UpdateIndexSettingsDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Return settings in flat format (default: false) + ///Return settings in flat format (default: false) public UpdateIndexSettingsDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public UpdateIndexSettingsDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Specify timeout for connection to master + ///Specify timeout for connection to master public UpdateIndexSettingsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false` + ///Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false` public UpdateIndexSettingsDescriptor PreserveExisting(bool? preserveexisting = true) => Qs("preserve_existing", preserveexisting); - ///Explicit operation timeout + ///Explicit operation timeout public UpdateIndexSettingsDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for PutTemplate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html + ///Descriptor for PutTemplate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html public partial class PutIndexTemplateDescriptor : RequestDescriptorBase, IPutIndexTemplateRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesPutTemplate; @@ -1008,19 +1008,19 @@ protected PutIndexTemplateDescriptor(): base() // values part of the url path Name IPutIndexTemplateRequest.Name => Self.RouteValues.Get("name"); // Request parameters - ///Whether the index template should only be added if new or can also replace an existing one + ///Whether the index template should only be added if new or can also replace an existing one public PutIndexTemplateDescriptor Create(bool? create = true) => Qs("create", create); - ///Return settings in flat format (default: false) + ///Return settings in flat format (default: false) public PutIndexTemplateDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings); - ///Whether a type should be returned in the body of the mappings. + ///Whether a type should be returned in the body of the mappings. public PutIndexTemplateDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename); - ///Specify timeout for connection to master + ///Specify timeout for connection to master public PutIndexTemplateDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public PutIndexTemplateDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for RecoveryStatus https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html + ///Descriptor for RecoveryStatus https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html public partial class RecoveryStatusDescriptor : RequestDescriptorBase, IRecoveryStatusRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesRecoveryStatus; @@ -1037,21 +1037,21 @@ public RecoveryStatusDescriptor(Indices index): base(r => r.Optional("index", in // values part of the url path Indices IRecoveryStatusRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices + ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices public RecoveryStatusDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public RecoveryStatusDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public RecoveryStatusDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Display only those recoveries that are currently on-going + ///Display only those recoveries that are currently on-going public RecoveryStatusDescriptor ActiveOnly(bool? activeonly = true) => Qs("active_only", activeonly); - ///Whether to display detailed information about shard recovery + ///Whether to display detailed information about shard recovery public RecoveryStatusDescriptor Detailed(bool? detailed = true) => Qs("detailed", detailed); } - ///Descriptor for Refresh https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html + ///Descriptor for Refresh https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html public partial class RefreshDescriptor : RequestDescriptorBase, IRefreshRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesRefresh; @@ -1068,23 +1068,23 @@ public RefreshDescriptor(Indices index): base(r => r.Optional("index", index)) // values part of the url path Indices IRefreshRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices + ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices public RefreshDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public RefreshDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public RefreshDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public RefreshDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public RefreshDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public RefreshDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); } - ///Descriptor for Rollover https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html + ///Descriptor for Rollover https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html public partial class RolloverIndexDescriptor : RequestDescriptorBase, IRolloverIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesRollover; @@ -1110,22 +1110,22 @@ protected RolloverIndexDescriptor(): base() // values part of the url path Name IRolloverIndexRequest.Alias => Self.RouteValues.Get("alias"); IndexName IRolloverIndexRequest.NewIndex => Self.RouteValues.Get("new_index"); - ///The name of the rollover index + ///The name of the rollover index public RolloverIndexDescriptor NewIndex(IndexName newIndex) => Assign(newIndex, (a, v) => a.RouteValues.Optional("new_index", v)); // Request parameters - ///If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false + ///If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false public RolloverIndexDescriptor DryRun(bool? dryrun = true) => Qs("dry_run", dryrun); - ///Whether a type should be included in the body of the mappings. + ///Whether a type should be included in the body of the mappings. public RolloverIndexDescriptor IncludeTypeName(bool? includetypename = true) => Qs("include_type_name", includetypename); - ///Specify timeout for connection to master + ///Specify timeout for connection to master public RolloverIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public RolloverIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Set the number of active shards to wait for on the newly created rollover index before the operation returns. + ///Set the number of active shards to wait for on the newly created rollover index before the operation returns. public RolloverIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } - ///Descriptor for Segments https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html + ///Descriptor for Segments https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html public partial class SegmentsDescriptor : RequestDescriptorBase, ISegmentsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesSegments; @@ -1142,25 +1142,25 @@ public SegmentsDescriptor(Indices index): base(r => r.Optional("index", index)) // values part of the url path Indices ISegmentsRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices + ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices public SegmentsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public SegmentsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public SegmentsDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public SegmentsDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public SegmentsDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public SegmentsDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Includes detailed memory usage by Lucene. + ///Includes detailed memory usage by Lucene. public SegmentsDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose); } - ///Descriptor for ShardStores https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html + ///Descriptor for ShardStores https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html public partial class IndicesShardStoresDescriptor : RequestDescriptorBase, IIndicesShardStoresRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesShardStores; @@ -1177,25 +1177,25 @@ public IndicesShardStoresDescriptor(Indices index): base(r => r.Optional("index" // values part of the url path Indices IIndicesShardStoresRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices + ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices public IndicesShardStoresDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public IndicesShardStoresDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public IndicesShardStoresDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public IndicesShardStoresDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public IndicesShardStoresDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public IndicesShardStoresDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///A comma-separated list of statuses used to filter on shards to get store information for + ///A comma-separated list of statuses used to filter on shards to get store information for public IndicesShardStoresDescriptor Status(params string[] status) => Qs("status", status); } - ///Descriptor for Shrink https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html + ///Descriptor for Shrink https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html public partial class ShrinkIndexDescriptor : RequestDescriptorBase, IShrinkIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesShrink; @@ -1215,21 +1215,21 @@ protected ShrinkIndexDescriptor(): base() // values part of the url path IndexName IShrinkIndexRequest.Index => Self.RouteValues.Get("index"); IndexName IShrinkIndexRequest.Target => Self.RouteValues.Get("target"); - ///The name of the source index to shrink + ///The name of the source index to shrink public ShrinkIndexDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public ShrinkIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters - ///Specify timeout for connection to master + ///Specify timeout for connection to master public ShrinkIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public ShrinkIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Set the number of active shards to wait for on the shrunken index before the operation returns. + ///Set the number of active shards to wait for on the shrunken index before the operation returns. public ShrinkIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } - ///Descriptor for Split https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html + ///Descriptor for Split https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html public partial class SplitIndexDescriptor : RequestDescriptorBase, ISplitIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesSplit; @@ -1249,21 +1249,21 @@ protected SplitIndexDescriptor(): base() // values part of the url path IndexName ISplitIndexRequest.Index => Self.RouteValues.Get("index"); IndexName ISplitIndexRequest.Target => Self.RouteValues.Get("target"); - ///The name of the source index to split + ///The name of the source index to split public SplitIndexDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public SplitIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters - ///Specify timeout for connection to master + ///Specify timeout for connection to master public SplitIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public SplitIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Set the number of active shards to wait for on the shrunken index before the operation returns. + ///Set the number of active shards to wait for on the shrunken index before the operation returns. public SplitIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } - ///Descriptor for Stats https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html + ///Descriptor for Stats https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html public partial class IndicesStatsDescriptor : RequestDescriptorBase, IIndicesStatsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesStats; @@ -1294,46 +1294,46 @@ public IndicesStatsDescriptor(Indices index, Metrics metric): base(r => r.Option // values part of the url path Metrics IIndicesStatsRequest.Metric => Self.RouteValues.Get("metric"); Indices IIndicesStatsRequest.Index => Self.RouteValues.Get("index"); - ///Limit the information returned the specific metrics. + ///Limit the information returned the specific metrics. public IndicesStatsDescriptor Metric(Metrics metric) => Assign(metric, (a, v) => a.RouteValues.Optional("metric", v)); - ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices + ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices public IndicesStatsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public IndicesStatsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public IndicesStatsDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) + ///A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) public IndicesStatsDescriptor CompletionFields(Fields completionfields) => Qs("completion_fields", completionfields); - ///A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) + ///A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) public IndicesStatsDescriptor CompletionFields(params Expression>[] fields) where T : class => Qs("completion_fields", fields?.Select(e => (Field)e)); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public IndicesStatsDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///A comma-separated list of fields for `fielddata` index metric (supports wildcards) + ///A comma-separated list of fields for `fielddata` index metric (supports wildcards) public IndicesStatsDescriptor FielddataFields(Fields fielddatafields) => Qs("fielddata_fields", fielddatafields); - ///A comma-separated list of fields for `fielddata` index metric (supports wildcards) + ///A comma-separated list of fields for `fielddata` index metric (supports wildcards) public IndicesStatsDescriptor FielddataFields(params Expression>[] fields) where T : class => Qs("fielddata_fields", fields?.Select(e => (Field)e)); - ///A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) + ///A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) public IndicesStatsDescriptor Fields(Fields fields) => Qs("fields", fields); - ///A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) + ///A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) public IndicesStatsDescriptor Fields(params Expression>[] fields) where T : class => Qs("fields", fields?.Select(e => (Field)e)); - ///If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices + ///If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices public IndicesStatsDescriptor ForbidClosedIndices(bool? forbidclosedindices = true) => Qs("forbid_closed_indices", forbidclosedindices); - ///A comma-separated list of search groups for `search` index metric + ///A comma-separated list of search groups for `search` index metric public IndicesStatsDescriptor Groups(params string[] groups) => Qs("groups", groups); - ///Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) + ///Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) public IndicesStatsDescriptor IncludeSegmentFileSizes(bool? includesegmentfilesizes = true) => Qs("include_segment_file_sizes", includesegmentfilesizes); - ///If set to true segment stats will include stats for segments that are not currently loaded into memory + ///If set to true segment stats will include stats for segments that are not currently loaded into memory public IndicesStatsDescriptor IncludeUnloadedSegments(bool? includeunloadedsegments = true) => Qs("include_unloaded_segments", includeunloadedsegments); - ///Return stats aggregated at cluster, index or shard level + ///Return stats aggregated at cluster, index or shard level public IndicesStatsDescriptor Level(Level? level) => Qs("level", level); } - ///Descriptor for Unfreeze https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html + ///Descriptor for Unfreeze https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html public partial class UnfreezeIndexDescriptor : RequestDescriptorBase, IUnfreezeIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesUnfreeze; @@ -1351,39 +1351,39 @@ protected UnfreezeIndexDescriptor(): base() // values part of the url path IndexName IUnfreezeIndexRequest.Index => Self.RouteValues.Get("index"); - ///The name of the index to unfreeze + ///The name of the index to unfreeze public UnfreezeIndexDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public UnfreezeIndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public UnfreezeIndexDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public UnfreezeIndexDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public UnfreezeIndexDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Specify timeout for connection to master + ///Specify timeout for connection to master public UnfreezeIndexDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public UnfreezeIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Sets the number of active shards to wait for before the operation returns. + ///Sets the number of active shards to wait for before the operation returns. public UnfreezeIndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } - ///Descriptor for BulkAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + ///Descriptor for BulkAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html public partial class BulkAliasDescriptor : RequestDescriptorBase, IBulkAliasRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesBulkAlias; // values part of the url path // Request parameters - ///Specify timeout for connection to master + ///Specify timeout for connection to master public BulkAliasDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Request timeout + ///Request timeout public BulkAliasDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for ValidateQuery https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html + ///Descriptor for ValidateQuery https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html public partial class ValidateQueryDescriptor : RequestDescriptorBase, ValidateQueryRequestParameters, IValidateQueryRequest>, IValidateQueryRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IndicesValidateQuery; @@ -1400,37 +1400,37 @@ public ValidateQueryDescriptor(Indices index): base(r => r.Optional("index", ind // values part of the url path Indices IValidateQueryRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names to restrict the operation; use the special string `_all` or Indices.All to perform the operation on all indices + ///A comma-separated list of index names to restrict the operation; use the special string `_all` or Indices.All to perform the operation on all indices public ValidateQueryDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public ValidateQueryDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public ValidateQueryDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Execute validation on all shards instead of one random shard per index + ///Execute validation on all shards instead of one random shard per index public ValidateQueryDescriptor AllShards(bool? allshards = true) => Qs("all_shards", allshards); - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public ValidateQueryDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Specify whether wildcard and prefix queries should be analyzed (default: false) + ///Specify whether wildcard and prefix queries should be analyzed (default: false) public ValidateQueryDescriptor AnalyzeWildcard(bool? analyzewildcard = true) => Qs("analyze_wildcard", analyzewildcard); - ///The analyzer to use for the query string + ///The analyzer to use for the query string public ValidateQueryDescriptor Analyzer(string analyzer) => Qs("analyzer", analyzer); - ///The default operator for query string query (AND or OR) + ///The default operator for query string query (AND or OR) public ValidateQueryDescriptor DefaultOperator(DefaultOperator? defaultoperator) => Qs("default_operator", defaultoperator); - ///The field to use as default where no field prefix is given in the query string + ///The field to use as default where no field prefix is given in the query string public ValidateQueryDescriptor Df(string df) => Qs("df", df); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public ValidateQueryDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Return detailed information about the error + ///Return detailed information about the error public ValidateQueryDescriptor Explain(bool? explain = true) => Qs("explain", explain); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public ValidateQueryDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + ///Specify whether format-based query failures (such as providing text to a numeric field) should be ignored public ValidateQueryDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - ///Query in the Lucene query string syntax + ///Query in the Lucene query string syntax public ValidateQueryDescriptor QueryOnQueryString(string queryonquerystring) => Qs("q", queryonquerystring); - ///Provide a more detailed explanation showing the actual Lucene query that will be executed. + ///Provide a more detailed explanation showing the actual Lucene query that will be executed. public ValidateQueryDescriptor Rewrite(bool? rewrite = true) => Qs("rewrite", rewrite); } } \ No newline at end of file diff --git a/src/Nest/Descriptors.Ingest.cs b/src/Nest/Descriptors.Ingest.cs index 17b4d7eab9e..0fa86e4b9c9 100644 --- a/src/Nest/Descriptors.Ingest.cs +++ b/src/Nest/Descriptors.Ingest.cs @@ -30,7 +30,7 @@ // ReSharper disable RedundantNameQualifier namespace Nest { - ///Descriptor for DeletePipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html + ///Descriptor for DeletePipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html public partial class DeletePipelineDescriptor : RequestDescriptorBase, IDeletePipelineRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IngestDeletePipeline; @@ -49,13 +49,13 @@ protected DeletePipelineDescriptor(): base() // values part of the url path Id IDeletePipelineRequest.Id => Self.RouteValues.Get("id"); // Request parameters - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public DeletePipelineDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public DeletePipelineDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for GetPipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html + ///Descriptor for GetPipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html public partial class GetPipelineDescriptor : RequestDescriptorBase, IGetPipelineRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IngestGetPipeline; @@ -72,14 +72,14 @@ public GetPipelineDescriptor(Id id): base(r => r.Optional("id", id)) // values part of the url path Id IGetPipelineRequest.Id => Self.RouteValues.Get("id"); - ///Comma separated list of pipeline ids. Wildcards supported + ///Comma separated list of pipeline ids. Wildcards supported public GetPipelineDescriptor Id(Id id) => Assign(id, (a, v) => a.RouteValues.Optional("id", v)); // Request parameters - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public GetPipelineDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); } - ///Descriptor for GrokProcessorPatterns https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get + ///Descriptor for GrokProcessorPatterns https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get public partial class GrokProcessorPatternsDescriptor : RequestDescriptorBase, IGrokProcessorPatternsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IngestGrokProcessorPatterns; @@ -87,7 +87,7 @@ public partial class GrokProcessorPatternsDescriptor : RequestDescriptorBaseDescriptor for PutPipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html + ///Descriptor for PutPipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html public partial class PutPipelineDescriptor : RequestDescriptorBase, IPutPipelineRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IngestPutPipeline; @@ -106,13 +106,13 @@ protected PutPipelineDescriptor(): base() // values part of the url path Id IPutPipelineRequest.Id => Self.RouteValues.Get("id"); // Request parameters - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public PutPipelineDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public PutPipelineDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for SimulatePipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html + ///Descriptor for SimulatePipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html public partial class SimulatePipelineDescriptor : RequestDescriptorBase, ISimulatePipelineRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.IngestSimulatePipeline; @@ -129,10 +129,10 @@ public SimulatePipelineDescriptor(Id id): base(r => r.Optional("id", id)) // values part of the url path Id ISimulatePipelineRequest.Id => Self.RouteValues.Get("id"); - ///Pipeline ID + ///Pipeline ID public SimulatePipelineDescriptor Id(Id id) => Assign(id, (a, v) => a.RouteValues.Optional("id", v)); // Request parameters - ///Verbose mode. Display data output for each processor in executed pipeline + ///Verbose mode. Display data output for each processor in executed pipeline public SimulatePipelineDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose); } } \ No newline at end of file diff --git a/src/Nest/Descriptors.MachineLearning.cs b/src/Nest/Descriptors.MachineLearning.cs index 185b3139632..fb8d903b6d4 100644 --- a/src/Nest/Descriptors.MachineLearning.cs +++ b/src/Nest/Descriptors.MachineLearning.cs @@ -30,7 +30,7 @@ // ReSharper disable RedundantNameQualifier namespace Nest { - ///Descriptor for CloseJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html + ///Descriptor for CloseJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html public partial class CloseJobDescriptor : RequestDescriptorBase, ICloseJobRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningCloseJob; @@ -49,15 +49,15 @@ protected CloseJobDescriptor(): base() // values part of the url path Id ICloseJobRequest.JobId => Self.RouteValues.Get("job_id"); // Request parameters - ///Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) + ///Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) public CloseJobDescriptor AllowNoJobs(bool? allownojobs = true) => Qs("allow_no_jobs", allownojobs); - ///True if the job should be forcefully closed + ///True if the job should be forcefully closed public CloseJobDescriptor Force(bool? force = true) => Qs("force", force); - ///Controls the time to wait until a job has closed. Default to 30 minutes + ///Controls the time to wait until a job has closed. Default to 30 minutes public CloseJobDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for DeleteCalendar + ///Descriptor for DeleteCalendar public partial class DeleteCalendarDescriptor : RequestDescriptorBase, IDeleteCalendarRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningDeleteCalendar; @@ -78,7 +78,7 @@ protected DeleteCalendarDescriptor(): base() // Request parameters } - ///Descriptor for DeleteCalendarEvent + ///Descriptor for DeleteCalendarEvent public partial class DeleteCalendarEventDescriptor : RequestDescriptorBase, IDeleteCalendarEventRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningDeleteCalendarEvent; @@ -101,7 +101,7 @@ protected DeleteCalendarEventDescriptor(): base() // Request parameters } - ///Descriptor for DeleteCalendarJob + ///Descriptor for DeleteCalendarJob public partial class DeleteCalendarJobDescriptor : RequestDescriptorBase, IDeleteCalendarJobRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningDeleteCalendarJob; @@ -124,7 +124,7 @@ protected DeleteCalendarJobDescriptor(): base() // Request parameters } - ///Descriptor for DeleteDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html + ///Descriptor for DeleteDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html public partial class DeleteDatafeedDescriptor : RequestDescriptorBase, IDeleteDatafeedRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningDeleteDatafeed; @@ -143,11 +143,11 @@ protected DeleteDatafeedDescriptor(): base() // values part of the url path Id IDeleteDatafeedRequest.DatafeedId => Self.RouteValues.Get("datafeed_id"); // Request parameters - ///True if the datafeed should be forcefully deleted + ///True if the datafeed should be forcefully deleted public DeleteDatafeedDescriptor Force(bool? force = true) => Qs("force", force); } - ///Descriptor for DeleteExpiredData + ///Descriptor for DeleteExpiredData public partial class DeleteExpiredDataDescriptor : RequestDescriptorBase, IDeleteExpiredDataRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningDeleteExpiredData; @@ -155,7 +155,7 @@ public partial class DeleteExpiredDataDescriptor : RequestDescriptorBaseDescriptor for DeleteFilter + ///Descriptor for DeleteFilter public partial class DeleteFilterDescriptor : RequestDescriptorBase, IDeleteFilterRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningDeleteFilter; @@ -176,7 +176,7 @@ protected DeleteFilterDescriptor(): base() // Request parameters } - ///Descriptor for DeleteForecast http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html + ///Descriptor for DeleteForecast http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html public partial class DeleteForecastDescriptor : RequestDescriptorBase, IDeleteForecastRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningDeleteForecast; @@ -197,13 +197,13 @@ protected DeleteForecastDescriptor(): base() Id IDeleteForecastRequest.JobId => Self.RouteValues.Get("job_id"); Ids IDeleteForecastRequest.ForecastId => Self.RouteValues.Get("forecast_id"); // Request parameters - ///Whether to ignore if `_all` matches no forecasts + ///Whether to ignore if `_all` matches no forecasts public DeleteForecastDescriptor AllowNoForecasts(bool? allownoforecasts = true) => Qs("allow_no_forecasts", allownoforecasts); - ///Controls the time to wait until the forecast(s) are deleted. Default to 30 seconds + ///Controls the time to wait until the forecast(s) are deleted. Default to 30 seconds public DeleteForecastDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for DeleteJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html + ///Descriptor for DeleteJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html public partial class DeleteJobDescriptor : RequestDescriptorBase, IDeleteJobRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningDeleteJob; @@ -222,13 +222,13 @@ protected DeleteJobDescriptor(): base() // values part of the url path Id IDeleteJobRequest.JobId => Self.RouteValues.Get("job_id"); // Request parameters - ///True if the job should be forcefully deleted + ///True if the job should be forcefully deleted public DeleteJobDescriptor Force(bool? force = true) => Qs("force", force); - ///Should this request wait until the operation has completed before returning + ///Should this request wait until the operation has completed before returning public DeleteJobDescriptor WaitForCompletion(bool? waitforcompletion = true) => Qs("wait_for_completion", waitforcompletion); } - ///Descriptor for DeleteModelSnapshot http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html + ///Descriptor for DeleteModelSnapshot http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html public partial class DeleteModelSnapshotDescriptor : RequestDescriptorBase, IDeleteModelSnapshotRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningDeleteModelSnapshot; @@ -251,7 +251,7 @@ protected DeleteModelSnapshotDescriptor(): base() // Request parameters } - ///Descriptor for FlushJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html + ///Descriptor for FlushJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html public partial class FlushJobDescriptor : RequestDescriptorBase, IFlushJobRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningFlushJob; @@ -270,11 +270,11 @@ protected FlushJobDescriptor(): base() // values part of the url path Id IFlushJobRequest.JobId => Self.RouteValues.Get("job_id"); // Request parameters - ///Skips time to the given value without generating results or updating the model for the skipped interval + ///Skips time to the given value without generating results or updating the model for the skipped interval public FlushJobDescriptor SkipTime(string skiptime) => Qs("skip_time", skiptime); } - ///Descriptor for ForecastJob + ///Descriptor for ForecastJob public partial class ForecastJobDescriptor : RequestDescriptorBase, IForecastJobRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningForecastJob; @@ -295,7 +295,7 @@ protected ForecastJobDescriptor(): base() // Request parameters } - ///Descriptor for GetBuckets http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html + ///Descriptor for GetBuckets http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html public partial class GetBucketsDescriptor : RequestDescriptorBase, IGetBucketsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetBuckets; @@ -321,12 +321,12 @@ protected GetBucketsDescriptor(): base() // values part of the url path Id IGetBucketsRequest.JobId => Self.RouteValues.Get("job_id"); Timestamp IGetBucketsRequest.Timestamp => Self.RouteValues.Get("timestamp"); - ///The timestamp of the desired single bucket result + ///The timestamp of the desired single bucket result public GetBucketsDescriptor Timestamp(Timestamp timestamp) => Assign(timestamp, (a, v) => a.RouteValues.Optional("timestamp", v)); // Request parameters } - ///Descriptor for GetCalendarEvents + ///Descriptor for GetCalendarEvents public partial class GetCalendarEventsDescriptor : RequestDescriptorBase, IGetCalendarEventsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetCalendarEvents; @@ -345,15 +345,15 @@ protected GetCalendarEventsDescriptor(): base() // values part of the url path Id IGetCalendarEventsRequest.CalendarId => Self.RouteValues.Get("calendar_id"); // Request parameters - ///Get events before this time + ///Get events before this time public GetCalendarEventsDescriptor End(DateTimeOffset? end) => Qs("end", end); - ///Get events for the job. When this option is used calendar_id must be '_all' + ///Get events for the job. When this option is used calendar_id must be '_all' public GetCalendarEventsDescriptor JobId(string jobid) => Qs("job_id", jobid); - ///Get events after this time + ///Get events after this time public GetCalendarEventsDescriptor Start(string start) => Qs("start", start); } - ///Descriptor for GetCalendars + ///Descriptor for GetCalendars public partial class GetCalendarsDescriptor : RequestDescriptorBase, IGetCalendarsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetCalendars; @@ -370,12 +370,12 @@ public GetCalendarsDescriptor(Id calendarId): base(r => r.Optional("calendar_id" // values part of the url path Id IGetCalendarsRequest.CalendarId => Self.RouteValues.Get("calendar_id"); - ///The ID of the calendar to fetch + ///The ID of the calendar to fetch public GetCalendarsDescriptor CalendarId(Id calendarId) => Assign(calendarId, (a, v) => a.RouteValues.Optional("calendar_id", v)); // Request parameters } - ///Descriptor for GetCategories http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html + ///Descriptor for GetCategories http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html public partial class GetCategoriesDescriptor : RequestDescriptorBase, IGetCategoriesRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetCategories; @@ -401,12 +401,12 @@ protected GetCategoriesDescriptor(): base() // values part of the url path Id IGetCategoriesRequest.JobId => Self.RouteValues.Get("job_id"); LongId IGetCategoriesRequest.CategoryId => Self.RouteValues.Get("category_id"); - ///The identifier of the category definition of interest + ///The identifier of the category definition of interest public GetCategoriesDescriptor CategoryId(LongId categoryId) => Assign(categoryId, (a, v) => a.RouteValues.Optional("category_id", v)); // Request parameters } - ///Descriptor for GetDatafeedStats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html + ///Descriptor for GetDatafeedStats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html public partial class GetDatafeedStatsDescriptor : RequestDescriptorBase, IGetDatafeedStatsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetDatafeedStats; @@ -423,14 +423,14 @@ public GetDatafeedStatsDescriptor(): base() // values part of the url path Id IGetDatafeedStatsRequest.DatafeedId => Self.RouteValues.Get("datafeed_id"); - ///The ID of the datafeeds stats to fetch + ///The ID of the datafeeds stats to fetch public GetDatafeedStatsDescriptor DatafeedId(Id datafeedId) => Assign(datafeedId, (a, v) => a.RouteValues.Optional("datafeed_id", v)); // Request parameters - ///Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) + ///Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) public GetDatafeedStatsDescriptor AllowNoDatafeeds(bool? allownodatafeeds = true) => Qs("allow_no_datafeeds", allownodatafeeds); } - ///Descriptor for GetDatafeeds http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html + ///Descriptor for GetDatafeeds http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html public partial class GetDatafeedsDescriptor : RequestDescriptorBase, IGetDatafeedsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetDatafeeds; @@ -447,14 +447,14 @@ public GetDatafeedsDescriptor(): base() // values part of the url path Id IGetDatafeedsRequest.DatafeedId => Self.RouteValues.Get("datafeed_id"); - ///The ID of the datafeeds to fetch + ///The ID of the datafeeds to fetch public GetDatafeedsDescriptor DatafeedId(Id datafeedId) => Assign(datafeedId, (a, v) => a.RouteValues.Optional("datafeed_id", v)); // Request parameters - ///Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) + ///Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) public GetDatafeedsDescriptor AllowNoDatafeeds(bool? allownodatafeeds = true) => Qs("allow_no_datafeeds", allownodatafeeds); } - ///Descriptor for GetFilters + ///Descriptor for GetFilters public partial class GetFiltersDescriptor : RequestDescriptorBase, IGetFiltersRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetFilters; @@ -471,16 +471,16 @@ public GetFiltersDescriptor(Id filterId): base(r => r.Optional("filter_id", filt // values part of the url path Id IGetFiltersRequest.FilterId => Self.RouteValues.Get("filter_id"); - ///The ID of the filter to fetch + ///The ID of the filter to fetch public GetFiltersDescriptor FilterId(Id filterId) => Assign(filterId, (a, v) => a.RouteValues.Optional("filter_id", v)); // Request parameters - ///skips a number of filters + ///skips a number of filters public GetFiltersDescriptor From(int? from) => Qs("from", from); - ///specifies a max number of filters to get + ///specifies a max number of filters to get public GetFiltersDescriptor Size(int? size) => Qs("size", size); } - ///Descriptor for GetInfluencers http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html + ///Descriptor for GetInfluencers http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html public partial class GetInfluencersDescriptor : RequestDescriptorBase, IGetInfluencersRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetInfluencers; @@ -501,7 +501,7 @@ protected GetInfluencersDescriptor(): base() // Request parameters } - ///Descriptor for GetJobStats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html + ///Descriptor for GetJobStats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html public partial class GetJobStatsDescriptor : RequestDescriptorBase, IGetJobStatsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetJobStats; @@ -518,14 +518,14 @@ public GetJobStatsDescriptor(Id jobId): base(r => r.Optional("job_id", jobId)) // values part of the url path Id IGetJobStatsRequest.JobId => Self.RouteValues.Get("job_id"); - ///The ID of the jobs stats to fetch + ///The ID of the jobs stats to fetch public GetJobStatsDescriptor JobId(Id jobId) => Assign(jobId, (a, v) => a.RouteValues.Optional("job_id", v)); // Request parameters - ///Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) + ///Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) public GetJobStatsDescriptor AllowNoJobs(bool? allownojobs = true) => Qs("allow_no_jobs", allownojobs); } - ///Descriptor for GetJobs http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html + ///Descriptor for GetJobs http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html public partial class GetJobsDescriptor : RequestDescriptorBase, IGetJobsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetJobs; @@ -542,14 +542,14 @@ public GetJobsDescriptor(): base() // values part of the url path Id IGetJobsRequest.JobId => Self.RouteValues.Get("job_id"); - ///The ID of the jobs to fetch + ///The ID of the jobs to fetch public GetJobsDescriptor JobId(Id jobId) => Assign(jobId, (a, v) => a.RouteValues.Optional("job_id", v)); // Request parameters - ///Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) + ///Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) public GetJobsDescriptor AllowNoJobs(bool? allownojobs = true) => Qs("allow_no_jobs", allownojobs); } - ///Descriptor for GetModelSnapshots http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html + ///Descriptor for GetModelSnapshots http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html public partial class GetModelSnapshotsDescriptor : RequestDescriptorBase, IGetModelSnapshotsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetModelSnapshots; @@ -575,12 +575,12 @@ protected GetModelSnapshotsDescriptor(): base() // values part of the url path Id IGetModelSnapshotsRequest.JobId => Self.RouteValues.Get("job_id"); Id IGetModelSnapshotsRequest.SnapshotId => Self.RouteValues.Get("snapshot_id"); - ///The ID of the snapshot to fetch + ///The ID of the snapshot to fetch public GetModelSnapshotsDescriptor SnapshotId(Id snapshotId) => Assign(snapshotId, (a, v) => a.RouteValues.Optional("snapshot_id", v)); // Request parameters } - ///Descriptor for GetOverallBuckets http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html + ///Descriptor for GetOverallBuckets http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html public partial class GetOverallBucketsDescriptor : RequestDescriptorBase, IGetOverallBucketsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetOverallBuckets; @@ -601,7 +601,7 @@ protected GetOverallBucketsDescriptor(): base() // Request parameters } - ///Descriptor for GetAnomalyRecords http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html + ///Descriptor for GetAnomalyRecords http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html public partial class GetAnomalyRecordsDescriptor : RequestDescriptorBase, IGetAnomalyRecordsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetAnomalyRecords; @@ -622,7 +622,7 @@ protected GetAnomalyRecordsDescriptor(): base() // Request parameters } - ///Descriptor for Info + ///Descriptor for Info public partial class MachineLearningInfoDescriptor : RequestDescriptorBase, IMachineLearningInfoRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningInfo; @@ -630,7 +630,7 @@ public partial class MachineLearningInfoDescriptor : RequestDescriptorBaseDescriptor for OpenJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html + ///Descriptor for OpenJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html public partial class OpenJobDescriptor : RequestDescriptorBase, IOpenJobRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningOpenJob; @@ -651,7 +651,7 @@ protected OpenJobDescriptor(): base() // Request parameters } - ///Descriptor for PostCalendarEvents + ///Descriptor for PostCalendarEvents public partial class PostCalendarEventsDescriptor : RequestDescriptorBase, IPostCalendarEventsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningPostCalendarEvents; @@ -672,7 +672,7 @@ protected PostCalendarEventsDescriptor(): base() // Request parameters } - ///Descriptor for PostJobData http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html + ///Descriptor for PostJobData http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html public partial class PostJobDataDescriptor : RequestDescriptorBase, IPostJobDataRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningPostJobData; @@ -691,13 +691,13 @@ protected PostJobDataDescriptor(): base() // values part of the url path Id IPostJobDataRequest.JobId => Self.RouteValues.Get("job_id"); // Request parameters - ///Optional parameter to specify the end of the bucket resetting range + ///Optional parameter to specify the end of the bucket resetting range public PostJobDataDescriptor ResetEnd(DateTimeOffset? resetend) => Qs("reset_end", resetend); - ///Optional parameter to specify the start of the bucket resetting range + ///Optional parameter to specify the start of the bucket resetting range public PostJobDataDescriptor ResetStart(DateTimeOffset? resetstart) => Qs("reset_start", resetstart); } - ///Descriptor for PreviewDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html + ///Descriptor for PreviewDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html public partial class PreviewDatafeedDescriptor : RequestDescriptorBase, IPreviewDatafeedRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningPreviewDatafeed; @@ -718,7 +718,7 @@ protected PreviewDatafeedDescriptor(): base() // Request parameters } - ///Descriptor for PutCalendar + ///Descriptor for PutCalendar public partial class PutCalendarDescriptor : RequestDescriptorBase, IPutCalendarRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningPutCalendar; @@ -739,7 +739,7 @@ protected PutCalendarDescriptor(): base() // Request parameters } - ///Descriptor for PutCalendarJob + ///Descriptor for PutCalendarJob public partial class PutCalendarJobDescriptor : RequestDescriptorBase, IPutCalendarJobRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningPutCalendarJob; @@ -762,7 +762,7 @@ protected PutCalendarJobDescriptor(): base() // Request parameters } - ///Descriptor for PutDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html + ///Descriptor for PutDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html public partial class PutDatafeedDescriptor : RequestDescriptorBase, PutDatafeedRequestParameters, IPutDatafeedRequest>, IPutDatafeedRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningPutDatafeed; @@ -783,7 +783,7 @@ protected PutDatafeedDescriptor(): base() // Request parameters } - ///Descriptor for PutFilter + ///Descriptor for PutFilter public partial class PutFilterDescriptor : RequestDescriptorBase, IPutFilterRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningPutFilter; @@ -804,7 +804,7 @@ protected PutFilterDescriptor(): base() // Request parameters } - ///Descriptor for PutJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html + ///Descriptor for PutJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html public partial class PutJobDescriptor : RequestDescriptorBase, PutJobRequestParameters, IPutJobRequest>, IPutJobRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningPutJob; @@ -825,7 +825,7 @@ protected PutJobDescriptor(): base() // Request parameters } - ///Descriptor for RevertModelSnapshot http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html + ///Descriptor for RevertModelSnapshot http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html public partial class RevertModelSnapshotDescriptor : RequestDescriptorBase, IRevertModelSnapshotRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningRevertModelSnapshot; @@ -848,7 +848,7 @@ protected RevertModelSnapshotDescriptor(): base() // Request parameters } - ///Descriptor for StartDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html + ///Descriptor for StartDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html public partial class StartDatafeedDescriptor : RequestDescriptorBase, IStartDatafeedRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningStartDatafeed; @@ -869,7 +869,7 @@ protected StartDatafeedDescriptor(): base() // Request parameters } - ///Descriptor for StopDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html + ///Descriptor for StopDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html public partial class StopDatafeedDescriptor : RequestDescriptorBase, IStopDatafeedRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningStopDatafeed; @@ -888,11 +888,11 @@ protected StopDatafeedDescriptor(): base() // values part of the url path Id IStopDatafeedRequest.DatafeedId => Self.RouteValues.Get("datafeed_id"); // Request parameters - ///Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) + ///Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) public StopDatafeedDescriptor AllowNoDatafeeds(bool? allownodatafeeds = true) => Qs("allow_no_datafeeds", allownodatafeeds); } - ///Descriptor for UpdateDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html + ///Descriptor for UpdateDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html public partial class UpdateDatafeedDescriptor : RequestDescriptorBase, UpdateDatafeedRequestParameters, IUpdateDatafeedRequest>, IUpdateDatafeedRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningUpdateDatafeed; @@ -913,7 +913,7 @@ protected UpdateDatafeedDescriptor(): base() // Request parameters } - ///Descriptor for UpdateFilter + ///Descriptor for UpdateFilter public partial class UpdateFilterDescriptor : RequestDescriptorBase, IUpdateFilterRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningUpdateFilter; @@ -934,7 +934,7 @@ protected UpdateFilterDescriptor(): base() // Request parameters } - ///Descriptor for UpdateJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html + ///Descriptor for UpdateJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html public partial class UpdateJobDescriptor : RequestDescriptorBase, UpdateJobRequestParameters, IUpdateJobRequest>, IUpdateJobRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningUpdateJob; @@ -955,7 +955,7 @@ protected UpdateJobDescriptor(): base() // Request parameters } - ///Descriptor for UpdateModelSnapshot http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html + ///Descriptor for UpdateModelSnapshot http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html public partial class UpdateModelSnapshotDescriptor : RequestDescriptorBase, IUpdateModelSnapshotRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningUpdateModelSnapshot; @@ -978,7 +978,7 @@ protected UpdateModelSnapshotDescriptor(): base() // Request parameters } - ///Descriptor for ValidateJob + ///Descriptor for ValidateJob public partial class ValidateJobDescriptor : RequestDescriptorBase, ValidateJobRequestParameters, IValidateJobRequest>, IValidateJobRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningValidateJob; @@ -986,7 +986,7 @@ public partial class ValidateJobDescriptor : RequestDescriptorBaseDescriptor for ValidateDetector + ///Descriptor for ValidateDetector public partial class ValidateDetectorDescriptor : RequestDescriptorBase, ValidateDetectorRequestParameters, IValidateDetectorRequest>, IValidateDetectorRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningValidateDetector; diff --git a/src/Nest/Descriptors.Migration.cs b/src/Nest/Descriptors.Migration.cs index b83af2c799c..ed5f86281bc 100644 --- a/src/Nest/Descriptors.Migration.cs +++ b/src/Nest/Descriptors.Migration.cs @@ -30,7 +30,7 @@ // ReSharper disable RedundantNameQualifier namespace Nest { - ///Descriptor for DeprecationInfo http://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html + ///Descriptor for DeprecationInfo http://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html public partial class DeprecationInfoDescriptor : RequestDescriptorBase, IDeprecationInfoRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.MigrationDeprecationInfo; @@ -47,9 +47,9 @@ public DeprecationInfoDescriptor(IndexName index): base(r => r.Optional("index", // values part of the url path IndexName IDeprecationInfoRequest.Index => Self.RouteValues.Get("index"); - ///Index pattern + ///Index pattern public DeprecationInfoDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public DeprecationInfoDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (IndexName)v)); // Request parameters diff --git a/src/Nest/Descriptors.NoNamespace.cs b/src/Nest/Descriptors.NoNamespace.cs index 8cc6b1b3ee1..b7001e72075 100644 --- a/src/Nest/Descriptors.NoNamespace.cs +++ b/src/Nest/Descriptors.NoNamespace.cs @@ -29,7 +29,7 @@ // ReSharper disable RedundantNameQualifier namespace Nest { - ///Descriptor for Bulk https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html + ///Descriptor for Bulk https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html public partial class BulkDescriptor : RequestDescriptorBase, IBulkRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceBulk; @@ -46,45 +46,45 @@ public BulkDescriptor(IndexName index): base(r => r.Optional("index", index)) // values part of the url path IndexName IBulkRequest.Index => Self.RouteValues.Get("index"); - ///Default index for items which don't provide one + ///Default index for items which don't provide one public BulkDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public BulkDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (IndexName)v)); // Request parameters - ///The pipeline id to preprocess incoming documents with + ///The pipeline id to preprocess incoming documents with public BulkDescriptor Pipeline(string pipeline) => Qs("pipeline", pipeline); - ///If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. + ///If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. public BulkDescriptor Refresh(Refresh? refresh) => Qs("refresh", refresh); - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public BulkDescriptor Routing(Routing routing) => Qs("routing", routing); - ///Whether the _source should be included in the response. + ///Whether the _source should be included in the response. public BulkDescriptor SourceEnabled(bool? sourceenabled = true) => Qs("_source", sourceenabled); - ///Default list of fields to exclude from the returned _source field, can be overridden on each sub-request + ///Default list of fields to exclude from the returned _source field, can be overridden on each sub-request public BulkDescriptor SourceExcludes(Fields sourceexcludes) => Qs("_source_excludes", sourceexcludes); - ///Default list of fields to exclude from the returned _source field, can be overridden on each sub-request + ///Default list of fields to exclude from the returned _source field, can be overridden on each sub-request public BulkDescriptor SourceExcludes(params Expression>[] fields) where T : class => Qs("_source_excludes", fields?.Select(e => (Field)e)); - ///Default list of fields to extract and return from the _source field, can be overridden on each sub-request + ///Default list of fields to extract and return from the _source field, can be overridden on each sub-request public BulkDescriptor SourceIncludes(Fields sourceincludes) => Qs("_source_includes", sourceincludes); - ///Default list of fields to extract and return from the _source field, can be overridden on each sub-request + ///Default list of fields to extract and return from the _source field, can be overridden on each sub-request public BulkDescriptor SourceIncludes(params Expression>[] fields) where T : class => Qs("_source_includes", fields?.Select(e => (Field)e)); - ///Explicit operation timeout + ///Explicit operation timeout public BulkDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Default document type for items which don't provide one + ///Default document type for items which don't provide one public BulkDescriptor TypeQueryString(string typequerystring) => Qs("type", typequerystring); - ///Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + ///Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) public BulkDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } - ///Descriptor for ClearScroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api + ///Descriptor for ClearScroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api public partial class ClearScrollDescriptor : RequestDescriptorBase, IClearScrollRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceClearScroll; @@ -92,7 +92,7 @@ public partial class ClearScrollDescriptor : RequestDescriptorBaseDescriptor for Count https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html + ///Descriptor for Count https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html public partial class CountDescriptor : RequestDescriptorBase, CountRequestParameters, ICountRequest>, ICountRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceCount; @@ -109,51 +109,51 @@ public CountDescriptor(Indices index): base(r => r.Optional("index", index)) // values part of the url path Indices ICountRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of indices to restrict the results + ///A comma-separated list of indices to restrict the results public CountDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public CountDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public CountDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public CountDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Specify whether wildcard and prefix queries should be analyzed (default: false) + ///Specify whether wildcard and prefix queries should be analyzed (default: false) public CountDescriptor AnalyzeWildcard(bool? analyzewildcard = true) => Qs("analyze_wildcard", analyzewildcard); - ///The analyzer to use for the query string + ///The analyzer to use for the query string public CountDescriptor Analyzer(string analyzer) => Qs("analyzer", analyzer); - ///The default operator for query string query (AND or OR) + ///The default operator for query string query (AND or OR) public CountDescriptor DefaultOperator(DefaultOperator? defaultoperator) => Qs("default_operator", defaultoperator); - ///The field to use as default where no field prefix is given in the query string + ///The field to use as default where no field prefix is given in the query string public CountDescriptor Df(string df) => Qs("df", df); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public CountDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Whether specified concrete, expanded or aliased indices should be ignored when throttled + ///Whether specified concrete, expanded or aliased indices should be ignored when throttled public CountDescriptor IgnoreThrottled(bool? ignorethrottled = true) => Qs("ignore_throttled", ignorethrottled); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public CountDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + ///Specify whether format-based query failures (such as providing text to a numeric field) should be ignored public CountDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - ///Include only documents with a specific `_score` value in the result + ///Include only documents with a specific `_score` value in the result public CountDescriptor MinScore(double? minscore) => Qs("min_score", minscore); - ///Specify the node or shard the operation should be performed on (default: random) + ///Specify the node or shard the operation should be performed on (default: random) public CountDescriptor Preference(string preference) => Qs("preference", preference); - ///Query in the Lucene query string syntax + ///Query in the Lucene query string syntax public CountDescriptor QueryOnQueryString(string queryonquerystring) => Qs("q", queryonquerystring); - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public CountDescriptor Routing(Routing routing) => Qs("routing", routing); - ///The maximum count for each shard, upon reaching which the query execution will terminate early + ///The maximum count for each shard, upon reaching which the query execution will terminate early public CountDescriptor TerminateAfter(long? terminateafter) => Qs("terminate_after", terminateafter); } - ///Descriptor for Create https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///Descriptor for Create https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html public partial class CreateDescriptor : RequestDescriptorBase, CreateRequestParameters, ICreateRequest>, ICreateRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceCreate; @@ -183,35 +183,35 @@ protected CreateDescriptor(): base() // values part of the url path IndexName ICreateRequest.Index => Self.RouteValues.Get("index"); Id ICreateRequest.Id => Self.RouteValues.Get("id"); - ///The name of the index + ///The name of the index public CreateDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public CreateDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters - ///The pipeline id to preprocess incoming documents with + ///The pipeline id to preprocess incoming documents with public CreateDescriptor Pipeline(string pipeline) => Qs("pipeline", pipeline); - ///If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. + ///If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. public CreateDescriptor Refresh(Refresh? refresh) => Qs("refresh", refresh); - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public CreateDescriptor Routing(Routing routing) => Qs("routing", routing); - ///Explicit operation timeout + ///Explicit operation timeout public CreateDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Explicit version number for concurrency control + ///Explicit version number for concurrency control public CreateDescriptor Version(long? version) => Qs("version", version); - ///Specific version type + ///Specific version type public CreateDescriptor VersionType(VersionType? versiontype) => Qs("version_type", versiontype); - ///Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + ///Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) public CreateDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } - ///Descriptor for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html + ///Descriptor for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html public partial class DeleteDescriptor : RequestDescriptorBase, DeleteRequestParameters, IDeleteRequest>, IDeleteRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDelete; @@ -241,37 +241,37 @@ protected DeleteDescriptor(): base() // values part of the url path IndexName IDeleteRequest.Index => Self.RouteValues.Get("index"); Id IDeleteRequest.Id => Self.RouteValues.Get("id"); - ///The name of the index + ///The name of the index public DeleteDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public DeleteDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters - ///only perform the delete operation if the last operation that has changed the document has the specified primary term + ///only perform the delete operation if the last operation that has changed the document has the specified primary term public DeleteDescriptor IfPrimaryTerm(long? ifprimaryterm) => Qs("if_primary_term", ifprimaryterm); - ///only perform the delete operation if the last operation that has changed the document has the specified sequence number + ///only perform the delete operation if the last operation that has changed the document has the specified sequence number public DeleteDescriptor IfSequenceNumber(long? ifsequencenumber) => Qs("if_seq_no", ifsequencenumber); - ///If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. + ///If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. public DeleteDescriptor Refresh(Refresh? refresh) => Qs("refresh", refresh); - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public DeleteDescriptor Routing(Routing routing) => Qs("routing", routing); - ///Explicit operation timeout + ///Explicit operation timeout public DeleteDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Explicit version number for concurrency control + ///Explicit version number for concurrency control public DeleteDescriptor Version(long? version) => Qs("version", version); - ///Specific version type + ///Specific version type public DeleteDescriptor VersionType(VersionType? versiontype) => Qs("version_type", versiontype); - ///Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + ///Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) public DeleteDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } - ///Descriptor for DeleteByQuery https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html + ///Descriptor for DeleteByQuery https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html public partial class DeleteByQueryDescriptor : RequestDescriptorBase, DeleteByQueryRequestParameters, IDeleteByQueryRequest>, IDeleteByQueryRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDeleteByQuery; @@ -288,91 +288,91 @@ public DeleteByQueryDescriptor(): this(typeof(TDocument)) // values part of the url path Indices IDeleteByQueryRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices + ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices public DeleteByQueryDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public DeleteByQueryDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public DeleteByQueryDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public DeleteByQueryDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Specify whether wildcard and prefix queries should be analyzed (default: false) + ///Specify whether wildcard and prefix queries should be analyzed (default: false) public DeleteByQueryDescriptor AnalyzeWildcard(bool? analyzewildcard = true) => Qs("analyze_wildcard", analyzewildcard); - ///The analyzer to use for the query string + ///The analyzer to use for the query string public DeleteByQueryDescriptor Analyzer(string analyzer) => Qs("analyzer", analyzer); - ///What to do when the delete by query hits version conflicts? + ///What to do when the delete by query hits version conflicts? public DeleteByQueryDescriptor Conflicts(Conflicts? conflicts) => Qs("conflicts", conflicts); - ///The default operator for query string query (AND or OR) + ///The default operator for query string query (AND or OR) public DeleteByQueryDescriptor DefaultOperator(DefaultOperator? defaultoperator) => Qs("default_operator", defaultoperator); - ///The field to use as default where no field prefix is given in the query string + ///The field to use as default where no field prefix is given in the query string public DeleteByQueryDescriptor Df(string df) => Qs("df", df); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public DeleteByQueryDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Starting offset (default: 0) + ///Starting offset (default: 0) public DeleteByQueryDescriptor From(long? from) => Qs("from", from); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public DeleteByQueryDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + ///Specify whether format-based query failures (such as providing text to a numeric field) should be ignored public DeleteByQueryDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - ///Specify the node or shard the operation should be performed on (default: random) + ///Specify the node or shard the operation should be performed on (default: random) public DeleteByQueryDescriptor Preference(string preference) => Qs("preference", preference); - ///Query in the Lucene query string syntax + ///Query in the Lucene query string syntax public DeleteByQueryDescriptor QueryOnQueryString(string queryonquerystring) => Qs("q", queryonquerystring); - ///Should the effected indexes be refreshed? + ///Should the effected indexes be refreshed? public DeleteByQueryDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - ///Specify if request cache should be used for this request or not, defaults to index level setting + ///Specify if request cache should be used for this request or not, defaults to index level setting public DeleteByQueryDescriptor RequestCache(bool? requestcache = true) => Qs("request_cache", requestcache); - ///The throttle for this request in sub-requests per second. -1 means no throttle. + ///The throttle for this request in sub-requests per second. -1 means no throttle. public DeleteByQueryDescriptor RequestsPerSecond(long? requestspersecond) => Qs("requests_per_second", requestspersecond); - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public DeleteByQueryDescriptor Routing(Routing routing) => Qs("routing", routing); - ///Specify how long a consistent view of the index should be maintained for scrolled search + ///Specify how long a consistent view of the index should be maintained for scrolled search public DeleteByQueryDescriptor Scroll(Time scroll) => Qs("scroll", scroll); - ///Size on the scroll request powering the delete by query + ///Size on the scroll request powering the delete by query public DeleteByQueryDescriptor ScrollSize(long? scrollsize) => Qs("scroll_size", scrollsize); - ///Explicit timeout for each search request. Defaults to no timeout. + ///Explicit timeout for each search request. Defaults to no timeout. public DeleteByQueryDescriptor SearchTimeout(Time searchtimeout) => Qs("search_timeout", searchtimeout); - ///Search operation type + ///Search operation type public DeleteByQueryDescriptor SearchType(SearchType? searchtype) => Qs("search_type", searchtype); - ///Deprecated, please use `max_docs` instead + ///Deprecated, please use `max_docs` instead public DeleteByQueryDescriptor Size(long? size) => Qs("size", size); - ///The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. + ///The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. public DeleteByQueryDescriptor Slices(long? slices) => Qs("slices", slices); - ///A comma-separated list of : pairs + ///A comma-separated list of : pairs public DeleteByQueryDescriptor Sort(params string[] sort) => Qs("sort", sort); - ///Whether the _source should be included in the response. + ///Whether the _source should be included in the response. public DeleteByQueryDescriptor SourceEnabled(bool? sourceenabled = true) => Qs("_source", sourceenabled); - ///A list of fields to exclude from the returned _source field + ///A list of fields to exclude from the returned _source field public DeleteByQueryDescriptor SourceExcludes(Fields sourceexcludes) => Qs("_source_excludes", sourceexcludes); - ///A list of fields to exclude from the returned _source field + ///A list of fields to exclude from the returned _source field public DeleteByQueryDescriptor SourceExcludes(params Expression>[] fields) => Qs("_source_excludes", fields?.Select(e => (Field)e)); - ///A list of fields to extract and return from the _source field + ///A list of fields to extract and return from the _source field public DeleteByQueryDescriptor SourceIncludes(Fields sourceincludes) => Qs("_source_includes", sourceincludes); - ///A list of fields to extract and return from the _source field + ///A list of fields to extract and return from the _source field public DeleteByQueryDescriptor SourceIncludes(params Expression>[] fields) => Qs("_source_includes", fields?.Select(e => (Field)e)); - ///Specific 'tag' of the request for logging and statistical purposes + ///Specific 'tag' of the request for logging and statistical purposes public DeleteByQueryDescriptor Stats(params string[] stats) => Qs("stats", stats); - ///The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. + ///The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. public DeleteByQueryDescriptor TerminateAfter(long? terminateafter) => Qs("terminate_after", terminateafter); - ///Time each individual bulk request should wait for shards that are unavailable. + ///Time each individual bulk request should wait for shards that are unavailable. public DeleteByQueryDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Specify whether to return document version as part of a hit + ///Specify whether to return document version as part of a hit public DeleteByQueryDescriptor Version(bool? version = true) => Qs("version", version); - ///Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + ///Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) public DeleteByQueryDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); - ///Should the request should block until the delete by query is complete. + ///Should the request should block until the delete by query is complete. public DeleteByQueryDescriptor WaitForCompletion(bool? waitforcompletion = true) => Qs("wait_for_completion", waitforcompletion); } - ///Descriptor for DeleteByQueryRethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html + ///Descriptor for DeleteByQueryRethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html public partial class DeleteByQueryRethrottleDescriptor : RequestDescriptorBase, IDeleteByQueryRethrottleRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDeleteByQueryRethrottle; @@ -391,11 +391,11 @@ protected DeleteByQueryRethrottleDescriptor(): base() // values part of the url path TaskId IDeleteByQueryRethrottleRequest.TaskId => Self.RouteValues.Get("task_id"); // Request parameters - ///The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. + ///The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. public DeleteByQueryRethrottleDescriptor RequestsPerSecond(long? requestspersecond) => Qs("requests_per_second", requestspersecond); } - ///Descriptor for DeleteScript https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///Descriptor for DeleteScript https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html public partial class DeleteScriptDescriptor : RequestDescriptorBase, IDeleteScriptRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDeleteScript; @@ -414,13 +414,13 @@ protected DeleteScriptDescriptor(): base() // values part of the url path Id IDeleteScriptRequest.Id => Self.RouteValues.Get("id"); // Request parameters - ///Specify timeout for connection to master + ///Specify timeout for connection to master public DeleteScriptDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public DeleteScriptDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for DocumentExists https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///Descriptor for DocumentExists https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html public partial class DocumentExistsDescriptor : RequestDescriptorBase, DocumentExistsRequestParameters, IDocumentExistsRequest>, IDocumentExistsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDocumentExists; @@ -450,47 +450,47 @@ protected DocumentExistsDescriptor(): base() // values part of the url path IndexName IDocumentExistsRequest.Index => Self.RouteValues.Get("index"); Id IDocumentExistsRequest.Id => Self.RouteValues.Get("id"); - ///The name of the index + ///The name of the index public DocumentExistsDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public DocumentExistsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters - ///Specify the node or shard the operation should be performed on (default: random) + ///Specify the node or shard the operation should be performed on (default: random) public DocumentExistsDescriptor Preference(string preference) => Qs("preference", preference); - ///Specify whether to perform the operation in realtime or search mode + ///Specify whether to perform the operation in realtime or search mode public DocumentExistsDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - ///Refresh the shard containing the document before performing the operation + ///Refresh the shard containing the document before performing the operation public DocumentExistsDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public DocumentExistsDescriptor Routing(Routing routing) => Qs("routing", routing); - ///Whether the _source should be included in the response. + ///Whether the _source should be included in the response. public DocumentExistsDescriptor SourceEnabled(bool? sourceenabled = true) => Qs("_source", sourceenabled); - ///A list of fields to exclude from the returned _source field + ///A list of fields to exclude from the returned _source field public DocumentExistsDescriptor SourceExcludes(Fields sourceexcludes) => Qs("_source_excludes", sourceexcludes); - ///A list of fields to exclude from the returned _source field + ///A list of fields to exclude from the returned _source field public DocumentExistsDescriptor SourceExcludes(params Expression>[] fields) => Qs("_source_excludes", fields?.Select(e => (Field)e)); - ///A list of fields to extract and return from the _source field + ///A list of fields to extract and return from the _source field public DocumentExistsDescriptor SourceIncludes(Fields sourceincludes) => Qs("_source_includes", sourceincludes); - ///A list of fields to extract and return from the _source field + ///A list of fields to extract and return from the _source field public DocumentExistsDescriptor SourceIncludes(params Expression>[] fields) => Qs("_source_includes", fields?.Select(e => (Field)e)); - ///A comma-separated list of stored fields to return in the response + ///A comma-separated list of stored fields to return in the response public DocumentExistsDescriptor StoredFields(Fields storedfields) => Qs("stored_fields", storedfields); - ///A comma-separated list of stored fields to return in the response + ///A comma-separated list of stored fields to return in the response public DocumentExistsDescriptor StoredFields(params Expression>[] fields) => Qs("stored_fields", fields?.Select(e => (Field)e)); - ///Explicit version number for concurrency control + ///Explicit version number for concurrency control public DocumentExistsDescriptor Version(long? version) => Qs("version", version); - ///Specific version type + ///Specific version type public DocumentExistsDescriptor VersionType(VersionType? versiontype) => Qs("version_type", versiontype); } - ///Descriptor for SourceExists https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///Descriptor for SourceExists https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html public partial class SourceExistsDescriptor : RequestDescriptorBase, SourceExistsRequestParameters, ISourceExistsRequest>, ISourceExistsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceSourceExists; @@ -520,43 +520,43 @@ protected SourceExistsDescriptor(): base() // values part of the url path IndexName ISourceExistsRequest.Index => Self.RouteValues.Get("index"); Id ISourceExistsRequest.Id => Self.RouteValues.Get("id"); - ///The name of the index + ///The name of the index public SourceExistsDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public SourceExistsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters - ///Specify the node or shard the operation should be performed on (default: random) + ///Specify the node or shard the operation should be performed on (default: random) public SourceExistsDescriptor Preference(string preference) => Qs("preference", preference); - ///Specify whether to perform the operation in realtime or search mode + ///Specify whether to perform the operation in realtime or search mode public SourceExistsDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - ///Refresh the shard containing the document before performing the operation + ///Refresh the shard containing the document before performing the operation public SourceExistsDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public SourceExistsDescriptor Routing(Routing routing) => Qs("routing", routing); - ///Whether the _source should be included in the response. + ///Whether the _source should be included in the response. public SourceExistsDescriptor SourceEnabled(bool? sourceenabled = true) => Qs("_source", sourceenabled); - ///A list of fields to exclude from the returned _source field + ///A list of fields to exclude from the returned _source field public SourceExistsDescriptor SourceExcludes(Fields sourceexcludes) => Qs("_source_excludes", sourceexcludes); - ///A list of fields to exclude from the returned _source field + ///A list of fields to exclude from the returned _source field public SourceExistsDescriptor SourceExcludes(params Expression>[] fields) => Qs("_source_excludes", fields?.Select(e => (Field)e)); - ///A list of fields to extract and return from the _source field + ///A list of fields to extract and return from the _source field public SourceExistsDescriptor SourceIncludes(Fields sourceincludes) => Qs("_source_includes", sourceincludes); - ///A list of fields to extract and return from the _source field + ///A list of fields to extract and return from the _source field public SourceExistsDescriptor SourceIncludes(params Expression>[] fields) => Qs("_source_includes", fields?.Select(e => (Field)e)); - ///Explicit version number for concurrency control + ///Explicit version number for concurrency control public SourceExistsDescriptor Version(long? version) => Qs("version", version); - ///Specific version type + ///Specific version type public SourceExistsDescriptor VersionType(VersionType? versiontype) => Qs("version_type", versiontype); } - ///Descriptor for Explain https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html + ///Descriptor for Explain https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html public partial class ExplainDescriptor : RequestDescriptorBase, ExplainRequestParameters, IExplainRequest>, IExplainRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceExplain; @@ -586,47 +586,47 @@ protected ExplainDescriptor(): base() // values part of the url path IndexName IExplainRequest.Index => Self.RouteValues.Get("index"); Id IExplainRequest.Id => Self.RouteValues.Get("id"); - ///The name of the index + ///The name of the index public ExplainDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public ExplainDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters - ///Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false) + ///Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false) public ExplainDescriptor AnalyzeWildcard(bool? analyzewildcard = true) => Qs("analyze_wildcard", analyzewildcard); - ///The analyzer for the query string query + ///The analyzer for the query string query public ExplainDescriptor Analyzer(string analyzer) => Qs("analyzer", analyzer); - ///The default operator for query string query (AND or OR) + ///The default operator for query string query (AND or OR) public ExplainDescriptor DefaultOperator(DefaultOperator? defaultoperator) => Qs("default_operator", defaultoperator); - ///The default field for query string query (default: _all) + ///The default field for query string query (default: _all) public ExplainDescriptor Df(string df) => Qs("df", df); - ///Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + ///Specify whether format-based query failures (such as providing text to a numeric field) should be ignored public ExplainDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - ///Specify the node or shard the operation should be performed on (default: random) + ///Specify the node or shard the operation should be performed on (default: random) public ExplainDescriptor Preference(string preference) => Qs("preference", preference); - ///Query in the Lucene query string syntax + ///Query in the Lucene query string syntax public ExplainDescriptor QueryOnQueryString(string queryonquerystring) => Qs("q", queryonquerystring); - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public ExplainDescriptor Routing(Routing routing) => Qs("routing", routing); - ///Whether the _source should be included in the response. + ///Whether the _source should be included in the response. public ExplainDescriptor SourceEnabled(bool? sourceenabled = true) => Qs("_source", sourceenabled); - ///A list of fields to exclude from the returned _source field + ///A list of fields to exclude from the returned _source field public ExplainDescriptor SourceExcludes(Fields sourceexcludes) => Qs("_source_excludes", sourceexcludes); - ///A list of fields to exclude from the returned _source field + ///A list of fields to exclude from the returned _source field public ExplainDescriptor SourceExcludes(params Expression>[] fields) => Qs("_source_excludes", fields?.Select(e => (Field)e)); - ///A list of fields to extract and return from the _source field + ///A list of fields to extract and return from the _source field public ExplainDescriptor SourceIncludes(Fields sourceincludes) => Qs("_source_includes", sourceincludes); - ///A list of fields to extract and return from the _source field + ///A list of fields to extract and return from the _source field public ExplainDescriptor SourceIncludes(params Expression>[] fields) => Qs("_source_includes", fields?.Select(e => (Field)e)); } - ///Descriptor for FieldCapabilities https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html + ///Descriptor for FieldCapabilities https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html public partial class FieldCapabilitiesDescriptor : RequestDescriptorBase, IFieldCapabilitiesRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceFieldCapabilities; @@ -643,30 +643,30 @@ public FieldCapabilitiesDescriptor(Indices index): base(r => r.Optional("index", // values part of the url path Indices IFieldCapabilitiesRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices + ///A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices public FieldCapabilitiesDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public FieldCapabilitiesDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public FieldCapabilitiesDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public FieldCapabilitiesDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public FieldCapabilitiesDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///A comma-separated list of field names + ///A comma-separated list of field names public FieldCapabilitiesDescriptor Fields(Fields fields) => Qs("fields", fields); - ///A comma-separated list of field names + ///A comma-separated list of field names public FieldCapabilitiesDescriptor Fields(params Expression>[] fields) where T : class => Qs("fields", fields?.Select(e => (Field)e)); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public FieldCapabilitiesDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Indicates whether unmapped fields should be included in the response. + ///Indicates whether unmapped fields should be included in the response. public FieldCapabilitiesDescriptor IncludeUnmapped(bool? includeunmapped = true) => Qs("include_unmapped", includeunmapped); } - ///Descriptor for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///Descriptor for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html public partial class GetDescriptor : RequestDescriptorBase, GetRequestParameters, IGetRequest>, IGetRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceGet; @@ -696,47 +696,47 @@ protected GetDescriptor(): base() // values part of the url path IndexName IGetRequest.Index => Self.RouteValues.Get("index"); Id IGetRequest.Id => Self.RouteValues.Get("id"); - ///The name of the index + ///The name of the index public GetDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public GetDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters - ///Specify the node or shard the operation should be performed on (default: random) + ///Specify the node or shard the operation should be performed on (default: random) public GetDescriptor Preference(string preference) => Qs("preference", preference); - ///Specify whether to perform the operation in realtime or search mode + ///Specify whether to perform the operation in realtime or search mode public GetDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - ///Refresh the shard containing the document before performing the operation + ///Refresh the shard containing the document before performing the operation public GetDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public GetDescriptor Routing(Routing routing) => Qs("routing", routing); - ///Whether the _source should be included in the response. + ///Whether the _source should be included in the response. public GetDescriptor SourceEnabled(bool? sourceenabled = true) => Qs("_source", sourceenabled); - ///A list of fields to exclude from the returned _source field + ///A list of fields to exclude from the returned _source field public GetDescriptor SourceExcludes(Fields sourceexcludes) => Qs("_source_excludes", sourceexcludes); - ///A list of fields to exclude from the returned _source field + ///A list of fields to exclude from the returned _source field public GetDescriptor SourceExcludes(params Expression>[] fields) => Qs("_source_excludes", fields?.Select(e => (Field)e)); - ///A list of fields to extract and return from the _source field + ///A list of fields to extract and return from the _source field public GetDescriptor SourceIncludes(Fields sourceincludes) => Qs("_source_includes", sourceincludes); - ///A list of fields to extract and return from the _source field + ///A list of fields to extract and return from the _source field public GetDescriptor SourceIncludes(params Expression>[] fields) => Qs("_source_includes", fields?.Select(e => (Field)e)); - ///A comma-separated list of stored fields to return in the response + ///A comma-separated list of stored fields to return in the response public GetDescriptor StoredFields(Fields storedfields) => Qs("stored_fields", storedfields); - ///A comma-separated list of stored fields to return in the response + ///A comma-separated list of stored fields to return in the response public GetDescriptor StoredFields(params Expression>[] fields) => Qs("stored_fields", fields?.Select(e => (Field)e)); - ///Explicit version number for concurrency control + ///Explicit version number for concurrency control public GetDescriptor Version(long? version) => Qs("version", version); - ///Specific version type + ///Specific version type public GetDescriptor VersionType(VersionType? versiontype) => Qs("version_type", versiontype); } - ///Descriptor for GetScript https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///Descriptor for GetScript https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html public partial class GetScriptDescriptor : RequestDescriptorBase, IGetScriptRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceGetScript; @@ -755,11 +755,11 @@ protected GetScriptDescriptor(): base() // values part of the url path Id IGetScriptRequest.Id => Self.RouteValues.Get("id"); // Request parameters - ///Specify timeout for connection to master + ///Specify timeout for connection to master public GetScriptDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); } - ///Descriptor for Source https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///Descriptor for Source https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html public partial class SourceDescriptor : RequestDescriptorBase, SourceRequestParameters, ISourceRequest>, ISourceRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceSource; @@ -789,43 +789,43 @@ protected SourceDescriptor(): base() // values part of the url path IndexName ISourceRequest.Index => Self.RouteValues.Get("index"); Id ISourceRequest.Id => Self.RouteValues.Get("id"); - ///The name of the index + ///The name of the index public SourceDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public SourceDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters - ///Specify the node or shard the operation should be performed on (default: random) + ///Specify the node or shard the operation should be performed on (default: random) public SourceDescriptor Preference(string preference) => Qs("preference", preference); - ///Specify whether to perform the operation in realtime or search mode + ///Specify whether to perform the operation in realtime or search mode public SourceDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - ///Refresh the shard containing the document before performing the operation + ///Refresh the shard containing the document before performing the operation public SourceDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public SourceDescriptor Routing(Routing routing) => Qs("routing", routing); - ///Whether the _source should be included in the response. + ///Whether the _source should be included in the response. public SourceDescriptor SourceEnabled(bool? sourceenabled = true) => Qs("_source", sourceenabled); - ///A list of fields to exclude from the returned _source field + ///A list of fields to exclude from the returned _source field public SourceDescriptor SourceExcludes(Fields sourceexcludes) => Qs("_source_excludes", sourceexcludes); - ///A list of fields to exclude from the returned _source field + ///A list of fields to exclude from the returned _source field public SourceDescriptor SourceExcludes(params Expression>[] fields) => Qs("_source_excludes", fields?.Select(e => (Field)e)); - ///A list of fields to extract and return from the _source field + ///A list of fields to extract and return from the _source field public SourceDescriptor SourceIncludes(Fields sourceincludes) => Qs("_source_includes", sourceincludes); - ///A list of fields to extract and return from the _source field + ///A list of fields to extract and return from the _source field public SourceDescriptor SourceIncludes(params Expression>[] fields) => Qs("_source_includes", fields?.Select(e => (Field)e)); - ///Explicit version number for concurrency control + ///Explicit version number for concurrency control public SourceDescriptor Version(long? version) => Qs("version", version); - ///Specific version type + ///Specific version type public SourceDescriptor VersionType(VersionType? versiontype) => Qs("version_type", versiontype); } - ///Descriptor for Index https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///Descriptor for Index https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html public partial class IndexDescriptor : RequestDescriptorBase, IndexRequestParameters, IIndexRequest>, IIndexRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceIndex; @@ -860,43 +860,43 @@ public IndexDescriptor(): this(typeof(TDocument)) // values part of the url path IndexName IIndexRequest.Index => Self.RouteValues.Get("index"); Id IIndexRequest.Id => Self.RouteValues.Get("id"); - ///The name of the index + ///The name of the index public IndexDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public IndexDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); - ///Document ID + ///Document ID public IndexDescriptor Id(Id id) => Assign(id, (a, v) => a.RouteValues.Optional("id", v)); // Request parameters - ///only perform the index operation if the last operation that has changed the document has the specified primary term + ///only perform the index operation if the last operation that has changed the document has the specified primary term public IndexDescriptor IfPrimaryTerm(long? ifprimaryterm) => Qs("if_primary_term", ifprimaryterm); - ///only perform the index operation if the last operation that has changed the document has the specified sequence number + ///only perform the index operation if the last operation that has changed the document has the specified sequence number public IndexDescriptor IfSequenceNumber(long? ifsequencenumber) => Qs("if_seq_no", ifsequencenumber); - ///Explicit operation type + ///Explicit operation type public IndexDescriptor OpType(OpType? optype) => Qs("op_type", optype); - ///The pipeline id to preprocess incoming documents with + ///The pipeline id to preprocess incoming documents with public IndexDescriptor Pipeline(string pipeline) => Qs("pipeline", pipeline); - ///If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. + ///If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. public IndexDescriptor Refresh(Refresh? refresh) => Qs("refresh", refresh); - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public IndexDescriptor Routing(Routing routing) => Qs("routing", routing); - ///Explicit operation timeout + ///Explicit operation timeout public IndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Explicit version number for concurrency control + ///Explicit version number for concurrency control public IndexDescriptor Version(long? version) => Qs("version", version); - ///Specific version type + ///Specific version type public IndexDescriptor VersionType(VersionType? versiontype) => Qs("version_type", versiontype); - ///Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + ///Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) public IndexDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } - ///Descriptor for RootNodeInfo https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + ///Descriptor for RootNodeInfo https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html public partial class RootNodeInfoDescriptor : RequestDescriptorBase, IRootNodeInfoRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceRootNodeInfo; @@ -904,7 +904,7 @@ public partial class RootNodeInfoDescriptor : RequestDescriptorBaseDescriptor for MultiGet https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html + ///Descriptor for MultiGet https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html public partial class MultiGetDescriptor : RequestDescriptorBase, IMultiGetRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceMultiGet; @@ -921,41 +921,41 @@ public MultiGetDescriptor(IndexName index): base(r => r.Optional("index", index) // values part of the url path IndexName IMultiGetRequest.Index => Self.RouteValues.Get("index"); - ///The name of the index + ///The name of the index public MultiGetDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public MultiGetDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (IndexName)v)); // Request parameters - ///Specify the node or shard the operation should be performed on (default: random) + ///Specify the node or shard the operation should be performed on (default: random) public MultiGetDescriptor Preference(string preference) => Qs("preference", preference); - ///Specify whether to perform the operation in realtime or search mode + ///Specify whether to perform the operation in realtime or search mode public MultiGetDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - ///Refresh the shard containing the document before performing the operation + ///Refresh the shard containing the document before performing the operation public MultiGetDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public MultiGetDescriptor Routing(Routing routing) => Qs("routing", routing); - ///Whether the _source should be included in the response. + ///Whether the _source should be included in the response. public MultiGetDescriptor SourceEnabled(bool? sourceenabled = true) => Qs("_source", sourceenabled); - ///A list of fields to exclude from the returned _source field + ///A list of fields to exclude from the returned _source field public MultiGetDescriptor SourceExcludes(Fields sourceexcludes) => Qs("_source_excludes", sourceexcludes); - ///A list of fields to exclude from the returned _source field + ///A list of fields to exclude from the returned _source field public MultiGetDescriptor SourceExcludes(params Expression>[] fields) where T : class => Qs("_source_excludes", fields?.Select(e => (Field)e)); - ///A list of fields to extract and return from the _source field + ///A list of fields to extract and return from the _source field public MultiGetDescriptor SourceIncludes(Fields sourceincludes) => Qs("_source_includes", sourceincludes); - ///A list of fields to extract and return from the _source field + ///A list of fields to extract and return from the _source field public MultiGetDescriptor SourceIncludes(params Expression>[] fields) where T : class => Qs("_source_includes", fields?.Select(e => (Field)e)); } - ///Descriptor for MultiSearch https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html + ///Descriptor for MultiSearch https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html public partial class MultiSearchDescriptor : RequestDescriptorBase, IMultiSearchRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceMultiSearch; @@ -972,31 +972,31 @@ public MultiSearchDescriptor(Indices index): base(r => r.Optional("index", index // values part of the url path Indices IMultiSearchRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names to use as default + ///A comma-separated list of index names to use as default public MultiSearchDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public MultiSearchDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public MultiSearchDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution + ///Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution public MultiSearchDescriptor CcsMinimizeRoundtrips(bool? ccsminimizeroundtrips = true) => Qs("ccs_minimize_roundtrips", ccsminimizeroundtrips); - ///Controls the maximum number of concurrent searches the multi search api will execute + ///Controls the maximum number of concurrent searches the multi search api will execute public MultiSearchDescriptor MaxConcurrentSearches(long? maxconcurrentsearches) => Qs("max_concurrent_searches", maxconcurrentsearches); - ///The number of concurrent shard requests each sub search executes concurrently per node. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests + ///The number of concurrent shard requests each sub search executes concurrently per node. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests public MultiSearchDescriptor MaxConcurrentShardRequests(long? maxconcurrentshardrequests) => Qs("max_concurrent_shard_requests", maxconcurrentshardrequests); - ///A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. + ///A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. public MultiSearchDescriptor PreFilterShardSize(long? prefiltershardsize) => Qs("pre_filter_shard_size", prefiltershardsize); - ///Search operation type + ///Search operation type public MultiSearchDescriptor SearchType(SearchType? searchtype) => Qs("search_type", searchtype); - ///Indicates whether hits.total should be rendered as an integer or an object in the rest search response + ///Indicates whether hits.total should be rendered as an integer or an object in the rest search response public MultiSearchDescriptor TotalHitsAsInteger(bool? totalhitsasinteger = true) => Qs("rest_total_hits_as_int", totalhitsasinteger); - ///Specify whether aggregation and suggester names should be prefixed by their respective types in the response + ///Specify whether aggregation and suggester names should be prefixed by their respective types in the response public MultiSearchDescriptor TypedKeys(bool? typedkeys = true) => Qs("typed_keys", typedkeys); } - ///Descriptor for MultiSearchTemplate https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + ///Descriptor for MultiSearchTemplate https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html public partial class MultiSearchTemplateDescriptor : RequestDescriptorBase, IMultiSearchTemplateRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceMultiSearchTemplate; @@ -1013,27 +1013,27 @@ public MultiSearchTemplateDescriptor(Indices index): base(r => r.Optional("index // values part of the url path Indices IMultiSearchTemplateRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names to use as default + ///A comma-separated list of index names to use as default public MultiSearchTemplateDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public MultiSearchTemplateDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public MultiSearchTemplateDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution + ///Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution public MultiSearchTemplateDescriptor CcsMinimizeRoundtrips(bool? ccsminimizeroundtrips = true) => Qs("ccs_minimize_roundtrips", ccsminimizeroundtrips); - ///Controls the maximum number of concurrent searches the multi search api will execute + ///Controls the maximum number of concurrent searches the multi search api will execute public MultiSearchTemplateDescriptor MaxConcurrentSearches(long? maxconcurrentsearches) => Qs("max_concurrent_searches", maxconcurrentsearches); - ///Search operation type + ///Search operation type public MultiSearchTemplateDescriptor SearchType(SearchType? searchtype) => Qs("search_type", searchtype); - ///Indicates whether hits.total should be rendered as an integer or an object in the rest search response + ///Indicates whether hits.total should be rendered as an integer or an object in the rest search response public MultiSearchTemplateDescriptor TotalHitsAsInteger(bool? totalhitsasinteger = true) => Qs("rest_total_hits_as_int", totalhitsasinteger); - ///Specify whether aggregation and suggester names should be prefixed by their respective types in the response + ///Specify whether aggregation and suggester names should be prefixed by their respective types in the response public MultiSearchTemplateDescriptor TypedKeys(bool? typedkeys = true) => Qs("typed_keys", typedkeys); } - ///Descriptor for MultiTermVectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html + ///Descriptor for MultiTermVectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html public partial class MultiTermVectorsDescriptor : RequestDescriptorBase, IMultiTermVectorsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceMultiTermVectors; @@ -1050,46 +1050,46 @@ public MultiTermVectorsDescriptor(IndexName index): base(r => r.Optional("index" // values part of the url path IndexName IMultiTermVectorsRequest.Index => Self.RouteValues.Get("index"); - ///The index in which the document resides. + ///The index in which the document resides. public MultiTermVectorsDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public MultiTermVectorsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (IndexName)v)); // Request parameters - ///Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + ///Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". public MultiTermVectorsDescriptor FieldStatistics(bool? fieldstatistics = true) => Qs("field_statistics", fieldstatistics); - ///A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs". + ///A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs". public MultiTermVectorsDescriptor Fields(Fields fields) => Qs("fields", fields); - ///A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs". + ///A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs". public MultiTermVectorsDescriptor Fields(params Expression>[] fields) where T : class => Qs("fields", fields?.Select(e => (Field)e)); - ///Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + ///Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". public MultiTermVectorsDescriptor Offsets(bool? offsets = true) => Qs("offsets", offsets); - ///Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + ///Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". public MultiTermVectorsDescriptor Payloads(bool? payloads = true) => Qs("payloads", payloads); - ///Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + ///Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". public MultiTermVectorsDescriptor Positions(bool? positions = true) => Qs("positions", positions); - ///Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs". + ///Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs". public MultiTermVectorsDescriptor Preference(string preference) => Qs("preference", preference); - ///Specifies if requests are real-time as opposed to near-real-time (default: true). + ///Specifies if requests are real-time as opposed to near-real-time (default: true). public MultiTermVectorsDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public MultiTermVectorsDescriptor Routing(Routing routing) => Qs("routing", routing); - ///Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". + ///Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". public MultiTermVectorsDescriptor TermStatistics(bool? termstatistics = true) => Qs("term_statistics", termstatistics); - ///Explicit version number for concurrency control + ///Explicit version number for concurrency control public MultiTermVectorsDescriptor Version(long? version) => Qs("version", version); - ///Specific version type + ///Specific version type public MultiTermVectorsDescriptor VersionType(VersionType? versiontype) => Qs("version_type", versiontype); } - ///Descriptor for Ping https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + ///Descriptor for Ping https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html public partial class PingDescriptor : RequestDescriptorBase, IPingRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespacePing; @@ -1097,7 +1097,7 @@ public partial class PingDescriptor : RequestDescriptorBaseDescriptor for PutScript https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///Descriptor for PutScript https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html public partial class PutScriptDescriptor : RequestDescriptorBase, IPutScriptRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespacePutScript; @@ -1123,38 +1123,38 @@ protected PutScriptDescriptor(): base() // values part of the url path Id IPutScriptRequest.Id => Self.RouteValues.Get("id"); Name IPutScriptRequest.Context => Self.RouteValues.Get("context"); - ///Script context + ///Script context public PutScriptDescriptor Context(Name context) => Assign(context, (a, v) => a.RouteValues.Optional("context", v)); // Request parameters - ///Specify timeout for connection to master + ///Specify timeout for connection to master public PutScriptDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public PutScriptDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for ReindexOnServer https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html + ///Descriptor for ReindexOnServer https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html public partial class ReindexOnServerDescriptor : RequestDescriptorBase, IReindexOnServerRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceReindexOnServer; // values part of the url path // Request parameters - ///Should the effected indexes be refreshed? + ///Should the effected indexes be refreshed? public ReindexOnServerDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - ///The throttle to set on this request in sub-requests per second. -1 means no throttle. + ///The throttle to set on this request in sub-requests per second. -1 means no throttle. public ReindexOnServerDescriptor RequestsPerSecond(long? requestspersecond) => Qs("requests_per_second", requestspersecond); - ///Control how long to keep the search context alive + ///Control how long to keep the search context alive public ReindexOnServerDescriptor Scroll(Time scroll) => Qs("scroll", scroll); - ///The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. + ///The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. public ReindexOnServerDescriptor Slices(long? slices) => Qs("slices", slices); - ///Time each individual bulk request should wait for shards that are unavailable. + ///Time each individual bulk request should wait for shards that are unavailable. public ReindexOnServerDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + ///Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) public ReindexOnServerDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); - ///Should the request should block until the reindex is complete. + ///Should the request should block until the reindex is complete. public ReindexOnServerDescriptor WaitForCompletion(bool? waitforcompletion = true) => Qs("wait_for_completion", waitforcompletion); } - ///Descriptor for ReindexRethrottle https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html + ///Descriptor for ReindexRethrottle https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html public partial class ReindexRethrottleDescriptor : RequestDescriptorBase, IReindexRethrottleRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceReindexRethrottle; @@ -1173,11 +1173,11 @@ protected ReindexRethrottleDescriptor(): base() // values part of the url path TaskId IReindexRethrottleRequest.TaskId => Self.RouteValues.Get("task_id"); // Request parameters - ///The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. + ///The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. public ReindexRethrottleDescriptor RequestsPerSecond(long? requestspersecond) => Qs("requests_per_second", requestspersecond); } - ///Descriptor for RenderSearchTemplate https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates + ///Descriptor for RenderSearchTemplate https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates public partial class RenderSearchTemplateDescriptor : RequestDescriptorBase, IRenderSearchTemplateRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceRenderSearchTemplate; @@ -1194,12 +1194,12 @@ public RenderSearchTemplateDescriptor(Id id): base(r => r.Optional("id", id)) // values part of the url path Id IRenderSearchTemplateRequest.Id => Self.RouteValues.Get("id"); - ///The id of the stored search template + ///The id of the stored search template public RenderSearchTemplateDescriptor Id(Id id) => Assign(id, (a, v) => a.RouteValues.Optional("id", v)); // Request parameters } - ///Descriptor for ExecutePainlessScript https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html + ///Descriptor for ExecutePainlessScript https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html public partial class ExecutePainlessScriptDescriptor : RequestDescriptorBase, IExecutePainlessScriptRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceExecutePainlessScript; @@ -1207,17 +1207,17 @@ public partial class ExecutePainlessScriptDescriptor : RequestDescriptorBaseDescriptor for Scroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll + ///Descriptor for Scroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll public partial class ScrollDescriptor : RequestDescriptorBase, ScrollRequestParameters, IScrollRequest>, IScrollRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceScroll; // values part of the url path // Request parameters - ///Indicates whether hits.total should be rendered as an integer or an object in the rest search response + ///Indicates whether hits.total should be rendered as an integer or an object in the rest search response public ScrollDescriptor TotalHitsAsInteger(bool? totalhitsasinteger = true) => Qs("rest_total_hits_as_int", totalhitsasinteger); } - ///Descriptor for Search https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html + ///Descriptor for Search https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html public partial class SearchDescriptor : RequestDescriptorBase, SearchRequestParameters, ISearchRequest>, ISearchRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceSearch; @@ -1234,79 +1234,79 @@ public SearchDescriptor(Indices index): base(r => r.Optional("index", index)) // values part of the url path Indices ISearchRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices + ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices public SearchDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public SearchDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public SearchDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public SearchDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Indicate if an error should be returned if there is a partial search failure or timeout + ///Indicate if an error should be returned if there is a partial search failure or timeout public SearchDescriptor AllowPartialSearchResults(bool? allowpartialsearchresults = true) => Qs("allow_partial_search_results", allowpartialsearchresults); - ///Specify whether wildcard and prefix queries should be analyzed (default: false) + ///Specify whether wildcard and prefix queries should be analyzed (default: false) public SearchDescriptor AnalyzeWildcard(bool? analyzewildcard = true) => Qs("analyze_wildcard", analyzewildcard); - ///The analyzer to use for the query string + ///The analyzer to use for the query string public SearchDescriptor Analyzer(string analyzer) => Qs("analyzer", analyzer); - ///The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. + ///The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. public SearchDescriptor BatchedReduceSize(long? batchedreducesize) => Qs("batched_reduce_size", batchedreducesize); - ///Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution + ///Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution public SearchDescriptor CcsMinimizeRoundtrips(bool? ccsminimizeroundtrips = true) => Qs("ccs_minimize_roundtrips", ccsminimizeroundtrips); - ///The default operator for query string query (AND or OR) + ///The default operator for query string query (AND or OR) public SearchDescriptor DefaultOperator(DefaultOperator? defaultoperator) => Qs("default_operator", defaultoperator); - ///The field to use as default where no field prefix is given in the query string + ///The field to use as default where no field prefix is given in the query string public SearchDescriptor Df(string df) => Qs("df", df); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public SearchDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Whether specified concrete, expanded or aliased indices should be ignored when throttled + ///Whether specified concrete, expanded or aliased indices should be ignored when throttled public SearchDescriptor IgnoreThrottled(bool? ignorethrottled = true) => Qs("ignore_throttled", ignorethrottled); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public SearchDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + ///Specify whether format-based query failures (such as providing text to a numeric field) should be ignored public SearchDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - ///The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests + ///The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests public SearchDescriptor MaxConcurrentShardRequests(long? maxconcurrentshardrequests) => Qs("max_concurrent_shard_requests", maxconcurrentshardrequests); - ///A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. + ///A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on it's rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. public SearchDescriptor PreFilterShardSize(long? prefiltershardsize) => Qs("pre_filter_shard_size", prefiltershardsize); - ///Specify the node or shard the operation should be performed on (default: random) + ///Specify the node or shard the operation should be performed on (default: random) public SearchDescriptor Preference(string preference) => Qs("preference", preference); - ///Specify if request cache should be used for this request or not, defaults to index level setting + ///Specify if request cache should be used for this request or not, defaults to index level setting public SearchDescriptor RequestCache(bool? requestcache = true) => Qs("request_cache", requestcache); - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public SearchDescriptor Routing(Routing routing) => Qs("routing", routing); - ///Specify how long a consistent view of the index should be maintained for scrolled search + ///Specify how long a consistent view of the index should be maintained for scrolled search public SearchDescriptor Scroll(Time scroll) => Qs("scroll", scroll); - ///Search operation type + ///Search operation type public SearchDescriptor SearchType(SearchType? searchtype) => Qs("search_type", searchtype); - ///Specify whether to return sequence number and primary term of the last modification of each hit + ///Specify whether to return sequence number and primary term of the last modification of each hit public SearchDescriptor SequenceNumberPrimaryTerm(bool? sequencenumberprimaryterm = true) => Qs("seq_no_primary_term", sequencenumberprimaryterm); - ///Specific 'tag' of the request for logging and statistical purposes + ///Specific 'tag' of the request for logging and statistical purposes public SearchDescriptor Stats(params string[] stats) => Qs("stats", stats); - ///Specify which field to use for suggestions + ///Specify which field to use for suggestions public SearchDescriptor SuggestField(Field suggestfield) => Qs("suggest_field", suggestfield); - ///Specify which field to use for suggestions + ///Specify which field to use for suggestions public SearchDescriptor SuggestField(Expression> field) => Qs("suggest_field", (Field)field); - ///Specify suggest mode + ///Specify suggest mode public SearchDescriptor SuggestMode(SuggestMode? suggestmode) => Qs("suggest_mode", suggestmode); - ///How many suggestions to return in response + ///How many suggestions to return in response public SearchDescriptor SuggestSize(long? suggestsize) => Qs("suggest_size", suggestsize); - ///The source text for which the suggestions should be returned + ///The source text for which the suggestions should be returned public SearchDescriptor SuggestText(string suggesttext) => Qs("suggest_text", suggesttext); - ///Indicates whether hits.total should be rendered as an integer or an object in the rest search response + ///Indicates whether hits.total should be rendered as an integer or an object in the rest search response public SearchDescriptor TotalHitsAsInteger(bool? totalhitsasinteger = true) => Qs("rest_total_hits_as_int", totalhitsasinteger); - ///Specify whether aggregation and suggester names should be prefixed by their respective types in the response + ///Specify whether aggregation and suggester names should be prefixed by their respective types in the response public SearchDescriptor TypedKeys(bool? typedkeys = true) => Qs("typed_keys", typedkeys); } - ///Descriptor for SearchShards https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html + ///Descriptor for SearchShards https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html public partial class SearchShardsDescriptor : RequestDescriptorBase, SearchShardsRequestParameters, ISearchShardsRequest>, ISearchShardsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceSearchShards; @@ -1323,35 +1323,35 @@ public SearchShardsDescriptor(Indices index): base(r => r.Optional("index", inde // values part of the url path Indices ISearchShardsRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices + ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices public SearchShardsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public SearchShardsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public SearchShardsDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public SearchShardsDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public SearchShardsDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public SearchShardsDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public SearchShardsDescriptor Local(bool? local = true) => Qs("local", local); - ///Specify the node or shard the operation should be performed on (default: random) + ///Specify the node or shard the operation should be performed on (default: random) public SearchShardsDescriptor Preference(string preference) => Qs("preference", preference); - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public SearchShardsDescriptor Routing(Routing routing) => Qs("routing", routing); } - ///Descriptor for SearchTemplate https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html + ///Descriptor for SearchTemplate https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html public partial class SearchTemplateDescriptor : RequestDescriptorBase, SearchTemplateRequestParameters, ISearchTemplateRequest>, ISearchTemplateRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceSearchTemplate; @@ -1368,49 +1368,49 @@ public SearchTemplateDescriptor(Indices index): base(r => r.Optional("index", in // values part of the url path Indices ISearchTemplateRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices + ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices public SearchTemplateDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public SearchTemplateDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public SearchTemplateDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public SearchTemplateDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution + ///Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution public SearchTemplateDescriptor CcsMinimizeRoundtrips(bool? ccsminimizeroundtrips = true) => Qs("ccs_minimize_roundtrips", ccsminimizeroundtrips); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public SearchTemplateDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Specify whether to return detailed information about score computation as part of a hit + ///Specify whether to return detailed information about score computation as part of a hit public SearchTemplateDescriptor Explain(bool? explain = true) => Qs("explain", explain); - ///Whether specified concrete, expanded or aliased indices should be ignored when throttled + ///Whether specified concrete, expanded or aliased indices should be ignored when throttled public SearchTemplateDescriptor IgnoreThrottled(bool? ignorethrottled = true) => Qs("ignore_throttled", ignorethrottled); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public SearchTemplateDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Specify the node or shard the operation should be performed on (default: random) + ///Specify the node or shard the operation should be performed on (default: random) public SearchTemplateDescriptor Preference(string preference) => Qs("preference", preference); - ///Specify whether to profile the query execution + ///Specify whether to profile the query execution public SearchTemplateDescriptor Profile(bool? profile = true) => Qs("profile", profile); - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public SearchTemplateDescriptor Routing(Routing routing) => Qs("routing", routing); - ///Specify how long a consistent view of the index should be maintained for scrolled search + ///Specify how long a consistent view of the index should be maintained for scrolled search public SearchTemplateDescriptor Scroll(Time scroll) => Qs("scroll", scroll); - ///Search operation type + ///Search operation type public SearchTemplateDescriptor SearchType(SearchType? searchtype) => Qs("search_type", searchtype); - ///Indicates whether hits.total should be rendered as an integer or an object in the rest search response + ///Indicates whether hits.total should be rendered as an integer or an object in the rest search response public SearchTemplateDescriptor TotalHitsAsInteger(bool? totalhitsasinteger = true) => Qs("rest_total_hits_as_int", totalhitsasinteger); - ///Specify whether aggregation and suggester names should be prefixed by their respective types in the response + ///Specify whether aggregation and suggester names should be prefixed by their respective types in the response public SearchTemplateDescriptor TypedKeys(bool? typedkeys = true) => Qs("typed_keys", typedkeys); } - ///Descriptor for TermVectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + ///Descriptor for TermVectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html public partial class TermVectorsDescriptor : RequestDescriptorBase, TermVectorsRequestParameters, ITermVectorsRequest>, ITermVectorsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceTermVectors; @@ -1445,47 +1445,47 @@ public TermVectorsDescriptor(): this(typeof(TDocument)) // values part of the url path IndexName ITermVectorsRequest.Index => Self.RouteValues.Get("index"); Id ITermVectorsRequest.Id => Self.RouteValues.Get("id"); - ///The index in which the document resides. + ///The index in which the document resides. public TermVectorsDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public TermVectorsDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); - ///The id of the document, when not specified a doc param should be supplied. + ///The id of the document, when not specified a doc param should be supplied. public TermVectorsDescriptor Id(Id id) => Assign(id, (a, v) => a.RouteValues.Optional("id", v)); // Request parameters - ///Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. + ///Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. public TermVectorsDescriptor FieldStatistics(bool? fieldstatistics = true) => Qs("field_statistics", fieldstatistics); - ///A comma-separated list of fields to return. + ///A comma-separated list of fields to return. public TermVectorsDescriptor Fields(Fields fields) => Qs("fields", fields); - ///A comma-separated list of fields to return. + ///A comma-separated list of fields to return. public TermVectorsDescriptor Fields(params Expression>[] fields) => Qs("fields", fields?.Select(e => (Field)e)); - ///Specifies if term offsets should be returned. + ///Specifies if term offsets should be returned. public TermVectorsDescriptor Offsets(bool? offsets = true) => Qs("offsets", offsets); - ///Specifies if term payloads should be returned. + ///Specifies if term payloads should be returned. public TermVectorsDescriptor Payloads(bool? payloads = true) => Qs("payloads", payloads); - ///Specifies if term positions should be returned. + ///Specifies if term positions should be returned. public TermVectorsDescriptor Positions(bool? positions = true) => Qs("positions", positions); - ///Specify the node or shard the operation should be performed on (default: random). + ///Specify the node or shard the operation should be performed on (default: random). public TermVectorsDescriptor Preference(string preference) => Qs("preference", preference); - ///Specifies if request is real-time as opposed to near-real-time (default: true). + ///Specifies if request is real-time as opposed to near-real-time (default: true). public TermVectorsDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime); - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public TermVectorsDescriptor Routing(Routing routing) => Qs("routing", routing); - ///Specifies if total term frequency and document frequency should be returned. + ///Specifies if total term frequency and document frequency should be returned. public TermVectorsDescriptor TermStatistics(bool? termstatistics = true) => Qs("term_statistics", termstatistics); - ///Explicit version number for concurrency control + ///Explicit version number for concurrency control public TermVectorsDescriptor Version(long? version) => Qs("version", version); - ///Specific version type + ///Specific version type public TermVectorsDescriptor VersionType(VersionType? versiontype) => Qs("version_type", versiontype); } - ///Descriptor for Update https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html + ///Descriptor for Update https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html public partial class UpdateDescriptor : RequestDescriptorBase, UpdateRequestParameters, IUpdateRequest>, IUpdateRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceUpdate; @@ -1515,39 +1515,39 @@ protected UpdateDescriptor(): base() // values part of the url path IndexName IUpdateRequest.Index => Self.RouteValues.Get("index"); Id IUpdateRequest.Id => Self.RouteValues.Get("id"); - ///The name of the index + ///The name of the index public UpdateDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public UpdateDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters - ///only perform the update operation if the last operation that has changed the document has the specified primary term + ///only perform the update operation if the last operation that has changed the document has the specified primary term public UpdateDescriptor IfPrimaryTerm(long? ifprimaryterm) => Qs("if_primary_term", ifprimaryterm); - ///only perform the update operation if the last operation that has changed the document has the specified sequence number + ///only perform the update operation if the last operation that has changed the document has the specified sequence number public UpdateDescriptor IfSequenceNumber(long? ifsequencenumber) => Qs("if_seq_no", ifsequencenumber); - ///The script language (default: painless) + ///The script language (default: painless) public UpdateDescriptor Lang(string lang) => Qs("lang", lang); - ///If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. + ///If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. public UpdateDescriptor Refresh(Refresh? refresh) => Qs("refresh", refresh); - ///Specify how many times should the operation be retried when a conflict occurs (default: 0) + ///Specify how many times should the operation be retried when a conflict occurs (default: 0) public UpdateDescriptor RetryOnConflict(long? retryonconflict) => Qs("retry_on_conflict", retryonconflict); - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public UpdateDescriptor Routing(Routing routing) => Qs("routing", routing); - ///Whether the _source should be included in the response. + ///Whether the _source should be included in the response. public UpdateDescriptor SourceEnabled(bool? sourceenabled = true) => Qs("_source", sourceenabled); - ///Explicit operation timeout + ///Explicit operation timeout public UpdateDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Sets the number of shard copies that must be active before proceeding with the update operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + ///Sets the number of shard copies that must be active before proceeding with the update operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) public UpdateDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); } - ///Descriptor for UpdateByQuery https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html + ///Descriptor for UpdateByQuery https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html public partial class UpdateByQueryDescriptor : RequestDescriptorBase, UpdateByQueryRequestParameters, IUpdateByQueryRequest>, IUpdateByQueryRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceUpdateByQuery; @@ -1564,95 +1564,95 @@ public UpdateByQueryDescriptor(): this(typeof(TDocument)) // values part of the url path Indices IUpdateByQueryRequest.Index => Self.RouteValues.Get("index"); - ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices + ///A comma-separated list of index names to search; use the special string `_all` or Indices.All to perform the operation on all indices public UpdateByQueryDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public UpdateByQueryDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public UpdateByQueryDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + ///Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) public UpdateByQueryDescriptor AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices); - ///Specify whether wildcard and prefix queries should be analyzed (default: false) + ///Specify whether wildcard and prefix queries should be analyzed (default: false) public UpdateByQueryDescriptor AnalyzeWildcard(bool? analyzewildcard = true) => Qs("analyze_wildcard", analyzewildcard); - ///The analyzer to use for the query string + ///The analyzer to use for the query string public UpdateByQueryDescriptor Analyzer(string analyzer) => Qs("analyzer", analyzer); - ///What to do when the update by query hits version conflicts? + ///What to do when the update by query hits version conflicts? public UpdateByQueryDescriptor Conflicts(Conflicts? conflicts) => Qs("conflicts", conflicts); - ///The default operator for query string query (AND or OR) + ///The default operator for query string query (AND or OR) public UpdateByQueryDescriptor DefaultOperator(DefaultOperator? defaultoperator) => Qs("default_operator", defaultoperator); - ///The field to use as default where no field prefix is given in the query string + ///The field to use as default where no field prefix is given in the query string public UpdateByQueryDescriptor Df(string df) => Qs("df", df); - ///Whether to expand wildcard expression to concrete indices that are open, closed or both. + ///Whether to expand wildcard expression to concrete indices that are open, closed or both. public UpdateByQueryDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards); - ///Starting offset (default: 0) + ///Starting offset (default: 0) public UpdateByQueryDescriptor From(long? from) => Qs("from", from); - ///Whether specified concrete indices should be ignored when unavailable (missing or closed) + ///Whether specified concrete indices should be ignored when unavailable (missing or closed) public UpdateByQueryDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Specify whether format-based query failures (such as providing text to a numeric field) should be ignored + ///Specify whether format-based query failures (such as providing text to a numeric field) should be ignored public UpdateByQueryDescriptor Lenient(bool? lenient = true) => Qs("lenient", lenient); - ///Ingest pipeline to set on index requests made by this action. (default: none) + ///Ingest pipeline to set on index requests made by this action. (default: none) public UpdateByQueryDescriptor Pipeline(string pipeline) => Qs("pipeline", pipeline); - ///Specify the node or shard the operation should be performed on (default: random) + ///Specify the node or shard the operation should be performed on (default: random) public UpdateByQueryDescriptor Preference(string preference) => Qs("preference", preference); - ///Query in the Lucene query string syntax + ///Query in the Lucene query string syntax public UpdateByQueryDescriptor QueryOnQueryString(string queryonquerystring) => Qs("q", queryonquerystring); - ///Should the effected indexes be refreshed? + ///Should the effected indexes be refreshed? public UpdateByQueryDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh); - ///Specify if request cache should be used for this request or not, defaults to index level setting + ///Specify if request cache should be used for this request or not, defaults to index level setting public UpdateByQueryDescriptor RequestCache(bool? requestcache = true) => Qs("request_cache", requestcache); - ///The throttle to set on this request in sub-requests per second. -1 means no throttle. + ///The throttle to set on this request in sub-requests per second. -1 means no throttle. public UpdateByQueryDescriptor RequestsPerSecond(long? requestspersecond) => Qs("requests_per_second", requestspersecond); - /// + /// /// A document is routed to a particular shard in an index using the following formula /// shard_num = hash(_routing) % num_primary_shards /// Elasticsearch will use the document id if not provided. /// For requests that are constructed from/for a document NEST will automatically infer the routing key - /// if that document has a or a routing mapping on for its type exists on - /// + /// if that document has a or a routing mapping on for its type exists on + /// public UpdateByQueryDescriptor Routing(Routing routing) => Qs("routing", routing); - ///Specify how long a consistent view of the index should be maintained for scrolled search + ///Specify how long a consistent view of the index should be maintained for scrolled search public UpdateByQueryDescriptor Scroll(Time scroll) => Qs("scroll", scroll); - ///Size on the scroll request powering the update by query + ///Size on the scroll request powering the update by query public UpdateByQueryDescriptor ScrollSize(long? scrollsize) => Qs("scroll_size", scrollsize); - ///Explicit timeout for each search request. Defaults to no timeout. + ///Explicit timeout for each search request. Defaults to no timeout. public UpdateByQueryDescriptor SearchTimeout(Time searchtimeout) => Qs("search_timeout", searchtimeout); - ///Search operation type + ///Search operation type public UpdateByQueryDescriptor SearchType(SearchType? searchtype) => Qs("search_type", searchtype); - ///Deprecated, please use `max_docs` instead + ///Deprecated, please use `max_docs` instead public UpdateByQueryDescriptor Size(long? size) => Qs("size", size); - ///The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. + ///The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks. public UpdateByQueryDescriptor Slices(long? slices) => Qs("slices", slices); - ///A comma-separated list of : pairs + ///A comma-separated list of : pairs public UpdateByQueryDescriptor Sort(params string[] sort) => Qs("sort", sort); - ///Whether the _source should be included in the response. + ///Whether the _source should be included in the response. public UpdateByQueryDescriptor SourceEnabled(bool? sourceenabled = true) => Qs("_source", sourceenabled); - ///A list of fields to exclude from the returned _source field + ///A list of fields to exclude from the returned _source field public UpdateByQueryDescriptor SourceExcludes(Fields sourceexcludes) => Qs("_source_excludes", sourceexcludes); - ///A list of fields to exclude from the returned _source field + ///A list of fields to exclude from the returned _source field public UpdateByQueryDescriptor SourceExcludes(params Expression>[] fields) => Qs("_source_excludes", fields?.Select(e => (Field)e)); - ///A list of fields to extract and return from the _source field + ///A list of fields to extract and return from the _source field public UpdateByQueryDescriptor SourceIncludes(Fields sourceincludes) => Qs("_source_includes", sourceincludes); - ///A list of fields to extract and return from the _source field + ///A list of fields to extract and return from the _source field public UpdateByQueryDescriptor SourceIncludes(params Expression>[] fields) => Qs("_source_includes", fields?.Select(e => (Field)e)); - ///Specific 'tag' of the request for logging and statistical purposes + ///Specific 'tag' of the request for logging and statistical purposes public UpdateByQueryDescriptor Stats(params string[] stats) => Qs("stats", stats); - ///The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. + ///The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. public UpdateByQueryDescriptor TerminateAfter(long? terminateafter) => Qs("terminate_after", terminateafter); - ///Time each individual bulk request should wait for shards that are unavailable. + ///Time each individual bulk request should wait for shards that are unavailable. public UpdateByQueryDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Specify whether to return document version as part of a hit + ///Specify whether to return document version as part of a hit public UpdateByQueryDescriptor Version(bool? version = true) => Qs("version", version); - ///Should the document increment the version number (internal) on hit or not (reindex) + ///Should the document increment the version number (internal) on hit or not (reindex) public UpdateByQueryDescriptor VersionType(bool? versiontype = true) => Qs("version_type", versiontype); - ///Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) + ///Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) public UpdateByQueryDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards); - ///Should the request should block until the update by query operation is complete. + ///Should the request should block until the update by query operation is complete. public UpdateByQueryDescriptor WaitForCompletion(bool? waitforcompletion = true) => Qs("wait_for_completion", waitforcompletion); } - ///Descriptor for UpdateByQueryRethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html + ///Descriptor for UpdateByQueryRethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html public partial class UpdateByQueryRethrottleDescriptor : RequestDescriptorBase, IUpdateByQueryRethrottleRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceUpdateByQueryRethrottle; @@ -1671,7 +1671,7 @@ protected UpdateByQueryRethrottleDescriptor(): base() // values part of the url path TaskId IUpdateByQueryRethrottleRequest.TaskId => Self.RouteValues.Get("task_id"); // Request parameters - ///The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. + ///The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. public UpdateByQueryRethrottleDescriptor RequestsPerSecond(long? requestspersecond) => Qs("requests_per_second", requestspersecond); } } \ No newline at end of file diff --git a/src/Nest/Descriptors.Nodes.cs b/src/Nest/Descriptors.Nodes.cs index b08b02eade8..d71887b3de1 100644 --- a/src/Nest/Descriptors.Nodes.cs +++ b/src/Nest/Descriptors.Nodes.cs @@ -30,7 +30,7 @@ // ReSharper disable RedundantNameQualifier namespace Nest { - ///Descriptor for HotThreads https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html + ///Descriptor for HotThreads https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html public partial class NodesHotThreadsDescriptor : RequestDescriptorBase, INodesHotThreadsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesHotThreads; @@ -47,24 +47,24 @@ public NodesHotThreadsDescriptor(NodeIds nodeId): base(r => r.Optional("node_id" // values part of the url path NodeIds INodesHotThreadsRequest.NodeId => Self.RouteValues.Get("node_id"); - ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes public NodesHotThreadsDescriptor NodeId(NodeIds nodeId) => Assign(nodeId, (a, v) => a.RouteValues.Optional("node_id", v)); // Request parameters - ///Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true) + ///Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true) public NodesHotThreadsDescriptor IgnoreIdleThreads(bool? ignoreidlethreads = true) => Qs("ignore_idle_threads", ignoreidlethreads); - ///The interval for the second sampling of threads + ///The interval for the second sampling of threads public NodesHotThreadsDescriptor Interval(Time interval) => Qs("interval", interval); - ///Number of samples of thread stacktrace (default: 10) + ///Number of samples of thread stacktrace (default: 10) public NodesHotThreadsDescriptor Snapshots(long? snapshots) => Qs("snapshots", snapshots); - ///The type to sample (default: cpu) + ///The type to sample (default: cpu) public NodesHotThreadsDescriptor ThreadType(ThreadType? threadtype) => Qs("type", threadtype); - ///Specify the number of threads to provide information for (default: 3) + ///Specify the number of threads to provide information for (default: 3) public NodesHotThreadsDescriptor Threads(long? threads) => Qs("threads", threads); - ///Explicit operation timeout + ///Explicit operation timeout public NodesHotThreadsDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for Info https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html + ///Descriptor for Info https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html public partial class NodesInfoDescriptor : RequestDescriptorBase, INodesInfoRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesInfo; @@ -95,18 +95,18 @@ public NodesInfoDescriptor(NodeIds nodeId, Metrics metric): base(r => r.Optional // values part of the url path NodeIds INodesInfoRequest.NodeId => Self.RouteValues.Get("node_id"); Metrics INodesInfoRequest.Metric => Self.RouteValues.Get("metric"); - ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes public NodesInfoDescriptor NodeId(NodeIds nodeId) => Assign(nodeId, (a, v) => a.RouteValues.Optional("node_id", v)); - ///A comma-separated list of metrics you wish returned. Leave empty to return all. + ///A comma-separated list of metrics you wish returned. Leave empty to return all. public NodesInfoDescriptor Metric(Metrics metric) => Assign(metric, (a, v) => a.RouteValues.Optional("metric", v)); // Request parameters - ///Return settings in flat format (default: false) + ///Return settings in flat format (default: false) public NodesInfoDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings); - ///Explicit operation timeout + ///Explicit operation timeout public NodesInfoDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for ReloadSecureSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings + ///Descriptor for ReloadSecureSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings public partial class ReloadSecureSettingsDescriptor : RequestDescriptorBase, IReloadSecureSettingsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesReloadSecureSettings; @@ -123,14 +123,14 @@ public ReloadSecureSettingsDescriptor(NodeIds nodeId): base(r => r.Optional("nod // values part of the url path NodeIds IReloadSecureSettingsRequest.NodeId => Self.RouteValues.Get("node_id"); - ///A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. + ///A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. public ReloadSecureSettingsDescriptor NodeId(NodeIds nodeId) => Assign(nodeId, (a, v) => a.RouteValues.Optional("node_id", v)); // Request parameters - ///Explicit operation timeout + ///Explicit operation timeout public ReloadSecureSettingsDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for Stats https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html + ///Descriptor for Stats https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html public partial class NodesStatsDescriptor : RequestDescriptorBase, INodesStatsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesStats; @@ -177,41 +177,41 @@ public NodesStatsDescriptor(NodeIds nodeId, Metrics metric, IndexMetrics indexMe NodeIds INodesStatsRequest.NodeId => Self.RouteValues.Get("node_id"); Metrics INodesStatsRequest.Metric => Self.RouteValues.Get("metric"); IndexMetrics INodesStatsRequest.IndexMetric => Self.RouteValues.Get("index_metric"); - ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes public NodesStatsDescriptor NodeId(NodeIds nodeId) => Assign(nodeId, (a, v) => a.RouteValues.Optional("node_id", v)); - ///Limit the information returned to the specified metrics + ///Limit the information returned to the specified metrics public NodesStatsDescriptor Metric(Metrics metric) => Assign(metric, (a, v) => a.RouteValues.Optional("metric", v)); - ///Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. + ///Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. public NodesStatsDescriptor IndexMetric(IndexMetrics indexMetric) => Assign(indexMetric, (a, v) => a.RouteValues.Optional("index_metric", v)); // Request parameters - ///A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) + ///A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) public NodesStatsDescriptor CompletionFields(Fields completionfields) => Qs("completion_fields", completionfields); - ///A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) + ///A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) public NodesStatsDescriptor CompletionFields(params Expression>[] fields) where T : class => Qs("completion_fields", fields?.Select(e => (Field)e)); - ///A comma-separated list of fields for `fielddata` index metric (supports wildcards) + ///A comma-separated list of fields for `fielddata` index metric (supports wildcards) public NodesStatsDescriptor FielddataFields(Fields fielddatafields) => Qs("fielddata_fields", fielddatafields); - ///A comma-separated list of fields for `fielddata` index metric (supports wildcards) + ///A comma-separated list of fields for `fielddata` index metric (supports wildcards) public NodesStatsDescriptor FielddataFields(params Expression>[] fields) where T : class => Qs("fielddata_fields", fields?.Select(e => (Field)e)); - ///A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) + ///A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) public NodesStatsDescriptor Fields(Fields fields) => Qs("fields", fields); - ///A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) + ///A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) public NodesStatsDescriptor Fields(params Expression>[] fields) where T : class => Qs("fields", fields?.Select(e => (Field)e)); - ///A comma-separated list of search groups for `search` index metric + ///A comma-separated list of search groups for `search` index metric public NodesStatsDescriptor Groups(bool? groups = true) => Qs("groups", groups); - ///Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) + ///Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) public NodesStatsDescriptor IncludeSegmentFileSizes(bool? includesegmentfilesizes = true) => Qs("include_segment_file_sizes", includesegmentfilesizes); - ///Return indices stats aggregated at index, node or shard level + ///Return indices stats aggregated at index, node or shard level public NodesStatsDescriptor Level(Level? level) => Qs("level", level); - ///Explicit operation timeout + ///Explicit operation timeout public NodesStatsDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///A comma-separated list of document types for the `indexing` index metric + ///A comma-separated list of document types for the `indexing` index metric public NodesStatsDescriptor Types(params string[] types) => Qs("types", types); } - ///Descriptor for Usage https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html + ///Descriptor for Usage https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html public partial class NodesUsageDescriptor : RequestDescriptorBase, INodesUsageRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesUsage; @@ -242,12 +242,12 @@ public NodesUsageDescriptor(NodeIds nodeId, Metrics metric): base(r => r.Optiona // values part of the url path NodeIds INodesUsageRequest.NodeId => Self.RouteValues.Get("node_id"); Metrics INodesUsageRequest.Metric => Self.RouteValues.Get("metric"); - ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes public NodesUsageDescriptor NodeId(NodeIds nodeId) => Assign(nodeId, (a, v) => a.RouteValues.Optional("node_id", v)); - ///Limit the information returned to the specified metrics + ///Limit the information returned to the specified metrics public NodesUsageDescriptor Metric(Metrics metric) => Assign(metric, (a, v) => a.RouteValues.Optional("metric", v)); // Request parameters - ///Explicit operation timeout + ///Explicit operation timeout public NodesUsageDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } } \ No newline at end of file diff --git a/src/Nest/Descriptors.Rollup.cs b/src/Nest/Descriptors.Rollup.cs index def91fd36fa..fa7db1d548e 100644 --- a/src/Nest/Descriptors.Rollup.cs +++ b/src/Nest/Descriptors.Rollup.cs @@ -30,7 +30,7 @@ // ReSharper disable RedundantNameQualifier namespace Nest { - ///Descriptor for DeleteJob + ///Descriptor for DeleteJob public partial class DeleteRollupJobDescriptor : RequestDescriptorBase, IDeleteRollupJobRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.RollupDeleteJob; @@ -51,7 +51,7 @@ protected DeleteRollupJobDescriptor(): base() // Request parameters } - ///Descriptor for GetJob + ///Descriptor for GetJob public partial class GetRollupJobDescriptor : RequestDescriptorBase, IGetRollupJobRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.RollupGetJob; @@ -68,12 +68,12 @@ public GetRollupJobDescriptor(): base() // values part of the url path Id IGetRollupJobRequest.Id => Self.RouteValues.Get("id"); - ///The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs + ///The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs public GetRollupJobDescriptor Id(Id id) => Assign(id, (a, v) => a.RouteValues.Optional("id", v)); // Request parameters } - ///Descriptor for GetCapabilities + ///Descriptor for GetCapabilities public partial class GetRollupCapabilitiesDescriptor : RequestDescriptorBase, IGetRollupCapabilitiesRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.RollupGetCapabilities; @@ -90,12 +90,12 @@ public GetRollupCapabilitiesDescriptor(): base() // values part of the url path Id IGetRollupCapabilitiesRequest.Id => Self.RouteValues.Get("id"); - ///The ID of the index to check rollup capabilities on, or left blank for all jobs + ///The ID of the index to check rollup capabilities on, or left blank for all jobs public GetRollupCapabilitiesDescriptor Id(Id id) => Assign(id, (a, v) => a.RouteValues.Optional("id", v)); // Request parameters } - ///Descriptor for GetIndexCapabilities + ///Descriptor for GetIndexCapabilities public partial class GetRollupIndexCapabilitiesDescriptor : RequestDescriptorBase, IGetRollupIndexCapabilitiesRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.RollupGetIndexCapabilities; @@ -113,15 +113,15 @@ protected GetRollupIndexCapabilitiesDescriptor(): base() // values part of the url path IndexName IGetRollupIndexCapabilitiesRequest.Index => Self.RouteValues.Get("index"); - ///The rollup index or index pattern to obtain rollup capabilities from. + ///The rollup index or index pattern to obtain rollup capabilities from. public GetRollupIndexCapabilitiesDescriptor Index(IndexName index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public GetRollupIndexCapabilitiesDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (IndexName)v)); // Request parameters } - ///Descriptor for CreateJob + ///Descriptor for CreateJob public partial class CreateRollupJobDescriptor : RequestDescriptorBase, CreateRollupJobRequestParameters, ICreateRollupJobRequest>, ICreateRollupJobRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.RollupCreateJob; @@ -142,7 +142,7 @@ protected CreateRollupJobDescriptor(): base() // Request parameters } - ///Descriptor for Search + ///Descriptor for Search public partial class RollupSearchDescriptor : RequestDescriptorBase, RollupSearchRequestParameters, IRollupSearchRequest>, IRollupSearchRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.RollupSearch; @@ -159,21 +159,21 @@ public RollupSearchDescriptor(): this(typeof(TDocument)) // values part of the url path Indices IRollupSearchRequest.Index => Self.RouteValues.Get("index"); - ///The indices or index-pattern(s) (containing rollup or regular data) that should be searched + ///The indices or index-pattern(s) (containing rollup or regular data) that should be searched public RollupSearchDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Required("index", v)); - ///a shortcut into calling Index(typeof(TOther)) + ///a shortcut into calling Index(typeof(TOther)) public RollupSearchDescriptor Index() where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Required("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) + ///A shortcut into calling Index(Indices.All) public RollupSearchDescriptor AllIndices() => Index(Indices.All); // Request parameters - ///Indicates whether hits.total should be rendered as an integer or an object in the rest search response + ///Indicates whether hits.total should be rendered as an integer or an object in the rest search response public RollupSearchDescriptor TotalHitsAsInteger(bool? totalhitsasinteger = true) => Qs("rest_total_hits_as_int", totalhitsasinteger); - ///Specify whether aggregation and suggester names should be prefixed by their respective types in the response + ///Specify whether aggregation and suggester names should be prefixed by their respective types in the response public RollupSearchDescriptor TypedKeys(bool? typedkeys = true) => Qs("typed_keys", typedkeys); } - ///Descriptor for StartJob + ///Descriptor for StartJob public partial class StartRollupJobDescriptor : RequestDescriptorBase, IStartRollupJobRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.RollupStartJob; @@ -194,7 +194,7 @@ protected StartRollupJobDescriptor(): base() // Request parameters } - ///Descriptor for StopJob + ///Descriptor for StopJob public partial class StopRollupJobDescriptor : RequestDescriptorBase, IStopRollupJobRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.RollupStopJob; @@ -213,9 +213,9 @@ protected StopRollupJobDescriptor(): base() // values part of the url path Id IStopRollupJobRequest.Id => Self.RouteValues.Get("id"); // Request parameters - ///Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s. + ///Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s. public StopRollupJobDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false. + ///True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false. public StopRollupJobDescriptor WaitForCompletion(bool? waitforcompletion = true) => Qs("wait_for_completion", waitforcompletion); } } \ No newline at end of file diff --git a/src/Nest/Descriptors.Security.cs b/src/Nest/Descriptors.Security.cs index 492b069a852..8be6cf0354e 100644 --- a/src/Nest/Descriptors.Security.cs +++ b/src/Nest/Descriptors.Security.cs @@ -30,7 +30,7 @@ // ReSharper disable RedundantNameQualifier namespace Nest { - ///Descriptor for Authenticate https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html + ///Descriptor for Authenticate https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html public partial class AuthenticateDescriptor : RequestDescriptorBase, IAuthenticateRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityAuthenticate; @@ -38,7 +38,7 @@ public partial class AuthenticateDescriptor : RequestDescriptorBaseDescriptor for ChangePassword https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html + ///Descriptor for ChangePassword https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html public partial class ChangePasswordDescriptor : RequestDescriptorBase, IChangePasswordRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityChangePassword; @@ -55,14 +55,14 @@ public ChangePasswordDescriptor(): base() // values part of the url path Name IChangePasswordRequest.Username => Self.RouteValues.Get("username"); - ///The username of the user to change the password for + ///The username of the user to change the password for public ChangePasswordDescriptor Username(Name username) => Assign(username, (a, v) => a.RouteValues.Optional("username", v)); // Request parameters - ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. public ChangePasswordDescriptor Refresh(Refresh? refresh) => Qs("refresh", refresh); } - ///Descriptor for ClearCachedRealms https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html + ///Descriptor for ClearCachedRealms https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html public partial class ClearCachedRealmsDescriptor : RequestDescriptorBase, IClearCachedRealmsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityClearCachedRealms; @@ -81,11 +81,11 @@ protected ClearCachedRealmsDescriptor(): base() // values part of the url path Names IClearCachedRealmsRequest.Realms => Self.RouteValues.Get("realms"); // Request parameters - ///Comma-separated list of usernames to clear from the cache + ///Comma-separated list of usernames to clear from the cache public ClearCachedRealmsDescriptor Usernames(params string[] usernames) => Qs("usernames", usernames); } - ///Descriptor for ClearCachedRoles https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html + ///Descriptor for ClearCachedRoles https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html public partial class ClearCachedRolesDescriptor : RequestDescriptorBase, IClearCachedRolesRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityClearCachedRoles; @@ -106,17 +106,17 @@ protected ClearCachedRolesDescriptor(): base() // Request parameters } - ///Descriptor for CreateApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html + ///Descriptor for CreateApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html public partial class CreateApiKeyDescriptor : RequestDescriptorBase, ICreateApiKeyRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityCreateApiKey; // values part of the url path // Request parameters - ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. public CreateApiKeyDescriptor Refresh(Refresh? refresh) => Qs("refresh", refresh); } - ///Descriptor for DeletePrivileges TODO + ///Descriptor for DeletePrivileges TODO public partial class DeletePrivilegesDescriptor : RequestDescriptorBase, IDeletePrivilegesRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityDeletePrivileges; @@ -137,11 +137,11 @@ protected DeletePrivilegesDescriptor(): base() Name IDeletePrivilegesRequest.Application => Self.RouteValues.Get("application"); Name IDeletePrivilegesRequest.Name => Self.RouteValues.Get("name"); // Request parameters - ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. public DeletePrivilegesDescriptor Refresh(Refresh? refresh) => Qs("refresh", refresh); } - ///Descriptor for DeleteRole https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html + ///Descriptor for DeleteRole https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html public partial class DeleteRoleDescriptor : RequestDescriptorBase, IDeleteRoleRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityDeleteRole; @@ -160,11 +160,11 @@ protected DeleteRoleDescriptor(): base() // values part of the url path Name IDeleteRoleRequest.Name => Self.RouteValues.Get("name"); // Request parameters - ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. public DeleteRoleDescriptor Refresh(Refresh? refresh) => Qs("refresh", refresh); } - ///Descriptor for DeleteRoleMapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html + ///Descriptor for DeleteRoleMapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html public partial class DeleteRoleMappingDescriptor : RequestDescriptorBase, IDeleteRoleMappingRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityDeleteRoleMapping; @@ -183,11 +183,11 @@ protected DeleteRoleMappingDescriptor(): base() // values part of the url path Name IDeleteRoleMappingRequest.Name => Self.RouteValues.Get("name"); // Request parameters - ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. public DeleteRoleMappingDescriptor Refresh(Refresh? refresh) => Qs("refresh", refresh); } - ///Descriptor for DeleteUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html + ///Descriptor for DeleteUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html public partial class DeleteUserDescriptor : RequestDescriptorBase, IDeleteUserRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityDeleteUser; @@ -206,11 +206,11 @@ protected DeleteUserDescriptor(): base() // values part of the url path Name IDeleteUserRequest.Username => Self.RouteValues.Get("username"); // Request parameters - ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. public DeleteUserDescriptor Refresh(Refresh? refresh) => Qs("refresh", refresh); } - ///Descriptor for DisableUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html + ///Descriptor for DisableUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html public partial class DisableUserDescriptor : RequestDescriptorBase, IDisableUserRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityDisableUser; @@ -229,11 +229,11 @@ protected DisableUserDescriptor(): base() // values part of the url path Name IDisableUserRequest.Username => Self.RouteValues.Get("username"); // Request parameters - ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. public DisableUserDescriptor Refresh(Refresh? refresh) => Qs("refresh", refresh); } - ///Descriptor for EnableUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html + ///Descriptor for EnableUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html public partial class EnableUserDescriptor : RequestDescriptorBase, IEnableUserRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityEnableUser; @@ -252,27 +252,27 @@ protected EnableUserDescriptor(): base() // values part of the url path Name IEnableUserRequest.Username => Self.RouteValues.Get("username"); // Request parameters - ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. public EnableUserDescriptor Refresh(Refresh? refresh) => Qs("refresh", refresh); } - ///Descriptor for GetApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html + ///Descriptor for GetApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html public partial class GetApiKeyDescriptor : RequestDescriptorBase, IGetApiKeyRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityGetApiKey; // values part of the url path // Request parameters - ///API key id of the API key to be retrieved + ///API key id of the API key to be retrieved public GetApiKeyDescriptor Id(string id) => Qs("id", id); - ///API key name of the API key to be retrieved + ///API key name of the API key to be retrieved public GetApiKeyDescriptor Name(string name) => Qs("name", name); - ///realm name of the user who created this API key to be retrieved + ///realm name of the user who created this API key to be retrieved public GetApiKeyDescriptor RealmName(string realmname) => Qs("realm_name", realmname); - ///user name of the user who created this API key to be retrieved + ///user name of the user who created this API key to be retrieved public GetApiKeyDescriptor Username(string username) => Qs("username", username); } - ///Descriptor for GetPrivileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html + ///Descriptor for GetPrivileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html public partial class GetPrivilegesDescriptor : RequestDescriptorBase, IGetPrivilegesRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityGetPrivileges; @@ -297,14 +297,14 @@ public GetPrivilegesDescriptor(Name application, Name name): base(r => r.Optiona // values part of the url path Name IGetPrivilegesRequest.Application => Self.RouteValues.Get("application"); Name IGetPrivilegesRequest.Name => Self.RouteValues.Get("name"); - ///Application name + ///Application name public GetPrivilegesDescriptor Application(Name application) => Assign(application, (a, v) => a.RouteValues.Optional("application", v)); - ///Privilege name + ///Privilege name public GetPrivilegesDescriptor Name(Name name) => Assign(name, (a, v) => a.RouteValues.Optional("name", v)); // Request parameters } - ///Descriptor for GetRole https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html + ///Descriptor for GetRole https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html public partial class GetRoleDescriptor : RequestDescriptorBase, IGetRoleRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityGetRole; @@ -321,12 +321,12 @@ public GetRoleDescriptor(): base() // values part of the url path Name IGetRoleRequest.Name => Self.RouteValues.Get("name"); - ///Role name + ///Role name public GetRoleDescriptor Name(Name name) => Assign(name, (a, v) => a.RouteValues.Optional("name", v)); // Request parameters } - ///Descriptor for GetRoleMapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html + ///Descriptor for GetRoleMapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html public partial class GetRoleMappingDescriptor : RequestDescriptorBase, IGetRoleMappingRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityGetRoleMapping; @@ -343,12 +343,12 @@ public GetRoleMappingDescriptor(): base() // values part of the url path Name IGetRoleMappingRequest.Name => Self.RouteValues.Get("name"); - ///Role-Mapping name + ///Role-Mapping name public GetRoleMappingDescriptor Name(Name name) => Assign(name, (a, v) => a.RouteValues.Optional("name", v)); // Request parameters } - ///Descriptor for GetUserAccessToken https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html + ///Descriptor for GetUserAccessToken https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html public partial class GetUserAccessTokenDescriptor : RequestDescriptorBase, IGetUserAccessTokenRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityGetUserAccessToken; @@ -356,7 +356,7 @@ public partial class GetUserAccessTokenDescriptor : RequestDescriptorBaseDescriptor for GetUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html + ///Descriptor for GetUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html public partial class GetUserDescriptor : RequestDescriptorBase, IGetUserRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityGetUser; @@ -373,12 +373,12 @@ public GetUserDescriptor(): base() // values part of the url path Names IGetUserRequest.Username => Self.RouteValues.Get("username"); - ///A comma-separated list of usernames + ///A comma-separated list of usernames public GetUserDescriptor Username(Names username) => Assign(username, (a, v) => a.RouteValues.Optional("username", v)); // Request parameters } - ///Descriptor for GetUserPrivileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html + ///Descriptor for GetUserPrivileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html public partial class GetUserPrivilegesDescriptor : RequestDescriptorBase, IGetUserPrivilegesRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityGetUserPrivileges; @@ -386,7 +386,7 @@ public partial class GetUserPrivilegesDescriptor : RequestDescriptorBaseDescriptor for HasPrivileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html + ///Descriptor for HasPrivileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html public partial class HasPrivilegesDescriptor : RequestDescriptorBase, IHasPrivilegesRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityHasPrivileges; @@ -403,12 +403,12 @@ public HasPrivilegesDescriptor(Name user): base(r => r.Optional("user", user)) // values part of the url path Name IHasPrivilegesRequest.User => Self.RouteValues.Get("user"); - ///Username + ///Username public HasPrivilegesDescriptor User(Name user) => Assign(user, (a, v) => a.RouteValues.Optional("user", v)); // Request parameters } - ///Descriptor for InvalidateApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html + ///Descriptor for InvalidateApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html public partial class InvalidateApiKeyDescriptor : RequestDescriptorBase, IInvalidateApiKeyRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityInvalidateApiKey; @@ -416,7 +416,7 @@ public partial class InvalidateApiKeyDescriptor : RequestDescriptorBaseDescriptor for InvalidateUserAccessToken https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html + ///Descriptor for InvalidateUserAccessToken https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html public partial class InvalidateUserAccessTokenDescriptor : RequestDescriptorBase, IInvalidateUserAccessTokenRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityInvalidateUserAccessToken; @@ -424,17 +424,17 @@ public partial class InvalidateUserAccessTokenDescriptor : RequestDescriptorBase // Request parameters } - ///Descriptor for PutPrivileges TODO + ///Descriptor for PutPrivileges TODO public partial class PutPrivilegesDescriptor : RequestDescriptorBase, IPutPrivilegesRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityPutPrivileges; // values part of the url path // Request parameters - ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. public PutPrivilegesDescriptor Refresh(Refresh? refresh) => Qs("refresh", refresh); } - ///Descriptor for PutRole https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html + ///Descriptor for PutRole https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html public partial class PutRoleDescriptor : RequestDescriptorBase, IPutRoleRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityPutRole; @@ -453,11 +453,11 @@ protected PutRoleDescriptor(): base() // values part of the url path Name IPutRoleRequest.Name => Self.RouteValues.Get("name"); // Request parameters - ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. public PutRoleDescriptor Refresh(Refresh? refresh) => Qs("refresh", refresh); } - ///Descriptor for PutRoleMapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html + ///Descriptor for PutRoleMapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html public partial class PutRoleMappingDescriptor : RequestDescriptorBase, IPutRoleMappingRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityPutRoleMapping; @@ -476,11 +476,11 @@ protected PutRoleMappingDescriptor(): base() // values part of the url path Name IPutRoleMappingRequest.Name => Self.RouteValues.Get("name"); // Request parameters - ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. public PutRoleMappingDescriptor Refresh(Refresh? refresh) => Qs("refresh", refresh); } - ///Descriptor for PutUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html + ///Descriptor for PutUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html public partial class PutUserDescriptor : RequestDescriptorBase, IPutUserRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityPutUser; @@ -499,11 +499,11 @@ protected PutUserDescriptor(): base() // values part of the url path Name IPutUserRequest.Username => Self.RouteValues.Get("username"); // Request parameters - ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + ///If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. public PutUserDescriptor Refresh(Refresh? refresh) => Qs("refresh", refresh); } - ///Descriptor for GetCertificates https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html + ///Descriptor for GetCertificates https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html public partial class GetCertificatesDescriptor : RequestDescriptorBase, IGetCertificatesRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SecurityGetCertificates; diff --git a/src/Nest/Descriptors.Snapshot.cs b/src/Nest/Descriptors.Snapshot.cs index 0c6717c0b64..1bed586968c 100644 --- a/src/Nest/Descriptors.Snapshot.cs +++ b/src/Nest/Descriptors.Snapshot.cs @@ -30,7 +30,7 @@ // ReSharper disable RedundantNameQualifier namespace Nest { - ///Descriptor for Snapshot https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Descriptor for Snapshot https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public partial class SnapshotDescriptor : RequestDescriptorBase, ISnapshotRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotSnapshot; @@ -51,13 +51,13 @@ protected SnapshotDescriptor(): base() Name ISnapshotRequest.RepositoryName => Self.RouteValues.Get("repository"); Name ISnapshotRequest.Snapshot => Self.RouteValues.Get("snapshot"); // Request parameters - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public SnapshotDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Should this request wait until the operation has completed before returning + ///Should this request wait until the operation has completed before returning public SnapshotDescriptor WaitForCompletion(bool? waitforcompletion = true) => Qs("wait_for_completion", waitforcompletion); } - ///Descriptor for CreateRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Descriptor for CreateRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public partial class CreateRepositoryDescriptor : RequestDescriptorBase, ICreateRepositoryRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotCreateRepository; @@ -76,15 +76,15 @@ protected CreateRepositoryDescriptor(): base() // values part of the url path Name ICreateRepositoryRequest.RepositoryName => Self.RouteValues.Get("repository"); // Request parameters - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public CreateRepositoryDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public CreateRepositoryDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Whether to verify the repository after creation + ///Whether to verify the repository after creation public CreateRepositoryDescriptor Verify(bool? verify = true) => Qs("verify", verify); } - ///Descriptor for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Descriptor for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public partial class DeleteSnapshotDescriptor : RequestDescriptorBase, IDeleteSnapshotRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotDelete; @@ -105,11 +105,11 @@ protected DeleteSnapshotDescriptor(): base() Name IDeleteSnapshotRequest.RepositoryName => Self.RouteValues.Get("repository"); Name IDeleteSnapshotRequest.Snapshot => Self.RouteValues.Get("snapshot"); // Request parameters - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public DeleteSnapshotDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); } - ///Descriptor for DeleteRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Descriptor for DeleteRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public partial class DeleteRepositoryDescriptor : RequestDescriptorBase, IDeleteRepositoryRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotDeleteRepository; @@ -128,13 +128,13 @@ protected DeleteRepositoryDescriptor(): base() // values part of the url path Names IDeleteRepositoryRequest.RepositoryName => Self.RouteValues.Get("repository"); // Request parameters - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public DeleteRepositoryDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public DeleteRepositoryDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } - ///Descriptor for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Descriptor for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public partial class GetSnapshotDescriptor : RequestDescriptorBase, IGetSnapshotRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotGet; @@ -155,15 +155,15 @@ protected GetSnapshotDescriptor(): base() Name IGetSnapshotRequest.RepositoryName => Self.RouteValues.Get("repository"); Names IGetSnapshotRequest.Snapshot => Self.RouteValues.Get("snapshot"); // Request parameters - ///Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown + ///Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown public GetSnapshotDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public GetSnapshotDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Whether to show verbose snapshot info or only show the basic info found in the repository index blob + ///Whether to show verbose snapshot info or only show the basic info found in the repository index blob public GetSnapshotDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose); } - ///Descriptor for GetRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Descriptor for GetRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public partial class GetRepositoryDescriptor : RequestDescriptorBase, IGetRepositoryRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotGetRepository; @@ -180,16 +180,16 @@ public GetRepositoryDescriptor(Names repository): base(r => r.Optional("reposito // values part of the url path Names IGetRepositoryRequest.RepositoryName => Self.RouteValues.Get("repository"); - ///A comma-separated list of repository names + ///A comma-separated list of repository names public GetRepositoryDescriptor RepositoryName(Names repository) => Assign(repository, (a, v) => a.RouteValues.Optional("repository", v)); // Request parameters - ///Return local information, do not retrieve the state from master node (default: false) + ///Return local information, do not retrieve the state from master node (default: false) public GetRepositoryDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public GetRepositoryDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); } - ///Descriptor for Restore https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Descriptor for Restore https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public partial class RestoreDescriptor : RequestDescriptorBase, IRestoreRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotRestore; @@ -210,13 +210,13 @@ protected RestoreDescriptor(): base() Name IRestoreRequest.RepositoryName => Self.RouteValues.Get("repository"); Name IRestoreRequest.Snapshot => Self.RouteValues.Get("snapshot"); // Request parameters - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public RestoreDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Should this request wait until the operation has completed before returning + ///Should this request wait until the operation has completed before returning public RestoreDescriptor WaitForCompletion(bool? waitforcompletion = true) => Qs("wait_for_completion", waitforcompletion); } - ///Descriptor for Status https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Descriptor for Status https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public partial class SnapshotStatusDescriptor : RequestDescriptorBase, ISnapshotStatusRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotStatus; @@ -241,18 +241,18 @@ public SnapshotStatusDescriptor(Name repository, Names snapshot): base(r => r.Op // values part of the url path Name ISnapshotStatusRequest.RepositoryName => Self.RouteValues.Get("repository"); Names ISnapshotStatusRequest.Snapshot => Self.RouteValues.Get("snapshot"); - ///A repository name + ///A repository name public SnapshotStatusDescriptor RepositoryName(Name repository) => Assign(repository, (a, v) => a.RouteValues.Optional("repository", v)); - ///A comma-separated list of snapshot names + ///A comma-separated list of snapshot names public SnapshotStatusDescriptor Snapshot(Names snapshot) => Assign(snapshot, (a, v) => a.RouteValues.Optional("snapshot", v)); // Request parameters - ///Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown + ///Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown public SnapshotStatusDescriptor IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable); - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public SnapshotStatusDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); } - ///Descriptor for VerifyRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Descriptor for VerifyRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public partial class VerifyRepositoryDescriptor : RequestDescriptorBase, IVerifyRepositoryRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotVerifyRepository; @@ -271,9 +271,9 @@ protected VerifyRepositoryDescriptor(): base() // values part of the url path Name IVerifyRepositoryRequest.RepositoryName => Self.RouteValues.Get("repository"); // Request parameters - ///Explicit operation timeout for connection to master node + ///Explicit operation timeout for connection to master node public VerifyRepositoryDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout + ///Explicit operation timeout public VerifyRepositoryDescriptor Timeout(Time timeout) => Qs("timeout", timeout); } } \ No newline at end of file diff --git a/src/Nest/Descriptors.Tasks.cs b/src/Nest/Descriptors.Tasks.cs index 0fbc6ba8185..96507a33911 100644 --- a/src/Nest/Descriptors.Tasks.cs +++ b/src/Nest/Descriptors.Tasks.cs @@ -30,7 +30,7 @@ // ReSharper disable RedundantNameQualifier namespace Nest { - ///Descriptor for Cancel https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + ///Descriptor for Cancel https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html public partial class CancelTasksDescriptor : RequestDescriptorBase, ICancelTasksRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.TasksCancel; @@ -47,18 +47,18 @@ public CancelTasksDescriptor(TaskId taskId): base(r => r.Optional("task_id", tas // values part of the url path TaskId ICancelTasksRequest.TaskId => Self.RouteValues.Get("task_id"); - ///Cancel the task with specified task id (node_id:task_number) + ///Cancel the task with specified task id (node_id:task_number) public CancelTasksDescriptor TaskId(TaskId taskId) => Assign(taskId, (a, v) => a.RouteValues.Optional("task_id", v)); // Request parameters - ///A comma-separated list of actions that should be cancelled. Leave empty to cancel all. + ///A comma-separated list of actions that should be cancelled. Leave empty to cancel all. public CancelTasksDescriptor Actions(params string[] actions) => Qs("actions", actions); - ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes public CancelTasksDescriptor Nodes(params string[] nodes) => Qs("nodes", nodes); - ///Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all. + ///Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all. public CancelTasksDescriptor ParentTaskId(string parenttaskid) => Qs("parent_task_id", parenttaskid); } - ///Descriptor for GetTask https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + ///Descriptor for GetTask https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html public partial class GetTaskDescriptor : RequestDescriptorBase, IGetTaskRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.TasksGetTask; @@ -77,31 +77,31 @@ protected GetTaskDescriptor(): base() // values part of the url path TaskId IGetTaskRequest.TaskId => Self.RouteValues.Get("task_id"); // Request parameters - ///Explicit operation timeout + ///Explicit operation timeout public GetTaskDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Wait for the matching tasks to complete (default: false) + ///Wait for the matching tasks to complete (default: false) public GetTaskDescriptor WaitForCompletion(bool? waitforcompletion = true) => Qs("wait_for_completion", waitforcompletion); } - ///Descriptor for List https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + ///Descriptor for List https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html public partial class ListTasksDescriptor : RequestDescriptorBase, IListTasksRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.TasksList; // values part of the url path // Request parameters - ///A comma-separated list of actions that should be returned. Leave empty to return all. + ///A comma-separated list of actions that should be returned. Leave empty to return all. public ListTasksDescriptor Actions(params string[] actions) => Qs("actions", actions); - ///Return detailed task information (default: false) + ///Return detailed task information (default: false) public ListTasksDescriptor Detailed(bool? detailed = true) => Qs("detailed", detailed); - ///Group tasks by nodes or parent/child relationships + ///Group tasks by nodes or parent/child relationships public ListTasksDescriptor GroupBy(GroupBy? groupby) => Qs("group_by", groupby); - ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + ///A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes public ListTasksDescriptor Nodes(params string[] nodes) => Qs("nodes", nodes); - ///Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all. + ///Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all. public ListTasksDescriptor ParentTaskId(string parenttaskid) => Qs("parent_task_id", parenttaskid); - ///Explicit operation timeout + ///Explicit operation timeout public ListTasksDescriptor Timeout(Time timeout) => Qs("timeout", timeout); - ///Wait for the matching tasks to complete (default: false) + ///Wait for the matching tasks to complete (default: false) public ListTasksDescriptor WaitForCompletion(bool? waitforcompletion = true) => Qs("wait_for_completion", waitforcompletion); } } \ No newline at end of file diff --git a/src/Nest/Descriptors.Watcher.cs b/src/Nest/Descriptors.Watcher.cs index dd257805c91..f9a671e8cca 100644 --- a/src/Nest/Descriptors.Watcher.cs +++ b/src/Nest/Descriptors.Watcher.cs @@ -30,7 +30,7 @@ // ReSharper disable RedundantNameQualifier namespace Nest { - ///Descriptor for Acknowledge http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html + ///Descriptor for Acknowledge http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html public partial class AcknowledgeWatchDescriptor : RequestDescriptorBase, IAcknowledgeWatchRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.WatcherAcknowledge; @@ -56,12 +56,12 @@ protected AcknowledgeWatchDescriptor(): base() // values part of the url path Id IAcknowledgeWatchRequest.WatchId => Self.RouteValues.Get("watch_id"); Ids IAcknowledgeWatchRequest.ActionId => Self.RouteValues.Get("action_id"); - ///A comma-separated list of the action ids to be acked + ///A comma-separated list of the action ids to be acked public AcknowledgeWatchDescriptor ActionId(Ids actionId) => Assign(actionId, (a, v) => a.RouteValues.Optional("action_id", v)); // Request parameters } - ///Descriptor for Activate https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html + ///Descriptor for Activate https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html public partial class ActivateWatchDescriptor : RequestDescriptorBase, IActivateWatchRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.WatcherActivate; @@ -82,7 +82,7 @@ protected ActivateWatchDescriptor(): base() // Request parameters } - ///Descriptor for Deactivate https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html + ///Descriptor for Deactivate https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html public partial class DeactivateWatchDescriptor : RequestDescriptorBase, IDeactivateWatchRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.WatcherDeactivate; @@ -103,7 +103,7 @@ protected DeactivateWatchDescriptor(): base() // Request parameters } - ///Descriptor for Delete http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html + ///Descriptor for Delete http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html public partial class DeleteWatchDescriptor : RequestDescriptorBase, IDeleteWatchRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.WatcherDelete; @@ -124,7 +124,7 @@ protected DeleteWatchDescriptor(): base() // Request parameters } - ///Descriptor for Execute http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html + ///Descriptor for Execute http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html public partial class ExecuteWatchDescriptor : RequestDescriptorBase, IExecuteWatchRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.WatcherExecute; @@ -141,14 +141,14 @@ public ExecuteWatchDescriptor(): base() // values part of the url path Id IExecuteWatchRequest.Id => Self.RouteValues.Get("id"); - ///Watch ID + ///Watch ID public ExecuteWatchDescriptor Id(Id id) => Assign(id, (a, v) => a.RouteValues.Optional("id", v)); // Request parameters - ///indicates whether the watch should execute in debug mode + ///indicates whether the watch should execute in debug mode public ExecuteWatchDescriptor Debug(bool? debug = true) => Qs("debug", debug); } - ///Descriptor for Get http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html + ///Descriptor for Get http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html public partial class GetWatchDescriptor : RequestDescriptorBase, IGetWatchRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.WatcherGet; @@ -169,7 +169,7 @@ protected GetWatchDescriptor(): base() // Request parameters } - ///Descriptor for Put http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html + ///Descriptor for Put http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html public partial class PutWatchDescriptor : RequestDescriptorBase, IPutWatchRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.WatcherPut; @@ -188,17 +188,17 @@ protected PutWatchDescriptor(): base() // values part of the url path Id IPutWatchRequest.Id => Self.RouteValues.Get("id"); // Request parameters - ///Specify whether the watch is in/active by default + ///Specify whether the watch is in/active by default public PutWatchDescriptor Active(bool? active = true) => Qs("active", active); - ///only update the watch if the last operation that has changed the watch has the specified primary term + ///only update the watch if the last operation that has changed the watch has the specified primary term public PutWatchDescriptor IfPrimaryTerm(long? ifprimaryterm) => Qs("if_primary_term", ifprimaryterm); - ///only update the watch if the last operation that has changed the watch has the specified sequence number + ///only update the watch if the last operation that has changed the watch has the specified sequence number public PutWatchDescriptor IfSequenceNumber(long? ifsequencenumber) => Qs("if_seq_no", ifsequencenumber); - ///Explicit version number for concurrency control + ///Explicit version number for concurrency control public PutWatchDescriptor Version(long? version) => Qs("version", version); } - ///Descriptor for Start http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html + ///Descriptor for Start http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html public partial class StartWatcherDescriptor : RequestDescriptorBase, IStartWatcherRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.WatcherStart; @@ -206,7 +206,7 @@ public partial class StartWatcherDescriptor : RequestDescriptorBaseDescriptor for Stats http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html + ///Descriptor for Stats http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html public partial class WatcherStatsDescriptor : RequestDescriptorBase, IWatcherStatsRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.WatcherStats; @@ -223,14 +223,14 @@ public WatcherStatsDescriptor(Metrics metric): base(r => r.Optional("metric", me // values part of the url path Metrics IWatcherStatsRequest.Metric => Self.RouteValues.Get("metric"); - ///Controls what additional stat metrics should be include in the response + ///Controls what additional stat metrics should be include in the response public WatcherStatsDescriptor Metric(Metrics metric) => Assign(metric, (a, v) => a.RouteValues.Optional("metric", v)); // Request parameters - ///Emits stack traces of currently running watches + ///Emits stack traces of currently running watches public WatcherStatsDescriptor EmitStacktraces(bool? emitstacktraces = true) => Qs("emit_stacktraces", emitstacktraces); } - ///Descriptor for Stop http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html + ///Descriptor for Stop http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html public partial class StopWatcherDescriptor : RequestDescriptorBase, IStopWatcherRequest { internal override ApiUrls ApiUrls => ApiUrlsLookups.WatcherStop; diff --git a/src/Nest/Requests.Cat.cs b/src/Nest/Requests.Cat.cs index b59985eb4e7..def935d49b3 100644 --- a/src/Nest/Requests.Cat.cs +++ b/src/Nest/Requests.Cat.cs @@ -41,7 +41,7 @@ Names Name } } - ///Request for Aliases https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html + ///Request for Aliases https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html public partial class CatAliasesRequest : PlainRequestBase, ICatAliasesRequest { protected ICatAliasesRequest Self => this; @@ -121,7 +121,7 @@ NodeIds NodeId } } - ///Request for Allocation https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html + ///Request for Allocation https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html public partial class CatAllocationRequest : PlainRequestBase, ICatAllocationRequest { protected ICatAllocationRequest Self => this; @@ -208,7 +208,7 @@ Indices Index } } - ///Request for Count https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html + ///Request for Count https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html public partial class CatCountRequest : PlainRequestBase, ICatCountRequest { protected ICatCountRequest Self => this; @@ -288,7 +288,7 @@ Fields Fields } } - ///Request for Fielddata https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html + ///Request for Fielddata https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html public partial class CatFielddataRequest : PlainRequestBase, ICatFielddataRequest { protected ICatFielddataRequest Self => this; @@ -370,7 +370,7 @@ public partial interface ICatHealthRequest : IRequestRequest for Health https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html + ///Request for Health https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html public partial class CatHealthRequest : PlainRequestBase, ICatHealthRequest { protected ICatHealthRequest Self => this; @@ -439,7 +439,7 @@ public partial interface ICatHelpRequest : IRequest { } - ///Request for Help https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html + ///Request for Help https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html public partial class CatHelpRequest : PlainRequestBase, ICatHelpRequest { protected ICatHelpRequest Self => this; @@ -471,7 +471,7 @@ Indices Index } } - ///Request for Indices https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html + ///Request for Indices https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html public partial class CatIndicesRequest : PlainRequestBase, ICatIndicesRequest { protected ICatIndicesRequest Self => this; @@ -574,7 +574,7 @@ public partial interface ICatMasterRequest : IRequestRequest for Master https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html + ///Request for Master https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html public partial class CatMasterRequest : PlainRequestBase, ICatMasterRequest { protected ICatMasterRequest Self => this; @@ -636,7 +636,7 @@ public partial interface ICatNodeAttributesRequest : IRequestRequest for NodeAttributes https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html + ///Request for NodeAttributes https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html public partial class CatNodeAttributesRequest : PlainRequestBase, ICatNodeAttributesRequest { protected ICatNodeAttributesRequest Self => this; @@ -698,7 +698,7 @@ public partial interface ICatNodesRequest : IRequest { } - ///Request for Nodes https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html + ///Request for Nodes https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html public partial class CatNodesRequest : PlainRequestBase, ICatNodesRequest { protected ICatNodesRequest Self => this; @@ -767,7 +767,7 @@ public partial interface ICatPendingTasksRequest : IRequestRequest for PendingTasks https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html + ///Request for PendingTasks https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html public partial class CatPendingTasksRequest : PlainRequestBase, ICatPendingTasksRequest { protected ICatPendingTasksRequest Self => this; @@ -829,7 +829,7 @@ public partial interface ICatPluginsRequest : IRequestRequest for Plugins https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html + ///Request for Plugins https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html public partial class CatPluginsRequest : PlainRequestBase, ICatPluginsRequest { protected ICatPluginsRequest Self => this; @@ -896,7 +896,7 @@ Indices Index } } - ///Request for Recovery https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html + ///Request for Recovery https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html public partial class CatRecoveryRequest : PlainRequestBase, ICatRecoveryRequest { protected ICatRecoveryRequest Self => this; @@ -971,7 +971,7 @@ public partial interface ICatRepositoriesRequest : IRequestRequest for Repositories https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html + ///Request for Repositories https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html public partial class CatRepositoriesRequest : PlainRequestBase, ICatRepositoriesRequest { protected ICatRepositoriesRequest Self => this; @@ -1038,7 +1038,7 @@ Indices Index } } - ///Request for Segments https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html + ///Request for Segments https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html public partial class CatSegmentsRequest : PlainRequestBase, ICatSegmentsRequest { protected ICatSegmentsRequest Self => this; @@ -1111,7 +1111,7 @@ Indices Index } } - ///Request for Shards https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html + ///Request for Shards https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html public partial class CatShardsRequest : PlainRequestBase, ICatShardsRequest { protected ICatShardsRequest Self => this; @@ -1198,7 +1198,7 @@ Names RepositoryName } } - ///Request for Snapshots https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html + ///Request for Snapshots https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html public partial class CatSnapshotsRequest : PlainRequestBase, ICatSnapshotsRequest { protected ICatSnapshotsRequest Self => this; @@ -1273,7 +1273,7 @@ public partial interface ICatTasksRequest : IRequest { } - ///Request for Tasks https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + ///Request for Tasks https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html public partial class CatTasksRequest : PlainRequestBase, ICatTasksRequest { protected ICatTasksRequest Self => this; @@ -1357,7 +1357,7 @@ Name Name } } - ///Request for Templates https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html + ///Request for Templates https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html public partial class CatTemplatesRequest : PlainRequestBase, ICatTemplatesRequest { protected ICatTemplatesRequest Self => this; @@ -1437,7 +1437,7 @@ Names ThreadPoolPatterns } } - ///Request for ThreadPool https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html + ///Request for ThreadPool https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html public partial class CatThreadPoolRequest : PlainRequestBase, ICatThreadPoolRequest { protected ICatThreadPoolRequest Self => this; diff --git a/src/Nest/Requests.Cluster.cs b/src/Nest/Requests.Cluster.cs index 67e92158ea5..f6664d5abfa 100644 --- a/src/Nest/Requests.Cluster.cs +++ b/src/Nest/Requests.Cluster.cs @@ -36,7 +36,7 @@ public partial interface IClusterAllocationExplainRequest : IRequestRequest for AllocationExplain https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html + ///Request for AllocationExplain https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html public partial class ClusterAllocationExplainRequest : PlainRequestBase, IClusterAllocationExplainRequest { protected IClusterAllocationExplainRequest Self => this; @@ -63,7 +63,7 @@ public partial interface IClusterGetSettingsRequest : IRequestRequest for GetSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html + ///Request for GetSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html public partial class ClusterGetSettingsRequest : PlainRequestBase, IClusterGetSettingsRequest { protected IClusterGetSettingsRequest Self => this; @@ -109,7 +109,7 @@ Indices Index } } - ///Request for Health https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html + ///Request for Health https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html public partial class ClusterHealthRequest : PlainRequestBase, IClusterHealthRequest { protected IClusterHealthRequest Self => this; @@ -212,7 +212,7 @@ public partial interface IClusterPendingTasksRequest : IRequestRequest for PendingTasks https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html + ///Request for PendingTasks https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html public partial class ClusterPendingTasksRequest : PlainRequestBase, IClusterPendingTasksRequest { protected IClusterPendingTasksRequest Self => this; @@ -239,7 +239,7 @@ public partial interface IClusterPutSettingsRequest : IRequestRequest for PutSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html + ///Request for PutSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html public partial class ClusterPutSettingsRequest : PlainRequestBase, IClusterPutSettingsRequest { protected IClusterPutSettingsRequest Self => this; @@ -273,7 +273,7 @@ public partial interface IRemoteInfoRequest : IRequestRequest for RemoteInfo https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html + ///Request for RemoteInfo https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html public partial class RemoteInfoRequest : PlainRequestBase, IRemoteInfoRequest { protected IRemoteInfoRequest Self => this; @@ -287,7 +287,7 @@ public partial interface IClusterRerouteRequest : IRequestRequest for Reroute https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html + ///Request for Reroute https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html public partial class ClusterRerouteRequest : PlainRequestBase, IClusterRerouteRequest { protected IClusterRerouteRequest Self => this; @@ -353,7 +353,7 @@ Indices Index } } - ///Request for State https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html + ///Request for State https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html public partial class ClusterStateRequest : PlainRequestBase, IClusterStateRequest { protected IClusterStateRequest Self => this; @@ -452,7 +452,7 @@ NodeIds NodeId } } - ///Request for Stats https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html + ///Request for Stats https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html public partial class ClusterStatsRequest : PlainRequestBase, IClusterStatsRequest { protected IClusterStatsRequest Self => this; diff --git a/src/Nest/Requests.CrossClusterReplication.cs b/src/Nest/Requests.CrossClusterReplication.cs index 87bff3689ad..2bae6e07e6c 100644 --- a/src/Nest/Requests.CrossClusterReplication.cs +++ b/src/Nest/Requests.CrossClusterReplication.cs @@ -41,7 +41,7 @@ Name Name } } - ///Request for DeleteAutoFollowPattern https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html + ///Request for DeleteAutoFollowPattern https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html public partial class DeleteAutoFollowPatternRequest : PlainRequestBase, IDeleteAutoFollowPatternRequest { protected IDeleteAutoFollowPatternRequest Self => this; @@ -74,7 +74,7 @@ IndexName Index } } - ///Request for CreateFollowIndex https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html + ///Request for CreateFollowIndex https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html public partial class CreateFollowIndexRequest : PlainRequestBase, ICreateFollowIndexRequest { protected ICreateFollowIndexRequest Self => this; @@ -116,7 +116,7 @@ Indices Index } } - ///Request for FollowInfo https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html + ///Request for FollowInfo https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html public partial class FollowInfoRequest : PlainRequestBase, IFollowInfoRequest { protected IFollowInfoRequest Self => this; @@ -149,7 +149,7 @@ Indices Index } } - ///Request for FollowIndexStats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html + ///Request for FollowIndexStats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html public partial class FollowIndexStatsRequest : PlainRequestBase, IFollowIndexStatsRequest { protected IFollowIndexStatsRequest Self => this; @@ -182,7 +182,7 @@ IndexName Index } } - ///Request for ForgetFollowerIndex http://www.elastic.co/guide/en/elasticsearch/reference/current + ///Request for ForgetFollowerIndex http://www.elastic.co/guide/en/elasticsearch/reference/current public partial class ForgetFollowerIndexRequest : PlainRequestBase, IForgetFollowerIndexRequest { protected IForgetFollowerIndexRequest Self => this; @@ -215,7 +215,7 @@ Name Name } } - ///Request for GetAutoFollowPattern https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html + ///Request for GetAutoFollowPattern https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html public partial class GetAutoFollowPatternRequest : PlainRequestBase, IGetAutoFollowPatternRequest { protected IGetAutoFollowPatternRequest Self => this; @@ -247,7 +247,7 @@ IndexName Index } } - ///Request for PauseFollowIndex https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html + ///Request for PauseFollowIndex https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html public partial class PauseFollowIndexRequest : PlainRequestBase, IPauseFollowIndexRequest { protected IPauseFollowIndexRequest Self => this; @@ -280,7 +280,7 @@ Name Name } } - ///Request for CreateAutoFollowPattern https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html + ///Request for CreateAutoFollowPattern https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html public partial class CreateAutoFollowPatternRequest : PlainRequestBase, ICreateAutoFollowPatternRequest { protected ICreateAutoFollowPatternRequest Self => this; @@ -313,7 +313,7 @@ IndexName Index } } - ///Request for ResumeFollowIndex https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html + ///Request for ResumeFollowIndex https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html public partial class ResumeFollowIndexRequest : PlainRequestBase, IResumeFollowIndexRequest { protected IResumeFollowIndexRequest Self => this; @@ -341,7 +341,7 @@ public partial interface ICcrStatsRequest : IRequest { } - ///Request for Stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html + ///Request for Stats https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html public partial class CcrStatsRequest : PlainRequestBase, ICcrStatsRequest { protected ICcrStatsRequest Self => this; @@ -360,7 +360,7 @@ IndexName Index } } - ///Request for UnfollowIndex http://www.elastic.co/guide/en/elasticsearch/reference/current + ///Request for UnfollowIndex http://www.elastic.co/guide/en/elasticsearch/reference/current public partial class UnfollowIndexRequest : PlainRequestBase, IUnfollowIndexRequest { protected IUnfollowIndexRequest Self => this; diff --git a/src/Nest/Requests.Graph.cs b/src/Nest/Requests.Graph.cs index 0904e4c34b3..2c0b2e31dbc 100644 --- a/src/Nest/Requests.Graph.cs +++ b/src/Nest/Requests.Graph.cs @@ -45,7 +45,7 @@ public partial interface IGraphExploreRequest : IGraphExploreRequest { } - ///Request for Explore https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html + ///Request for Explore https://www.elastic.co/guide/en/elasticsearch/reference/current/graph-explore-api.html public partial class GraphExploreRequest : PlainRequestBase, IGraphExploreRequest { protected IGraphExploreRequest Self => this; diff --git a/src/Nest/Requests.IndexLifecycleManagement.cs b/src/Nest/Requests.IndexLifecycleManagement.cs index 1ecd241b9bd..2683f9744fd 100644 --- a/src/Nest/Requests.IndexLifecycleManagement.cs +++ b/src/Nest/Requests.IndexLifecycleManagement.cs @@ -41,7 +41,7 @@ Id PolicyId } } - ///Request for DeleteLifecycle https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html + ///Request for DeleteLifecycle https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-delete-lifecycle.html public partial class DeleteLifecycleRequest : PlainRequestBase, IDeleteLifecycleRequest { protected IDeleteLifecycleRequest Self => this; @@ -74,7 +74,7 @@ IndexName Index } } - ///Request for ExplainLifecycle https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html + ///Request for ExplainLifecycle https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html public partial class ExplainLifecycleRequest : PlainRequestBase, IExplainLifecycleRequest { protected IExplainLifecycleRequest Self => this; @@ -120,7 +120,7 @@ Id PolicyId } } - ///Request for GetLifecycle https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html + ///Request for GetLifecycle https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html public partial class GetLifecycleRequest : PlainRequestBase, IGetLifecycleRequest { protected IGetLifecycleRequest Self => this; @@ -147,7 +147,7 @@ public partial interface IGetIlmStatusRequest : IRequestRequest for GetStatus https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html + ///Request for GetStatus https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html public partial class GetIlmStatusRequest : PlainRequestBase, IGetIlmStatusRequest { protected IGetIlmStatusRequest Self => this; @@ -166,7 +166,7 @@ IndexName Index } } - ///Request for MoveToStep https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html + ///Request for MoveToStep https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html public partial class MoveToStepRequest : PlainRequestBase, IMoveToStepRequest { protected IMoveToStepRequest Self => this; @@ -199,7 +199,7 @@ Id PolicyId } } - ///Request for PutLifecycle https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html + ///Request for PutLifecycle https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html public partial class PutLifecycleRequest : PlainRequestBase, IPutLifecycleRequest { protected IPutLifecycleRequest Self => this; @@ -232,7 +232,7 @@ IndexName Index } } - ///Request for RemovePolicy https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html + ///Request for RemovePolicy https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-policy.html public partial class RemovePolicyRequest : PlainRequestBase, IRemovePolicyRequest { protected IRemovePolicyRequest Self => this; @@ -265,7 +265,7 @@ IndexName Index } } - ///Request for Retry https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html + ///Request for Retry https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry-policy.html public partial class RetryIlmRequest : PlainRequestBase, IRetryIlmRequest { protected IRetryIlmRequest Self => this; @@ -293,7 +293,7 @@ public partial interface IStartIlmRequest : IRequest { } - ///Request for Start https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html + ///Request for Start https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html public partial class StartIlmRequest : PlainRequestBase, IStartIlmRequest { protected IStartIlmRequest Self => this; @@ -307,7 +307,7 @@ public partial interface IStopIlmRequest : IRequest { } - ///Request for Stop https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html + ///Request for Stop https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html public partial class StopIlmRequest : PlainRequestBase, IStopIlmRequest { protected IStopIlmRequest Self => this; diff --git a/src/Nest/Requests.Indices.cs b/src/Nest/Requests.Indices.cs index 6703269dfdb..d3f21cf8aa9 100644 --- a/src/Nest/Requests.Indices.cs +++ b/src/Nest/Requests.Indices.cs @@ -41,7 +41,7 @@ IndexName Index } } - ///Request for Analyze https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html + ///Request for Analyze https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html public partial class AnalyzeRequest : PlainRequestBase, IAnalyzeRequest { protected IAnalyzeRequest Self => this; @@ -73,7 +73,7 @@ Indices Index } } - ///Request for ClearCache https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html + ///Request for ClearCache https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html public partial class ClearCacheRequest : PlainRequestBase, IClearCacheRequest { protected IClearCacheRequest Self => this; @@ -156,7 +156,7 @@ Indices Index } } - ///Request for Close https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html + ///Request for Close https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html public partial class CloseIndexRequest : PlainRequestBase, ICloseIndexRequest { protected ICloseIndexRequest Self => this; @@ -233,7 +233,7 @@ IndexName Index } } - ///Request for Create https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html + ///Request for Create https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html public partial class CreateIndexRequest : PlainRequestBase, ICreateIndexRequest { protected ICreateIndexRequest Self => this; @@ -293,7 +293,7 @@ Indices Index } } - ///Request for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html + ///Request for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html public partial class DeleteIndexRequest : PlainRequestBase, IDeleteIndexRequest { protected IDeleteIndexRequest Self => this; @@ -366,7 +366,7 @@ Names Name } } - ///Request for DeleteAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + ///Request for DeleteAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html public partial class DeleteAliasRequest : PlainRequestBase, IDeleteAliasRequest { protected IDeleteAliasRequest Self => this; @@ -415,7 +415,7 @@ Name Name } } - ///Request for DeleteTemplate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html + ///Request for DeleteTemplate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html public partial class DeleteIndexTemplateRequest : PlainRequestBase, IDeleteIndexTemplateRequest { protected IDeleteIndexTemplateRequest Self => this; @@ -461,7 +461,7 @@ Indices Index } } - ///Request for Exists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html + ///Request for Exists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html public partial class IndexExistsRequest : PlainRequestBase, IIndexExistsRequest { protected IIndexExistsRequest Self => this; @@ -541,7 +541,7 @@ Indices Index } } - ///Request for AliasExists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + ///Request for AliasExists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html public partial class AliasExistsRequest : PlainRequestBase, IAliasExistsRequest { protected IAliasExistsRequest Self => this; @@ -613,7 +613,7 @@ Names Name } } - ///Request for TemplateExists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html + ///Request for TemplateExists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html public partial class IndexTemplateExistsRequest : PlainRequestBase, IIndexTemplateExistsRequest { protected IIndexTemplateExistsRequest Self => this; @@ -672,7 +672,7 @@ Names Type } } - ///Request for TypeExists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html + ///Request for TypeExists https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html public partial class TypeExistsRequest : PlainRequestBase, ITypeExistsRequest { protected ITypeExistsRequest Self => this; @@ -738,7 +738,7 @@ Indices Index } } - ///Request for Flush https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html + ///Request for Flush https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html public partial class FlushRequest : PlainRequestBase, IFlushRequest { protected IFlushRequest Self => this; @@ -813,7 +813,7 @@ Indices Index } } - ///Request for SyncedFlush https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush-api.html + ///Request for SyncedFlush https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush-api.html public partial class SyncedFlushRequest : PlainRequestBase, ISyncedFlushRequest { protected ISyncedFlushRequest Self => this; @@ -868,7 +868,7 @@ Indices Index } } - ///Request for ForceMerge https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html + ///Request for ForceMerge https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html public partial class ForceMergeRequest : PlainRequestBase, IForceMergeRequest { protected IForceMergeRequest Self => this; @@ -944,7 +944,7 @@ IndexName Index } } - ///Request for Freeze https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html + ///Request for Freeze https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html public partial class FreezeIndexRequest : PlainRequestBase, IFreezeIndexRequest { protected IFreezeIndexRequest Self => this; @@ -1021,7 +1021,7 @@ Indices Index } } - ///Request for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html + ///Request for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html public partial class GetIndexRequest : PlainRequestBase, IGetIndexRequest { protected IGetIndexRequest Self => this; @@ -1115,7 +1115,7 @@ Indices Index } } - ///Request for GetAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + ///Request for GetAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html public partial class GetAliasRequest : PlainRequestBase, IGetAliasRequest { protected IGetAliasRequest Self => this; @@ -1198,7 +1198,7 @@ Indices Index } } - ///Request for GetFieldMapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html + ///Request for GetFieldMapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html public partial class GetFieldMappingRequest : PlainRequestBase, IGetFieldMappingRequest { protected IGetFieldMappingRequest Self => this; @@ -1284,7 +1284,7 @@ Indices Index } } - ///Request for GetMapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html + ///Request for GetMapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html public partial class GetMappingRequest : PlainRequestBase, IGetMappingRequest { protected IGetMappingRequest Self => this; @@ -1366,7 +1366,7 @@ Names Name } } - ///Request for GetSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html + ///Request for GetSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html public partial class GetIndexSettingsRequest : PlainRequestBase, IGetIndexSettingsRequest { protected IGetIndexSettingsRequest Self => this; @@ -1464,7 +1464,7 @@ Names Name } } - ///Request for GetTemplate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html + ///Request for GetTemplate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html public partial class GetIndexTemplateRequest : PlainRequestBase, IGetIndexTemplateRequest { protected IGetIndexTemplateRequest Self => this; @@ -1523,7 +1523,7 @@ Indices Index } } - ///Request for Open https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html + ///Request for Open https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html public partial class OpenIndexRequest : PlainRequestBase, IOpenIndexRequest { protected IOpenIndexRequest Self => this; @@ -1606,7 +1606,7 @@ Name Name } } - ///Request for PutAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + ///Request for PutAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html public partial class PutAliasRequest : PlainRequestBase, IPutAliasRequest { protected IPutAliasRequest Self => this; @@ -1659,7 +1659,7 @@ public partial interface IPutMappingRequest : IPutMappingRequest { } - ///Request for PutMapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html + ///Request for PutMapping https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html public partial class PutMappingRequest : PlainRequestBase, IPutMappingRequest { protected IPutMappingRequest Self => this; @@ -1751,7 +1751,7 @@ Indices Index } } - ///Request for UpdateSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html + ///Request for UpdateSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html public partial class UpdateIndexSettingsRequest : PlainRequestBase, IUpdateIndexSettingsRequest { protected IUpdateIndexSettingsRequest Self => this; @@ -1834,7 +1834,7 @@ Name Name } } - ///Request for PutTemplate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html + ///Request for PutTemplate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html public partial class PutIndexTemplateRequest : PlainRequestBase, IPutIndexTemplateRequest { protected IPutIndexTemplateRequest Self => this; @@ -1901,7 +1901,7 @@ Indices Index } } - ///Request for RecoveryStatus https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html + ///Request for RecoveryStatus https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html public partial class RecoveryStatusRequest : PlainRequestBase, IRecoveryStatusRequest { protected IRecoveryStatusRequest Self => this; @@ -1946,7 +1946,7 @@ Indices Index } } - ///Request for Refresh https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html + ///Request for Refresh https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html public partial class RefreshRequest : PlainRequestBase, IRefreshRequest { protected IRefreshRequest Self => this; @@ -2007,7 +2007,7 @@ IndexName NewIndex } } - ///Request for Rollover https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html + ///Request for Rollover https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html public partial class RolloverIndexRequest : PlainRequestBase, IRolloverIndexRequest { protected IRolloverIndexRequest Self => this; @@ -2083,7 +2083,7 @@ Indices Index } } - ///Request for Segments https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html + ///Request for Segments https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html public partial class SegmentsRequest : PlainRequestBase, ISegmentsRequest { protected ISegmentsRequest Self => this; @@ -2145,7 +2145,7 @@ Indices Index } } - ///Request for ShardStores https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html + ///Request for ShardStores https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html public partial class IndicesShardStoresRequest : PlainRequestBase, IIndicesShardStoresRequest { protected IIndicesShardStoresRequest Self => this; @@ -2213,7 +2213,7 @@ IndexName Target } } - ///Request for Shrink https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html + ///Request for Shrink https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html public partial class ShrinkIndexRequest : PlainRequestBase, IShrinkIndexRequest { protected IShrinkIndexRequest Self => this; @@ -2275,7 +2275,7 @@ IndexName Target } } - ///Request for Split https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html + ///Request for Split https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-split-index.html public partial class SplitIndexRequest : PlainRequestBase, ISplitIndexRequest { protected ISplitIndexRequest Self => this; @@ -2337,7 +2337,7 @@ Indices Index } } - ///Request for Stats https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html + ///Request for Stats https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html public partial class IndicesStatsRequest : PlainRequestBase, IIndicesStatsRequest { protected IIndicesStatsRequest Self => this; @@ -2446,7 +2446,7 @@ IndexName Index } } - ///Request for Unfreeze https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html + ///Request for Unfreeze https://www.elastic.co/guide/en/elasticsearch/reference/current/frozen.html public partial class UnfreezeIndexRequest : PlainRequestBase, IUnfreezeIndexRequest { protected IUnfreezeIndexRequest Self => this; @@ -2518,7 +2518,7 @@ public partial interface IBulkAliasRequest : IRequestRequest for BulkAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html + ///Request for BulkAlias https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html public partial class BulkAliasRequest : PlainRequestBase, IBulkAliasRequest { protected IBulkAliasRequest Self => this; @@ -2554,7 +2554,7 @@ public partial interface IValidateQueryRequest : IValidateQueryReques { } - ///Request for ValidateQuery https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html + ///Request for ValidateQuery https://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html public partial class ValidateQueryRequest : PlainRequestBase, IValidateQueryRequest { protected IValidateQueryRequest Self => this; diff --git a/src/Nest/Requests.Ingest.cs b/src/Nest/Requests.Ingest.cs index 5da17d4a741..ade839f13c4 100644 --- a/src/Nest/Requests.Ingest.cs +++ b/src/Nest/Requests.Ingest.cs @@ -41,7 +41,7 @@ Id Id } } - ///Request for DeletePipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html + ///Request for DeletePipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-pipeline-api.html public partial class DeletePipelineRequest : PlainRequestBase, IDeletePipelineRequest { protected IDeletePipelineRequest Self => this; @@ -87,7 +87,7 @@ Id Id } } - ///Request for GetPipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html + ///Request for GetPipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/get-pipeline-api.html public partial class GetPipelineRequest : PlainRequestBase, IGetPipelineRequest { protected IGetPipelineRequest Self => this; @@ -120,7 +120,7 @@ public partial interface IGrokProcessorPatternsRequest : IRequestRequest for GrokProcessorPatterns https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get + ///Request for GrokProcessorPatterns https://www.elastic.co/guide/en/elasticsearch/reference/master/grok-processor.html#grok-processor-rest-get public partial class GrokProcessorPatternsRequest : PlainRequestBase, IGrokProcessorPatternsRequest { protected IGrokProcessorPatternsRequest Self => this; @@ -139,7 +139,7 @@ Id Id } } - ///Request for PutPipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html + ///Request for PutPipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/put-pipeline-api.html public partial class PutPipelineRequest : PlainRequestBase, IPutPipelineRequest { protected IPutPipelineRequest Self => this; @@ -185,7 +185,7 @@ Id Id } } - ///Request for SimulatePipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html + ///Request for SimulatePipeline https://www.elastic.co/guide/en/elasticsearch/reference/master/simulate-pipeline-api.html public partial class SimulatePipelineRequest : PlainRequestBase, ISimulatePipelineRequest { protected ISimulatePipelineRequest Self => this; diff --git a/src/Nest/Requests.License.cs b/src/Nest/Requests.License.cs index 652d33d3051..4de25131506 100644 --- a/src/Nest/Requests.License.cs +++ b/src/Nest/Requests.License.cs @@ -36,7 +36,7 @@ public partial interface IDeleteLicenseRequest : IRequestRequest for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-license.html + ///Request for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-license.html public partial class DeleteLicenseRequest : PlainRequestBase, IDeleteLicenseRequest { protected IDeleteLicenseRequest Self => this; @@ -50,7 +50,7 @@ public partial interface IGetLicenseRequest : IRequestRequest for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/get-license.html + ///Request for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/get-license.html public partial class GetLicenseRequest : PlainRequestBase, IGetLicenseRequest { protected IGetLicenseRequest Self => this; @@ -70,7 +70,7 @@ public partial interface IGetBasicLicenseStatusRequest : IRequestRequest for GetBasicStatus https://www.elastic.co/guide/en/elasticsearch/reference/master/get-basic-status.html + ///Request for GetBasicStatus https://www.elastic.co/guide/en/elasticsearch/reference/master/get-basic-status.html public partial class GetBasicLicenseStatusRequest : PlainRequestBase, IGetBasicLicenseStatusRequest { protected IGetBasicLicenseStatusRequest Self => this; @@ -84,7 +84,7 @@ public partial interface IGetTrialLicenseStatusRequest : IRequestRequest for GetTrialStatus https://www.elastic.co/guide/en/elasticsearch/reference/master/get-trial-status.html + ///Request for GetTrialStatus https://www.elastic.co/guide/en/elasticsearch/reference/master/get-trial-status.html public partial class GetTrialLicenseStatusRequest : PlainRequestBase, IGetTrialLicenseStatusRequest { protected IGetTrialLicenseStatusRequest Self => this; @@ -98,7 +98,7 @@ public partial interface IPostLicenseRequest : IRequestRequest for Post https://www.elastic.co/guide/en/elasticsearch/reference/master/update-license.html + ///Request for Post https://www.elastic.co/guide/en/elasticsearch/reference/master/update-license.html public partial class PostLicenseRequest : PlainRequestBase, IPostLicenseRequest { protected IPostLicenseRequest Self => this; @@ -118,7 +118,7 @@ public partial interface IStartBasicLicenseRequest : IRequestRequest for StartBasic https://www.elastic.co/guide/en/elasticsearch/reference/master/start-basic.html + ///Request for StartBasic https://www.elastic.co/guide/en/elasticsearch/reference/master/start-basic.html public partial class StartBasicLicenseRequest : PlainRequestBase, IStartBasicLicenseRequest { protected IStartBasicLicenseRequest Self => this; @@ -138,7 +138,7 @@ public partial interface IStartTrialLicenseRequest : IRequestRequest for StartTrial https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trial.html + ///Request for StartTrial https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trial.html public partial class StartTrialLicenseRequest : PlainRequestBase, IStartTrialLicenseRequest { protected IStartTrialLicenseRequest Self => this; diff --git a/src/Nest/Requests.MachineLearning.cs b/src/Nest/Requests.MachineLearning.cs index 76ebd343837..3f05b3526dc 100644 --- a/src/Nest/Requests.MachineLearning.cs +++ b/src/Nest/Requests.MachineLearning.cs @@ -41,7 +41,7 @@ Id JobId } } - ///Request for CloseJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html + ///Request for CloseJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html public partial class CloseJobRequest : PlainRequestBase, ICloseJobRequest { protected ICloseJobRequest Self => this; @@ -94,7 +94,7 @@ Id CalendarId } } - ///Request for DeleteCalendar + ///Request for DeleteCalendar public partial class DeleteCalendarRequest : PlainRequestBase, IDeleteCalendarRequest { protected IDeleteCalendarRequest Self => this; @@ -133,7 +133,7 @@ Id EventId } } - ///Request for DeleteCalendarEvent + ///Request for DeleteCalendarEvent public partial class DeleteCalendarEventRequest : PlainRequestBase, IDeleteCalendarEventRequest { protected IDeleteCalendarEventRequest Self => this; @@ -175,7 +175,7 @@ Id JobId } } - ///Request for DeleteCalendarJob + ///Request for DeleteCalendarJob public partial class DeleteCalendarJobRequest : PlainRequestBase, IDeleteCalendarJobRequest { protected IDeleteCalendarJobRequest Self => this; @@ -211,7 +211,7 @@ Id DatafeedId } } - ///Request for DeleteDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html + ///Request for DeleteDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html public partial class DeleteDatafeedRequest : PlainRequestBase, IDeleteDatafeedRequest { protected IDeleteDatafeedRequest Self => this; @@ -245,7 +245,7 @@ public partial interface IDeleteExpiredDataRequest : IRequestRequest for DeleteExpiredData + ///Request for DeleteExpiredData public partial class DeleteExpiredDataRequest : PlainRequestBase, IDeleteExpiredDataRequest { protected IDeleteExpiredDataRequest Self => this; @@ -264,7 +264,7 @@ Id FilterId } } - ///Request for DeleteFilter + ///Request for DeleteFilter public partial class DeleteFilterRequest : PlainRequestBase, IDeleteFilterRequest { protected IDeleteFilterRequest Self => this; @@ -303,7 +303,7 @@ Ids ForecastId } } - ///Request for DeleteForecast http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html + ///Request for DeleteForecast http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html public partial class DeleteForecastRequest : PlainRequestBase, IDeleteForecastRequest { protected IDeleteForecastRequest Self => this; @@ -352,7 +352,7 @@ Id JobId } } - ///Request for DeleteJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html + ///Request for DeleteJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html public partial class DeleteJobRequest : PlainRequestBase, IDeleteJobRequest { protected IDeleteJobRequest Self => this; @@ -404,7 +404,7 @@ Id SnapshotId } } - ///Request for DeleteModelSnapshot http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html + ///Request for DeleteModelSnapshot http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html public partial class DeleteModelSnapshotRequest : PlainRequestBase, IDeleteModelSnapshotRequest { protected IDeleteModelSnapshotRequest Self => this; @@ -440,7 +440,7 @@ Id JobId } } - ///Request for FlushJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html + ///Request for FlushJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html public partial class FlushJobRequest : PlainRequestBase, IFlushJobRequest { protected IFlushJobRequest Self => this; @@ -479,7 +479,7 @@ Id JobId } } - ///Request for ForecastJob + ///Request for ForecastJob public partial class ForecastJobRequest : PlainRequestBase, IForecastJobRequest { protected IForecastJobRequest Self => this; @@ -518,7 +518,7 @@ Timestamp Timestamp } } - ///Request for GetBuckets http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html + ///Request for GetBuckets http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html public partial class GetBucketsRequest : PlainRequestBase, IGetBucketsRequest { protected IGetBucketsRequest Self => this; @@ -560,7 +560,7 @@ Id CalendarId } } - ///Request for GetCalendarEvents + ///Request for GetCalendarEvents public partial class GetCalendarEventsRequest : PlainRequestBase, IGetCalendarEventsRequest { protected IGetCalendarEventsRequest Self => this; @@ -613,7 +613,7 @@ Id CalendarId } } - ///Request for GetCalendars + ///Request for GetCalendars public partial class GetCalendarsRequest : PlainRequestBase, IGetCalendarsRequest { protected IGetCalendarsRequest Self => this; @@ -651,7 +651,7 @@ LongId CategoryId } } - ///Request for GetCategories http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html + ///Request for GetCategories http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html public partial class GetCategoriesRequest : PlainRequestBase, IGetCategoriesRequest { protected IGetCategoriesRequest Self => this; @@ -693,7 +693,7 @@ Id DatafeedId } } - ///Request for GetDatafeedStats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html + ///Request for GetDatafeedStats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html public partial class GetDatafeedStatsRequest : PlainRequestBase, IGetDatafeedStatsRequest { protected IGetDatafeedStatsRequest Self => this; @@ -731,7 +731,7 @@ Id DatafeedId } } - ///Request for GetDatafeeds http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html + ///Request for GetDatafeeds http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html public partial class GetDatafeedsRequest : PlainRequestBase, IGetDatafeedsRequest { protected IGetDatafeedsRequest Self => this; @@ -769,7 +769,7 @@ Id FilterId } } - ///Request for GetFilters + ///Request for GetFilters public partial class GetFiltersRequest : PlainRequestBase, IGetFiltersRequest { protected IGetFiltersRequest Self => this; @@ -814,7 +814,7 @@ Id JobId } } - ///Request for GetInfluencers http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html + ///Request for GetInfluencers http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html public partial class GetInfluencersRequest : PlainRequestBase, IGetInfluencersRequest { protected IGetInfluencersRequest Self => this; @@ -847,7 +847,7 @@ Id JobId } } - ///Request for GetJobStats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html + ///Request for GetJobStats http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html public partial class GetJobStatsRequest : PlainRequestBase, IGetJobStatsRequest { protected IGetJobStatsRequest Self => this; @@ -885,7 +885,7 @@ Id JobId } } - ///Request for GetJobs http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html + ///Request for GetJobs http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html public partial class GetJobsRequest : PlainRequestBase, IGetJobsRequest { protected IGetJobsRequest Self => this; @@ -929,7 +929,7 @@ Id SnapshotId } } - ///Request for GetModelSnapshots http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html + ///Request for GetModelSnapshots http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html public partial class GetModelSnapshotsRequest : PlainRequestBase, IGetModelSnapshotsRequest { protected IGetModelSnapshotsRequest Self => this; @@ -971,7 +971,7 @@ Id JobId } } - ///Request for GetOverallBuckets http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html + ///Request for GetOverallBuckets http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html public partial class GetOverallBucketsRequest : PlainRequestBase, IGetOverallBucketsRequest { protected IGetOverallBucketsRequest Self => this; @@ -1004,7 +1004,7 @@ Id JobId } } - ///Request for GetAnomalyRecords http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html + ///Request for GetAnomalyRecords http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html public partial class GetAnomalyRecordsRequest : PlainRequestBase, IGetAnomalyRecordsRequest { protected IGetAnomalyRecordsRequest Self => this; @@ -1032,7 +1032,7 @@ public partial interface IMachineLearningInfoRequest : IRequestRequest for Info + ///Request for Info public partial class MachineLearningInfoRequest : PlainRequestBase, IMachineLearningInfoRequest { protected IMachineLearningInfoRequest Self => this; @@ -1051,7 +1051,7 @@ Id JobId } } - ///Request for OpenJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html + ///Request for OpenJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html public partial class OpenJobRequest : PlainRequestBase, IOpenJobRequest { protected IOpenJobRequest Self => this; @@ -1084,7 +1084,7 @@ Id CalendarId } } - ///Request for PostCalendarEvents + ///Request for PostCalendarEvents public partial class PostCalendarEventsRequest : PlainRequestBase, IPostCalendarEventsRequest { protected IPostCalendarEventsRequest Self => this; @@ -1117,7 +1117,7 @@ Id JobId } } - ///Request for PostJobData http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html + ///Request for PostJobData http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html public partial class PostJobDataRequest : PlainRequestBase, IPostJobDataRequest { protected IPostJobDataRequest Self => this; @@ -1163,7 +1163,7 @@ Id DatafeedId } } - ///Request for PreviewDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html + ///Request for PreviewDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html public partial class PreviewDatafeedRequest : PlainRequestBase, IPreviewDatafeedRequest { protected IPreviewDatafeedRequest Self => this; @@ -1196,7 +1196,7 @@ Id CalendarId } } - ///Request for PutCalendar + ///Request for PutCalendar public partial class PutCalendarRequest : PlainRequestBase, IPutCalendarRequest { protected IPutCalendarRequest Self => this; @@ -1235,7 +1235,7 @@ Id JobId } } - ///Request for PutCalendarJob + ///Request for PutCalendarJob public partial class PutCalendarJobRequest : PlainRequestBase, IPutCalendarJobRequest { protected IPutCalendarJobRequest Self => this; @@ -1271,7 +1271,7 @@ Id DatafeedId } } - ///Request for PutDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html + ///Request for PutDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html public partial class PutDatafeedRequest : PlainRequestBase, IPutDatafeedRequest { protected IPutDatafeedRequest Self => this; @@ -1304,7 +1304,7 @@ Id FilterId } } - ///Request for PutFilter + ///Request for PutFilter public partial class PutFilterRequest : PlainRequestBase, IPutFilterRequest { protected IPutFilterRequest Self => this; @@ -1337,7 +1337,7 @@ Id JobId } } - ///Request for PutJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html + ///Request for PutJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html public partial class PutJobRequest : PlainRequestBase, IPutJobRequest { protected IPutJobRequest Self => this; @@ -1376,7 +1376,7 @@ Id SnapshotId } } - ///Request for RevertModelSnapshot http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html + ///Request for RevertModelSnapshot http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html public partial class RevertModelSnapshotRequest : PlainRequestBase, IRevertModelSnapshotRequest { protected IRevertModelSnapshotRequest Self => this; @@ -1412,7 +1412,7 @@ Id DatafeedId } } - ///Request for StartDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html + ///Request for StartDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html public partial class StartDatafeedRequest : PlainRequestBase, IStartDatafeedRequest { protected IStartDatafeedRequest Self => this; @@ -1445,7 +1445,7 @@ Id DatafeedId } } - ///Request for StopDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html + ///Request for StopDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html public partial class StopDatafeedRequest : PlainRequestBase, IStopDatafeedRequest { protected IStopDatafeedRequest Self => this; @@ -1484,7 +1484,7 @@ Id DatafeedId } } - ///Request for UpdateDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html + ///Request for UpdateDatafeed http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html public partial class UpdateDatafeedRequest : PlainRequestBase, IUpdateDatafeedRequest { protected IUpdateDatafeedRequest Self => this; @@ -1517,7 +1517,7 @@ Id FilterId } } - ///Request for UpdateFilter + ///Request for UpdateFilter public partial class UpdateFilterRequest : PlainRequestBase, IUpdateFilterRequest { protected IUpdateFilterRequest Self => this; @@ -1550,7 +1550,7 @@ Id JobId } } - ///Request for UpdateJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html + ///Request for UpdateJob http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html public partial class UpdateJobRequest : PlainRequestBase, IUpdateJobRequest { protected IUpdateJobRequest Self => this; @@ -1589,7 +1589,7 @@ Id SnapshotId } } - ///Request for UpdateModelSnapshot http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html + ///Request for UpdateModelSnapshot http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html public partial class UpdateModelSnapshotRequest : PlainRequestBase, IUpdateModelSnapshotRequest { protected IUpdateModelSnapshotRequest Self => this; @@ -1620,7 +1620,7 @@ public partial interface IValidateJobRequest : IRequestRequest for ValidateJob + ///Request for ValidateJob public partial class ValidateJobRequest : PlainRequestBase, IValidateJobRequest { protected IValidateJobRequest Self => this; @@ -1634,7 +1634,7 @@ public partial interface IValidateDetectorRequest : IRequestRequest for ValidateDetector + ///Request for ValidateDetector public partial class ValidateDetectorRequest : PlainRequestBase, IValidateDetectorRequest { protected IValidateDetectorRequest Self => this; diff --git a/src/Nest/Requests.Migration.cs b/src/Nest/Requests.Migration.cs index b4cfc3211c0..4628a83ba9c 100644 --- a/src/Nest/Requests.Migration.cs +++ b/src/Nest/Requests.Migration.cs @@ -41,7 +41,7 @@ IndexName Index } } - ///Request for DeprecationInfo http://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html + ///Request for DeprecationInfo http://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.html public partial class DeprecationInfoRequest : PlainRequestBase, IDeprecationInfoRequest { protected IDeprecationInfoRequest Self => this; diff --git a/src/Nest/Requests.NoNamespace.cs b/src/Nest/Requests.NoNamespace.cs index fc8b64be00b..7961057ddb3 100644 --- a/src/Nest/Requests.NoNamespace.cs +++ b/src/Nest/Requests.NoNamespace.cs @@ -40,7 +40,7 @@ IndexName Index } } - ///Request for Bulk https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html + ///Request for Bulk https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html public partial class BulkRequest : PlainRequestBase, IBulkRequest { protected IBulkRequest Self => this; @@ -143,7 +143,7 @@ public partial interface IClearScrollRequest : IRequestRequest for ClearScroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api + ///Request for ClearScroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#_clear_scroll_api public partial class ClearScrollRequest : PlainRequestBase, IClearScrollRequest { protected IClearScrollRequest Self => this; @@ -166,7 +166,7 @@ public partial interface ICountRequest : ICountRequest { } - ///Request for Count https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html + ///Request for Count https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html public partial class CountRequest : PlainRequestBase, ICountRequest { protected ICountRequest Self => this; @@ -326,7 +326,7 @@ Id Id } } - ///Request for Create https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///Request for Create https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html public partial class CreateRequest : PlainRequestBase, ICreateRequest { protected ICreateRequest Self => this; @@ -444,7 +444,7 @@ public partial interface IDeleteRequest : IDeleteRequest { } - ///Request for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html + ///Request for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html public partial class DeleteRequest : PlainRequestBase, IDeleteRequest { protected IDeleteRequest Self => this; @@ -580,7 +580,7 @@ public partial interface IDeleteByQueryRequest : IDeleteByQueryReques { } - ///Request for DeleteByQuery https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html + ///Request for DeleteByQuery https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html public partial class DeleteByQueryRequest : PlainRequestBase, IDeleteByQueryRequest { protected IDeleteByQueryRequest Self => this; @@ -865,7 +865,7 @@ TaskId TaskId } } - ///Request for DeleteByQueryRethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html + ///Request for DeleteByQueryRethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html public partial class DeleteByQueryRethrottleRequest : PlainRequestBase, IDeleteByQueryRethrottleRequest { protected IDeleteByQueryRethrottleRequest Self => this; @@ -904,7 +904,7 @@ Id Id } } - ///Request for DeleteScript https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///Request for DeleteScript https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html public partial class DeleteScriptRequest : PlainRequestBase, IDeleteScriptRequest { protected IDeleteScriptRequest Self => this; @@ -960,7 +960,7 @@ public partial interface IDocumentExistsRequest : IDocumentExistsRequ { } - ///Request for DocumentExists https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///Request for DocumentExists https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html public partial class DocumentExistsRequest : PlainRequestBase, IDocumentExistsRequest { protected IDocumentExistsRequest Self => this; @@ -1109,7 +1109,7 @@ public partial interface ISourceExistsRequest : ISourceExistsRequest { } - ///Request for SourceExists https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///Request for SourceExists https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html public partial class SourceExistsRequest : PlainRequestBase, ISourceExistsRequest { protected ISourceExistsRequest Self => this; @@ -1258,7 +1258,7 @@ public partial interface IExplainRequest : IExplainRequest { } - ///Request for Explain https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html + ///Request for Explain https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html public partial class ExplainRequest : PlainRequestBase, IExplainRequest { protected IExplainRequest Self => this; @@ -1404,7 +1404,7 @@ Indices Index } } - ///Request for FieldCapabilities https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html + ///Request for FieldCapabilities https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html public partial class FieldCapabilitiesRequest : PlainRequestBase, IFieldCapabilitiesRequest { protected IFieldCapabilitiesRequest Self => this; @@ -1483,7 +1483,7 @@ public partial interface IGetRequest : IGetRequest { } - ///Request for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///Request for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html public partial class GetRequest : PlainRequestBase, IGetRequest { protected IGetRequest Self => this; @@ -1622,7 +1622,7 @@ Id Id } } - ///Request for GetScript https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///Request for GetScript https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html public partial class GetScriptRequest : PlainRequestBase, IGetScriptRequest { protected IGetScriptRequest Self => this; @@ -1671,7 +1671,7 @@ public partial interface ISourceRequest : ISourceRequest { } - ///Request for Source https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html + ///Request for Source https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html public partial class SourceRequest : PlainRequestBase, ISourceRequest { protected ISourceRequest Self => this; @@ -1809,7 +1809,7 @@ Id Id } } - ///Request for Index https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html + ///Request for Index https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html public partial class IndexRequest : PlainRequestBase, IIndexRequest { protected IIndexRequest Self => this; @@ -1938,7 +1938,7 @@ public partial interface IRootNodeInfoRequest : IRequestRequest for RootNodeInfo https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + ///Request for RootNodeInfo https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html public partial class RootNodeInfoRequest : PlainRequestBase, IRootNodeInfoRequest { protected IRootNodeInfoRequest Self => this; @@ -1964,7 +1964,7 @@ Fields StoredFields } } - ///Request for MultiGet https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html + ///Request for MultiGet https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html public partial class MultiGetRequest : PlainRequestBase, IMultiGetRequest { protected IMultiGetRequest Self => this; @@ -2051,7 +2051,7 @@ Indices Index } } - ///Request for MultiSearch https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html + ///Request for MultiSearch https://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html public partial class MultiSearchRequest : PlainRequestBase, IMultiSearchRequest { protected IMultiSearchRequest Self => this; @@ -2139,7 +2139,7 @@ Indices Index } } - ///Request for MultiSearchTemplate https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html + ///Request for MultiSearchTemplate https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html public partial class MultiSearchTemplateRequest : PlainRequestBase, IMultiSearchTemplateRequest { protected IMultiSearchTemplateRequest Self => this; @@ -2205,7 +2205,7 @@ IndexName Index } } - ///Request for MultiTermVectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html + ///Request for MultiTermVectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html public partial class MultiTermVectorsRequest : PlainRequestBase, IMultiTermVectorsRequest { protected IMultiTermVectorsRequest Self => this; @@ -2324,7 +2324,7 @@ public partial interface IPingRequest : IRequest { } - ///Request for Ping https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html + ///Request for Ping https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html public partial class PingRequest : PlainRequestBase, IPingRequest { protected IPingRequest Self => this; @@ -2349,7 +2349,7 @@ Name Context } } - ///Request for PutScript https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html + ///Request for PutScript https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html public partial class PutScriptRequest : PlainRequestBase, IPutScriptRequest { protected IPutScriptRequest Self => this; @@ -2399,7 +2399,7 @@ public partial interface IReindexOnServerRequest : IRequestRequest for ReindexOnServer https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html + ///Request for ReindexOnServer https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html public partial class ReindexOnServerRequest : PlainRequestBase, IReindexOnServerRequest { protected IReindexOnServerRequest Self => this; @@ -2470,7 +2470,7 @@ TaskId TaskId } } - ///Request for ReindexRethrottle https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html + ///Request for ReindexRethrottle https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html public partial class ReindexRethrottleRequest : PlainRequestBase, IReindexRethrottleRequest { protected IReindexRethrottleRequest Self => this; @@ -2509,7 +2509,7 @@ Id Id } } - ///Request for RenderSearchTemplate https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates + ///Request for RenderSearchTemplate https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates public partial class RenderSearchTemplateRequest : PlainRequestBase, IRenderSearchTemplateRequest { protected IRenderSearchTemplateRequest Self => this; @@ -2536,8 +2536,8 @@ public partial interface IExecutePainlessScriptRequest : IRequestRequest for ExecutePainlessScript https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + ///Request for ExecutePainlessScript https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public partial class ExecutePainlessScriptRequest : PlainRequestBase, IExecutePainlessScriptRequest { protected IExecutePainlessScriptRequest Self => this; @@ -2551,7 +2551,7 @@ public partial interface IScrollRequest : IRequest { } - ///Request for Scroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll + ///Request for Scroll https://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll public partial class ScrollRequest : PlainRequestBase, IScrollRequest { protected IScrollRequest Self => this; @@ -2601,7 +2601,7 @@ public partial interface ISearchRequest : ISearchRequest { } - ///Request for Search https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html + ///Request for Search https://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html public partial class SearchRequest : PlainRequestBase, ISearchRequest { protected ISearchRequest Self => this; @@ -2861,7 +2861,7 @@ public partial interface ISearchShardsRequest : ISearchShardsRequest { } - ///Request for SearchShards https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html + ///Request for SearchShards https://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html public partial class SearchShardsRequest : PlainRequestBase, ISearchShardsRequest { protected ISearchShardsRequest Self => this; @@ -2959,7 +2959,7 @@ Indices Index } } - ///Request for SearchTemplate https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html + ///Request for SearchTemplate https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html public partial class SearchTemplateRequest : PlainRequestBase, ISearchTemplateRequest { protected ISearchTemplateRequest Self => this; @@ -3097,7 +3097,7 @@ Id Id } } - ///Request for TermVectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html + ///Request for TermVectors https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html public partial class TermVectorsRequest : PlainRequestBase, ITermVectorsRequest { protected ITermVectorsRequest Self => this; @@ -3237,7 +3237,7 @@ Id Id } } - ///Request for Update https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html + ///Request for Update https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html public partial class UpdateRequest : PlainRequestBase, IUpdateRequest { protected IUpdateRequest Self => this; @@ -3363,7 +3363,7 @@ public partial interface IUpdateByQueryRequest : IUpdateByQueryReques { } - ///Request for UpdateByQuery https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html + ///Request for UpdateByQuery https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html public partial class UpdateByQueryRequest : PlainRequestBase, IUpdateByQueryRequest { protected IUpdateByQueryRequest Self => this; @@ -3662,7 +3662,7 @@ TaskId TaskId } } - ///Request for UpdateByQueryRethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html + ///Request for UpdateByQueryRethrottle https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html public partial class UpdateByQueryRethrottleRequest : PlainRequestBase, IUpdateByQueryRethrottleRequest { protected IUpdateByQueryRethrottleRequest Self => this; diff --git a/src/Nest/Requests.Nodes.cs b/src/Nest/Requests.Nodes.cs index 44eed5254d5..e38c5a5b4c2 100644 --- a/src/Nest/Requests.Nodes.cs +++ b/src/Nest/Requests.Nodes.cs @@ -41,7 +41,7 @@ NodeIds NodeId } } - ///Request for HotThreads https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html + ///Request for HotThreads https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html public partial class NodesHotThreadsRequest : PlainRequestBase, INodesHotThreadsRequest { protected INodesHotThreadsRequest Self => this; @@ -120,7 +120,7 @@ Metrics Metric } } - ///Request for Info https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html + ///Request for Info https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html public partial class NodesInfoRequest : PlainRequestBase, INodesInfoRequest { protected INodesInfoRequest Self => this; @@ -180,7 +180,7 @@ NodeIds NodeId } } - ///Request for ReloadSecureSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings + ///Request for ReloadSecureSettings https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings public partial class ReloadSecureSettingsRequest : PlainRequestBase, IReloadSecureSettingsRequest { protected IReloadSecureSettingsRequest Self => this; @@ -230,7 +230,7 @@ IndexMetrics IndexMetric } } - ///Request for Stats https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html + ///Request for Stats https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html public partial class NodesStatsRequest : PlainRequestBase, INodesStatsRequest { protected INodesStatsRequest Self => this; @@ -355,7 +355,7 @@ Metrics Metric } } - ///Request for Usage https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html + ///Request for Usage https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html public partial class NodesUsageRequest : PlainRequestBase, INodesUsageRequest { protected INodesUsageRequest Self => this; diff --git a/src/Nest/Requests.Rollup.cs b/src/Nest/Requests.Rollup.cs index c0d09794b32..3531647ad0a 100644 --- a/src/Nest/Requests.Rollup.cs +++ b/src/Nest/Requests.Rollup.cs @@ -41,8 +41,8 @@ Id Id } } - ///Request for DeleteJob - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + ///Request for DeleteJob + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public partial class DeleteRollupJobRequest : PlainRequestBase, IDeleteRollupJobRequest { protected IDeleteRollupJobRequest Self => this; @@ -75,8 +75,8 @@ Id Id } } - ///Request for GetJob - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + ///Request for GetJob + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public partial class GetRollupJobRequest : PlainRequestBase, IGetRollupJobRequest { protected IGetRollupJobRequest Self => this; @@ -108,8 +108,8 @@ Id Id } } - ///Request for GetCapabilities - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + ///Request for GetCapabilities + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public partial class GetRollupCapabilitiesRequest : PlainRequestBase, IGetRollupCapabilitiesRequest { protected IGetRollupCapabilitiesRequest Self => this; @@ -141,8 +141,8 @@ IndexName Index } } - ///Request for GetIndexCapabilities - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + ///Request for GetIndexCapabilities + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public partial class GetRollupIndexCapabilitiesRequest : PlainRequestBase, IGetRollupIndexCapabilitiesRequest { protected IGetRollupIndexCapabilitiesRequest Self => this; @@ -175,8 +175,8 @@ Id Id } } - ///Request for CreateJob - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + ///Request for CreateJob + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public partial class CreateRollupJobRequest : PlainRequestBase, ICreateRollupJobRequest { protected ICreateRollupJobRequest Self => this; @@ -209,8 +209,8 @@ Indices Index } } - ///Request for Search - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + ///Request for Search + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public partial class RollupSearchRequest : PlainRequestBase, IRollupSearchRequest { protected IRollupSearchRequest Self => this; @@ -256,8 +256,8 @@ Id Id } } - ///Request for StartJob - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + ///Request for StartJob + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public partial class StartRollupJobRequest : PlainRequestBase, IStartRollupJobRequest { protected IStartRollupJobRequest Self => this; @@ -290,8 +290,8 @@ Id Id } } - ///Request for StopJob - ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. + ///Request for StopJob + ///Note: Experimental within the Elasticsearch server, this functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. public partial class StopRollupJobRequest : PlainRequestBase, IStopRollupJobRequest { protected IStopRollupJobRequest Self => this; diff --git a/src/Nest/Requests.Security.cs b/src/Nest/Requests.Security.cs index fcfdcb299f8..a111e13df83 100644 --- a/src/Nest/Requests.Security.cs +++ b/src/Nest/Requests.Security.cs @@ -36,7 +36,7 @@ public partial interface IAuthenticateRequest : IRequestRequest for Authenticate https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html + ///Request for Authenticate https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-authenticate.html public partial class AuthenticateRequest : PlainRequestBase, IAuthenticateRequest { protected IAuthenticateRequest Self => this; @@ -55,7 +55,7 @@ Name Username } } - ///Request for ChangePassword https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html + ///Request for ChangePassword https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html public partial class ChangePasswordRequest : PlainRequestBase, IChangePasswordRequest { protected IChangePasswordRequest Self => this; @@ -96,7 +96,7 @@ Names Realms } } - ///Request for ClearCachedRealms https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html + ///Request for ClearCachedRealms https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html public partial class ClearCachedRealmsRequest : PlainRequestBase, IClearCachedRealmsRequest { protected IClearCachedRealmsRequest Self => this; @@ -135,7 +135,7 @@ Names Name } } - ///Request for ClearCachedRoles https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html + ///Request for ClearCachedRoles https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-role-cache.html public partial class ClearCachedRolesRequest : PlainRequestBase, IClearCachedRolesRequest { protected IClearCachedRolesRequest Self => this; @@ -163,7 +163,7 @@ public partial interface ICreateApiKeyRequest : IRequestRequest for CreateApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html + ///Request for CreateApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html public partial class CreateApiKeyRequest : PlainRequestBase, ICreateApiKeyRequest { protected ICreateApiKeyRequest Self => this; @@ -197,7 +197,7 @@ Name Name } } - ///Request for DeletePrivileges TODO + ///Request for DeletePrivileges TODO public partial class DeletePrivilegesRequest : PlainRequestBase, IDeletePrivilegesRequest { protected IDeletePrivilegesRequest Self => this; @@ -242,7 +242,7 @@ Name Name } } - ///Request for DeleteRole https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html + ///Request for DeleteRole https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role.html public partial class DeleteRoleRequest : PlainRequestBase, IDeleteRoleRequest { protected IDeleteRoleRequest Self => this; @@ -284,7 +284,7 @@ Name Name } } - ///Request for DeleteRoleMapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html + ///Request for DeleteRoleMapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-role-mapping.html public partial class DeleteRoleMappingRequest : PlainRequestBase, IDeleteRoleMappingRequest { protected IDeleteRoleMappingRequest Self => this; @@ -326,7 +326,7 @@ Name Username } } - ///Request for DeleteUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html + ///Request for DeleteUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-user.html public partial class DeleteUserRequest : PlainRequestBase, IDeleteUserRequest { protected IDeleteUserRequest Self => this; @@ -368,7 +368,7 @@ Name Username } } - ///Request for DisableUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html + ///Request for DisableUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-disable-user.html public partial class DisableUserRequest : PlainRequestBase, IDisableUserRequest { protected IDisableUserRequest Self => this; @@ -410,7 +410,7 @@ Name Username } } - ///Request for EnableUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html + ///Request for EnableUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-enable-user.html public partial class EnableUserRequest : PlainRequestBase, IEnableUserRequest { protected IEnableUserRequest Self => this; @@ -447,7 +447,7 @@ public partial interface IGetApiKeyRequest : IRequestRequest for GetApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html + ///Request for GetApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html public partial class GetApiKeyRequest : PlainRequestBase, IGetApiKeyRequest { protected IGetApiKeyRequest Self => this; @@ -499,7 +499,7 @@ Name Name } } - ///Request for GetPrivileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html + ///Request for GetPrivileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html public partial class GetPrivilegesRequest : PlainRequestBase, IGetPrivilegesRequest { protected IGetPrivilegesRequest Self => this; @@ -540,7 +540,7 @@ Name Name } } - ///Request for GetRole https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html + ///Request for GetRole https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html public partial class GetRoleRequest : PlainRequestBase, IGetRoleRequest { protected IGetRoleRequest Self => this; @@ -572,7 +572,7 @@ Name Name } } - ///Request for GetRoleMapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html + ///Request for GetRoleMapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role-mapping.html public partial class GetRoleMappingRequest : PlainRequestBase, IGetRoleMappingRequest { protected IGetRoleMappingRequest Self => this; @@ -599,7 +599,7 @@ public partial interface IGetUserAccessTokenRequest : IRequestRequest for GetUserAccessToken https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html + ///Request for GetUserAccessToken https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-token.html public partial class GetUserAccessTokenRequest : PlainRequestBase, IGetUserAccessTokenRequest { protected IGetUserAccessTokenRequest Self => this; @@ -618,7 +618,7 @@ Names Username } } - ///Request for GetUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html + ///Request for GetUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html public partial class GetUserRequest : PlainRequestBase, IGetUserRequest { protected IGetUserRequest Self => this; @@ -645,7 +645,7 @@ public partial interface IGetUserPrivilegesRequest : IRequestRequest for GetUserPrivileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html + ///Request for GetUserPrivileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html public partial class GetUserPrivilegesRequest : PlainRequestBase, IGetUserPrivilegesRequest { protected IGetUserPrivilegesRequest Self => this; @@ -664,7 +664,7 @@ Name User } } - ///Request for HasPrivileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html + ///Request for HasPrivileges https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html public partial class HasPrivilegesRequest : PlainRequestBase, IHasPrivilegesRequest { protected IHasPrivilegesRequest Self => this; @@ -691,7 +691,7 @@ public partial interface IInvalidateApiKeyRequest : IRequestRequest for InvalidateApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html + ///Request for InvalidateApiKey https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html public partial class InvalidateApiKeyRequest : PlainRequestBase, IInvalidateApiKeyRequest { protected IInvalidateApiKeyRequest Self => this; @@ -705,7 +705,7 @@ public partial interface IInvalidateUserAccessTokenRequest : IRequestRequest for InvalidateUserAccessToken https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html + ///Request for InvalidateUserAccessToken https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-token.html public partial class InvalidateUserAccessTokenRequest : PlainRequestBase, IInvalidateUserAccessTokenRequest { protected IInvalidateUserAccessTokenRequest Self => this; @@ -719,7 +719,7 @@ public partial interface IPutPrivilegesRequest : IRequestRequest for PutPrivileges TODO + ///Request for PutPrivileges TODO public partial class PutPrivilegesRequest : PlainRequestBase, IPutPrivilegesRequest { protected IPutPrivilegesRequest Self => this; @@ -747,7 +747,7 @@ Name Name } } - ///Request for PutRole https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html + ///Request for PutRole https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html public partial class PutRoleRequest : PlainRequestBase, IPutRoleRequest { protected IPutRoleRequest Self => this; @@ -789,7 +789,7 @@ Name Name } } - ///Request for PutRoleMapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html + ///Request for PutRoleMapping https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role-mapping.html public partial class PutRoleMappingRequest : PlainRequestBase, IPutRoleMappingRequest { protected IPutRoleMappingRequest Self => this; @@ -831,7 +831,7 @@ Name Username } } - ///Request for PutUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html + ///Request for PutUser https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html public partial class PutUserRequest : PlainRequestBase, IPutUserRequest { protected IPutUserRequest Self => this; @@ -868,7 +868,7 @@ public partial interface IGetCertificatesRequest : IRequestRequest for GetCertificates https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html + ///Request for GetCertificates https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-ssl.html public partial class GetCertificatesRequest : PlainRequestBase, IGetCertificatesRequest { protected IGetCertificatesRequest Self => this; diff --git a/src/Nest/Requests.Snapshot.cs b/src/Nest/Requests.Snapshot.cs index 6af18c343b8..799b14d4146 100644 --- a/src/Nest/Requests.Snapshot.cs +++ b/src/Nest/Requests.Snapshot.cs @@ -47,7 +47,7 @@ Name Snapshot } } - ///Request for Snapshot https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request for Snapshot https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public partial class SnapshotRequest : PlainRequestBase, ISnapshotRequest { protected ISnapshotRequest Self => this; @@ -96,7 +96,7 @@ Name RepositoryName } } - ///Request for CreateRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request for CreateRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public partial class CreateRepositoryRequest : PlainRequestBase, ICreateRepositoryRequest { protected ICreateRepositoryRequest Self => this; @@ -155,7 +155,7 @@ Name Snapshot } } - ///Request for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request for Delete https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public partial class DeleteSnapshotRequest : PlainRequestBase, IDeleteSnapshotRequest { protected IDeleteSnapshotRequest Self => this; @@ -197,7 +197,7 @@ Names RepositoryName } } - ///Request for DeleteRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request for DeleteRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public partial class DeleteRepositoryRequest : PlainRequestBase, IDeleteRepositoryRequest { protected IDeleteRepositoryRequest Self => this; @@ -249,7 +249,7 @@ Names Snapshot } } - ///Request for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request for Get https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public partial class GetSnapshotRequest : PlainRequestBase, IGetSnapshotRequest { protected IGetSnapshotRequest Self => this; @@ -305,7 +305,7 @@ Names RepositoryName } } - ///Request for GetRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request for GetRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public partial class GetRepositoryRequest : PlainRequestBase, IGetRepositoryRequest { protected IGetRepositoryRequest Self => this; @@ -356,7 +356,7 @@ Name Snapshot } } - ///Request for Restore https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request for Restore https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public partial class RestoreRequest : PlainRequestBase, IRestoreRequest { protected IRestoreRequest Self => this; @@ -411,7 +411,7 @@ Names Snapshot } } - ///Request for Status https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request for Status https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public partial class SnapshotStatusRequest : PlainRequestBase, ISnapshotStatusRequest { protected ISnapshotStatusRequest Self => this; @@ -465,7 +465,7 @@ Name RepositoryName } } - ///Request for VerifyRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + ///Request for VerifyRepository https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html public partial class VerifyRepositoryRequest : PlainRequestBase, IVerifyRepositoryRequest { protected IVerifyRepositoryRequest Self => this; diff --git a/src/Nest/Requests.Sql.cs b/src/Nest/Requests.Sql.cs index 3bdb7ebbb0a..0a14754b6d1 100644 --- a/src/Nest/Requests.Sql.cs +++ b/src/Nest/Requests.Sql.cs @@ -36,7 +36,7 @@ public partial interface IClearSqlCursorRequest : IRequestRequest for ClearCursor Clear SQL cursor + ///Request for ClearCursor Clear SQL cursor public partial class ClearSqlCursorRequest : PlainRequestBase, IClearSqlCursorRequest { protected IClearSqlCursorRequest Self => this; @@ -50,7 +50,7 @@ public partial interface IQuerySqlRequest : IRequest { } - ///Request for Query Execute SQL + ///Request for Query Execute SQL public partial class QuerySqlRequest : PlainRequestBase, IQuerySqlRequest { protected IQuerySqlRequest Self => this; @@ -70,7 +70,7 @@ public partial interface ITranslateSqlRequest : IRequestRequest for Translate Translate SQL into Elasticsearch queries + ///Request for Translate Translate SQL into Elasticsearch queries public partial class TranslateSqlRequest : PlainRequestBase, ITranslateSqlRequest { protected ITranslateSqlRequest Self => this; diff --git a/src/Nest/Requests.Tasks.cs b/src/Nest/Requests.Tasks.cs index 7ac13c956c7..925680dfb5c 100644 --- a/src/Nest/Requests.Tasks.cs +++ b/src/Nest/Requests.Tasks.cs @@ -41,7 +41,7 @@ TaskId TaskId } } - ///Request for Cancel https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + ///Request for Cancel https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html public partial class CancelTasksRequest : PlainRequestBase, ICancelTasksRequest { protected ICancelTasksRequest Self => this; @@ -96,7 +96,7 @@ TaskId TaskId } } - ///Request for GetTask https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + ///Request for GetTask https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html public partial class GetTaskRequest : PlainRequestBase, IGetTaskRequest { protected IGetTaskRequest Self => this; @@ -137,7 +137,7 @@ public partial interface IListTasksRequest : IRequestRequest for List https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html + ///Request for List https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html public partial class ListTasksRequest : PlainRequestBase, IListTasksRequest { protected IListTasksRequest Self => this; diff --git a/src/Nest/Requests.Watcher.cs b/src/Nest/Requests.Watcher.cs index bcea5fdc28c..a989a9a273a 100644 --- a/src/Nest/Requests.Watcher.cs +++ b/src/Nest/Requests.Watcher.cs @@ -47,7 +47,7 @@ Ids ActionId } } - ///Request for Acknowledge http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html + ///Request for Acknowledge http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-ack-watch.html public partial class AcknowledgeWatchRequest : PlainRequestBase, IAcknowledgeWatchRequest { protected IAcknowledgeWatchRequest Self => this; @@ -89,7 +89,7 @@ Id WatchId } } - ///Request for Activate https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html + ///Request for Activate https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-activate-watch.html public partial class ActivateWatchRequest : PlainRequestBase, IActivateWatchRequest { protected IActivateWatchRequest Self => this; @@ -122,7 +122,7 @@ Id WatchId } } - ///Request for Deactivate https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html + ///Request for Deactivate https://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-deactivate-watch.html public partial class DeactivateWatchRequest : PlainRequestBase, IDeactivateWatchRequest { protected IDeactivateWatchRequest Self => this; @@ -155,7 +155,7 @@ Id Id } } - ///Request for Delete http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html + ///Request for Delete http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-delete-watch.html public partial class DeleteWatchRequest : PlainRequestBase, IDeleteWatchRequest { protected IDeleteWatchRequest Self => this; @@ -188,7 +188,7 @@ Id Id } } - ///Request for Execute http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html + ///Request for Execute http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-execute-watch.html public partial class ExecuteWatchRequest : PlainRequestBase, IExecuteWatchRequest { protected IExecuteWatchRequest Self => this; @@ -226,7 +226,7 @@ Id Id } } - ///Request for Get http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html + ///Request for Get http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-get-watch.html public partial class GetWatchRequest : PlainRequestBase, IGetWatchRequest { protected IGetWatchRequest Self => this; @@ -259,7 +259,7 @@ Id Id } } - ///Request for Put http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html + ///Request for Put http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-put-watch.html public partial class PutWatchRequest : PlainRequestBase, IPutWatchRequest { protected IPutWatchRequest Self => this; @@ -314,7 +314,7 @@ public partial interface IStartWatcherRequest : IRequestRequest for Start http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html + ///Request for Start http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-start.html public partial class StartWatcherRequest : PlainRequestBase, IStartWatcherRequest { protected IStartWatcherRequest Self => this; @@ -333,7 +333,7 @@ Metrics Metric } } - ///Request for Stats http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html + ///Request for Stats http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stats.html public partial class WatcherStatsRequest : PlainRequestBase, IWatcherStatsRequest { protected IWatcherStatsRequest Self => this; @@ -366,7 +366,7 @@ public partial interface IStopWatcherRequest : IRequestRequest for Stop http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html + ///Request for Stop http://www.elastic.co/guide/en/elasticsearch/reference/current/watcher-api-stop.html public partial class StopWatcherRequest : PlainRequestBase, IStopWatcherRequest { protected IStopWatcherRequest Self => this; diff --git a/src/Nest/Requests.XPack.cs b/src/Nest/Requests.XPack.cs index 77803bd3454..50cf9315472 100644 --- a/src/Nest/Requests.XPack.cs +++ b/src/Nest/Requests.XPack.cs @@ -36,7 +36,7 @@ public partial interface IXPackInfoRequest : IRequestRequest for Info https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html + ///Request for Info https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html public partial class XPackInfoRequest : PlainRequestBase, IXPackInfoRequest { protected IXPackInfoRequest Self => this; @@ -56,7 +56,7 @@ public partial interface IXPackUsageRequest : IRequestRequest for Usage Retrieve information about xpack features usage + ///Request for Usage Retrieve information about xpack features usage public partial class XPackUsageRequest : PlainRequestBase, IXPackUsageRequest { protected IXPackUsageRequest Self => this; From cf628722319e89af45677230fc0d5b07871130fd Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 8 Oct 2019 21:36:12 +0200 Subject: [PATCH 77/85] unit test for __arbitrary_key__ used the wrong meaning --- .../Tests/ClientConcepts/LowLevel/LowLevelResponseTypes.doc.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tests/Tests/ClientConcepts/LowLevel/LowLevelResponseTypes.doc.cs b/src/Tests/Tests/ClientConcepts/LowLevel/LowLevelResponseTypes.doc.cs index ea73fa6a5ff..9b572c38661 100644 --- a/src/Tests/Tests/ClientConcepts/LowLevel/LowLevelResponseTypes.doc.cs +++ b/src/Tests/Tests/ClientConcepts/LowLevel/LowLevelResponseTypes.doc.cs @@ -77,7 +77,7 @@ [U] public void DynamicResponse() response.Get("object._arbitrary_key_").Should() .NotBeEmpty() - .And.Be("value1"); + .And.Be("first"); response.Get("array.1").Should().Be(2); response.Get("array.1").Should().Be(2); From 139fdad12dad7d2c2fdc3574ac225f3eebeceb98 Mon Sep 17 00:00:00 2001 From: Russ Cam Date: Mon, 14 Oct 2019 18:12:25 +1000 Subject: [PATCH 78/85] Add PowerShell scripts to run on Windows This commit adds Powershell script equivalents of the ci shell scripts, to allow yaml tests to run on Windows with Docker --- .ci/run-elasticsearch.ps1 | 252 ++++++++++++++++++++++++++++++++++++++ .ci/run-tests.ps1 | 80 ++++++++++++ 2 files changed, 332 insertions(+) create mode 100644 .ci/run-elasticsearch.ps1 create mode 100644 .ci/run-tests.ps1 diff --git a/.ci/run-elasticsearch.ps1 b/.ci/run-elasticsearch.ps1 new file mode 100644 index 00000000000..37fb5914092 --- /dev/null +++ b/.ci/run-elasticsearch.ps1 @@ -0,0 +1,252 @@ +# Launch one or more Elasticsearch nodes via the Docker image, +# to form a cluster suitable for running the REST API tests. +# +# Export the ELASTICSEARCH_VERSION variable, eg. 'elasticsearch:8.0.0-SNAPSHOT'. + +param( + [string] + $NODE_NAME, + + [string] + $MASTER_NODE_NAME, + + [string] + $CLUSTER_NAME, + + [int] + $HTTP_PORT = 9200, + + [string] + $ELASTIC_PASSWORD = "changeme", + + [string] + $SSL_CERT = "$PWD/certs/testnode.crt", + + [string] + $SSL_KEY = "$PWD/certs/testnode.key", + + [string] + $SSL_CA = "$PWD/certs/ca.crt", + + [switch] + $DETACH, + + [switch] + $CLEANUP, + + [string] + $NETWORK_NAME + +) + +trap { + cleanup +} + +$ESC = [char]27 + +if ($null -eq $env:ELASTICSEARCH_VERSION) { + Write-Error "ERROR: Required environment variable [ELASTICSEARCH_VERSION] not set" + exit 1 +} + +$moniker = $env:ELASTICSEARCH_VERSION -replace "[^a-zA-Z\d]", "-" +$suffix = "rest-test" + +if (!$NODE_NAME) { + $NODE_NAME = "${moniker}node1" +} + +if (!$MASTER_NODE_NAME) { + $MASTER_NODE_NAME = $NODE_NAME +} + +if (!$CLUSTER_NAME) { + $CLUSTER_NAME = "${moniker}${suffix}" +} + +$volume_name = "${NODE_NAME}-${suffix}-data" + +if (!$NETWORK_NAME) { + $NETWORK_NAME= "${moniker}${suffix}" +} + + +function cleanup_volume { + param( + [string] + $Name + ) + + if ("$(docker volume ls --quiet --filter name="$Name")") { + Write-Output "$ESC[34;1mINFO:$ESC[0m Removing volume $Name$ESC[0m" + docker volume rm "$Name" + } +} +function cleanup_node { + param( + [string] + $Name + ) + + if ("$(docker ps --quiet --filter name="$Name")") { + Write-Output "$ESC[34;1mINFO:$ESC[0m Removing container $Name$ESC[0m" + docker container rm --force --volumes "$Name" + cleanup_volume "$Name-${suffix}-data" + } +} +function cleanup_network { + param( + [string] + $Name + ) + + if ("$(docker network ls --quiet --filter name="$Name")") { + Write-Output "$ESC[34;1mINFO:$ESC[0m Removing network ${Name}$ESC[0m" + docker network rm "$Name" + } +} + +function cleanup { + param( + [switch] + $Cleanup + ) + + if ((-not $DETACH) -or $Cleanup) { + Write-Output "$ESC[34;1mINFO:$ESC[0m clean the node and volume on startup (1) OR on exit if not detached$ESC[0m" + cleanup_node "$NODE_NAME" + } + if (-not $DETACH) { + Write-Output "$ESC[34;1mINFO:$ESC[0m clean the network if not detached (start and exit)$ESC[0m" + cleanup_network "$NETWORK_NAME" + } +} + +if ($CLEANUP) { + #trap - EXIT + if ("$(docker network ls --quiet --filter name=${NETWORK_NAME})" -eq "") { + Write-Output "$ESC[34;1mINFO:$ESC[0m $NETWORK_NAME is already deleted$ESC[0m" + exit 0 + } + $containers = $(docker network inspect --format '{{ range $key, $value := .Containers }}{{ printf "%s\n" .Name}}{{ end }}' ${NETWORK_NAME}) + + foreach($container in $containers) { + cleanup_node "$container" + } + + cleanup_network "$NETWORK_NAME" + Write-Output "$ESC[32;1mSUCCESS:$ESC[0m Cleaned up and exiting$ESC[0m" + exit 0 +} + +Write-Output "$ESC[34;1mINFO:$ESC[0m Making sure previous run leftover infrastructure is removed$ESC[0m" +cleanup -Cleanup + +Write-Output "$ESC[34;1mINFO:$ESC[0m Creating network $NETWORK_NAME if it does not exist already$ESC[0m" + +docker network inspect "$NETWORK_NAME" | Out-Null +if ($LASTEXITCODE -ne 0) { + docker network create "$NETWORK_NAME" +} + +$environment = @( + "--env", "node.name=`"$NODE_NAME`"", + "--env", "cluster.name=`"$CLUSTER_NAME`"", + "--env", "cluster.initial_master_nodes=`"$MASTER_NODE_NAME`"", + "--env", "discovery.seed_hosts=`"$MASTER_NODE_NAME`"", + "--env", "cluster.routing.allocation.disk.threshold_enabled=false", + "--env", "bootstrap.memory_lock=true", + "--env", "node.attr.testattr=test", + "--env", "path.repo=/tmp", + "--env", "repositories.url.allowed_urls=http://snapshot.test*" +) + +$volumes = @( + "--volume", "${volume_name}:/usr/share/elasticsearch/data" +) + +if (-not $env:ELASTICSEARCH_VERSION -contains "oss") { + $environment += @( + "--env", "ELASTIC_PASSWORD=`"$ELASTIC_PASSWORD`"", + "--env", "xpack.license.self_generated.type=trial", + "--env", "xpack.security.enabled=true", + "--env", "xpack.security.http.ssl.enabled=true", + "--env", "xpack.security.http.ssl.verification_mode=certificate", + "--env", "xpack.security.http.ssl.key=certs/testnode.key", + "--env", "xpack.security.http.ssl.certificate=certs/testnode.crt", + "--env", "xpack.security.http.ssl.certificate_authorities=certs/ca.crt", + "--env", "xpack.security.transport.ssl.enabled=true", + "--env", "xpack.security.transport.ssl.key=certs/testnode.key", + "--env", "xpack.security.transport.ssl.certificate=certs/testnode.crt", + "--env", "xpack.security.transport.ssl.certificate_authorities=certs/ca.crt" + ) + + $volumes += @( + "--volume", "`"${SSL_CERT}`":/usr/share/elasticsearch/config/certs/testnode.crt", + "--volume", "`"${SSL_KEY}`":/usr/share/elasticsearch/config/certs/testnode.key", + "--volume", "`"${SSL_CA}`":/usr/share/elasticsearch/config/certs/ca.crt" + ) +} + +$url="http://$NODE_NAME" +if (-not $env:ELASTICSEARCH_VERSION -contains "oss") { + $url="https://elastic:$ELASTIC_PASSWORD@$NODE_NAME" +} + +Write-Output "$ESC[34;1mINFO:$ESC[0m Starting container $NODE_NAME $ESC[0m" + +if ($DETACH) { + $d = "true" +} else { + $d = "false" +} + +docker run ` + --name "`"$NODE_NAME`"" ` + --network "`"$NETWORK_NAME`"" ` + --env ES_JAVA_OPTS=-"`"Xms1g -Xmx1g`"" ` + $environment ` + $volumes ` + --publish ${HTTP_PORT}:9200 ` + --ulimit nofile=65536:65536 ` + --ulimit memlock=-1:-1 ` + --detach="$d" ` + --health-cmd="`"curl --silent --fail ${url}:9200/_cluster/health || exit 1`"" ` + --health-interval=2s ` + --health-retries=20 ` + --health-timeout=2s ` + --rm docker.elastic.co/elasticsearch/"$($env:ELASTICSEARCH_VERSION)" + + +if ($DETACH) { + while("$(docker inspect -f '{{.State.Health.Status}}' ${NODE_NAME})" -eq "starting") { + Start-Sleep 2; + Write-Output "" + Write-Output "$ESC[34;1mINFO:$ESC[0m waiting for node $NODE_NAME to be up$ESC[0m" + } + + # Always show the node getting started logs, this is very useful both on CI as well as while developing + docker logs "$NODE_NAME" + + if ("$(docker inspect -f '{{.State.Health.Status}}' ${NODE_NAME})" -ne "healthy") { + cleanup -Cleanup + Write-Output "" + Write-Output "$ESC[31;1mERROR:$ESC[0m Failed to start $($env:ELASTICSEARCH_VERSION) in detached mode beyond health checks$ESC[0m" + Write-Output "$ESC[31;1mERROR:$ESC[0m dumped the docker log before shutting the node down$ESC[0m" + exit 1 + } else { + Write-Output "" + Write-Output "$ESC[32;1mSUCCESS:$ESC[0m Detached and healthy: ${NODE_NAME} on docker network: ${NETWORK_NAME}$ESC[0m" + $es_host = $url + if (!$es_host) { + $es_host = $NODE_NAME + } + if (!$es_host) { + $es_host = "localhost" + } + + Write-Output "$ESC[32;1mSUCCESS:$ESC[0m Running on: ${es_host}:${HTTP_PORT}$ESC[0m" + exit 0 + } +} diff --git a/.ci/run-tests.ps1 b/.ci/run-tests.ps1 new file mode 100644 index 00000000000..ab588d1e5ed --- /dev/null +++ b/.ci/run-tests.ps1 @@ -0,0 +1,80 @@ +param ( + [string] + [Parameter(Mandatory = $true)] + $ELASTICSEARCH_VERSION, + + [string] + [ValidateSet("oss", "xpack")] + $TEST_SUITE = "oss", + + [string] + $DOTNET_VERSION = "3.0.100" +) + +trap { + cleanup +} + +$NODE_NAME = "es1" +$repo = $PWD +$elasticsearch_image= "elasticsearch" +$elasticsearch_url = "https://elastic:changeme@${NODE_NAME}:9200" + +if ($TEST_SUITE -ne "xpack") { + $elasticsearch_image= "elasticsearch-${TEST_SUITE}" + $elasticsearch_url = "http://${NODE_NAME}:9200" +} + +# set for run-elasticsearch.ps1 +$env:ELASTICSEARCH_VERSION = "${elasticsearch_image}:$ELASTICSEARCH_VERSION" + +function cleanup { + $status=$? + + $runParams = @{ + NODE_NAME= $NODE_NAME + NETWORK_NAME = "elasticsearch" + CLEANUP = $true + } + + ./.ci/run-elasticsearch.ps1 @runParams + + # Report status and exit + if ($status -eq 0) { + Write-Output "SUCCESS run-tests" + exit 0 + } else { + Write-Output "FAILURE during run-tests" + exit $status + } +} + + +Write-Output ">>>>> Start [$env:ELASTICSEARCH_VERSION container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>" + +$runParams = @{ + NODE_NAME= "$NODE_NAME" + NETWORK_NAME = "elasticsearch" + DETACH = $true +} + +./.ci/run-elasticsearch.ps1 @runParams + +Write-Output ">>>>> Build [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>" + +docker build --file .ci/DockerFile --tag elastic/elasticsearch-net . + +Write-Output ">>>>> Run [elastic/elasticsearch-net container] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>" + +mkdir -p build/output -ErrorAction Ignore + +docker run ` +--network=elasticsearch ` +--env "DOTNET_VERSION=$DOTNET_VERSION" ` +--name test-runner ` +--volume ${repo}/build/output:/sln/build/output ` +--rm ` +elastic/elasticsearch-net ` +./build.sh rest-spec-tests -f create -e $elasticsearch_url -o /sln/build/output/rest-spec-junit.xml + +cleanup \ No newline at end of file From 7d6daa3d4a20904e77cfdbebcdf5e245b6d36db1 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 15 Oct 2019 10:07:24 +0200 Subject: [PATCH 79/85] added --profile switch to yaml runner that waits before running the tests and prints the PID --- src/Elasticsearch.Net/Elasticsearch.Net.csproj | 3 +++ src/Tests/Tests.YamlRunner/Program.fs | 9 ++++++++- src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Elasticsearch.Net/Elasticsearch.Net.csproj b/src/Elasticsearch.Net/Elasticsearch.Net.csproj index 5942135cc34..99aef017882 100644 --- a/src/Elasticsearch.Net/Elasticsearch.Net.csproj +++ b/src/Elasticsearch.Net/Elasticsearch.Net.csproj @@ -8,6 +8,9 @@ $(DefineConstants);NETSTANDARD 8.0 + false + true + portable diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index 928da49a18d..048db03a2bb 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -14,6 +14,7 @@ type Arguments = | []Endpoint of string | []Revision of string | []JUnitOutputFile of string + | []Profile of bool with interface IArgParserTemplate with member s.Usage = @@ -24,6 +25,7 @@ type Arguments = | TestFile _ -> "Only run tests starting with this filename" | Endpoint _ -> "The elasticsearch endpoint to run tests against" | JUnitOutputFile _ -> "The path and file name to use for the junit xml output, defaults to a random tmp filename" + | Profile _ -> "Print out process id and wait for confirmation to kick off the tests" let private runningProxy = Process.GetProcessesByName("fiddler").Length + Process.GetProcessesByName("mitmproxy").Length > 0 let private defaultEndpoint = @@ -66,6 +68,7 @@ let runMain (parsed:ParseResults) = async { let directory = parsed.TryGetResult Folder //|> Option.defaultValue "indices.create" |> Some let file = parsed.TryGetResult TestFile //|> Option.defaultValue "10_basic.yml" |> Some let endpoint = parsed.TryGetResult Endpoint |> Option.defaultValue defaultEndpoint + let profile = parsed.TryGetResult Profile |> Option.defaultValue false let passedRevision = parsed.TryGetResult Revision let outputFile = parsed.TryGetResult JUnitOutputFile @@ -76,7 +79,11 @@ let runMain (parsed:ParseResults) = async { printfn "Found version %s downloading specs from: %s" version revision let! locateResults = Commands.LocateTests namedSuite revision directory file - let readResults = Commands.ReadTests locateResults + let readResults = Commands.ReadTests locateResults + if profile then + printf "Waiting for profiler to attach to pid: %O" <| Process.GetCurrentProcess().Id + Console.ReadKey() |> ignore + let! runResults = Commands.RunTests readResults client let summary = Commands.ExportTests runResults outputFile diff --git a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj index e9e4f1e194b..b10614a8d55 100644 --- a/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj +++ b/src/Tests/Tests.YamlRunner/Tests.YamlRunner.fsproj @@ -4,6 +4,9 @@ Exe netcoreapp3.0 latest + false + true + portable From b541715729cdd441d4100e325c3cc85c1732e026 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 15 Oct 2019 12:00:36 +0200 Subject: [PATCH 80/85] update ci jobs go-elasticsearch references --- .ci/jobs/elastic+elasticsearch-net+7.x.yml | 6 +++--- .ci/jobs/elastic+elasticsearch-net+master.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.ci/jobs/elastic+elasticsearch-net+7.x.yml b/.ci/jobs/elastic+elasticsearch-net+7.x.yml index 4a34e342e0a..c841dc118da 100755 --- a/.ci/jobs/elastic+elasticsearch-net+7.x.yml +++ b/.ci/jobs/elastic+elasticsearch-net+7.x.yml @@ -1,8 +1,8 @@ --- - job: - name: elastic+go-elasticsearch+7.x - display-name: 'elastic / go-elasticsearch # 7.x' - description: Testing the go-elasticsearch 7.x branch. + name: elastic+elasticsearch-net+7.x + display-name: 'elastic / elasticsearch-net # 7.x' + description: Testing the elasticsearch-net 7.x branch. junit_results: "*-junit.xml" parameters: - string: diff --git a/.ci/jobs/elastic+elasticsearch-net+master.yml b/.ci/jobs/elastic+elasticsearch-net+master.yml index 1184437da1e..f689de3050c 100755 --- a/.ci/jobs/elastic+elasticsearch-net+master.yml +++ b/.ci/jobs/elastic+elasticsearch-net+master.yml @@ -1,8 +1,8 @@ --- - job: - name: elastic+go-elasticsearch+master - display-name: 'elastic / go-elasticsearch # master' - description: Testing the go-elasticsearch master branch. + name: elastic+elasticsearch-net+master + display-name: 'elastic / elasticsearch-net # master' + description: Testing the elasticsearch-net master branch. junit_results: "*-junit.xml" parameters: - string: From 4bdd60ccff61ead8bb07735ac4fca4563dac1944 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 15 Oct 2019 12:02:28 +0200 Subject: [PATCH 81/85] Update src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs Co-Authored-By: Russ Cam --- src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs b/src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs index 2e2753d7387..40eb3245070 100644 --- a/src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs +++ b/src/Elasticsearch.Net/Responses/Dynamic/DynamicDictionary.cs @@ -38,7 +38,7 @@ public int Count } /// - /// Create a regular dictionary as shallow copy + /// Creates a new instance of Dictionary{String,Object} using the keys and underlying object values of this DynamicDictionary instance's key values. /// /// public Dictionary ToDictionary() => _backingDictionary.ToDictionary(kv => kv.Key, kv => kv.Value.Value); From a5220353c8e201e6a18bd1773c1e370d63f2e831 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 15 Oct 2019 12:06:48 +0200 Subject: [PATCH 82/85] only automatically set proxy on client if we see mitmproxy running --- src/Tests/Tests.YamlRunner/Program.fs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/Program.fs b/src/Tests/Tests.YamlRunner/Program.fs index 048db03a2bb..cff417b6b60 100644 --- a/src/Tests/Tests.YamlRunner/Program.fs +++ b/src/Tests/Tests.YamlRunner/Program.fs @@ -27,7 +27,8 @@ type Arguments = | JUnitOutputFile _ -> "The path and file name to use for the junit xml output, defaults to a random tmp filename" | Profile _ -> "Print out process id and wait for confirmation to kick off the tests" -let private runningProxy = Process.GetProcessesByName("fiddler").Length + Process.GetProcessesByName("mitmproxy").Length > 0 +let private runningMitmProxy = Process.GetProcessesByName("mitmproxy").Length > 0 +let private runningProxy = runningMitmProxy || Process.GetProcessesByName("fiddler").Length > 0 let private defaultEndpoint = let defaultHost = if runningProxy then "ipv4.fiddler" else "localhost"; sprintf "http://%s:9200" defaultHost; @@ -36,7 +37,7 @@ let private createClient endpoint = let uri = new Uri(endpoint) let settings = new ConnectionConfiguration(uri) let settings = - match runningProxy with + match runningMitmProxy with | true -> settings.Proxy(Uri("http://ipv4.fiddler:8080"), String(null), String(null)) | _ -> settings new ElasticLowLevelClient(settings) From b9b202b11a366b9eb44450a2c0c5e5099589afe3 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 15 Oct 2019 12:08:50 +0200 Subject: [PATCH 83/85] Update src/Tests/Tests.YamlRunner/DoMapper.fs Co-Authored-By: Russ Cam --- src/Tests/Tests.YamlRunner/DoMapper.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tests/Tests.YamlRunner/DoMapper.fs b/src/Tests/Tests.YamlRunner/DoMapper.fs index 36fae94a2d3..6650806305c 100644 --- a/src/Tests/Tests.YamlRunner/DoMapper.fs +++ b/src/Tests/Tests.YamlRunner/DoMapper.fs @@ -111,7 +111,7 @@ type FastApiInvoke(instance: Object, restName:string, pathParams:KeyedCollection PostData.MultiJson(e.Cast()) | e -> PostData.MultiJson e | :? String as s -> PostData.String s - | value -> PostData.Serializable body :> PostData + | _ -> PostData.Serializable body :> PostData let args = match (foundBody, this.SupportsBody) with From 94fdcf2f3e4cfa935bf20675f4ec383d58e8f81d Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 15 Oct 2019 12:11:44 +0200 Subject: [PATCH 84/85] Update .ci/run-tests Co-Authored-By: Russ Cam --- .ci/run-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/run-tests b/.ci/run-tests index 64bb2684f0c..445c02a9d1f 100755 --- a/.ci/run-tests +++ b/.ci/run-tests @@ -7,7 +7,7 @@ fi set -euxo pipefail TEST_SUITE=${TEST_SUITE-oss} -DOTNET_VERSION=${TEST_SUITE-3.0.100} +DOTNET_VERSION=${DOTNET_VERSION-3.0.100} NODE_NAME=es1 repo=$(pwd) From df577082981337f6734f4db485e851f50edaa9e8 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 15 Oct 2019 12:12:06 +0200 Subject: [PATCH 85/85] Addressed various PR feedback --- src/Tests/Tests.YamlRunner/AsyncExtensions.fs | 2 +- src/Tests/Tests.YamlRunner/DoMapper.fs | 4 ++-- src/Tests/Tests.YamlRunner/TestsLocator.fs | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Tests/Tests.YamlRunner/AsyncExtensions.fs b/src/Tests/Tests.YamlRunner/AsyncExtensions.fs index 63f9e480f3a..0d152617312 100644 --- a/src/Tests/Tests.YamlRunner/AsyncExtensions.fs +++ b/src/Tests/Tests.YamlRunner/AsyncExtensions.fs @@ -15,7 +15,7 @@ module AsyncExtensions = // but for some reason this did not behave as I had expected [] static member inline ForEachAsync (maxDegreeOfParallelism: int) asyncs = async { - let tasks = new List>() + let tasks = new List>(maxDegreeOfParallelism) let results = new List<'a>() for async in asyncs do let! x = Async.StartChildAsTask async diff --git a/src/Tests/Tests.YamlRunner/DoMapper.fs b/src/Tests/Tests.YamlRunner/DoMapper.fs index 36fae94a2d3..ecfec68527b 100644 --- a/src/Tests/Tests.YamlRunner/DoMapper.fs +++ b/src/Tests/Tests.YamlRunner/DoMapper.fs @@ -130,7 +130,7 @@ let getProp (t:Type) prop = t.GetProperty(prop).GetGetMethod() let getRestName (t:Type) a = (getProp t "RestSpecName").Invoke(a, null) :?> String let getParameters (t:Type) a = (getProp t "Parameters").Invoke(a, null) :?> KeyedCollection -let methodsWithAttribute instance mapsApiAttribute = +let private methodsWithAttribute instance mapsApiAttribute = let clientType = instance.GetType() clientType.GetMethods() |> Array.map (fun m -> (m, m.GetCustomAttributes(mapsApiAttribute, false))) @@ -141,7 +141,7 @@ let methodsWithAttribute instance mapsApiAttribute = exception ParamException of string -let createApiLookup (invokers: FastApiInvoke list) : (YamlMap -> FastApiInvoke) = +let private createApiLookup (invokers: FastApiInvoke list) : (YamlMap -> FastApiInvoke) = let first = invokers |> List.head let name = first.ApiName let clientMethod = first.ClientMethodName diff --git a/src/Tests/Tests.YamlRunner/TestsLocator.fs b/src/Tests/Tests.YamlRunner/TestsLocator.fs index ed658f1739a..737c5dae550 100644 --- a/src/Tests/Tests.YamlRunner/TestsLocator.fs +++ b/src/Tests/Tests.YamlRunner/TestsLocator.fs @@ -9,6 +9,10 @@ open Tests.YamlRunner.AsyncExtensions open ShellProgressBar open Tests.YamlRunner + +/// https://api.github.com/repos/elastic/elasticsearch/contents/rest-api-spec/src/main/resources/rest-api-spec/test?ref=master +/// Look into using the content API instead, will be cleaner and involve no html navigation + let ListFolders namedSuite revision directory = async { let url = TestsDownloader.TestGithubRootUrl namedSuite revision let! (_, html) = TestsDownloader.CachedOrDownload revision "_root_" "index.html" url