Skip to content

Commit d6c5f2a

Browse files
authored
Regenerate client using the latest specification (#8206)
1 parent b8c8401 commit d6c5f2a

File tree

65 files changed

+3822
-702
lines changed

Some content is hidden

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

65 files changed

+3822
-702
lines changed

Diff for: src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs

-7
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ namespace Elastic.Clients.Elasticsearch.Serverless.Cluster;
3131

3232
public sealed partial class PutComponentTemplateRequestParameters : RequestParameters
3333
{
34-
public string? Cause { get => Q<string?>("cause"); set => Q("cause", value); }
35-
3634
/// <summary>
3735
/// <para>If `true`, this request cannot replace or update existing component templates.</para>
3836
/// </summary>
@@ -65,9 +63,6 @@ public PutComponentTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name
6563

6664
internal override string OperationName => "cluster.put_component_template";
6765

68-
[JsonIgnore]
69-
public string? Cause { get => Q<string?>("cause"); set => Q("cause", value); }
70-
7166
/// <summary>
7267
/// <para>If `true`, this request cannot replace or update existing component templates.</para>
7368
/// </summary>
@@ -128,7 +123,6 @@ public PutComponentTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serve
128123

129124
internal override string OperationName => "cluster.put_component_template";
130125

131-
public PutComponentTemplateRequestDescriptor<TDocument> Cause(string? cause) => Qs("cause", cause);
132126
public PutComponentTemplateRequestDescriptor<TDocument> Create(bool? create = true) => Qs("create", create);
133127
public PutComponentTemplateRequestDescriptor<TDocument> MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout);
134128

@@ -263,7 +257,6 @@ public PutComponentTemplateRequestDescriptor(Elastic.Clients.Elasticsearch.Serve
263257

264258
internal override string OperationName => "cluster.put_component_template";
265259

266-
public PutComponentTemplateRequestDescriptor Cause(string? cause) => Qs("cause", cause);
267260
public PutComponentTemplateRequestDescriptor Create(bool? create = true) => Qs("create", create);
268261
public PutComponentTemplateRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Serverless.Duration? masterTimeout) => Qs("master_timeout", masterTimeout);
269262

Diff for: src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/CreateResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public sealed partial class CreateResponse : ElasticsearchResponse
3939
[JsonInclude, JsonPropertyName("result")]
4040
public Elastic.Clients.Elasticsearch.Serverless.Result Result { get; init; }
4141
[JsonInclude, JsonPropertyName("_seq_no")]
42-
public long SeqNo { get; init; }
42+
public long? SeqNo { get; init; }
4343
[JsonInclude, JsonPropertyName("_shards")]
4444
public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; }
4545
[JsonInclude, JsonPropertyName("_version")]

Diff for: src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/DeleteResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public sealed partial class DeleteResponse : ElasticsearchResponse
3939
[JsonInclude, JsonPropertyName("result")]
4040
public Elastic.Clients.Elasticsearch.Serverless.Result Result { get; init; }
4141
[JsonInclude, JsonPropertyName("_seq_no")]
42-
public long SeqNo { get; init; }
42+
public long? SeqNo { get; init; }
4343
[JsonInclude, JsonPropertyName("_shards")]
4444
public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; }
4545
[JsonInclude, JsonPropertyName("_version")]

Diff for: src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public sealed partial class CreateIndexRequestParameters : RequestParameters
4242
public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q<Elastic.Clients.Elasticsearch.Serverless.Duration?>("timeout"); set => Q("timeout", value); }
4343

4444
/// <summary>
45-
/// <para>The number of shard copies that must be active before proceeding with the operation. <br/>Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).</para>
45+
/// <para>The number of shard copies that must be active before proceeding with the operation.<br/>Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).</para>
4646
/// </summary>
4747
public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q<Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards?>("wait_for_active_shards"); set => Q("wait_for_active_shards", value); }
4848
}
@@ -77,7 +77,7 @@ public CreateIndexRequest(Elastic.Clients.Elasticsearch.Serverless.IndexName ind
7777
public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q<Elastic.Clients.Elasticsearch.Serverless.Duration?>("timeout"); set => Q("timeout", value); }
7878

