@@ -25,20 +25,38 @@ namespace Elastic.Clients.Elasticsearch.Cluster;
25
25
26
26
internal sealed partial class ComponentTemplateNodeConverter : System . Text . Json . Serialization . JsonConverter < Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNode >
27
27
{
28
+ private static readonly System . Text . Json . JsonEncodedText PropCreatedDate = System . Text . Json . JsonEncodedText . Encode ( "created_date" ) ;
29
+ private static readonly System . Text . Json . JsonEncodedText PropCreatedDateMillis = System . Text . Json . JsonEncodedText . Encode ( "created_date_millis" ) ;
28
30
private static readonly System . Text . Json . JsonEncodedText PropDeprecated = System . Text . Json . JsonEncodedText . Encode ( "deprecated" ) ;
29
31
private static readonly System . Text . Json . JsonEncodedText PropMeta = System . Text . Json . JsonEncodedText . Encode ( "_meta" ) ;
32
+ private static readonly System . Text . Json . JsonEncodedText PropModifiedDate = System . Text . Json . JsonEncodedText . Encode ( "modified_date" ) ;
33
+ private static readonly System . Text . Json . JsonEncodedText PropModifiedDateMillis = System . Text . Json . JsonEncodedText . Encode ( "modified_date_millis" ) ;
30
34
private static readonly System . Text . Json . JsonEncodedText PropTemplate = System . Text . Json . JsonEncodedText . Encode ( "template" ) ;
31
35
private static readonly System . Text . Json . JsonEncodedText PropVersion = System . Text . Json . JsonEncodedText . Encode ( "version" ) ;
32
36
33
37
public override Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNode Read ( ref System . Text . Json . Utf8JsonReader reader , System . Type typeToConvert , System . Text . Json . JsonSerializerOptions options )
34
38
{
35
39
reader . ValidateToken ( System . Text . Json . JsonTokenType . StartObject ) ;
40
+ LocalJsonValue < System . DateTimeOffset ? > propCreatedDate = default ;
41
+ LocalJsonValue < System . DateTimeOffset ? > propCreatedDateMillis = default ;
36
42
LocalJsonValue < bool ? > propDeprecated = default ;
37
43
LocalJsonValue < System . Collections . Generic . IDictionary < string , object > ? > propMeta = default ;
44
+ LocalJsonValue < System . DateTimeOffset ? > propModifiedDate = default ;
45
+ LocalJsonValue < System . DateTimeOffset ? > propModifiedDateMillis = default ;
38
46
LocalJsonValue < Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateSummary > propTemplate = default ;
39
47
LocalJsonValue < long ? > propVersion = default ;
40
48
while ( reader . Read ( ) && reader . TokenType is System . Text . Json . JsonTokenType . PropertyName )
41
49
{
50
+ if ( propCreatedDate . TryReadProperty ( ref reader , options , PropCreatedDate , static System . DateTimeOffset ? ( ref System . Text . Json . Utf8JsonReader r , System . Text . Json . JsonSerializerOptions o ) => r . ReadNullableValueEx < System . DateTimeOffset > ( o , typeof ( Elastic . Clients . Elasticsearch . Serialization . DateTimeMarker ) ) ) )
51
+ {
52
+ continue ;
53
+ }
54
+
55
+ if ( propCreatedDateMillis . TryReadProperty ( ref reader , options , PropCreatedDateMillis , static System . DateTimeOffset ? ( ref System . Text . Json . Utf8JsonReader r , System . Text . Json . JsonSerializerOptions o ) => r . ReadNullableValueEx < System . DateTimeOffset > ( o , typeof ( Elastic . Clients . Elasticsearch . Serialization . DateTimeMillisMarker ) ) ) )
56
+ {
57
+ continue ;
58
+ }
59
+
42
60
if ( propDeprecated . TryReadProperty ( ref reader , options , PropDeprecated , static bool ? ( ref System . Text . Json . Utf8JsonReader r , System . Text . Json . JsonSerializerOptions o ) => r . ReadNullableValue < bool > ( o ) ) )
43
61
{
44
62
continue ;
@@ -49,6 +67,16 @@ public override Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateNode Read
49
67
continue ;
50
68
}
51
69
70
+ if ( propModifiedDate . TryReadProperty ( ref reader , options , PropModifiedDate , static System . DateTimeOffset ? ( ref System . Text . Json . Utf8JsonReader r , System . Text . Json . JsonSerializerOptions o ) => r . ReadNullableValueEx < System . DateTimeOffset > ( o , typeof ( Elastic . Clients . Elasticsearch . Serialization . DateTimeMarker ) ) ) )
71
+ {
72
+ continue ;
73
+ }
74
+
75
+ if ( propModifiedDateMillis . TryReadProperty ( ref reader , options , PropModifiedDateMillis , static System . DateTimeOffset ? ( ref System . Text . Json . Utf8JsonReader r , System . Text . Json . JsonSerializerOptions o ) => r . ReadNullableValueEx < System . DateTimeOffset > ( o , typeof ( Elastic . Clients . Elasticsearch . Serialization . DateTimeMillisMarker ) ) ) )
76
+ {
77
+ continue ;
78
+ }
79
+
52
80
if ( propTemplate . TryReadProperty ( ref reader , options , PropTemplate , null ) )
53
81
{
54
82
continue ;
@@ -71,8 +99,12 @@ public override Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateNode Read
71
99
reader . ValidateToken ( System . Text . Json . JsonTokenType . EndObject ) ;
72
100
return new Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNode ( Elastic . Clients . Elasticsearch . Serialization . JsonConstructorSentinel . Instance )
73
101
{
102
+ CreatedDate = propCreatedDate . Value ,
103
+ CreatedDateMillis = propCreatedDateMillis . Value ,
74
104
Deprecated = propDeprecated . Value ,
75
105
Meta = propMeta . Value ,
106
+ ModifiedDate = propModifiedDate . Value ,
107
+ ModifiedDateMillis = propModifiedDateMillis . Value ,
76
108
Template = propTemplate . Value ,
77
109
Version = propVersion . Value
78
110
} ;
@@ -81,8 +113,12 @@ public override Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateNode Read
81
113
public override void Write ( System . Text . Json . Utf8JsonWriter writer , Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNode value , System . Text . Json . JsonSerializerOptions options )
82
114
{
83
115
writer . WriteStartObject ( ) ;
116
+ writer . WriteProperty ( options , PropCreatedDate , value . CreatedDate , null , static ( System . Text . Json . Utf8JsonWriter w , System . Text . Json . JsonSerializerOptions o , System . DateTimeOffset ? v ) => w . WriteNullableValueEx < System . DateTimeOffset > ( o , v , typeof ( Elastic . Clients . Elasticsearch . Serialization . DateTimeMarker ) ) ) ;
117
+ writer . WriteProperty ( options , PropCreatedDateMillis , value . CreatedDateMillis , null , static ( System . Text . Json . Utf8JsonWriter w , System . Text . Json . JsonSerializerOptions o , System . DateTimeOffset ? v ) => w . WriteNullableValueEx < System . DateTimeOffset > ( o , v , typeof ( Elastic . Clients . Elasticsearch . Serialization . DateTimeMillisMarker ) ) ) ;
84
118
writer . WriteProperty ( options , PropDeprecated , value . Deprecated , null , static ( System . Text . Json . Utf8JsonWriter w , System . Text . Json . JsonSerializerOptions o , bool ? v ) => w . WriteNullableValue < bool > ( o , v ) ) ;
85
119
writer . WriteProperty ( options , PropMeta , value . Meta , null , static ( System . Text . Json . Utf8JsonWriter w , System . Text . Json . JsonSerializerOptions o , System . Collections . Generic . IDictionary < string , object > ? v ) => w . WriteDictionaryValue < string , object > ( o , v , null , static ( System . Text . Json . Utf8JsonWriter w , System . Text . Json . JsonSerializerOptions o , object v ) => w . WriteValueEx < object > ( o , v , typeof ( Elastic . Clients . Elasticsearch . Serialization . SourceMarker < object > ) ) ) ) ;
120
+ writer . WriteProperty ( options , PropModifiedDate , value . ModifiedDate , null , static ( System . Text . Json . Utf8JsonWriter w , System . Text . Json . JsonSerializerOptions o , System . DateTimeOffset ? v ) => w . WriteNullableValueEx < System . DateTimeOffset > ( o , v , typeof ( Elastic . Clients . Elasticsearch . Serialization . DateTimeMarker ) ) ) ;
121
+ writer . WriteProperty ( options , PropModifiedDateMillis , value . ModifiedDateMillis , null , static ( System . Text . Json . Utf8JsonWriter w , System . Text . Json . JsonSerializerOptions o , System . DateTimeOffset ? v ) => w . WriteNullableValueEx < System . DateTimeOffset > ( o , v , typeof ( Elastic . Clients . Elasticsearch . Serialization . DateTimeMillisMarker ) ) ) ;
86
122
writer . WriteProperty ( options , PropTemplate , value . Template , null , null ) ;
87
123
writer . WriteProperty ( options , PropVersion , value . Version , null , static ( System . Text . Json . Utf8JsonWriter w , System . Text . Json . JsonSerializerOptions o , long ? v ) => w . WriteNullableValue < long > ( o , v ) ) ;
88
124
writer . WriteEndObject ( ) ;
@@ -114,8 +150,35 @@ internal ComponentTemplateNode(Elastic.Clients.Elasticsearch.Serialization.JsonC
114
150
_ = sentinel ;
115
151
}
116
152
153
+ /// <summary>
154
+ /// <para>
155
+ /// Date and time when the component template was created. Only returned if the <c>human</c> query parameter is <c>true</c>.
156
+ /// </para>
157
+ /// </summary>
158
+ public System . DateTimeOffset ? CreatedDate { get ; set ; }
159
+
160
+ /// <summary>
161
+ /// <para>
162
+ /// Date and time when the component template was created, in milliseconds since the epoch.
163
+ /// </para>
164
+ /// </summary>
165
+ public System . DateTimeOffset ? CreatedDateMillis { get ; set ; }
117
166
public bool ? Deprecated { get ; set ; }
118
167
public System . Collections . Generic . IDictionary < string , object > ? Meta { get ; set ; }
168
+
169
+ /// <summary>
170
+ /// <para>
171
+ /// Date and time when the component template was last modified. Only returned if the <c>human</c> query parameter is <c>true</c>.
172
+ /// </para>
173
+ /// </summary>
174
+ public System . DateTimeOffset ? ModifiedDate { get ; set ; }
175
+
176
+ /// <summary>
177
+ /// <para>
178
+ /// Date and time when the component template was last modified, in milliseconds since the epoch.
179
+ /// </para>
180
+ /// </summary>
181
+ public System . DateTimeOffset ? ModifiedDateMillis { get ; set ; }
119
182
public
120
183
#if NET7_0_OR_GREATER
121
184
required
@@ -143,6 +206,28 @@ public ComponentTemplateNodeDescriptor()
143
206
public static explicit operator Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNodeDescriptor < TDocument > ( Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNode instance ) => new Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNodeDescriptor < TDocument > ( instance ) ;
144
207
public static implicit operator Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNode ( Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNodeDescriptor < TDocument > descriptor ) => descriptor . Instance ;
145
208
209
+ /// <summary>
210
+ /// <para>
211
+ /// Date and time when the component template was created. Only returned if the <c>human</c> query parameter is <c>true</c>.
212
+ /// </para>
213
+ /// </summary>
214
+ public Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNodeDescriptor < TDocument > CreatedDate ( System . DateTimeOffset ? value )
215
+ {
216
+ Instance . CreatedDate = value ;
217
+ return this ;
218
+ }
219
+
220
+ /// <summary>
221
+ /// <para>
222
+ /// Date and time when the component template was created, in milliseconds since the epoch.
223
+ /// </para>
224
+ /// </summary>
225
+ public Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNodeDescriptor < TDocument > CreatedDateMillis ( System . DateTimeOffset ? value )
226
+ {
227
+ Instance . CreatedDateMillis = value ;
228
+ return this ;
229
+ }
230
+
146
231
public Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNodeDescriptor < TDocument > Deprecated ( bool ? value = true )
147
232
{
148
233
Instance . Deprecated = value ;
@@ -174,6 +259,28 @@ public Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateNodeDescriptor<TDo
174
259
return this ;
175
260
}
176
261
262
+ /// <summary>
263
+ /// <para>
264
+ /// Date and time when the component template was last modified. Only returned if the <c>human</c> query parameter is <c>true</c>.
265
+ /// </para>
266
+ /// </summary>
267
+ public Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNodeDescriptor < TDocument > ModifiedDate ( System . DateTimeOffset ? value )
268
+ {
269
+ Instance . ModifiedDate = value ;
270
+ return this ;
271
+ }
272
+
273
+ /// <summary>
274
+ /// <para>
275
+ /// Date and time when the component template was last modified, in milliseconds since the epoch.
276
+ /// </para>
277
+ /// </summary>
278
+ public Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNodeDescriptor < TDocument > ModifiedDateMillis ( System . DateTimeOffset ? value )
279
+ {
280
+ Instance . ModifiedDateMillis = value ;
281
+ return this ;
282
+ }
283
+
177
284
public Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNodeDescriptor < TDocument > Template ( Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateSummary value )
178
285
{
179
286
Instance . Template = value ;
@@ -226,6 +333,28 @@ public ComponentTemplateNodeDescriptor()
226
333
public static explicit operator Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNodeDescriptor ( Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNode instance ) => new Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNodeDescriptor ( instance ) ;
227
334
public static implicit operator Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNode ( Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNodeDescriptor descriptor ) => descriptor . Instance ;
228
335
336
+ /// <summary>
337
+ /// <para>
338
+ /// Date and time when the component template was created. Only returned if the <c>human</c> query parameter is <c>true</c>.
339
+ /// </para>
340
+ /// </summary>
341
+ public Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNodeDescriptor CreatedDate ( System . DateTimeOffset ? value )
342
+ {
343
+ Instance . CreatedDate = value ;
344
+ return this ;
345
+ }
346
+
347
+ /// <summary>
348
+ /// <para>
349
+ /// Date and time when the component template was created, in milliseconds since the epoch.
350
+ /// </para>
351
+ /// </summary>
352
+ public Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNodeDescriptor CreatedDateMillis ( System . DateTimeOffset ? value )
353
+ {
354
+ Instance . CreatedDateMillis = value ;
355
+ return this ;
356
+ }
357
+
229
358
public Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNodeDescriptor Deprecated ( bool ? value = true )
230
359
{
231
360
Instance . Deprecated = value ;
@@ -257,6 +386,28 @@ public Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateNodeDescriptor Add
257
386
return this ;
258
387
}
259
388
389
+ /// <summary>
390
+ /// <para>
391
+ /// Date and time when the component template was last modified. Only returned if the <c>human</c> query parameter is <c>true</c>.
392
+ /// </para>
393
+ /// </summary>
394
+ public Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNodeDescriptor ModifiedDate ( System . DateTimeOffset ? value )
395
+ {
396
+ Instance . ModifiedDate = value ;
397
+ return this ;
398
+ }
399
+
400
+ /// <summary>
401
+ /// <para>
402
+ /// Date and time when the component template was last modified, in milliseconds since the epoch.
403
+ /// </para>
404
+ /// </summary>
405
+ public Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNodeDescriptor ModifiedDateMillis ( System . DateTimeOffset ? value )
406
+ {
407
+ Instance . ModifiedDateMillis = value ;
408
+ return this ;
409
+ }
410
+
260
411
public Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateNodeDescriptor Template ( Elastic . Clients . Elasticsearch . Cluster . ComponentTemplateSummary value )
261
412
{
262
413
Instance . Template = value ;
0 commit comments