Skip to content

Commit 3ff051a

Browse files
Add remaining Cluster APIs (#6302) (#6303)
Co-authored-by: Steve Gordon <sgordon@hotmail.co.uk>
1 parent fee0892 commit 3ff051a

File tree

54 files changed

+3275
-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.

54 files changed

+3275
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,19 @@ internal static class ApiUrlsLookups
4444
internal static ApiUrls NoNamespaceClosePointInTime = new ApiUrls(new[] { "/_pit" });
4545
internal static ApiUrls ClusterAllocationExplain = new ApiUrls(new[] { "/_cluster/allocation/explain" });
4646
internal static ApiUrls ClusterDeleteComponentTemplate = new ApiUrls(new[] { "/_component_template/{name}" });
47+
internal static ApiUrls ClusterDeleteVotingConfigExclusions = new ApiUrls(new[] { "/_cluster/voting_config_exclusions" });
4748
internal static ApiUrls ClusterExistsComponentTemplate = new ApiUrls(new[] { "/_component_template/{name}" });
4849
internal static ApiUrls ClusterGetComponentTemplate = new ApiUrls(new[] { "/_component_template", "/_component_template/{name}" });
50+
internal static ApiUrls ClusterGetSettings = new ApiUrls(new[] { "/_cluster/settings" });
4951
internal static ApiUrls ClusterHealth = new ApiUrls(new[] { "/_cluster/health", "/_cluster/health/{index}" });
5052
internal static ApiUrls ClusterPendingTasks = new ApiUrls(new[] { "/_cluster/pending_tasks" });
53+
internal static ApiUrls ClusterPostVotingConfigExclusions = new ApiUrls(new[] { "/_cluster/voting_config_exclusions" });
5154
internal static ApiUrls ClusterPutComponentTemplate = new ApiUrls(new[] { "/_component_template/{name}" });
55+
internal static ApiUrls ClusterPutSettings = new ApiUrls(new[] { "/_cluster/settings" });
56+
internal static ApiUrls ClusterRemoteInfo = new ApiUrls(new[] { "/_remote/info" });
57+
internal static ApiUrls ClusterReroute = new ApiUrls(new[] { "/_cluster/reroute" });
5258
internal static ApiUrls ClusterState = new ApiUrls(new[] { "/_cluster/state", "/_cluster/state/{metric}", "/_cluster/state/{metric}/{index}" });
59+
internal static ApiUrls ClusterStats = new ApiUrls(new[] { "/_cluster/stats", "/_cluster/stats/nodes/{node_id}" });
5360
internal static ApiUrls NoNamespaceCount = new ApiUrls(new[] { "/_count", "/{index}/_count" });
5461
internal static ApiUrls NoNamespaceCreate = new ApiUrls(new[] { "/{index}/_create/{id}" });
5562
internal static ApiUrls NoNamespaceDeleteByQuery = new ApiUrls(new[] { "/{index}/_delete_by_query" });
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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.Cluster
27+
{
28+
public class ClusterDeleteVotingConfigExclusionsRequestParameters : RequestParameters<ClusterDeleteVotingConfigExclusionsRequestParameters>
29+
{
30+
[JsonIgnore]
31+
public bool? WaitForRemoval { get => Q<bool?>("wait_for_removal"); set => Q("wait_for_removal", value); }
32+
}
33+
34+
public partial class ClusterDeleteVotingConfigExclusionsRequest : PlainRequestBase<ClusterDeleteVotingConfigExclusionsRequestParameters>
35+
{
36+
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterDeleteVotingConfigExclusions;
37+
protected override HttpMethod HttpMethod => HttpMethod.DELETE;
38+
protected override bool SupportsBody => false;
39+
[JsonIgnore]
40+
public bool? WaitForRemoval { get => Q<bool?>("wait_for_removal"); set => Q("wait_for_removal", value); }
41+
}
42+
43+
public sealed partial class ClusterDeleteVotingConfigExclusionsRequestDescriptor : RequestDescriptorBase<ClusterDeleteVotingConfigExclusionsRequestDescriptor, ClusterDeleteVotingConfigExclusionsRequestParameters>
44+
{
45+
internal ClusterDeleteVotingConfigExclusionsRequestDescriptor(Action<ClusterDeleteVotingConfigExclusionsRequestDescriptor> configure) => configure.Invoke(this);
46+
public ClusterDeleteVotingConfigExclusionsRequestDescriptor()
47+
{
48+
}
49+
50+
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterDeleteVotingConfigExclusions;
51+
protected override HttpMethod HttpMethod => HttpMethod.DELETE;
52+
protected override bool SupportsBody => false;
53+
public ClusterDeleteVotingConfigExclusionsRequestDescriptor WaitForRemoval(bool? waitForRemoval = true) => Qs("wait_for_removal", waitForRemoval);
54+
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
55+
{
56+
}
57+
}
58+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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.Cluster
24+
{
25+
public partial class ClusterDeleteVotingConfigExclusionsResponse : ElasticsearchResponseBase
26+
{
27+
}
28+
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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.Cluster
27+
{
28+
public class ClusterGetSettingsRequestParameters : RequestParameters<ClusterGetSettingsRequestParameters>
29+
{
30+
[JsonIgnore]
31+
public bool? FlatSettings { get => Q<bool?>("flat_settings"); set => Q("flat_settings", value); }
32+
33+
[JsonIgnore]
34+
public bool? IncludeDefaults { get => Q<bool?>("include_defaults"); set => Q("include_defaults", value); }
35+
36+
[JsonIgnore]
37+
public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Time?>("master_timeout"); set => Q("master_timeout", value); }
38+
39+
[JsonIgnore]
40+
public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q<Elastic.Clients.Elasticsearch.Time?>("timeout"); set => Q("timeout", value); }
41+
}
42+
43+
public partial class ClusterGetSettingsRequest : PlainRequestBase<ClusterGetSettingsRequestParameters>
44+
{
45+
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterGetSettings;
46+
protected override HttpMethod HttpMethod => HttpMethod.GET;
47+
protected override bool SupportsBody => false;
48+
[JsonIgnore]
49+
public bool? FlatSettings { get => Q<bool?>("flat_settings"); set => Q("flat_settings", value); }
50+
51+
[JsonIgnore]
52+
public bool? IncludeDefaults { get => Q<bool?>("include_defaults"); set => Q("include_defaults", value); }
53+
54+
[JsonIgnore]
55+
public Elastic.Clients.Elasticsearch.Time? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Time?>("master_timeout"); set => Q("master_timeout", value); }
56+
57+
[JsonIgnore]
58+
public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q<Elastic.Clients.Elasticsearch.Time?>("timeout"); set => Q("timeout", value); }
59+
}
60+
61+
public sealed partial class ClusterGetSettingsRequestDescriptor : RequestDescriptorBase<ClusterGetSettingsRequestDescriptor, ClusterGetSettingsRequestParameters>
62+
{
63+
internal ClusterGetSettingsRequestDescriptor(Action<ClusterGetSettingsRequestDescriptor> configure) => configure.Invoke(this);
64+
public ClusterGetSettingsRequestDescriptor()
65+
{
66+
}
67+
68+
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterGetSettings;
69+
protected override HttpMethod HttpMethod => HttpMethod.GET;
70+
protected override bool SupportsBody => false;
71+
public ClusterGetSettingsRequestDescriptor FlatSettings(bool? flatSettings = true) => Qs("flat_settings", flatSettings);
72+
public ClusterGetSettingsRequestDescriptor IncludeDefaults(bool? includeDefaults = true) => Qs("include_defaults", includeDefaults);
73+
public ClusterGetSettingsRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Time? masterTimeout) => Qs("master_timeout", masterTimeout);
74+
public ClusterGetSettingsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout);
75+
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
76+
{
77+
}
78+
}
79+
}
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.Cluster
24+
{
25+
public partial class ClusterGetSettingsResponse : ElasticsearchResponseBase
26+
{
27+
[JsonInclude]
28+
[JsonPropertyName("defaults")]
29+
public Dictionary<string, object>? Defaults { get; init; }
30+
31+
[JsonInclude]
32+
[JsonPropertyName("persistent")]
33+
public Dictionary<string, object> Persistent { get; init; }
34+
35+
[JsonInclude]
36+
[JsonPropertyName("transient")]
37+
public Dictionary<string, object> Transient { get; init; }
38+
}
39+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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.Cluster
27+
{
28+
public class ClusterPostVotingConfigExclusionsRequestParameters : RequestParameters<ClusterPostVotingConfigExclusionsRequestParameters>
29+
{
30+
[JsonIgnore]
31+
public Elastic.Clients.Elasticsearch.Names? NodeNames { get => Q<Elastic.Clients.Elasticsearch.Names?>("node_names"); set => Q("node_names", value); }
32+
33+
[JsonIgnore]
34+
public Elastic.Clients.Elasticsearch.Ids? NodeIds { get => Q<Elastic.Clients.Elasticsearch.Ids?>("node_ids"); set => Q("node_ids", 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 ClusterPostVotingConfigExclusionsRequest : PlainRequestBase<ClusterPostVotingConfigExclusionsRequestParameters>
41+
{
42+
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterPostVotingConfigExclusions;
43+
protected override HttpMethod HttpMethod => HttpMethod.POST;
44+
protected override bool SupportsBody => false;
45+
[JsonIgnore]
46+
public Elastic.Clients.Elasticsearch.Names? NodeNames { get => Q<Elastic.Clients.Elasticsearch.Names?>("node_names"); set => Q("node_names", value); }
47+
48+
[JsonIgnore]
49+
public Elastic.Clients.Elasticsearch.Ids? NodeIds { get => Q<Elastic.Clients.Elasticsearch.Ids?>("node_ids"); set => Q("node_ids", value); }
50+
51+
[JsonIgnore]
52+
public Elastic.Clients.Elasticsearch.Time? Timeout { get => Q<Elastic.Clients.Elasticsearch.Time?>("timeout"); set => Q("timeout", value); }
53+
}
54+
55+
public sealed partial class ClusterPostVotingConfigExclusionsRequestDescriptor : RequestDescriptorBase<ClusterPostVotingConfigExclusionsRequestDescriptor, ClusterPostVotingConfigExclusionsRequestParameters>
56+
{
57+
internal ClusterPostVotingConfigExclusionsRequestDescriptor(Action<ClusterPostVotingConfigExclusionsRequestDescriptor> configure) => configure.Invoke(this);
58+
public ClusterPostVotingConfigExclusionsRequestDescriptor()
59+
{
60+
}
61+
62+
internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterPostVotingConfigExclusions;
63+
protected override HttpMethod HttpMethod => HttpMethod.POST;
64+
protected override bool SupportsBody => false;
65+
public ClusterPostVotingConfigExclusionsRequestDescriptor NodeIds(Elastic.Clients.Elasticsearch.Ids? nodeIds) => Qs("node_ids", nodeIds);
66+
public ClusterPostVotingConfigExclusionsRequestDescriptor NodeNames(Elastic.Clients.Elasticsearch.Names? nodeNames) => Qs("node_names", nodeNames);
67+
public ClusterPostVotingConfigExclusionsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Time? timeout) => Qs("timeout", timeout);
68+
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
69+
{
70+
}
71+
}
72+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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.Cluster
24+
{
25+
public partial class ClusterPostVotingConfigExclusionsResponse : ElasticsearchResponseBase
26+
{
27+
}
28+
}

0 commit comments

Comments
 (0)