Skip to content

Commit 6a8032f

Browse files
Add various global APIs (#6226) (#6227)
Co-authored-by: Steve Gordon <sgordon@hotmail.co.uk>
1 parent 9e4f171 commit 6a8032f

27 files changed

+4019
-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
@@ -31,6 +31,8 @@ internal static class ApiUrlsLookups
3131
internal static ApiUrls ClusterState = new ApiUrls(new[] { "/_cluster/state", "/_cluster/state/{metric}", "/_cluster/state/{metric}/{index}" });
3232
internal static ApiUrls NoNamespaceCount = new ApiUrls(new[] { "/_count", "/{index}/_count" });
3333
internal static ApiUrls NoNamespaceCreate = new ApiUrls(new[] { "/{index}/_create/{id}" });
34+
internal static ApiUrls NoNamespaceDeleteByQuery = new ApiUrls(new[] { "/{index}/_delete_by_query" });
35+
internal static ApiUrls NoNamespaceDeleteByQueryRethrottle = new ApiUrls(new[] { "/_delete_by_query/{task_id}/_rethrottle" });
3436
internal static ApiUrls NoNamespaceDelete = new ApiUrls(new[] { "/{index}/_doc/{id}" });
3537
internal static ApiUrls EnrichDeletePolicy = new ApiUrls(new[] { "/_enrich/policy/{name}" });
3638
internal static ApiUrls EnrichExecutePolicy = new ApiUrls(new[] { "/_enrich/policy/{name}/_execute" });
@@ -86,6 +88,9 @@ internal static class ApiUrlsLookups
8688
internal static ApiUrls NodesUsage = new ApiUrls(new[] { "/_nodes/usage", "/_nodes/{node_id}/usage", "/_nodes/usage/{metric}", "/_nodes/{node_id}/usage/{metric}" });
8789
internal static ApiUrls NoNamespaceOpenPointInTime = new ApiUrls(new[] { "/{index}/_pit" });
8890
internal static ApiUrls NoNamespacePing = new ApiUrls(new[] { "/" });
91+
internal static ApiUrls NoNamespacePutScript = new ApiUrls(new[] { "/_scripts/{id}", "/_scripts/{id}/{context}" });
92+
internal static ApiUrls NoNamespaceReindex = new ApiUrls(new[] { "/_reindex" });
93+
internal static ApiUrls NoNamespaceReindexRethrottle = new ApiUrls(new[] { "/_reindex/{task_id}/_rethrottle" });
8994
internal static ApiUrls SearchableSnapshotsCacheStats = new ApiUrls(new[] { "/_searchable_snapshots/cache/stats", "/_searchable_snapshots/{node_id}/cache/stats" });
9095
internal static ApiUrls SearchableSnapshotsClearCache = new ApiUrls(new[] { "/_searchable_snapshots/cache/clear", "/{index}/_searchable_snapshots/cache/clear" });
9196
internal static ApiUrls SearchableSnapshotsMount = new ApiUrls(new[] { "/_snapshot/{repository}/{snapshot}/_mount" });
@@ -109,6 +114,8 @@ internal static class ApiUrlsLookups
109114
internal static ApiUrls TasksGet = new ApiUrls(new[] { "/_tasks/{task_id}" });
110115
internal static ApiUrls TasksCancel = new ApiUrls(new[] { "/_tasks/_cancel", "/_tasks/{task_id}/_cancel" });
111116
internal static ApiUrls TasksList = new ApiUrls(new[] { "/_tasks" });
117+
internal static ApiUrls NoNamespaceUpdateByQuery = new ApiUrls(new[] { "/{index}/_update_by_query" });
118+
internal static ApiUrls NoNamespaceUpdateByQueryRethrottle = new ApiUrls(new[] { "/_update_by_query/{task_id}/_rethrottle" });
112119
internal static ApiUrls NoNamespaceUpdate = new ApiUrls(new[] { "/{index}/_update/{id}" });
113120
}
114121
}

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

