@@ -35,6 +35,12 @@ public sealed partial class DateHistogramAggregation
35
35
[ JsonInclude , JsonPropertyName ( "calendar_interval" ) ]
36
36
public Elastic . Clients . Elasticsearch . Serverless . Aggregations . CalendarInterval ? CalendarInterval { get ; set ; }
37
37
38
+ /// <summary>
39
+ /// <para>Enables extending the bounds of the histogram beyond the data itself.</para>
40
+ /// </summary>
41
+ [ JsonInclude , JsonPropertyName ( "extended_bounds" ) ]
42
+ public Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDate ? ExtendedBounds { get ; set ; }
43
+
38
44
/// <summary>
39
45
/// <para>The date field whose values are use to build a histogram.</para>
40
46
/// </summary>
@@ -53,6 +59,12 @@ public sealed partial class DateHistogramAggregation
53
59
[ JsonInclude , JsonPropertyName ( "format" ) ]
54
60
public string ? Format { get ; set ; }
55
61
62
+ /// <summary>
63
+ /// <para>Limits the histogram to specified bounds.</para>
64
+ /// </summary>
65
+ [ JsonInclude , JsonPropertyName ( "hard_bounds" ) ]
66
+ public Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDate ? HardBounds { get ; set ; }
67
+
56
68
/// <summary>
57
69
/// <para>Only returns buckets that have `min_doc_count` number of documents.<br/>By default, all buckets between the first bucket that matches documents and the last one are returned.</para>
58
70
/// </summary>
@@ -101,9 +113,15 @@ public DateHistogramAggregationDescriptor() : base()
101
113
}
102
114
103
115
private Elastic . Clients . Elasticsearch . Serverless . Aggregations . CalendarInterval ? CalendarIntervalValue { get ; set ; }
116
+ private Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDate ? ExtendedBoundsValue { get ; set ; }
117
+ private Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor ExtendedBoundsDescriptor { get ; set ; }
118
+ private Action < Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor > ExtendedBoundsDescriptorAction { get ; set ; }
104
119
private Elastic . Clients . Elasticsearch . Serverless . Field ? FieldValue { get ; set ; }
105
120
private Elastic . Clients . Elasticsearch . Serverless . Duration ? FixedIntervalValue { get ; set ; }
106
121
private string ? FormatValue { get ; set ; }
122
+ private Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDate ? HardBoundsValue { get ; set ; }
123
+ private Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor HardBoundsDescriptor { get ; set ; }
124
+ private Action < Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor > HardBoundsDescriptorAction { get ; set ; }
107
125
private int ? MinDocCountValue { get ; set ; }
108
126
private DateTimeOffset ? MissingValue { get ; set ; }
109
127
private Elastic . Clients . Elasticsearch . Serverless . Duration ? OffsetValue { get ; set ; }
@@ -121,6 +139,33 @@ public DateHistogramAggregationDescriptor<TDocument> CalendarInterval(Elastic.Cl
121
139
return Self ;
122
140
}
123
141
142
+ /// <summary>
143
+ /// <para>Enables extending the bounds of the histogram beyond the data itself.</para>
144
+ /// </summary>
145
+ public DateHistogramAggregationDescriptor < TDocument > ExtendedBounds ( Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDate ? extendedBounds )
146
+ {
147
+ ExtendedBoundsDescriptor = null ;
148
+ ExtendedBoundsDescriptorAction = null ;
149
+ ExtendedBoundsValue = extendedBounds ;
150
+ return Self ;
151
+ }
152
+
153
+ public DateHistogramAggregationDescriptor < TDocument > ExtendedBounds ( Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor descriptor )
154
+ {
155
+ ExtendedBoundsValue = null ;
156
+ ExtendedBoundsDescriptorAction = null ;
157
+ ExtendedBoundsDescriptor = descriptor ;
158
+ return Self ;
159
+ }
160
+
161
+ public DateHistogramAggregationDescriptor < TDocument > ExtendedBounds ( Action < Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor > configure )
162
+ {
163
+ ExtendedBoundsValue = null ;
164
+ ExtendedBoundsDescriptor = null ;
165
+ ExtendedBoundsDescriptorAction = configure ;
166
+ return Self ;
167
+ }
168
+
124
169
/// <summary>
125
170
/// <para>The date field whose values are use to build a histogram.</para>
126
171
/// </summary>
@@ -166,6 +211,33 @@ public DateHistogramAggregationDescriptor<TDocument> Format(string? format)
166
211
return Self ;
167
212
}
168
213
214
+ /// <summary>
215
+ /// <para>Limits the histogram to specified bounds.</para>
216
+ /// </summary>
217
+ public DateHistogramAggregationDescriptor < TDocument > HardBounds ( Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDate ? hardBounds )
218
+ {
219
+ HardBoundsDescriptor = null ;
220
+ HardBoundsDescriptorAction = null ;
221
+ HardBoundsValue = hardBounds ;
222
+ return Self ;
223
+ }
224
+
225
+ public DateHistogramAggregationDescriptor < TDocument > HardBounds ( Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor descriptor )
226
+ {
227
+ HardBoundsValue = null ;
228
+ HardBoundsDescriptorAction = null ;
229
+ HardBoundsDescriptor = descriptor ;
230
+ return Self ;
231
+ }
232
+
233
+ public DateHistogramAggregationDescriptor < TDocument > HardBounds ( Action < Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor > configure )
234
+ {
235
+ HardBoundsValue = null ;
236
+ HardBoundsDescriptor = null ;
237
+ HardBoundsDescriptorAction = configure ;
238
+ return Self ;
239
+ }
240
+
169
241
/// <summary>
170
242
/// <para>Only returns buckets that have `min_doc_count` number of documents.<br/>By default, all buckets between the first bucket that matches documents and the last one are returned.</para>
171
243
/// </summary>
@@ -232,6 +304,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
232
304
JsonSerializer . Serialize ( writer , CalendarIntervalValue , options ) ;
233
305
}
234
306
307
+ if ( ExtendedBoundsDescriptor is not null )
308
+ {
309
+ writer . WritePropertyName ( "extended_bounds" ) ;
310
+ JsonSerializer . Serialize ( writer , ExtendedBoundsDescriptor , options ) ;
311
+ }
312
+ else if ( ExtendedBoundsDescriptorAction is not null )
313
+ {
314
+ writer . WritePropertyName ( "extended_bounds" ) ;
315
+ JsonSerializer . Serialize ( writer , new Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor ( ExtendedBoundsDescriptorAction ) , options ) ;
316
+ }
317
+ else if ( ExtendedBoundsValue is not null )
318
+ {
319
+ writer . WritePropertyName ( "extended_bounds" ) ;
320
+ JsonSerializer . Serialize ( writer , ExtendedBoundsValue , options ) ;
321
+ }
322
+
235
323
if ( FieldValue is not null )
236
324
{
237
325
writer . WritePropertyName ( "field" ) ;
@@ -250,6 +338,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
250
338
writer . WriteStringValue ( FormatValue ) ;
251
339
}
252
340
341
+ if ( HardBoundsDescriptor is not null )
342
+ {
343
+ writer . WritePropertyName ( "hard_bounds" ) ;
344
+ JsonSerializer . Serialize ( writer , HardBoundsDescriptor , options ) ;
345
+ }
346
+ else if ( HardBoundsDescriptorAction is not null )
347
+ {
348
+ writer . WritePropertyName ( "hard_bounds" ) ;
349
+ JsonSerializer . Serialize ( writer , new Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor ( HardBoundsDescriptorAction ) , options ) ;
350
+ }
351
+ else if ( HardBoundsValue is not null )
352
+ {
353
+ writer . WritePropertyName ( "hard_bounds" ) ;
354
+ JsonSerializer . Serialize ( writer , HardBoundsValue , options ) ;
355
+ }
356
+
253
357
if ( MinDocCountValue . HasValue )
254
358
{
255
359
writer . WritePropertyName ( "min_doc_count" ) ;
@@ -305,9 +409,15 @@ public DateHistogramAggregationDescriptor() : base()
305
409
}
306
410
307
411
private Elastic . Clients . Elasticsearch . Serverless . Aggregations . CalendarInterval ? CalendarIntervalValue { get ; set ; }
412
+ private Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDate ? ExtendedBoundsValue { get ; set ; }
413
+ private Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor ExtendedBoundsDescriptor { get ; set ; }
414
+ private Action < Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor > ExtendedBoundsDescriptorAction { get ; set ; }
308
415
private Elastic . Clients . Elasticsearch . Serverless . Field ? FieldValue { get ; set ; }
309
416
private Elastic . Clients . Elasticsearch . Serverless . Duration ? FixedIntervalValue { get ; set ; }
310
417
private string ? FormatValue { get ; set ; }
418
+ private Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDate ? HardBoundsValue { get ; set ; }
419
+ private Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor HardBoundsDescriptor { get ; set ; }
420
+ private Action < Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor > HardBoundsDescriptorAction { get ; set ; }
311
421
private int ? MinDocCountValue { get ; set ; }
312
422
private DateTimeOffset ? MissingValue { get ; set ; }
313
423
private Elastic . Clients . Elasticsearch . Serverless . Duration ? OffsetValue { get ; set ; }
@@ -325,6 +435,33 @@ public DateHistogramAggregationDescriptor CalendarInterval(Elastic.Clients.Elast
325
435
return Self ;
326
436
}
327
437
438
+ /// <summary>
439
+ /// <para>Enables extending the bounds of the histogram beyond the data itself.</para>
440
+ /// </summary>
441
+ public DateHistogramAggregationDescriptor ExtendedBounds ( Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDate ? extendedBounds )
442
+ {
443
+ ExtendedBoundsDescriptor = null ;
444
+ ExtendedBoundsDescriptorAction = null ;
445
+ ExtendedBoundsValue = extendedBounds ;
446
+ return Self ;
447
+ }
448
+
449
+ public DateHistogramAggregationDescriptor ExtendedBounds ( Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor descriptor )
450
+ {
451
+ ExtendedBoundsValue = null ;
452
+ ExtendedBoundsDescriptorAction = null ;
453
+ ExtendedBoundsDescriptor = descriptor ;
454
+ return Self ;
455
+ }
456
+
457
+ public DateHistogramAggregationDescriptor ExtendedBounds ( Action < Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor > configure )
458
+ {
459
+ ExtendedBoundsValue = null ;
460
+ ExtendedBoundsDescriptor = null ;
461
+ ExtendedBoundsDescriptorAction = configure ;
462
+ return Self ;
463
+ }
464
+
328
465
/// <summary>
329
466
/// <para>The date field whose values are use to build a histogram.</para>
330
467
/// </summary>
@@ -370,6 +507,33 @@ public DateHistogramAggregationDescriptor Format(string? format)
370
507
return Self ;
371
508
}
372
509
510
+ /// <summary>
511
+ /// <para>Limits the histogram to specified bounds.</para>
512
+ /// </summary>
513
+ public DateHistogramAggregationDescriptor HardBounds ( Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDate ? hardBounds )
514
+ {
515
+ HardBoundsDescriptor = null ;
516
+ HardBoundsDescriptorAction = null ;
517
+ HardBoundsValue = hardBounds ;
518
+ return Self ;
519
+ }
520
+
521
+ public DateHistogramAggregationDescriptor HardBounds ( Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor descriptor )
522
+ {
523
+ HardBoundsValue = null ;
524
+ HardBoundsDescriptorAction = null ;
525
+ HardBoundsDescriptor = descriptor ;
526
+ return Self ;
527
+ }
528
+
529
+ public DateHistogramAggregationDescriptor HardBounds ( Action < Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor > configure )
530
+ {
531
+ HardBoundsValue = null ;
532
+ HardBoundsDescriptor = null ;
533
+ HardBoundsDescriptorAction = configure ;
534
+ return Self ;
535
+ }
536
+
373
537
/// <summary>
374
538
/// <para>Only returns buckets that have `min_doc_count` number of documents.<br/>By default, all buckets between the first bucket that matches documents and the last one are returned.</para>
375
539
/// </summary>
@@ -436,6 +600,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
436
600
JsonSerializer . Serialize ( writer , CalendarIntervalValue , options ) ;
437
601
}
438
602
603
+ if ( ExtendedBoundsDescriptor is not null )
604
+ {
605
+ writer . WritePropertyName ( "extended_bounds" ) ;
606
+ JsonSerializer . Serialize ( writer , ExtendedBoundsDescriptor , options ) ;
607
+ }
608
+ else if ( ExtendedBoundsDescriptorAction is not null )
609
+ {
610
+ writer . WritePropertyName ( "extended_bounds" ) ;
611
+ JsonSerializer . Serialize ( writer , new Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor ( ExtendedBoundsDescriptorAction ) , options ) ;
612
+ }
613
+ else if ( ExtendedBoundsValue is not null )
614
+ {
615
+ writer . WritePropertyName ( "extended_bounds" ) ;
616
+ JsonSerializer . Serialize ( writer , ExtendedBoundsValue , options ) ;
617
+ }
618
+
439
619
if ( FieldValue is not null )
440
620
{
441
621
writer . WritePropertyName ( "field" ) ;
@@ -454,6 +634,22 @@ protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions o
454
634
writer . WriteStringValue ( FormatValue ) ;
455
635
}
456
636
637
+ if ( HardBoundsDescriptor is not null )
638
+ {
639
+ writer . WritePropertyName ( "hard_bounds" ) ;
640
+ JsonSerializer . Serialize ( writer , HardBoundsDescriptor , options ) ;
641
+ }
642
+ else if ( HardBoundsDescriptorAction is not null )
643
+ {
644
+ writer . WritePropertyName ( "hard_bounds" ) ;
645
+ JsonSerializer . Serialize ( writer , new Elastic . Clients . Elasticsearch . Serverless . Aggregations . ExtendedBoundsDateDescriptor ( HardBoundsDescriptorAction ) , options ) ;
646
+ }
647
+ else if ( HardBoundsValue is not null )
648
+ {
649
+ writer . WritePropertyName ( "hard_bounds" ) ;
650
+ JsonSerializer . Serialize ( writer , HardBoundsValue , options ) ;
651
+ }
652
+
457
653
if ( MinDocCountValue . HasValue )
458
654
{
459
655
writer . WritePropertyName ( "min_doc_count" ) ;
0 commit comments