Skip to content

Commit bae4221

Browse files
[codegen] master synchronization (#5882)
Co-authored-by: Mpdreamz <Mpdreamz@users.noreply.github.com>
1 parent 600c971 commit bae4221

File tree

3 files changed

+105
-0
lines changed

3 files changed

+105
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"indices.field_usage_stats": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-field-usage-stats.html",
5+
"description": "Returns the field usage stats for each field of an index"
6+
},
7+
"stability": "experimental",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": [
11+
"application/json"
12+
]
13+
},
14+
"url": {
15+
"paths": [
16+
{
17+
"path": "/{index}/_field_usage_stats",
18+
"methods": [
19+
"GET"
20+
],
21+
"parts": {
22+
"index": {
23+
"type": "string",
24+
"description": "A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices"
25+
}
26+
}
27+
}
28+
]
29+
},
30+
"params": {
31+
"fields":{
32+
"type":"list",
33+
"description":"A comma-separated list of fields to include in the stats if only a subset of fields should be returned (supports wildcards)"
34+
},
35+
"ignore_unavailable": {
36+
"type": "boolean",
37+
"description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
38+
},
39+
"allow_no_indices": {
40+
"type": "boolean",
41+
"description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
42+
},
43+
"expand_wildcards": {
44+
"type": "enum",
45+
"options": [
46+
"open",
47+
"closed",
48+
"hidden",
49+
"none",
50+
"all"
51+
],
52+
"default": "open",
53+
"description": "Whether to expand wildcard expression to concrete indices that are open, closed or both."
54+
}
55+
}
56+
}
57+
}

src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.Indices.cs

+35
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,41 @@ public TimeSpan MasterTimeout
530530
}
531531
}
532532

533+
///<summary>Request options for FieldUsageStats <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-field-usage-stats.html</para></summary>
534+
public class FieldUsageStatsRequestParameters : RequestParameters<FieldUsageStatsRequestParameters>
535+
{
536+
///<summary>
537+
/// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have
538+
/// been specified)
539+
///</summary>
540+
public bool? AllowNoIndices
541+
{
542+
get => Q<bool? >("allow_no_indices");
543+
set => Q("allow_no_indices", value);
544+
}
545+
546+
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
547+
public ExpandWildcards? ExpandWildcards
548+
{
549+
get => Q<ExpandWildcards? >("expand_wildcards");
550+
set => Q("expand_wildcards", value);
551+
}
552+
553+
///<summary>A comma-separated list of fields to include in the stats if only a subset of fields should be returned (supports wildcards)</summary>
554+
public string[] Fields
555+
{
556+
get => Q<string[]>("fields");
557+
set => Q("fields", value);
558+
}
559+
560+
///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary>
561+
public bool? IgnoreUnavailable
562+
{
563+
get => Q<bool? >("ignore_unavailable");
564+
set => Q("ignore_unavailable", value);
565+
}
566+
}
567+
533568
///<summary>Request options for Flush <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html</para></summary>
534569
public class FlushRequestParameters : RequestParameters<FlushRequestParameters>
535570
{

src/Elasticsearch.Net/ElasticLowLevelClient.Indices.cs

+13
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,19 @@ public TResponse TemplateExistsForAll<TResponse>(string name, IndexTemplateExist
301301
[MapsApi("indices.exists_template", "name")]
302302
public Task<TResponse> TemplateExistsForAllAsync<TResponse>(string name, IndexTemplateExistsRequestParameters requestParameters = null, CancellationToken ctx = default)
303303
where TResponse : class, ITransportResponse, new() => DoRequestAsync<TResponse>(HEAD, Url($"_template/{name:name}"), ctx, null, RequestParams(requestParameters));
304+
///<summary>GET on /{index}/_field_usage_stats <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-field-usage-stats.html</para></summary>
305+
///<param name = "index">A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices</param>
306+
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
307+
///<remarks>Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded.</remarks>
308+
public TResponse FieldUsageStats<TResponse>(string index, FieldUsageStatsRequestParameters requestParameters = null)
309+
where TResponse : class, ITransportResponse, new() => DoRequest<TResponse>(GET, Url($"{index:index}/_field_usage_stats"), null, RequestParams(requestParameters));
310+
///<summary>GET on /{index}/_field_usage_stats <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-field-usage-stats.html</para></summary>
311+
///<param name = "index">A comma-separated list of index names; use the special string `_all` or Indices.All to perform the operation on all indices</param>
312+
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
313+
///<remarks>Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded.</remarks>
314+
[MapsApi("indices.field_usage_stats", "index")]
315+
public Task<TResponse> FieldUsageStatsAsync<TResponse>(string index, FieldUsageStatsRequestParameters requestParameters = null, CancellationToken ctx = default)
316+
where TResponse : class, ITransportResponse, new() => DoRequestAsync<TResponse>(GET, Url($"{index:index}/_field_usage_stats"), ctx, null, RequestParams(requestParameters));
304317
///<summary>POST on /_flush <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html</para></summary>
305318
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
306319
public TResponse FlushForAll<TResponse>(FlushRequestParameters requestParameters = null)

0 commit comments

Comments
 (0)