Lines changed: 542 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
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
24+
{
25+
public partial class DeleteByQueryResponse : ElasticsearchResponseBase
26+
{
27+
[JsonInclude]
28+
[JsonPropertyName("batches")]
29+
public long? Batches { get; init; }
30+
31+
[JsonInclude]
32+
[JsonPropertyName("deleted")]
33+
public long? Deleted { get; init; }
34+
35+
[JsonInclude]
36+
[JsonPropertyName("failures")]
37+
public IReadOnlyCollection<Elastic.Clients.Elasticsearch.BulkIndexByScrollFailure>? Failures { get; init; }
38+
39+
[JsonInclude]
40+
[JsonPropertyName("noops")]
41+
public long? Noops { get; init; }
42+
43+
[JsonInclude]
44+
[JsonPropertyName("requests_per_second")]
45+
public float? RequestsPerSecond { get; init; }
46+
47+
[JsonInclude]
48+
[JsonPropertyName("retries")]
49+
public Elastic.Clients.Elasticsearch.Retries? Retries { get; init; }
50+
51+
[JsonInclude]
52+
[JsonPropertyName("slice_id")]
53+
public int? SliceId { get; init; }
54+
55+
[JsonInclude]
56+
[JsonPropertyName("task")]
57+
public Elastic.Clients.Elasticsearch.TaskId? Task { get; init; }
58+
59+
[JsonInclude]
60+
[JsonPropertyName("throttled_millis")]
61+
public long? ThrottledMillis { get; init; }
62+
63+
[JsonInclude]
64+
[JsonPropertyName("throttled_until_millis")]
65+
public long? ThrottledUntilMillis { get; init; }
66+
67+
[JsonInclude]
68+
[JsonPropertyName("timed_out")]
69+
public bool? TimedOut { get; init; }
70+
71+
[JsonInclude]
72+
[JsonPropertyName("took")]
73+
public long? Took { get; init; }
74+
75+
[JsonInclude]
76+
[JsonPropertyName("total")]
77+
public long? Total { get; init; }
78+
79+
[JsonInclude]
80+
[JsonPropertyName("version_conflicts")]
81+
public long? VersionConflicts { get; init; }
82+
}
83+
}
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
27+
{
28+
public class DeleteByQueryRethrottleRequestParameters : RequestParameters<DeleteByQueryRethrottleRequestParameters>
29+
{
30+
[JsonIgnore]
31+
public long? RequestsPerSecond { get => Q<long?>("requests_per_second"); set => Q("requests_per_second", value); }
32+
}
33+
34+
public partial class DeleteByQueryRethrottleRequest : PlainRequestBase<DeleteByQueryRethrottleRequestParameters>
35+
{
36+
public DeleteByQueryRethrottleRequest(Elastic.Clients.Elasticsearch.Id task_id) : base(r => r.Required("task_id", task_id))
37+
{
38+
}
39+
40+
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDeleteByQueryRethrottle;
41+
protected override HttpMethod HttpMethod => HttpMethod.POST;
42+
protected override bool SupportsBody => false;
43+
[JsonIgnore]
44+
public long? RequestsPerSecond { get => Q<long?>("requests_per_second"); set => Q("requests_per_second", value); }
45+
}
46+
47+
public sealed partial class DeleteByQueryRethrottleRequestDescriptor : RequestDescriptorBase<DeleteByQueryRethrottleRequestDescriptor, DeleteByQueryRethrottleRequestParameters>
48+
{
49+
internal DeleteByQueryRethrottleRequestDescriptor(Action<DeleteByQueryRethrottleRequestDescriptor> configure) => configure.Invoke(this);
50+
public DeleteByQueryRethrottleRequestDescriptor(Elastic.Clients.Elasticsearch.Id task_id) : base(r => r.Required("task_id", task_id))
51+
{
52+
}
53+
54+
internal DeleteByQueryRethrottleRequestDescriptor()
55+
{
56+
}
57+
58+
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceDeleteByQueryRethrottle;
59+
protected override HttpMethod HttpMethod => HttpMethod.POST;
60+
protected override bool SupportsBody => false;
61+
public DeleteByQueryRethrottleRequestDescriptor RequestsPerSecond(long? requestsPerSecond) => Qs("requests_per_second", requestsPerSecond);
62+
public DeleteByQueryRethrottleRequestDescriptor TaskId(Elastic.Clients.Elasticsearch.Id task_id)
63+
{
64+
RouteValues.Required("task_id", task_id);
65+
return Self;
66+
}
67+
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
24+
{
25+
public partial class DeleteByQueryRethrottleResponse : ElasticsearchResponseBase
26+
{
27+
}
28+
}

0 commit comments

Comments
 (0)