Skip to content

Commit 852f138

Browse files
Add various global APIs (#6229) (#6230)
Co-authored-by: Steve Gordon <sgordon@hotmail.co.uk>
1 parent 6a8032f commit 852f138

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+4550
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ internal static class ApiUrlsLookups
4444
internal static ApiUrls EqlSearch = new ApiUrls(new[] { "/{index}/_eql/search" });
4545
internal static ApiUrls EqlGet = new ApiUrls(new[] { "/_eql/search/{id}" });
4646
internal static ApiUrls NoNamespaceExists = new ApiUrls(new[] { "/{index}/_doc/{id}" });
47+
internal static ApiUrls NoNamespaceExistsSource = new ApiUrls(new[] { "/{index}/_source/{id}" });
48+
internal static ApiUrls NoNamespaceFieldCaps = new ApiUrls(new[] { "/_field_caps", "/{index}/_field_caps" });
4749
internal static ApiUrls NoNamespaceGet = new ApiUrls(new[] { "/{index}/_doc/{id}" });
4850
internal static ApiUrls GraphExplore = new ApiUrls(new[] { "/{index}/_graph/explore" });
4951
internal static ApiUrls IndexLifecycleManagementDeleteLifecycle = new ApiUrls(new[] { "/_ilm/policy/{policy}" });
@@ -75,12 +77,14 @@ internal static class ApiUrlsLookups
7577
internal static ApiUrls IndexManagementSplit = new ApiUrls(new[] { "/{index}/_split/{target}" });
7678
internal static ApiUrls IndexManagementUpdateAliases = new ApiUrls(new[] { "/_aliases" });
7779
internal static ApiUrls NoNamespaceIndex = new ApiUrls(new[] { "/{index}/_doc/{id}", "/{index}/_doc" });
80+
internal static ApiUrls NoNamespaceInfo = new ApiUrls(new[] { "/" });
7881
internal static ApiUrls IngestDeletePipeline = new ApiUrls(new[] { "/_ingest/pipeline/{id}" });
7982
internal static ApiUrls IngestGeoIpStats = new ApiUrls(new[] { "/_ingest/geoip/stats" });
8083
internal static ApiUrls IngestGetPipeline = new ApiUrls(new[] { "/_ingest/pipeline", "/_ingest/pipeline/{id}" });
8184
internal static ApiUrls IngestProcessorGrok = new ApiUrls(new[] { "/_ingest/processor/grok" });
8285
internal static ApiUrls IngestPutPipeline = new ApiUrls(new[] { "/_ingest/pipeline/{id}" });
8386
internal static ApiUrls IngestSimulate = new ApiUrls(new[] { "/_ingest/pipeline/_simulate", "/_ingest/pipeline/{id}/_simulate" });
87+
internal static ApiUrls NoNamespaceKnnSearch = new ApiUrls(new[] { "/{index}/_knn_search" });
8488
internal static ApiUrls NodesHotThreads = new ApiUrls(new[] { "/_nodes/hot_threads", "/_nodes/{node_id}/hot_threads" });
8589
internal static ApiUrls NodesInfo = new ApiUrls(new[] { "/_nodes", "/_nodes/{node_id}", "/_nodes/{metric}", "/_nodes/{node_id}/{metric}" });
8690
internal static ApiUrls NodesReloadSecureSettings = new ApiUrls(new[] { "/_nodes/reload_secure_settings", "/_nodes/{node_id}/reload_secure_settings" });
@@ -89,13 +93,17 @@ internal static class ApiUrlsLookups
8993
internal static ApiUrls NoNamespaceOpenPointInTime = new ApiUrls(new[] { "/{index}/_pit" });
9094
internal static ApiUrls NoNamespacePing = new ApiUrls(new[] { "/" });
9195
internal static ApiUrls NoNamespacePutScript = new ApiUrls(new[] { "/_scripts/{id}", "/_scripts/{id}/{context}" });
96+
internal static ApiUrls NoNamespaceRankEval = new ApiUrls(new[] { "/_rank_eval", "/{index}/_rank_eval" });
9297
internal static ApiUrls NoNamespaceReindex = new ApiUrls(new[] { "/_reindex" });
9398
internal static ApiUrls NoNamespaceReindexRethrottle = new ApiUrls(new[] { "/_reindex/{task_id}/_rethrottle" });
99+
internal static ApiUrls NoNamespaceGetScriptContext = new ApiUrls(new[] { "/_script_context" });
100+
internal static ApiUrls NoNamespaceGetScriptLanguages = new ApiUrls(new[] { "/_script_language" });
94101
internal static ApiUrls SearchableSnapshotsCacheStats = new ApiUrls(new[] { "/_searchable_snapshots/cache/stats", "/_searchable_snapshots/{node_id}/cache/stats" });
95102
internal static ApiUrls SearchableSnapshotsClearCache = new ApiUrls(new[] { "/_searchable_snapshots/cache/clear", "/{index}/_searchable_snapshots/cache/clear" });
96103
internal static ApiUrls SearchableSnapshotsMount = new ApiUrls(new[] { "/_snapshot/{repository}/{snapshot}/_mount" });
97104
internal static ApiUrls SearchableSnapshotsStats = new ApiUrls(new[] { "/_searchable_snapshots/stats", "/{index}/_searchable_snapshots/stats" });
98105
internal static ApiUrls NoNamespaceSearch = new ApiUrls(new[] { "/_search", "/{index}/_search" });
106+
internal static ApiUrls NoNamespaceSearchShards = new ApiUrls(new[] { "/_search_shards", "/{index}/_search_shards" });
99107
internal static ApiUrls SnapshotLifecycleManagementDeleteLifecycle = new ApiUrls(new[] { "/_slm/policy/{policy_id}" });
100108
internal static ApiUrls SnapshotLifecycleManagementExecuteLifecycle = new ApiUrls(new[] { "/_slm/policy/{policy_id}/_execute" });
101109
internal static ApiUrls SnapshotLifecycleManagementExecuteRetention = new ApiUrls(new[] { "/_slm/_execute_retention" });
@@ -114,6 +122,7 @@ internal static class ApiUrlsLookups
114122
internal static ApiUrls TasksGet = new ApiUrls(new[] { "/_tasks/{task_id}" });
115123
internal static ApiUrls TasksCancel = new ApiUrls(new[] { "/_tasks/_cancel", "/_tasks/{task_id}/_cancel" });
116124
internal static ApiUrls TasksList = new ApiUrls(new[] { "/_tasks" });
125+
internal static ApiUrls NoNamespaceTermsEnum = new ApiUrls(new[] { "/{index}/_terms_enum" });
117126
internal static ApiUrls NoNamespaceUpdateByQuery = new ApiUrls(new[] { "/{index}/_update_by_query" });
118127
internal static ApiUrls NoNamespaceUpdateByQueryRethrottle = new ApiUrls(new[] { "/_update_by_query/{task_id}/_rethrottle" });
119128
internal static ApiUrls NoNamespaceUpdate = new ApiUrls(new[] { "/{index}/_update/{id}" });
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
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 ExistsSourceRequestParameters : RequestParameters<ExistsSourceRequestParameters>
29+
{
30+
[JsonIgnore]
31+
public string? Preference { get => Q<string?>("preference"); set => Q("preference", value); }
32+
33+
[JsonIgnore]
34+
public bool? Realtime { get => Q<bool?>("realtime"); set => Q("realtime", value); }
35+
36+
[JsonIgnore]
37+
public bool? Refresh { get => Q<bool?>("refresh"); set => Q("refresh", value); }
38+
39+
[JsonIgnore]
40+
public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q<Elastic.Clients.Elasticsearch.Routing?>("routing"); set => Q("routing", value); }
41+
42+
[JsonIgnore]
43+
public Elastic.Clients.Elasticsearch.SourceConfigParam? Source { get => Q<Elastic.Clients.Elasticsearch.SourceConfigParam?>("_source"); set => Q("_source", value); }
44+
45+
[JsonIgnore]
46+
public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q<Elastic.Clients.Elasticsearch.Fields?>("_source_excludes"); set => Q("_source_excludes", value); }
47+
48+
[JsonIgnore]
49+
public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q<Elastic.Clients.Elasticsearch.Fields?>("_source_includes"); set => Q("_source_includes", value); }
50+
51+
[JsonIgnore]
52+
public long? Version { get => Q<long?>("version"); set => Q("version", value); }
53+
54+
[JsonIgnore]
55+
public Elastic.Clients.Elasticsearch.VersionType? VersionType { get => Q<Elastic.Clients.Elasticsearch.VersionType?>("version_type"); set => Q("version_type", value); }
56+
}
57+
58+
public partial class ExistsSourceRequest : PlainRequestBase<ExistsSourceRequestParameters>
59+
{
60+
public ExistsSourceRequest(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) : base(r => r.Required("index", index).Required("id", id))
61+
{
62+
}
63+
64+
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceExistsSource;
65+
protected override HttpMethod HttpMethod => HttpMethod.HEAD;
66+
protected override bool SupportsBody => false;
67+
[JsonIgnore]
68+
public string? Preference { get => Q<string?>("preference"); set => Q("preference", value); }
69+
70+
[JsonIgnore]
71+
public bool? Realtime { get => Q<bool?>("realtime"); set => Q("realtime", value); }
72+
73+
[JsonIgnore]
74+
public bool? Refresh { get => Q<bool?>("refresh"); set => Q("refresh", value); }
75+
76+
[JsonIgnore]
77+
public Elastic.Clients.Elasticsearch.Routing? Routing { get => Q<Elastic.Clients.Elasticsearch.Routing?>("routing"); set => Q("routing", value); }
78+
79+
[JsonIgnore]
80+
public Elastic.Clients.Elasticsearch.SourceConfigParam? Source { get => Q<Elastic.Clients.Elasticsearch.SourceConfigParam?>("_source"); set => Q("_source", value); }
81+
82+
[JsonIgnore]
83+
public Elastic.Clients.Elasticsearch.Fields? SourceExcludes { get => Q<Elastic.Clients.Elasticsearch.Fields?>("_source_excludes"); set => Q("_source_excludes", value); }
84+
85+
[JsonIgnore]
86+
public Elastic.Clients.Elasticsearch.Fields? SourceIncludes { get => Q<Elastic.Clients.Elasticsearch.Fields?>("_source_includes"); set => Q("_source_includes", value); }
87+
88+
[JsonIgnore]
89+
public long? Version { get => Q<long?>("version"); set => Q("version", value); }
90+
91+
[JsonIgnore]
92+
public Elastic.Clients.Elasticsearch.VersionType? VersionType { get => Q<Elastic.Clients.Elasticsearch.VersionType?>("version_type"); set => Q("version_type", value); }
93+
}
94+
95+
public sealed partial class ExistsSourceRequestDescriptor<TDocument> : RequestDescriptorBase<ExistsSourceRequestDescriptor<TDocument>, ExistsSourceRequestParameters>
96+
{
97+
internal ExistsSourceRequestDescriptor(Action<ExistsSourceRequestDescriptor<TDocument>> configure) => configure.Invoke(this);
98+
public ExistsSourceRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) : base(r => r.Required("index", index).Required("id", id))
99+
{
100+
}
101+
102+
public ExistsSourceRequestDescriptor(TDocument document) : this(typeof(TDocument), Elasticsearch.Id.From(document))
103+
{
104+
}
105+
106+
public ExistsSourceRequestDescriptor(TDocument document, IndexName index, Id id) : this(index, id)
107+
{
108+
}
109+
110+
public ExistsSourceRequestDescriptor(TDocument document, IndexName index) : this(index, Elasticsearch.Id.From(document))
111+
{
112+
}
113+
114+
public ExistsSourceRequestDescriptor(TDocument document, Id id) : this(typeof(TDocument), id)
115+
{
116+
}
117+
118+
public ExistsSourceRequestDescriptor(Id id) : this(typeof(TDocument), id)
119+
{
120+
}
121+
122+
internal ExistsSourceRequestDescriptor()
123+
{
124+
}
125+
126+
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceExistsSource;
127+
protected override HttpMethod HttpMethod => HttpMethod.HEAD;
128+
protected override bool SupportsBody => false;
129+
public ExistsSourceRequestDescriptor<TDocument> Source(Elastic.Clients.Elasticsearch.SourceConfigParam? source) => Qs("_source", source);
130+
public ExistsSourceRequestDescriptor<TDocument> SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
131+
public ExistsSourceRequestDescriptor<TDocument> SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes);
132+
public ExistsSourceRequestDescriptor<TDocument> Preference(string? preference) => Qs("preference", preference);
133+
public ExistsSourceRequestDescriptor<TDocument> Realtime(bool? realtime = true) => Qs("realtime", realtime);
134+
public ExistsSourceRequestDescriptor<TDocument> Refresh(bool? refresh = true) => Qs("refresh", refresh);
135+
public ExistsSourceRequestDescriptor<TDocument> Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing);
136+
public ExistsSourceRequestDescriptor<TDocument> Version(long? version) => Qs("version", version);
137+
public ExistsSourceRequestDescriptor<TDocument> VersionType(Elastic.Clients.Elasticsearch.VersionType? versionType) => Qs("version_type", versionType);
138+
public ExistsSourceRequestDescriptor<TDocument> Id(Elastic.Clients.Elasticsearch.Id id)
139+
{
140+
RouteValues.Required("id", id);
141+
return Self;
142+
}
143+
144+
public ExistsSourceRequestDescriptor<TDocument> Index(Elastic.Clients.Elasticsearch.IndexName index)
145+
{
146+
RouteValues.Required("index", index);
147+
return Self;
148+
}
149+
150+
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
151+
{
152+
}
153+
}
154+
155+
public sealed partial class ExistsSourceRequestDescriptor : RequestDescriptorBase<ExistsSourceRequestDescriptor, ExistsSourceRequestParameters>
156+
{
157+
internal ExistsSourceRequestDescriptor(Action<ExistsSourceRequestDescriptor> configure) => configure.Invoke(this);
158+
public ExistsSourceRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id) : base(r => r.Required("index", index).Required("id", id))
159+
{
160+
}
161+
162+
internal ExistsSourceRequestDescriptor()
163+
{
164+
}
165+
166+
internal override ApiUrls ApiUrls => ApiUrlsLookups.NoNamespaceExistsSource;
167+
protected override HttpMethod HttpMethod => HttpMethod.HEAD;
168+
protected override bool SupportsBody => false;
169+
public ExistsSourceRequestDescriptor Source(Elastic.Clients.Elasticsearch.SourceConfigParam? source) => Qs("_source", source);
170+
public ExistsSourceRequestDescriptor SourceExcludes(Elastic.Clients.Elasticsearch.Fields? sourceExcludes) => Qs("_source_excludes", sourceExcludes);
171+
public ExistsSourceRequestDescriptor SourceIncludes(Elastic.Clients.Elasticsearch.Fields? sourceIncludes) => Qs("_source_includes", sourceIncludes);
172+
public ExistsSourceRequestDescriptor Preference(string? preference) => Qs("preference", preference);
173+
public ExistsSourceRequestDescriptor Realtime(bool? realtime = true) => Qs("realtime", realtime);
174+
public ExistsSourceRequestDescriptor Refresh(bool? refresh = true) => Qs("refresh", refresh);
175+
public ExistsSourceRequestDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? routing) => Qs("routing", routing);
176+
public ExistsSourceRequestDescriptor Version(long? version) => Qs("version", version);
177+
public ExistsSourceRequestDescriptor VersionType(Elastic.Clients.Elasticsearch.VersionType? versionType) => Qs("version_type", versionType);
178+
public ExistsSourceRequestDescriptor Id(Elastic.Clients.Elasticsearch.Id id)
179+
{
180+
RouteValues.Required("id", id);
181+
return Self;
182+
}
183+
184+
public ExistsSourceRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName index)
185+
{
186+
RouteValues.Required("index", index);
187+
return Self;
188+
}
189+
190+
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
191+
{
192+
}
193+
}
194+
}
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 ExistsSourceResponse : ExistsResponseBase
26+
{
27+
}
28+
}

0 commit comments

Comments
 (0)