From a1f117497216e278990966c3edbfc681d1d077d8 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Thu, 7 Sep 2023 15:32:58 +1200 Subject: [PATCH] Re-generate `cluster.health` Signed-off-by: Thomas Farr --- .../Configuration/CodeConfiguration.cs | 1 + src/OpenSearch.Client/ApiUrlsLookup.cs | 1 - src/OpenSearch.Client/Descriptors.Cluster.cs | 53 ------ .../OpenSearchClient.Cluster.cs | 24 --- src/OpenSearch.Client/Requests.Cluster.cs | 117 ------------- .../_Generated/ApiUrlsLookup.cs | 3 + .../_Generated/Descriptors.Cluster.cs | 98 +++++++++++ .../_Generated/OpenSearchClient.Cluster.cs | 51 ++++++ .../_Generated/Requests.Cluster.cs | 132 ++++++++++++++ src/OpenSearch.Net/Api/Enums.cs | 101 ----------- .../RequestParameters.Cluster.cs | 92 ---------- .../OpenSearchLowLevelClient.Cluster.cs | 20 --- src/OpenSearch.Net/_Generated/Api/Enums.cs | 162 ++++++++++++++++++ .../RequestParameters.Cluster.cs | 110 ++++++++++++ .../OpenSearchLowLevelClient.Cluster.cs | 55 ++++++ .../ClusterHealth/ClusterHealthApiTests.cs | 4 +- 16 files changed, 614 insertions(+), 410 deletions(-) diff --git a/src/ApiGenerator/Configuration/CodeConfiguration.cs b/src/ApiGenerator/Configuration/CodeConfiguration.cs index d8f649e091..c9b709fcdf 100644 --- a/src/ApiGenerator/Configuration/CodeConfiguration.cs +++ b/src/ApiGenerator/Configuration/CodeConfiguration.cs @@ -45,6 +45,7 @@ public static class CodeConfiguration new("cluster.exists_component_template"), new("cluster.get_component_template"), new("cluster.get_settings"), + new("cluster.health"), new("dangling_indices.*"), new("ingest.*"), diff --git a/src/OpenSearch.Client/ApiUrlsLookup.cs b/src/OpenSearch.Client/ApiUrlsLookup.cs index 5874f870a3..de4d812cff 100644 --- a/src/OpenSearch.Client/ApiUrlsLookup.cs +++ b/src/OpenSearch.Client/ApiUrlsLookup.cs @@ -70,7 +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 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"}); diff --git a/src/OpenSearch.Client/Descriptors.Cluster.cs b/src/OpenSearch.Client/Descriptors.Cluster.cs index e7d018c578..10e6cc7598 100644 --- a/src/OpenSearch.Client/Descriptors.Cluster.cs +++ b/src/OpenSearch.Client/Descriptors.Cluster.cs @@ -57,59 +57,6 @@ // ReSharper disable RedundantNameQualifier namespace OpenSearch.Client.Specification.ClusterApi { - ///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 { diff --git a/src/OpenSearch.Client/OpenSearchClient.Cluster.cs b/src/OpenSearch.Client/OpenSearchClient.Cluster.cs index 1b4b35cfd7..93c2307d14 100644 --- a/src/OpenSearch.Client/OpenSearchClient.Cluster.cs +++ b/src/OpenSearch.Client/OpenSearchClient.Cluster.cs @@ -59,30 +59,6 @@ namespace OpenSearch.Client.Specification.ClusterApi /// public partial class ClusterNamespace : NamespacedClientProxy { - /// - /// 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: /// diff --git a/src/OpenSearch.Client/Requests.Cluster.cs b/src/OpenSearch.Client/Requests.Cluster.cs index 3785375076..9a81b38dba 100644 --- a/src/OpenSearch.Client/Requests.Cluster.cs +++ b/src/OpenSearch.Client/Requests.Cluster.cs @@ -58,123 +58,6 @@ // ReSharper disable RedundantNameQualifier namespace OpenSearch.Client.Specification.ClusterApi { - [InterfaceDataContract] - public partial interface IClusterHealthRequest : IRequest - { - [IgnoreDataMember] - Indices Index - { - get; - } - } - - ///Request for Health https://opensearch.org/docs/latest/opensearch/rest-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 - ///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 Time MasterTimeout - { - get => Q public partial class LowLevelClusterNamespace : NamespacedClientProxy { - ///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) 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 index 1e4bd96a4c..9a904d0678 100644 --- a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Cluster.cs +++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Cluster.cs @@ -226,4 +226,114 @@ public TimeSpan 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); + } + } } diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Cluster.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Cluster.cs index 0fa26aece1..454f8c56fa 100644 --- a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Cluster.cs +++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Cluster.cs @@ -282,5 +282,60 @@ public Task GetSettingsAsync( null, RequestParams(requestParameters) ); + + ///GET on /_cluster/health https://opensearch.org/docs/latest/api-reference/cluster-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/api-reference/cluster-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/api-reference/cluster-api/cluster-health/ + ///Limit the information returned to specific indicies. + ///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/api-reference/cluster-api/cluster-health/ + ///Limit the information returned to specific indicies. + ///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) + ); } } diff --git a/tests/Tests/Cluster/ClusterHealth/ClusterHealthApiTests.cs b/tests/Tests/Cluster/ClusterHealth/ClusterHealthApiTests.cs index d8df8e5d1b..2d2ea2fff1 100644 --- a/tests/Tests/Cluster/ClusterHealth/ClusterHealthApiTests.cs +++ b/tests/Tests/Cluster/ClusterHealth/ClusterHealthApiTests.cs @@ -77,9 +77,9 @@ public ClusterHealthShardsApiTests(ReadOnlyCluster cluster, EndpointUsage usage) protected override bool ExpectIsValid => true; protected override int ExpectStatusCode => 200; - protected override Func Fluent => c => c.Level(Level.Shards); + protected override Func Fluent => c => c.ClusterHealthLevel(ClusterHealthLevel.Shards); protected override HttpMethod HttpMethod => HttpMethod.GET; - protected override ClusterHealthRequest Initializer => new ClusterHealthRequest { Level = Level.Shards }; + protected override ClusterHealthRequest Initializer => new ClusterHealthRequest { ClusterHealthLevel = ClusterHealthLevel.Shards }; protected override string UrlPath => "/_cluster/health?level=shards"; protected override LazyResponses ClientUsage() => Calls(