Skip to content

Commit b869623

Browse files
floberndgithub-actions[bot]
authored andcommitted
Generate exhaustive overloads for all request methods (#8123)
1 parent de28cf2 commit b869623

File tree

49 files changed

+23556
-5700
lines changed

Some content is hidden

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

49 files changed

+23556
-5700
lines changed

src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.AsyncSearch.g.cs

Lines changed: 97 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,31 @@ public virtual Task<DeleteAsyncSearchResponse> DeleteAsync(DeleteAsyncSearchRequ
6161
/// <para>Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted.</para>
6262
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.13/async-search.html">Learn more about this API in the Elasticsearch documentation.</see></para>
6363
/// </summary>
64-
public virtual Task<DeleteAsyncSearchResponse> DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default)
64+
public virtual Task<DeleteAsyncSearchResponse> DeleteAsync<TDocument>(DeleteAsyncSearchRequestDescriptor descriptor, CancellationToken cancellationToken = default)
65+
{
66+
descriptor.BeforeRequest();
67+
return DoRequestAsync<DeleteAsyncSearchRequestDescriptor, DeleteAsyncSearchResponse, DeleteAsyncSearchRequestParameters>(descriptor, cancellationToken);
68+
}
69+
70+
/// <summary>
71+
/// <para>Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted.</para>
72+
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.13/async-search.html">Learn more about this API in the Elasticsearch documentation.</see></para>
73+
/// </summary>
74+
public virtual Task<DeleteAsyncSearchResponse> DeleteAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default)
75+
{
76+
var descriptor = new DeleteAsyncSearchRequestDescriptor(id);
77+
descriptor.BeforeRequest();
78+
return DoRequestAsync<DeleteAsyncSearchRequestDescriptor, DeleteAsyncSearchResponse, DeleteAsyncSearchRequestParameters>(descriptor, cancellationToken);
79+
}
80+
81+
/// <summary>
82+
/// <para>Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted.</para>
83+
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.13/async-search.html">Learn more about this API in the Elasticsearch documentation.</see></para>
84+
/// </summary>
85+
public virtual Task<DeleteAsyncSearchResponse> DeleteAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id id, Action<DeleteAsyncSearchRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
6586
{
6687
var descriptor = new DeleteAsyncSearchRequestDescriptor(id);
88+
configureRequest?.Invoke(descriptor);
6789
descriptor.BeforeRequest();
6890
return DoRequestAsync<DeleteAsyncSearchRequestDescriptor, DeleteAsyncSearchResponse, DeleteAsyncSearchRequestParameters>(descriptor, cancellationToken);
6991
}
@@ -78,6 +100,17 @@ public virtual Task<DeleteAsyncSearchResponse> DeleteAsync(DeleteAsyncSearchRequ
78100
return DoRequestAsync<DeleteAsyncSearchRequestDescriptor, DeleteAsyncSearchResponse, DeleteAsyncSearchRequestParameters>(descriptor, cancellationToken);
79101
}
80102

