@@ -38,19 +38,6 @@ public override void Write(Utf8JsonWriter writer, AutoDateHistogramAggregation v
38
38
writer . WriteStartObject ( ) ;
39
39
writer . WritePropertyName ( "auto_date_histogram" ) ;
40
40
writer . WriteStartObject ( ) ;
41
- writer . WriteEndObject ( ) ;
42
- if ( value . Meta is not null )
43
- {
44
- writer . WritePropertyName ( "meta" ) ;
45
- JsonSerializer . Serialize ( writer , value . Meta , options ) ;
46
- }
47
-
48
- if ( value . Aggregations is not null )
49
- {
50
- writer . WritePropertyName ( "aggregations" ) ;
51
- JsonSerializer . Serialize ( writer , value . Aggregations , options ) ;
52
- }
53
-
54
41
if ( value . Buckets . HasValue )
55
42
{
56
43
writer . WritePropertyName ( "buckets" ) ;
@@ -105,20 +92,30 @@ public override void Write(Utf8JsonWriter writer, AutoDateHistogramAggregation v
105
92
writer . WriteStringValue ( value . TimeZone ) ;
106
93
}
107
94
95
+ writer . WriteEndObject ( ) ;
96
+ if ( value . Meta is not null )
97
+ {
98
+ writer . WritePropertyName ( "meta" ) ;
99
+ JsonSerializer . Serialize ( writer , value . Meta , options ) ;
100
+ }
101
+
102
+ if ( value . Aggregations is not null )
103
+ {
104
+ writer . WritePropertyName ( "aggregations" ) ;
105
+ JsonSerializer . Serialize ( writer , value . Aggregations , options ) ;
106
+ }
107
+
108
108
writer . WriteEndObject ( ) ;
109
109
}
110
110
}
111
111
112
112
[ JsonConverter ( typeof ( AutoDateHistogramAggregationConverter ) ) ]
113
- public partial class AutoDateHistogramAggregation : Aggregations . BucketAggregationBase , IAggregationContainerVariant
113
+ public partial class AutoDateHistogramAggregation : Aggregations . BucketAggregationBase
114
114
{
115
- [ JsonConstructor ]
116
115
public AutoDateHistogramAggregation ( string name ) : base ( name )
117
116
{
118
117
}
119
118
120
- [ JsonIgnore ]
121
- string Aggregations . IAggregationContainerVariant . AggregationContainerVariantName => "auto_date_histogram" ;
122
119
[ JsonInclude ]
123
120
[ JsonPropertyName ( "buckets" ) ]
124
121
public int ? Buckets { get ; set ; }
0 commit comments