Skip to content

Commit c713c73

Browse files
committed
Fix naming of MultisearchBody
1 parent 1208bce commit c713c73

File tree

6 files changed

+3348
-664
lines changed

6 files changed

+3348
-664
lines changed

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

+9-3
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,12 @@ public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor Searches(Syste
573573
return this;
574574
}
575575

576+
public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor Searches<T>(System.Action<Elastic.Clients.Elasticsearch.Fluent.FluentICollectionOfSearchRequestItem<T>>? action)
577+
{
578+
Instance.Searches = Elastic.Clients.Elasticsearch.Fluent.FluentICollectionOfSearchRequestItem<T>.Build(action);
579+
return this;
580+
}
581+
576582
public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor Searches(params Elastic.Clients.Elasticsearch.Core.MSearch.SearchRequestItem[] values)
577583
{
578584
Instance.Searches = [.. values];
@@ -879,13 +885,13 @@ public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor<TDocument> Sea
879885

880886
public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor<TDocument> Searches()
881887
{
882-
Instance.Searches = Elastic.Clients.Elasticsearch.Fluent.FluentICollectionOfSearchRequestItem.Build(null);
888+
Instance.Searches = Elastic.Clients.Elasticsearch.Fluent.FluentICollectionOfSearchRequestItem<TDocument>.Build(null);
883889
return this;
884890
}
885891

886-
public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor<TDocument> Searches(System.Action<Elastic.Clients.Elasticsearch.Fluent.FluentICollectionOfSearchRequestItem>? action)
892+
public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor<TDocument> Searches(System.Action<Elastic.Clients.Elasticsearch.Fluent.FluentICollectionOfSearchRequestItem<TDocument>>? action)
887893
{
888-
Instance.Searches = Elastic.Clients.Elasticsearch.Fluent.FluentICollectionOfSearchRequestItem.Build(action);
894+
Instance.Searches = Elastic.Clients.Elasticsearch.Fluent.FluentICollectionOfSearchRequestItem<TDocument>.Build(action);
889895
return this;
890896
}
891897

src/Elastic.Clients.Elasticsearch/_Generated/Fluent/FluentICollectionOfSearchRequestItem.g.cs

+36
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,42 @@
2323

2424
namespace Elastic.Clients.Elasticsearch.Fluent;
2525

26+
public readonly partial struct FluentICollectionOfSearchRequestItem<TDocument>
27+
{
28+
private readonly System.Collections.Generic.List<Elastic.Clients.Elasticsearch.Core.MSearch.SearchRequestItem> _items = new();
29+
30+
private System.Collections.Generic.ICollection<Elastic.Clients.Elasticsearch.Core.MSearch.SearchRequestItem> Value => _items;
31+
32+
public FluentICollectionOfSearchRequestItem()
33+
{
34+
}
35+
36+
public Elastic.Clients.Elasticsearch.Fluent.FluentICollectionOfSearchRequestItem<TDocument> Add(Elastic.Clients.Elasticsearch.Core.MSearch.SearchRequestItem value)
37+
{
38+
_items.Add(value);
39+
return this;
40+
}
41+
42+
public Elastic.Clients.Elasticsearch.Fluent.FluentICollectionOfSearchRequestItem<TDocument> Add(params Elastic.Clients.Elasticsearch.Core.MSearch.SearchRequestItem[] values)
43+
{
44+
_items.AddRange(values);
45+
return this;
46+
}
47+
48+
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
49+
internal static System.Collections.Generic.ICollection<Elastic.Clients.Elasticsearch.Core.MSearch.SearchRequestItem> Build(System.Action<Elastic.Clients.Elasticsearch.Fluent.FluentICollectionOfSearchRequestItem<TDocument>>? action)
50+
{
51+
if (action is null)
52+
{
53+
return [];
54+
}
55+
56+
var builder = new Elastic.Clients.Elasticsearch.Fluent.FluentICollectionOfSearchRequestItem<TDocument>();
57+
action.Invoke(builder);
58+
return builder.Value;
59+
}
60+
}
61+
2662
public readonly partial struct FluentICollectionOfSearchRequestItem
2763
{
2864
private readonly System.Collections.Generic.List<Elastic.Clients.Elasticsearch.Core.MSearch.SearchRequestItem> _items = new();

src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchHeader.g.cs

+122
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,126 @@ internal MultisearchHeader(Elastic.Clients.Elasticsearch.Serialization.JsonConst
187187
public bool? RequestCache { get; set; }
188188
public Elastic.Clients.Elasticsearch.Routing? Routing { get; set; }
189189
public Elastic.Clients.Elasticsearch.SearchType? SearchType { get; set; }
190+
}
191+
192+
/// <summary>
193+
/// <para>
194+
/// Contains parameters used to limit or change the subsequent search body request.
195+
/// </para>
196+
/// </summary>
197+
public readonly partial struct MultisearchHeaderDescriptor
198+
{
199+
internal Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader Instance { get; init; }
200+
201+
[System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
202+
public MultisearchHeaderDescriptor(Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader instance)
203+
{
204+
Instance = instance;
205+
}
206+
207+
[System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
208+
public MultisearchHeaderDescriptor()
209+
{
210+
Instance = new Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance);
211+
}
212+
213+
public static explicit operator Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor(Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader instance) => new Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor(instance);
214+
public static implicit operator Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader(Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor descriptor) => descriptor.Instance;
215+
216+
public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor AllowNoIndices(bool? value = true)
217+
{
218+
Instance.AllowNoIndices = value;
219+
return this;
220+
}
221+
222+
public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor AllowPartialSearchResults(bool? value = true)
223+
{
224+
Instance.AllowPartialSearchResults = value;
225+
return this;
226+
}
227+
228+
public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor CcsMinimizeRoundtrips(bool? value = true)
229+
{
230+
Instance.CcsMinimizeRoundtrips = value;
231+
return this;
232+
}
233+
234+
public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor ExpandWildcards(System.Collections.Generic.ICollection<Elastic.Clients.Elasticsearch.ExpandWildcard>? value)
235+
{
236+
Instance.ExpandWildcards = value;
237+
return this;
238+
}
239+
240+
public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor ExpandWildcards()
241+
{
242+
Instance.ExpandWildcards = Elastic.Clients.Elasticsearch.Fluent.FluentICollectionOfExpandWildcard.Build(null);
243+
return this;
244+
}
245+
246+
public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor ExpandWildcards(System.Action<Elastic.Clients.Elasticsearch.Fluent.FluentICollectionOfExpandWildcard>? action)
247+
{
248+
Instance.ExpandWildcards = Elastic.Clients.Elasticsearch.Fluent.FluentICollectionOfExpandWildcard.Build(action);
249+
return this;
250+
}
251+
252+
public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor ExpandWildcards(params Elastic.Clients.Elasticsearch.ExpandWildcard[] values)
253+
{
254+
Instance.ExpandWildcards = [.. values];
255+
return this;
256+
}
257+
258+
public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor IgnoreThrottled(bool? value = true)
259+
{
260+
Instance.IgnoreThrottled = value;
261+
return this;
262+
}
263+
264+
public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor IgnoreUnavailable(bool? value = true)
265+
{
266+
Instance.IgnoreUnavailable = value;
267+
return this;
268+
}
269+
270+
public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? value)
271+
{
272+
Instance.Indices = value;
273+
return this;
274+
}
275+
276+
public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor Preference(string? value)
277+
{
278+
Instance.Preference = value;
279+
return this;
280+
}
281+
282+
public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor RequestCache(bool? value = true)
283+
{
284+
Instance.RequestCache = value;
285+
return this;
286+
}
287+
288+
public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor Routing(Elastic.Clients.Elasticsearch.Routing? value)
289+
{
290+
Instance.Routing = value;
291+
return this;
292+
}
293+
294+
public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor SearchType(Elastic.Clients.Elasticsearch.SearchType? value)
295+
{
296+
Instance.SearchType = value;
297+
return this;
298+
}
299+
300+
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
301+
internal static Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader Build(System.Action<Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor>? action)
302+
{
303+
if (action is null)
304+
{
305+
return new Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance);
306+
}
307+
308+
var builder = new Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeaderDescriptor(new Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance));
309+
action.Invoke(builder);
310+
return builder.Instance;
311+
}
190312
}

0 commit comments

Comments
 (0)