7979
/// <summary>
80-
/// <para>The number of shard copies that must be active before proceeding with the operation. <br/>Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).</para>
80+
/// <para>The number of shard copies that must be active before proceeding with the operation.<br/>Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).</para>
8181
/// </summary>
8282
[JsonIgnore]
8383
public Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards? WaitForActiveShards { get => Q<Elastic.Clients.Elasticsearch.Serverless.WaitForActiveShards?>("wait_for_active_shards"); set => Q("wait_for_active_shards", value); }

Diff for: src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs

+69-9
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public PutTemplateRequest(Elastic.Clients.Elasticsearch.Serverless.Name name) :
106106
/// <para>Configuration options for the index.</para>
107107
/// </summary>
108108
[JsonInclude, JsonPropertyName("settings")]
109-
public IDictionary<string, object>? Settings { get; set; }
109+
public Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? Settings { get; set; }
110110

111111
/// <summary>
112112
/// <para>Version number used to manage index templates externally. This number<br/>is not automatically generated by Elasticsearch.</para>
@@ -150,7 +150,9 @@ public PutTemplateRequestDescriptor<TDocument> Name(Elastic.Clients.Elasticsearc
150150
private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor<TDocument> MappingsDescriptor { get; set; }
151151
private Action<Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor<TDocument>> MappingsDescriptorAction { get; set; }
152152
private int? OrderValue { get; set; }
153-
private IDictionary<string, object>? SettingsValue { get; set; }
153+
private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; }
154+
private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor<TDocument> SettingsDescriptor { get; set; }
155+
private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor<TDocument>> SettingsDescriptorAction { get; set; }
154156
private long? VersionValue { get; set; }
155157

156158
/// <summary>
@@ -211,9 +213,27 @@ public PutTemplateRequestDescriptor<TDocument> Order(int? order)
211213
/// <summary>
212214
/// <para>Configuration options for the index.</para>
213215
/// </summary>
214-
public PutTemplateRequestDescriptor<TDocument> Settings(Func<FluentDictionary<string, object>, FluentDictionary<string, object>> selector)
216+
public PutTemplateRequestDescriptor<TDocument> Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings)
215217
{
216-
SettingsValue = selector?.Invoke(new FluentDictionary<string, object>());
218+
SettingsDescriptor = null;
219+
SettingsDescriptorAction = null;
220+
SettingsValue = settings;
221+
return Self;
222+
}
223+
224+
public PutTemplateRequestDescriptor<TDocument> Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor<TDocument> descriptor)
225+
{
226+
SettingsValue = null;
227+
SettingsDescriptorAction = null;
228+
SettingsDescriptor = descriptor;
229+
return Self;
230+
}
231+
232+
public PutTemplateRequestDescriptor<TDocument> Settings(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor<TDocument>> configure)
233+
{
234+
SettingsValue = null;
235+
SettingsDescriptor = null;
236+
SettingsDescriptorAction = configure;
217237
return Self;
218238
}
219239

@@ -263,7 +283,17 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
263283
writer.WriteNumberValue(OrderValue.Value);
264284
}
265285

