forked from elastic/elasticsearch-net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ElasticLowLevelClient.Nodes.cs
247 lines (245 loc) · 30.9 KB
/
ElasticLowLevelClient.Nodes.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
// -----------------------------------------------
//
// 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 Elasticsearch.Net;
using static Elasticsearch.Net.HttpMethod;
// ReSharper disable InterpolatedStringExpressionIsNotIFormattable
// ReSharper disable once CheckNamespace
// ReSharper disable InterpolatedStringExpressionIsNotIFormattable
// ReSharper disable RedundantExtendsListEntry
namespace Elasticsearch.Net.Specification.NodesApi
{
///<summary>
/// Nodes APIs.
/// <para>Not intended to be instantiated directly. Use the <see cref = "IElasticLowLevelClient.Nodes"/> property
/// on <see cref = "IElasticLowLevelClient"/>.
///</para>
///</summary>
public class LowLevelNodesNamespace : NamespacedClientProxy
{
internal LowLevelNodesNamespace(ElasticLowLevelClient client): base(client)
{
}
///<summary>GET on /_nodes/hot_threads <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html</para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse HotThreadsForAll<TResponse>(NodesHotThreadsRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, "_nodes/hot_threads", null, RequestParams(requestParameters));
///<summary>GET on /_nodes/hot_threads <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html</para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("nodes.hot_threads", "")]
public Task<TResponse> HotThreadsForAllAsync<TResponse>(NodesHotThreadsRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, "_nodes/hot_threads", ctx, null, RequestParams(requestParameters));
///<summary>GET on /_nodes/{node_id}/hot_threads <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html</para></summary>
///<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're connecting to, leave empty to get information from all nodes</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse HotThreads<TResponse>(string nodeId, NodesHotThreadsRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_nodes/{nodeId:nodeId}/hot_threads"), null, RequestParams(requestParameters));
///<summary>GET on /_nodes/{node_id}/hot_threads <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html</para></summary>
///<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're connecting to, leave empty to get information from all nodes</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("nodes.hot_threads", "node_id")]
public Task<TResponse> HotThreadsAsync<TResponse>(string nodeId, NodesHotThreadsRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_nodes/{nodeId:nodeId}/hot_threads"), ctx, null, RequestParams(requestParameters));
///<summary>GET on /_nodes <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html</para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse InfoForAll<TResponse>(NodesInfoRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, "_nodes", null, RequestParams(requestParameters));
///<summary>GET on /_nodes <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html</para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("nodes.info", "")]
public Task<TResponse> InfoForAllAsync<TResponse>(NodesInfoRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, "_nodes", ctx, null, RequestParams(requestParameters));
///<summary>GET on /_nodes/{node_id} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html</para></summary>
///<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're connecting to, leave empty to get information from all nodes</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse Info<TResponse>(string nodeId, NodesInfoRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_nodes/{nodeId:nodeId}"), null, RequestParams(requestParameters));
///<summary>GET on /_nodes/{node_id} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html</para></summary>
///<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're connecting to, leave empty to get information from all nodes</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("nodes.info", "node_id")]
public Task<TResponse> InfoAsync<TResponse>(string nodeId, NodesInfoRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_nodes/{nodeId:nodeId}"), ctx, null, RequestParams(requestParameters));
///<summary>GET on /_nodes/{metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html</para></summary>
///<param name = "metric">A comma-separated list of metrics you wish returned. Leave empty to return all.</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse InfoForAll<TResponse>(string metric, NodesInfoRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_nodes/{metric:metric}"), null, RequestParams(requestParameters));
///<summary>GET on /_nodes/{metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html</para></summary>
///<param name = "metric">A comma-separated list of metrics you wish returned. Leave empty to return all.</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("nodes.info", "metric")]
public Task<TResponse> InfoForAllAsync<TResponse>(string metric, NodesInfoRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_nodes/{metric:metric}"), ctx, null, RequestParams(requestParameters));
///<summary>GET on /_nodes/{node_id}/{metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html</para></summary>
///<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're connecting to, leave empty to get information from all nodes</param>
///<param name = "metric">A comma-separated list of metrics you wish returned. Leave empty to return all.</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse Info<TResponse>(string nodeId, string metric, NodesInfoRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_nodes/{nodeId:nodeId}/{metric:metric}"), null, RequestParams(requestParameters));
///<summary>GET on /_nodes/{node_id}/{metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html</para></summary>
///<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're connecting to, leave empty to get information from all nodes</param>
///<param name = "metric">A comma-separated list of metrics you wish returned. Leave empty to return all.</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("nodes.info", "node_id, metric")]
public Task<TResponse> InfoAsync<TResponse>(string nodeId, string metric, NodesInfoRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_nodes/{nodeId:nodeId}/{metric:metric}"), ctx, null, RequestParams(requestParameters));
///<summary>POST on /_nodes/reload_secure_settings <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings</para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse ReloadSecureSettingsForAll<TResponse>(ReloadSecureSettingsRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(POST, "_nodes/reload_secure_settings", null, RequestParams(requestParameters));
///<summary>POST on /_nodes/reload_secure_settings <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings</para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("nodes.reload_secure_settings", "")]
public Task<TResponse> ReloadSecureSettingsForAllAsync<TResponse>(ReloadSecureSettingsRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(POST, "_nodes/reload_secure_settings", ctx, null, RequestParams(requestParameters));
///<summary>POST on /_nodes/{node_id}/reload_secure_settings <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings</para></summary>
///<param name = "nodeId">A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes.</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse ReloadSecureSettings<TResponse>(string nodeId, ReloadSecureSettingsRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(POST, Url($"_nodes/{nodeId:nodeId}/reload_secure_settings"), null, RequestParams(requestParameters));
///<summary>POST on /_nodes/{node_id}/reload_secure_settings <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/secure-settings.html#reloadable-secure-settings</para></summary>
///<param name = "nodeId">A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes.</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("nodes.reload_secure_settings", "node_id")]
public Task<TResponse> ReloadSecureSettingsAsync<TResponse>(string nodeId, ReloadSecureSettingsRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(POST, Url($"_nodes/{nodeId:nodeId}/reload_secure_settings"), ctx, null, RequestParams(requestParameters));
///<summary>GET on /_nodes/stats <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html</para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse StatsForAll<TResponse>(NodesStatsRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, "_nodes/stats", null, RequestParams(requestParameters));
///<summary>GET on /_nodes/stats <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html</para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("nodes.stats", "")]
public Task<TResponse> StatsForAllAsync<TResponse>(NodesStatsRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, "_nodes/stats", ctx, null, RequestParams(requestParameters));
///<summary>GET on /_nodes/{node_id}/stats <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html</para></summary>
///<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're connecting to, leave empty to get information from all nodes</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse Stats<TResponse>(string nodeId, NodesStatsRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_nodes/{nodeId:nodeId}/stats"), null, RequestParams(requestParameters));
///<summary>GET on /_nodes/{node_id}/stats <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html</para></summary>
///<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're connecting to, leave empty to get information from all nodes</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("nodes.stats", "node_id")]
public Task<TResponse> StatsAsync<TResponse>(string nodeId, NodesStatsRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_nodes/{nodeId:nodeId}/stats"), ctx, null, RequestParams(requestParameters));
///<summary>GET on /_nodes/stats/{metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html</para></summary>
///<param name = "metric">Limit the information returned to the specified metrics</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse StatsForAll<TResponse>(string metric, NodesStatsRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_nodes/stats/{metric:metric}"), null, RequestParams(requestParameters));
///<summary>GET on /_nodes/stats/{metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html</para></summary>
///<param name = "metric">Limit the information returned to the specified metrics</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("nodes.stats", "metric")]
public Task<TResponse> StatsForAllAsync<TResponse>(string metric, NodesStatsRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_nodes/stats/{metric:metric}"), ctx, null, RequestParams(requestParameters));
///<summary>GET on /_nodes/{node_id}/stats/{metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html</para></summary>
///<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're connecting to, leave empty to get information from all nodes</param>
///<param name = "metric">Limit the information returned to the specified metrics</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse Stats<TResponse>(string nodeId, string metric, NodesStatsRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_nodes/{nodeId:nodeId}/stats/{metric:metric}"), null, RequestParams(requestParameters));
///<summary>GET on /_nodes/{node_id}/stats/{metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html</para></summary>
///<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're connecting to, leave empty to get information from all nodes</param>
///<param name = "metric">Limit the information returned to the specified metrics</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("nodes.stats", "node_id, metric")]
public Task<TResponse> StatsAsync<TResponse>(string nodeId, string metric, NodesStatsRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_nodes/{nodeId:nodeId}/stats/{metric:metric}"), ctx, null, RequestParams(requestParameters));
///<summary>GET on /_nodes/stats/{metric}/{index_metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html</para></summary>
///<param name = "metric">Limit the information returned to the specified metrics</param>
///<param name = "indexMetric">Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse StatsForAll<TResponse>(string metric, string indexMetric, NodesStatsRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_nodes/stats/{metric:metric}/{indexMetric:indexMetric}"), null, RequestParams(requestParameters));
///<summary>GET on /_nodes/stats/{metric}/{index_metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html</para></summary>
///<param name = "metric">Limit the information returned to the specified metrics</param>
///<param name = "indexMetric">Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("nodes.stats", "metric, index_metric")]
public Task<TResponse> StatsForAllAsync<TResponse>(string metric, string indexMetric, NodesStatsRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_nodes/stats/{metric:metric}/{indexMetric:indexMetric}"), ctx, null, RequestParams(requestParameters));
///<summary>GET on /_nodes/{node_id}/stats/{metric}/{index_metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html</para></summary>
///<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're connecting to, leave empty to get information from all nodes</param>
///<param name = "metric">Limit the information returned to the specified metrics</param>
///<param name = "indexMetric">Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse Stats<TResponse>(string nodeId, string metric, string indexMetric, NodesStatsRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_nodes/{nodeId:nodeId}/stats/{metric:metric}/{indexMetric:indexMetric}"), null, RequestParams(requestParameters));
///<summary>GET on /_nodes/{node_id}/stats/{metric}/{index_metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html</para></summary>
///<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're connecting to, leave empty to get information from all nodes</param>
///<param name = "metric">Limit the information returned to the specified metrics</param>
///<param name = "indexMetric">Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("nodes.stats", "node_id, metric, index_metric")]
public Task<TResponse> StatsAsync<TResponse>(string nodeId, string metric, string indexMetric, NodesStatsRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_nodes/{nodeId:nodeId}/stats/{metric:metric}/{indexMetric:indexMetric}"), ctx, null, RequestParams(requestParameters));
///<summary>GET on /_nodes/usage <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html</para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse UsageForAll<TResponse>(NodesUsageRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, "_nodes/usage", null, RequestParams(requestParameters));
///<summary>GET on /_nodes/usage <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html</para></summary>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("nodes.usage", "")]
public Task<TResponse> UsageForAllAsync<TResponse>(NodesUsageRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, "_nodes/usage", ctx, null, RequestParams(requestParameters));
///<summary>GET on /_nodes/{node_id}/usage <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html</para></summary>
///<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're connecting to, leave empty to get information from all nodes</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse Usage<TResponse>(string nodeId, NodesUsageRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_nodes/{nodeId:nodeId}/usage"), null, RequestParams(requestParameters));
///<summary>GET on /_nodes/{node_id}/usage <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html</para></summary>
///<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're connecting to, leave empty to get information from all nodes</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("nodes.usage", "node_id")]
public Task<TResponse> UsageAsync<TResponse>(string nodeId, NodesUsageRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_nodes/{nodeId:nodeId}/usage"), ctx, null, RequestParams(requestParameters));
///<summary>GET on /_nodes/usage/{metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html</para></summary>
///<param name = "metric">Limit the information returned to the specified metrics</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse UsageForAll<TResponse>(string metric, NodesUsageRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_nodes/usage/{metric:metric}"), null, RequestParams(requestParameters));
///<summary>GET on /_nodes/usage/{metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html</para></summary>
///<param name = "metric">Limit the information returned to the specified metrics</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("nodes.usage", "metric")]
public Task<TResponse> UsageForAllAsync<TResponse>(string metric, NodesUsageRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_nodes/usage/{metric:metric}"), ctx, null, RequestParams(requestParameters));
///<summary>GET on /_nodes/{node_id}/usage/{metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html</para></summary>
///<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're connecting to, leave empty to get information from all nodes</param>
///<param name = "metric">Limit the information returned to the specified metrics</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
public TResponse Usage<TResponse>(string nodeId, string metric, NodesUsageRequestParameters requestParameters = null)
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"_nodes/{nodeId:nodeId}/usage/{metric:metric}"), null, RequestParams(requestParameters));
///<summary>GET on /_nodes/{node_id}/usage/{metric} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html</para></summary>
///<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're connecting to, leave empty to get information from all nodes</param>
///<param name = "metric">Limit the information returned to the specified metrics</param>
///<param name = "requestParameters">Request specific configuration such as querystring parameters & request specific connection settings.</param>
[MapsApi("nodes.usage", "node_id, metric")]
public Task<TResponse> UsageAsync<TResponse>(string nodeId, string metric, NodesUsageRequestParameters requestParameters = null, CancellationToken ctx = default)
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_nodes/{nodeId:nodeId}/usage/{metric:metric}"), ctx, null, RequestParams(requestParameters));
}
}