Skip to content

Commit d194077

Browse files
Add TDigestPercentilesAggregate (#7953) (#7955)
Co-authored-by: Florian Bernd <[email protected]>
1 parent 944cc05 commit d194077

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

src/Elastic.Clients.Elasticsearch/Types/Aggregations/AggregateDictionaryConverter.cs

+7
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,13 @@ public static void ReadAggregate(ref Utf8JsonReader reader, JsonSerializerOption
312312
break;
313313
}
314314

315+
case "tdigest_percentiles":
316+
{
317+
var agg = JsonSerializer.Deserialize<TDigestPercentilesAggregate>(ref reader, options);
318+
dictionary.Add(nameParts[1], agg);
319+
break;
320+
}
321+
315322
case "tdigest_percentile_ranks":
316323
{
317324
var agg = JsonSerializer.Deserialize<TDigestPercentileRanksAggregate>(ref reader, options);

src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public AggregateDictionary(IReadOnlyDictionary<string, IAggregate> backingDictio
3838
}
3939

4040
public Elastic.Clients.Elasticsearch.Aggregations.CardinalityAggregate? GetCardinality(string key) => TryGet<Elastic.Clients.Elasticsearch.Aggregations.CardinalityAggregate?>(key);
41+
public Elastic.Clients.Elasticsearch.Aggregations.TDigestPercentilesAggregate? GetTDigestPercentiles(string key) => TryGet<Elastic.Clients.Elasticsearch.Aggregations.TDigestPercentilesAggregate?>(key);
4142
public Elastic.Clients.Elasticsearch.Aggregations.TDigestPercentileRanksAggregate? GetTDigestPercentileRanks(string key) => TryGet<Elastic.Clients.Elasticsearch.Aggregations.TDigestPercentileRanksAggregate?>(key);
4243
public Elastic.Clients.Elasticsearch.Aggregations.PercentilesBucketAggregate? GetPercentilesBucket(string key) => TryGet<Elastic.Clients.Elasticsearch.Aggregations.PercentilesBucketAggregate?>(key);
4344
public Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviationAggregate? GetMedianAbsoluteDeviation(string key) => TryGet<Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviationAggregate?>(key);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information.
4+
//
5+
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
6+
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
7+
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
8+
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
9+
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
10+
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
11+
// ------------------------------------------------
12+
//
13+
// This file is automatically generated.
14+
// Please do not edit these files manually.
15+
//
16+
// ------------------------------------------------
17+
18+
#nullable restore
19+
20+
using Elastic.Clients.Elasticsearch.Fluent;
21+
using Elastic.Clients.Elasticsearch.Serialization;
22+
using System;
23+
using System.Collections.Generic;
24+
using System.Linq.Expressions;
25+
using System.Text.Json;
26+
using System.Text.Json.Serialization;
27+
28+
namespace Elastic.Clients.Elasticsearch.Aggregations;
29+
30+
public sealed partial class TDigestPercentilesAggregate : IAggregate
31+
{
32+
[JsonInclude, JsonPropertyName("meta")]
33+
public IReadOnlyDictionary<string, object>? Meta { get; init; }
34+
[JsonInclude, JsonPropertyName("values")]
35+
public Elastic.Clients.Elasticsearch.Aggregations.Percentiles Values { get; init; }
36+
}

0 commit comments

Comments
 (0)