Skip to content

Commit 657a9bf

Browse files
[codegen] 7.x synchronization (#5540)
Co-authored-by: Mpdreamz <Mpdreamz@users.noreply.github.com>
1 parent a478837 commit 657a9bf

File tree

8 files changed

+179
-4
lines changed

8 files changed

+179
-4
lines changed

src/ApiGenerator/RestSpecification/Core/cluster.get_settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"cluster.get_settings":{
33
"documentation":{
4-
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html",
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html",
55
"description":"Returns cluster settings."
66
},
77
"stability":"stable",
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"fleet.global_checkpoints":{
3+
"documentation":{
4+
"url": null,
5+
"description": "Returns the current global checkpoints for an index. This API is design for internal use by the fleet server project."
6+
},
7+
"stability":"experimental",
8+
"visibility":"public",
9+
"headers":{
10+
"accept": [ "application/json"],
11+
"content_type": ["application/json"]
12+
},
13+
"url":{
14+
"paths":[
15+
{
16+
"path":"/{index}/_fleet/global_checkpoints",
17+
"methods":[
18+
"GET"
19+
],
20+
"parts":{
21+
"index":{
22+
"type":"string",
23+
"description":"The name of the index."
24+
}
25+
}
26+
}
27+
]
28+
},
29+
"params":{
30+
"wait_for_advance":{
31+
"type":"boolean",
32+
"description":"Whether to wait for the global checkpoint to advance past the specified current checkpoints",
33+
"default":"false"
34+
},
35+
"checkpoints":{
36+
"type":"list",
37+
"description":"Comma separated list of checkpoints",
38+
"default":""
39+
},
40+
"timeout":{
41+
"type":"time",
42+
"description":"Timeout to wait for global checkpoint to advance",
43+
"default":"30s"
44+
}
45+
}
46+
}
47+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public TimeSpan MasterTimeout
117117
}
118118
}
119119

120-
///<summary>Request options for GetSettings <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html</para></summary>
120+
///<summary>Request options for GetSettings <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html</para></summary>
121121
public class ClusterGetSettingsRequestParameters : RequestParameters<ClusterGetSettingsRequestParameters>
122122
{
123123
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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.FleetApi
26+
{
27+
///<summary>Request options for GlobalCheckpoints</summary>
28+
public class GlobalCheckpointsRequestParameters : RequestParameters<GlobalCheckpointsRequestParameters>
29+
{
30+
public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
31+
public override bool SupportsBody => false;
32+
///<summary>Comma separated list of checkpoints</summary>
33+
public string[] Checkpoints
34+
{
35+
get => Q<string[]>("checkpoints");
36+
set => Q("checkpoints", value);
37+
}
38+
39+
///<summary>Timeout to wait for global checkpoint to advance</summary>
40+
public TimeSpan Timeout
41+
{
42+
get => Q<TimeSpan>("timeout");
43+
set => Q("timeout", value);
44+
}
45+
46+
///<summary>Whether to wait for the global checkpoint to advance past the specified current checkpoints</summary>
47+
public bool? WaitForAdvance
48+
{
49+
get => Q<bool? >("wait_for_advance");
50+
set => Q("wait_for_advance", value);
51+
}
52+
}
53+
}

src/Elasticsearch.Net/ElasticLowLevelClient.Cluster.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ public TResponse GetComponentTemplate<TResponse>(string name, GetComponentTempla
105105
[MapsApi("cluster.get_component_template", "name")]
106106
public Task<TResponse> GetComponentTemplateAsync<TResponse>(string name, GetComponentTemplateRequestParameters requestParameters = null, CancellationToken ctx = default)
107107
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"_component_template/{name:name}"), ctx, null, RequestParams(requestParameters));
108-
///<summary>GET on /_cluster/settings <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html</para></summary>
108+
///<summary>GET on /_cluster/settings <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html</para></summary>
109109
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
110110
public TResponse GetSettings<TResponse>(ClusterGetSettingsRequestParameters requestParameters = null)
111111
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, "_cluster/settings", null, RequestParams(requestParameters));
112-
///<summary>GET on /_cluster/settings <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html</para></summary>
112+
///<summary>GET on /_cluster/settings <para>https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html</para></summary>
113113
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
114114
[MapsApi("cluster.get_settings", "")]
115115
public Task<TResponse> GetSettingsAsync<TResponse>(ClusterGetSettingsRequestParameters requestParameters = null, CancellationToken ctx = default)
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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.FleetApi
33+
{
34+
///<summary>
35+
/// Fleet APIs.
36+
/// <para>Not intended to be instantiated directly. Use the <see cref = "IElasticLowLevelClient.Fleet"/> property
37+
/// on <see cref = "IElasticLowLevelClient"/>.
38+
///</para>
39+
///</summary>
40+
public partial class LowLevelFleetNamespace : NamespacedClientProxy
41+
{
42+
internal LowLevelFleetNamespace(ElasticLowLevelClient client): base(client)
43+
{
44+
}
45+
46+
///<summary>GET on /{index}/_fleet/global_checkpoints</summary>
47+
///<param name = "index">The name of the index.</param>
48+
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
49+
///<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>
50+
public TResponse GlobalCheckpoints<TResponse>(string index, GlobalCheckpointsRequestParameters requestParameters = null)
51+
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(GET, Url($"{index:index}/_fleet/global_checkpoints"), null, RequestParams(requestParameters));
52+
///<summary>GET on /{index}/_fleet/global_checkpoints</summary>
53+
///<param name = "index">The name of the index.</param>
54+
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
55+
///<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>
56+
[MapsApi("fleet.global_checkpoints", "index")]
57+
public Task<TResponse> GlobalCheckpointsAsync<TResponse>(string index, GlobalCheckpointsRequestParameters requestParameters = null, CancellationToken ctx = default)
58+
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(GET, Url($"{index:index}/_fleet/global_checkpoints"), ctx, null, RequestParams(requestParameters));
59+
}
60+
}