266-
if (SettingsValue is not null)
286+
if (SettingsDescriptor is not null)
287+
{
288+
writer.WritePropertyName("settings");
289+
JsonSerializer.Serialize(writer, SettingsDescriptor, options);
290+
}
291+
else if (SettingsDescriptorAction is not null)
292+
{
293+
writer.WritePropertyName("settings");
294+
JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor<TDocument>(SettingsDescriptorAction), options);
295+
}
296+
else if (SettingsValue is not null)
267297
{
268298
writer.WritePropertyName("settings");
269299
JsonSerializer.Serialize(writer, SettingsValue, options);
@@ -314,7 +344,9 @@ public PutTemplateRequestDescriptor Name(Elastic.Clients.Elasticsearch.Serverles
314344
private Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor MappingsDescriptor { get; set; }
315345
private Action<Elastic.Clients.Elasticsearch.Serverless.Mapping.TypeMappingDescriptor> MappingsDescriptorAction { get; set; }
316346
private int? OrderValue { get; set; }
317-
private IDictionary<string, object>? SettingsValue { get; set; }
347+
private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? SettingsValue { get; set; }
348+
private Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor SettingsDescriptor { get; set; }
349+
private Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor> SettingsDescriptorAction { get; set; }
318350
private long? VersionValue { get; set; }
319351

320352
/// <summary>
@@ -375,9 +407,27 @@ public PutTemplateRequestDescriptor Order(int? order)
375407
/// <summary>
376408
/// <para>Configuration options for the index.</para>
377409
/// </summary>
378-
public PutTemplateRequestDescriptor Settings(Func<FluentDictionary<string, object>, FluentDictionary<string, object>> selector)
410+
public PutTemplateRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettings? settings)
379411
{
380-
SettingsValue = selector?.Invoke(new FluentDictionary<string, object>());
412+
SettingsDescriptor = null;
413+
SettingsDescriptorAction = null;
414+
SettingsValue = settings;
415+
return Self;
416+
}
417+
418+
public PutTemplateRequestDescriptor Settings(Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor descriptor)
419+
{
420+
SettingsValue = null;
421+
SettingsDescriptorAction = null;
422+
SettingsDescriptor = descriptor;
423+
return Self;
424+
}
425+
426+
public PutTemplateRequestDescriptor Settings(Action<Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor> configure)
427+
{
428+
SettingsValue = null;
429+
SettingsDescriptor = null;
430+
SettingsDescriptorAction = configure;
381431
return Self;
382432
}
383433

@@ -427,7 +477,17 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
427477
writer.WriteNumberValue(OrderValue.Value);
428478
}
429479

430-
if (SettingsValue is not null)
480+
if (SettingsDescriptor is not null)
481+
{
482+
writer.WritePropertyName("settings");
483+
JsonSerializer.Serialize(writer, SettingsDescriptor, options);
484+
}
485+
else if (SettingsDescriptorAction is not null)
486+
{
487+
writer.WritePropertyName("settings");
488+
JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.IndexManagement.IndexSettingsDescriptor(SettingsDescriptorAction), options);
489+
}
490+
else if (SettingsValue is not null)
431491
{
432492
writer.WritePropertyName("settings");
433493
JsonSerializer.Serialize(writer, SettingsValue, options);

Diff for: src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/IndexResponse.g.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public sealed partial class IndexResponse : ElasticsearchResponse
3939
[JsonInclude, JsonPropertyName("result")]
4040
public Elastic.Clients.Elasticsearch.Serverless.Result Result { get; init; }
4141
[JsonInclude, JsonPropertyName("_seq_no")]
42-
public long SeqNo { get; init; }
42+
public long? SeqNo { get; init; }
4343
[JsonInclude, JsonPropertyName("_shards")]
4444
public Elastic.Clients.Elasticsearch.Serverless.ShardStatistics Shards { get; init; }
4545
[JsonInclude, JsonPropertyName("_version")]

Diff for: src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchRequest.g.cs

+110
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,12 @@ public override SearchRequest Read(ref Utf8JsonReader reader, Type typeToConvert
291291
continue;
292292
}
293293

294+
if (property == "retriever")
295+
{
296+
variant.Retriever = JsonSerializer.Deserialize<Elastic.Clients.Elasticsearch.Serverless.Retriever?>(ref reader, options);
297+
continue;
298+
}
299+
294300
if (property == "runtime_mappings")
295301
{
296302
variant.RuntimeMappings = JsonSerializer.Deserialize<IDictionary<Elastic.Clients.Elasticsearch.Serverless.Field, Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeField>?>(ref reader, options);
@@ -497,6 +503,12 @@ public override void Write(Utf8JsonWriter writer, SearchRequest value, JsonSeria
497503
JsonSerializer.Serialize(writer, value.Rescore, options);
498504
}
499505

506+
if (value.Retriever is not null)
507+
{
508+
writer.WritePropertyName("retriever");
509+
JsonSerializer.Serialize(writer, value.Retriever, options);
510+
}
511+
500512
if (value.RuntimeMappings is not null)
501513
{
502514
writer.WritePropertyName("runtime_mappings");
@@ -897,6 +909,12 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices)
897909
[SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore))]
898910
public ICollection<Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore>? Rescore { get; set; }
899911

