diff --git a/CHANGELOG.md b/CHANGELOG.md index 32fbd110e5..9a44e4c4d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### ⚠️ Breaking Changes ⚠️ - As part of [efforts to re-generate the client](https://github.com/opensearch-project/opensearch-net/pulls?q=is%3Apr+label%3Acode-gen+is%3Aclosed) from our [OpenAPI specification](https://github.com/opensearch-project/opensearch-api-specification) there have been numerous corrections and changes that resulted in breaking changes. Please refer to [UPGRADING.md](UPGRADING.md) for a complete list of these breakages and any relevant guidance for upgrading to this version of the client. +### Changed +- Changed the namespace client properties on `IOpenSearchClient` to return corresponding interfaces to better enable mocking & unit testing ([#646](https://github.com/opensearch-project/opensearch-net/pull/646)) + ### Added - Added support for `MinScore` on `ScriptScoreQuery` ([#624](https://github.com/opensearch-project/opensearch-net/pull/624)) - Added support for the `Cat.PitSegments` and `Cat.SegmentReplication` APIs ([#527](https://github.com/opensearch-project/opensearch-net/pull/527)) @@ -184,4 +187,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 diff --git a/UPGRADING.md b/UPGRADING.md index bba5b668be..aa61ee7f0a 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -102,6 +102,7 @@ #### General - The `MasterTimeout` parameters on all actions have been marked `[Obsolete]`, please migrate to using `ClusterManagerTimeout` if your OpenSearch cluster is at least version `2.0.0` as `MasterTimeout` may be removed in future major versions. - The `ExpandWildcards` enum is now attributed with `[Flags]` to allow combining of multiple values e.g. `ExpandWildcards.Open | ExpandWildcards.Closed` to match open and closed indexes but not hidden. +- The namespaced APIs exposed in `IOpenSearchClient` have each gained a corresponding interface and the types of the properties on `IOpenSearchClient` and `OpenSearchClient` have been changed from the concrete implementations to the matching interfaces. For example, `IOpenSearchClient.Cluster` was `ClusterNamespace` and now is `IClusterNamespace`. #### Cat.Indices Action - The `Health` parameter now accepts a new `HealthStatus` enum instead of the `Health` enum. The values are identical and are now unified with other parts of the API that utilize the same enum. diff --git a/src/ApiGenerator/Views/HighLevel/Client/FluentSyntax/FluentInterfaceMethod.cshtml b/src/ApiGenerator/Views/HighLevel/Client/FluentSyntax/FluentInterfaceMethod.cshtml new file mode 100644 index 0000000000..24f6c5fb2b --- /dev/null +++ b/src/ApiGenerator/Views/HighLevel/Client/FluentSyntax/FluentInterfaceMethod.cshtml @@ -0,0 +1,5 @@ +@using System +@using ApiGenerator.Domain.Code.HighLevel.Methods +@inherits ApiGenerator.CodeTemplatePage +@{ await IncludeAsync("HighLevel/Client/MethodXmlDocs.cshtml", Model.Syntax); } +@{ await IncludeAsync("HighLevel/Client/FluentSyntax/FluentMethodHeader.cshtml", Model);}@Raw(";") diff --git a/src/ApiGenerator/Views/HighLevel/Client/Implementation/MethodInterface.cshtml b/src/ApiGenerator/Views/HighLevel/Client/Implementation/MethodInterface.cshtml new file mode 100644 index 0000000000..bd8339470c --- /dev/null +++ b/src/ApiGenerator/Views/HighLevel/Client/Implementation/MethodInterface.cshtml @@ -0,0 +1,19 @@ +@using ApiGenerator +@using ApiGenerator.Domain.Code.HighLevel.Methods +@using HighLevelModel = ApiGenerator.Domain.Code.HighLevel.Methods.HighLevelModel +@inherits CodeTemplatePage +@{ + const string fluentPath = "HighLevel/Client/FluentSyntax/FluentInterfaceMethod.cshtml"; + const string initializerPath = "HighLevel/Client/InitializerSyntax/InitializerInterfaceMethod.cshtml"; +} +@{ await IncludeAsync(fluentPath, new FluentSyntaxView(Model.Fluent, async: false)); } +@{ await IncludeAsync(fluentPath, new FluentSyntaxView(Model.Fluent, async: true)); } +@if (Model.FluentBound != null) +{ + + @{ await IncludeAsync(fluentPath, new FluentSyntaxView(Model.FluentBound, async: false)); } + @{ await IncludeAsync(fluentPath, new FluentSyntaxView(Model.FluentBound, async: true)); } + +} +@{ await IncludeAsync(initializerPath, new InitializerSyntaxView(Model.Initializer, async: false)); } +@{ await IncludeAsync(initializerPath, new InitializerSyntaxView(Model.Initializer, async: true)); } diff --git a/src/ApiGenerator/Views/HighLevel/Client/Implementation/OpenSearchClient.Http.cshtml b/src/ApiGenerator/Views/HighLevel/Client/Implementation/OpenSearchClient.Http.cshtml index da8f6bc160..2a3c7f7872 100644 --- a/src/ApiGenerator/Views/HighLevel/Client/Implementation/OpenSearchClient.Http.cshtml +++ b/src/ApiGenerator/Views/HighLevel/Client/Implementation/OpenSearchClient.Http.cshtml @@ -3,6 +3,7 @@ @inherits ApiGenerator.CodeTemplatePage> @{ const string ns = "Http"; + var generic = Raw(""); } @{ await IncludeGeneratorNotice(); } @@ -15,16 +16,43 @@ namespace OpenSearch.Client.@(CsharpNames.ApiNamespace).@ns@(CsharpNames.ApiName /// /// @ns.SplitPascalCase() APIs. +/// Use the property on . +/// +public interface @(CsharpNames.HighLevelClientNamespacePrefix)I@(ns)@(CsharpNames.ClientNamespaceSuffix) +{ +@{ + foreach (var m in Model) + { + var selector = Raw($"Func<{m.Descriptor}, {m.IRequest}> selector = null"); + + + TResponse @(m)@(generic)(string path, @(selector)) + where TResponse : class, IOpenSearchResponse, new(); + + Task@(generic) @(m)Async@(generic)(string path, @(selector), CancellationToken ct = default) + where TResponse : class, IOpenSearchResponse, new(); + + TResponse @(m)@(generic)(@m.IRequest request) + where TResponse : class, IOpenSearchResponse, new(); + + Task@(generic) @(m)Async@(generic)(@m.IRequest request, CancellationToken ct = default) + where TResponse : class, IOpenSearchResponse, new(); + + + } +} +} + +/// +/// @ns.SplitPascalCase() implementation. /// Not intended to be instantiated directly. Use the property /// on . /// /// -public class @(CsharpNames.HighLevelClientNamespacePrefix)@ns@(CsharpNames.ClientNamespaceSuffix) : NamespacedClientProxy +public class @(CsharpNames.HighLevelClientNamespacePrefix)@ns@(CsharpNames.ClientNamespaceSuffix) : NamespacedClientProxy, @(CsharpNames.HighLevelClientNamespacePrefix)I@(ns)@(CsharpNames.ClientNamespaceSuffix) { internal @(CsharpNames.HighLevelClientNamespacePrefix)@ns@(CsharpNames.ClientNamespaceSuffix)(OpenSearchClient client) : base(client) {} @{ - var generic = Raw(""); - foreach (var m in Model) { var bodySelector = Raw(m.TakesBody ? "r => r.Body" : "_ => null"); diff --git a/src/ApiGenerator/Views/HighLevel/Client/Implementation/OpenSearchClient.Namespace.cshtml b/src/ApiGenerator/Views/HighLevel/Client/Implementation/OpenSearchClient.Namespace.cshtml index ebbbf3bc60..48536496a8 100644 --- a/src/ApiGenerator/Views/HighLevel/Client/Implementation/OpenSearchClient.Namespace.cshtml +++ b/src/ApiGenerator/Views/HighLevel/Client/Implementation/OpenSearchClient.Namespace.cshtml @@ -20,11 +20,23 @@ namespace OpenSearch.Client.@(CsharpNames.ApiNamespace).@ns@(CsharpNames.ApiName { /// /// @ns.SplitPascalCase() APIs. + /// Use the property on . + /// + public partial interface I@(CsharpNames.HighLevelClientNamespacePrefix)@(ns)@(CsharpNames.ClientNamespaceSuffix) + { + @foreach(var e in endpoints) + { + await IncludeAsync("HighLevel/Client/Implementation/MethodInterface.cshtml", e.HighLevelModel); + } + } + + /// + /// @ns.SplitPascalCase() implementation. /// Not intended to be instantiated directly. Use the property /// on . /// /// - public partial class @(CsharpNames.HighLevelClientNamespacePrefix)@ns@(CsharpNames.ClientNamespaceSuffix) : NamespacedClientProxy + public partial class @(CsharpNames.HighLevelClientNamespacePrefix)@ns@(CsharpNames.ClientNamespaceSuffix) : NamespacedClientProxy, I@(CsharpNames.HighLevelClientNamespacePrefix)@(ns)@(CsharpNames.ClientNamespaceSuffix) { internal @(CsharpNames.HighLevelClientNamespacePrefix)@ns@(CsharpNames.ClientNamespaceSuffix)(OpenSearchClient client) : base(client) {} @foreach(var e in endpoints) diff --git a/src/ApiGenerator/Views/HighLevel/Client/Implementation/OpenSearchClient.cshtml b/src/ApiGenerator/Views/HighLevel/Client/Implementation/OpenSearchClient.cshtml index d4c6cd28e3..1c06d66cdc 100644 --- a/src/ApiGenerator/Views/HighLevel/Client/Implementation/OpenSearchClient.cshtml +++ b/src/ApiGenerator/Views/HighLevel/Client/Implementation/OpenSearchClient.cshtml @@ -29,7 +29,7 @@ namespace OpenSearch.Client foreach (var ns in namespaces) { /// @(ns.SplitPascalCase()) APIs - public @CsharpNames.HighLevelClientNamespacePrefix@(ns)@CsharpNames.ClientNamespaceSuffix @ns { get; private set; } + public @(CsharpNames.HighLevelClientNamespacePrefix)I@(ns)@(CsharpNames.ClientNamespaceSuffix) @ns { get; private set; } } diff --git a/src/ApiGenerator/Views/HighLevel/Client/InitializerSyntax/InitializerInterfaceMethod.cshtml b/src/ApiGenerator/Views/HighLevel/Client/InitializerSyntax/InitializerInterfaceMethod.cshtml new file mode 100644 index 0000000000..bf099a924d --- /dev/null +++ b/src/ApiGenerator/Views/HighLevel/Client/InitializerSyntax/InitializerInterfaceMethod.cshtml @@ -0,0 +1,6 @@ +@using System +@using ApiGenerator.Domain.Code.HighLevel.Methods +@inherits ApiGenerator.CodeTemplatePage +@{ await IncludeAsync("HighLevel/Client/MethodXmlDocs.cshtml", Model.Syntax); } +@{ await IncludeAsync("HighLevel/Client/InitializerSyntax/InitializerMethodHeader.cshtml", Model); }@Raw(";") + diff --git a/src/ApiGenerator/Views/HighLevel/Client/Interface/IOpenSearchClient.cshtml b/src/ApiGenerator/Views/HighLevel/Client/Interface/IOpenSearchClient.cshtml index fc35066b57..f575247a10 100644 --- a/src/ApiGenerator/Views/HighLevel/Client/Interface/IOpenSearchClient.cshtml +++ b/src/ApiGenerator/Views/HighLevel/Client/Interface/IOpenSearchClient.cshtml @@ -28,7 +28,7 @@ namespace OpenSearch.Client foreach (var ns in namespaces) { /// @ns.SplitPascalCase() APIs - @CsharpNames.HighLevelClientNamespacePrefix@(ns)@CsharpNames.ClientNamespaceSuffix @ns { get; } + @(CsharpNames.HighLevelClientNamespacePrefix)I@(ns)@(CsharpNames.ClientNamespaceSuffix) @ns { get; } } diff --git a/src/OpenSearch.Client/OpenSearchClient.Indices.cs b/src/OpenSearch.Client/OpenSearchClient.Indices.cs index df83a26136..c80918a6e0 100644 --- a/src/OpenSearch.Client/OpenSearchClient.Indices.cs +++ b/src/OpenSearch.Client/OpenSearchClient.Indices.cs @@ -51,8 +51,819 @@ // ReSharper disable RedundantTypeArgumentsOfMethod namespace OpenSearch.Client.Specification.IndicesApi { + + /// + /// Indices API. + /// Not intended to be instantiated directly. Use the property + /// on . + /// + /// + public partial interface IIndicesNamespace + { + /// + /// PUT request to the indices.add_block API, read more about this API online: + /// + /// + /// + AddIndexBlockResponse AddBlock(Indices index, IndexBlock block, Func selector = null); + /// + /// PUT request to the indices.add_block API, read more about this API online: + /// + /// + /// + Task AddBlockAsync(Indices index, IndexBlock block, Func selector = null, CancellationToken ct = default); + /// + /// PUT request to the indices.add_block API, read more about this API online: + /// + /// + /// + AddIndexBlockResponse AddBlock(IAddIndexBlockRequest request); + /// + /// PUT request to the indices.add_block API, read more about this API online: + /// + /// + /// + Task AddBlockAsync(IAddIndexBlockRequest request, CancellationToken ct = default); + /// + /// POST request to the indices.analyze API, read more about this API online: + /// + /// + /// + AnalyzeResponse Analyze(Func selector = null); + /// + /// POST request to the indices.analyze API, read more about this API online: + /// + /// + /// + Task AnalyzeAsync(Func selector = null, CancellationToken ct = default); + /// + /// POST request to the indices.analyze API, read more about this API online: + /// + /// + /// + AnalyzeResponse Analyze(IAnalyzeRequest request); + /// + /// POST request to the indices.analyze API, read more about this API online: + /// + /// + /// + Task AnalyzeAsync(IAnalyzeRequest request, CancellationToken ct = default); + /// + /// POST request to the indices.clear_cache API, read more about this API online: + /// + /// + /// + ClearCacheResponse ClearCache(Indices index = null, Func selector = null); + /// + /// POST request to the indices.clear_cache API, read more about this API online: + /// + /// + /// + Task ClearCacheAsync(Indices index = null, Func selector = null, CancellationToken ct = default); + /// + /// POST request to the indices.clear_cache API, read more about this API online: + /// + /// + /// + ClearCacheResponse ClearCache(IClearCacheRequest request); + /// + /// POST request to the indices.clear_cache API, read more about this API online: + /// + /// + /// + Task ClearCacheAsync(IClearCacheRequest request, CancellationToken ct = default); + /// + /// PUT request to the indices.clone API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/clone/ + /// + CloneIndexResponse Clone(IndexName index, IndexName target, Func selector = null); + /// + /// PUT request to the indices.clone API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/clone/ + /// + Task CloneAsync(IndexName index, IndexName target, Func selector = null, CancellationToken ct = default); + /// + /// PUT request to the indices.clone API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/clone/ + /// + CloneIndexResponse Clone(ICloneIndexRequest request); + /// + /// PUT request to the indices.clone API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/clone/ + /// + Task CloneAsync(ICloneIndexRequest request, CancellationToken ct = default); + /// + /// POST request to the indices.close API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/ + /// + CloseIndexResponse Close(Indices index, Func selector = null); + /// + /// POST request to the indices.close API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/ + /// + Task CloseAsync(Indices index, Func selector = null, CancellationToken ct = default); + /// + /// POST request to the indices.close API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/ + /// + CloseIndexResponse Close(ICloseIndexRequest request); + /// + /// POST request to the indices.close API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/ + /// + Task CloseAsync(ICloseIndexRequest request, CancellationToken ct = default); + /// + /// PUT request to the indices.create API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/create-index/ + /// + CreateIndexResponse Create(IndexName index, Func selector = null); + /// + /// PUT request to the indices.create API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/create-index/ + /// + Task CreateAsync(IndexName index, Func selector = null, CancellationToken ct = default); + /// + /// PUT request to the indices.create API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/create-index/ + /// + CreateIndexResponse Create(ICreateIndexRequest request); + /// + /// PUT request to the indices.create API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/create-index/ + /// + Task CreateAsync(ICreateIndexRequest request, CancellationToken ct = default); + /// + /// DELETE request to the indices.delete API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/delete-index/ + /// + DeleteIndexResponse Delete(Indices index, Func selector = null); + /// + /// DELETE request to the indices.delete API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/delete-index/ + /// + Task DeleteAsync(Indices index, Func selector = null, CancellationToken ct = default); + /// + /// DELETE request to the indices.delete API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/delete-index/ + /// + DeleteIndexResponse Delete(IDeleteIndexRequest request); + /// + /// DELETE request to the indices.delete API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/delete-index/ + /// + Task DeleteAsync(IDeleteIndexRequest request, CancellationToken ct = default); + /// + /// DELETE request to the indices.delete_alias API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/alias/ + /// + DeleteAliasResponse DeleteAlias(Indices index, Names name, Func selector = null); + /// + /// DELETE request to the indices.delete_alias API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/alias/ + /// + Task DeleteAliasAsync(Indices index, Names name, Func selector = null, CancellationToken ct = default); + /// + /// DELETE request to the indices.delete_alias API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/alias/ + /// + DeleteAliasResponse DeleteAlias(IDeleteAliasRequest request); + /// + /// DELETE request to the indices.delete_alias API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/alias/ + /// + Task DeleteAliasAsync(IDeleteAliasRequest request, CancellationToken ct = default); + /// + /// DELETE request to the indices.delete_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ + /// + DeleteIndexTemplateResponse DeleteTemplate(Name name, Func selector = null); + /// + /// DELETE request to the indices.delete_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ + /// + Task DeleteTemplateAsync(Name name, Func selector = null, CancellationToken ct = default); + /// + /// DELETE request to the indices.delete_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ + /// + DeleteIndexTemplateResponse DeleteTemplate(IDeleteIndexTemplateRequest request); + /// + /// DELETE request to the indices.delete_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ + /// + Task DeleteTemplateAsync(IDeleteIndexTemplateRequest request, CancellationToken ct = default); + /// + /// HEAD request to the indices.exists API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/ + /// + ExistsResponse Exists(Indices index, Func selector = null); + /// + /// HEAD request to the indices.exists API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/ + /// + Task ExistsAsync(Indices index, Func selector = null, CancellationToken ct = default); + /// + /// HEAD request to the indices.exists API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/ + /// + ExistsResponse Exists(IIndexExistsRequest request); + /// + /// HEAD request to the indices.exists API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/ + /// + Task ExistsAsync(IIndexExistsRequest request, CancellationToken ct = default); + /// + /// HEAD request to the indices.exists_alias API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/alias/ + /// + ExistsResponse AliasExists(Names name, Func selector = null); + /// + /// HEAD request to the indices.exists_alias API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/alias/ + /// + Task AliasExistsAsync(Names name, Func selector = null, CancellationToken ct = default); + /// + /// HEAD request to the indices.exists_alias API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/alias/ + /// + ExistsResponse AliasExists(IAliasExistsRequest request); + /// + /// HEAD request to the indices.exists_alias API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/alias/ + /// + Task AliasExistsAsync(IAliasExistsRequest request, CancellationToken ct = default); + /// + /// HEAD request to the indices.exists_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ + /// + ExistsResponse TemplateExists(Names name, Func selector = null); + /// + /// HEAD request to the indices.exists_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ + /// + Task TemplateExistsAsync(Names name, Func selector = null, CancellationToken ct = default); + /// + /// HEAD request to the indices.exists_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ + /// + ExistsResponse TemplateExists(IIndexTemplateExistsRequest request); + /// + /// HEAD request to the indices.exists_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ + /// + Task TemplateExistsAsync(IIndexTemplateExistsRequest request, CancellationToken ct = default); + /// + /// HEAD request to the indices.exists_type API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/ + /// + /// Deprecated as of OpenSearch 2.0 + ExistsResponse TypeExists(Indices index, Names type, Func selector = null); + /// + /// HEAD request to the indices.exists_type API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/ + /// + /// Deprecated as of OpenSearch 2.0 + Task TypeExistsAsync(Indices index, Names type, Func selector = null, CancellationToken ct = default); + /// + /// HEAD request to the indices.exists_type API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/ + /// + /// Deprecated as of OpenSearch 2.0 + ExistsResponse TypeExists(ITypeExistsRequest request); + /// + /// HEAD request to the indices.exists_type API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/exists/ + /// + /// Deprecated as of OpenSearch 2.0 + Task TypeExistsAsync(ITypeExistsRequest request, CancellationToken ct = default); + /// + /// POST request to the indices.flush API, read more about this API online: + /// + /// + /// + FlushResponse Flush(Indices index = null, Func selector = null); + /// + /// POST request to the indices.flush API, read more about this API online: + /// + /// + /// + Task FlushAsync(Indices index = null, Func selector = null, CancellationToken ct = default); + /// + /// POST request to the indices.flush API, read more about this API online: + /// + /// + /// + FlushResponse Flush(IFlushRequest request); + /// + /// POST request to the indices.flush API, read more about this API online: + /// + /// + /// + Task FlushAsync(IFlushRequest request, CancellationToken ct = default); + /// + /// POST request to the indices.forcemerge API, read more about this API online: + /// + /// + /// + ForceMergeResponse ForceMerge(Indices index = null, Func selector = null); + /// + /// POST request to the indices.forcemerge API, read more about this API online: + /// + /// + /// + Task ForceMergeAsync(Indices index = null, Func selector = null, CancellationToken ct = default); + /// + /// POST request to the indices.forcemerge API, read more about this API online: + /// + /// + /// + ForceMergeResponse ForceMerge(IForceMergeRequest request); + /// + /// POST request to the indices.forcemerge API, read more about this API online: + /// + /// + /// + Task ForceMergeAsync(IForceMergeRequest request, CancellationToken ct = default); + /// + /// GET request to the indices.get API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/get-index/ + /// + GetIndexResponse Get(Indices index, Func selector = null); + /// + /// GET request to the indices.get API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/get-index/ + /// + Task GetAsync(Indices index, Func selector = null, CancellationToken ct = default); + /// + /// GET request to the indices.get API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/get-index/ + /// + GetIndexResponse Get(IGetIndexRequest request); + /// + /// GET request to the indices.get API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/get-index/ + /// + Task GetAsync(IGetIndexRequest request, CancellationToken ct = default); + /// + /// GET request to the indices.get_alias API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/alias/ + /// + GetAliasResponse GetAlias(Indices index = null, Func selector = null); + /// + /// GET request to the indices.get_alias API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/alias/ + /// + Task GetAliasAsync(Indices index = null, Func selector = null, CancellationToken ct = default); + /// + /// GET request to the indices.get_alias API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/alias/ + /// + GetAliasResponse GetAlias(IGetAliasRequest request); + /// + /// GET request to the indices.get_alias API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/alias/ + /// + Task GetAliasAsync(IGetAliasRequest request, CancellationToken ct = default); + /// + /// GET request to the indices.get_field_mapping API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/ + /// + GetFieldMappingResponse GetFieldMapping(Fields fields, Func, IGetFieldMappingRequest> selector = null) + where TDocument : class; + /// + /// GET request to the indices.get_field_mapping API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/ + /// + Task GetFieldMappingAsync(Fields fields, Func, IGetFieldMappingRequest> selector = null, CancellationToken ct = default) + where TDocument : class; + /// + /// GET request to the indices.get_field_mapping API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/ + /// + GetFieldMappingResponse GetFieldMapping(IGetFieldMappingRequest request); + /// + /// GET request to the indices.get_field_mapping API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/ + /// + Task GetFieldMappingAsync(IGetFieldMappingRequest request, CancellationToken ct = default); + /// + /// GET request to the indices.get_mapping API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/ + /// + GetMappingResponse GetMapping(Func, IGetMappingRequest> selector = null) + where TDocument : class; + /// + /// GET request to the indices.get_mapping API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/ + /// + Task GetMappingAsync(Func, IGetMappingRequest> selector = null, CancellationToken ct = default) + where TDocument : class; + /// + /// GET request to the indices.get_mapping API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/ + /// + GetMappingResponse GetMapping(IGetMappingRequest request); + /// + /// GET request to the indices.get_mapping API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/ + /// + Task GetMappingAsync(IGetMappingRequest request, CancellationToken ct = default); + /// + /// GET request to the indices.get_settings API, read more about this API online: + /// + /// + /// + GetIndexSettingsResponse GetSettings(Indices index = null, Func selector = null); + /// + /// GET request to the indices.get_settings API, read more about this API online: + /// + /// + /// + Task GetSettingsAsync(Indices index = null, Func selector = null, CancellationToken ct = default); + /// + /// GET request to the indices.get_settings API, read more about this API online: + /// + /// + /// + GetIndexSettingsResponse GetSettings(IGetIndexSettingsRequest request); + /// + /// GET request to the indices.get_settings API, read more about this API online: + /// + /// + /// + Task GetSettingsAsync(IGetIndexSettingsRequest request, CancellationToken ct = default); + /// + /// GET request to the indices.get_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ + /// + GetIndexTemplateResponse GetTemplate(Names name = null, Func selector = null); + /// + /// GET request to the indices.get_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ + /// + Task GetTemplateAsync(Names name = null, Func selector = null, CancellationToken ct = default); + /// + /// GET request to the indices.get_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ + /// + GetIndexTemplateResponse GetTemplate(IGetIndexTemplateRequest request); + /// + /// GET request to the indices.get_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ + /// + Task GetTemplateAsync(IGetIndexTemplateRequest request, CancellationToken ct = default); + /// + /// POST request to the indices.open API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/ + /// + OpenIndexResponse Open(Indices index, Func selector = null); + /// + /// POST request to the indices.open API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/ + /// + Task OpenAsync(Indices index, Func selector = null, CancellationToken ct = default); + /// + /// POST request to the indices.open API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/ + /// + OpenIndexResponse Open(IOpenIndexRequest request); + /// + /// POST request to the indices.open API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/close-index/ + /// + Task OpenAsync(IOpenIndexRequest request, CancellationToken ct = default); + /// + /// PUT request to the indices.put_alias API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/alias/ + /// + PutAliasResponse PutAlias(Indices index, Name name, Func selector = null); + /// + /// PUT request to the indices.put_alias API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/alias/ + /// + Task PutAliasAsync(Indices index, Name name, Func selector = null, CancellationToken ct = default); + /// + /// PUT request to the indices.put_alias API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/alias/ + /// + PutAliasResponse PutAlias(IPutAliasRequest request); + /// + /// PUT request to the indices.put_alias API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/alias/ + /// + Task PutAliasAsync(IPutAliasRequest request, CancellationToken ct = default); + /// + /// PUT request to the indices.put_mapping API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/ + /// + PutMappingResponse PutMapping(Func, IPutMappingRequest> selector) + where TDocument : class; + /// + /// PUT request to the indices.put_mapping API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/ + /// + Task PutMappingAsync(Func, IPutMappingRequest> selector, CancellationToken ct = default) + where TDocument : class; + /// + /// PUT request to the indices.put_mapping API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/ + /// + PutMappingResponse PutMapping(IPutMappingRequest request); + /// + /// PUT request to the indices.put_mapping API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/update-mapping/ + /// + Task PutMappingAsync(IPutMappingRequest request, CancellationToken ct = default); + /// + /// PUT request to the indices.put_settings API, read more about this API online: + /// + /// + /// + UpdateIndexSettingsResponse UpdateSettings(Indices index, Func selector); + /// + /// PUT request to the indices.put_settings API, read more about this API online: + /// + /// + /// + Task UpdateSettingsAsync(Indices index, Func selector, CancellationToken ct = default); + /// + /// PUT request to the indices.put_settings API, read more about this API online: + /// + /// + /// + UpdateIndexSettingsResponse UpdateSettings(IUpdateIndexSettingsRequest request); + /// + /// PUT request to the indices.put_settings API, read more about this API online: + /// + /// + /// + Task UpdateSettingsAsync(IUpdateIndexSettingsRequest request, CancellationToken ct = default); + /// + /// PUT request to the indices.put_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ + /// + PutIndexTemplateResponse PutTemplate(Name name, Func selector); + /// + /// PUT request to the indices.put_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ + /// + Task PutTemplateAsync(Name name, Func selector, CancellationToken ct = default); + /// + /// PUT request to the indices.put_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ + /// + PutIndexTemplateResponse PutTemplate(IPutIndexTemplateRequest request); + /// + /// PUT request to the indices.put_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-templates/ + /// + Task PutTemplateAsync(IPutIndexTemplateRequest request, CancellationToken ct = default); + /// + /// GET request to the indices.recovery API, read more about this API online: + /// + /// + /// + RefreshResponse Refresh(Indices index = null, Func selector = null); + /// + /// POST request to the indices.refresh API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/get-documents/ + /// + Task RefreshAsync(Indices index = null, Func selector = null, CancellationToken ct = default); + /// + /// POST request to the indices.refresh API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/get-documents/ + /// + RefreshResponse Refresh(IRefreshRequest request); + /// + /// POST request to the indices.refresh API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/document-apis/get-documents/ + /// + Task RefreshAsync(IRefreshRequest request, CancellationToken ct = default); + /// + /// GET request to the indices.resolve_index API, read more about this API online: + /// + /// + ResolveIndexResponse Resolve(Names name, Func selector = null); + /// + /// GET request to the indices.resolve_index API, read more about this API online: + /// + /// + Task ResolveAsync(Names name, Func selector = null, CancellationToken ct = default); + /// + /// GET request to the indices.resolve_index API, read more about this API online: + /// + /// + ResolveIndexResponse Resolve(IResolveIndexRequest request); + /// + /// GET request to the indices.resolve_index API, read more about this API online: + /// + /// + Task ResolveAsync(IResolveIndexRequest request, CancellationToken ct = default); + /// + /// POST request to the indices.rollover API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/data-streams/#step-5-rollover-a-data-stream + /// + RolloverIndexResponse Rollover(Name alias, Func selector = null); + /// + /// POST request to the indices.rollover API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/data-streams/#step-5-rollover-a-data-stream + /// + Task RolloverAsync(Name alias, Func selector = null, CancellationToken ct = default); + /// + /// POST request to the indices.rollover API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/data-streams/#step-5-rollover-a-data-stream + /// + RolloverIndexResponse Rollover(IRolloverIndexRequest request); + /// + /// POST request to the indices.rollover API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/data-streams/#step-5-rollover-a-data-stream + /// + Task RolloverAsync(IRolloverIndexRequest request, CancellationToken ct = default); + /// + /// GET request to the indices.segments API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-segments/ + /// + ShrinkIndexResponse Shrink(IndexName index, IndexName target, Func selector = null); + /// + /// PUT request to the indices.shrink API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/shrink-index/ + /// + Task ShrinkAsync(IndexName index, IndexName target, Func selector = null, CancellationToken ct = default); + /// + /// PUT request to the indices.shrink API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/shrink-index/ + /// + ShrinkIndexResponse Shrink(IShrinkIndexRequest request); + /// + /// PUT request to the indices.shrink API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/shrink-index/ + /// + Task ShrinkAsync(IShrinkIndexRequest request, CancellationToken ct = default); + /// + /// PUT request to the indices.split API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/split/ + /// + SplitIndexResponse Split(IndexName index, IndexName target, Func selector = null); + /// + /// PUT request to the indices.split API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/split/ + /// + Task SplitAsync(IndexName index, IndexName target, Func selector = null, CancellationToken ct = default); + /// + /// PUT request to the indices.split API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/split/ + /// + SplitIndexResponse Split(ISplitIndexRequest request); + /// + /// PUT request to the indices.split API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/index-apis/split/ + /// + Task SplitAsync(ISplitIndexRequest request, CancellationToken ct = default); + /// + /// GET request to the indices.stats API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/stats-api/ + /// + BulkAliasResponse BulkAlias(Func selector); + /// + /// POST request to the indices.update_aliases API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/alias/ + /// + Task BulkAliasAsync(Func selector, CancellationToken ct = default); + /// + /// POST request to the indices.update_aliases API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/alias/ + /// + BulkAliasResponse BulkAlias(IBulkAliasRequest request); + /// + /// POST request to the indices.update_aliases API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/opensearch/rest-api/alias/ + /// + Task BulkAliasAsync(IBulkAliasRequest request, CancellationToken ct = default); + /// + /// POST request to the indices.validate_query API, read more about this API online: + /// + /// + /// + ValidateQueryResponse ValidateQuery(Func, IValidateQueryRequest> selector = null) + where TDocument : class; + /// + /// POST request to the indices.validate_query API, read more about this API online: + /// + /// + /// + Task ValidateQueryAsync(Func, IValidateQueryRequest> selector = null, CancellationToken ct = default) + where TDocument : class; + /// + /// POST request to the indices.validate_query API, read more about this API online: + /// + /// + /// + ValidateQueryResponse ValidateQuery(IValidateQueryRequest request); + /// + /// POST request to the indices.validate_query API, read more about this API online: + /// + /// + /// + Task ValidateQueryAsync(IValidateQueryRequest request, CancellationToken ct = default); + } + /// - /// Indices APIs. + /// Indices implementation. /// Not intended to be instantiated directly. Use the property /// on . /// diff --git a/src/OpenSearch.Client/_Generated/IOpenSearchClient.cs b/src/OpenSearch.Client/_Generated/IOpenSearchClient.cs index 1db4dc4f29..246a6371e0 100644 --- a/src/OpenSearch.Client/_Generated/IOpenSearchClient.cs +++ b/src/OpenSearch.Client/_Generated/IOpenSearchClient.cs @@ -66,31 +66,31 @@ namespace OpenSearch.Client public partial interface IOpenSearchClient { /// Cat APIs - CatNamespace Cat { get; } + ICatNamespace Cat { get; } /// Cluster APIs - ClusterNamespace Cluster { get; } + IClusterNamespace Cluster { get; } /// Dangling Indices APIs - DanglingIndicesNamespace DanglingIndices { get; } + IDanglingIndicesNamespace DanglingIndices { get; } /// Indices APIs - IndicesNamespace Indices { get; } + IIndicesNamespace Indices { get; } /// Ingest APIs - IngestNamespace Ingest { get; } + IIngestNamespace Ingest { get; } /// Nodes APIs - NodesNamespace Nodes { get; } + INodesNamespace Nodes { get; } /// Http APIs - HttpNamespace Http { get; } + IHttpNamespace Http { get; } /// Snapshot APIs - SnapshotNamespace Snapshot { get; } + ISnapshotNamespace Snapshot { get; } /// Tasks APIs - TasksNamespace Tasks { get; } + ITasksNamespace Tasks { get; } /// /// POST request to the create_pit API, read more about this API online: diff --git a/src/OpenSearch.Client/_Generated/OpenSearchClient.Cat.cs b/src/OpenSearch.Client/_Generated/OpenSearchClient.Cat.cs index 62f1245ab9..f30c6a4eee 100644 --- a/src/OpenSearch.Client/_Generated/OpenSearchClient.Cat.cs +++ b/src/OpenSearch.Client/_Generated/OpenSearchClient.Cat.cs @@ -53,11 +53,910 @@ namespace OpenSearch.Client.Specification.CatApi { /// /// Cat APIs. + /// Use the property on . + /// + public partial interface ICatNamespace + { + /// + /// GET request to the cat.aliases API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-aliases/ + /// + CatResponse Aliases( + Func selector = null + ); + + /// + /// GET request to the cat.aliases API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-aliases/ + /// + Task> AliasesAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.aliases API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-aliases/ + /// + CatResponse Aliases(ICatAliasesRequest request); + + /// + /// GET request to the cat.aliases API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-aliases/ + /// + Task> AliasesAsync( + ICatAliasesRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.all_pit_segments API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/search-plugins/point-in-time-api/ + /// + /// Supported by OpenSearch servers of version 2.4.0 or greater. + CatResponse AllPitSegments( + Func selector = null + ); + + /// + /// GET request to the cat.all_pit_segments API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/search-plugins/point-in-time-api/ + /// + /// Supported by OpenSearch servers of version 2.4.0 or greater. + Task> AllPitSegmentsAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.all_pit_segments API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/search-plugins/point-in-time-api/ + /// + /// Supported by OpenSearch servers of version 2.4.0 or greater. + CatResponse AllPitSegments(ICatAllPitSegmentsRequest request); + + /// + /// GET request to the cat.all_pit_segments API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/search-plugins/point-in-time-api/ + /// + /// Supported by OpenSearch servers of version 2.4.0 or greater. + Task> AllPitSegmentsAsync( + ICatAllPitSegmentsRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.allocation API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-allocation/ + /// + CatResponse Allocation( + Func selector = null + ); + + /// + /// GET request to the cat.allocation API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-allocation/ + /// + Task> AllocationAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.allocation API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-allocation/ + /// + CatResponse Allocation(ICatAllocationRequest request); + + /// + /// GET request to the cat.allocation API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-allocation/ + /// + Task> AllocationAsync( + ICatAllocationRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.cluster_manager API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ + /// + /// Supported by OpenSearch servers of version 2.0.0 or greater. + CatResponse ClusterManager( + Func selector = null + ); + + /// + /// GET request to the cat.cluster_manager API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ + /// + /// Supported by OpenSearch servers of version 2.0.0 or greater. + Task> ClusterManagerAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.cluster_manager API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ + /// + /// Supported by OpenSearch servers of version 2.0.0 or greater. + CatResponse ClusterManager(ICatClusterManagerRequest request); + + /// + /// GET request to the cat.cluster_manager API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ + /// + /// Supported by OpenSearch servers of version 2.0.0 or greater. + Task> ClusterManagerAsync( + ICatClusterManagerRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.count API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-count/ + /// + CatResponse Count( + Func selector = null + ); + + /// + /// GET request to the cat.count API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-count/ + /// + Task> CountAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.count API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-count/ + /// + CatResponse Count(ICatCountRequest request); + + /// + /// GET request to the cat.count API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-count/ + /// + Task> CountAsync( + ICatCountRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.fielddata API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-field-data/ + /// + CatResponse Fielddata( + Func selector = null + ); + + /// + /// GET request to the cat.fielddata API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-field-data/ + /// + Task> FielddataAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.fielddata API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-field-data/ + /// + CatResponse Fielddata(ICatFielddataRequest request); + + /// + /// GET request to the cat.fielddata API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-field-data/ + /// + Task> FielddataAsync( + ICatFielddataRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.health API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-health/ + /// + CatResponse Health( + Func selector = null + ); + + /// + /// GET request to the cat.health API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-health/ + /// + Task> HealthAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.health API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-health/ + /// + CatResponse Health(ICatHealthRequest request); + + /// + /// GET request to the cat.health API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-health/ + /// + Task> HealthAsync( + ICatHealthRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.help API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/index/ + /// + CatResponse Help(Func selector = null); + + /// + /// GET request to the cat.help API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/index/ + /// + Task> HelpAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.help API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/index/ + /// + CatResponse Help(ICatHelpRequest request); + + /// + /// GET request to the cat.help API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/index/ + /// + Task> HelpAsync( + ICatHelpRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.indices API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-indices/ + /// + CatResponse Indices( + Func selector = null + ); + + /// + /// GET request to the cat.indices API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-indices/ + /// + Task> IndicesAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.indices API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-indices/ + /// + CatResponse Indices(ICatIndicesRequest request); + + /// + /// GET request to the cat.indices API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-indices/ + /// + Task> IndicesAsync( + ICatIndicesRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.master API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ + /// + [Obsolete( + "Deprecated as of: 2.0, reason: To promote inclusive language, please use '/_cat/cluster_manager' instead." + )] + CatResponse Master( + Func selector = null + ); + + /// + /// GET request to the cat.master API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ + /// + [Obsolete( + "Deprecated as of: 2.0, reason: To promote inclusive language, please use '/_cat/cluster_manager' instead." + )] + Task> MasterAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.master API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ + /// + [Obsolete( + "Deprecated as of: 2.0, reason: To promote inclusive language, please use '/_cat/cluster_manager' instead." + )] + CatResponse Master(ICatMasterRequest request); + + /// + /// GET request to the cat.master API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ + /// + [Obsolete( + "Deprecated as of: 2.0, reason: To promote inclusive language, please use '/_cat/cluster_manager' instead." + )] + Task> MasterAsync( + ICatMasterRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.nodeattrs API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-nodeattrs/ + /// + CatResponse NodeAttributes( + Func selector = null + ); + + /// + /// GET request to the cat.nodeattrs API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-nodeattrs/ + /// + Task> NodeAttributesAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.nodeattrs API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-nodeattrs/ + /// + CatResponse NodeAttributes(ICatNodeAttributesRequest request); + + /// + /// GET request to the cat.nodeattrs API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-nodeattrs/ + /// + Task> NodeAttributesAsync( + ICatNodeAttributesRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.nodes API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-nodes/ + /// + CatResponse Nodes( + Func selector = null + ); + + /// + /// GET request to the cat.nodes API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-nodes/ + /// + Task> NodesAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.nodes API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-nodes/ + /// + CatResponse Nodes(ICatNodesRequest request); + + /// + /// GET request to the cat.nodes API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-nodes/ + /// + Task> NodesAsync( + ICatNodesRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.pending_tasks API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/ + /// + CatResponse PendingTasks( + Func selector = null + ); + + /// + /// GET request to the cat.pending_tasks API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/ + /// + Task> PendingTasksAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.pending_tasks API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/ + /// + CatResponse PendingTasks(ICatPendingTasksRequest request); + + /// + /// GET request to the cat.pending_tasks API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/ + /// + Task> PendingTasksAsync( + ICatPendingTasksRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.pit_segments API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/search-plugins/point-in-time-api/ + /// + /// Supported by OpenSearch servers of version 2.4.0 or greater. + CatResponse PitSegments( + Func selector = null + ); + + /// + /// GET request to the cat.pit_segments API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/search-plugins/point-in-time-api/ + /// + /// Supported by OpenSearch servers of version 2.4.0 or greater. + Task> PitSegmentsAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.pit_segments API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/search-plugins/point-in-time-api/ + /// + /// Supported by OpenSearch servers of version 2.4.0 or greater. + CatResponse PitSegments(ICatPitSegmentsRequest request); + + /// + /// GET request to the cat.pit_segments API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/search-plugins/point-in-time-api/ + /// + /// Supported by OpenSearch servers of version 2.4.0 or greater. + Task> PitSegmentsAsync( + ICatPitSegmentsRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.plugins API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-plugins/ + /// + CatResponse Plugins( + Func selector = null + ); + + /// + /// GET request to the cat.plugins API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-plugins/ + /// + Task> PluginsAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.plugins API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-plugins/ + /// + CatResponse Plugins(ICatPluginsRequest request); + + /// + /// GET request to the cat.plugins API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-plugins/ + /// + Task> PluginsAsync( + ICatPluginsRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.recovery API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-plugins/ + /// + CatResponse Recovery( + Func selector = null + ); + + /// + /// GET request to the cat.recovery API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-plugins/ + /// + Task> RecoveryAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.recovery API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-plugins/ + /// + CatResponse Recovery(ICatRecoveryRequest request); + + /// + /// GET request to the cat.recovery API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-plugins/ + /// + Task> RecoveryAsync( + ICatRecoveryRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.repositories API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-repositories/ + /// + CatResponse Repositories( + Func selector = null + ); + + /// + /// GET request to the cat.repositories API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-repositories/ + /// + Task> RepositoriesAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.repositories API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-repositories/ + /// + CatResponse Repositories(ICatRepositoriesRequest request); + + /// + /// GET request to the cat.repositories API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-repositories/ + /// + Task> RepositoriesAsync( + ICatRepositoriesRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.segment_replication API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-segment-replication/ + /// + /// Supported by OpenSearch servers of version 2.6.0 or greater. + CatResponse SegmentReplication( + Func selector = null + ); + + /// + /// GET request to the cat.segment_replication API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-segment-replication/ + /// + /// Supported by OpenSearch servers of version 2.6.0 or greater. + Task> SegmentReplicationAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.segment_replication API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-segment-replication/ + /// + /// Supported by OpenSearch servers of version 2.6.0 or greater. + CatResponse SegmentReplication( + ICatSegmentReplicationRequest request + ); + + /// + /// GET request to the cat.segment_replication API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-segment-replication/ + /// + /// Supported by OpenSearch servers of version 2.6.0 or greater. + Task> SegmentReplicationAsync( + ICatSegmentReplicationRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.segments API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-segments/ + /// + CatResponse Segments( + Func selector = null + ); + + /// + /// GET request to the cat.segments API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-segments/ + /// + Task> SegmentsAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.segments API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-segments/ + /// + CatResponse Segments(ICatSegmentsRequest request); + + /// + /// GET request to the cat.segments API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-segments/ + /// + Task> SegmentsAsync( + ICatSegmentsRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.shards API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-shards/ + /// + CatResponse Shards( + Func selector = null + ); + + /// + /// GET request to the cat.shards API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-shards/ + /// + Task> ShardsAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.shards API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-shards/ + /// + CatResponse Shards(ICatShardsRequest request); + + /// + /// GET request to the cat.shards API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-shards/ + /// + Task> ShardsAsync( + ICatShardsRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.snapshots API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-snapshots/ + /// + CatResponse Snapshots( + Func selector = null + ); + + /// + /// GET request to the cat.snapshots API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-snapshots/ + /// + Task> SnapshotsAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.snapshots API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-snapshots/ + /// + CatResponse Snapshots(ICatSnapshotsRequest request); + + /// + /// GET request to the cat.snapshots API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-snapshots/ + /// + Task> SnapshotsAsync( + ICatSnapshotsRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.tasks API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-tasks/ + /// + CatResponse Tasks( + Func selector = null + ); + + /// + /// GET request to the cat.tasks API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-tasks/ + /// + Task> TasksAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.tasks API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-tasks/ + /// + CatResponse Tasks(ICatTasksRequest request); + + /// + /// GET request to the cat.tasks API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-tasks/ + /// + Task> TasksAsync( + ICatTasksRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.templates API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-templates/ + /// + CatResponse Templates( + Func selector = null + ); + + /// + /// GET request to the cat.templates API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-templates/ + /// + Task> TemplatesAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.templates API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-templates/ + /// + CatResponse Templates(ICatTemplatesRequest request); + + /// + /// GET request to the cat.templates API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-templates/ + /// + Task> TemplatesAsync( + ICatTemplatesRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.thread_pool API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-thread-pool/ + /// + CatResponse ThreadPool( + Func selector = null + ); + + /// + /// GET request to the cat.thread_pool API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-thread-pool/ + /// + Task> ThreadPoolAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cat.thread_pool API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-thread-pool/ + /// + CatResponse ThreadPool(ICatThreadPoolRequest request); + + /// + /// GET request to the cat.thread_pool API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cat/cat-thread-pool/ + /// + Task> ThreadPoolAsync( + ICatThreadPoolRequest request, + CancellationToken ct = default + ); + } + + /// + /// Cat implementation. /// Not intended to be instantiated directly. Use the property /// on . /// /// - public partial class CatNamespace : NamespacedClientProxy + public partial class CatNamespace : NamespacedClientProxy, ICatNamespace { internal CatNamespace(OpenSearchClient client) : base(client) { } diff --git a/src/OpenSearch.Client/_Generated/OpenSearchClient.Cluster.cs b/src/OpenSearch.Client/_Generated/OpenSearchClient.Cluster.cs index 6e4194dbe9..e486d94e12 100644 --- a/src/OpenSearch.Client/_Generated/OpenSearchClient.Cluster.cs +++ b/src/OpenSearch.Client/_Generated/OpenSearchClient.Cluster.cs @@ -53,11 +53,594 @@ namespace OpenSearch.Client.Specification.ClusterApi { /// /// Cluster APIs. + /// Use the property on . + /// + public partial interface IClusterNamespace + { + /// + /// POST request to the cluster.allocation_explain API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-allocation/ + /// + ClusterAllocationExplainResponse AllocationExplain( + Func selector = + null + ); + + /// + /// POST request to the cluster.allocation_explain API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-allocation/ + /// + Task AllocationExplainAsync( + Func selector = + null, + CancellationToken ct = default + ); + + /// + /// POST request to the cluster.allocation_explain API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-allocation/ + /// + ClusterAllocationExplainResponse AllocationExplain( + IClusterAllocationExplainRequest request + ); + + /// + /// POST request to the cluster.allocation_explain API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-allocation/ + /// + Task AllocationExplainAsync( + IClusterAllocationExplainRequest request, + CancellationToken ct = default + ); + + /// + /// DELETE request to the cluster.delete_component_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + DeleteComponentTemplateResponse DeleteComponentTemplate( + Name name, + Func selector = null + ); + + /// + /// DELETE request to the cluster.delete_component_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task DeleteComponentTemplateAsync( + Name name, + Func selector = + null, + CancellationToken ct = default + ); + + /// + /// DELETE request to the cluster.delete_component_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + DeleteComponentTemplateResponse DeleteComponentTemplate( + IDeleteComponentTemplateRequest request + ); + + /// + /// DELETE request to the cluster.delete_component_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task DeleteComponentTemplateAsync( + IDeleteComponentTemplateRequest request, + CancellationToken ct = default + ); + + /// + /// DELETE request to the cluster.delete_voting_config_exclusions API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + DeleteVotingConfigExclusionsResponse DeleteVotingConfigExclusions( + Func< + DeleteVotingConfigExclusionsDescriptor, + IDeleteVotingConfigExclusionsRequest + > selector = null + ); + + /// + /// DELETE request to the cluster.delete_voting_config_exclusions API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task DeleteVotingConfigExclusionsAsync( + Func< + DeleteVotingConfigExclusionsDescriptor, + IDeleteVotingConfigExclusionsRequest + > selector = null, + CancellationToken ct = default + ); + + /// + /// DELETE request to the cluster.delete_voting_config_exclusions API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + DeleteVotingConfigExclusionsResponse DeleteVotingConfigExclusions( + IDeleteVotingConfigExclusionsRequest request + ); + + /// + /// DELETE request to the cluster.delete_voting_config_exclusions API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task DeleteVotingConfigExclusionsAsync( + IDeleteVotingConfigExclusionsRequest request, + CancellationToken ct = default + ); + + /// + /// HEAD request to the cluster.exists_component_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + ExistsResponse ComponentTemplateExists( + Name name, + Func selector = null + ); + + /// + /// HEAD request to the cluster.exists_component_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task ComponentTemplateExistsAsync( + Name name, + Func selector = + null, + CancellationToken ct = default + ); + + /// + /// HEAD request to the cluster.exists_component_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + ExistsResponse ComponentTemplateExists(IComponentTemplateExistsRequest request); + + /// + /// HEAD request to the cluster.exists_component_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task ComponentTemplateExistsAsync( + IComponentTemplateExistsRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cluster.get_component_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + GetComponentTemplateResponse GetComponentTemplate( + Name name = null, + Func selector = null + ); + + /// + /// GET request to the cluster.get_component_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task GetComponentTemplateAsync( + Name name = null, + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cluster.get_component_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + GetComponentTemplateResponse GetComponentTemplate(IGetComponentTemplateRequest request); + + /// + /// GET request to the cluster.get_component_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task GetComponentTemplateAsync( + IGetComponentTemplateRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cluster.get_settings API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-settings/ + /// + ClusterGetSettingsResponse GetSettings( + Func selector = null + ); + + /// + /// GET request to the cluster.get_settings API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-settings/ + /// + Task GetSettingsAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cluster.get_settings API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-settings/ + /// + ClusterGetSettingsResponse GetSettings(IClusterGetSettingsRequest request); + + /// + /// GET request to the cluster.get_settings API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-settings/ + /// + Task GetSettingsAsync( + IClusterGetSettingsRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cluster.health API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-health/ + /// + ClusterHealthResponse Health( + Indices index = null, + Func selector = null + ); + + /// + /// GET request to the cluster.health API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-health/ + /// + Task HealthAsync( + Indices index = null, + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cluster.health API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-health/ + /// + ClusterHealthResponse Health(IClusterHealthRequest request); + + /// + /// GET request to the cluster.health API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-health/ + /// + Task HealthAsync( + IClusterHealthRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cluster.pending_tasks API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + ClusterPendingTasksResponse PendingTasks( + Func selector = null + ); + + /// + /// GET request to the cluster.pending_tasks API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task PendingTasksAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cluster.pending_tasks API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + ClusterPendingTasksResponse PendingTasks(IClusterPendingTasksRequest request); + + /// + /// GET request to the cluster.pending_tasks API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task PendingTasksAsync( + IClusterPendingTasksRequest request, + CancellationToken ct = default + ); + + /// + /// POST request to the cluster.post_voting_config_exclusions API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + PostVotingConfigExclusionsResponse PostVotingConfigExclusions( + Func< + PostVotingConfigExclusionsDescriptor, + IPostVotingConfigExclusionsRequest + > selector = null + ); + + /// + /// POST request to the cluster.post_voting_config_exclusions API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task PostVotingConfigExclusionsAsync( + Func< + PostVotingConfigExclusionsDescriptor, + IPostVotingConfigExclusionsRequest + > selector = null, + CancellationToken ct = default + ); + + /// + /// POST request to the cluster.post_voting_config_exclusions API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + PostVotingConfigExclusionsResponse PostVotingConfigExclusions( + IPostVotingConfigExclusionsRequest request + ); + + /// + /// POST request to the cluster.post_voting_config_exclusions API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task PostVotingConfigExclusionsAsync( + IPostVotingConfigExclusionsRequest request, + CancellationToken ct = default + ); + + /// + /// PUT request to the cluster.put_component_template API, read more about this API online: + /// + /// + /// + PutComponentTemplateResponse PutComponentTemplate( + Name name, + Func selector + ); + + /// + /// PUT request to the cluster.put_component_template API, read more about this API online: + /// + /// + /// + Task PutComponentTemplateAsync( + Name name, + Func selector, + CancellationToken ct = default + ); + + /// + /// PUT request to the cluster.put_component_template API, read more about this API online: + /// + /// + /// + PutComponentTemplateResponse PutComponentTemplate(IPutComponentTemplateRequest request); + + /// + /// PUT request to the cluster.put_component_template API, read more about this API online: + /// + /// + /// + Task PutComponentTemplateAsync( + IPutComponentTemplateRequest request, + CancellationToken ct = default + ); + + /// + /// PUT request to the cluster.put_settings API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-settings/ + /// + ClusterPutSettingsResponse PutSettings( + Func selector + ); + + /// + /// PUT request to the cluster.put_settings API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-settings/ + /// + Task PutSettingsAsync( + Func selector, + CancellationToken ct = default + ); + + /// + /// PUT request to the cluster.put_settings API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-settings/ + /// + ClusterPutSettingsResponse PutSettings(IClusterPutSettingsRequest request); + + /// + /// PUT request to the cluster.put_settings API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-settings/ + /// + Task PutSettingsAsync( + IClusterPutSettingsRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cluster.remote_info API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/remote-info/ + /// + RemoteInfoResponse RemoteInfo( + Func selector = null + ); + + /// + /// GET request to the cluster.remote_info API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/remote-info/ + /// + Task RemoteInfoAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cluster.remote_info API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/remote-info/ + /// + RemoteInfoResponse RemoteInfo(IRemoteInfoRequest request); + + /// + /// GET request to the cluster.remote_info API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/remote-info/ + /// + Task RemoteInfoAsync( + IRemoteInfoRequest request, + CancellationToken ct = default + ); + + /// + /// POST request to the cluster.reroute API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + ClusterRerouteResponse Reroute( + Func selector = null + ); + + /// + /// POST request to the cluster.reroute API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task RerouteAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// POST request to the cluster.reroute API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + ClusterRerouteResponse Reroute(IClusterRerouteRequest request); + + /// + /// POST request to the cluster.reroute API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task RerouteAsync( + IClusterRerouteRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cluster.state API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + ClusterStateResponse State( + Indices index = null, + Func selector = null + ); + + /// + /// GET request to the cluster.state API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task StateAsync( + Indices index = null, + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cluster.state API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + ClusterStateResponse State(IClusterStateRequest request); + + /// + /// GET request to the cluster.state API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task StateAsync( + IClusterStateRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the cluster.stats API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-stats/ + /// + ClusterStatsResponse Stats( + Func selector = null + ); + + /// + /// GET request to the cluster.stats API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-stats/ + /// + Task StatsAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the cluster.stats API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-stats/ + /// + ClusterStatsResponse Stats(IClusterStatsRequest request); + + /// + /// GET request to the cluster.stats API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-stats/ + /// + Task StatsAsync( + IClusterStatsRequest request, + CancellationToken ct = default + ); + } + + /// + /// Cluster implementation. /// Not intended to be instantiated directly. Use the property /// on . /// /// - public partial class ClusterNamespace : NamespacedClientProxy + public partial class ClusterNamespace : NamespacedClientProxy, IClusterNamespace { internal ClusterNamespace(OpenSearchClient client) : base(client) { } diff --git a/src/OpenSearch.Client/_Generated/OpenSearchClient.DanglingIndices.cs b/src/OpenSearch.Client/_Generated/OpenSearchClient.DanglingIndices.cs index 8ad5717c77..98b385d2ef 100644 --- a/src/OpenSearch.Client/_Generated/OpenSearchClient.DanglingIndices.cs +++ b/src/OpenSearch.Client/_Generated/OpenSearchClient.DanglingIndices.cs @@ -53,11 +53,130 @@ namespace OpenSearch.Client.Specification.DanglingIndicesApi { /// /// Dangling Indices APIs. + /// Use the property on . + /// + public partial interface IDanglingIndicesNamespace + { + /// + /// DELETE request to the dangling_indices.delete_dangling_index API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ + /// + DeleteDanglingIndexResponse DeleteDanglingIndex( + IndexUuid indexUuid, + Func selector = null + ); + + /// + /// DELETE request to the dangling_indices.delete_dangling_index API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ + /// + Task DeleteDanglingIndexAsync( + IndexUuid indexUuid, + Func selector = null, + CancellationToken ct = default + ); + + /// + /// DELETE request to the dangling_indices.delete_dangling_index API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ + /// + DeleteDanglingIndexResponse DeleteDanglingIndex(IDeleteDanglingIndexRequest request); + + /// + /// DELETE request to the dangling_indices.delete_dangling_index API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ + /// + Task DeleteDanglingIndexAsync( + IDeleteDanglingIndexRequest request, + CancellationToken ct = default + ); + + /// + /// POST request to the dangling_indices.import_dangling_index API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ + /// + ImportDanglingIndexResponse ImportDanglingIndex( + IndexUuid indexUuid, + Func selector = null + ); + + /// + /// POST request to the dangling_indices.import_dangling_index API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ + /// + Task ImportDanglingIndexAsync( + IndexUuid indexUuid, + Func selector = null, + CancellationToken ct = default + ); + + /// + /// POST request to the dangling_indices.import_dangling_index API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ + /// + ImportDanglingIndexResponse ImportDanglingIndex(IImportDanglingIndexRequest request); + + /// + /// POST request to the dangling_indices.import_dangling_index API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ + /// + Task ImportDanglingIndexAsync( + IImportDanglingIndexRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the dangling_indices.list_dangling_indices API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ + /// + ListDanglingIndicesResponse List( + Func selector = null + ); + + /// + /// GET request to the dangling_indices.list_dangling_indices API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ + /// + Task ListAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the dangling_indices.list_dangling_indices API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ + /// + ListDanglingIndicesResponse List(IListDanglingIndicesRequest request); + + /// + /// GET request to the dangling_indices.list_dangling_indices API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ + /// + Task ListAsync( + IListDanglingIndicesRequest request, + CancellationToken ct = default + ); + } + + /// + /// Dangling Indices implementation. /// Not intended to be instantiated directly. Use the property /// on . /// /// - public partial class DanglingIndicesNamespace : NamespacedClientProxy + public partial class DanglingIndicesNamespace : NamespacedClientProxy, IDanglingIndicesNamespace { internal DanglingIndicesNamespace(OpenSearchClient client) : base(client) { } diff --git a/src/OpenSearch.Client/_Generated/OpenSearchClient.Http.cs b/src/OpenSearch.Client/_Generated/OpenSearchClient.Http.cs index 340074cb59..195d173723 100644 --- a/src/OpenSearch.Client/_Generated/OpenSearchClient.Http.cs +++ b/src/OpenSearch.Client/_Generated/OpenSearchClient.Http.cs @@ -30,11 +30,129 @@ namespace OpenSearch.Client.Specification.HttpApi; /// /// Http APIs. +/// Use the property on . +/// +public interface IHttpNamespace +{ + TResponse Delete( + string path, + Func selector = null + ) + where TResponse : class, IOpenSearchResponse, new(); + + Task DeleteAsync( + string path, + Func selector = null, + CancellationToken ct = default + ) + where TResponse : class, IOpenSearchResponse, new(); + + TResponse Delete(IHttpDeleteRequest request) + where TResponse : class, IOpenSearchResponse, new(); + + Task DeleteAsync( + IHttpDeleteRequest request, + CancellationToken ct = default + ) + where TResponse : class, IOpenSearchResponse, new(); + + TResponse Get(string path, Func selector = null) + where TResponse : class, IOpenSearchResponse, new(); + + Task GetAsync( + string path, + Func selector = null, + CancellationToken ct = default + ) + where TResponse : class, IOpenSearchResponse, new(); + + TResponse Get(IHttpGetRequest request) + where TResponse : class, IOpenSearchResponse, new(); + + Task GetAsync(IHttpGetRequest request, CancellationToken ct = default) + where TResponse : class, IOpenSearchResponse, new(); + + TResponse Head( + string path, + Func selector = null + ) + where TResponse : class, IOpenSearchResponse, new(); + + Task HeadAsync( + string path, + Func selector = null, + CancellationToken ct = default + ) + where TResponse : class, IOpenSearchResponse, new(); + + TResponse Head(IHttpHeadRequest request) + where TResponse : class, IOpenSearchResponse, new(); + + Task HeadAsync(IHttpHeadRequest request, CancellationToken ct = default) + where TResponse : class, IOpenSearchResponse, new(); + + TResponse Patch( + string path, + Func selector = null + ) + where TResponse : class, IOpenSearchResponse, new(); + + Task PatchAsync( + string path, + Func selector = null, + CancellationToken ct = default + ) + where TResponse : class, IOpenSearchResponse, new(); + + TResponse Patch(IHttpPatchRequest request) + where TResponse : class, IOpenSearchResponse, new(); + + Task PatchAsync(IHttpPatchRequest request, CancellationToken ct = default) + where TResponse : class, IOpenSearchResponse, new(); + + TResponse Post( + string path, + Func selector = null + ) + where TResponse : class, IOpenSearchResponse, new(); + + Task PostAsync( + string path, + Func selector = null, + CancellationToken ct = default + ) + where TResponse : class, IOpenSearchResponse, new(); + + TResponse Post(IHttpPostRequest request) + where TResponse : class, IOpenSearchResponse, new(); + + Task PostAsync(IHttpPostRequest request, CancellationToken ct = default) + where TResponse : class, IOpenSearchResponse, new(); + + TResponse Put(string path, Func selector = null) + where TResponse : class, IOpenSearchResponse, new(); + + Task PutAsync( + string path, + Func selector = null, + CancellationToken ct = default + ) + where TResponse : class, IOpenSearchResponse, new(); + + TResponse Put(IHttpPutRequest request) + where TResponse : class, IOpenSearchResponse, new(); + + Task PutAsync(IHttpPutRequest request, CancellationToken ct = default) + where TResponse : class, IOpenSearchResponse, new(); +} + +/// +/// Http implementation. /// Not intended to be instantiated directly. Use the property /// on . /// /// -public class HttpNamespace : NamespacedClientProxy +public class HttpNamespace : NamespacedClientProxy, IHttpNamespace { internal HttpNamespace(OpenSearchClient client) : base(client) { } diff --git a/src/OpenSearch.Client/_Generated/OpenSearchClient.Indices.cs b/src/OpenSearch.Client/_Generated/OpenSearchClient.Indices.cs index d0b77e1c2f..c3364bb7fd 100644 --- a/src/OpenSearch.Client/_Generated/OpenSearchClient.Indices.cs +++ b/src/OpenSearch.Client/_Generated/OpenSearchClient.Indices.cs @@ -53,11 +53,194 @@ namespace OpenSearch.Client.Specification.IndicesApi { /// /// Indices APIs. + /// Use the property on . + /// + public partial interface IIndicesNamespace + { + /// + /// DELETE request to the indices.delete_index_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/im-plugin/index-templates/#delete-a-template + /// + DeleteComposableIndexTemplateResponse DeleteComposableTemplate( + Name name, + Func< + DeleteComposableIndexTemplateDescriptor, + IDeleteComposableIndexTemplateRequest + > selector = null + ); + + /// + /// DELETE request to the indices.delete_index_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/im-plugin/index-templates/#delete-a-template + /// + Task DeleteComposableTemplateAsync( + Name name, + Func< + DeleteComposableIndexTemplateDescriptor, + IDeleteComposableIndexTemplateRequest + > selector = null, + CancellationToken ct = default + ); + + /// + /// DELETE request to the indices.delete_index_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/im-plugin/index-templates/#delete-a-template + /// + DeleteComposableIndexTemplateResponse DeleteComposableTemplate( + IDeleteComposableIndexTemplateRequest request + ); + + /// + /// DELETE request to the indices.delete_index_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/im-plugin/index-templates/#delete-a-template + /// + Task DeleteComposableTemplateAsync( + IDeleteComposableIndexTemplateRequest request, + CancellationToken ct = default + ); + + /// + /// HEAD request to the indices.exists_index_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/im-plugin/index-templates/ + /// + ExistsResponse ComposableTemplateExists( + Name name, + Func< + ComposableIndexTemplateExistsDescriptor, + IComposableIndexTemplateExistsRequest + > selector = null + ); + + /// + /// HEAD request to the indices.exists_index_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/im-plugin/index-templates/ + /// + Task ComposableTemplateExistsAsync( + Name name, + Func< + ComposableIndexTemplateExistsDescriptor, + IComposableIndexTemplateExistsRequest + > selector = null, + CancellationToken ct = default + ); + + /// + /// HEAD request to the indices.exists_index_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/im-plugin/index-templates/ + /// + ExistsResponse ComposableTemplateExists(IComposableIndexTemplateExistsRequest request); + + /// + /// HEAD request to the indices.exists_index_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/im-plugin/index-templates/ + /// + Task ComposableTemplateExistsAsync( + IComposableIndexTemplateExistsRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the indices.get_index_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/im-plugin/index-templates/ + /// + GetComposableIndexTemplateResponse GetComposableTemplate( + Name name = null, + Func< + GetComposableIndexTemplateDescriptor, + IGetComposableIndexTemplateRequest + > selector = null + ); + + /// + /// GET request to the indices.get_index_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/im-plugin/index-templates/ + /// + Task GetComposableTemplateAsync( + Name name = null, + Func< + GetComposableIndexTemplateDescriptor, + IGetComposableIndexTemplateRequest + > selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the indices.get_index_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/im-plugin/index-templates/ + /// + GetComposableIndexTemplateResponse GetComposableTemplate( + IGetComposableIndexTemplateRequest request + ); + + /// + /// GET request to the indices.get_index_template API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/im-plugin/index-templates/ + /// + Task GetComposableTemplateAsync( + IGetComposableIndexTemplateRequest request, + CancellationToken ct = default + ); + + /// + /// PUT request to the indices.put_index_template API, read more about this API online: + /// + /// + /// + PutComposableIndexTemplateResponse PutComposableTemplate( + Name name, + Func selector + ); + + /// + /// PUT request to the indices.put_index_template API, read more about this API online: + /// + /// + /// + Task PutComposableTemplateAsync( + Name name, + Func selector, + CancellationToken ct = default + ); + + /// + /// PUT request to the indices.put_index_template API, read more about this API online: + /// + /// + /// + PutComposableIndexTemplateResponse PutComposableTemplate( + IPutComposableIndexTemplateRequest request + ); + + /// + /// PUT request to the indices.put_index_template API, read more about this API online: + /// + /// + /// + Task PutComposableTemplateAsync( + IPutComposableIndexTemplateRequest request, + CancellationToken ct = default + ); + } + + /// + /// Indices implementation. /// Not intended to be instantiated directly. Use the property /// on . /// /// - public partial class IndicesNamespace : NamespacedClientProxy + public partial class IndicesNamespace : NamespacedClientProxy, IIndicesNamespace { internal IndicesNamespace(OpenSearchClient client) : base(client) { } diff --git a/src/OpenSearch.Client/_Generated/OpenSearchClient.Ingest.cs b/src/OpenSearch.Client/_Generated/OpenSearchClient.Ingest.cs index fa0ed81142..0c51a282ba 100644 --- a/src/OpenSearch.Client/_Generated/OpenSearchClient.Ingest.cs +++ b/src/OpenSearch.Client/_Generated/OpenSearchClient.Ingest.cs @@ -53,11 +53,202 @@ namespace OpenSearch.Client.Specification.IngestApi { /// /// Ingest APIs. + /// Use the property on . + /// + public partial interface IIngestNamespace + { + /// + /// DELETE request to the ingest.delete_pipeline API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/ingest-apis/delete-ingest/ + /// + DeletePipelineResponse DeletePipeline( + Id id, + Func selector = null + ); + + /// + /// DELETE request to the ingest.delete_pipeline API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/ingest-apis/delete-ingest/ + /// + Task DeletePipelineAsync( + Id id, + Func selector = null, + CancellationToken ct = default + ); + + /// + /// DELETE request to the ingest.delete_pipeline API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/ingest-apis/delete-ingest/ + /// + DeletePipelineResponse DeletePipeline(IDeletePipelineRequest request); + + /// + /// DELETE request to the ingest.delete_pipeline API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/ingest-apis/delete-ingest/ + /// + Task DeletePipelineAsync( + IDeletePipelineRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the ingest.get_pipeline API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/ingest-apis/get-ingest/ + /// + GetPipelineResponse GetPipeline( + Func selector = null + ); + + /// + /// GET request to the ingest.get_pipeline API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/ingest-apis/get-ingest/ + /// + Task GetPipelineAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the ingest.get_pipeline API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/ingest-apis/get-ingest/ + /// + GetPipelineResponse GetPipeline(IGetPipelineRequest request); + + /// + /// GET request to the ingest.get_pipeline API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/ingest-apis/get-ingest/ + /// + Task GetPipelineAsync( + IGetPipelineRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the ingest.processor_grok API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + GrokProcessorPatternsResponse GrokProcessorPatterns( + Func selector = null + ); + + /// + /// GET request to the ingest.processor_grok API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task GrokProcessorPatternsAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the ingest.processor_grok API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + GrokProcessorPatternsResponse GrokProcessorPatterns(IGrokProcessorPatternsRequest request); + + /// + /// GET request to the ingest.processor_grok API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task GrokProcessorPatternsAsync( + IGrokProcessorPatternsRequest request, + CancellationToken ct = default + ); + + /// + /// PUT request to the ingest.put_pipeline API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/ + /// + PutPipelineResponse PutPipeline( + Id id, + Func selector + ); + + /// + /// PUT request to the ingest.put_pipeline API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/ + /// + Task PutPipelineAsync( + Id id, + Func selector, + CancellationToken ct = default + ); + + /// + /// PUT request to the ingest.put_pipeline API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/ + /// + PutPipelineResponse PutPipeline(IPutPipelineRequest request); + + /// + /// PUT request to the ingest.put_pipeline API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/ + /// + Task PutPipelineAsync( + IPutPipelineRequest request, + CancellationToken ct = default + ); + + /// + /// POST request to the ingest.simulate API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/ingest-apis/simulate-ingest/ + /// + SimulatePipelineResponse SimulatePipeline( + Func selector = null + ); + + /// + /// POST request to the ingest.simulate API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/ingest-apis/simulate-ingest/ + /// + Task SimulatePipelineAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// POST request to the ingest.simulate API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/ingest-apis/simulate-ingest/ + /// + SimulatePipelineResponse SimulatePipeline(ISimulatePipelineRequest request); + + /// + /// POST request to the ingest.simulate API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/ingest-apis/simulate-ingest/ + /// + Task SimulatePipelineAsync( + ISimulatePipelineRequest request, + CancellationToken ct = default + ); + } + + /// + /// Ingest implementation. /// Not intended to be instantiated directly. Use the property /// on . /// /// - public partial class IngestNamespace : NamespacedClientProxy + public partial class IngestNamespace : NamespacedClientProxy, IIngestNamespace { internal IngestNamespace(OpenSearchClient client) : base(client) { } diff --git a/src/OpenSearch.Client/_Generated/OpenSearchClient.Nodes.cs b/src/OpenSearch.Client/_Generated/OpenSearchClient.Nodes.cs index dd56c31a52..3faae88494 100644 --- a/src/OpenSearch.Client/_Generated/OpenSearchClient.Nodes.cs +++ b/src/OpenSearch.Client/_Generated/OpenSearchClient.Nodes.cs @@ -53,11 +53,192 @@ namespace OpenSearch.Client.Specification.NodesApi { /// /// Nodes APIs. + /// Use the property on . + /// + public partial interface INodesNamespace + { + /// + /// GET request to the nodes.hot_threads API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/ + /// + NodesHotThreadsResponse HotThreads( + Func selector = null + ); + + /// + /// GET request to the nodes.hot_threads API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/ + /// + Task HotThreadsAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the nodes.hot_threads API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/ + /// + NodesHotThreadsResponse HotThreads(INodesHotThreadsRequest request); + + /// + /// GET request to the nodes.hot_threads API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/ + /// + Task HotThreadsAsync( + INodesHotThreadsRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the nodes.info API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-info/ + /// + NodesInfoResponse Info(Func selector = null); + + /// + /// GET request to the nodes.info API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-info/ + /// + Task InfoAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the nodes.info API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-info/ + /// + NodesInfoResponse Info(INodesInfoRequest request); + + /// + /// GET request to the nodes.info API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-info/ + /// + Task InfoAsync( + INodesInfoRequest request, + CancellationToken ct = default + ); + + /// + /// POST request to the nodes.reload_secure_settings API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-reload-secure/ + /// + ReloadSecureSettingsResponse ReloadSecureSettings( + Func selector = null + ); + + /// + /// POST request to the nodes.reload_secure_settings API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-reload-secure/ + /// + Task ReloadSecureSettingsAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// POST request to the nodes.reload_secure_settings API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-reload-secure/ + /// + ReloadSecureSettingsResponse ReloadSecureSettings(IReloadSecureSettingsRequest request); + + /// + /// POST request to the nodes.reload_secure_settings API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-reload-secure/ + /// + Task ReloadSecureSettingsAsync( + IReloadSecureSettingsRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the nodes.stats API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-usage/ + /// + NodesStatsResponse Stats(Func selector = null); + + /// + /// GET request to the nodes.stats API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-usage/ + /// + Task StatsAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the nodes.stats API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-usage/ + /// + NodesStatsResponse Stats(INodesStatsRequest request); + + /// + /// GET request to the nodes.stats API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-usage/ + /// + Task StatsAsync( + INodesStatsRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the nodes.usage API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + NodesUsageResponse Usage(Func selector = null); + + /// + /// GET request to the nodes.usage API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task UsageAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the nodes.usage API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + NodesUsageResponse Usage(INodesUsageRequest request); + + /// + /// GET request to the nodes.usage API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task UsageAsync( + INodesUsageRequest request, + CancellationToken ct = default + ); + } + + /// + /// Nodes implementation. /// Not intended to be instantiated directly. Use the property /// on . /// /// - public partial class NodesNamespace : NamespacedClientProxy + public partial class NodesNamespace : NamespacedClientProxy, INodesNamespace { internal NodesNamespace(OpenSearchClient client) : base(client) { } diff --git a/src/OpenSearch.Client/_Generated/OpenSearchClient.Snapshot.cs b/src/OpenSearch.Client/_Generated/OpenSearchClient.Snapshot.cs index b4895616b0..ba7a72b432 100644 --- a/src/OpenSearch.Client/_Generated/OpenSearchClient.Snapshot.cs +++ b/src/OpenSearch.Client/_Generated/OpenSearchClient.Snapshot.cs @@ -53,11 +53,441 @@ namespace OpenSearch.Client.Specification.SnapshotApi { /// /// Snapshot APIs. + /// Use the property on . + /// + public partial interface ISnapshotNamespace + { + /// + /// POST request to the snapshot.cleanup_repository API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + CleanupRepositoryResponse CleanupRepository( + Name repository, + Func selector = null + ); + + /// + /// POST request to the snapshot.cleanup_repository API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task CleanupRepositoryAsync( + Name repository, + Func selector = null, + CancellationToken ct = default + ); + + /// + /// POST request to the snapshot.cleanup_repository API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + CleanupRepositoryResponse CleanupRepository(ICleanupRepositoryRequest request); + + /// + /// POST request to the snapshot.cleanup_repository API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task CleanupRepositoryAsync( + ICleanupRepositoryRequest request, + CancellationToken ct = default + ); + + /// + /// PUT request to the snapshot.clone API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + CloneSnapshotResponse Clone( + Name repository, + Name snapshot, + Name targetSnapshot, + Func selector + ); + + /// + /// PUT request to the snapshot.clone API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task CloneAsync( + Name repository, + Name snapshot, + Name targetSnapshot, + Func selector, + CancellationToken ct = default + ); + + /// + /// PUT request to the snapshot.clone API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + CloneSnapshotResponse Clone(ICloneSnapshotRequest request); + + /// + /// PUT request to the snapshot.clone API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task CloneAsync( + ICloneSnapshotRequest request, + CancellationToken ct = default + ); + + /// + /// PUT request to the snapshot.create API, read more about this API online: + /// + /// + /// + SnapshotResponse Snapshot( + Name repository, + Name snapshot, + Func selector = null + ); + + /// + /// PUT request to the snapshot.create API, read more about this API online: + /// + /// + /// + Task SnapshotAsync( + Name repository, + Name snapshot, + Func selector = null, + CancellationToken ct = default + ); + + /// + /// PUT request to the snapshot.create API, read more about this API online: + /// + /// + /// + SnapshotResponse Snapshot(ISnapshotRequest request); + + /// + /// PUT request to the snapshot.create API, read more about this API online: + /// + /// + /// + Task SnapshotAsync( + ISnapshotRequest request, + CancellationToken ct = default + ); + + /// + /// PUT request to the snapshot.create_repository API, read more about this API online: + /// + /// + /// + CreateRepositoryResponse CreateRepository( + Name repository, + Func selector + ); + + /// + /// PUT request to the snapshot.create_repository API, read more about this API online: + /// + /// + /// + Task CreateRepositoryAsync( + Name repository, + Func selector, + CancellationToken ct = default + ); + + /// + /// PUT request to the snapshot.create_repository API, read more about this API online: + /// + /// + /// + CreateRepositoryResponse CreateRepository(ICreateRepositoryRequest request); + + /// + /// PUT request to the snapshot.create_repository API, read more about this API online: + /// + /// + /// + Task CreateRepositoryAsync( + ICreateRepositoryRequest request, + CancellationToken ct = default + ); + + /// + /// DELETE request to the snapshot.delete API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/delete-snapshot/ + /// + DeleteSnapshotResponse Delete( + Name repository, + Name snapshot, + Func selector = null + ); + + /// + /// DELETE request to the snapshot.delete API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/delete-snapshot/ + /// + Task DeleteAsync( + Name repository, + Name snapshot, + Func selector = null, + CancellationToken ct = default + ); + + /// + /// DELETE request to the snapshot.delete API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/delete-snapshot/ + /// + DeleteSnapshotResponse Delete(IDeleteSnapshotRequest request); + + /// + /// DELETE request to the snapshot.delete API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/delete-snapshot/ + /// + Task DeleteAsync( + IDeleteSnapshotRequest request, + CancellationToken ct = default + ); + + /// + /// DELETE request to the snapshot.delete_repository API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/delete-snapshot-repository/ + /// + DeleteRepositoryResponse DeleteRepository( + Names repository, + Func selector = null + ); + + /// + /// DELETE request to the snapshot.delete_repository API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/delete-snapshot-repository/ + /// + Task DeleteRepositoryAsync( + Names repository, + Func selector = null, + CancellationToken ct = default + ); + + /// + /// DELETE request to the snapshot.delete_repository API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/delete-snapshot-repository/ + /// + DeleteRepositoryResponse DeleteRepository(IDeleteRepositoryRequest request); + + /// + /// DELETE request to the snapshot.delete_repository API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/delete-snapshot-repository/ + /// + Task DeleteRepositoryAsync( + IDeleteRepositoryRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the snapshot.get API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + GetSnapshotResponse Get( + Name repository, + Names snapshot, + Func selector = null + ); + + /// + /// GET request to the snapshot.get API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task GetAsync( + Name repository, + Names snapshot, + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the snapshot.get API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + GetSnapshotResponse Get(IGetSnapshotRequest request); + + /// + /// GET request to the snapshot.get API, read more about this API online: + /// + /// https://opensearch.org/docs/latest + /// + Task GetAsync( + IGetSnapshotRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the snapshot.get_repository API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/get-snapshot-repository/ + /// + GetRepositoryResponse GetRepository( + Func selector = null + ); + + /// + /// GET request to the snapshot.get_repository API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/get-snapshot-repository/ + /// + Task GetRepositoryAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the snapshot.get_repository API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/get-snapshot-repository/ + /// + GetRepositoryResponse GetRepository(IGetRepositoryRequest request); + + /// + /// GET request to the snapshot.get_repository API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/get-snapshot-repository/ + /// + Task GetRepositoryAsync( + IGetRepositoryRequest request, + CancellationToken ct = default + ); + + /// + /// POST request to the snapshot.restore API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/restore-snapshot/ + /// + RestoreResponse Restore( + Name repository, + Name snapshot, + Func selector = null + ); + + /// + /// POST request to the snapshot.restore API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/restore-snapshot/ + /// + Task RestoreAsync( + Name repository, + Name snapshot, + Func selector = null, + CancellationToken ct = default + ); + + /// + /// POST request to the snapshot.restore API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/restore-snapshot/ + /// + RestoreResponse Restore(IRestoreRequest request); + + /// + /// POST request to the snapshot.restore API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/restore-snapshot/ + /// + Task RestoreAsync(IRestoreRequest request, CancellationToken ct = default); + + /// + /// GET request to the snapshot.status API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/get-snapshot-status/ + /// + SnapshotStatusResponse Status( + Func selector = null + ); + + /// + /// GET request to the snapshot.status API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/get-snapshot-status/ + /// + Task StatusAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the snapshot.status API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/get-snapshot-status/ + /// + SnapshotStatusResponse Status(ISnapshotStatusRequest request); + + /// + /// GET request to the snapshot.status API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/get-snapshot-status/ + /// + Task StatusAsync( + ISnapshotStatusRequest request, + CancellationToken ct = default + ); + + /// + /// POST request to the snapshot.verify_repository API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/verify-snapshot-repository/ + /// + VerifyRepositoryResponse VerifyRepository( + Name repository, + Func selector = null + ); + + /// + /// POST request to the snapshot.verify_repository API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/verify-snapshot-repository/ + /// + Task VerifyRepositoryAsync( + Name repository, + Func selector = null, + CancellationToken ct = default + ); + + /// + /// POST request to the snapshot.verify_repository API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/verify-snapshot-repository/ + /// + VerifyRepositoryResponse VerifyRepository(IVerifyRepositoryRequest request); + + /// + /// POST request to the snapshot.verify_repository API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/snapshots/verify-snapshot-repository/ + /// + Task VerifyRepositoryAsync( + IVerifyRepositoryRequest request, + CancellationToken ct = default + ); + } + + /// + /// Snapshot implementation. /// Not intended to be instantiated directly. Use the property /// on . /// /// - public partial class SnapshotNamespace : NamespacedClientProxy + public partial class SnapshotNamespace : NamespacedClientProxy, ISnapshotNamespace { internal SnapshotNamespace(OpenSearchClient client) : base(client) { } diff --git a/src/OpenSearch.Client/_Generated/OpenSearchClient.Tasks.cs b/src/OpenSearch.Client/_Generated/OpenSearchClient.Tasks.cs index e1b00503d2..897d1c8794 100644 --- a/src/OpenSearch.Client/_Generated/OpenSearchClient.Tasks.cs +++ b/src/OpenSearch.Client/_Generated/OpenSearchClient.Tasks.cs @@ -53,11 +53,123 @@ namespace OpenSearch.Client.Specification.TasksApi { /// /// Tasks APIs. + /// Use the property on . + /// + public partial interface ITasksNamespace + { + /// + /// POST request to the tasks.cancel API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/tasks/#task-canceling + /// + CancelTasksResponse Cancel( + Func selector = null + ); + + /// + /// POST request to the tasks.cancel API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/tasks/#task-canceling + /// + Task CancelAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// POST request to the tasks.cancel API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/tasks/#task-canceling + /// + CancelTasksResponse Cancel(ICancelTasksRequest request); + + /// + /// POST request to the tasks.cancel API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/tasks/#task-canceling + /// + Task CancelAsync( + ICancelTasksRequest request, + CancellationToken ct = default + ); + + /// + /// GET request to the tasks.get API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/tasks/ + /// + GetTaskResponse GetTask( + TaskId taskId, + Func selector = null + ); + + /// + /// GET request to the tasks.get API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/tasks/ + /// + Task GetTaskAsync( + TaskId taskId, + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the tasks.get API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/tasks/ + /// + GetTaskResponse GetTask(IGetTaskRequest request); + + /// + /// GET request to the tasks.get API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/tasks/ + /// + Task GetTaskAsync(IGetTaskRequest request, CancellationToken ct = default); + + /// + /// GET request to the tasks.list API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/tasks/ + /// + ListTasksResponse List(Func selector = null); + + /// + /// GET request to the tasks.list API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/tasks/ + /// + Task ListAsync( + Func selector = null, + CancellationToken ct = default + ); + + /// + /// GET request to the tasks.list API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/tasks/ + /// + ListTasksResponse List(IListTasksRequest request); + + /// + /// GET request to the tasks.list API, read more about this API online: + /// + /// https://opensearch.org/docs/latest/api-reference/tasks/ + /// + Task ListAsync( + IListTasksRequest request, + CancellationToken ct = default + ); + } + + /// + /// Tasks implementation. /// Not intended to be instantiated directly. Use the property /// on . /// /// - public partial class TasksNamespace : NamespacedClientProxy + public partial class TasksNamespace : NamespacedClientProxy, ITasksNamespace { internal TasksNamespace(OpenSearchClient client) : base(client) { } diff --git a/src/OpenSearch.Client/_Generated/OpenSearchClient.cs b/src/OpenSearch.Client/_Generated/OpenSearchClient.cs index 6f12c13f45..9f8f19b45d 100644 --- a/src/OpenSearch.Client/_Generated/OpenSearchClient.cs +++ b/src/OpenSearch.Client/_Generated/OpenSearchClient.cs @@ -65,31 +65,31 @@ namespace OpenSearch.Client public partial class OpenSearchClient : IOpenSearchClient { /// Cat APIs - public CatNamespace Cat { get; private set; } + public ICatNamespace Cat { get; private set; } /// Cluster APIs - public ClusterNamespace Cluster { get; private set; } + public IClusterNamespace Cluster { get; private set; } /// Dangling Indices APIs - public DanglingIndicesNamespace DanglingIndices { get; private set; } + public IDanglingIndicesNamespace DanglingIndices { get; private set; } /// Indices APIs - public IndicesNamespace Indices { get; private set; } + public IIndicesNamespace Indices { get; private set; } /// Ingest APIs - public IngestNamespace Ingest { get; private set; } + public IIngestNamespace Ingest { get; private set; } /// Nodes APIs - public NodesNamespace Nodes { get; private set; } + public INodesNamespace Nodes { get; private set; } /// Http APIs - public HttpNamespace Http { get; private set; } + public IHttpNamespace Http { get; private set; } /// Snapshot APIs - public SnapshotNamespace Snapshot { get; private set; } + public ISnapshotNamespace Snapshot { get; private set; } /// Tasks APIs - public TasksNamespace Tasks { get; private set; } + public ITasksNamespace Tasks { get; private set; } partial void SetupGeneratedNamespaces() {