From 55f3c90528afa7bfa28d8ca9d0213d870339a895 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Jan 2024 09:42:58 +1300 Subject: [PATCH 01/13] Bump Octokit from 9.0.0 to 9.1.0 (#511) * Bump Octokit from 9.0.0 to 9.1.0 Bumps [Octokit](https://github.com/octokit/octokit.net) from 9.0.0 to 9.1.0. - [Release notes](https://github.com/octokit/octokit.net/releases) - [Changelog](https://github.com/octokit/octokit.net/blob/main/docs/releases.md) - [Commits](https://github.com/octokit/octokit.net/compare/v9.0.0...v9.1.0) --- updated-dependencies: - dependency-name: Octokit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Update changelog Signed-off-by: dependabot[bot] --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] --- CHANGELOG.md | 3 ++- build/scripts/scripts.fsproj | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 772cf5df87..c5bb533f30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Bumps `Microsoft.NET.Test.Sdk` from 17.7.2 to 17.8.0 - Bumps `JetBrains.Annotations` from 2023.2.0 to 2023.3.0 - Bumps `Bogus` from 34.0.2 to 35.3.0 +- Bumps `Octokit` from 9.0.0 to 9.1.0 ## [1.6.0] ### Added @@ -142,4 +143,4 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) [1.6.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.5.0...v1.6.0 [1.5.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.4.0...v1.5.0 [1.4.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.3.0...v1.4.0 -[1.3.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.2.0...v1.3.0 +[1.3.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.2.0...v1.3.0 \ No newline at end of file diff --git a/build/scripts/scripts.fsproj b/build/scripts/scripts.fsproj index a9d0c02e02..b38276bda8 100644 --- a/build/scripts/scripts.fsproj +++ b/build/scripts/scripts.fsproj @@ -43,7 +43,7 @@ - + From 0207bdcf8460a5e9877ddc532207dd45cf5af118 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Jan 2024 10:27:04 +1300 Subject: [PATCH 02/13] Bump FSharp.Core from 8.0.100 to 8.0.101 (#512) * Bump FSharp.Core from 8.0.100 to 8.0.101 Bumps [FSharp.Core](https://github.com/dotnet/fsharp) from 8.0.100 to 8.0.101. - [Release notes](https://github.com/dotnet/fsharp/releases) - [Changelog](https://github.com/dotnet/fsharp/blob/main/release-notes.md) - [Commits](https://github.com/dotnet/fsharp/commits) --- updated-dependencies: - dependency-name: FSharp.Core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Update changelog Signed-off-by: dependabot[bot] --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] --- CHANGELOG.md | 1 + tests/Tests.YamlRunner/Tests.YamlRunner.fsproj | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5bb533f30..c741862f74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Bumps `JetBrains.Annotations` from 2023.2.0 to 2023.3.0 - Bumps `Bogus` from 34.0.2 to 35.3.0 - Bumps `Octokit` from 9.0.0 to 9.1.0 +- Bumps `FSharp.Core` from 8.0.100 to 8.0.101 ## [1.6.0] ### Added diff --git a/tests/Tests.YamlRunner/Tests.YamlRunner.fsproj b/tests/Tests.YamlRunner/Tests.YamlRunner.fsproj index f7632125c2..76ff1f8ab3 100644 --- a/tests/Tests.YamlRunner/Tests.YamlRunner.fsproj +++ b/tests/Tests.YamlRunner/Tests.YamlRunner.fsproj @@ -29,7 +29,7 @@ - + From 0d53745f66b313787c63fbff3a501815c26e4465 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Jan 2024 15:25:16 +1300 Subject: [PATCH 03/13] Bump Proc from 0.6.2 to 0.8.0 (#515) * Bump Proc from 0.6.2 to 0.8.0 Bumps [Proc](https://github.com/nullean/proc) from 0.6.2 to 0.8.0. - [Release notes](https://github.com/nullean/proc/releases) - [Commits](https://github.com/nullean/proc/compare/0.6.2...0.8.0) --- updated-dependencies: - dependency-name: Proc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Update changelog Signed-off-by: dependabot[bot] * Fix building Signed-off-by: Thomas Farr * Fix integration tests Signed-off-by: Thomas Farr --------- Signed-off-by: dependabot[bot] Signed-off-by: Thomas Farr Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] Co-authored-by: Thomas Farr --- CHANGELOG.md | 1 + .../Tasks/IClusterComposeTask.cs | 12 +++------- .../Tasks/InstallationTasks/InstallPlugins.cs | 2 +- .../Configuration/NodeSettings.cs | 9 +++----- .../OpenSearch.OpenSearch.Managed.csproj | 2 +- build/scripts/Building.fs | 23 ++++++++++--------- build/scripts/ReposTooling.fs | 13 +++++------ build/scripts/scripts.fsproj | 2 +- tests/Tests.Core/Tests.Core.csproj | 2 +- 9 files changed, 29 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c741862f74..6d3c738c8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Bumps `Bogus` from 34.0.2 to 35.3.0 - Bumps `Octokit` from 9.0.0 to 9.1.0 - Bumps `FSharp.Core` from 8.0.100 to 8.0.101 +- Bumps `Proc` from 0.6.2 to 0.8.0 ## [1.6.0] ### Added diff --git a/abstractions/src/OpenSearch.OpenSearch.Ephemeral/Tasks/IClusterComposeTask.cs b/abstractions/src/OpenSearch.OpenSearch.Ephemeral/Tasks/IClusterComposeTask.cs index 199e363e34..40b200f28a 100644 --- a/abstractions/src/OpenSearch.OpenSearch.Ephemeral/Tasks/IClusterComposeTask.cs +++ b/abstractions/src/OpenSearch.OpenSearch.Ephemeral/Tasks/IClusterComposeTask.cs @@ -172,14 +172,10 @@ protected static void WriteFileIfNotExist(string fileLocation, string contents) protected static void ExecuteBinary(EphemeralClusterConfiguration config, IConsoleLineHandler writer, string binary, string description, params string[] arguments) => - ExecuteBinaryInternal(config, writer, binary, description, null, arguments); - - protected static void ExecuteBinary(EphemeralClusterConfiguration config, IConsoleLineHandler writer, - string binary, string description, StartedHandler startedHandler, params string[] arguments) => - ExecuteBinaryInternal(config, writer, binary, description, startedHandler, arguments); + ExecuteBinaryInternal(config, writer, binary, description, arguments); private static void ExecuteBinaryInternal(EphemeralClusterConfiguration config, IConsoleLineHandler writer, - string binary, string description, StartedHandler startedHandler, params string[] arguments) + string binary, string description, params string[] arguments) { var command = $"{{{binary}}} {{{string.Join(" ", arguments)}}}"; writer?.WriteDiagnostic($"{{{nameof(ExecuteBinary)}}} starting process [{description}] {command}"); @@ -194,9 +190,7 @@ private static void ExecuteBinaryInternal(EphemeralClusterConfiguration config, } }; - var result = startedHandler != null - ? Proc.Start(processStartArguments, timeout, new ConsoleOutColorWriter(), startedHandler) - : Proc.Start(processStartArguments, timeout, new ConsoleOutColorWriter()); + var result = Proc.Start(processStartArguments, timeout, new ConsoleOutColorWriter()); if (!result.Completed) throw new Exception($"Timeout while executing {description} exceeded {timeout}"); diff --git a/abstractions/src/OpenSearch.OpenSearch.Ephemeral/Tasks/InstallationTasks/InstallPlugins.cs b/abstractions/src/OpenSearch.OpenSearch.Ephemeral/Tasks/InstallationTasks/InstallPlugins.cs index c64501038e..c9509b7d03 100644 --- a/abstractions/src/OpenSearch.OpenSearch.Ephemeral/Tasks/InstallationTasks/InstallPlugins.cs +++ b/abstractions/src/OpenSearch.OpenSearch.Ephemeral/Tasks/InstallationTasks/InstallPlugins.cs @@ -99,7 +99,7 @@ public override void Run(IEphemeralCluster cluste cluster.Writer, fs.PluginBinary, $"install opensearch plugin: {plugin.SubProductName}", - "install --batch", GetPluginLocation(plugin, v)); + "install", "--batch", GetPluginLocation(plugin, v)); CopyConfigDirectoryToHomeCacheConfigDirectory(cluster, plugin); } diff --git a/abstractions/src/OpenSearch.OpenSearch.Managed/Configuration/NodeSettings.cs b/abstractions/src/OpenSearch.OpenSearch.Managed/Configuration/NodeSettings.cs index 0ce531141c..ea34663ca7 100644 --- a/abstractions/src/OpenSearch.OpenSearch.Managed/Configuration/NodeSettings.cs +++ b/abstractions/src/OpenSearch.OpenSearch.Managed/Configuration/NodeSettings.cs @@ -56,18 +56,15 @@ public void Add(string setting) public void Add(string key, string value, string versionRange) => Add(new NodeSetting(key, value, versionRange)); - public string[] ToCommandLineArguments(OpenSearchVersion version) - { - var settingArgument = "-E "; - return this + public string[] ToCommandLineArguments(OpenSearchVersion version) => + this //if a node setting is only applicable for a certain version make sure its filtered out .Where(s => string.IsNullOrEmpty(s.VersionRange) || version.InRange(s.VersionRange)) //allow additional settings to take precedence over already DefaultNodeSettings //without relying on opensearch to dedup .GroupBy(setting => setting.Key) .Select(g => g.Last()) - .Select(s => s.Key.StartsWith(settingArgument) ? s.ToString() : $"{settingArgument}{s}") + .SelectMany(s => new[] { "-E", s.ToString() }) .ToArray(); - } } } diff --git a/abstractions/src/OpenSearch.OpenSearch.Managed/OpenSearch.OpenSearch.Managed.csproj b/abstractions/src/OpenSearch.OpenSearch.Managed/OpenSearch.OpenSearch.Managed.csproj index 1024dfc8f4..7b25d45037 100644 --- a/abstractions/src/OpenSearch.OpenSearch.Managed/OpenSearch.OpenSearch.Managed.csproj +++ b/abstractions/src/OpenSearch.OpenSearch.Managed/OpenSearch.OpenSearch.Managed.csproj @@ -13,7 +13,7 @@ - + diff --git a/build/scripts/Building.fs b/build/scripts/Building.fs index 19da39c0ee..93fbdebb65 100644 --- a/build/scripts/Building.fs +++ b/build/scripts/Building.fs @@ -124,29 +124,30 @@ module Build = Shell.rm nuspec deps - - - let rewriteLibFolder libFolder project nugetId dependencies = + + + let rewriteLibFolder libFolder project nugetId dependencies = let info = DirectoryInfo libFolder let tfm = info.Name let fullPath = Path.GetFullPath libFolder - - let mainDll = sprintf "%s.dll" (Path.Combine(fullPath, project)) + + let mainDll = sprintf "%s.dll" (Path.Combine(fullPath, project)) let renamedDll dll = dll |> String.replace ".dll" (sprintf "%i.dll" version.Full.Major) - + printfn "dll: %s Nuget id: %s dependencies: %A" mainDll nugetId dependencies let depAssemblies = dependencies |> Seq.map (fun d -> sprintf "%s.dll" (Path.Combine(Paths.InplaceBuildOutput project tfm, d))) - let dlls = + let args = [mainDll] |> Seq.append depAssemblies |> Seq.map (fun dll -> - sprintf @"-i ""%s"" -o ""%s"" -k ""%s""" dll (renamedDll dll) keyFile + ["-i"; dll; "-o"; renamedDll dll; "-k"; keyFile] ) - - ReposTooling.Rewriter dlls - + |> Seq.concat + + ReposTooling.Rewriter args + Shell.rm mainDll let mainPdb = sprintf "%s.pdb" (Path.Combine(fullPath, project)) if File.exists mainPdb then Shell.rm mainPdb diff --git a/build/scripts/ReposTooling.fs b/build/scripts/ReposTooling.fs index cdd01f8cfe..2005a5a0ad 100644 --- a/build/scripts/ReposTooling.fs +++ b/build/scripts/ReposTooling.fs @@ -64,17 +64,16 @@ module ReposTooling = let folder = Path.getDirectory (Paths.TestProjFile "Tests.YamlRunner") let timeout = TimeSpan.FromMinutes(120.) Tooling.DotNet.ExecInWithTimeout folder (["run"; "--" ] @ args) timeout |> ignore - - + + let restoreOnce = lazy(Tooling.DotNet.Exec ["tool"; "restore"]) - + let private differ = "assembly-differ" let Differ args = restoreOnce.Force() - - let args = args |> String.concat " " - let command = sprintf @"%s %s -o ../../%s" differ args Paths.BuildOutput - Tooling.DotNet.ExecIn Paths.TargetsFolder [command] |> ignore + + let args = [differ] @ args @ ["-o"; $"../../{Paths.BuildOutput}"] + Tooling.DotNet.ExecIn Paths.TargetsFolder args let private assemblyRewriter = "assembly-rewriter" let Rewriter args = diff --git a/build/scripts/scripts.fsproj b/build/scripts/scripts.fsproj index b38276bda8..e2be286bfe 100644 --- a/build/scripts/scripts.fsproj +++ b/build/scripts/scripts.fsproj @@ -44,6 +44,6 @@ - + diff --git a/tests/Tests.Core/Tests.Core.csproj b/tests/Tests.Core/Tests.Core.csproj index 28e285a2dd..b0d0c23f9d 100644 --- a/tests/Tests.Core/Tests.Core.csproj +++ b/tests/Tests.Core/Tests.Core.csproj @@ -23,6 +23,6 @@ - + From 9c649227a01dd9fef296880b1b7280e2cf55d709 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Thu, 18 Jan 2024 03:16:45 +1300 Subject: [PATCH 04/13] Correct duplicated changelog header (#517) Signed-off-by: Thomas Farr --- CHANGELOG.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d3c738c8e..70c23e793b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,12 +12,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed - Fix `HttpConnection.ConvertHttpMethod` to support `Patch` method ([#489](https://github.com/opensearch-project/opensearch-net/pull/489)) - - -### Fixed - Fixed `IEnumerable` property mapping. ([#503](https://github.com/opensearch-project/opensearch-net/pull/503)) - ### Dependencies - Bumps `Microsoft.CodeAnalysis.CSharp` from 4.2.0 to 4.6.0 - Bumps `NSwag.Core.Yaml` from 13.19.0 to 13.20.0 @@ -145,4 +141,4 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) [1.6.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.5.0...v1.6.0 [1.5.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.4.0...v1.5.0 [1.4.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.3.0...v1.4.0 -[1.3.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.2.0...v1.3.0 \ No newline at end of file +[1.3.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.2.0...v1.3.0 From 3f03490561968def3a88b3695838f454476aa2de Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Fri, 19 Jan 2024 10:30:20 +1300 Subject: [PATCH 05/13] Re-generate `cat` namespace pt.2 (#519) * Re-generate cat.plugins Signed-off-by: Thomas Farr * Re-generate cat.recovery Signed-off-by: Thomas Farr * Re-generate cat.repositories Signed-off-by: Thomas Farr * Re-generate cat.segments Signed-off-by: Thomas Farr * Re-generate cat.shards Signed-off-by: Thomas Farr * Re-generate cat.snapshots Signed-off-by: Thomas Farr * Re-generate cat.tasks Signed-off-by: Thomas Farr * Re-generate cat.templates Signed-off-by: Thomas Farr * Re-generate cat.thread_pool Signed-off-by: Thomas Farr --------- Signed-off-by: Thomas Farr --- .../Configuration/CodeConfiguration.cs | 11 +- src/ApiGenerator/OpenSearch.openapi.json | 61 +- src/OpenSearch.Client/ApiUrlsLookup.cs | 9 - src/OpenSearch.Client/Descriptors.Cat.cs | 388 -------- src/OpenSearch.Client/OpenSearchClient.Cat.cs | 279 ------ src/OpenSearch.Client/Requests.Cat.cs | 848 ------------------ .../_Generated/ApiUrlsLookup.cs | 24 + .../_Generated/Descriptors.Cat.cs | 512 +++++++++++ .../_Generated/OpenSearchClient.Cat.cs | 367 ++++++++ .../_Generated/Requests.Cat.cs | 819 +++++++++++++++++ .../RequestParameters.Cat.cs | 676 -------------- .../OpenSearchLowLevelClient.Cat.cs | 219 ----- src/OpenSearch.Net/_Generated/Api/Enums.cs | 7 +- .../RequestParameters.Cat.cs | 669 ++++++++++++++ .../OpenSearchLowLevelClient.Cat.cs | 404 +++++++++ 15 files changed, 2862 insertions(+), 2431 deletions(-) delete mode 100644 src/OpenSearch.Client/Descriptors.Cat.cs delete mode 100644 src/OpenSearch.Client/OpenSearchClient.Cat.cs delete mode 100644 src/OpenSearch.Client/Requests.Cat.cs delete mode 100644 src/OpenSearch.Net/Api/RequestParameters/RequestParameters.Cat.cs delete mode 100644 src/OpenSearch.Net/OpenSearchLowLevelClient.Cat.cs diff --git a/src/ApiGenerator/Configuration/CodeConfiguration.cs b/src/ApiGenerator/Configuration/CodeConfiguration.cs index 7be3540059..b27df8490d 100644 --- a/src/ApiGenerator/Configuration/CodeConfiguration.cs +++ b/src/ApiGenerator/Configuration/CodeConfiguration.cs @@ -41,7 +41,7 @@ public static class CodeConfiguration { new("{create,delete}_pit"), new("{delete,get}_all_pits"), - + new("cat.aliases"), new("cat.allocation"), new("cat.cluster_manager"), @@ -54,6 +54,15 @@ public static class CodeConfiguration new("cat.nodeattrs"), new("cat.nodes"), new("cat.pending_tasks"), + new("cat.plugins"), + new("cat.recovery"), + new("cat.repositories"), + new("cat.segments"), + new("cat.shards"), + new("cat.snapshots"), + new("cat.tasks"), + new("cat.templates"), + new("cat.thread_pool"), new("cluster.*"), new("dangling_indices.*"), diff --git a/src/ApiGenerator/OpenSearch.openapi.json b/src/ApiGenerator/OpenSearch.openapi.json index 924d029be3..dfb7e3695c 100644 --- a/src/ApiGenerator/OpenSearch.openapi.json +++ b/src/ApiGenerator/OpenSearch.openapi.json @@ -10494,7 +10494,8 @@ "thread_pool", "transport", "discovery", - "indexing_pressure" + "indexing_pressure", + "search_pipeline" ], "x-data-type": "array" }, @@ -10634,7 +10635,8 @@ "thread_pool", "transport", "discovery", - "indexing_pressure" + "indexing_pressure", + "search_pipeline" ], "x-data-type": "array" }, @@ -11282,7 +11284,8 @@ "thread_pool", "transport", "discovery", - "indexing_pressure" + "indexing_pressure", + "search_pipeline" ], "x-data-type": "array" }, @@ -11434,7 +11437,8 @@ "thread_pool", "transport", "discovery", - "indexing_pressure" + "indexing_pressure", + "search_pipeline" ], "x-data-type": "array" }, @@ -14875,6 +14879,15 @@ "default": false, "description": "Indicates whether hits.total should be rendered as an integer or an object in the rest search response." } + }, + { + "name": "search_pipeline", + "in": "query", + "description": "Customizable sequence of processing stages applied to search queries.", + "schema": { + "type": "string", + "description": "Customizable sequence of processing stages applied to search queries." + } } ], "responses": { @@ -15359,6 +15372,15 @@ "default": false, "description": "Indicates whether hits.total should be rendered as an integer or an object in the rest search response." } + }, + { + "name": "search_pipeline", + "in": "query", + "description": "Customizable sequence of processing stages applied to search queries.", + "schema": { + "type": "string", + "description": "Customizable sequence of processing stages applied to search queries." + } } ], "responses": { @@ -22364,7 +22386,7 @@ { "name": "op_type", "in": "query", - "description": "Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID.", + "description": "Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create` for requests without an explicit document ID.", "schema": { "$ref": "#/components/schemas/OpType" } @@ -22961,7 +22983,7 @@ { "name": "op_type", "in": "query", - "description": "Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID.", + "description": "Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create` for requests without an explicit document ID.", "schema": { "$ref": "#/components/schemas/OpType" } @@ -23109,7 +23131,7 @@ { "name": "op_type", "in": "query", - "description": "Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID.", + "description": "Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create` for requests without an explicit document ID.", "schema": { "$ref": "#/components/schemas/OpType" } @@ -26092,6 +26114,15 @@ "default": false, "description": "Indicates whether hits.total should be rendered as an integer or an object in the rest search response." } + }, + { + "name": "search_pipeline", + "in": "query", + "description": "Customizable sequence of processing stages applied to search queries.", + "schema": { + "type": "string", + "description": "Customizable sequence of processing stages applied to search queries." + } } ], "responses": { @@ -26595,6 +26626,15 @@ "default": false, "description": "Indicates whether hits.total should be rendered as an integer or an object in the rest search response." } + }, + { + "name": "search_pipeline", + "in": "query", + "description": "Customizable sequence of processing stages applied to search queries.", + "schema": { + "type": "string", + "description": "Customizable sequence of processing stages applied to search queries." + } } ], "responses": { @@ -26671,8 +26711,9 @@ "description": "Specify the keep alive for point in time.", "schema": { "type": "string", + "pattern": "^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$", "description": "Specify the keep alive for point in time.", - "x-data-type": "time" + "x-data-type": "time" } }, { @@ -30720,7 +30761,7 @@ "pit_id": { "type": "string" }, - "_shard": { + "_shards": { "$ref": "#/components/schemas/ShardStatistics" }, "creation_time": { @@ -31513,7 +31554,7 @@ }, "OpType": { "type": "string", - "description": "Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID.", + "description": "Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create` for requests without an explicit document ID.", "enum": [ "index", "create" diff --git a/src/OpenSearch.Client/ApiUrlsLookup.cs b/src/OpenSearch.Client/ApiUrlsLookup.cs index dba4eda9d9..8937a41d24 100644 --- a/src/OpenSearch.Client/ApiUrlsLookup.cs +++ b/src/OpenSearch.Client/ApiUrlsLookup.cs @@ -46,15 +46,6 @@ namespace OpenSearch.Client internal static partial class ApiUrlsLookups { internal static ApiUrls NoNamespaceBulk = new ApiUrls(new[]{"_bulk", "{index}/_bulk"}); - internal static ApiUrls CatPlugins = new ApiUrls(new[]{"_cat/plugins"}); - internal static ApiUrls CatRecovery = new ApiUrls(new[]{"_cat/recovery", "_cat/recovery/{index}"}); - internal static ApiUrls CatRepositories = new ApiUrls(new[]{"_cat/repositories"}); - internal static ApiUrls CatSegments = new ApiUrls(new[]{"_cat/segments", "_cat/segments/{index}"}); - internal static ApiUrls CatShards = new ApiUrls(new[]{"_cat/shards", "_cat/shards/{index}"}); - internal static ApiUrls CatSnapshots = new ApiUrls(new[]{"_cat/snapshots", "_cat/snapshots/{repository}"}); - internal static ApiUrls CatTasks = new ApiUrls(new[]{"_cat/tasks"}); - internal static ApiUrls CatTemplates = new ApiUrls(new[]{"_cat/templates", "_cat/templates/{name}"}); - internal static ApiUrls CatThreadPool = new ApiUrls(new[]{"_cat/thread_pool", "_cat/thread_pool/{thread_pool_patterns}"}); internal static ApiUrls NoNamespaceClearScroll = new ApiUrls(new[]{"_search/scroll"}); internal static ApiUrls NoNamespaceCount = new ApiUrls(new[]{"_count", "{index}/_count"}); internal static ApiUrls NoNamespaceCreate = new ApiUrls(new[]{"{index}/_create/{id}"}); diff --git a/src/OpenSearch.Client/Descriptors.Cat.cs b/src/OpenSearch.Client/Descriptors.Cat.cs deleted file mode 100644 index 94a072c8b9..0000000000 --- a/src/OpenSearch.Client/Descriptors.Cat.cs +++ /dev/null @@ -1,388 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 -* -* The OpenSearch Contributors require contributions made to -* this file be licensed under the Apache-2.0 license or a -* compatible open source license. -*/ -/* -* Modifications Copyright OpenSearch Contributors. See -* GitHub history for details. -* -* Licensed to Elasticsearch B.V. under one or more contributor -* license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright -* ownership. Elasticsearch B.V. licenses this file to you under -* the Apache License, Version 2.0 (the "License"); you may -* not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -*/ -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ----------------------------------------------- -// -// This file is automatically generated -// Please do not edit these files manually -// Run the following in the root of the repos: -// -// *NIX : ./build.sh codegen -// Windows : build.bat codegen -// -// ----------------------------------------------- -// ReSharper disable RedundantUsingDirective -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Linq.Expressions; -using OpenSearch.Net; -using OpenSearch.Net.Utf8Json; -using OpenSearch.Net.Specification.CatApi; - -// ReSharper disable RedundantBaseConstructorCall -// ReSharper disable UnusedTypeParameter -// ReSharper disable PartialMethodWithSinglePart -// ReSharper disable RedundantNameQualifier -namespace OpenSearch.Client -{ - ///Descriptor for Plugins https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-plugins/ - 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 - public CatPluginsDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display - public CatPluginsDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information - public CatPluginsDescriptor Help(bool? help = true) => Qs("help", help); - ///Include bootstrap plugins in the response - public CatPluginsDescriptor IncludeBootstrap(bool? includebootstrap = true) => Qs("include_bootstrap", includebootstrap); - ///Return local information, do not retrieve the state from cluster_manager node (default: false) - public CatPluginsDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public CatPluginsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public CatPluginsDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - ///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 - public CatPluginsDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } - - ///Descriptor for Recovery https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-recovery/ - public partial class CatRecoveryDescriptor : RequestDescriptorBase, ICatRecoveryRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatRecovery; - ////_cat/recovery - public CatRecoveryDescriptor(): base() - { - } - - ////_cat/recovery/{index} - ///Optional, accepts null - public CatRecoveryDescriptor(Indices index): base(r => r.Optional("index", index)) - { - } - - // values part of the url path - Indices ICatRecoveryRequest.Index => Self.RouteValues.Get("index"); - ///Comma-separated list or wildcard expression 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)) - public CatRecoveryDescriptor Index() - where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v)); - ///A shortcut into calling Index(Indices.All) - public CatRecoveryDescriptor AllIndices() => Index(Indices.All); - // Request parameters - ///If `true`, the response only includes ongoing shard recoveries - public CatRecoveryDescriptor ActiveOnly(bool? activeonly = true) => Qs("active_only", activeonly); - ///The unit in which to display byte values - public CatRecoveryDescriptor Bytes(Bytes? bytes) => Qs("bytes", bytes); - ///If `true`, the response includes detailed information about shard recoveries - public CatRecoveryDescriptor Detailed(bool? detailed = true) => Qs("detailed", detailed); - ///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 - public CatRecoveryDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information - public CatRecoveryDescriptor Help(bool? help = true) => Qs("help", help); - ///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 - public CatRecoveryDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } - - ///Descriptor for Repositories https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-repositories/ - 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 - public CatRepositoriesDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display - public CatRepositoriesDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information - public CatRepositoriesDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from cluster_manager node - public CatRepositoriesDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public CatRepositoriesDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public CatRepositoriesDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - ///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 - public CatRepositoriesDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } - - ///Descriptor for Segments https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-segments/ - public partial class CatSegmentsDescriptor : RequestDescriptorBase, ICatSegmentsRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatSegments; - ////_cat/segments - public CatSegmentsDescriptor(): base() - { - } - - ////_cat/segments/{index} - ///Optional, accepts null - 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 - public CatSegmentsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///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) - public CatSegmentsDescriptor AllIndices() => Index(Indices.All); - // Request parameters - ///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 - public CatSegmentsDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display - public CatSegmentsDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information - public CatSegmentsDescriptor Help(bool? help = true) => Qs("help", help); - ///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 - public CatSegmentsDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } - - ///Descriptor for Shards https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-shards/ - public partial class CatShardsDescriptor : RequestDescriptorBase, ICatShardsRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatShards; - ////_cat/shards - public CatShardsDescriptor(): base() - { - } - - ////_cat/shards/{index} - ///Optional, accepts null - 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 - public CatShardsDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v)); - ///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) - public CatShardsDescriptor AllIndices() => Index(Indices.All); - // Request parameters - ///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 - public CatShardsDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display - public CatShardsDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information - public CatShardsDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from cluster_manager node (default: false) - public CatShardsDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public CatShardsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public CatShardsDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - ///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 - public CatShardsDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } - - ///Descriptor for Snapshots https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - public partial class CatSnapshotsDescriptor : RequestDescriptorBase, ICatSnapshotsRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatSnapshots; - ////_cat/snapshots - public CatSnapshotsDescriptor(): base() - { - } - - ////_cat/snapshots/{repository} - ///Optional, accepts null - public CatSnapshotsDescriptor(Names repository): base(r => r.Optional("repository", repository)) - { - } - - // values part of the url path - Names ICatSnapshotsRequest.RepositoryName => Self.RouteValues.Get("repository"); - ///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 - public CatSnapshotsDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display - public CatSnapshotsDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information - public CatSnapshotsDescriptor Help(bool? help = true) => Qs("help", help); - ///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 - ///Deprecated as of OpenSearch 2.0, use instead - public CatSnapshotsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public CatSnapshotsDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - ///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 - public CatSnapshotsDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } - - ///Descriptor for Tasks https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-tasks/ - 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. - public CatTasksDescriptor Actions(params string[] actions) => Qs("actions", actions); - ///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 - public CatTasksDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display - public CatTasksDescriptor Headers(params string[] headers) => Qs("h", headers); - ///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 - public CatTasksDescriptor Nodes(params string[] nodes) => Qs("nodes", nodes); - ///Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all. - public CatTasksDescriptor ParentTaskId(string parenttaskid) => Qs("parent_task_id", parenttaskid); - ///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 - public CatTasksDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } - - ///Descriptor for Templates https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ - public partial class CatTemplatesDescriptor : RequestDescriptorBase, ICatTemplatesRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatTemplates; - ////_cat/templates - public CatTemplatesDescriptor(): base() - { - } - - ////_cat/templates/{name} - ///Optional, accepts null - 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 - 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 - public CatTemplatesDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display - public CatTemplatesDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information - public CatTemplatesDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from cluster_manager node (default: false) - public CatTemplatesDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public CatTemplatesDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public CatTemplatesDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - ///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 - public CatTemplatesDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } - - ///Descriptor for ThreadPool https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-thread-pool/ - public partial class CatThreadPoolDescriptor : RequestDescriptorBase, ICatThreadPoolRequest - { - internal override ApiUrls ApiUrls => ApiUrlsLookups.CatThreadPool; - ////_cat/thread_pool - public CatThreadPoolDescriptor(): base() - { - } - - ////_cat/thread_pool/{thread_pool_patterns} - ///Optional, accepts null - public CatThreadPoolDescriptor(Names threadPoolPatterns): base(r => r.Optional("thread_pool_patterns", threadPoolPatterns)) - { - } - - // 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 - 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 - public CatThreadPoolDescriptor Format(string format) => Qs("format", format); - ///Comma-separated list of column names to display - public CatThreadPoolDescriptor Headers(params string[] headers) => Qs("h", headers); - ///Return help information - public CatThreadPoolDescriptor Help(bool? help = true) => Qs("help", help); - ///Return local information, do not retrieve the state from cluster_manager node (default: false) - public CatThreadPoolDescriptor Local(bool? local = true) => Qs("local", local); - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public CatThreadPoolDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout); - ///Explicit operation timeout for connection to cluster_manager node - ///Introduced in OpenSearch 2.0 instead of - public CatThreadPoolDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout); - ///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 - public CatThreadPoolDescriptor Verbose(bool? verbose = true) => Qs("v", verbose); - } -} diff --git a/src/OpenSearch.Client/OpenSearchClient.Cat.cs b/src/OpenSearch.Client/OpenSearchClient.Cat.cs deleted file mode 100644 index e34740a232..0000000000 --- a/src/OpenSearch.Client/OpenSearchClient.Cat.cs +++ /dev/null @@ -1,279 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 -* -* The OpenSearch Contributors require contributions made to -* this file be licensed under the Apache-2.0 license or a -* compatible open source license. -*/ -/* -* Modifications Copyright OpenSearch Contributors. See -* GitHub history for details. -* -* Licensed to Elasticsearch B.V. under one or more contributor -* license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright -* ownership. Elasticsearch B.V. licenses this file to you under -* the Apache License, Version 2.0 (the "License"); you may -* not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -*/ -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ----------------------------------------------- -// -// This file is automatically generated -// Please do not edit these files manually -// Run the following in the root of the repos: -// -// *NIX : ./build.sh codegen -// Windows : build.bat codegen -// -// ----------------------------------------------- -// ReSharper disable RedundantUsingDirective -using System; -using System.Threading; -using System.Threading.Tasks; -using OpenSearch.Net.Specification.CatApi; - -// ReSharper disable once CheckNamespace -// ReSharper disable RedundantTypeArgumentsOfMethod -namespace OpenSearch.Client.Specification.CatApi -{ - /// - /// Cat APIs. - /// Not intended to be instantiated directly. Use the property - /// on . - /// - /// - public partial class CatNamespace : NamespacedClientProxy - { - /// - /// GET request to the cat.plugins API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-plugins/ - /// - public CatResponse Plugins(Func selector = null) => Plugins(selector.InvokeOrDefault(new CatPluginsDescriptor())); - /// - /// GET request to the cat.plugins API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-plugins/ - /// - public Task> PluginsAsync(Func selector = null, CancellationToken ct = default) => PluginsAsync(selector.InvokeOrDefault(new CatPluginsDescriptor()), ct); - /// - /// GET request to the cat.plugins API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-plugins/ - /// - public CatResponse Plugins(ICatPluginsRequest request) => DoCat(request); - /// - /// GET request to the cat.plugins API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-plugins/ - /// - public Task> PluginsAsync(ICatPluginsRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - /// - /// GET request to the cat.recovery API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-recovery/ - /// - public CatResponse Recovery(Func selector = null) => Recovery(selector.InvokeOrDefault(new CatRecoveryDescriptor())); - /// - /// GET request to the cat.recovery API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-recovery/ - /// - public Task> RecoveryAsync(Func selector = null, CancellationToken ct = default) => RecoveryAsync(selector.InvokeOrDefault(new CatRecoveryDescriptor()), ct); - /// - /// GET request to the cat.recovery API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-recovery/ - /// - public CatResponse Recovery(ICatRecoveryRequest request) => DoCat(request); - /// - /// GET request to the cat.recovery API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-recovery/ - /// - public Task> RecoveryAsync(ICatRecoveryRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - /// - /// GET request to the cat.repositories API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-repositories/ - /// - public CatResponse Repositories(Func selector = null) => Repositories(selector.InvokeOrDefault(new CatRepositoriesDescriptor())); - /// - /// GET request to the cat.repositories API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-repositories/ - /// - public Task> RepositoriesAsync(Func selector = null, CancellationToken ct = default) => RepositoriesAsync(selector.InvokeOrDefault(new CatRepositoriesDescriptor()), ct); - /// - /// GET request to the cat.repositories API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-repositories/ - /// - public CatResponse Repositories(ICatRepositoriesRequest request) => DoCat(request); - /// - /// GET request to the cat.repositories API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-repositories/ - /// - public Task> RepositoriesAsync(ICatRepositoriesRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - /// - /// GET request to the cat.segments API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-segments/ - /// - public CatResponse Segments(Func selector = null) => Segments(selector.InvokeOrDefault(new CatSegmentsDescriptor())); - /// - /// GET request to the cat.segments API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-segments/ - /// - public Task> SegmentsAsync(Func selector = null, CancellationToken ct = default) => SegmentsAsync(selector.InvokeOrDefault(new CatSegmentsDescriptor()), ct); - /// - /// GET request to the cat.segments API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-segments/ - /// - public CatResponse Segments(ICatSegmentsRequest request) => DoCat(request); - /// - /// GET request to the cat.segments API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-segments/ - /// - public Task> SegmentsAsync(ICatSegmentsRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - /// - /// GET request to the cat.shards API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-shards/ - /// - public CatResponse Shards(Func selector = null) => Shards(selector.InvokeOrDefault(new CatShardsDescriptor())); - /// - /// GET request to the cat.shards API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-shards/ - /// - public Task> ShardsAsync(Func selector = null, CancellationToken ct = default) => ShardsAsync(selector.InvokeOrDefault(new CatShardsDescriptor()), ct); - /// - /// GET request to the cat.shards API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-shards/ - /// - public CatResponse Shards(ICatShardsRequest request) => DoCat(request); - /// - /// GET request to the cat.shards API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-shards/ - /// - public Task> ShardsAsync(ICatShardsRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - /// - /// GET request to the cat.snapshots API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public CatResponse Snapshots(Func selector = null) => Snapshots(selector.InvokeOrDefault(new CatSnapshotsDescriptor())); - /// - /// GET request to the cat.snapshots API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task> SnapshotsAsync(Func selector = null, CancellationToken ct = default) => SnapshotsAsync(selector.InvokeOrDefault(new CatSnapshotsDescriptor()), ct); - /// - /// GET request to the cat.snapshots API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public CatResponse Snapshots(ICatSnapshotsRequest request) => DoCat(request); - /// - /// GET request to the cat.snapshots API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-snapshots/ - /// - public Task> SnapshotsAsync(ICatSnapshotsRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - /// - /// GET request to the cat.tasks API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-tasks/ - /// - public CatResponse Tasks(Func selector = null) => Tasks(selector.InvokeOrDefault(new CatTasksDescriptor())); - /// - /// GET request to the cat.tasks API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-tasks/ - /// - public Task> TasksAsync(Func selector = null, CancellationToken ct = default) => TasksAsync(selector.InvokeOrDefault(new CatTasksDescriptor()), ct); - /// - /// GET request to the cat.tasks API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-tasks/ - /// - public CatResponse Tasks(ICatTasksRequest request) => DoCat(request); - /// - /// GET request to the cat.tasks API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-tasks/ - /// - public Task> TasksAsync(ICatTasksRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - /// - /// GET request to the cat.templates API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ - /// - public CatResponse Templates(Func selector = null) => Templates(selector.InvokeOrDefault(new CatTemplatesDescriptor())); - /// - /// GET request to the cat.templates API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ - /// - public Task> TemplatesAsync(Func selector = null, CancellationToken ct = default) => TemplatesAsync(selector.InvokeOrDefault(new CatTemplatesDescriptor()), ct); - /// - /// GET request to the cat.templates API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ - /// - public CatResponse Templates(ICatTemplatesRequest request) => DoCat(request); - /// - /// GET request to the cat.templates API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ - /// - public Task> TemplatesAsync(ICatTemplatesRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - /// - /// GET request to the cat.thread_pool API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-thread-pool/ - /// - public CatResponse ThreadPool(Func selector = null) => ThreadPool(selector.InvokeOrDefault(new CatThreadPoolDescriptor())); - /// - /// GET request to the cat.thread_pool API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-thread-pool/ - /// - public Task> ThreadPoolAsync(Func selector = null, CancellationToken ct = default) => ThreadPoolAsync(selector.InvokeOrDefault(new CatThreadPoolDescriptor()), ct); - /// - /// GET request to the cat.thread_pool API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-thread-pool/ - /// - public CatResponse ThreadPool(ICatThreadPoolRequest request) => DoCat(request); - /// - /// GET request to the cat.thread_pool API, read more about this API online: - /// - /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-thread-pool/ - /// - public Task> ThreadPoolAsync(ICatThreadPoolRequest request, CancellationToken ct = default) => DoCatAsync(request, ct); - } -} diff --git a/src/OpenSearch.Client/Requests.Cat.cs b/src/OpenSearch.Client/Requests.Cat.cs deleted file mode 100644 index 58769013d6..0000000000 --- a/src/OpenSearch.Client/Requests.Cat.cs +++ /dev/null @@ -1,848 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 -* -* The OpenSearch Contributors require contributions made to -* this file be licensed under the Apache-2.0 license or a -* compatible open source license. -*/ -/* -* Modifications Copyright OpenSearch Contributors. See -* GitHub history for details. -* -* Licensed to Elasticsearch B.V. under one or more contributor -* license agreements. See the NOTICE file distributed with -* this work for additional information regarding copyright -* ownership. Elasticsearch B.V. licenses this file to you under -* the Apache License, Version 2.0 (the "License"); you may -* not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -*/ -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ----------------------------------------------- -// -// This file is automatically generated -// Please do not edit these files manually -// Run the following in the root of the repos: -// -// *NIX : ./build.sh codegen -// Windows : build.bat codegen -// -// ----------------------------------------------- -// ReSharper disable RedundantUsingDirective -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Linq.Expressions; -using System.Runtime.Serialization; -using OpenSearch.Net; -using OpenSearch.Net.Utf8Json; -using OpenSearch.Net.Specification.CatApi; - -// ReSharper disable RedundantBaseConstructorCall -// ReSharper disable UnusedTypeParameter -// ReSharper disable PartialMethodWithSinglePart -// ReSharper disable RedundantNameQualifier -namespace OpenSearch.Client -{ - [InterfaceDataContract] - public partial interface ICatPluginsRequest : IRequest - { - } - - ///Request for Plugins https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-plugins/ - public partial class CatPluginsRequest : PlainRequestBase, ICatPluginsRequest - { - protected ICatPluginsRequest Self => this; - 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 - public string Format - { - get => Q("format"); - set - { - Q("format", value); - SetAcceptHeader(value); - } - } - - ///Comma-separated list of column names to display - public string[] Headers - { - get => Q("h"); - set => Q("h", value); - } - - ///Return help information - public bool? Help - { - get => Q("help"); - set => Q("help", value); - } - - ///Include bootstrap plugins in the response - public bool? IncludeBootstrap - { - get => Q("include_bootstrap"); - set => Q("include_bootstrap", value); - } - - ///Return local information, do not retrieve the state from cluster_manager node (default: false) - public bool? Local - { - get => Q("local"); - set => Q("local", value); - } - - ///Explicit operation timeout for connection to master node - ///Deprecated as of OpenSearch 2.0, use instead - public Time MasterTimeout - { - get => Q