diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs
index a23a386c0e4..220a0037511 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs
@@ -28,11 +28,21 @@ namespace Elastic.Clients.Elasticsearch.AsyncSearch;
public sealed partial class AsyncSearchStatusResponse : ElasticsearchResponse
{
+ ///
+ /// Metadata about clusters involved in the cross-cluster search.
Not shown for local-only searches.
+ ///
+ [JsonInclude, JsonPropertyName("_clusters")]
+ public Elastic.Clients.Elasticsearch.ClusterStatistics? Clusters { get; init; }
+
///
/// If the async search completed, this field shows the status code of the search.
For example, 200 indicates that the async search was successfully completed.
503 indicates that the async search was completed with an error.
///
[JsonInclude, JsonPropertyName("completion_status")]
public int? CompletionStatus { get; init; }
+ [JsonInclude, JsonPropertyName("completion_time")]
+ public DateTimeOffset? CompletionTime { get; init; }
+ [JsonInclude, JsonPropertyName("completion_time_in_millis")]
+ public long? CompletionTimeInMillis { get; init; }
[JsonInclude, JsonPropertyName("expiration_time")]
public DateTimeOffset? ExpirationTime { get; init; }
[JsonInclude, JsonPropertyName("expiration_time_in_millis")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs
index 92e32556c43..77218e32631 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs
@@ -28,6 +28,10 @@ namespace Elastic.Clients.Elasticsearch.AsyncSearch;
public sealed partial class GetAsyncSearchResponse : ElasticsearchResponse
{
+ [JsonInclude, JsonPropertyName("completion_time")]
+ public DateTimeOffset? CompletionTime { get; init; }
+ [JsonInclude, JsonPropertyName("completion_time_in_millis")]
+ public long? CompletionTimeInMillis { get; init; }
[JsonInclude, JsonPropertyName("expiration_time")]
public DateTimeOffset? ExpirationTime { get; init; }
[JsonInclude, JsonPropertyName("expiration_time_in_millis")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs
index a923dc3cfc3..8fff6812e51 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs
@@ -28,6 +28,10 @@ namespace Elastic.Clients.Elasticsearch.AsyncSearch;
public sealed partial class SubmitAsyncSearchResponse : ElasticsearchResponse
{
+ [JsonInclude, JsonPropertyName("completion_time")]
+ public DateTimeOffset? CompletionTime { get; init; }
+ [JsonInclude, JsonPropertyName("completion_time_in_millis")]
+ public long? CompletionTimeInMillis { get; init; }
[JsonInclude, JsonPropertyName("expiration_time")]
public DateTimeOffset? ExpirationTime { get; init; }
[JsonInclude, JsonPropertyName("expiration_time_in_millis")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Aggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Aggregation.g.cs
index 5cd895bce0b..80370a8dd10 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Aggregation.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/Aggregation.g.cs
@@ -232,6 +232,16 @@ public override Aggregation Read(ref Utf8JsonReader reader, Type typeToConvert,
return AggregationSerializationHelper.ReadContainer("parent", ref reader, options);
}
+ if (propertyName == "percentile_ranks")
+ {
+ return AggregationSerializationHelper.ReadContainer("percentile_ranks", ref reader, options);
+ }
+
+ if (propertyName == "percentiles")
+ {
+ return AggregationSerializationHelper.ReadContainer("percentiles", ref reader, options);
+ }
+
if (propertyName == "percentiles_bucket")
{
return AggregationSerializationHelper.ReadContainer("percentiles_bucket", ref reader, options);
@@ -545,6 +555,16 @@ public AggregationDescriptor Parent(string name, Action PercentileRanks(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("percentile_ranks", configure));
+ }
+
+ public AggregationDescriptor Percentiles(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("percentiles", configure));
+ }
+
public AggregationDescriptor PercentilesBucket(string name, Action configure)
{
return SetContainer(name, Aggregation.CreateWithAction("percentiles_bucket", configure));
@@ -999,6 +1019,26 @@ public AggregationDescriptor Parent(string name, Action configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("percentile_ranks", configure));
+ }
+
+ public AggregationDescriptor PercentileRanks(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("percentile_ranks", configure));
+ }
+
+ public AggregationDescriptor Percentiles(string name, Action configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("percentiles", configure));
+ }
+
+ public AggregationDescriptor Percentiles(string name, Action> configure)
+ {
+ return SetContainer(name, Aggregation.CreateWithAction("percentiles", configure));
+ }
+
public AggregationDescriptor PercentilesBucket(string name, Action configure)
{
return SetContainer(name, Aggregation.CreateWithAction("percentiles_bucket", configure));
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HdrMethod.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HdrMethod.g.cs
new file mode 100644
index 00000000000..2ec10b55d2a
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HdrMethod.g.cs
@@ -0,0 +1,69 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Serialization;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Aggregations;
+
+public sealed partial class HdrMethod
+{
+ ///
+ /// Specifies the resolution of values for the histogram in number of significant digits.
+ ///
+ [JsonInclude, JsonPropertyName("number_of_significant_value_digits")]
+ public int? NumberOfSignificantValueDigits { get; set; }
+}
+
+public sealed partial class HdrMethodDescriptor : SerializableDescriptor
+{
+ internal HdrMethodDescriptor(Action configure) => configure.Invoke(this);
+
+ public HdrMethodDescriptor() : base()
+ {
+ }
+
+ private int? NumberOfSignificantValueDigitsValue { get; set; }
+
+ ///
+ /// Specifies the resolution of values for the histogram in number of significant digits.
+ ///
+ public HdrMethodDescriptor NumberOfSignificantValueDigits(int? numberOfSignificantValueDigits)
+ {
+ NumberOfSignificantValueDigitsValue = numberOfSignificantValueDigits;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ if (NumberOfSignificantValueDigitsValue.HasValue)
+ {
+ writer.WritePropertyName("number_of_significant_value_digits");
+ writer.WriteNumberValue(NumberOfSignificantValueDigitsValue.Value);
+ }
+
+ writer.WriteEndObject();
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentileRanksAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentileRanksAggregation.g.cs
new file mode 100644
index 00000000000..f533836144c
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentileRanksAggregation.g.cs
@@ -0,0 +1,642 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Serialization;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Aggregations;
+
+internal sealed class PercentileRanksAggregationConverter : JsonConverter
+{
+ public override PercentileRanksAggregation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ if (reader.TokenType != JsonTokenType.StartObject)
+ throw new JsonException("Unexpected JSON detected.");
+ reader.Read();
+ var aggName = reader.GetString();
+ if (aggName != "percentile_ranks")
+ throw new JsonException("Unexpected JSON detected.");
+ var agg = new PercentileRanksAggregation(aggName);
+ while (reader.Read() && reader.TokenType != JsonTokenType.EndObject)
+ {
+ if (reader.TokenType == JsonTokenType.PropertyName)
+ {
+ if (reader.ValueTextEquals("field"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.Field = value;
+ }
+
+ continue;
+ }
+
+ if (reader.ValueTextEquals("format"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.Format = value;
+ }
+
+ continue;
+ }
+
+ if (reader.ValueTextEquals("hdr"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.Hdr = value;
+ }
+
+ continue;
+ }
+
+ if (reader.ValueTextEquals("missing"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.Missing = value;
+ }
+
+ continue;
+ }
+
+ if (reader.ValueTextEquals("script"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.Script = value;
+ }
+
+ continue;
+ }
+
+ if (reader.ValueTextEquals("tdigest"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.TDigest = value;
+ }
+
+ continue;
+ }
+
+ if (reader.ValueTextEquals("values"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize?>(ref reader, options);
+ if (value is not null)
+ {
+ agg.Values = value;
+ }
+
+ continue;
+ }
+ }
+ }
+
+ while (reader.Read() && reader.TokenType != JsonTokenType.EndObject)
+ {
+ if (reader.TokenType == JsonTokenType.PropertyName)
+ {
+ if (reader.ValueTextEquals("meta"))
+ {
+ var value = JsonSerializer.Deserialize>(ref reader, options);
+ if (value is not null)
+ {
+ agg.Meta = value;
+ }
+
+ continue;
+ }
+ }
+ }
+
+ return agg;
+ }
+
+ public override void Write(Utf8JsonWriter writer, PercentileRanksAggregation value, JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("percentile_ranks");
+ writer.WriteStartObject();
+ if (value.Field is not null)
+ {
+ writer.WritePropertyName("field");
+ JsonSerializer.Serialize(writer, value.Field, options);
+ }
+
+ if (!string.IsNullOrEmpty(value.Format))
+ {
+ writer.WritePropertyName("format");
+ writer.WriteStringValue(value.Format);
+ }
+
+ if (value.Hdr is not null)
+ {
+ writer.WritePropertyName("hdr");
+ JsonSerializer.Serialize(writer, value.Hdr, options);
+ }
+
+ if (value.Missing is not null)
+ {
+ writer.WritePropertyName("missing");
+ JsonSerializer.Serialize(writer, value.Missing, options);
+ }
+
+ if (value.Script is not null)
+ {
+ writer.WritePropertyName("script");
+ JsonSerializer.Serialize(writer, value.Script, options);
+ }
+
+ if (value.TDigest is not null)
+ {
+ writer.WritePropertyName("tdigest");
+ JsonSerializer.Serialize(writer, value.TDigest, options);
+ }
+
+ if (value.Values is not null)
+ {
+ writer.WritePropertyName("values");
+ JsonSerializer.Serialize(writer, value.Values, options);
+ }
+
+ writer.WriteEndObject();
+ if (value.Meta is not null)
+ {
+ writer.WritePropertyName("meta");
+ JsonSerializer.Serialize(writer, value.Meta, options);
+ }
+
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(PercentileRanksAggregationConverter))]
+public sealed partial class PercentileRanksAggregation : SearchAggregation
+{
+ public PercentileRanksAggregation(string name, Field field) : this(name) => Field = field;
+ public PercentileRanksAggregation(string name) => Name = name;
+
+ internal PercentileRanksAggregation()
+ {
+ }
+
+ public Elastic.Clients.Elasticsearch.Field? Field { get; set; }
+ public string? Format { get; set; }
+
+ ///
+ /// Uses the alternative High Dynamic Range Histogram algorithm to calculate percentile ranks.
+ ///
+ public Elastic.Clients.Elasticsearch.Aggregations.HdrMethod? Hdr { get; set; }
+ public IDictionary? Meta { get; set; }
+ public FieldValue? Missing { get; set; }
+ override public string? Name { get; internal set; }
+ public Elastic.Clients.Elasticsearch.Script? Script { get; set; }
+
+ ///
+ /// Sets parameters for the default TDigest algorithm used to calculate percentile ranks.
+ ///
+ public Elastic.Clients.Elasticsearch.Aggregations.TDigest? TDigest { get; set; }
+
+ ///
+ /// An array of values for which to calculate the percentile ranks.
+ ///
+ public ICollection? Values { get; set; }
+}
+
+public sealed partial class PercentileRanksAggregationDescriptor : SerializableDescriptor>
+{
+ internal PercentileRanksAggregationDescriptor(Action> configure) => configure.Invoke(this);
+
+ public PercentileRanksAggregationDescriptor() : base()
+ {
+ }
+
+ private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; }
+ private string? FormatValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Aggregations.HdrMethod? HdrValue { get; set; }
+ private HdrMethodDescriptor HdrDescriptor { get; set; }
+ private Action HdrDescriptorAction { get; set; }
+ private IDictionary? MetaValue { get; set; }
+ private FieldValue? MissingValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Aggregations.TDigest? TDigestValue { get; set; }
+ private TDigestDescriptor TDigestDescriptor { get; set; }
+ private Action TDigestDescriptorAction { get; set; }
+ private ICollection? ValuesValue { get; set; }
+
+ public PercentileRanksAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Field? field)
+ {
+ FieldValue = field;
+ return Self;
+ }
+
+ public PercentileRanksAggregationDescriptor Field(Expression> field)
+ {
+ FieldValue = field;
+ return Self;
+ }
+
+ public PercentileRanksAggregationDescriptor Format(string? format)
+ {
+ FormatValue = format;
+ return Self;
+ }
+
+ ///
+ /// Uses the alternative High Dynamic Range Histogram algorithm to calculate percentile ranks.
+ ///
+ public PercentileRanksAggregationDescriptor Hdr(Elastic.Clients.Elasticsearch.Aggregations.HdrMethod? hdr)
+ {
+ HdrDescriptor = null;
+ HdrDescriptorAction = null;
+ HdrValue = hdr;
+ return Self;
+ }
+
+ public PercentileRanksAggregationDescriptor Hdr(HdrMethodDescriptor descriptor)
+ {
+ HdrValue = null;
+ HdrDescriptorAction = null;
+ HdrDescriptor = descriptor;
+ return Self;
+ }
+
+ public PercentileRanksAggregationDescriptor Hdr(Action configure)
+ {
+ HdrValue = null;
+ HdrDescriptor = null;
+ HdrDescriptorAction = configure;
+ return Self;
+ }
+
+ public PercentileRanksAggregationDescriptor Meta(Func, FluentDictionary> selector)
+ {
+ MetaValue = selector?.Invoke(new FluentDictionary());
+ return Self;
+ }
+
+ public PercentileRanksAggregationDescriptor Missing(FieldValue? missing)
+ {
+ MissingValue = missing;
+ return Self;
+ }
+
+ public PercentileRanksAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Script? script)
+ {
+ ScriptValue = script;
+ return Self;
+ }
+
+ ///
+ /// Sets parameters for the default TDigest algorithm used to calculate percentile ranks.
+ ///
+ public PercentileRanksAggregationDescriptor TDigest(Elastic.Clients.Elasticsearch.Aggregations.TDigest? tDigest)
+ {
+ TDigestDescriptor = null;
+ TDigestDescriptorAction = null;
+ TDigestValue = tDigest;
+ return Self;
+ }
+
+ public PercentileRanksAggregationDescriptor TDigest(TDigestDescriptor descriptor)
+ {
+ TDigestValue = null;
+ TDigestDescriptorAction = null;
+ TDigestDescriptor = descriptor;
+ return Self;
+ }
+
+ public PercentileRanksAggregationDescriptor TDigest(Action configure)
+ {
+ TDigestValue = null;
+ TDigestDescriptor = null;
+ TDigestDescriptorAction = configure;
+ return Self;
+ }
+
+ ///
+ /// An array of values for which to calculate the percentile ranks.
+ ///
+ public PercentileRanksAggregationDescriptor Values(ICollection? values)
+ {
+ ValuesValue = values;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("percentile_ranks");
+ writer.WriteStartObject();
+ if (FieldValue is not null)
+ {
+ writer.WritePropertyName("field");
+ JsonSerializer.Serialize(writer, FieldValue, options);
+ }
+
+ if (!string.IsNullOrEmpty(FormatValue))
+ {
+ writer.WritePropertyName("format");
+ writer.WriteStringValue(FormatValue);
+ }
+
+ if (HdrDescriptor is not null)
+ {
+ writer.WritePropertyName("hdr");
+ JsonSerializer.Serialize(writer, HdrDescriptor, options);
+ }
+ else if (HdrDescriptorAction is not null)
+ {
+ writer.WritePropertyName("hdr");
+ JsonSerializer.Serialize(writer, new HdrMethodDescriptor(HdrDescriptorAction), options);
+ }
+ else if (HdrValue is not null)
+ {
+ writer.WritePropertyName("hdr");
+ JsonSerializer.Serialize(writer, HdrValue, options);
+ }
+
+ if (MissingValue is not null)
+ {
+ writer.WritePropertyName("missing");
+ JsonSerializer.Serialize(writer, MissingValue, options);
+ }
+
+ if (ScriptValue is not null)
+ {
+ writer.WritePropertyName("script");
+ JsonSerializer.Serialize(writer, ScriptValue, options);
+ }
+
+ if (TDigestDescriptor is not null)
+ {
+ writer.WritePropertyName("tdigest");
+ JsonSerializer.Serialize(writer, TDigestDescriptor, options);
+ }
+ else if (TDigestDescriptorAction is not null)
+ {
+ writer.WritePropertyName("tdigest");
+ JsonSerializer.Serialize(writer, new TDigestDescriptor(TDigestDescriptorAction), options);
+ }
+ else if (TDigestValue is not null)
+ {
+ writer.WritePropertyName("tdigest");
+ JsonSerializer.Serialize(writer, TDigestValue, options);
+ }
+
+ if (ValuesValue is not null)
+ {
+ writer.WritePropertyName("values");
+ JsonSerializer.Serialize(writer, ValuesValue, options);
+ }
+
+ writer.WriteEndObject();
+ if (MetaValue is not null)
+ {
+ writer.WritePropertyName("meta");
+ JsonSerializer.Serialize(writer, MetaValue, options);
+ }
+
+ writer.WriteEndObject();
+ }
+}
+
+public sealed partial class PercentileRanksAggregationDescriptor : SerializableDescriptor
+{
+ internal PercentileRanksAggregationDescriptor(Action configure) => configure.Invoke(this);
+
+ public PercentileRanksAggregationDescriptor() : base()
+ {
+ }
+
+ private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; }
+ private string? FormatValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Aggregations.HdrMethod? HdrValue { get; set; }
+ private HdrMethodDescriptor HdrDescriptor { get; set; }
+ private Action HdrDescriptorAction { get; set; }
+ private IDictionary? MetaValue { get; set; }
+ private FieldValue? MissingValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Aggregations.TDigest? TDigestValue { get; set; }
+ private TDigestDescriptor TDigestDescriptor { get; set; }
+ private Action TDigestDescriptorAction { get; set; }
+ private ICollection? ValuesValue { get; set; }
+
+ public PercentileRanksAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Field? field)
+ {
+ FieldValue = field;
+ return Self;
+ }
+
+ public PercentileRanksAggregationDescriptor Field(Expression> field)
+ {
+ FieldValue = field;
+ return Self;
+ }
+
+ public PercentileRanksAggregationDescriptor Field(Expression> field)
+ {
+ FieldValue = field;
+ return Self;
+ }
+
+ public PercentileRanksAggregationDescriptor Format(string? format)
+ {
+ FormatValue = format;
+ return Self;
+ }
+
+ ///
+ /// Uses the alternative High Dynamic Range Histogram algorithm to calculate percentile ranks.
+ ///
+ public PercentileRanksAggregationDescriptor Hdr(Elastic.Clients.Elasticsearch.Aggregations.HdrMethod? hdr)
+ {
+ HdrDescriptor = null;
+ HdrDescriptorAction = null;
+ HdrValue = hdr;
+ return Self;
+ }
+
+ public PercentileRanksAggregationDescriptor Hdr(HdrMethodDescriptor descriptor)
+ {
+ HdrValue = null;
+ HdrDescriptorAction = null;
+ HdrDescriptor = descriptor;
+ return Self;
+ }
+
+ public PercentileRanksAggregationDescriptor Hdr(Action configure)
+ {
+ HdrValue = null;
+ HdrDescriptor = null;
+ HdrDescriptorAction = configure;
+ return Self;
+ }
+
+ public PercentileRanksAggregationDescriptor Meta(Func, FluentDictionary> selector)
+ {
+ MetaValue = selector?.Invoke(new FluentDictionary());
+ return Self;
+ }
+
+ public PercentileRanksAggregationDescriptor Missing(FieldValue? missing)
+ {
+ MissingValue = missing;
+ return Self;
+ }
+
+ public PercentileRanksAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Script? script)
+ {
+ ScriptValue = script;
+ return Self;
+ }
+
+ ///
+ /// Sets parameters for the default TDigest algorithm used to calculate percentile ranks.
+ ///
+ public PercentileRanksAggregationDescriptor TDigest(Elastic.Clients.Elasticsearch.Aggregations.TDigest? tDigest)
+ {
+ TDigestDescriptor = null;
+ TDigestDescriptorAction = null;
+ TDigestValue = tDigest;
+ return Self;
+ }
+
+ public PercentileRanksAggregationDescriptor TDigest(TDigestDescriptor descriptor)
+ {
+ TDigestValue = null;
+ TDigestDescriptorAction = null;
+ TDigestDescriptor = descriptor;
+ return Self;
+ }
+
+ public PercentileRanksAggregationDescriptor TDigest(Action configure)
+ {
+ TDigestValue = null;
+ TDigestDescriptor = null;
+ TDigestDescriptorAction = configure;
+ return Self;
+ }
+
+ ///
+ /// An array of values for which to calculate the percentile ranks.
+ ///
+ public PercentileRanksAggregationDescriptor Values(ICollection? values)
+ {
+ ValuesValue = values;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("percentile_ranks");
+ writer.WriteStartObject();
+ if (FieldValue is not null)
+ {
+ writer.WritePropertyName("field");
+ JsonSerializer.Serialize(writer, FieldValue, options);
+ }
+
+ if (!string.IsNullOrEmpty(FormatValue))
+ {
+ writer.WritePropertyName("format");
+ writer.WriteStringValue(FormatValue);
+ }
+
+ if (HdrDescriptor is not null)
+ {
+ writer.WritePropertyName("hdr");
+ JsonSerializer.Serialize(writer, HdrDescriptor, options);
+ }
+ else if (HdrDescriptorAction is not null)
+ {
+ writer.WritePropertyName("hdr");
+ JsonSerializer.Serialize(writer, new HdrMethodDescriptor(HdrDescriptorAction), options);
+ }
+ else if (HdrValue is not null)
+ {
+ writer.WritePropertyName("hdr");
+ JsonSerializer.Serialize(writer, HdrValue, options);
+ }
+
+ if (MissingValue is not null)
+ {
+ writer.WritePropertyName("missing");
+ JsonSerializer.Serialize(writer, MissingValue, options);
+ }
+
+ if (ScriptValue is not null)
+ {
+ writer.WritePropertyName("script");
+ JsonSerializer.Serialize(writer, ScriptValue, options);
+ }
+
+ if (TDigestDescriptor is not null)
+ {
+ writer.WritePropertyName("tdigest");
+ JsonSerializer.Serialize(writer, TDigestDescriptor, options);
+ }
+ else if (TDigestDescriptorAction is not null)
+ {
+ writer.WritePropertyName("tdigest");
+ JsonSerializer.Serialize(writer, new TDigestDescriptor(TDigestDescriptorAction), options);
+ }
+ else if (TDigestValue is not null)
+ {
+ writer.WritePropertyName("tdigest");
+ JsonSerializer.Serialize(writer, TDigestValue, options);
+ }
+
+ if (ValuesValue is not null)
+ {
+ writer.WritePropertyName("values");
+ JsonSerializer.Serialize(writer, ValuesValue, options);
+ }
+
+ writer.WriteEndObject();
+ if (MetaValue is not null)
+ {
+ writer.WritePropertyName("meta");
+ JsonSerializer.Serialize(writer, MetaValue, options);
+ }
+
+ writer.WriteEndObject();
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesAggregation.g.cs
new file mode 100644
index 00000000000..2263f4ee994
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesAggregation.g.cs
@@ -0,0 +1,642 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Serialization;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Aggregations;
+
+internal sealed class PercentilesAggregationConverter : JsonConverter
+{
+ public override PercentilesAggregation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ if (reader.TokenType != JsonTokenType.StartObject)
+ throw new JsonException("Unexpected JSON detected.");
+ reader.Read();
+ var aggName = reader.GetString();
+ if (aggName != "percentiles")
+ throw new JsonException("Unexpected JSON detected.");
+ var agg = new PercentilesAggregation(aggName);
+ while (reader.Read() && reader.TokenType != JsonTokenType.EndObject)
+ {
+ if (reader.TokenType == JsonTokenType.PropertyName)
+ {
+ if (reader.ValueTextEquals("field"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.Field = value;
+ }
+
+ continue;
+ }
+
+ if (reader.ValueTextEquals("format"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.Format = value;
+ }
+
+ continue;
+ }
+
+ if (reader.ValueTextEquals("hdr"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.Hdr = value;
+ }
+
+ continue;
+ }
+
+ if (reader.ValueTextEquals("missing"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.Missing = value;
+ }
+
+ continue;
+ }
+
+ if (reader.ValueTextEquals("percents"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize?>(ref reader, options);
+ if (value is not null)
+ {
+ agg.Percents = value;
+ }
+
+ continue;
+ }
+
+ if (reader.ValueTextEquals("script"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.Script = value;
+ }
+
+ continue;
+ }
+
+ if (reader.ValueTextEquals("tdigest"))
+ {
+ reader.Read();
+ var value = JsonSerializer.Deserialize(ref reader, options);
+ if (value is not null)
+ {
+ agg.TDigest = value;
+ }
+
+ continue;
+ }
+ }
+ }
+
+ while (reader.Read() && reader.TokenType != JsonTokenType.EndObject)
+ {
+ if (reader.TokenType == JsonTokenType.PropertyName)
+ {
+ if (reader.ValueTextEquals("meta"))
+ {
+ var value = JsonSerializer.Deserialize>(ref reader, options);
+ if (value is not null)
+ {
+ agg.Meta = value;
+ }
+
+ continue;
+ }
+ }
+ }
+
+ return agg;
+ }
+
+ public override void Write(Utf8JsonWriter writer, PercentilesAggregation value, JsonSerializerOptions options)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("percentiles");
+ writer.WriteStartObject();
+ if (value.Field is not null)
+ {
+ writer.WritePropertyName("field");
+ JsonSerializer.Serialize(writer, value.Field, options);
+ }
+
+ if (!string.IsNullOrEmpty(value.Format))
+ {
+ writer.WritePropertyName("format");
+ writer.WriteStringValue(value.Format);
+ }
+
+ if (value.Hdr is not null)
+ {
+ writer.WritePropertyName("hdr");
+ JsonSerializer.Serialize(writer, value.Hdr, options);
+ }
+
+ if (value.Missing is not null)
+ {
+ writer.WritePropertyName("missing");
+ JsonSerializer.Serialize(writer, value.Missing, options);
+ }
+
+ if (value.Percents is not null)
+ {
+ writer.WritePropertyName("percents");
+ JsonSerializer.Serialize(writer, value.Percents, options);
+ }
+
+ if (value.Script is not null)
+ {
+ writer.WritePropertyName("script");
+ JsonSerializer.Serialize(writer, value.Script, options);
+ }
+
+ if (value.TDigest is not null)
+ {
+ writer.WritePropertyName("tdigest");
+ JsonSerializer.Serialize(writer, value.TDigest, options);
+ }
+
+ writer.WriteEndObject();
+ if (value.Meta is not null)
+ {
+ writer.WritePropertyName("meta");
+ JsonSerializer.Serialize(writer, value.Meta, options);
+ }
+
+ writer.WriteEndObject();
+ }
+}
+
+[JsonConverter(typeof(PercentilesAggregationConverter))]
+public sealed partial class PercentilesAggregation : SearchAggregation
+{
+ public PercentilesAggregation(string name, Field field) : this(name) => Field = field;
+ public PercentilesAggregation(string name) => Name = name;
+
+ internal PercentilesAggregation()
+ {
+ }
+
+ public Elastic.Clients.Elasticsearch.Field? Field { get; set; }
+ public string? Format { get; set; }
+
+ ///
+ /// Uses the alternative High Dynamic Range Histogram algorithm to calculate percentiles.
+ ///
+ public Elastic.Clients.Elasticsearch.Aggregations.HdrMethod? Hdr { get; set; }
+ public IDictionary? Meta { get; set; }
+ public FieldValue? Missing { get; set; }
+ override public string? Name { get; internal set; }
+
+ ///
+ /// The percentiles to calculate.
+ ///
+ public ICollection? Percents { get; set; }
+ public Elastic.Clients.Elasticsearch.Script? Script { get; set; }
+
+ ///
+ /// Sets parameters for the default TDigest algorithm used to calculate percentiles.
+ ///
+ public Elastic.Clients.Elasticsearch.Aggregations.TDigest? TDigest { get; set; }
+}
+
+public sealed partial class PercentilesAggregationDescriptor : SerializableDescriptor>
+{
+ internal PercentilesAggregationDescriptor(Action> configure) => configure.Invoke(this);
+
+ public PercentilesAggregationDescriptor() : base()
+ {
+ }
+
+ private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; }
+ private string? FormatValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Aggregations.HdrMethod? HdrValue { get; set; }
+ private HdrMethodDescriptor HdrDescriptor { get; set; }
+ private Action HdrDescriptorAction { get; set; }
+ private IDictionary? MetaValue { get; set; }
+ private FieldValue? MissingValue { get; set; }
+ private ICollection? PercentsValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Aggregations.TDigest? TDigestValue { get; set; }
+ private TDigestDescriptor TDigestDescriptor { get; set; }
+ private Action TDigestDescriptorAction { get; set; }
+
+ public PercentilesAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Field? field)
+ {
+ FieldValue = field;
+ return Self;
+ }
+
+ public PercentilesAggregationDescriptor Field(Expression> field)
+ {
+ FieldValue = field;
+ return Self;
+ }
+
+ public PercentilesAggregationDescriptor Format(string? format)
+ {
+ FormatValue = format;
+ return Self;
+ }
+
+ ///
+ /// Uses the alternative High Dynamic Range Histogram algorithm to calculate percentiles.
+ ///
+ public PercentilesAggregationDescriptor Hdr(Elastic.Clients.Elasticsearch.Aggregations.HdrMethod? hdr)
+ {
+ HdrDescriptor = null;
+ HdrDescriptorAction = null;
+ HdrValue = hdr;
+ return Self;
+ }
+
+ public PercentilesAggregationDescriptor Hdr(HdrMethodDescriptor descriptor)
+ {
+ HdrValue = null;
+ HdrDescriptorAction = null;
+ HdrDescriptor = descriptor;
+ return Self;
+ }
+
+ public PercentilesAggregationDescriptor Hdr(Action configure)
+ {
+ HdrValue = null;
+ HdrDescriptor = null;
+ HdrDescriptorAction = configure;
+ return Self;
+ }
+
+ public PercentilesAggregationDescriptor Meta(Func, FluentDictionary> selector)
+ {
+ MetaValue = selector?.Invoke(new FluentDictionary());
+ return Self;
+ }
+
+ public PercentilesAggregationDescriptor Missing(FieldValue? missing)
+ {
+ MissingValue = missing;
+ return Self;
+ }
+
+ ///
+ /// The percentiles to calculate.
+ ///
+ public PercentilesAggregationDescriptor Percents(ICollection? percents)
+ {
+ PercentsValue = percents;
+ return Self;
+ }
+
+ public PercentilesAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Script? script)
+ {
+ ScriptValue = script;
+ return Self;
+ }
+
+ ///
+ /// Sets parameters for the default TDigest algorithm used to calculate percentiles.
+ ///
+ public PercentilesAggregationDescriptor TDigest(Elastic.Clients.Elasticsearch.Aggregations.TDigest? tDigest)
+ {
+ TDigestDescriptor = null;
+ TDigestDescriptorAction = null;
+ TDigestValue = tDigest;
+ return Self;
+ }
+
+ public PercentilesAggregationDescriptor TDigest(TDigestDescriptor descriptor)
+ {
+ TDigestValue = null;
+ TDigestDescriptorAction = null;
+ TDigestDescriptor = descriptor;
+ return Self;
+ }
+
+ public PercentilesAggregationDescriptor TDigest(Action configure)
+ {
+ TDigestValue = null;
+ TDigestDescriptor = null;
+ TDigestDescriptorAction = configure;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("percentiles");
+ writer.WriteStartObject();
+ if (FieldValue is not null)
+ {
+ writer.WritePropertyName("field");
+ JsonSerializer.Serialize(writer, FieldValue, options);
+ }
+
+ if (!string.IsNullOrEmpty(FormatValue))
+ {
+ writer.WritePropertyName("format");
+ writer.WriteStringValue(FormatValue);
+ }
+
+ if (HdrDescriptor is not null)
+ {
+ writer.WritePropertyName("hdr");
+ JsonSerializer.Serialize(writer, HdrDescriptor, options);
+ }
+ else if (HdrDescriptorAction is not null)
+ {
+ writer.WritePropertyName("hdr");
+ JsonSerializer.Serialize(writer, new HdrMethodDescriptor(HdrDescriptorAction), options);
+ }
+ else if (HdrValue is not null)
+ {
+ writer.WritePropertyName("hdr");
+ JsonSerializer.Serialize(writer, HdrValue, options);
+ }
+
+ if (MissingValue is not null)
+ {
+ writer.WritePropertyName("missing");
+ JsonSerializer.Serialize(writer, MissingValue, options);
+ }
+
+ if (PercentsValue is not null)
+ {
+ writer.WritePropertyName("percents");
+ JsonSerializer.Serialize(writer, PercentsValue, options);
+ }
+
+ if (ScriptValue is not null)
+ {
+ writer.WritePropertyName("script");
+ JsonSerializer.Serialize(writer, ScriptValue, options);
+ }
+
+ if (TDigestDescriptor is not null)
+ {
+ writer.WritePropertyName("tdigest");
+ JsonSerializer.Serialize(writer, TDigestDescriptor, options);
+ }
+ else if (TDigestDescriptorAction is not null)
+ {
+ writer.WritePropertyName("tdigest");
+ JsonSerializer.Serialize(writer, new TDigestDescriptor(TDigestDescriptorAction), options);
+ }
+ else if (TDigestValue is not null)
+ {
+ writer.WritePropertyName("tdigest");
+ JsonSerializer.Serialize(writer, TDigestValue, options);
+ }
+
+ writer.WriteEndObject();
+ if (MetaValue is not null)
+ {
+ writer.WritePropertyName("meta");
+ JsonSerializer.Serialize(writer, MetaValue, options);
+ }
+
+ writer.WriteEndObject();
+ }
+}
+
+public sealed partial class PercentilesAggregationDescriptor : SerializableDescriptor
+{
+ internal PercentilesAggregationDescriptor(Action configure) => configure.Invoke(this);
+
+ public PercentilesAggregationDescriptor() : base()
+ {
+ }
+
+ private Elastic.Clients.Elasticsearch.Field? FieldValue { get; set; }
+ private string? FormatValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Aggregations.HdrMethod? HdrValue { get; set; }
+ private HdrMethodDescriptor HdrDescriptor { get; set; }
+ private Action HdrDescriptorAction { get; set; }
+ private IDictionary? MetaValue { get; set; }
+ private FieldValue? MissingValue { get; set; }
+ private ICollection? PercentsValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Script? ScriptValue { get; set; }
+ private Elastic.Clients.Elasticsearch.Aggregations.TDigest? TDigestValue { get; set; }
+ private TDigestDescriptor TDigestDescriptor { get; set; }
+ private Action TDigestDescriptorAction { get; set; }
+
+ public PercentilesAggregationDescriptor Field(Elastic.Clients.Elasticsearch.Field? field)
+ {
+ FieldValue = field;
+ return Self;
+ }
+
+ public PercentilesAggregationDescriptor Field(Expression> field)
+ {
+ FieldValue = field;
+ return Self;
+ }
+
+ public PercentilesAggregationDescriptor Field(Expression> field)
+ {
+ FieldValue = field;
+ return Self;
+ }
+
+ public PercentilesAggregationDescriptor Format(string? format)
+ {
+ FormatValue = format;
+ return Self;
+ }
+
+ ///
+ /// Uses the alternative High Dynamic Range Histogram algorithm to calculate percentiles.
+ ///
+ public PercentilesAggregationDescriptor Hdr(Elastic.Clients.Elasticsearch.Aggregations.HdrMethod? hdr)
+ {
+ HdrDescriptor = null;
+ HdrDescriptorAction = null;
+ HdrValue = hdr;
+ return Self;
+ }
+
+ public PercentilesAggregationDescriptor Hdr(HdrMethodDescriptor descriptor)
+ {
+ HdrValue = null;
+ HdrDescriptorAction = null;
+ HdrDescriptor = descriptor;
+ return Self;
+ }
+
+ public PercentilesAggregationDescriptor Hdr(Action configure)
+ {
+ HdrValue = null;
+ HdrDescriptor = null;
+ HdrDescriptorAction = configure;
+ return Self;
+ }
+
+ public PercentilesAggregationDescriptor Meta(Func, FluentDictionary> selector)
+ {
+ MetaValue = selector?.Invoke(new FluentDictionary());
+ return Self;
+ }
+
+ public PercentilesAggregationDescriptor Missing(FieldValue? missing)
+ {
+ MissingValue = missing;
+ return Self;
+ }
+
+ ///
+ /// The percentiles to calculate.
+ ///
+ public PercentilesAggregationDescriptor Percents(ICollection? percents)
+ {
+ PercentsValue = percents;
+ return Self;
+ }
+
+ public PercentilesAggregationDescriptor Script(Elastic.Clients.Elasticsearch.Script? script)
+ {
+ ScriptValue = script;
+ return Self;
+ }
+
+ ///
+ /// Sets parameters for the default TDigest algorithm used to calculate percentiles.
+ ///
+ public PercentilesAggregationDescriptor TDigest(Elastic.Clients.Elasticsearch.Aggregations.TDigest? tDigest)
+ {
+ TDigestDescriptor = null;
+ TDigestDescriptorAction = null;
+ TDigestValue = tDigest;
+ return Self;
+ }
+
+ public PercentilesAggregationDescriptor TDigest(TDigestDescriptor descriptor)
+ {
+ TDigestValue = null;
+ TDigestDescriptorAction = null;
+ TDigestDescriptor = descriptor;
+ return Self;
+ }
+
+ public PercentilesAggregationDescriptor TDigest(Action configure)
+ {
+ TDigestValue = null;
+ TDigestDescriptor = null;
+ TDigestDescriptorAction = configure;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("percentiles");
+ writer.WriteStartObject();
+ if (FieldValue is not null)
+ {
+ writer.WritePropertyName("field");
+ JsonSerializer.Serialize(writer, FieldValue, options);
+ }
+
+ if (!string.IsNullOrEmpty(FormatValue))
+ {
+ writer.WritePropertyName("format");
+ writer.WriteStringValue(FormatValue);
+ }
+
+ if (HdrDescriptor is not null)
+ {
+ writer.WritePropertyName("hdr");
+ JsonSerializer.Serialize(writer, HdrDescriptor, options);
+ }
+ else if (HdrDescriptorAction is not null)
+ {
+ writer.WritePropertyName("hdr");
+ JsonSerializer.Serialize(writer, new HdrMethodDescriptor(HdrDescriptorAction), options);
+ }
+ else if (HdrValue is not null)
+ {
+ writer.WritePropertyName("hdr");
+ JsonSerializer.Serialize(writer, HdrValue, options);
+ }
+
+ if (MissingValue is not null)
+ {
+ writer.WritePropertyName("missing");
+ JsonSerializer.Serialize(writer, MissingValue, options);
+ }
+
+ if (PercentsValue is not null)
+ {
+ writer.WritePropertyName("percents");
+ JsonSerializer.Serialize(writer, PercentsValue, options);
+ }
+
+ if (ScriptValue is not null)
+ {
+ writer.WritePropertyName("script");
+ JsonSerializer.Serialize(writer, ScriptValue, options);
+ }
+
+ if (TDigestDescriptor is not null)
+ {
+ writer.WritePropertyName("tdigest");
+ JsonSerializer.Serialize(writer, TDigestDescriptor, options);
+ }
+ else if (TDigestDescriptorAction is not null)
+ {
+ writer.WritePropertyName("tdigest");
+ JsonSerializer.Serialize(writer, new TDigestDescriptor(TDigestDescriptorAction), options);
+ }
+ else if (TDigestValue is not null)
+ {
+ writer.WritePropertyName("tdigest");
+ JsonSerializer.Serialize(writer, TDigestValue, options);
+ }
+
+ writer.WriteEndObject();
+ if (MetaValue is not null)
+ {
+ writer.WritePropertyName("meta");
+ JsonSerializer.Serialize(writer, MetaValue, options);
+ }
+
+ writer.WriteEndObject();
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TDigest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TDigest.g.cs
new file mode 100644
index 00000000000..5ac8d211326
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TDigest.g.cs
@@ -0,0 +1,69 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Serialization;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch.Aggregations;
+
+public sealed partial class TDigest
+{
+ ///
+ /// Limits the maximum number of nodes used by the underlying TDigest algorithm to `20 * compression`, enabling control of memory usage and approximation error.
+ ///
+ [JsonInclude, JsonPropertyName("compression")]
+ public int? Compression { get; set; }
+}
+
+public sealed partial class TDigestDescriptor : SerializableDescriptor
+{
+ internal TDigestDescriptor(Action configure) => configure.Invoke(this);
+
+ public TDigestDescriptor() : base()
+ {
+ }
+
+ private int? CompressionValue { get; set; }
+
+ ///
+ /// Limits the maximum number of nodes used by the underlying TDigest algorithm to `20 * compression`, enabling control of memory usage and approximation error.
+ ///
+ public TDigestDescriptor Compression(int? compression)
+ {
+ CompressionValue = compression;
+ return Self;
+ }
+
+ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
+ {
+ writer.WriteStartObject();
+ if (CompressionValue.HasValue)
+ {
+ writer.WritePropertyName("compression");
+ writer.WriteNumberValue(CompressionValue.Value);
+ }
+
+ writer.WriteEndObject();
+ }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ClusterDetails.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ClusterDetails.g.cs
new file mode 100644
index 00000000000..535f945911e
--- /dev/null
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ClusterDetails.g.cs
@@ -0,0 +1,44 @@
+// Licensed to Elasticsearch B.V under one or more agreements.
+// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
+// See the LICENSE file in the project root for more information.
+//
+// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
+// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
+// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
+// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
+// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
+// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
+// ------------------------------------------------
+//
+// This file is automatically generated.
+// Please do not edit these files manually.
+//
+// ------------------------------------------------
+
+#nullable restore
+
+using Elastic.Clients.Elasticsearch.Fluent;
+using Elastic.Clients.Elasticsearch.Serialization;
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace Elastic.Clients.Elasticsearch;
+
+public sealed partial class ClusterDetails
+{
+ [JsonInclude, JsonPropertyName("_shards")]
+ public Elastic.Clients.Elasticsearch.ShardStatistics? Shards { get; init; }
+ [JsonInclude, JsonPropertyName("failures")]
+ public IReadOnlyCollection? Failures { get; init; }
+ [JsonInclude, JsonPropertyName("indices")]
+ public string Indices { get; init; }
+ [JsonInclude, JsonPropertyName("status")]
+ public Elastic.Clients.Elasticsearch.ClusterSearchStatus Status { get; init; }
+ [JsonInclude, JsonPropertyName("timed_out")]
+ public bool TimedOut { get; init; }
+ [JsonInclude, JsonPropertyName("took")]
+ public long? Took { get; init; }
+}
\ No newline at end of file
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ClusterStatistics.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ClusterStatistics.g.cs
index a1fea4f7973..850bdcd7028 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ClusterStatistics.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ClusterStatistics.g.cs
@@ -29,6 +29,8 @@ namespace Elastic.Clients.Elasticsearch;
public sealed partial class ClusterStatistics
{
+ [JsonInclude, JsonPropertyName("details")]
+ public IReadOnlyDictionary? Details { get; init; }
[JsonInclude, JsonPropertyName("skipped")]
public int Skipped { get; init; }
[JsonInclude, JsonPropertyName("successful")]
diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs
index 71f4cf70ec3..5d375dbc330 100644
--- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs
+++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs
@@ -28,6 +28,68 @@
namespace Elastic.Clients.Elasticsearch;
+[JsonConverter(typeof(ClusterSearchStatusConverter))]
+public enum ClusterSearchStatus
+{
+ [EnumMember(Value = "successful")]
+ Successful,
+ [EnumMember(Value = "skipped")]
+ Skipped,
+ [EnumMember(Value = "running")]
+ Running,
+ [EnumMember(Value = "partial")]
+ Partial,
+ [EnumMember(Value = "failed")]
+ Failed
+}
+
+internal sealed class ClusterSearchStatusConverter : JsonConverter
+{
+ public override ClusterSearchStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ var enumString = reader.GetString();
+ switch (enumString)
+ {
+ case "successful":
+ return ClusterSearchStatus.Successful;
+ case "skipped":
+ return ClusterSearchStatus.Skipped;
+ case "running":
+ return ClusterSearchStatus.Running;
+ case "partial":
+ return ClusterSearchStatus.Partial;
+ case "failed":
+ return ClusterSearchStatus.Failed;
+ }
+
+ ThrowHelper.ThrowJsonException(); return default;
+ }
+
+ public override void Write(Utf8JsonWriter writer, ClusterSearchStatus value, JsonSerializerOptions options)
+ {
+ switch (value)
+ {
+ case ClusterSearchStatus.Successful:
+ writer.WriteStringValue("successful");
+ return;
+ case ClusterSearchStatus.Skipped:
+ writer.WriteStringValue("skipped");
+ return;
+ case ClusterSearchStatus.Running:
+ writer.WriteStringValue("running");
+ return;
+ case ClusterSearchStatus.Partial:
+ writer.WriteStringValue("partial");
+ return;
+ case ClusterSearchStatus.Failed:
+ writer.WriteStringValue("failed");
+ return;
+ }
+
+ writer.WriteNullValue();
+ }
+}
+
[JsonConverter(typeof(ConflictsConverter))]
public enum Conflicts
{