912+
/// <summary>
913+
/// <para>A retriever is a specification to describe top documents returned from a search. A retriever replaces other elements of the search API that also return top documents such as query and knn.</para>
914+
/// </summary>
915+
[JsonInclude, JsonPropertyName("retriever")]
916+
public Elastic.Clients.Elasticsearch.Serverless.Retriever? Retriever { get; set; }
917+
900918
/// <summary>
901919
/// <para>Defines one or more runtime fields in the search request.<br/>These fields take precedence over mapped fields with the same name.</para>
902920
/// </summary>
@@ -1096,6 +1114,9 @@ public SearchRequestDescriptor<TDocument> Indices(Elastic.Clients.Elasticsearch.
10961114
private Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor<TDocument> RescoreDescriptor { get; set; }
10971115
private Action<Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor<TDocument>> RescoreDescriptorAction { get; set; }
10981116
private Action<Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor<TDocument>>[] RescoreDescriptorActions { get; set; }
1117+
private Elastic.Clients.Elasticsearch.Serverless.Retriever? RetrieverValue { get; set; }
1118+
private Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor<TDocument> RetrieverDescriptor { get; set; }
1119+
private Action<Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor<TDocument>> RetrieverDescriptorAction { get; set; }
10991120
private IDictionary<Elastic.Clients.Elasticsearch.Serverless.Field, Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldDescriptor<TDocument>> RuntimeMappingsValue { get; set; }
11001121
private IDictionary<string, Elastic.Clients.Elasticsearch.Serverless.ScriptFieldDescriptor> ScriptFieldsValue { get; set; }
11011122
private ICollection<Elastic.Clients.Elasticsearch.Serverless.FieldValue>? SearchAfterValue { get; set; }
@@ -1501,6 +1522,33 @@ public SearchRequestDescriptor<TDocument> Rescore(params Action<Elastic.Clients.
15011522
return Self;
15021523
}
15031524

1525+
/// <summary>
1526+
/// <para>A retriever is a specification to describe top documents returned from a search. A retriever replaces other elements of the search API that also return top documents such as query and knn.</para>
1527+
/// </summary>
1528+
public SearchRequestDescriptor<TDocument> Retriever(Elastic.Clients.Elasticsearch.Serverless.Retriever? retriever)
1529+
{
1530+
RetrieverDescriptor = null;
1531+
RetrieverDescriptorAction = null;
1532+
RetrieverValue = retriever;
1533+
return Self;
1534+
}
1535+
1536+
public SearchRequestDescriptor<TDocument> Retriever(Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor<TDocument> descriptor)
1537+
{
1538+
RetrieverValue = null;
1539+
RetrieverDescriptorAction = null;
1540+
RetrieverDescriptor = descriptor;
1541+
return Self;
1542+
}
1543+
1544+
public SearchRequestDescriptor<TDocument> Retriever(Action<Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor<TDocument>> configure)
1545+
{
1546+
RetrieverValue = null;
1547+
RetrieverDescriptor = null;
1548+
RetrieverDescriptorAction = configure;
1549+
return Self;
1550+
}
1551+
15041552
/// <summary>
15051553
/// <para>Defines one or more runtime fields in the search request.<br/>These fields take precedence over mapped fields with the same name.</para>
15061554
/// </summary>
@@ -1972,6 +2020,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
19722020
SingleOrManySerializationHelper.Serialize<Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore>(RescoreValue, writer, options);
19732021
}
19742022

