///<summary>GET on /_cat/segments/{index} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html</para></summary> ///<param name = "index">A comma-separated list of index names to limit the returned information</param> ///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param> public Task <TResponse> SegmentsAsync <TResponse>(string index, CatSegmentsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync <TResponse>(GET, Url($"_cat/segments/{index:index}"), ctx, null, RequestParams(requestParameters));
///<summary>GET on /_cat/segments <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html</para></summary> ///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param> public TResponse Segments <TResponse>(CatSegmentsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest <TResponse>(GET, "_cat/segments", null, RequestParams(requestParameters));
///<summary>GET on /_cat/segments/{index} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html</para></summary> ///<param name = "index">A comma-separated list of index names to limit the returned information</param> ///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param> public TResponse Segments <TResponse>(string index, CatSegmentsRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest <TResponse>(GET, Url($"_cat/segments/{index:index}"), null, RequestParams(requestParameters));
public Task <TResponse> SegmentsAsync <TResponse>(CatSegmentsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync <TResponse>(GET, "_cat/segments", ctx, null, RequestParams(requestParameters));