Skip to content

Commit dd5e786

Browse files
authored
Final code-gen for API changes (#5444)
1 parent 5898d79 commit dd5e786

File tree

8 files changed

+115
-27
lines changed

8 files changed

+115
-27
lines changed

src/ApiGenerator/RestSpecification/Core/snapshot.get_features.json renamed to src/ApiGenerator/RestSpecification/Core/features.get_features.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"snapshot.get_features":{
2+
"features.get_features":{
33
"documentation":{
4-
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html",
5-
"description":"Returns a list of features which can be snapshotted in this cluster."
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html",
5+
"description":"Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot"
66
},
77
"stability":"stable",
88
"visibility":"public",
@@ -12,7 +12,7 @@
1212
"url":{
1313
"paths":[
1414
{
15-
"path":"/_snapshottable_features",
15+
"path":"/_features",
1616
"methods":[
1717
"GET"
1818
]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
61c3b8cb7bf3e410ee21657756f079ea035d15f5
1+
31117358596113f881de5b58d75ebd2a4388a82b
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
2+
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
3+
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
4+
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
5+
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
6+
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
7+
// -----------------------------------------------
8+
//
9+
// This file is automatically generated
10+
// Please do not edit these files manually
11+
// Run the following in the root of the repos:
12+
//
13+
// *NIX : ./build.sh codegen
14+
// Windows : build.bat codegen
15+
//
16+
// -----------------------------------------------
17+
// ReSharper disable RedundantUsingDirective
18+
using System;
19+
using System.Collections.Generic;
20+
using System.Linq;
21+
using System.Text;
22+
using System.Linq.Expressions;
23+
24+
// ReSharper disable once CheckNamespace
25+
namespace Elasticsearch.Net.Specification.FeaturesApi
26+
{
27+
///<summary>Request options for Get <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html</para></summary>
28+
public class GetFeaturesRequestParameters : RequestParameters<GetFeaturesRequestParameters>
29+
{
30+
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
31+
public override bool SupportsBody => false;
32+
///<summary>Explicit operation timeout for connection to master node</summary>
33+
public TimeSpan MasterTimeout
34+
{
35+
get => Q<TimeSpan>("master_timeout");
36+
set => Q("master_timeout", value);
37+
}
38+
}
39+
}

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -164,19 +164,6 @@ public bool? Verbose
164164
}
165165
}
166166

167-
///<summary>Request options for GetFeatures <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
168-
public class GetFeaturesRequestParameters : RequestParameters<GetFeaturesRequestParameters>
169-
{
170-
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
171-
public override bool SupportsBody => false;
172-
///<summary>Explicit operation timeout for connection to master node</summary>
173-
public TimeSpan MasterTimeout
174-
{
175-
get => Q<TimeSpan>("master_timeout");
176-
set => Q("master_timeout", value);
177-
}
178-
}
179-
180167
///<summary>Request options for GetRepository <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
181168
public class GetRepositoryRequestParameters : RequestParameters<GetRepositoryRequestParameters>
182169
{
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
2+
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
3+
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
4+
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
5+
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
6+
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
7+
// -----------------------------------------------
8+
//
9+
// This file is automatically generated
10+
// Please do not edit these files manually
11+
// Run the following in the root of the repos:
12+
//
13+
// *NIX : ./build.sh codegen
14+
// Windows : build.bat codegen
15+
//
16+
// -----------------------------------------------
17+
// ReSharper disable RedundantUsingDirective
18+
using System;
19+
using System.Collections.Generic;
20+
using System.Collections.Specialized;
21+
using System.Linq;
22+
using System.Text;
23+
using System.Threading;
24+
using System.Threading.Tasks;
25+
using Elasticsearch.Net;
26+
using static Elasticsearch.Net.HttpMethod;
27+
28+
// ReSharper disable InterpolatedStringExpressionIsNotIFormattable
29+
// ReSharper disable once CheckNamespace
30+
// ReSharper disable InterpolatedStringExpressionIsNotIFormattable
31+
// ReSharper disable RedundantExtendsListEntry
32+
namespace Elasticsearch.Net.Specification.FeaturesApi
33+
{
34+
///<summary>
35+
/// Features APIs.
36+
/// <para>Not intended to be instantiated directly. Use the <see cref = "IElasticLowLevelClient.Features"/> property
37+
/// on <see cref = "IElasticLowLevelClient"/>.
38+
///</para>
39+
///</summary>
40+
public partial class LowLevelFeaturesNamespace : NamespacedClientProxy
41+
{
42+
internal LowLevelFeaturesNamespace(ElasticLowLevelClient client): base(client)
43+
{
44+
}
45+
46+
///<summary>GET on /_features <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html</para></summary>
47+
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
48+
public TResponse Get<TResponse>(GetFeaturesRequestParameters requestParameters = null)
49+
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, "_features", null, RequestParams(requestParameters));
50+
///<summary>GET on /_features <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/get-features-api.html</para></summary>
51+
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
52+
[MapsApi("features.get_features", "")]
53+
public Task<TResponse> GetAsync<TResponse>(GetFeaturesRequestParameters requestParameters = null, CancellationToken ctx = default)
54+
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, "_features", ctx, null, RequestParams(requestParameters));
55+
}
56+
}

src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
using Elasticsearch.Net.Specification.DanglingIndicesApi;
3232
using Elasticsearch.Net.Specification.EnrichApi;
3333
using Elasticsearch.Net.Specification.EqlApi;
34+
using Elasticsearch.Net.Specification.FeaturesApi;
3435
using Elasticsearch.Net.Specification.GraphApi;
3536
using Elasticsearch.Net.Specification.IndexLifecycleManagementApi;
3637
using Elasticsearch.Net.Specification.IndicesApi;
@@ -110,6 +111,12 @@ public LowLevelEqlNamespace Eql
110111
private set;
111112
}
112113

114+
public LowLevelFeaturesNamespace Features
115+
{
116+
get;
117+
private set;
118+
}
119+
113120
public LowLevelGraphNamespace Graph
114121
{
115122
get;
@@ -240,6 +247,7 @@ partial void SetupNamespaces()
240247
DanglingIndices = new LowLevelDanglingIndicesNamespace(this);
241248
Enrich = new LowLevelEnrichNamespace(this);
242249
Eql = new LowLevelEqlNamespace(this);
250+
Features = new LowLevelFeaturesNamespace(this);
243251
Graph = new LowLevelGraphNamespace(this);
244252
IndexLifecycleManagement = new LowLevelIndexLifecycleManagementNamespace(this);
245253
Indices = new LowLevelIndicesNamespace(this);

src/Elasticsearch.Net/ElasticLowLevelClient.Snapshot.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,6 @@ public TResponse Get<TResponse>(string repository, string snapshot, GetSnapshotR
138138
[MapsApi("snapshot.get", "repository, snapshot")]
139139
public Task<TResponse> GetAsync<TResponse>(string repository, string snapshot, GetSnapshotRequestParameters requestParameters = null, CancellationToken ctx = default)
140140
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_snapshot/{repository:repository}/{snapshot:snapshot}"), ctx, null, RequestParams(requestParameters));
141-
///<summary>GET on /_snapshottable_features <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
142-
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
143-
public TResponse GetFeatures<TResponse>(GetFeaturesRequestParameters requestParameters = null)
144-
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, "_snapshottable_features", null, RequestParams(requestParameters));
145-
///<summary>GET on /_snapshottable_features <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
146-
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
147-
[MapsApi("snapshot.get_features", "")]
148-
public Task<TResponse> GetFeaturesAsync<TResponse>(GetFeaturesRequestParameters requestParameters = null, CancellationToken ctx = default)
149-
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, "_snapshottable_features", ctx, null, RequestParams(requestParameters));
150141
///<summary>GET on /_snapshot <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html</para></summary>
151142
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
152143
public TResponse GetRepository<TResponse>(GetRepositoryRequestParameters requestParameters = null)

src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
using Elasticsearch.Net.Specification.DanglingIndicesApi;
3232
using Elasticsearch.Net.Specification.EnrichApi;
3333
using Elasticsearch.Net.Specification.EqlApi;
34+
using Elasticsearch.Net.Specification.FeaturesApi;
3435
using Elasticsearch.Net.Specification.GraphApi;
3536
using Elasticsearch.Net.Specification.IndexLifecycleManagementApi;
3637
using Elasticsearch.Net.Specification.IndicesApi;
@@ -107,6 +108,12 @@ LowLevelEqlNamespace Eql
107108
get;
108109
}
109110

111+
///<summary>Features APIs</summary>
112+
LowLevelFeaturesNamespace Features
113+
{
114+
get;
115+
}
116+
110117
///<summary>Graph APIs</summary>
111118
LowLevelGraphNamespace Graph
112119
{

0 commit comments

Comments
 (0)