diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0c5fdf8411..be07c72df5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -97,4 +97,4 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
[Unreleased]: https://github.com/opensearch-project/opensearch-net/compare/v1.4.0...main
[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/src/ApiGenerator/Configuration/CodeConfiguration.cs b/src/ApiGenerator/Configuration/CodeConfiguration.cs
index e143193073..8e182c4d14 100644
--- a/src/ApiGenerator/Configuration/CodeConfiguration.cs
+++ b/src/ApiGenerator/Configuration/CodeConfiguration.cs
@@ -39,6 +39,15 @@ public static class CodeConfiguration
{
private static readonly Glob[] OperationsToInclude =
{
+ new("cluster.allocation_explain"),
+ new("cluster.delete_component_template"),
+ new("cluster.delete_voting_config_exclusions"),
+ new("cluster.exists_component_template"),
+ new("cluster.get_component_template"),
+ new("cluster.get_settings"),
+ new("cluster.health"),
+ new("cluster.pending_tasks"),
+
new("dangling_indices.*"),
new("ingest.*"),
new("nodes.*"),
diff --git a/src/ApiGenerator/OpenSearch.openapi.json b/src/ApiGenerator/OpenSearch.openapi.json
index 438eafcb6c..a34c78380d 100644
--- a/src/ApiGenerator/OpenSearch.openapi.json
+++ b/src/ApiGenerator/OpenSearch.openapi.json
@@ -11823,7 +11823,8 @@
"$ref": "#/components/schemas/PatchActionGroupsInputPayload"
}
}
- }
+ },
+ "required": true
},
"responses": {
"200": {
@@ -11948,7 +11949,8 @@
"$ref": "#/components/schemas/PatchActionGroupInputPayload"
}
}
- }
+ },
+ "required": true
},
"parameters": [
{
@@ -11989,7 +11991,8 @@
"$ref": "#/components/schemas/Action_Group"
}
}
- }
+ },
+ "required": true
},
"parameters": [
{
@@ -13244,7 +13247,8 @@
"$ref": "#/components/schemas/CreateTenantParams"
}
}
- }
+ },
+ "required": true
},
"parameters": [
{
@@ -17925,21 +17929,23 @@
"description": "Limit the information returned the specific metrics.",
"x-enum-options": [
"_all",
- "completion",
- "docs",
- "fielddata",
- "query_cache",
- "flush",
- "get",
+ "store",
"indexing",
+ "get",
+ "search",
"merge",
- "request_cache",
+ "flush",
"refresh",
- "search",
- "segments",
- "store",
+ "query_cache",
+ "fielddata",
+ "docs",
"warmer",
- "suggest"
+ "completion",
+ "segments",
+ "translog",
+ "suggest",
+ "request_cache",
+ "recovery"
],
"x-data-type": "array"
},
@@ -28506,21 +28512,23 @@
"description": "Limit the information returned the specific metrics.",
"x-enum-options": [
"_all",
- "completion",
- "docs",
- "fielddata",
- "query_cache",
- "flush",
- "get",
+ "store",
"indexing",
+ "get",
+ "search",
"merge",
- "request_cache",
+ "flush",
"refresh",
- "search",
- "segments",
- "store",
+ "query_cache",
+ "fielddata",
+ "docs",
"warmer",
- "suggest"
+ "completion",
+ "segments",
+ "translog",
+ "suggest",
+ "request_cache",
+ "recovery"
],
"x-data-type": "array"
},
diff --git a/src/OpenSearch.Client/ApiUrlsLookup.cs b/src/OpenSearch.Client/ApiUrlsLookup.cs
index f542ad80f7..4bb7d9d61a 100644
--- a/src/OpenSearch.Client/ApiUrlsLookup.cs
+++ b/src/OpenSearch.Client/ApiUrlsLookup.cs
@@ -70,11 +70,6 @@ internal static partial class ApiUrlsLookups
internal static ApiUrls CatTemplates = new ApiUrls(new[]{"_cat/templates", "_cat/templates/{name}"});
internal static ApiUrls CatThreadPool = new ApiUrls(new[]{"_cat/thread_pool", "_cat/thread_pool/{thread_pool_patterns}"});
internal static ApiUrls NoNamespaceClearScroll = new ApiUrls(new[]{"_search/scroll"});
- internal static ApiUrls ClusterAllocationExplain = new ApiUrls(new[]{"_cluster/allocation/explain"});
- internal static ApiUrls ClusterDeleteVotingConfigExclusions = new ApiUrls(new[]{"_cluster/voting_config_exclusions"});
- internal static ApiUrls ClusterGetSettings = new ApiUrls(new[]{"_cluster/settings"});
- internal static ApiUrls ClusterHealth = new ApiUrls(new[]{"_cluster/health", "_cluster/health/{index}"});
- internal static ApiUrls ClusterPendingTasks = new ApiUrls(new[]{"_cluster/pending_tasks"});
internal static ApiUrls ClusterPostVotingConfigExclusions = new ApiUrls(new[]{"_cluster/voting_config_exclusions"});
internal static ApiUrls ClusterPutSettings = new ApiUrls(new[]{"_cluster/settings"});
internal static ApiUrls ClusterRemoteInfo = new ApiUrls(new[]{"_remote/info"});
diff --git a/src/OpenSearch.Client/Descriptors.Cluster.cs b/src/OpenSearch.Client/Descriptors.Cluster.cs
index ee2804640b..83fdbea648 100644
--- a/src/OpenSearch.Client/Descriptors.Cluster.cs
+++ b/src/OpenSearch.Client/Descriptors.Cluster.cs
@@ -57,117 +57,6 @@
// ReSharper disable RedundantNameQualifier
namespace OpenSearch.Client.Specification.ClusterApi
{
- ///Descriptor for AllocationExplain https://opensearch.org/docs/latest/opensearch/rest-api/cluster-allocation/
- public partial class ClusterAllocationExplainDescriptor : RequestDescriptorBase, IClusterAllocationExplainRequest
- {
- internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterAllocationExplain;
- // values part of the url path
- // Request parameters
- ///Return information about disk usage and shard sizes (default: false)
- public ClusterAllocationExplainDescriptor IncludeDiskInfo(bool? includediskinfo = true) => Qs("include_disk_info", includediskinfo);
- ///Return 'YES' decisions in explanation (default: false)
- public ClusterAllocationExplainDescriptor IncludeYesDecisions(bool? includeyesdecisions = true) => Qs("include_yes_decisions", includeyesdecisions);
- }
-
- ///Descriptor for DeleteVotingConfigExclusions
- public partial class DeleteVotingConfigExclusionsDescriptor : RequestDescriptorBase, IDeleteVotingConfigExclusionsRequest
- {
- internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterDeleteVotingConfigExclusions;
- // values part of the url path
- // Request parameters
- ///Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list.
- public DeleteVotingConfigExclusionsDescriptor WaitForRemoval(bool? waitforremoval = true) => Qs("wait_for_removal", waitforremoval);
- }
-
- ///Descriptor for GetSettings https://opensearch.org/docs/latest/opensearch/rest-api/cluster-settings/
- public partial class ClusterGetSettingsDescriptor : RequestDescriptorBase, IClusterGetSettingsRequest
- {
- internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterGetSettings;
- // values part of the url path
- // Request parameters
- ///Return settings in flat format (default: false)
- public ClusterGetSettingsDescriptor FlatSettings(bool? flatsettings = true) => Qs("flat_settings", flatsettings);
- ///Whether to return all default clusters setting.
- public ClusterGetSettingsDescriptor IncludeDefaults(bool? includedefaults = true) => Qs("include_defaults", includedefaults);
- ///Explicit operation timeout for connection to master node
- ///Deprecated as of OpenSearch 2.0, use instead
- public ClusterGetSettingsDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
- ///Explicit operation timeout for connection to cluster_manager node
- ///Introduced in OpenSearch 2.0 instead of
- public ClusterGetSettingsDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
- ///Explicit operation timeout
- public ClusterGetSettingsDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
- }
-
- ///Descriptor for Health https://opensearch.org/docs/latest/opensearch/rest-api/cluster-health/
- public partial class ClusterHealthDescriptor : RequestDescriptorBase, IClusterHealthRequest
- {
- internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterHealth;
- ////_cluster/health
- public ClusterHealthDescriptor(): base()
- {
- }
-
- ////_cluster/health/{index}
- ///Optional, accepts null
- public ClusterHealthDescriptor(Indices index): base(r => r.Optional("index", index))
- {
- }
-
- // values part of the url path
- Indices IClusterHealthRequest.Index => Self.RouteValues.Get("index");
- ///Limit the information returned to a specific index
- public ClusterHealthDescriptor Index(Indices index) => Assign(index, (a, v) => a.RouteValues.Optional("index", v));
- ///a shortcut into calling Index(typeof(TOther))
- public ClusterHealthDescriptor Index()
- where TOther : class => Assign(typeof(TOther), (a, v) => a.RouteValues.Optional("index", (Indices)v));
- ///A shortcut into calling Index(Indices.All)
- public ClusterHealthDescriptor AllIndices() => Index(Indices.All);
- // Request parameters
- ///Whether to expand wildcard expression to concrete indices that are open, closed or both.
- public ClusterHealthDescriptor ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
- ///Specify the level of detail for returned information
- public ClusterHealthDescriptor Level(Level? level) => Qs("level", level);
- ///Return local information, do not retrieve the state from cluster_manager node (default: false)
- public ClusterHealthDescriptor Local(bool? local = true) => Qs("local", local);
- ///Explicit operation timeout for connection to master node
- ///Deprecated as of OpenSearch 2.0, use instead
- public ClusterHealthDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
- ///Explicit operation timeout for connection to cluster_manager node
- ///Introduced in OpenSearch 2.0 instead of
- public ClusterHealthDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
- ///Explicit operation timeout
- public ClusterHealthDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
- ///Wait until the specified number of shards is active
- public ClusterHealthDescriptor WaitForActiveShards(string waitforactiveshards) => Qs("wait_for_active_shards", waitforactiveshards);
- ///Wait until all currently queued events with the given priority are processed
- public ClusterHealthDescriptor WaitForEvents(WaitForEvents? waitforevents) => Qs("wait_for_events", waitforevents);
- ///Whether to wait until there are no initializing shards in the cluster
- public ClusterHealthDescriptor WaitForNoInitializingShards(bool? waitfornoinitializingshards = true) => Qs("wait_for_no_initializing_shards", waitfornoinitializingshards);
- ///Whether to wait until there are no relocating shards in the cluster
- public ClusterHealthDescriptor WaitForNoRelocatingShards(bool? waitfornorelocatingshards = true) => Qs("wait_for_no_relocating_shards", waitfornorelocatingshards);
- ///Wait until the specified number of nodes is available
- public ClusterHealthDescriptor WaitForNodes(string waitfornodes) => Qs("wait_for_nodes", waitfornodes);
- ///Wait until cluster is in a specific state
- public ClusterHealthDescriptor WaitForStatus(WaitForStatus? waitforstatus) => Qs("wait_for_status", waitforstatus);
- }
-
- ///Descriptor for PendingTasks https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/
- public partial class ClusterPendingTasksDescriptor : RequestDescriptorBase, IClusterPendingTasksRequest
- {
- internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterPendingTasks;
- // values part of the url path
- // Request parameters
- ///Return local information, do not retrieve the state from cluster_manager node (default: false)
- public ClusterPendingTasksDescriptor Local(bool? local = true) => Qs("local", local);
- ///Explicit operation timeout for connection to master node
- ///Deprecated as of OpenSearch 2.0, use instead
- public ClusterPendingTasksDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
- ///Explicit operation timeout for connection to cluster_manager node
- ///Introduced in OpenSearch 2.0 instead of
- public ClusterPendingTasksDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
- }
-
///Descriptor for PostVotingConfigExclusions
public partial class PostVotingConfigExclusionsDescriptor : RequestDescriptorBase, IPostVotingConfigExclusionsRequest
{
diff --git a/src/OpenSearch.Client/IOpenSearchClient.Generated.cs b/src/OpenSearch.Client/IOpenSearchClient.Generated.cs
index 6ca8082709..c9cecbaad7 100644
--- a/src/OpenSearch.Client/IOpenSearchClient.Generated.cs
+++ b/src/OpenSearch.Client/IOpenSearchClient.Generated.cs
@@ -70,12 +70,6 @@ CatNamespace Cat
get;
}
- ///Cluster APIs
- ClusterNamespace Cluster
- {
- get;
- }
-
///Indices APIs
IndicesNamespace Indices
{
diff --git a/src/OpenSearch.Client/OpenSearchClient.Cluster.cs b/src/OpenSearch.Client/OpenSearchClient.Cluster.cs
index efb6503f7f..22d773b053 100644
--- a/src/OpenSearch.Client/OpenSearchClient.Cluster.cs
+++ b/src/OpenSearch.Client/OpenSearchClient.Cluster.cs
@@ -57,132 +57,8 @@ namespace OpenSearch.Client.Specification.ClusterApi
/// on .
///
///
- public class ClusterNamespace : NamespacedClientProxy
+ public partial class ClusterNamespace : NamespacedClientProxy
{
- internal ClusterNamespace(OpenSearchClient client): base(client)
- {
- }
-
- ///
- /// POST request to the cluster.allocation_explain API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cluster-allocation/
- ///
- public ClusterAllocationExplainResponse AllocationExplain(Func selector = null) => AllocationExplain(selector.InvokeOrDefault(new ClusterAllocationExplainDescriptor()));
- ///
- /// POST request to the cluster.allocation_explain API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cluster-allocation/
- ///
- public Task AllocationExplainAsync(Func selector = null, CancellationToken ct = default) => AllocationExplainAsync(selector.InvokeOrDefault(new ClusterAllocationExplainDescriptor()), ct);
- ///
- /// POST request to the cluster.allocation_explain API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cluster-allocation/
- ///
- public ClusterAllocationExplainResponse AllocationExplain(IClusterAllocationExplainRequest request) => DoRequest(request, request.RequestParameters);
- ///
- /// POST request to the cluster.allocation_explain API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cluster-allocation/
- ///
- public Task AllocationExplainAsync(IClusterAllocationExplainRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
- ///
- /// DELETE request to the cluster.delete_voting_config_exclusions API, read more about this API online:
- ///
- ///
- ///
- public DeleteVotingConfigExclusionsResponse DeleteVotingConfigExclusions(Func selector = null) => DeleteVotingConfigExclusions(selector.InvokeOrDefault(new DeleteVotingConfigExclusionsDescriptor()));
- ///
- /// DELETE request to the cluster.delete_voting_config_exclusions API, read more about this API online:
- ///
- ///
- ///
- public Task DeleteVotingConfigExclusionsAsync(Func selector = null, CancellationToken ct = default) => DeleteVotingConfigExclusionsAsync(selector.InvokeOrDefault(new DeleteVotingConfigExclusionsDescriptor()), ct);
- ///
- /// DELETE request to the cluster.delete_voting_config_exclusions API, read more about this API online:
- ///
- ///
- ///
- public DeleteVotingConfigExclusionsResponse DeleteVotingConfigExclusions(IDeleteVotingConfigExclusionsRequest request) => DoRequest(request, request.RequestParameters);
- ///
- /// DELETE request to the cluster.delete_voting_config_exclusions API, read more about this API online:
- ///
- ///
- ///
- public Task DeleteVotingConfigExclusionsAsync(IDeleteVotingConfigExclusionsRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
- ///
- /// GET request to the cluster.get_settings API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cluster-settings/
- ///
- public ClusterGetSettingsResponse GetSettings(Func selector = null) => GetSettings(selector.InvokeOrDefault(new ClusterGetSettingsDescriptor()));
- ///
- /// GET request to the cluster.get_settings API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cluster-settings/
- ///
- public Task GetSettingsAsync(Func selector = null, CancellationToken ct = default) => GetSettingsAsync(selector.InvokeOrDefault(new ClusterGetSettingsDescriptor()), ct);
- ///
- /// GET request to the cluster.get_settings API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cluster-settings/
- ///
- public ClusterGetSettingsResponse GetSettings(IClusterGetSettingsRequest request) => DoRequest(request, request.RequestParameters);
- ///
- /// GET request to the cluster.get_settings API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cluster-settings/
- ///
- public Task GetSettingsAsync(IClusterGetSettingsRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
- ///
- /// GET request to the cluster.health API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cluster-health/
- ///
- public ClusterHealthResponse Health(Indices index = null, Func selector = null) => Health(selector.InvokeOrDefault(new ClusterHealthDescriptor().Index(index: index)));
- ///
- /// GET request to the cluster.health API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cluster-health/
- ///
- public Task HealthAsync(Indices index = null, Func selector = null, CancellationToken ct = default) => HealthAsync(selector.InvokeOrDefault(new ClusterHealthDescriptor().Index(index: index)), ct);
- ///
- /// GET request to the cluster.health API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cluster-health/
- ///
- public ClusterHealthResponse Health(IClusterHealthRequest request) => DoRequest(request, request.RequestParameters);
- ///
- /// GET request to the cluster.health API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cluster-health/
- ///
- public Task HealthAsync(IClusterHealthRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
- ///
- /// GET request to the cluster.pending_tasks API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/
- ///
- public ClusterPendingTasksResponse PendingTasks(Func selector = null) => PendingTasks(selector.InvokeOrDefault(new ClusterPendingTasksDescriptor()));
- ///
- /// GET request to the cluster.pending_tasks API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/
- ///
- public Task PendingTasksAsync(Func selector = null, CancellationToken ct = default) => PendingTasksAsync(selector.InvokeOrDefault(new ClusterPendingTasksDescriptor()), ct);
- ///
- /// GET request to the cluster.pending_tasks API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/
- ///
- public ClusterPendingTasksResponse PendingTasks(IClusterPendingTasksRequest request) => DoRequest(request, request.RequestParameters);
- ///
- /// GET request to the cluster.pending_tasks API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/
- ///
- public Task PendingTasksAsync(IClusterPendingTasksRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// POST request to the cluster.post_voting_config_exclusions API, read more about this API online:
///
diff --git a/src/OpenSearch.Client/OpenSearchClient.NoNamespace.cs b/src/OpenSearch.Client/OpenSearchClient.NoNamespace.cs
index 705ca3749d..7f268282a8 100644
--- a/src/OpenSearch.Client/OpenSearchClient.NoNamespace.cs
+++ b/src/OpenSearch.Client/OpenSearchClient.NoNamespace.cs
@@ -70,13 +70,6 @@ public CatNamespace Cat
private set;
}
- ///Cluster APIs
- public ClusterNamespace Cluster
- {
- get;
- private set;
- }
-
///Indices APIs
public IndicesNamespace Indices
{
@@ -87,7 +80,6 @@ public IndicesNamespace Indices
partial void SetupNamespaces()
{
Cat = new CatNamespace(this);
- Cluster = new ClusterNamespace(this);
Indices = new IndicesNamespace(this);
}
diff --git a/src/OpenSearch.Client/Requests.Cluster.cs b/src/OpenSearch.Client/Requests.Cluster.cs
index ee4f102612..70003d7e18 100644
--- a/src/OpenSearch.Client/Requests.Cluster.cs
+++ b/src/OpenSearch.Client/Requests.Cluster.cs
@@ -58,256 +58,6 @@
// ReSharper disable RedundantNameQualifier
namespace OpenSearch.Client.Specification.ClusterApi
{
- [InterfaceDataContract]
- public partial interface IClusterAllocationExplainRequest : IRequest
- {
- }
-
- ///Request for AllocationExplain https://opensearch.org/docs/latest/opensearch/rest-api/cluster-allocation/
- public partial class ClusterAllocationExplainRequest : PlainRequestBase, IClusterAllocationExplainRequest
- {
- protected IClusterAllocationExplainRequest Self => this;
- internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterAllocationExplain;
- // values part of the url path
- // Request parameters
- ///Return information about disk usage and shard sizes (default: false)
- public bool? IncludeDiskInfo
- {
- get => Q("include_disk_info");
- set => Q("include_disk_info", value);
- }
-
- ///Return 'YES' decisions in explanation (default: false)
- public bool? IncludeYesDecisions
- {
- get => Q("include_yes_decisions");
- set => Q("include_yes_decisions", value);
- }
- }
-
- [InterfaceDataContract]
- public partial interface IDeleteVotingConfigExclusionsRequest : IRequest
- {
- }
-
- ///Request for DeleteVotingConfigExclusions
- public partial class DeleteVotingConfigExclusionsRequest : PlainRequestBase, IDeleteVotingConfigExclusionsRequest
- {
- protected IDeleteVotingConfigExclusionsRequest Self => this;
- internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterDeleteVotingConfigExclusions;
- // values part of the url path
- // Request parameters
- ///Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list.
- public bool? WaitForRemoval
- {
- get => Q("wait_for_removal");
- set => Q("wait_for_removal", value);
- }
- }
-
- [InterfaceDataContract]
- public partial interface IClusterGetSettingsRequest : IRequest
- {
- }
-
- ///Request for GetSettings https://opensearch.org/docs/latest/opensearch/rest-api/cluster-settings/
- public partial class ClusterGetSettingsRequest : PlainRequestBase, IClusterGetSettingsRequest
- {
- protected IClusterGetSettingsRequest Self => this;
- internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterGetSettings;
- // values part of the url path
- // Request parameters
- ///Return settings in flat format (default: false)
- public bool? FlatSettings
- {
- get => Q("flat_settings");
- set => Q("flat_settings", value);
- }
-
- ///Whether to return all default clusters setting.
- public bool? IncludeDefaults
- {
- get => Q("include_defaults");
- set => Q("include_defaults", value);
- }
-
- ///Explicit operation timeout for connection to master node
- ///Deprecated as of OpenSearch 2.0, use instead
- public Time MasterTimeout
- {
- get => Q
public partial interface IOpenSearchClient
{
+ ///Cluster APIs
+ ClusterNamespace Cluster { get; }
+
///Dangling Indices APIs
DanglingIndicesNamespace DanglingIndices { get; }
diff --git a/src/OpenSearch.Client/_Generated/OpenSearchClient.Cluster.cs b/src/OpenSearch.Client/_Generated/OpenSearchClient.Cluster.cs
new file mode 100644
index 0000000000..0f551bcb3c
--- /dev/null
+++ b/src/OpenSearch.Client/_Generated/OpenSearchClient.Cluster.cs
@@ -0,0 +1,318 @@
+/* SPDX-License-Identifier: Apache-2.0
+*
+* The OpenSearch Contributors require contributions made to
+* this file be licensed under the Apache-2.0 license or a
+* compatible open source license.
+*/
+/*
+* Modifications Copyright OpenSearch Contributors. See
+* GitHub history for details.
+*
+* Licensed to Elasticsearch B.V. under one or more contributor
+* license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright
+* ownership. Elasticsearch B.V. licenses this file to you under
+* the Apache License, Version 2.0 (the "License"); you may
+* not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// -----------------------------------------------
+//
+// This file is automatically generated
+// Please do not edit these files manually
+// Run the following in the root of the repos:
+//
+// *NIX : ./build.sh codegen
+// Windows : build.bat codegen
+//
+// -----------------------------------------------
+// ReSharper disable RedundantUsingDirective
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using OpenSearch.Net.Specification.ClusterApi;
+
+// ReSharper disable once CheckNamespace
+// ReSharper disable RedundantTypeArgumentsOfMethod
+namespace OpenSearch.Client.Specification.ClusterApi
+{
+ ///
+ /// Cluster APIs.
+ /// Not intended to be instantiated directly. Use the property
+ /// on .
+ ///
+ ///
+ public partial class ClusterNamespace : NamespacedClientProxy
+ {
+ internal ClusterNamespace(OpenSearchClient client)
+ : base(client) { }
+
+ ///
+ /// 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/
+ ///
+ public ClusterAllocationExplainResponse AllocationExplain(
+ Func selector =
+ null
+ ) => AllocationExplain(selector.InvokeOrDefault(new ClusterAllocationExplainDescriptor()));
+
+ ///
+ /// 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/
+ ///
+ public Task AllocationExplainAsync(
+ Func selector =
+ null,
+ CancellationToken ct = default
+ ) =>
+ AllocationExplainAsync(
+ selector.InvokeOrDefault(new ClusterAllocationExplainDescriptor()),
+ ct
+ );
+
+ ///
+ /// 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/
+ ///
+ public ClusterAllocationExplainResponse AllocationExplain(
+ IClusterAllocationExplainRequest request
+ ) =>
+ DoRequest(
+ request,
+ request.RequestParameters
+ );
+
+ ///
+ /// 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/
+ ///
+ public Task AllocationExplainAsync(
+ IClusterAllocationExplainRequest request,
+ CancellationToken ct = default
+ ) =>
+ DoRequestAsync(
+ request,
+ request.RequestParameters,
+ ct
+ );
+
+ ///
+ /// DELETE request to the cluster.delete_voting_config_exclusions API, read more about this API online:
+ ///
+ /// https://opensearch.org/docs/latest
+ ///
+ public DeleteVotingConfigExclusionsResponse DeleteVotingConfigExclusions(
+ Func<
+ DeleteVotingConfigExclusionsDescriptor,
+ IDeleteVotingConfigExclusionsRequest
+ > selector = null
+ ) =>
+ DeleteVotingConfigExclusions(
+ selector.InvokeOrDefault(new DeleteVotingConfigExclusionsDescriptor())
+ );
+
+ ///
+ /// DELETE request to the cluster.delete_voting_config_exclusions API, read more about this API online:
+ ///
+ /// https://opensearch.org/docs/latest
+ ///
+ public Task DeleteVotingConfigExclusionsAsync(
+ Func<
+ DeleteVotingConfigExclusionsDescriptor,
+ IDeleteVotingConfigExclusionsRequest
+ > selector = null,
+ CancellationToken ct = default
+ ) =>
+ DeleteVotingConfigExclusionsAsync(
+ selector.InvokeOrDefault(new DeleteVotingConfigExclusionsDescriptor()),
+ ct
+ );
+
+ ///
+ /// DELETE request to the cluster.delete_voting_config_exclusions API, read more about this API online:
+ ///
+ /// https://opensearch.org/docs/latest
+ ///
+ public DeleteVotingConfigExclusionsResponse DeleteVotingConfigExclusions(
+ IDeleteVotingConfigExclusionsRequest request
+ ) =>
+ DoRequest(
+ request,
+ request.RequestParameters
+ );
+
+ ///
+ /// DELETE request to the cluster.delete_voting_config_exclusions API, read more about this API online:
+ ///
+ /// https://opensearch.org/docs/latest
+ ///
+ public Task DeleteVotingConfigExclusionsAsync(
+ IDeleteVotingConfigExclusionsRequest request,
+ CancellationToken ct = default
+ ) =>
+ DoRequestAsync<
+ IDeleteVotingConfigExclusionsRequest,
+ DeleteVotingConfigExclusionsResponse
+ >(request, request.RequestParameters, ct);
+
+ ///
+ /// 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/
+ ///
+ public ClusterGetSettingsResponse GetSettings(
+ Func selector = null
+ ) => GetSettings(selector.InvokeOrDefault(new ClusterGetSettingsDescriptor()));
+
+ ///
+ /// 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/
+ ///
+ public Task GetSettingsAsync(
+ Func selector = null,
+ CancellationToken ct = default
+ ) => GetSettingsAsync(selector.InvokeOrDefault(new ClusterGetSettingsDescriptor()), ct);
+
+ ///
+ /// 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/
+ ///
+ public ClusterGetSettingsResponse GetSettings(IClusterGetSettingsRequest request) =>
+ DoRequest(
+ request,
+ request.RequestParameters
+ );
+
+ ///
+ /// 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/
+ ///
+ public Task GetSettingsAsync(
+ IClusterGetSettingsRequest request,
+ CancellationToken ct = default
+ ) =>
+ DoRequestAsync(
+ request,
+ request.RequestParameters,
+ ct
+ );
+
+ ///
+ /// GET request to the cluster.health API, read more about this API online:
+ ///
+ /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-health/
+ ///
+ public ClusterHealthResponse Health(
+ Indices index = null,
+ Func selector = null
+ ) => Health(selector.InvokeOrDefault(new ClusterHealthDescriptor().Index(index: index)));
+
+ ///
+ /// GET request to the cluster.health API, read more about this API online:
+ ///
+ /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-health/
+ ///
+ public Task HealthAsync(
+ Indices index = null,
+ Func selector = null,
+ CancellationToken ct = default
+ ) =>
+ HealthAsync(
+ selector.InvokeOrDefault(new ClusterHealthDescriptor().Index(index: index)),
+ ct
+ );
+
+ ///
+ /// GET request to the cluster.health API, read more about this API online:
+ ///
+ /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-health/
+ ///
+ public ClusterHealthResponse Health(IClusterHealthRequest request) =>
+ DoRequest(
+ request,
+ request.RequestParameters
+ );
+
+ ///
+ /// GET request to the cluster.health API, read more about this API online:
+ ///
+ /// https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-health/
+ ///
+ public Task HealthAsync(
+ IClusterHealthRequest request,
+ CancellationToken ct = default
+ ) =>
+ DoRequestAsync(
+ request,
+ request.RequestParameters,
+ ct
+ );
+
+ ///
+ /// GET request to the cluster.pending_tasks API, read more about this API online:
+ ///
+ /// https://opensearch.org/docs/latest
+ ///
+ public ClusterPendingTasksResponse PendingTasks(
+ Func selector = null
+ ) => PendingTasks(selector.InvokeOrDefault(new ClusterPendingTasksDescriptor()));
+
+ ///
+ /// GET request to the cluster.pending_tasks API, read more about this API online:
+ ///
+ /// https://opensearch.org/docs/latest
+ ///
+ public Task PendingTasksAsync(
+ Func selector = null,
+ CancellationToken ct = default
+ ) => PendingTasksAsync(selector.InvokeOrDefault(new ClusterPendingTasksDescriptor()), ct);
+
+ ///
+ /// GET request to the cluster.pending_tasks API, read more about this API online:
+ ///
+ /// https://opensearch.org/docs/latest
+ ///
+ public ClusterPendingTasksResponse PendingTasks(IClusterPendingTasksRequest request) =>
+ DoRequest(
+ request,
+ request.RequestParameters
+ );
+
+ ///
+ /// GET request to the cluster.pending_tasks API, read more about this API online:
+ ///
+ /// https://opensearch.org/docs/latest
+ ///
+ public Task PendingTasksAsync(
+ IClusterPendingTasksRequest request,
+ CancellationToken ct = default
+ ) =>
+ DoRequestAsync(
+ request,
+ request.RequestParameters,
+ ct
+ );
+ }
+}
diff --git a/src/OpenSearch.Client/_Generated/OpenSearchClient.cs b/src/OpenSearch.Client/_Generated/OpenSearchClient.cs
index 738afefd9f..e1947d5d8f 100644
--- a/src/OpenSearch.Client/_Generated/OpenSearchClient.cs
+++ b/src/OpenSearch.Client/_Generated/OpenSearchClient.cs
@@ -46,6 +46,7 @@
using System.Threading;
using System.Threading.Tasks;
using OpenSearch.Client;
+using OpenSearch.Client.Specification.ClusterApi;
using OpenSearch.Client.Specification.DanglingIndicesApi;
using OpenSearch.Client.Specification.IngestApi;
using OpenSearch.Client.Specification.NodesApi;
@@ -60,6 +61,9 @@ namespace OpenSearch.Client
///
public partial class OpenSearchClient : IOpenSearchClient
{
+ ///Cluster APIs
+ public ClusterNamespace Cluster { get; private set; }
+
///Dangling Indices APIs
public DanglingIndicesNamespace DanglingIndices { get; private set; }
@@ -77,6 +81,7 @@ public partial class OpenSearchClient : IOpenSearchClient
partial void SetupGeneratedNamespaces()
{
+ Cluster = new ClusterNamespace(this);
DanglingIndices = new DanglingIndicesNamespace(this);
Ingest = new IngestNamespace(this);
Nodes = new NodesNamespace(this);
diff --git a/src/OpenSearch.Client/_Generated/Requests.Cluster.cs b/src/OpenSearch.Client/_Generated/Requests.Cluster.cs
new file mode 100644
index 0000000000..cbf2b0ea8a
--- /dev/null
+++ b/src/OpenSearch.Client/_Generated/Requests.Cluster.cs
@@ -0,0 +1,341 @@
+/* SPDX-License-Identifier: Apache-2.0
+*
+* The OpenSearch Contributors require contributions made to
+* this file be licensed under the Apache-2.0 license or a
+* compatible open source license.
+*/
+/*
+* Modifications Copyright OpenSearch Contributors. See
+* GitHub history for details.
+*
+* Licensed to Elasticsearch B.V. under one or more contributor
+* license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright
+* ownership. Elasticsearch B.V. licenses this file to you under
+* the Apache License, Version 2.0 (the "License"); you may
+* not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// -----------------------------------------------
+//
+// This file is automatically generated
+// Please do not edit these files manually
+// Run the following in the root of the repos:
+//
+// *NIX : ./build.sh codegen
+// Windows : build.bat codegen
+//
+// -----------------------------------------------
+// ReSharper disable RedundantUsingDirective
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Linq.Expressions;
+using System.Runtime.Serialization;
+using OpenSearch.Net;
+using OpenSearch.Net.Utf8Json;
+using OpenSearch.Net.Specification.ClusterApi;
+
+// ReSharper disable RedundantBaseConstructorCall
+// ReSharper disable UnusedTypeParameter
+// ReSharper disable PartialMethodWithSinglePart
+// ReSharper disable RedundantNameQualifier
+namespace OpenSearch.Client.Specification.ClusterApi
+{
+ [InterfaceDataContract]
+ public partial interface IClusterAllocationExplainRequest
+ : IRequest { }
+
+ ///Request for AllocationExplain https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-allocation/
+ public partial class ClusterAllocationExplainRequest
+ : PlainRequestBase,
+ IClusterAllocationExplainRequest
+ {
+ protected IClusterAllocationExplainRequest Self => this;
+ internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterAllocationExplain;
+
+ // values part of the url path
+
+ // Request parameters
+ ///Return information about disk usage and shard sizes.
+ public bool? IncludeDiskInfo
+ {
+ get => Q("include_disk_info");
+ set => Q("include_disk_info", value);
+ }
+
+ ///Return 'YES' decisions in explanation.
+ public bool? IncludeYesDecisions
+ {
+ get => Q("include_yes_decisions");
+ set => Q("include_yes_decisions", value);
+ }
+ }
+
+ [InterfaceDataContract]
+ public partial interface IDeleteVotingConfigExclusionsRequest
+ : IRequest { }
+
+ ///Request for DeleteVotingConfigExclusions https://opensearch.org/docs/latest
+ public partial class DeleteVotingConfigExclusionsRequest
+ : PlainRequestBase,
+ IDeleteVotingConfigExclusionsRequest
+ {
+ protected IDeleteVotingConfigExclusionsRequest Self => this;
+ internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterDeleteVotingConfigExclusions;
+
+ // values part of the url path
+
+ // Request parameters
+ ///Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list.
+ public bool? WaitForRemoval
+ {
+ get => Q("wait_for_removal");
+ set => Q("wait_for_removal", value);
+ }
+ }
+
+ [InterfaceDataContract]
+ public partial interface IClusterGetSettingsRequest
+ : IRequest { }
+
+ ///Request for GetSettings https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-settings/
+ public partial class ClusterGetSettingsRequest
+ : PlainRequestBase,
+ IClusterGetSettingsRequest
+ {
+ protected IClusterGetSettingsRequest Self => this;
+ internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterGetSettings;
+
+ // values part of the url path
+
+ // Request parameters
+ ///Operation timeout for connection to cluster-manager node.
+ ///Supported by OpenSearch servers of version 2.0.0 or greater.
+ public Time ClusterManagerTimeout
+ {
+ get => Q("cluster_manager_timeout");
+ set => Q("cluster_manager_timeout", value);
+ }
+
+ ///Return settings in flat format.
+ public bool? FlatSettings
+ {
+ get => Q("flat_settings");
+ set => Q("flat_settings", value);
+ }
+
+ ///Whether to return all default clusters setting.
+ public bool? IncludeDefaults
+ {
+ get => Q("include_defaults");
+ set => Q("include_defaults", value);
+ }
+
+ ///Operation timeout for connection to master node.
+ [Obsolete(
+ "Deprecated as of: 2.0.0, reason: To promote inclusive language, use 'cluster_manager_timeout' instead."
+ )]
+ public Time MasterTimeout
+ {
+ get => Q("master_timeout");
+ set => Q("master_timeout", value);
+ }
+
+ ///Operation timeout.
+ public Time Timeout
+ {
+ get => Q("timeout");
+ set => Q("timeout", value);
+ }
+ }
+
+ [InterfaceDataContract]
+ public partial interface IClusterHealthRequest : IRequest
+ {
+ [IgnoreDataMember]
+ Indices Index { get; }
+ }
+
+ ///Request for Health https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-health/
+ public partial class ClusterHealthRequest
+ : PlainRequestBase,
+ IClusterHealthRequest
+ {
+ protected IClusterHealthRequest Self => this;
+ internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterHealth;
+
+ ////_cluster/health
+ public ClusterHealthRequest()
+ : base() { }
+
+ ////_cluster/health/{index}
+ ///Optional, accepts null
+ public ClusterHealthRequest(Indices index)
+ : base(r => r.Optional("index", index)) { }
+
+ // values part of the url path
+ [IgnoreDataMember]
+ Indices IClusterHealthRequest.Index => Self.RouteValues.Get("index");
+
+ // Request parameters
+ ///The awareness attribute for which the health is required.
+ public string AwarenessAttribute
+ {
+ get => Q("awareness_attribute");
+ set => Q("awareness_attribute", value);
+ }
+
+ ///Specify the level of detail for returned information.
+ public ClusterHealthLevel? ClusterHealthLevel
+ {
+ get => Q("level");
+ set => Q("level", value);
+ }
+
+ ///Operation timeout for connection to cluster-manager node.
+ ///Supported by OpenSearch servers of version 2.0.0 or greater.
+ public Time ClusterManagerTimeout
+ {
+ get => Q("cluster_manager_timeout");
+ set => Q("cluster_manager_timeout", value);
+ }
+
+ ///Checks whether local node is commissioned or not. If set to true on a local call it will throw exception if node is decommissioned.
+ public bool? EnsureNodeCommissioned
+ {
+ get => Q("ensure_node_commissioned");
+ set => Q("ensure_node_commissioned", value);
+ }
+
+ ///Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ public ExpandWildcards? ExpandWildcards
+ {
+ get => Q("expand_wildcards");
+ set => Q("expand_wildcards", value);
+ }
+
+ ///Return local information, do not retrieve the state from cluster-manager node.
+ public bool? Local
+ {
+ get => Q("local");
+ set => Q("local", value);
+ }
+
+ ///Operation timeout for connection to master node.
+ [Obsolete(
+ "Deprecated as of: 2.0.0, reason: To promote inclusive language, use 'cluster_manager_timeout' instead."
+ )]
+ public Time MasterTimeout
+ {
+ get => Q("master_timeout");
+ set => Q("master_timeout", value);
+ }
+
+ ///Operation timeout.
+ public Time Timeout
+ {
+ get => Q("timeout");
+ set => Q("timeout", value);
+ }
+
+ ///Wait until the specified number of shards is active.
+ public string WaitForActiveShards
+ {
+ get => Q("wait_for_active_shards");
+ set => Q("wait_for_active_shards", value);
+ }
+
+ ///Wait until all currently queued events with the given priority are processed.
+ public WaitForEvents? WaitForEvents
+ {
+ get => Q("wait_for_events");
+ set => Q("wait_for_events", value);
+ }
+
+ ///Wait until the specified number of nodes is available.
+ public string WaitForNodes
+ {
+ get => Q("wait_for_nodes");
+ set => Q("wait_for_nodes", value);
+ }
+
+ ///Whether to wait until there are no initializing shards in the cluster.
+ public bool? WaitForNoInitializingShards
+ {
+ get => Q("wait_for_no_initializing_shards");
+ set => Q("wait_for_no_initializing_shards", value);
+ }
+
+ ///Whether to wait until there are no relocating shards in the cluster.
+ public bool? WaitForNoRelocatingShards
+ {
+ get => Q("wait_for_no_relocating_shards");
+ set => Q("wait_for_no_relocating_shards", value);
+ }
+
+ ///Wait until cluster is in a specific state.
+ public WaitForStatus? WaitForStatus
+ {
+ get => Q("wait_for_status");
+ set => Q("wait_for_status", value);
+ }
+ }
+
+ [InterfaceDataContract]
+ public partial interface IClusterPendingTasksRequest
+ : IRequest { }
+
+ ///Request for PendingTasks https://opensearch.org/docs/latest
+ public partial class ClusterPendingTasksRequest
+ : PlainRequestBase,
+ IClusterPendingTasksRequest
+ {
+ protected IClusterPendingTasksRequest Self => this;
+ internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterPendingTasks;
+
+ // values part of the url path
+
+ // Request parameters
+ ///Operation timeout for connection to cluster-manager node.
+ ///Supported by OpenSearch servers of version 2.0.0 or greater.
+ public Time ClusterManagerTimeout
+ {
+ get => Q("cluster_manager_timeout");
+ set => Q("cluster_manager_timeout", value);
+ }
+
+ ///Return local information, do not retrieve the state from cluster-manager node.
+ public bool? Local
+ {
+ get => Q("local");
+ set => Q("local", value);
+ }
+
+ ///Operation timeout for connection to master node.
+ [Obsolete(
+ "Deprecated as of: 2.0.0, reason: To promote inclusive language, use 'cluster_manager_timeout' instead."
+ )]
+ public Time MasterTimeout
+ {
+ get => Q("master_timeout");
+ set => Q("master_timeout", value);
+ }
+ }
+}
diff --git a/src/OpenSearch.Client/_Generated/Requests.cs b/src/OpenSearch.Client/_Generated/Requests.cs
index d3fc07b373..595d9f8cee 100644
--- a/src/OpenSearch.Client/_Generated/Requests.cs
+++ b/src/OpenSearch.Client/_Generated/Requests.cs
@@ -50,6 +50,7 @@
using System.Runtime.Serialization;
using OpenSearch.Net;
using OpenSearch.Net.Utf8Json;
+using OpenSearch.Net.Specification.ClusterApi;
using OpenSearch.Net.Specification.DanglingIndicesApi;
using OpenSearch.Net.Specification.IngestApi;
using OpenSearch.Net.Specification.NodesApi;
diff --git a/src/OpenSearch.Net/Api/Enums.cs b/src/OpenSearch.Net/Api/Enums.cs
index fe29c3ed6f..27a4ca83f7 100644
--- a/src/OpenSearch.Net/Api/Enums.cs
+++ b/src/OpenSearch.Net/Api/Enums.cs
@@ -125,21 +125,6 @@ public enum DefaultOperator
Or
}
- [StringEnum]
- public enum ExpandWildcards
- {
- [EnumMember(Value = "open")]
- Open,
- [EnumMember(Value = "closed")]
- Closed,
- [EnumMember(Value = "hidden")]
- Hidden,
- [EnumMember(Value = "none")]
- None,
- [EnumMember(Value = "all")]
- All
- }
-
[StringEnum]
public enum SearchType
{
@@ -237,34 +222,6 @@ public enum Level
Shards
}
- [StringEnum]
- public enum WaitForEvents
- {
- [EnumMember(Value = "immediate")]
- Immediate,
- [EnumMember(Value = "urgent")]
- Urgent,
- [EnumMember(Value = "high")]
- High,
- [EnumMember(Value = "normal")]
- Normal,
- [EnumMember(Value = "low")]
- Low,
- [EnumMember(Value = "languid")]
- Languid
- }
-
- [StringEnum]
- public enum WaitForStatus
- {
- [EnumMember(Value = "green")]
- Green,
- [EnumMember(Value = "yellow")]
- Yellow,
- [EnumMember(Value = "red")]
- Red
- }
-
[Flags, StringEnum]
public enum ClusterRerouteMetric
{
@@ -345,7 +302,6 @@ static KnownEnums()
EnumStringResolvers.TryAdd(typeof(ClusterStateMetric), (e) => GetStringValue((ClusterStateMetric)e));
EnumStringResolvers.TryAdd(typeof(IndicesStatsMetric), (e) => GetStringValue((IndicesStatsMetric)e));
EnumStringResolvers.TryAdd(typeof(DefaultOperator), (e) => GetStringValue((DefaultOperator)e));
- EnumStringResolvers.TryAdd(typeof(ExpandWildcards), (e) => GetStringValue((ExpandWildcards)e));
EnumStringResolvers.TryAdd(typeof(SearchType), (e) => GetStringValue((SearchType)e));
EnumStringResolvers.TryAdd(typeof(SuggestMode), (e) => GetStringValue((SuggestMode)e));
EnumStringResolvers.TryAdd(typeof(Refresh), (e) => GetStringValue((Refresh)e));
@@ -353,8 +309,6 @@ static KnownEnums()
EnumStringResolvers.TryAdd(typeof(Health), (e) => GetStringValue((Health)e));
EnumStringResolvers.TryAdd(typeof(Size), (e) => GetStringValue((Size)e));
EnumStringResolvers.TryAdd(typeof(Level), (e) => GetStringValue((Level)e));
- EnumStringResolvers.TryAdd(typeof(WaitForEvents), (e) => GetStringValue((WaitForEvents)e));
- EnumStringResolvers.TryAdd(typeof(WaitForStatus), (e) => GetStringValue((WaitForStatus)e));
EnumStringResolvers.TryAdd(typeof(ClusterRerouteMetric), (e) => GetStringValue((ClusterRerouteMetric)e));
EnumStringResolvers.TryAdd(typeof(VersionType), (e) => GetStringValue((VersionType)e));
EnumStringResolvers.TryAdd(typeof(Conflicts), (e) => GetStringValue((Conflicts)e));
@@ -456,25 +410,6 @@ public static string GetStringValue(this DefaultOperator enumValue)
throw new ArgumentException($"'{enumValue.ToString()}' is not a valid value for enum 'DefaultOperator'");
}
- public static string GetStringValue(this ExpandWildcards enumValue)
- {
- switch (enumValue)
- {
- case ExpandWildcards.Open:
- return "open";
- case ExpandWildcards.Closed:
- return "closed";
- case ExpandWildcards.Hidden:
- return "hidden";
- case ExpandWildcards.None:
- return "none";
- case ExpandWildcards.All:
- return "all";
- }
-
- throw new ArgumentException($"'{enumValue.ToString()}' is not a valid value for enum 'ExpandWildcards'");
- }
-
public static string GetStringValue(this SearchType enumValue)
{
switch (enumValue)
@@ -600,42 +535,6 @@ public static string GetStringValue(this Level enumValue)
throw new ArgumentException($"'{enumValue.ToString()}' is not a valid value for enum 'Level'");
}
- public static string GetStringValue(this WaitForEvents enumValue)
- {
- switch (enumValue)
- {
- case WaitForEvents.Immediate:
- return "immediate";
- case WaitForEvents.Urgent:
- return "urgent";
- case WaitForEvents.High:
- return "high";
- case WaitForEvents.Normal:
- return "normal";
- case WaitForEvents.Low:
- return "low";
- case WaitForEvents.Languid:
- return "languid";
- }
-
- throw new ArgumentException($"'{enumValue.ToString()}' is not a valid value for enum 'WaitForEvents'");
- }
-
- public static string GetStringValue(this WaitForStatus enumValue)
- {
- switch (enumValue)
- {
- case WaitForStatus.Green:
- return "green";
- case WaitForStatus.Yellow:
- return "yellow";
- case WaitForStatus.Red:
- return "red";
- }
-
- throw new ArgumentException($"'{enumValue.ToString()}' is not a valid value for enum 'WaitForStatus'");
- }
-
public static string GetStringValue(this ClusterRerouteMetric enumValue)
{
if ((enumValue & ClusterRerouteMetric.All) != 0)
diff --git a/src/OpenSearch.Net/Api/RequestParameters/RequestParameters.Cluster.cs b/src/OpenSearch.Net/Api/RequestParameters/RequestParameters.Cluster.cs
index 720586fd85..202a3611fb 100644
--- a/src/OpenSearch.Net/Api/RequestParameters/RequestParameters.Cluster.cs
+++ b/src/OpenSearch.Net/Api/RequestParameters/RequestParameters.Cluster.cs
@@ -51,290 +51,6 @@
// ReSharper disable once CheckNamespace
namespace OpenSearch.Net.Specification.ClusterApi
{
- ///Request options for AllocationExplain https://opensearch.org/docs/latest/opensearch/rest-api/cluster-allocation/
- public class ClusterAllocationExplainRequestParameters : RequestParameters
- {
- public override HttpMethod DefaultHttpMethod => HttpMethod.POST;
- public override bool SupportsBody => true;
- ///Return information about disk usage and shard sizes (default: false)
- public bool? IncludeDiskInfo
- {
- get => Q("include_disk_info");
- set => Q("include_disk_info", value);
- }
-
- ///Return 'YES' decisions in explanation (default: false)
- public bool? IncludeYesDecisions
- {
- get => Q("include_yes_decisions");
- set => Q("include_yes_decisions", value);
- }
- }
-
- ///Request options for DeleteComponentTemplate https://opensearch.org/docs/latest/opensearch/index-templates/
- public class DeleteComponentTemplateRequestParameters : RequestParameters
- {
- public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE;
- public override bool SupportsBody => false;
- ///Specify timeout for connection to master node
- ///Deprecated as of OpenSearch 2.0, use instead
- public TimeSpan MasterTimeout
- {
- get => Q("master_timeout");
- set => Q("master_timeout", value);
- }
-
- ///Specify timeout for connection to cluster_manager node
- ///Introduced in OpenSearch 2.0 instead of
- public TimeSpan ClusterManagerTimeout
- {
- get => Q("cluster_manager_timeout");
- set => Q("cluster_manager_timeout", value);
- }
-
- ///Explicit operation timeout
- public TimeSpan Timeout
- {
- get => Q("timeout");
- set => Q("timeout", value);
- }
- }
-
- ///Request options for DeleteVotingConfigExclusions
- public class DeleteVotingConfigExclusionsRequestParameters : RequestParameters
- {
- public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE;
- public override bool SupportsBody => false;
- ///Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list.
- public bool? WaitForRemoval
- {
- get => Q("wait_for_removal");
- set => Q("wait_for_removal", value);
- }
- }
-
- ///Request options for ExistsComponentTemplate https://opensearch.org/docs/latest/opensearch/index-templates/
- public class ExistsComponentTemplateRequestParameters : RequestParameters
- {
- public override HttpMethod DefaultHttpMethod => HttpMethod.HEAD;
- public override bool SupportsBody => false;
- ///Return local information, do not retrieve the state from cluster_manager node (default: false)
- public bool? Local
- {
- get => Q("local");
- set => Q("local", value);
- }
-
- ///Explicit operation timeout for connection to master node
- ///Deprecated as of OpenSearch 2.0, use instead
- public TimeSpan MasterTimeout
- {
- get => Q("master_timeout");
- set => Q("master_timeout", value);
- }
-
- ///Explicit operation timeout for connection to cluster_manager node
- ///Introduced in OpenSearch 2.0 instead of
- public TimeSpan ClusterManagerTimeout
- {
- get => Q("cluster_manager_timeout");
- set => Q("cluster_manager_timeout", value);
- }
- }
-
- ///Request options for GetComponentTemplate https://opensearch.org/docs/latest/opensearch/index-templates/
- public class GetComponentTemplateRequestParameters : RequestParameters
- {
- public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
- public override bool SupportsBody => false;
- ///Return local information, do not retrieve the state from cluster_manager node (default: false)
- public bool? Local
- {
- get => Q("local");
- set => Q("local", value);
- }
-
- ///Explicit operation timeout for connection to master node
- ///Deprecated as of OpenSearch 2.0, use instead
- public TimeSpan MasterTimeout
- {
- get => Q("master_timeout");
- set => Q("master_timeout", value);
- }
-
- ///Explicit operation timeout for connection to cluster_manager node
- ///Introduced in OpenSearch 2.0 instead of
- public TimeSpan ClusterManagerTimeout
- {
- get => Q("cluster_manager_timeout");
- set => Q("cluster_manager_timeout", value);
- }
- }
-
- ///Request options for GetSettings https://opensearch.org/docs/latest/opensearch/rest-api/cluster-settings/
- public class ClusterGetSettingsRequestParameters : RequestParameters
- {
- public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
- public override bool SupportsBody => false;
- ///Return settings in flat format (default: false)
- public bool? FlatSettings
- {
- get => Q("flat_settings");
- set => Q("flat_settings", value);
- }
-
- ///Whether to return all default clusters setting.
- public bool? IncludeDefaults
- {
- get => Q("include_defaults");
- set => Q("include_defaults", value);
- }
-
- ///Explicit operation timeout for connection to master node
- ///Deprecated as of OpenSearch 2.0, use instead
- public TimeSpan MasterTimeout
- {
- get => Q("master_timeout");
- set => Q("master_timeout", value);
- }
-
- ///Explicit operation timeout for connection to cluster_manager node
- ///Introduced in OpenSearch 2.0 instead of
- public TimeSpan ClusterManagerTimeout
- {
- get => Q("cluster_manager_timeout");
- set => Q("cluster_manager_timeout", value);
- }
-
- ///Explicit operation timeout
- public TimeSpan Timeout
- {
- get => Q("timeout");
- set => Q("timeout", value);
- }
- }
-
- ///Request options for Health https://opensearch.org/docs/latest/opensearch/rest-api/cluster-health/
- public class ClusterHealthRequestParameters : RequestParameters
- {
- public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
- public override bool SupportsBody => false;
- ///Whether to expand wildcard expression to concrete indices that are open, closed or both.
- public ExpandWildcards? ExpandWildcards
- {
- get => Q("expand_wildcards");
- set => Q("expand_wildcards", value);
- }
-
- ///Specify the level of detail for returned information
- public Level? Level
- {
- get => Q("level");
- set => Q("level", value);
- }
-
- ///Return local information, do not retrieve the state from cluster_manager node (default: false)
- public bool? Local
- {
- get => Q("local");
- set => Q("local", value);
- }
-
- ///Explicit operation timeout for connection to master node
- ///Deprecated as of OpenSearch 2.0, use instead
- public TimeSpan MasterTimeout
- {
- get => Q("master_timeout");
- set => Q("master_timeout", value);
- }
-
- ///Explicit operation timeout for connection to cluster_manager node
- ///Introduced in OpenSearch 2.0 instead of
- public TimeSpan ClusterManagerTimeout
- {
- get => Q("cluster_manager_timeout");
- set => Q("cluster_manager_timeout", value);
- }
-
- ///Explicit operation timeout
- public TimeSpan Timeout
- {
- get => Q("timeout");
- set => Q("timeout", value);
- }
-
- ///Wait until the specified number of shards is active
- public string WaitForActiveShards
- {
- get => Q("wait_for_active_shards");
- set => Q("wait_for_active_shards", value);
- }
-
- ///Wait until all currently queued events with the given priority are processed
- public WaitForEvents? WaitForEvents
- {
- get => Q("wait_for_events");
- set => Q("wait_for_events", value);
- }
-
- ///Whether to wait until there are no initializing shards in the cluster
- public bool? WaitForNoInitializingShards
- {
- get => Q("wait_for_no_initializing_shards");
- set => Q("wait_for_no_initializing_shards", value);
- }
-
- ///Whether to wait until there are no relocating shards in the cluster
- public bool? WaitForNoRelocatingShards
- {
- get => Q("wait_for_no_relocating_shards");
- set => Q("wait_for_no_relocating_shards", value);
- }
-
- ///Wait until the specified number of nodes is available
- public string WaitForNodes
- {
- get => Q("wait_for_nodes");
- set => Q("wait_for_nodes", value);
- }
-
- ///Wait until cluster is in a specific state
- public WaitForStatus? WaitForStatus
- {
- get => Q("wait_for_status");
- set => Q("wait_for_status", value);
- }
- }
-
- ///Request options for PendingTasks https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/
- public class ClusterPendingTasksRequestParameters : RequestParameters
- {
- public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
- public override bool SupportsBody => false;
- ///Return local information, do not retrieve the state from cluster_manager node (default: false)
- public bool? Local
- {
- get => Q("local");
- set => Q("local", value);
- }
-
- ///Specify timeout for connection to master node
- ///Deprecated as of OpenSearch 2.0, use instead
- public TimeSpan MasterTimeout
- {
- get => Q("master_timeout");
- set => Q("master_timeout", value);
- }
-
- ///Specify timeout for connection to cluster_manager node
- ///Introduced in OpenSearch 2.0 instead of
- public TimeSpan ClusterManagerTimeout
- {
- get => Q("cluster_manager_timeout");
- set => Q("cluster_manager_timeout", value);
- }
- }
-
///Request options for PostVotingConfigExclusions
public class PostVotingConfigExclusionsRequestParameters : RequestParameters
{
diff --git a/src/OpenSearch.Net/IOpenSearchLowLevelClient.Generated.cs b/src/OpenSearch.Net/IOpenSearchLowLevelClient.Generated.cs
index 649a151bd2..6f60bc476a 100644
--- a/src/OpenSearch.Net/IOpenSearchLowLevelClient.Generated.cs
+++ b/src/OpenSearch.Net/IOpenSearchLowLevelClient.Generated.cs
@@ -72,12 +72,6 @@ LowLevelCatNamespace Cat
get;
}
- ///Cluster APIs
- LowLevelClusterNamespace Cluster
- {
- get;
- }
-
///Indices APIs
LowLevelIndicesNamespace Indices
{
diff --git a/src/OpenSearch.Net/OpenSearchLowLevelClient.Cluster.cs b/src/OpenSearch.Net/OpenSearchLowLevelClient.Cluster.cs
index f59fc6f431..a958c159b8 100644
--- a/src/OpenSearch.Net/OpenSearchLowLevelClient.Cluster.cs
+++ b/src/OpenSearch.Net/OpenSearchLowLevelClient.Cluster.cs
@@ -27,13 +27,13 @@
*/
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
-// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
-// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
// -----------------------------------------------
-//
-// This file is automatically generated
+//
+// This file is automatically generated
// Please do not edit these files manually
// Run the following in the root of the repos:
//
@@ -66,110 +66,6 @@ namespace OpenSearch.Net.Specification.ClusterApi
///
public partial class LowLevelClusterNamespace : NamespacedClientProxy
{
- internal LowLevelClusterNamespace(OpenSearchLowLevelClient client): base(client)
- {
- }
-
- ///POST on /_cluster/allocation/explain https://opensearch.org/docs/latest/opensearch/rest-api/cluster-allocation/
- ///The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- public TResponse AllocationExplain(PostData body, ClusterAllocationExplainRequestParameters requestParameters = null)
- where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, "_cluster/allocation/explain", body, RequestParams(requestParameters));
- ///POST on /_cluster/allocation/explain https://opensearch.org/docs/latest/opensearch/rest-api/cluster-allocation/
- ///The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- [MapsApi("cluster.allocation_explain", "body")]
- public Task AllocationExplainAsync(PostData body, ClusterAllocationExplainRequestParameters requestParameters = null, CancellationToken ctx = default)
- where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, "_cluster/allocation/explain", ctx, body, RequestParams(requestParameters));
- ///DELETE on /_component_template/{name} https://opensearch.org/docs/latest/opensearch/index-templates/
- ///The name of the template
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- public TResponse DeleteComponentTemplate(string name, DeleteComponentTemplateRequestParameters requestParameters = null)
- where TResponse : class, IOpenSearchResponse, new() => DoRequest(DELETE, Url($"_component_template/{name:name}"), null, RequestParams(requestParameters));
- ///DELETE on /_component_template/{name} https://opensearch.org/docs/latest/opensearch/index-templates/
- ///The name of the template
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- [MapsApi("cluster.delete_component_template", "name")]
- public Task DeleteComponentTemplateAsync(string name, DeleteComponentTemplateRequestParameters requestParameters = null, CancellationToken ctx = default)
- where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(DELETE, Url($"_component_template/{name:name}"), ctx, null, RequestParams(requestParameters));
- ///DELETE on /_cluster/voting_config_exclusions
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- public TResponse DeleteVotingConfigExclusions(DeleteVotingConfigExclusionsRequestParameters requestParameters = null)
- where TResponse : class, IOpenSearchResponse, new() => DoRequest(DELETE, "_cluster/voting_config_exclusions", null, RequestParams(requestParameters));
- ///DELETE on /_cluster/voting_config_exclusions
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- [MapsApi("cluster.delete_voting_config_exclusions", "")]
- public Task DeleteVotingConfigExclusionsAsync(DeleteVotingConfigExclusionsRequestParameters requestParameters = null, CancellationToken ctx = default)
- where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(DELETE, "_cluster/voting_config_exclusions", ctx, null, RequestParams(requestParameters));
- ///HEAD on /_component_template/{name} https://opensearch.org/docs/latest/opensearch/index-templates/
- ///The name of the template
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- public TResponse ExistsComponentTemplate(string name, ExistsComponentTemplateRequestParameters requestParameters = null)
- where TResponse : class, IOpenSearchResponse, new() => DoRequest(HEAD, Url($"_component_template/{name:name}"), null, RequestParams(requestParameters));
- ///HEAD on /_component_template/{name} https://opensearch.org/docs/latest/opensearch/index-templates/
- ///The name of the template
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- [MapsApi("cluster.exists_component_template", "name")]
- public Task ExistsComponentTemplateAsync(string name, ExistsComponentTemplateRequestParameters requestParameters = null, CancellationToken ctx = default)
- where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(HEAD, Url($"_component_template/{name:name}"), ctx, null, RequestParams(requestParameters));
- ///GET on /_component_template https://opensearch.org/docs/latest/opensearch/index-templates/
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- public TResponse GetComponentTemplate(GetComponentTemplateRequestParameters requestParameters = null)
- where TResponse : class, IOpenSearchResponse, new() => DoRequest(GET, "_component_template", null, RequestParams(requestParameters));
- ///GET on /_component_template https://opensearch.org/docs/latest/opensearch/index-templates/
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- [MapsApi("cluster.get_component_template", "")]
- public Task GetComponentTemplateAsync(GetComponentTemplateRequestParameters requestParameters = null, CancellationToken ctx = default)
- where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(GET, "_component_template", ctx, null, RequestParams(requestParameters));
- ///GET on /_component_template/{name} https://opensearch.org/docs/latest/opensearch/index-templates/
- ///The comma separated names of the component templates
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- public TResponse GetComponentTemplate(string name, GetComponentTemplateRequestParameters requestParameters = null)
- where TResponse : class, IOpenSearchResponse, new() => DoRequest(GET, Url($"_component_template/{name:name}"), null, RequestParams(requestParameters));
- ///GET on /_component_template/{name} https://opensearch.org/docs/latest/opensearch/index-templates/
- ///The comma separated names of the component templates
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- [MapsApi("cluster.get_component_template", "name")]
- public Task GetComponentTemplateAsync(string name, GetComponentTemplateRequestParameters requestParameters = null, CancellationToken ctx = default)
- where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(GET, Url($"_component_template/{name:name}"), ctx, null, RequestParams(requestParameters));
- ///GET on /_cluster/settings https://opensearch.org/docs/latest/opensearch/rest-api/cluster-settings/
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- public TResponse GetSettings(ClusterGetSettingsRequestParameters requestParameters = null)
- where TResponse : class, IOpenSearchResponse, new() => DoRequest(GET, "_cluster/settings", null, RequestParams(requestParameters));
- ///GET on /_cluster/settings https://opensearch.org/docs/latest/opensearch/rest-api/cluster-settings/
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- [MapsApi("cluster.get_settings", "")]
- public Task GetSettingsAsync(ClusterGetSettingsRequestParameters requestParameters = null, CancellationToken ctx = default)
- where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(GET, "_cluster/settings", ctx, null, RequestParams(requestParameters));
- ///GET on /_cluster/health https://opensearch.org/docs/latest/opensearch/rest-api/cluster-health/
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- public TResponse Health(ClusterHealthRequestParameters requestParameters = null)
- where TResponse : class, IOpenSearchResponse, new() => DoRequest(GET, "_cluster/health", null, RequestParams(requestParameters));
- ///GET on /_cluster/health https://opensearch.org/docs/latest/opensearch/rest-api/cluster-health/
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- [MapsApi("cluster.health", "")]
- public Task HealthAsync(ClusterHealthRequestParameters requestParameters = null, CancellationToken ctx = default)
- where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(GET, "_cluster/health", ctx, null, RequestParams(requestParameters));
- ///GET on /_cluster/health/{index} https://opensearch.org/docs/latest/opensearch/rest-api/cluster-health/
- ///Limit the information returned to a specific index
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- public TResponse Health(string index, ClusterHealthRequestParameters requestParameters = null)
- where TResponse : class, IOpenSearchResponse, new() => DoRequest(GET, Url($"_cluster/health/{index:index}"), null, RequestParams(requestParameters));
- ///GET on /_cluster/health/{index} https://opensearch.org/docs/latest/opensearch/rest-api/cluster-health/
- ///Limit the information returned to a specific index
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- [MapsApi("cluster.health", "index")]
- public Task HealthAsync(string index, ClusterHealthRequestParameters requestParameters = null, CancellationToken ctx = default)
- where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(GET, Url($"_cluster/health/{index:index}"), ctx, null, RequestParams(requestParameters));
- ///GET on /_cluster/pending_tasks https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- public TResponse PendingTasks(ClusterPendingTasksRequestParameters requestParameters = null)
- where TResponse : class, IOpenSearchResponse, new() => DoRequest(GET, "_cluster/pending_tasks", null, RequestParams(requestParameters));
- ///GET on /_cluster/pending_tasks https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- [MapsApi("cluster.pending_tasks", "")]
- public Task PendingTasksAsync(ClusterPendingTasksRequestParameters requestParameters = null, CancellationToken ctx = default)
- where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(GET, "_cluster/pending_tasks", ctx, null, RequestParams(requestParameters));
///POST on /_cluster/voting_config_exclusions
///Request specific configuration such as querystring parameters & request specific connection settings.
public TResponse PostVotingConfigExclusions(PostVotingConfigExclusionsRequestParameters requestParameters = null)
diff --git a/src/OpenSearch.Net/OpenSearchLowLevelClient.NoNamespace.cs b/src/OpenSearch.Net/OpenSearchLowLevelClient.NoNamespace.cs
index f999383ab6..567e63a192 100644
--- a/src/OpenSearch.Net/OpenSearchLowLevelClient.NoNamespace.cs
+++ b/src/OpenSearch.Net/OpenSearchLowLevelClient.NoNamespace.cs
@@ -75,12 +75,6 @@ public LowLevelCatNamespace Cat
private set;
}
- public LowLevelClusterNamespace Cluster
- {
- get;
- private set;
- }
-
public LowLevelIndicesNamespace Indices
{
get;
@@ -90,7 +84,6 @@ public LowLevelIndicesNamespace Indices
partial void SetupNamespaces()
{
Cat = new LowLevelCatNamespace(this);
- Cluster = new LowLevelClusterNamespace(this);
Indices = new LowLevelIndicesNamespace(this);
}
diff --git a/src/OpenSearch.Net/_Generated/Api/Enums.cs b/src/OpenSearch.Net/_Generated/Api/Enums.cs
index c6f7705188..9a7b3ce13c 100644
--- a/src/OpenSearch.Net/_Generated/Api/Enums.cs
+++ b/src/OpenSearch.Net/_Generated/Api/Enums.cs
@@ -191,6 +191,76 @@ public enum NodesUsageMetric
All = 1 << 1
}
+ [StringEnum]
+ public enum ExpandWildcards
+ {
+ [EnumMember(Value = "all")]
+ All,
+
+ [EnumMember(Value = "open")]
+ Open,
+
+ [EnumMember(Value = "closed")]
+ Closed,
+
+ [EnumMember(Value = "hidden")]
+ Hidden,
+
+ [EnumMember(Value = "none")]
+ None
+ }
+
+ [StringEnum]
+ public enum ClusterHealthLevel
+ {
+ [EnumMember(Value = "cluster")]
+ Cluster,
+
+ [EnumMember(Value = "indices")]
+ Indices,
+
+ [EnumMember(Value = "shards")]
+ Shards,
+
+ [EnumMember(Value = "awareness_attributes")]
+ AwarenessAttributes
+ }
+
+ [StringEnum]
+ public enum WaitForEvents
+ {
+ [EnumMember(Value = "immediate")]
+ Immediate,
+
+ [EnumMember(Value = "urgent")]
+ Urgent,
+
+ [EnumMember(Value = "high")]
+ High,
+
+ [EnumMember(Value = "normal")]
+ Normal,
+
+ [EnumMember(Value = "low")]
+ Low,
+
+ [EnumMember(Value = "languid")]
+ Languid
+ }
+
+ [StringEnum]
+ public enum WaitForStatus
+ {
+ [EnumMember(Value = "green")]
+ Green,
+
+ [EnumMember(Value = "yellow")]
+ Yellow,
+
+ [EnumMember(Value = "red")]
+ Red
+ }
+
[StringEnum]
public enum SampleType
{
@@ -250,6 +320,22 @@ static partial void RegisterEnumStringResolvers()
typeof(NodesUsageMetric),
e => GetStringValue((NodesUsageMetric)e)
);
+ EnumStringResolvers.TryAdd(
+ typeof(ExpandWildcards),
+ e => GetStringValue((ExpandWildcards)e)
+ );
+ EnumStringResolvers.TryAdd(
+ typeof(ClusterHealthLevel),
+ e => GetStringValue((ClusterHealthLevel)e)
+ );
+ EnumStringResolvers.TryAdd(
+ typeof(WaitForEvents),
+ e => GetStringValue((WaitForEvents)e)
+ );
+ EnumStringResolvers.TryAdd(
+ typeof(WaitForStatus),
+ e => GetStringValue((WaitForStatus)e)
+ );
EnumStringResolvers.TryAdd(typeof(SampleType), e => GetStringValue((SampleType)e));
EnumStringResolvers.TryAdd(
typeof(NodesStatLevel),
@@ -364,6 +450,82 @@ public static string GetStringValue(this NodesUsageMetric enumValue)
return string.Join(",", list);
}
+ public static string GetStringValue(this ExpandWildcards enumValue)
+ {
+ switch (enumValue)
+ {
+ case ExpandWildcards.All:
+ return "all";
+ case ExpandWildcards.Open:
+ return "open";
+ case ExpandWildcards.Closed:
+ return "closed";
+ case ExpandWildcards.Hidden:
+ return "hidden";
+ case ExpandWildcards.None:
+ return "none";
+ }
+ throw new ArgumentException(
+ $"'{enumValue.ToString()}' is not a valid value for enum 'ExpandWildcards'"
+ );
+ }
+
+ public static string GetStringValue(this ClusterHealthLevel enumValue)
+ {
+ switch (enumValue)
+ {
+ case ClusterHealthLevel.Cluster:
+ return "cluster";
+ case ClusterHealthLevel.Indices:
+ return "indices";
+ case ClusterHealthLevel.Shards:
+ return "shards";
+ case ClusterHealthLevel.AwarenessAttributes:
+ return "awareness_attributes";
+ }
+ throw new ArgumentException(
+ $"'{enumValue.ToString()}' is not a valid value for enum 'ClusterHealthLevel'"
+ );
+ }
+
+ public static string GetStringValue(this WaitForEvents enumValue)
+ {
+ switch (enumValue)
+ {
+ case WaitForEvents.Immediate:
+ return "immediate";
+ case WaitForEvents.Urgent:
+ return "urgent";
+ case WaitForEvents.High:
+ return "high";
+ case WaitForEvents.Normal:
+ return "normal";
+ case WaitForEvents.Low:
+ return "low";
+ case WaitForEvents.Languid:
+ return "languid";
+ }
+ throw new ArgumentException(
+ $"'{enumValue.ToString()}' is not a valid value for enum 'WaitForEvents'"
+ );
+ }
+
+ public static string GetStringValue(this WaitForStatus enumValue)
+ {
+ switch (enumValue)
+ {
+ case WaitForStatus.Green:
+ return "green";
+ case WaitForStatus.Yellow:
+ return "yellow";
+ case WaitForStatus.Red:
+ return "red";
+ }
+ throw new ArgumentException(
+ $"'{enumValue.ToString()}' is not a valid value for enum 'WaitForStatus'"
+ );
+ }
+
public static string GetStringValue(this SampleType enumValue)
{
switch (enumValue)
diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Cluster.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Cluster.cs
new file mode 100644
index 0000000000..26f58529a6
--- /dev/null
+++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Cluster.cs
@@ -0,0 +1,372 @@
+/* SPDX-License-Identifier: Apache-2.0
+*
+* The OpenSearch Contributors require contributions made to
+* this file be licensed under the Apache-2.0 license or a
+* compatible open source license.
+*/
+/*
+* Modifications Copyright OpenSearch Contributors. See
+* GitHub history for details.
+*
+* Licensed to Elasticsearch B.V. under one or more contributor
+* license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright
+* ownership. Elasticsearch B.V. licenses this file to you under
+* the Apache License, Version 2.0 (the "License"); you may
+* not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// -----------------------------------------------
+//
+// This file is automatically generated
+// Please do not edit these files manually
+// Run the following in the root of the repos:
+//
+// *NIX : ./build.sh codegen
+// Windows : build.bat codegen
+//
+// -----------------------------------------------
+
+// ReSharper disable RedundantUsingDirective
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Linq.Expressions;
+
+// ReSharper disable once CheckNamespace
+namespace OpenSearch.Net.Specification.ClusterApi
+{
+ ///Request options for AllocationExplain https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-allocation/
+ public partial class ClusterAllocationExplainRequestParameters
+ : RequestParameters
+ {
+ public override HttpMethod DefaultHttpMethod => HttpMethod.POST;
+ public override bool SupportsBody => true;
+
+ ///Return information about disk usage and shard sizes.
+ public bool? IncludeDiskInfo
+ {
+ get => Q("include_disk_info");
+ set => Q("include_disk_info", value);
+ }
+
+ ///Return 'YES' decisions in explanation.
+ public bool? IncludeYesDecisions
+ {
+ get => Q("include_yes_decisions");
+ set => Q("include_yes_decisions", value);
+ }
+ }
+
+ ///Request options for DeleteComponentTemplate https://opensearch.org/docs/latest
+ public partial class DeleteComponentTemplateRequestParameters
+ : RequestParameters
+ {
+ public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE;
+ public override bool SupportsBody => false;
+
+ ///Operation timeout for connection to cluster-manager node.
+ ///Supported by OpenSearch servers of version 2.0.0 or greater.
+ public TimeSpan ClusterManagerTimeout
+ {
+ get => Q("cluster_manager_timeout");
+ set => Q("cluster_manager_timeout", value);
+ }
+
+ ///Operation timeout for connection to master node.
+ [Obsolete(
+ "Deprecated as of: 2.0.0, reason: To promote inclusive language, use 'cluster_manager_timeout' instead."
+ )]
+ public TimeSpan MasterTimeout
+ {
+ get => Q("master_timeout");
+ set => Q("master_timeout", value);
+ }
+
+ ///Operation timeout.
+ public TimeSpan Timeout
+ {
+ get => Q("timeout");
+ set => Q("timeout", value);
+ }
+ }
+
+ ///Request options for DeleteVotingConfigExclusions https://opensearch.org/docs/latest
+ public partial class DeleteVotingConfigExclusionsRequestParameters
+ : RequestParameters
+ {
+ public override HttpMethod DefaultHttpMethod => HttpMethod.DELETE;
+ public override bool SupportsBody => false;
+
+ ///Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list.
+ public bool? WaitForRemoval
+ {
+ get => Q("wait_for_removal");
+ set => Q("wait_for_removal", value);
+ }
+ }
+
+ ///Request options for ExistsComponentTemplate https://opensearch.org/docs/latest
+ public partial class ExistsComponentTemplateRequestParameters
+ : RequestParameters
+ {
+ public override HttpMethod DefaultHttpMethod => HttpMethod.HEAD;
+ public override bool SupportsBody => false;
+
+ ///Return local information, do not retrieve the state from cluster-manager node.
+ public bool? Local
+ {
+ get => Q("local");
+ set => Q("local", value);
+ }
+
+ ///Operation timeout for connection to master node.
+ [Obsolete(
+ "Deprecated as of: 2.0.0, reason: To promote inclusive language, use 'cluster_manager_timeout' instead."
+ )]
+ public TimeSpan MasterTimeout
+ {
+ get => Q("master_timeout");
+ set => Q("master_timeout", value);
+ }
+ }
+
+ ///Request options for GetComponentTemplate https://opensearch.org/docs/latest
+ public partial class GetComponentTemplateRequestParameters
+ : RequestParameters
+ {
+ public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
+ public override bool SupportsBody => false;
+
+ ///Operation timeout for connection to cluster-manager node.
+ ///Supported by OpenSearch servers of version 2.0.0 or greater.
+ public TimeSpan ClusterManagerTimeout
+ {
+ get => Q("cluster_manager_timeout");
+ set => Q("cluster_manager_timeout", value);
+ }
+
+ ///Return local information, do not retrieve the state from cluster-manager node.
+ public bool? Local
+ {
+ get => Q("local");
+ set => Q("local", value);
+ }
+
+ ///Operation timeout for connection to master node.
+ [Obsolete(
+ "Deprecated as of: 2.0.0, reason: To promote inclusive language, use 'cluster_manager_timeout' instead."
+ )]
+ public TimeSpan MasterTimeout
+ {
+ get => Q("master_timeout");
+ set => Q("master_timeout", value);
+ }
+ }
+
+ ///Request options for GetSettings https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-settings/
+ public partial class ClusterGetSettingsRequestParameters
+ : RequestParameters
+ {
+ public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
+ public override bool SupportsBody => false;
+
+ ///Operation timeout for connection to cluster-manager node.
+ ///Supported by OpenSearch servers of version 2.0.0 or greater.
+ public TimeSpan ClusterManagerTimeout
+ {
+ get => Q("cluster_manager_timeout");
+ set => Q("cluster_manager_timeout", value);
+ }
+
+ ///Return settings in flat format.
+ public bool? FlatSettings
+ {
+ get => Q("flat_settings");
+ set => Q("flat_settings", value);
+ }
+
+ ///Whether to return all default clusters setting.
+ public bool? IncludeDefaults
+ {
+ get => Q("include_defaults");
+ set => Q("include_defaults", value);
+ }
+
+ ///Operation timeout for connection to master node.
+ [Obsolete(
+ "Deprecated as of: 2.0.0, reason: To promote inclusive language, use 'cluster_manager_timeout' instead."
+ )]
+ public TimeSpan MasterTimeout
+ {
+ get => Q("master_timeout");
+ set => Q("master_timeout", value);
+ }
+
+ ///Operation timeout.
+ public TimeSpan Timeout
+ {
+ get => Q("timeout");
+ set => Q("timeout", value);
+ }
+ }
+
+ ///Request options for Health https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-health/
+ public partial class ClusterHealthRequestParameters
+ : RequestParameters
+ {
+ public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
+ public override bool SupportsBody => false;
+
+ ///The awareness attribute for which the health is required.
+ public string AwarenessAttribute
+ {
+ get => Q("awareness_attribute");
+ set => Q("awareness_attribute", value);
+ }
+
+ ///Specify the level of detail for returned information.
+ public ClusterHealthLevel? ClusterHealthLevel
+ {
+ get => Q("level");
+ set => Q("level", value);
+ }
+
+ ///Operation timeout for connection to cluster-manager node.
+ ///Supported by OpenSearch servers of version 2.0.0 or greater.
+ public TimeSpan ClusterManagerTimeout
+ {
+ get => Q("cluster_manager_timeout");
+ set => Q("cluster_manager_timeout", value);
+ }
+
+ ///Checks whether local node is commissioned or not. If set to true on a local call it will throw exception if node is decommissioned.
+ public bool? EnsureNodeCommissioned
+ {
+ get => Q("ensure_node_commissioned");
+ set => Q("ensure_node_commissioned", value);
+ }
+
+ ///Whether to expand wildcard expression to concrete indices that are open, closed or both.
+ public ExpandWildcards? ExpandWildcards
+ {
+ get => Q("expand_wildcards");
+ set => Q("expand_wildcards", value);
+ }
+
+ ///Return local information, do not retrieve the state from cluster-manager node.
+ public bool? Local
+ {
+ get => Q("local");
+ set => Q("local", value);
+ }
+
+ ///Operation timeout for connection to master node.
+ [Obsolete(
+ "Deprecated as of: 2.0.0, reason: To promote inclusive language, use 'cluster_manager_timeout' instead."
+ )]
+ public TimeSpan MasterTimeout
+ {
+ get => Q("master_timeout");
+ set => Q("master_timeout", value);
+ }
+
+ ///Operation timeout.
+ public TimeSpan Timeout
+ {
+ get => Q("timeout");
+ set => Q("timeout", value);
+ }
+
+ ///Wait until the specified number of shards is active.
+ public string WaitForActiveShards
+ {
+ get => Q("wait_for_active_shards");
+ set => Q("wait_for_active_shards", value);
+ }
+
+ ///Wait until all currently queued events with the given priority are processed.
+ public WaitForEvents? WaitForEvents
+ {
+ get => Q("wait_for_events");
+ set => Q("wait_for_events", value);
+ }
+
+ ///Wait until the specified number of nodes is available.
+ public string WaitForNodes
+ {
+ get => Q("wait_for_nodes");
+ set => Q("wait_for_nodes", value);
+ }
+
+ ///Whether to wait until there are no initializing shards in the cluster.
+ public bool? WaitForNoInitializingShards
+ {
+ get => Q("wait_for_no_initializing_shards");
+ set => Q("wait_for_no_initializing_shards", value);
+ }
+
+ ///Whether to wait until there are no relocating shards in the cluster.
+ public bool? WaitForNoRelocatingShards
+ {
+ get => Q("wait_for_no_relocating_shards");
+ set => Q("wait_for_no_relocating_shards", value);
+ }
+
+ ///Wait until cluster is in a specific state.
+ public WaitForStatus? WaitForStatus
+ {
+ get => Q("wait_for_status");
+ set => Q("wait_for_status", value);
+ }
+ }
+
+ ///Request options for PendingTasks https://opensearch.org/docs/latest
+ public partial class ClusterPendingTasksRequestParameters
+ : RequestParameters
+ {
+ public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
+ public override bool SupportsBody => false;
+
+ ///Operation timeout for connection to cluster-manager node.
+ ///Supported by OpenSearch servers of version 2.0.0 or greater.
+ public TimeSpan ClusterManagerTimeout
+ {
+ get => Q("cluster_manager_timeout");
+ set => Q("cluster_manager_timeout", value);
+ }
+
+ ///Return local information, do not retrieve the state from cluster-manager node.
+ public bool? Local
+ {
+ get => Q("local");
+ set => Q("local", value);
+ }
+
+ ///Operation timeout for connection to master node.
+ [Obsolete(
+ "Deprecated as of: 2.0.0, reason: To promote inclusive language, use 'cluster_manager_timeout' instead."
+ )]
+ public TimeSpan MasterTimeout
+ {
+ get => Q("master_timeout");
+ set => Q("master_timeout", value);
+ }
+ }
+}
diff --git a/src/OpenSearch.Net/_Generated/IOpenSearchLowLevelClient.cs b/src/OpenSearch.Net/_Generated/IOpenSearchLowLevelClient.cs
index 9e9d9ca975..8882fa62a0 100644
--- a/src/OpenSearch.Net/_Generated/IOpenSearchLowLevelClient.cs
+++ b/src/OpenSearch.Net/_Generated/IOpenSearchLowLevelClient.cs
@@ -50,6 +50,7 @@
using System.Threading;
using System.Threading.Tasks;
using OpenSearch.Net;
+using OpenSearch.Net.Specification.ClusterApi;
using OpenSearch.Net.Specification.DanglingIndicesApi;
using OpenSearch.Net.Specification.IngestApi;
using OpenSearch.Net.Specification.NodesApi;
@@ -63,6 +64,9 @@ namespace OpenSearch.Net
///
public partial interface IOpenSearchLowLevelClient
{
+ ///Cluster APIs
+ LowLevelClusterNamespace Cluster { get; }
+
///Dangling Indices APIs
LowLevelDanglingIndicesNamespace DanglingIndices { get; }
diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Cluster.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Cluster.cs
new file mode 100644
index 0000000000..7ac0a0c5b6
--- /dev/null
+++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Cluster.cs
@@ -0,0 +1,370 @@
+/* SPDX-License-Identifier: Apache-2.0
+*
+* The OpenSearch Contributors require contributions made to
+* this file be licensed under the Apache-2.0 license or a
+* compatible open source license.
+*/
+/*
+* Modifications Copyright OpenSearch Contributors. See
+* GitHub history for details.
+*
+* Licensed to Elasticsearch B.V. under one or more contributor
+* license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright
+* ownership. Elasticsearch B.V. licenses this file to you under
+* the Apache License, Version 2.0 (the "License"); you may
+* not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// -----------------------------------------------
+//
+// This file is automatically generated
+// Please do not edit these files manually
+// Run the following in the root of the repos:
+//
+// *NIX : ./build.sh codegen
+// Windows : build.bat codegen
+//
+// -----------------------------------------------
+// ReSharper disable RedundantUsingDirective
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using OpenSearch.Net;
+using static OpenSearch.Net.HttpMethod;
+
+// ReSharper disable InterpolatedStringExpressionIsNotIFormattable
+// ReSharper disable once CheckNamespace
+// ReSharper disable InterpolatedStringExpressionIsNotIFormattable
+// ReSharper disable RedundantExtendsListEntry
+namespace OpenSearch.Net.Specification.ClusterApi
+{
+ ///
+ /// Cluster APIs.
+ /// Not intended to be instantiated directly. Use the property
+ /// on .
+ ///
+ ///
+ public partial class LowLevelClusterNamespace : NamespacedClientProxy
+ {
+ internal LowLevelClusterNamespace(OpenSearchLowLevelClient client)
+ : base(client) { }
+
+ ///POST on /_cluster/allocation/explain https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-allocation/
+ ///The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'
+ ///Request specific configuration such as querystring parameters & request specific connection settings.
+ public TResponse AllocationExplain(
+ PostData body,
+ ClusterAllocationExplainRequestParameters requestParameters = null
+ )
+ where TResponse : class, IOpenSearchResponse, new() =>
+ DoRequest(
+ POST,
+ "_cluster/allocation/explain",
+ body,
+ RequestParams(requestParameters)
+ );
+
+ ///POST on /_cluster/allocation/explain https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-allocation/
+ ///The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'
+ ///Request specific configuration such as querystring parameters & request specific connection settings.
+ [MapsApi("cluster.allocation_explain", "body")]
+ public Task AllocationExplainAsync(
+ PostData body,
+ ClusterAllocationExplainRequestParameters requestParameters = null,
+ CancellationToken ctx = default
+ )
+ where TResponse : class, IOpenSearchResponse, new() =>
+ DoRequestAsync(
+ POST,
+ "_cluster/allocation/explain",
+ ctx,
+ body,
+ RequestParams(requestParameters)
+ );
+
+ ///DELETE on /_component_template/{name} https://opensearch.org/docs/latest
+ ///The name of the template.
+ ///Request specific configuration such as querystring parameters & request specific connection settings.
+ public TResponse DeleteComponentTemplate(
+ string name,
+ DeleteComponentTemplateRequestParameters requestParameters = null
+ )
+ where TResponse : class, IOpenSearchResponse, new() =>
+ DoRequest(
+ DELETE,
+ Url($"_component_template/{name:name}"),
+ null,
+ RequestParams(requestParameters)
+ );
+
+ ///DELETE on /_component_template/{name} https://opensearch.org/docs/latest
+ ///The name of the template.
+ ///Request specific configuration such as querystring parameters & request specific connection settings.
+ [MapsApi("cluster.delete_component_template", "name")]
+ public Task DeleteComponentTemplateAsync(
+ string name,
+ DeleteComponentTemplateRequestParameters requestParameters = null,
+ CancellationToken ctx = default
+ )
+ where TResponse : class, IOpenSearchResponse, new() =>
+ DoRequestAsync(
+ DELETE,
+ Url($"_component_template/{name:name}"),
+ ctx,
+ null,
+ RequestParams(requestParameters)
+ );
+
+ ///DELETE on /_cluster/voting_config_exclusions https://opensearch.org/docs/latest
+ ///Request specific configuration such as querystring parameters & request specific connection settings.
+ public TResponse DeleteVotingConfigExclusions(
+ DeleteVotingConfigExclusionsRequestParameters requestParameters = null
+ )
+ where TResponse : class, IOpenSearchResponse, new() =>
+ DoRequest(
+ DELETE,
+ "_cluster/voting_config_exclusions",
+ null,
+ RequestParams(requestParameters)
+ );
+
+ ///DELETE on /_cluster/voting_config_exclusions https://opensearch.org/docs/latest
+ ///Request specific configuration such as querystring parameters & request specific connection settings.
+ [MapsApi("cluster.delete_voting_config_exclusions", "")]
+ public Task DeleteVotingConfigExclusionsAsync(
+ DeleteVotingConfigExclusionsRequestParameters requestParameters = null,
+ CancellationToken ctx = default
+ )
+ where TResponse : class, IOpenSearchResponse, new() =>
+ DoRequestAsync(
+ DELETE,
+ "_cluster/voting_config_exclusions",
+ ctx,
+ null,
+ RequestParams(requestParameters)
+ );
+
+ ///HEAD on /_component_template/{name} https://opensearch.org/docs/latest
+ ///The name of the template.
+ ///Request specific configuration such as querystring parameters & request specific connection settings.
+ public TResponse ExistsComponentTemplate(
+ string name,
+ ExistsComponentTemplateRequestParameters requestParameters = null
+ )
+ where TResponse : class, IOpenSearchResponse, new() =>
+ DoRequest(
+ HEAD,
+ Url($"_component_template/{name:name}"),
+ null,
+ RequestParams(requestParameters)
+ );
+
+ ///HEAD on /_component_template/{name} https://opensearch.org/docs/latest
+ ///The name of the template.
+ ///Request specific configuration such as querystring parameters & request specific connection settings.
+ [MapsApi("cluster.exists_component_template", "name")]
+ public Task ExistsComponentTemplateAsync(
+ string name,
+ ExistsComponentTemplateRequestParameters requestParameters = null,
+ CancellationToken ctx = default
+ )
+ where TResponse : class, IOpenSearchResponse, new() =>
+ DoRequestAsync(
+ HEAD,
+ Url($"_component_template/{name:name}"),
+ ctx,
+ null,
+ RequestParams(requestParameters)
+ );
+
+ ///