103+
/// <summary>
104+
/// <para>Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted.</para>
105+
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.13/async-search.html">Learn more about this API in the Elasticsearch documentation.</see></para>
106+
/// </summary>
107+
public virtual Task<DeleteAsyncSearchResponse> DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default)
108+
{
109+
var descriptor = new DeleteAsyncSearchRequestDescriptor(id);
110+
descriptor.BeforeRequest();
111+
return DoRequestAsync<DeleteAsyncSearchRequestDescriptor, DeleteAsyncSearchResponse, DeleteAsyncSearchRequestParameters>(descriptor, cancellationToken);
112+
}
113+
81114
/// <summary>
82115
/// <para>Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted.</para>
83116
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.13/async-search.html">Learn more about this API in the Elasticsearch documentation.</see></para>
@@ -114,9 +147,8 @@ public virtual Task<GetAsyncSearchResponse<TDocument>> GetAsync<TDocument>(GetAs
114147
/// <para>Retrieves the results of a previously submitted async search request given its ID.</para>
115148
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.13/async-search.html">Learn more about this API in the Elasticsearch documentation.</see></para>
116149
/// </summary>
117-
public virtual Task<GetAsyncSearchResponse<TDocument>> GetAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default)
150+
public virtual Task<GetAsyncSearchResponse<TDocument>> GetAsync<TDocument>(GetAsyncSearchRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
118151
{
119-
var descriptor = new GetAsyncSearchRequestDescriptor<TDocument>(id);
120152
descriptor.BeforeRequest();
121153
return DoRequestAsync<GetAsyncSearchRequestDescriptor<TDocument>, GetAsyncSearchResponse<TDocument>, GetAsyncSearchRequestParameters>(descriptor, cancellationToken);
122154
}
@@ -125,8 +157,9 @@ public virtual Task<GetAsyncSearchResponse<TDocument>> GetAsync<TDocument>(Elast
125157
/// <para>Retrieves the results of a previously submitted async search request given its ID.</para>
126158
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.13/async-search.html">Learn more about this API in the Elasticsearch documentation.</see></para>
127159
/// </summary>
128-
public virtual Task<GetAsyncSearchResponse<TDocument>> GetAsync<TDocument>(GetAsyncSearchRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
160+
public virtual Task<GetAsyncSearchResponse<TDocument>> GetAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default)
129161
{
162+
var descriptor = new GetAsyncSearchRequestDescriptor<TDocument>(id);
130163
descriptor.BeforeRequest();
131164
return DoRequestAsync<GetAsyncSearchRequestDescriptor<TDocument>, GetAsyncSearchResponse<TDocument>, GetAsyncSearchRequestParameters>(descriptor, cancellationToken);
132165
}
@@ -167,13 +200,35 @@ public virtual Task<AsyncSearchStatusResponse> StatusAsync(AsyncSearchStatusRequ
167200
/// <para>Retrieves the status of a previously submitted async search request given its ID.</para>
168201
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.13/async-search.html">Learn more about this API in the Elasticsearch documentation.</see></para>
169202
/// </summary>
170-
public virtual Task<AsyncSearchStatusResponse> StatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default)
203+
public virtual Task<AsyncSearchStatusResponse> StatusAsync<TDocument>(AsyncSearchStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default)
204+
{
205+
descriptor.BeforeRequest();
206+
return DoRequestAsync<AsyncSearchStatusRequestDescriptor, AsyncSearchStatusResponse, AsyncSearchStatusRequestParameters>(descriptor, cancellationToken);
207+
}
208+
209+
/// <summary>
210+
/// <para>Retrieves the status of a previously submitted async search request given its ID.</para>
211+
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.13/async-search.html">Learn more about this API in the Elasticsearch documentation.</see></para>
212+
/// </summary>
213+
public virtual Task<AsyncSearchStatusResponse> StatusAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default)
171214
{
172215
var descriptor = new AsyncSearchStatusRequestDescriptor(id);
173216
descriptor.BeforeRequest();
174217
return DoRequestAsync<AsyncSearchStatusRequestDescriptor, AsyncSearchStatusResponse, AsyncSearchStatusRequestParameters>(descriptor, cancellationToken);
175218
}
176219

220+
/// <summary>
221+
/// <para>Retrieves the status of a previously submitted async search request given its ID.</para>
222+
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.13/async-search.html">Learn more about this API in the Elasticsearch documentation.</see></para>
223+
/// </summary>
224+
public virtual Task<AsyncSearchStatusResponse> StatusAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Id id, Action<AsyncSearchStatusRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
225+
{
226+
var descriptor = new AsyncSearchStatusRequestDescriptor(id);
227+
configureRequest?.Invoke(descriptor);
228+
descriptor.BeforeRequest();
229+
return DoRequestAsync<AsyncSearchStatusRequestDescriptor, AsyncSearchStatusResponse, AsyncSearchStatusRequestParameters>(descriptor, cancellationToken);
230+
}
231+
177232
/// <summary>
178233
/// <para>Retrieves the status of a previously submitted async search request given its ID.</para>
179234
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.13/async-search.html">Learn more about this API in the Elasticsearch documentation.</see></para>
@@ -184,6 +239,17 @@ public virtual Task<AsyncSearchStatusResponse> StatusAsync(AsyncSearchStatusRequ
184239
return DoRequestAsync<AsyncSearchStatusRequestDescriptor, AsyncSearchStatusResponse, AsyncSearchStatusRequestParameters>(descriptor, cancellationToken);
185240
}
186241

242+
/// <summary>
243+
/// <para>Retrieves the status of a previously submitted async search request given its ID.</para>
244+
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.13/async-search.html">Learn more about this API in the Elasticsearch documentation.</see></para>
245+
/// </summary>
246+
public virtual Task<AsyncSearchStatusResponse> StatusAsync(Elastic.Clients.Elasticsearch.Serverless.Id id, CancellationToken cancellationToken = default)
247+
{
248+
var descriptor = new AsyncSearchStatusRequestDescriptor(id);
249+
descriptor.BeforeRequest();
250+
return DoRequestAsync<AsyncSearchStatusRequestDescriptor, AsyncSearchStatusResponse, AsyncSearchStatusRequestParameters>(descriptor, cancellationToken);
251+
}
252+
187253
/// <summary>
188254
/// <para>Retrieves the status of a previously submitted async search request given its ID.</para>
189255
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.13/async-search.html">Learn more about this API in the Elasticsearch documentation.</see></para>
@@ -220,9 +286,8 @@ public virtual Task<SubmitAsyncSearchResponse<TDocument>> SubmitAsync<TDocument>
220286
/// <para>Executes a search request asynchronously.</para>
221287
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.13/async-search.html">Learn more about this API in the Elasticsearch documentation.</see></para>
222288
/// </summary>
223-
public virtual Task<SubmitAsyncSearchResponse<TDocument>> SubmitAsync<TDocument>(CancellationToken cancellationToken = default)
289+
public virtual Task<SubmitAsyncSearchResponse<TDocument>> SubmitAsync<TDocument>(SubmitAsyncSearchRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
224290
{
225-
var descriptor = new SubmitAsyncSearchRequestDescriptor<TDocument>();
226291
descriptor.BeforeRequest();
227292
return DoRequestAsync<SubmitAsyncSearchRequestDescriptor<TDocument>, SubmitAsyncSearchResponse<TDocument>, SubmitAsyncSearchRequestParameters>(descriptor, cancellationToken);
228293
}
@@ -231,8 +296,32 @@ public virtual Task<SubmitAsyncSearchResponse<TDocument>> SubmitAsync<TDocument>
231296
/// <para>Executes a search request asynchronously.</para>
232297
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.13/async-search.html">Learn more about this API in the Elasticsearch documentation.</see></para>
233298
/// </summary>
234-
public virtual Task<SubmitAsyncSearchResponse<TDocument>> SubmitAsync<TDocument>(SubmitAsyncSearchRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
299+
public virtual Task<SubmitAsyncSearchResponse<TDocument>> SubmitAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, CancellationToken cancellationToken = default)
300+
{
301+
var descriptor = new SubmitAsyncSearchRequestDescriptor<TDocument>(indices);
302+
descriptor.BeforeRequest();
303+
return DoRequestAsync<SubmitAsyncSearchRequestDescriptor<TDocument>, SubmitAsyncSearchResponse<TDocument>, SubmitAsyncSearchRequestParameters>(descriptor, cancellationToken);
304+
}
305+
306+
/// <summary>
307+
/// <para>Executes a search request asynchronously.</para>
308+
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.13/async-search.html">Learn more about this API in the Elasticsearch documentation.</see></para>
309+
/// </summary>
310+
public virtual Task<SubmitAsyncSearchResponse<TDocument>> SubmitAsync<TDocument>(Elastic.Clients.Elasticsearch.Serverless.Indices? indices, Action<SubmitAsyncSearchRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
235311
{
312+
var descriptor = new SubmitAsyncSearchRequestDescriptor<TDocument>(indices);
313+
configureRequest?.Invoke(descriptor);
314+
descriptor.BeforeRequest();
315+
return DoRequestAsync<SubmitAsyncSearchRequestDescriptor<TDocument>, SubmitAsyncSearchResponse<TDocument>, SubmitAsyncSearchRequestParameters>(descriptor, cancellationToken);
316+
}
317+
318+
/// <summary>
319+
/// <para>Executes a search request asynchronously.</para>
320+
/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/8.13/async-search.html">Learn more about this API in the Elasticsearch documentation.</see></para>
321+
/// </summary>
322+
public virtual Task<SubmitAsyncSearchResponse<TDocument>> SubmitAsync<TDocument>(CancellationToken cancellationToken = default)
323+
{
324+
var descriptor = new SubmitAsyncSearchRequestDescriptor<TDocument>();
236325
descriptor.BeforeRequest();
237326
return DoRequestAsync<SubmitAsyncSearchRequestDescriptor<TDocument>, SubmitAsyncSearchResponse<TDocument>, SubmitAsyncSearchRequestParameters>(descriptor, cancellationToken);
238327
}

0 commit comments

Comments
 (0)