Skip to content

Commit 7d709a3

Browse files
Add node APIs (#6209) (#6210)
Co-authored-by: Steve Gordon <sgordon@hotmail.co.uk>
1 parent b501237 commit 7d709a3

File tree

148 files changed

+7950
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+7950
-0
lines changed

src/Elastic.Clients.Elasticsearch/_Generated/Api/ApiUrlsLookup.g.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ internal static class ApiUrlsLookups
5959
internal static ApiUrls IndexManagementExists = new ApiUrls(new[] { "/{index}" });
6060
internal static ApiUrls IndexManagementRefresh = new ApiUrls(new[] { "/_refresh", "/{index}/_refresh" });
6161
internal static ApiUrls NoNamespaceIndex = new ApiUrls(new[] { "/{index}/_doc/{id}", "/{index}/_doc" });
62+
internal static ApiUrls NodesHotThreads = new ApiUrls(new[] { "/_nodes/hot_threads", "/_nodes/{node_id}/hot_threads" });
63+
internal static ApiUrls NodesInfo = new ApiUrls(new[] { "/_nodes", "/_nodes/{node_id}", "/_nodes/{metric}", "/_nodes/{node_id}/{metric}" });
64+
internal static ApiUrls NodesReloadSecureSettings = new ApiUrls(new[] { "/_nodes/reload_secure_settings", "/_nodes/{node_id}/reload_secure_settings" });
65+
internal static ApiUrls NodesStats = new ApiUrls(new[] { "/_nodes/stats", "/_nodes/{node_id}/stats", "/_nodes/stats/{metric}", "/_nodes/{node_id}/stats/{metric}", "/_nodes/stats/{metric}/{index_metric}", "/_nodes/{node_id}/stats/{metric}/{index_metric}" });
66+
internal static ApiUrls NodesUsage = new ApiUrls(new[] { "/_nodes/usage", "/_nodes/{node_id}/usage", "/_nodes/usage/{metric}", "/_nodes/{node_id}/usage/{metric}" });
6267
internal static ApiUrls NoNamespaceOpenPointInTime = new ApiUrls(new[] { "/{index}/_pit" });
6368
internal static ApiUrls NoNamespacePing = new ApiUrls(new[] { "/" });
6469
internal static ApiUrls NoNamespaceSearch = new ApiUrls(new[] { "/_search", "/{index}/_search" });
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information.
4+
//
5+
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
6+
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
7+
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
8+
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
9+
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
10+
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
11+
// ------------------------------------------------
12+
//
13+
// This file is automatically generated.
14+
// Please do not edit these files manually.
15+
//
16+
// ------------------------------------------------
17+
18+
using Elastic.Transport;
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Linq.Expressions;
22+
using System.Text.Json;
23+
using System.Text.Json.Serialization;
24+
25+
#nullable restore
26+
namespace Elastic.Clients.Elasticsearch.Nodes
27+
{
28+
public class NodesHotThreadsRequestParameters : RequestParameters<NodesHotThreadsRequestParameters>
29+
{
30+
[JsonIgnore]
31+
public bool? IgnoreIdleThreads { get => Q<bool?>("ignore_idle_threads"); set => Q("ignore_idle_threads", value); }
32+
33+
[JsonIgnore]
34+
public Elastic.Clients.Elasticsearch.Time? Interval { get => Q<Elastic.Clients.Elasticsearch.Time?>("interval"); set => Q("interval", value); }
35+
36+
[JsonIgnore]
37+
public long? Snapshots { get => Q<long?>("snapshots"); set => Q("snapshots", value); }
38+
39+
[JsonIgnore]
40+
public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Time?>("master_timeout"); set => Q("master_timeout", value); }
41+
42+
[JsonIgnore]
43+
public long? Threads { get => Q<long?>("threads"); set => Q("threads", value); }
44+
45+
[JsonIgnore]
46+
public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q<Elastic.Clients.Elasticsearch.Time?>("timeout"); set => Q("timeout", value); }
47+
48+
[JsonIgnore]
49+
public Elastic.Clients.Elasticsearch.ThreadType? Type { get => Q<Elastic.Clients.Elasticsearch.ThreadType?>("type"); set => Q("type", value); }
50+
51+
[JsonIgnore]
52+
public Elastic.Clients.Elasticsearch.ThreadType? Sort { get => Q<Elastic.Clients.Elasticsearch.ThreadType?>("sort"); set => Q("sort", value); }
53+
}
54+
55+
public partial class NodesHotThreadsRequest : PlainRequestBase<NodesHotThreadsRequestParameters>
56+
{
57+
public NodesHotThreadsRequest()
58+
{
59+
}
60+
61+
public NodesHotThreadsRequest(Elastic.Clients.Elasticsearch.NodeIds? node_id) : base(r => r.Optional("node_id", node_id))
62+
{
63+
}
64+
65+
internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesHotThreads;
66+
protected override HttpMethod HttpMethod => HttpMethod.GET;
67+
protected override bool SupportsBody => false;
68+
[JsonIgnore]
69+
public bool? IgnoreIdleThreads { get => Q<bool?>("ignore_idle_threads"); set => Q("ignore_idle_threads", value); }
70+
71+
[JsonIgnore]
72+
public Elastic.Clients.Elasticsearch.Time? Interval { get => Q<Elastic.Clients.Elasticsearch.Time?>("interval"); set => Q("interval", value); }
73+
74+
[JsonIgnore]
75+
public long? Snapshots { get => Q<long?>("snapshots"); set => Q("snapshots", value); }
76+
77+
[JsonIgnore]
78+
public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Time?>("master_timeout"); set => Q("master_timeout", value); }
79+
80+
[JsonIgnore]
81+
public long? Threads { get => Q<long?>("threads"); set => Q("threads", value); }
82+
83+
[JsonIgnore]
84+
public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q<Elastic.Clients.Elasticsearch.Time?>("timeout"); set => Q("timeout", value); }
85+
86+
[JsonIgnore]
87+
public Elastic.Clients.Elasticsearch.ThreadType? Type { get => Q<Elastic.Clients.Elasticsearch.ThreadType?>("type"); set => Q("type", value); }
88+
89+
[JsonIgnore]
90+
public Elastic.Clients.Elasticsearch.ThreadType? Sort { get => Q<Elastic.Clients.Elasticsearch.ThreadType?>("sort"); set => Q("sort", value); }
91+
}
92+
93+
public sealed partial class NodesHotThreadsRequestDescriptor : RequestDescriptorBase<NodesHotThreadsRequestDescriptor, NodesHotThreadsRequestParameters>
94+
{
95+
internal NodesHotThreadsRequestDescriptor(Action<NodesHotThreadsRequestDescriptor> configure) => configure.Invoke(this);
96+
public NodesHotThreadsRequestDescriptor()
97+
{
98+
}
99+
100+
internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesHotThreads;
101+
protected override HttpMethod HttpMethod => HttpMethod.GET;
102+
protected override bool SupportsBody => false;
103+
public NodesHotThreadsRequestDescriptor IgnoreIdleThreads(bool? ignoreIdleThreads = true) => Qs("ignore_idle_threads", ignoreIdleThreads);
104+
public NodesHotThreadsRequestDescriptor Interval(Elastic.Clients.Elasticsearch.Time? interval) => Qs("interval", interval);
105+
public NodesHotThreadsRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout);
106+
public NodesHotThreadsRequestDescriptor Snapshots(long? snapshots) => Qs("snapshots", snapshots);
107+
public NodesHotThreadsRequestDescriptor Sort(Elastic.Clients.Elasticsearch.ThreadType? sort) => Qs("sort", sort);
108+
public NodesHotThreadsRequestDescriptor Threads(long? threads) => Qs("threads", threads);
109+
public NodesHotThreadsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout);
110+
public NodesHotThreadsRequestDescriptor Type(Elastic.Clients.Elasticsearch.ThreadType? type) => Qs("type", type);
111+
public NodesHotThreadsRequestDescriptor NodeId(Elastic.Clients.Elasticsearch.NodeIds? node_id)
112+
{
113+
RouteValues.Optional("node_id", node_id);
114+
return Self;
115+
}
116+
117+
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
118+
{
119+
}
120+
}
121+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information.
4+
//
5+
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
6+
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
7+
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
8+
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
9+
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
10+
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
11+
// ------------------------------------------------
12+
//
13+
// This file is automatically generated.
14+
// Please do not edit these files manually.
15+
//
16+
// ------------------------------------------------
17+
18+
using Elastic.Transport.Products.Elasticsearch;
19+
using System.Collections.Generic;
20+
using System.Text.Json.Serialization;
21+
22+
#nullable restore
23+
namespace Elastic.Clients.Elasticsearch.Nodes
24+
{
25+
public partial class NodesHotThreadsResponse : ElasticsearchResponseBase
26+
{
27+
[JsonInclude]
28+
[JsonPropertyName("hot_threads")]
29+
public IReadOnlyCollection<Elastic.Clients.Elasticsearch.Nodes.HotThreads.HotThread> HotThreads { get; init; }
30+
}
31+
}
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information.
4+
//
5+
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
6+
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
7+
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
8+
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
9+
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
10+
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
11+
// ------------------------------------------------
12+
//
13+
// This file is automatically generated.
14+
// Please do not edit these files manually.
15+
//
16+
// ------------------------------------------------
17+
18+
using Elastic.Transport;
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Linq.Expressions;
22+
using System.Text.Json;
23+
using System.Text.Json.Serialization;
24+
25+
#nullable restore
26+
namespace Elastic.Clients.Elasticsearch.Nodes
27+
{
28+
public class NodesInfoRequestParameters : RequestParameters<NodesInfoRequestParameters>
29+
{
30+
[JsonIgnore]
31+
public bool? FlatSettings { get => Q<bool?>("flat_settings"); set => Q("flat_settings", value); }
32+
33+
[JsonIgnore]
34+
public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Time?>("master_timeout"); set => Q("master_timeout", value); }
35+
36+
[JsonIgnore]
37+
public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q<Elastic.Clients.Elasticsearch.Time?>("timeout"); set => Q("timeout", value); }
38+
}
39+
40+
public partial class NodesInfoRequest : PlainRequestBase<NodesInfoRequestParameters>
41+
{
42+
public NodesInfoRequest()
43+
{
44+
}
45+
46+
public NodesInfoRequest(Elastic.Clients.Elasticsearch.NodeIds? node_id) : base(r => r.Optional("node_id", node_id))
47+
{
48+
}
49+
50+
public NodesInfoRequest(Elastic.Clients.Elasticsearch.Metrics? metric) : base(r => r.Optional("metric", metric))
51+
{
52+
}
53+
54+
public NodesInfoRequest(Elastic.Clients.Elasticsearch.NodeIds? node_id, Elastic.Clients.Elasticsearch.Metrics? metric) : base(r => r.Optional("node_id", node_id).Optional("metric", metric))
55+
{
56+
}
57+
58+
internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesInfo;
59+
protected override HttpMethod HttpMethod => HttpMethod.GET;
60+
protected override bool SupportsBody => false;
61+
[JsonIgnore]
62+
public bool? FlatSettings { get => Q<bool?>("flat_settings"); set => Q("flat_settings", value); }
63+
64+
[JsonIgnore]
65+
public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Time?>("master_timeout"); set => Q("master_timeout", value); }
66+
67+
[JsonIgnore]
68+
public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q<Elastic.Clients.Elasticsearch.Time?>("timeout"); set => Q("timeout", value); }
69+
}
70+
71+
public sealed partial class NodesInfoRequestDescriptor : RequestDescriptorBase<NodesInfoRequestDescriptor, NodesInfoRequestParameters>
72+
{
73+
internal NodesInfoRequestDescriptor(Action<NodesInfoRequestDescriptor> configure) => configure.Invoke(this);
74+
public NodesInfoRequestDescriptor()
75+
{
76+
}
77+
78+
public NodesInfoRequestDescriptor(Elastic.Clients.Elasticsearch.Metrics? metric) : base(r => r.Optional("metric", metric))
79+
{
80+
}
81+
82+
public NodesInfoRequestDescriptor(Elastic.Clients.Elasticsearch.NodeIds? node_id, Elastic.Clients.Elasticsearch.Metrics? metric) : base(r => r.Optional("node_id", node_id).Optional("metric", metric))
83+
{
84+
}
85+
86+
internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesInfo;
87+
protected override HttpMethod HttpMethod => HttpMethod.GET;
88+
protected override bool SupportsBody => false;
89+
public NodesInfoRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings);
90+
public NodesInfoRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout);
91+
public NodesInfoRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout);
92+
public NodesInfoRequestDescriptor NodeId(Elastic.Clients.Elasticsearch.NodeIds? node_id)
93+
{
94+
RouteValues.Optional("node_id", node_id);
95+
return Self;
96+
}
97+
98+
public NodesInfoRequestDescriptor Metric(Elastic.Clients.Elasticsearch.Metrics? metric)
99+
{
100+
RouteValues.Optional("metric", metric);
101+
return Self;
102+
}
103+
104+
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
105+
{
106+
}
107+
}
108+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information.
4+
//
5+
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
6+
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
7+
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
8+
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
9+
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
10+
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
11+
// ------------------------------------------------
12+
//
13+
// This file is automatically generated.
14+
// Please do not edit these files manually.
15+
//
16+
// ------------------------------------------------
17+
18+
using Elastic.Transport.Products.Elasticsearch;
19+
using System.Collections.Generic;
20+
using System.Text.Json.Serialization;
21+
22+
#nullable restore
23+
namespace Elastic.Clients.Elasticsearch.Nodes
24+
{
25+
public partial class NodesInfoResponse : ElasticsearchResponseBase
26+
{
27+
[JsonInclude]
28+
[JsonPropertyName("cluster_name")]
29+
public string ClusterName { get; init; }
30+
31+
[JsonInclude]
32+
[JsonPropertyName("nodes")]
33+
public Dictionary<string, Elastic.Clients.Elasticsearch.Nodes.Info.NodeInfo> Nodes { get; init; }
34+
35+
[JsonInclude]
36+
[JsonPropertyName("_nodes")]
37+
public Elastic.Clients.Elasticsearch.NodeStatistics? NodeStats { get; init; }
38+
}
39+
}

0 commit comments

Comments
 (0)