Skip to content

Commit 0be5091

Browse files
[codegen] master synchronization (#5767)
Co-authored-by: Mpdreamz <Mpdreamz@users.noreply.github.com>
1 parent 24a5eb3 commit 0be5091

File tree

3 files changed

+116
-0
lines changed

3 files changed

+116
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"indices.disk_usage": {
3+
"documentation": {
4+
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-disk-usage.html",
5+
"description": "Analyzes the disk usage of each field of an index or data stream"
6+
},
7+
"stability": "experimental",
8+
"visibility": "public",
9+
"headers": {
10+
"accept": [
11+
"application/json"
12+
]
13+
},
14+
"url": {
15+
"paths": [
16+
{
17+
"path": "/{index}/_disk_usage",
18+
"methods": [
19+
"POST"
20+
],
21+
"parts": {
22+
"index": {
23+
"type": "string",
24+
"description": "Comma-separated list of indices or data streams to analyze the disk usage"
25+
}
26+
}
27+
}
28+
]
29+
},
30+
"params": {
31+
"run_expensive_tasks": {
32+
"type": "boolean",
33+
"description": "Must be set to [true] in order for the task to be performed. Defaults to false."
34+
},
35+
"flush": {
36+
"type": "boolean",
37+
"description": "Whether flush or not before analyzing the index disk usage. Defaults to true"
38+
},
39+
"ignore_unavailable": {
40+
"type": "boolean",
41+
"description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
42+
},
43+
"allow_no_indices": {
44+
"type": "boolean",
45+
"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)"
46+
},
47+
"expand_wildcards": {
48+
"type": "enum",
49+
"options": [
50+
"open",
51+
"closed",
52+
"hidden",
53+
"none",
54+
"all"
55+
],
56+
"default": "open",
57+
"description": "Whether to expand wildcard expression to concrete indices that are open, closed or both."
58+
}
59+
}
60+
}
61+
}

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

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,48 @@ public TimeSpan Timeout
357357
}
358358
}
359359

360+
///<summary>Request options for DiskUsage <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-disk-usage.html</para></summary>
361+
public class DiskUsageRequestParameters : RequestParameters<DiskUsageRequestParameters>
362+
{
363+
///<summary>
364+
/// Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have
365+
/// been specified)
366+
///</summary>
367+
public bool? AllowNoIndices
368+
{
369+
get => Q<bool? >("allow_no_indices");
370+
set => Q("allow_no_indices", value);
371+
}
372+
373+
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
374+
public ExpandWildcards? ExpandWildcards
375+
{
376+
get => Q<ExpandWildcards? >("expand_wildcards");
377+
set => Q("expand_wildcards", value);
378+
}
379+
380+
///<summary>Whether flush or not before analyzing the index disk usage. Defaults to true</summary>
381+
public bool? Flush
382+
{
383+
get => Q<bool? >("flush");
384+
set => Q("flush", value);
385+
}
386+
387+
///<summary>Whether specified concrete indices should be ignored when unavailable (missing or closed)</summary>
388+
public bool? IgnoreUnavailable
389+
{
390+
get => Q<bool? >("ignore_unavailable");
391+
set => Q("ignore_unavailable", value);
392+
}
393+
394+
///<summary>Must be set to [true] in order for the task to be performed. Defaults to false.</summary>
395+
public bool? RunExpensiveTasks
396+
{
397+
get => Q<bool? >("run_expensive_tasks");
398+
set => Q("run_expensive_tasks", value);
399+
}
400+
}
401+
360402
///<summary>Request options for Exists <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html</para></summary>
361403
public class IndexExistsRequestParameters : RequestParameters<IndexExistsRequestParameters>
362404
{

src/Elasticsearch.Net/ElasticLowLevelClient.Indices.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,19 @@ public TResponse DeleteTemplateForAll<TResponse>(string name, DeleteIndexTemplat
231231
[MapsApi("indices.delete_template", "name")]
232232
public Task<TResponse> DeleteTemplateForAllAsync<TResponse>(string name, DeleteIndexTemplateRequestParameters requestParameters = null, CancellationToken ctx = default)
233233
where TResponse : class, ITransportResponse, new() => DoRequestAsync<TResponse>(DELETE, Url($"_template/{name:name}"), ctx, null, RequestParams(requestParameters));
234+
///<summary>POST on /{index}/_disk_usage <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-disk-usage.html</para></summary>
235+
///<param name = "index">Comma-separated list of indices or data streams to analyze the disk usage</param>
236+
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
237+
///<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>
238+
public TResponse DiskUsage<TResponse>(string index, DiskUsageRequestParameters requestParameters = null)
239+
where TResponse : class, ITransportResponse, new() => DoRequest<TResponse>(POST, Url($"{index:index}/_disk_usage"), null, RequestParams(requestParameters));
240+
///<summary>POST on /{index}/_disk_usage <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-disk-usage.html</para></summary>
241+
///<param name = "index">Comma-separated list of indices or data streams to analyze the disk usage</param>
242+
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
243+
///<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>
244+
[MapsApi("indices.disk_usage", "index")]
245+
public Task<TResponse> DiskUsageAsync<TResponse>(string index, DiskUsageRequestParameters requestParameters = null, CancellationToken ctx = default)
246+
where TResponse : class, ITransportResponse, new() => DoRequestAsync<TResponse>(POST, Url($"{index:index}/_disk_usage"), ctx, null, RequestParams(requestParameters));
234247
///<summary>HEAD on /{index} <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html</para></summary>
235248
///<param name = "index">A comma-separated list of index names</param>
236249
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>

0 commit comments

Comments
 (0)