Skip to content

Commit 8ebd663

Browse files
committed
Add DeleteExpiredData overloads without body
Relates: elastic/elasticsearch#56895 This commit patches in DeleteExpiredData that don't accept a body.
1 parent 43cfabb commit 8ebd663

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
using System.Threading;
6+
using System.Threading.Tasks;
7+
using static Elasticsearch.Net.HttpMethod;
8+
9+
namespace Elasticsearch.Net.Specification.MachineLearningApi
10+
{
11+
// Introduced as workaround for the introduction of a body in https://github.com/elastic/elasticsearch/pull/56895
12+
public partial class LowLevelMachineLearningNamespace
13+
{
14+
///<summary>DELETE on /_ml/_delete_expired_data <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html</para></summary>
15+
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
16+
public TResponse DeleteExpiredData<TResponse>(DeleteExpiredDataRequestParameters requestParameters = null)
17+
where TResponse : class, IElasticsearchResponse, new() => DoRequest<TResponse>(DELETE, "_ml/_delete_expired_data", null, RequestParams(requestParameters));
18+
///<summary>DELETE on /_ml/_delete_expired_data <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html</para></summary>
19+
///<param name = "requestParameters">Request specific configuration such as querystring parameters &amp; request specific connection settings.</param>
20+
[MapsApi("ml.delete_expired_data")]
21+
public Task<TResponse> DeleteExpiredDataAsync<TResponse>(DeleteExpiredDataRequestParameters requestParameters = null, CancellationToken ctx = default)
22+
where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync<TResponse>(DELETE, "_ml/_delete_expired_data", ctx, null, RequestParams(requestParameters));
23+
}
24+
}

0 commit comments

Comments
 (0)