Skip to content

Commit 3aa3f8b

Browse files
[codegen] 7.15 synchronization (#6013)
Co-authored-by: Mpdreamz <Mpdreamz@users.noreply.github.com>
1 parent 37a1ebf commit 3aa3f8b

File tree

4 files changed

+33
-11
lines changed

4 files changed

+33
-11
lines changed

src/ApiGenerator/RestSpecification/Core/nodes.info.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@
4646
"transport",
4747
"http",
4848
"plugins",
49-
"ingest"
49+
"ingest",
50+
"indices",
51+
"aggregations"
5052
],
51-
"description":"A comma-separated list of metrics you wish returned. Leave empty to return all."
53+
"description":"A comma-separated list of metrics you wish returned. Leave empty to return all metrics."
5254
}
5355
}
5456
},
@@ -73,9 +75,13 @@
7375
"transport",
7476
"http",
7577
"plugins",
76-
"ingest"
78+
"ingest",
79+
"indices",
80+
"aggregations",
81+
"_all",
82+
"_none"
7783
],
78-
"description":"A comma-separated list of metrics you wish returned. Leave empty to return all."
84+
"description":"A comma-separated list of metrics you wish returned. Use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics."
7985
}
8086
}
8187
}

src/ApiGenerator/RestSpecification/Core/nodes.stats.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
"store",
129129
"warmer",
130130
"suggest",
131-
"shards"
131+
"shard_stats"
132132
],
133133
"description":"Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified."
134134
}
@@ -177,7 +177,7 @@
177177
"store",
178178
"warmer",
179179
"suggest",
180-
"shards"
180+
"shard_stats"
181181
],
182182
"description":"Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified."
183183
},

src/Elasticsearch.Net/Api/Enums.Generated.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,15 @@ public enum NodesInfoMetric
108108
[EnumMember(Value = "plugins")]
109109
Plugins = 1 << 7,
110110
[EnumMember(Value = "ingest")]
111-
Ingest = 1 << 8
111+
Ingest = 1 << 8,
112+
[EnumMember(Value = "indices")]
113+
Indices = 1 << 9,
114+
[EnumMember(Value = "aggregations")]
115+
Aggregations = 1 << 10,
116+
[EnumMember(Value = "_none")]
117+
None = 1 << 11,
118+
[EnumMember(Value = "_all")]
119+
All = 1 << 12
112120
}
113121

114122
[Flags, StringEnum]
@@ -569,6 +577,8 @@ public static string GetStringValue(this IndicesStatsMetric enumValue)
569577

570578
public static string GetStringValue(this NodesInfoMetric enumValue)
571579
{
580+
if ((enumValue & NodesInfoMetric.All) != 0)
581+
return "_all";
572582
var list = new List<string>();
573583
if ((enumValue & NodesInfoMetric.Settings) != 0)
574584
list.Add("settings");
@@ -588,6 +598,12 @@ public static string GetStringValue(this NodesInfoMetric enumValue)
588598
list.Add("plugins");
589599
if ((enumValue & NodesInfoMetric.Ingest) != 0)
590600
list.Add("ingest");
601+
if ((enumValue & NodesInfoMetric.Indices) != 0)
602+
list.Add("indices");
603+
if ((enumValue & NodesInfoMetric.Aggregations) != 0)
604+
list.Add("aggregations");
605+
if ((enumValue & NodesInfoMetric.None) != 0)
606+
list.Add("_none");
591607
return string.Join(",", list);
592608
}
593609

src/Elasticsearch.Net/ElasticLowLevelClient.Nodes.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,25 +115,25 @@ public TResponse Info<TResponse>(string nodeId, NodesInfoRequestParameters reque
115115
public Task<TResponse> InfoAsync<TResponse>(string nodeId, NodesInfoRequestParameters requestParameters = null, CancellationToken ctx = default)
116116
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_nodes/{nodeId:nodeId}"), ctx, null, RequestParams(requestParameters));
117117
///<summary>GET on /_nodes/{metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html</para></summary>
118-
///<param name = "metric">A comma-separated list of metrics you wish returned. Leave empty to return all.</param>
118+
///<param name = "metric">A comma-separated list of metrics you wish returned. Use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics.</param>
119119
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
120120
public TResponse InfoForAll<TResponse>(string metric, NodesInfoRequestParameters requestParameters = null)
121121
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_nodes/{metric:metric}"), null, RequestParams(requestParameters));
122122
///<summary>GET on /_nodes/{metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html</para></summary>
123-
///<param name = "metric">A comma-separated list of metrics you wish returned. Leave empty to return all.</param>
123+
///<param name = "metric">A comma-separated list of metrics you wish returned. Use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics.</param>
124124
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
125125
[MapsApi("nodes.info", "metric")]
126126
public Task<TResponse> InfoForAllAsync<TResponse>(string metric, NodesInfoRequestParameters requestParameters = null, CancellationToken ctx = default)
127127
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_nodes/{metric:metric}"), ctx, null, RequestParams(requestParameters));
128128
///<summary>GET on /_nodes/{node_id}/{metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html</para></summary>
129129
///<param name = "nodeId">A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you&#x27;re connecting to, leave empty to get information from all nodes</param>
130-
///<param name = "metric">A comma-separated list of metrics you wish returned. Leave empty to return all.</param>
130+
///<param name = "metric">A comma-separated list of metrics you wish returned. Use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics.</param>
131131
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
132132
public TResponse Info<TResponse>(string nodeId, string metric, NodesInfoRequestParameters requestParameters = null)
133133
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_nodes/{nodeId:nodeId}/{metric:metric}"), null, RequestParams(requestParameters));
134134
///<summary>GET on /_nodes/{node_id}/{metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html</para></summary>
135135
///<param name = "nodeId">A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you&#x27;re connecting to, leave empty to get information from all nodes</param>
136-
///<param name = "metric">A comma-separated list of metrics you wish returned. Leave empty to return all.</param>
136+
///<param name = "metric">A comma-separated list of metrics you wish returned. Use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics.</param>
137137
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
138138
[MapsApi("nodes.info", "node_id, metric")]
139139
public Task<TResponse> InfoAsync<TResponse>(string nodeId, string metric, NodesInfoRequestParameters requestParameters = null, CancellationToken ctx = default)

0 commit comments

Comments
 (0)