src/Elasticsearch.Net/ElasticLowLevelClient.NoNamespace.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
using Elasticsearch.Net.Specification.EnrichApi;
3333
using Elasticsearch.Net.Specification.EqlApi;
3434
using Elasticsearch.Net.Specification.FeaturesApi;
35+
using Elasticsearch.Net.Specification.FleetApi;
3536
using Elasticsearch.Net.Specification.GraphApi;
3637
using Elasticsearch.Net.Specification.IndexLifecycleManagementApi;
3738
using Elasticsearch.Net.Specification.IndicesApi;
@@ -118,6 +119,12 @@ public LowLevelFeaturesNamespace Features
118119
private set;
119120
}
120121

122+
public LowLevelFleetNamespace Fleet
123+
{
124+
get;
125+
private set;
126+
}
127+
121128
public LowLevelGraphNamespace Graph
122129
{
123130
get;
@@ -255,6 +262,7 @@ partial void SetupNamespaces()
255262
Enrich = new LowLevelEnrichNamespace(this);
256263
Eql = new LowLevelEqlNamespace(this);
257264
Features = new LowLevelFeaturesNamespace(this);
265+
Fleet = new LowLevelFleetNamespace(this);
258266
Graph = new LowLevelGraphNamespace(this);
259267
IndexLifecycleManagement = new LowLevelIndexLifecycleManagementNamespace(this);
260268
Indices = new LowLevelIndicesNamespace(this);

src/Elasticsearch.Net/IElasticLowLevelClient.Generated.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
using Elasticsearch.Net.Specification.EnrichApi;
3333
using Elasticsearch.Net.Specification.EqlApi;
3434
using Elasticsearch.Net.Specification.FeaturesApi;
35+
using Elasticsearch.Net.Specification.FleetApi;
3536
using Elasticsearch.Net.Specification.GraphApi;
3637
using Elasticsearch.Net.Specification.IndexLifecycleManagementApi;
3738
using Elasticsearch.Net.Specification.IndicesApi;
@@ -115,6 +116,12 @@ LowLevelFeaturesNamespace Features
115116
get;
116117
}
117118

119+
///<summary>Fleet APIs</summary>
120+
LowLevelFleetNamespace Fleet
121+
{
122+
get;
123+
}
124+
118125
///<summary>Graph APIs</summary>
119126
LowLevelGraphNamespace Graph
120127
{

0 commit comments

Comments
 (0)