@@ -31,6 +31,8 @@ internal sealed partial class ClusterStatsResponseConverter : System.Text.Json.S
3131 private static readonly System . Text . Json . JsonEncodedText PropIndices = System . Text . Json . JsonEncodedText . Encode ( "indices" ) ;
3232 private static readonly System . Text . Json . JsonEncodedText PropNodes = System . Text . Json . JsonEncodedText . Encode ( "nodes" ) ;
3333 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" ) ;
3436 private static readonly System . Text . Json . JsonEncodedText PropStatus = System . Text . Json . JsonEncodedText . Encode ( "status" ) ;
3537 private static readonly System . Text . Json . JsonEncodedText PropTimestamp = System . Text . Json . JsonEncodedText . Encode ( "timestamp" ) ;
3638
@@ -43,7 +45,9 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterStatsResponse Read(
4345 LocalJsonValue < Elastic . Clients . Elasticsearch . Cluster . ClusterIndices > propIndices = default ;
4446 LocalJsonValue < Elastic . Clients . Elasticsearch . Cluster . ClusterNodes > propNodes = default ;
4547 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 ;
4751 LocalJsonValue < long > propTimestamp = default ;
4852 while ( reader . Read ( ) && reader . TokenType is System . Text . Json . JsonTokenType . PropertyName )
4953 {
@@ -77,7 +81,17 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterStatsResponse Read(
7781 continue ;
7882 }
7983
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 ) ) )
8195 {
8296 continue ;
8397 }
@@ -105,6 +119,8 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterStatsResponse Read(
105119 Indices = propIndices . Value ,
106120 Nodes = propNodes . Value ,
107121 NodeStats = propNodeStats . Value ,
122+ Repositories = propRepositories . Value ,
123+ Snapshots = propSnapshots . Value ,
108124 Status = propStatus . Value ,
109125 Timestamp = propTimestamp . Value
110126 } ;
@@ -119,7 +135,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien
119135 writer . WriteProperty ( options , PropIndices , value . Indices , null , null ) ;
120136 writer . WriteProperty ( options , PropNodes , value . Nodes , null , null ) ;
121137 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 ) ) ;
123141 writer . WriteProperty ( options , PropTimestamp , value . Timestamp , null , null ) ;
124142 writer . WriteEndObject ( ) ;
125143 }
@@ -203,14 +221,32 @@ internal ClusterStatsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCo
203221
204222 /// <summary>
205223 /// <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.
207236 /// </para>
208237 /// </summary>
209238 public
210239#if NET7_0_OR_GREATER
211240 required
212241#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 ; }
214250
215251 /// <summary>
216252 /// <para>
0 commit comments