@@ -31,6 +31,8 @@ internal sealed partial class ClusterStatsResponseConverter : System.Text.Json.S
31
31
private static readonly System . Text . Json . JsonEncodedText PropIndices = System . Text . Json . JsonEncodedText . Encode ( "indices" ) ;
32
32
private static readonly System . Text . Json . JsonEncodedText PropNodes = System . Text . Json . JsonEncodedText . Encode ( "nodes" ) ;
33
33
private static readonly System . Text . Json . JsonEncodedText PropNodeStats = System . Text . Json . JsonEncodedText . Encode ( "_nodes" ) ;
34
+ private static readonly System . Text . Json . JsonEncodedText PropRepositories = System . Text . Json . JsonEncodedText . Encode ( "repositories" ) ;
35
+ private static readonly System . Text . Json . JsonEncodedText PropSnapshots = System . Text . Json . JsonEncodedText . Encode ( "snapshots" ) ;
34
36
private static readonly System . Text . Json . JsonEncodedText PropStatus = System . Text . Json . JsonEncodedText . Encode ( "status" ) ;
35
37
private static readonly System . Text . Json . JsonEncodedText PropTimestamp = System . Text . Json . JsonEncodedText . Encode ( "timestamp" ) ;
36
38
@@ -43,7 +45,9 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterStatsResponse Read(
43
45
LocalJsonValue < Elastic . Clients . Elasticsearch . Cluster . ClusterIndices > propIndices = default ;
44
46
LocalJsonValue < Elastic . Clients . Elasticsearch . Cluster . ClusterNodes > propNodes = default ;
45
47
LocalJsonValue < Elastic . Clients . Elasticsearch . NodeStatistics ? > propNodeStats = default ;
46
- LocalJsonValue < Elastic . Clients . Elasticsearch . HealthStatus > propStatus = default ;
48
+ LocalJsonValue < System . Collections . Generic . IReadOnlyDictionary < string , System . Collections . Generic . IReadOnlyDictionary < string , long > > > propRepositories = default ;
49
+ LocalJsonValue < Elastic . Clients . Elasticsearch . Cluster . ClusterSnapshotStats > propSnapshots = default ;
50
+ LocalJsonValue < Elastic . Clients . Elasticsearch . HealthStatus ? > propStatus = default ;
47
51
LocalJsonValue < long > propTimestamp = default ;
48
52
while ( reader . Read ( ) && reader . TokenType is System . Text . Json . JsonTokenType . PropertyName )
49
53
{
@@ -77,7 +81,17 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterStatsResponse Read(
77
81
continue ;
78
82
}
79
83
80
- if ( propStatus . TryReadProperty ( ref reader , options , PropStatus , null ) )
84
+ if ( propRepositories . TryReadProperty ( ref reader , options , PropRepositories , static System . Collections . Generic . IReadOnlyDictionary < string , System . Collections . Generic . IReadOnlyDictionary < string , long > > ( ref System . Text . Json . Utf8JsonReader r , System . Text . Json . JsonSerializerOptions o ) => r . ReadDictionaryValue < string , System . Collections . Generic . IReadOnlyDictionary < string , long > > ( o , null , static System . Collections . Generic . IReadOnlyDictionary < string , long > ( ref System . Text . Json . Utf8JsonReader r , System . Text . Json . JsonSerializerOptions o ) => r . ReadDictionaryValue < string , long > ( o , null , null ) ! ) ! ) )
85
+ {
86
+ continue ;
87
+ }
88
+
89
+ if ( propSnapshots . TryReadProperty ( ref reader , options , PropSnapshots , null ) )
90
+ {
91
+ continue ;
92
+ }
93
+
94
+ if ( propStatus . TryReadProperty ( ref reader , options , PropStatus , static Elastic . Clients . Elasticsearch . HealthStatus ? ( ref System . Text . Json . Utf8JsonReader r , System . Text . Json . JsonSerializerOptions o ) => r . ReadNullableValue < Elastic . Clients . Elasticsearch . HealthStatus > ( o ) ) )
81
95
{
82
96
continue ;
83
97
}
@@ -105,6 +119,8 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterStatsResponse Read(
105
119
Indices = propIndices . Value ,
106
120
Nodes = propNodes . Value ,
107
121
NodeStats = propNodeStats . Value ,
122
+ Repositories = propRepositories . Value ,
123
+ Snapshots = propSnapshots . Value ,
108
124
Status = propStatus . Value ,
109
125
Timestamp = propTimestamp . Value
110
126
} ;
@@ -119,7 +135,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien
119
135
writer . WriteProperty ( options , PropIndices , value . Indices , null , null ) ;
120
136
writer . WriteProperty ( options , PropNodes , value . Nodes , null , null ) ;
121
137
writer . WriteProperty ( options , PropNodeStats , value . NodeStats , null , null ) ;
122
- writer . WriteProperty ( options , PropStatus , value . Status , null , null ) ;
138
+ writer . WriteProperty ( options , PropRepositories , value . Repositories , null , static ( System . Text . Json . Utf8JsonWriter w , System . Text . Json . JsonSerializerOptions o , System . Collections . Generic . IReadOnlyDictionary < string , System . Collections . Generic . IReadOnlyDictionary < string , long > > v ) => w . WriteDictionaryValue < string , System . Collections . Generic . IReadOnlyDictionary < string , long > > ( o , v , null , static ( System . Text . Json . Utf8JsonWriter w , System . Text . Json . JsonSerializerOptions o , System . Collections . Generic . IReadOnlyDictionary < string , long > v ) => w . WriteDictionaryValue < string , long > ( o , v , null , null ) ) ) ;
139
+ writer . WriteProperty ( options , PropSnapshots , value . Snapshots , null , null ) ;
140
+ writer . WriteProperty ( options , PropStatus , value . Status , null , static ( System . Text . Json . Utf8JsonWriter w , System . Text . Json . JsonSerializerOptions o , Elastic . Clients . Elasticsearch . HealthStatus ? v ) => w . WriteNullableValue < Elastic . Clients . Elasticsearch . HealthStatus > ( o , v ) ) ;
123
141
writer . WriteProperty ( options , PropTimestamp , value . Timestamp , null , null ) ;
124
142
writer . WriteEndObject ( ) ;
125
143
}
@@ -203,14 +221,32 @@ internal ClusterStatsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCo
203
221
204
222
/// <summary>
205
223
/// <para>
206
- /// Health status of the cluster, based on the state of its primary and replica shards.
224
+ /// Contains stats on repository feature usage exposed in cluster stats for telemetry.
225
+ /// </para>
226
+ /// </summary>
227
+ public
228
+ #if NET7_0_OR_GREATER
229
+ required
230
+ #endif
231
+ System. Collections . Generic . IReadOnlyDictionary < string , System . Collections . Generic . IReadOnlyDictionary < string , long > > Repositories { get ; set ; }
232
+
233
+ /// <summary>
234
+ /// <para>
235
+ /// Contains stats cluster snapshots.
207
236
/// </para>
208
237
/// </summary>
209
238
public
210
239
#if NET7_0_OR_GREATER
211
240
required
212
241
#endif
213
- Elastic. Clients . Elasticsearch . HealthStatus Status { get ; set ; }
242
+ Elastic. Clients . Elasticsearch . Cluster . ClusterSnapshotStats Snapshots { get ; set ; }
243
+
244
+ /// <summary>
245
+ /// <para>
246
+ /// Health status of the cluster, based on the state of its primary and replica shards.
247
+ /// </para>
248
+ /// </summary>
249
+ public Elastic . Clients . Elasticsearch . HealthStatus ? Status { get ; set ; }
214
250
215
251
/// <summary>
216
252
/// <para>
0 commit comments