2023+
if (RetrieverDescriptor is not null)
2024+
{
2025+
writer.WritePropertyName("retriever");
2026+
JsonSerializer.Serialize(writer, RetrieverDescriptor, options);
2027+
}
2028+
else if (RetrieverDescriptorAction is not null)
2029+
{
2030+
writer.WritePropertyName("retriever");
2031+
JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor<TDocument>(RetrieverDescriptorAction), options);
2032+
}
2033+
else if (RetrieverValue is not null)
2034+
{
2035+
writer.WritePropertyName("retriever");
2036+
JsonSerializer.Serialize(writer, RetrieverValue, options);
2037+
}
2038+
19752039
if (RuntimeMappingsValue is not null)
19762040
{
19772041
writer.WritePropertyName("runtime_mappings");
@@ -2215,6 +2279,9 @@ public SearchRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Serverless.
22152279
private Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor RescoreDescriptor { get; set; }
22162280
private Action<Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor> RescoreDescriptorAction { get; set; }
22172281
private Action<Elastic.Clients.Elasticsearch.Serverless.Core.Search.RescoreDescriptor>[] RescoreDescriptorActions { get; set; }
2282+
private Elastic.Clients.Elasticsearch.Serverless.Retriever? RetrieverValue { get; set; }
2283+
private Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor RetrieverDescriptor { get; set; }
2284+
private Action<Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor> RetrieverDescriptorAction { get; set; }
22182285
private IDictionary<Elastic.Clients.Elasticsearch.Serverless.Field, Elastic.Clients.Elasticsearch.Serverless.Mapping.RuntimeFieldDescriptor> RuntimeMappingsValue { get; set; }
22192286
private IDictionary<string, Elastic.Clients.Elasticsearch.Serverless.ScriptFieldDescriptor> ScriptFieldsValue { get; set; }
22202287
private ICollection<Elastic.Clients.Elasticsearch.Serverless.FieldValue>? SearchAfterValue { get; set; }
@@ -2620,6 +2687,33 @@ public SearchRequestDescriptor Rescore(params Action<Elastic.Clients.Elasticsear
26202687
return Self;
26212688
}
26222689

2690+
/// <summary>
2691+
/// <para>A retriever is a specification to describe top documents returned from a search. A retriever replaces other elements of the search API that also return top documents such as query and knn.</para>
2692+
/// </summary>
2693+
public SearchRequestDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.Retriever? retriever)
2694+
{
2695+
RetrieverDescriptor = null;
2696+
RetrieverDescriptorAction = null;
2697+
RetrieverValue = retriever;
2698+
return Self;
2699+
}
2700+
2701+
public SearchRequestDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor descriptor)
2702+
{
2703+
RetrieverValue = null;
2704+
RetrieverDescriptorAction = null;
2705+
RetrieverDescriptor = descriptor;
2706+
return Self;
2707+
}
2708+
2709+
public SearchRequestDescriptor Retriever(Action<Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor> configure)
2710+
{
2711+
RetrieverValue = null;
2712+
RetrieverDescriptor = null;
2713+
RetrieverDescriptorAction = configure;
2714+
return Self;
2715+
}
2716+
26232717
/// <summary>
26242718
/// <para>Defines one or more runtime fields in the search request.<br/>These fields take precedence over mapped fields with the same name.</para>
26252719
/// </summary>
@@ -3091,6 +3185,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
30913185
SingleOrManySerializationHelper.Serialize<Elastic.Clients.Elasticsearch.Serverless.Core.Search.Rescore>(RescoreValue, writer, options);
30923186
}
30933187

3188+
if (RetrieverDescriptor is not null)
3189+
{
3190+
writer.WritePropertyName("retriever");
3191+
JsonSerializer.Serialize(writer, RetrieverDescriptor, options);
3192+
}
3193+
else if (RetrieverDescriptorAction is not null)
3194+
{
3195+
writer.WritePropertyName("retriever");
3196+
JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor(RetrieverDescriptorAction), options);
3197+
}
3198+
else if (RetrieverValue is not null)
3199+
{
3200+
writer.WritePropertyName("retriever");
3201+
JsonSerializer.Serialize(writer, RetrieverValue, options);
3202+
}
3203+
30943204
if (RuntimeMappingsValue is not null)
30953205
{
30963206
writer.WritePropertyName("runtime_mappings");

0 commit comments

Comments
 (0)